query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Nom de la colonne
public String getColumnName(int col) { return columns[col] ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int obtenirColonne() {\n return this.colonne;\n }", "int nbColonnes();", "@Override\n\tpublic String getColumnName(int col)\n\t{\n\t\treturn nomColonnes[col];\n\t}", "@Override\n\tpublic int getColumnCount()\n\t{\n\t\treturn nomColonnes.length;\n\t}", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public final void mCOLON() throws RecognitionException {\n try {\n int _type = COLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2805:3: ( ':' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2806:3: ':'\n {\n match(':'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "int getNombreColonnesPlateau();", "public final void mCOLON() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = COLON;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:6: ( ':' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:16: ':'\n\t\t\t{\n\t\t\tmatch(':'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public final void mDCOLON() throws RecognitionException {\n try {\n int _type = DCOLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2811:3: ( '::' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2812:3: '::'\n {\n match(\"::\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mCOLON() throws RecognitionException {\n try {\n int _type = COLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:45:7: ( ':' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:45:9: ':'\n {\n match(':'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "EPREFIX_TYPE getName();", "public void printAnnuaireName() {\n\t\t\n\t}", "public String getName() {\n return tableName;\n }", "public void displayColonies() {\r\n\t\tchar[][] temp;\r\n\t\tint count;\r\n\r\n\t\tfor (int row = 0; row < slideData.length; row++) {\r\n \t\t\tfor (int col = 0; col < slideData[0].length; col++) {\r\n \t\t\tif (slideData[row][col] == COLONY) {\r\n \t\t \t\tcount = collectCells(row, col);\r\n \t\t\tSystem.out.println(\"Colony at (\" + row + \",\" + col + \") with size \" + count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public String getName(){\n\t\t\treturn tableName;\n\t\t}", "public String toString(){\n\t\tString abbrv = this.name().substring(0,1);\t\t\n\t\treturn abbrv;\n\t}", "public String getName() {\n return this.lineName;\n }", "public String getName () { return n.getName(); }", "public TableName name();", "public final void mCOLON() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.COLON;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:768:7: ( ':' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:768:9: ':'\n\t\t\t{\n\t\t\t\tthis.match(':');\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public void nommerHeros() {\n\t\tSystem.out.println(\"\\nComment voulez vous appeler votre personnage ?\");\n\t\tthis.nom = Clavier.entrerClavierString();\n\t\tSystem.out.println(\"\\n*********Bienvenue dans le labyrinthe \" + getNom()+\"*********\");\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"[name:]\"+name;\n\t}", "protected abstract String getPortPropertyName();", "String canonHr(String s) {\n List<String> l = StringUtil.breakAt(s, \":\");\n if (l.size() == 2) {\n return l.get(0) + \":\" + l.get(1).toUpperCase();\n }\n return s.toUpperCase();\n }", "public String getName() {\n return ctTableColumn.getName();\n }", "public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }", "public String getName() {\n return \"nickel\";\n }", "public String getName() {\n\t\tInteger inicio = indices.elementAt(0);\n\t\tInteger fin = (indices.size() > 1 ? indices.elementAt(1) : contenido.length());\n\t\treturn contenido.substring(inicio, fin-1);\n\t}", "PropertyName getName();", "public String getNomTable();", "protected abstract String getHostNamePropertyName();", "public String getObjectName() {\r\n\t\tif (objectName == null || objectName.length() == 0)\r\n\t\t\tsetObjectName(\"jk\" + jkNr);\r\n\t\treturn objectName;\r\n\t}", "public String getNameForm()\n {\n return schema.getNameForm();\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"段子\";\n\t}", "public String infoName();", "String getName() ;", "@Override\n public String toString()\n {\n return mi_name;\n }", "@Override\n public String toString()\n {\n return mi_name;\n }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn \"Macchina a stati finiti di nome \"+nome+\", nello stato \"+corrente.getNome()+\".\";\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn NAME;\n\t}", "public String getdipsplayname() {\n\t\treturn this.displayname;\n\t}", "@Override\n\t@Field(offset=149, length=30, paddingChar=' ', align=Align.RIGHT)\n\tpublic String getNomeSacado() {\n\t\treturn super.getNomeSacado();\n\t}", "String nameLabel();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public String getValueConcatenator() {\n\t\treturn \":\";\n\t}", "@Override\n public String toString() {\n return \"H\";\n }", "public String getName()\r\n {\n return \"tan\";\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Apart N°\"+Nombre;\n\t}" ]
[ "0.7031843", "0.6309519", "0.6271452", "0.6230726", "0.6223887", "0.61787397", "0.6132339", "0.60605264", "0.5964014", "0.5945078", "0.58593875", "0.5816322", "0.5807481", "0.5781714", "0.57809454", "0.5779889", "0.57705575", "0.57451814", "0.57075715", "0.5691437", "0.56859684", "0.56830394", "0.56820387", "0.5673236", "0.56569016", "0.5639902", "0.56309104", "0.56295514", "0.56190264", "0.56087565", "0.55893844", "0.55865926", "0.5566299", "0.5562495", "0.55510837", "0.5550378", "0.5543399", "0.5542552", "0.5536845", "0.5536845", "0.5535755", "0.5532332", "0.55193007", "0.5518078", "0.5517763", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.55070823", "0.5504913", "0.55031186", "0.54993004", "0.5491728" ]
0.0
-1
Instantiates a new Employee.
public Employee(String n, double s) { name = n; salary = s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employee() {}", "public Employee() {\n\t\tsuper();\n\t}", "public Employee() {\n\t\tSystem.out.println(\"Employee Contructor Called...\");\n\t}", "public Employee() {\n\n\t}", "public Employee() {\n\t\t\n\t}", "public Employee() {\n \n }", "Employee() {\n\t}", "public Employee() {\n }", "public Employee() {\n }", "public Employee() {\n }", "public Employee() {\t}", "public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }", "public Employee(){\n\t\t\n\t}", "public Employee(){\n\t\t\n\t}", "public Employee(){\r\n }", "@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}", "public Employee(String employeeId, String name) {\n this.employeeId = employeeId;\n this.name = name; // TODO fill in code here\n }", "public EmployeeRecord(){}", "public Employee(String id) {\n super(id);\n }", "public Employee(String name){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = 0;\r\n\t}", "public Employee() {\n employeeID = genID.incrementAndGet();\n }", "public Employee(String Name) {\r\n this.Name = Name;\r\n }", "public Employee(int employeeId, String employeeName, String employeeAddress) {\r\n\t\r\n\t\tthis.employeeId = employeeId;\r\n\t\tthis.employeeName = employeeName;\r\n\t\tthis.employeeAddress = employeeAddress;\r\n\t}", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "public Employee(EmployeeDto e) {\n\t\tthis.id = e.getId();\n\t\tthis.firstName = e.getFirstName();\n this.lastName = e.getLastName();\n\t\tthis.dateOfBirth = e.getDateOfBirth();\n\t\tthis.gender = e.getGender();\n\t\tthis.startDate = e.getStartDate();\n\t\tthis.endDate = e.getEndDate();\n\t\tthis.position = e.getPosition();\n this.monthlySalary = e.getMonthlySalary();\n this.hourSalary = e.getHourSalary();\n this.area = e.getArea();\n this.createdAt = e.getCreatedAt();\n this.modifiedAt = e.getModifiedAt();\n\t}", "Employee(String firstName, String lastName, String role) {\n\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.role = role;\n\t}", "public EmployeesImpl() {\r\n }", "public Employee(String fName, String lName, int ID) {\n this.FName = fName;\n this.LName = lName;\n this.ID = ID;\n }", "public Employee(String employeeName, PositionTitle position, boolean salary, double payRate, int employeeShift,\n String startDate, double hrsIn) {\n // ////////////// construct Employees\n this.employeeName = employeeName;\n this.position = position;\n this.salary = salary;\n this.payRate = payRate;\n this.employeeShift = employeeShift;\n this.startDate = startDate;\n this.hrsIn = hrsIn;\n\n }", "public Employee(int id, String name, double salary, Date dateOfBirth,\n String emailId, String mobileNumber) {\n this.id = id;\n this.name = name;\n this.salary = salary;\n this.dateOfBirth = dateOfBirth;\n this.emailId = emailId;\n this.mobileNumber = mobileNumber;\n }", "public Employee(String employeeFirstName, String employeeLastName, \r\n String employeeEmail, long employeePhoneNumber, \r\n String employeeStatus, double employeeSalary) {\r\n this.employeeFirstName = employeeFirstName;\r\n this.employeeLastName = employeeLastName;\r\n this.employeeEmail = employeeEmail;\r\n this.employeePhoneNumber = employeePhoneNumber;\r\n this.employeeStatus = employeeStatus;\r\n this.dateHired = new Date();\r\n this.employeeAddress = new Address();\r\n this.employeeSalary = employeeSalary;\r\n }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position, int departmentId)\r\n\t{\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\tthis.departmentId = departmentId;\r\n\r\n\t}", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position, int departmentId, int groupId)\r\n\t{\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\tthis.departmentId = departmentId;\r\n\t\tthis.groupId = groupId;\r\n\t}", "Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }", "Employee(String employeeName, double employeeSalary, int employeeAge) {\n\t\tthis.employeeName = employeeName;\n\t\tthis.employeeSalary = employeeSalary;\n\t\tthis.employeeAge = employeeAge;\n\t}", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position){\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\t\r\n\t}", "public Employee(String name, int id) {\n super(name, id);\n position = \"None\";\n salary = 0.0;\n }", "public Employee() throws OutOfRangeException { //default constructors have no parameters\n\t\t//must create a default constructor, if a subclass is created\n\t\tthis(\"\",\"\",10.0f,40);\n\t\temployeeCount++;\n\t}", "public Employee () {\r\n lName = \"NO LAST NAME\";\r\n fName = \"NO FIRST NAME\";\r\n empID = \"NO EMPLOYEE ID\";\r\n salary = -1;\r\n }", "public Employee(String inName, double inSalary)\n\t{\n\t\tname = inName;\n\t\tsalary = inSalary;\n\t}", "public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }", "public Employee(int id, String name, double salary, Date dateOfBirth,\n String mobileNumber, String emailId, List<Address> address,\n List<Project> project) {\n this.id = id;\n this.name = name;\n this.salary = salary;\n this.dateOfBirth = dateOfBirth;\n this.mobileNumber = mobileNumber;\n this.emailId = emailId;\n this.address = address;\n this.project = project;\n }", "public Employee(String firstName, String lastName) {\n\t\tsuper();\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t}", "public Employee(int id, String firstName, String lastName, String company) {\n this(firstName, lastName, company);\n\n this.id = id;\n }", "public Employee(String name, double salary){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = salary;\r\n\t}", "public Employee(String fName, String lName, String gender, double salary) {\n this.fName = fName;\n this.lName = lName;\n this.gender = gender;\n this.salary = salary; \n }", "public Employee createNewEmployee(String name) {\n Employee newEmployee = new Employee(DumbDB.employeeCounter++, name, NO_DEPARTMENT_ID);\n getAllEmployees().add(newEmployee);\n return newEmployee;\n }", "public Employee(String name, int salary)\n\n\t{\n\t\tthis.name = name;\n\t\tthis.salary = salary;\n\t}", "public Employee(int id, String firstName, String lastName, int age, double salary, String address) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.age = age;\n\t\tthis.salary = salary;\n\t\tthis.address = address;\n\t}", "public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}", "public Employee(String firstName, String lastName, int age, double salary) {\r\n //envoke the super class's constructor\r\n super(firstName, lastName, age);\r\n \r\n //set the instance variables specific to this class. \r\n this.salary = salary;\r\n employeeNumber = nextEmployeeNumber;\r\n nextEmployeeNumber++;\r\n }", "public Employee() {\r\n\t\t// super should be 1st line \r\n\t\tsuper();\r\n\t\tSystem.out.println(\"Hi i'm from constructor \");\r\n\t}", "private Employee addEmployee(int id, String name, String address) {\r\n\t\treturn new Employee(id, name, address);\r\n\t}", "public Employee(String name, int id, String position, double salary) { \n super(name, id);\n this.position = position;\n this.salary = salary;\n }", "public Employee(int empID, String firstName, String lastName, int ssNum,\n Date hireDate, double salary) {\n if (Employee.setOfIDs.contains(empID) || !Employee.isPositive(empID)) {\n this.empID = Employee.generateID();\n } else {\n this.empID = empID;\n }\n Employee.sortType = SortType.SORT_BY_ID;\n Employee.setOfIDs.add(this.empID);\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssNum = ssNum;\n this.hireDate = hireDate;\n this.salary = salary;\n }", "Employee(String name, String profile, int id, String regime) {\n super(name, profile, id);\n this.regime = regime;\n }", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "public Employee(int id, String first, String last, String email,\r\n\t\t\tString role, String username, String password)\r\n\t{\r\n\t\tthis.employeeId = id;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.role = role;\r\n\t\tthis.username = username;\r\n\t\tthis.password= password;\r\n\t}", "public Employee(int id, String name, double salary, Date dateOfBirth,\n String mobileNumber, String emailId, List<Address> address) {\n this.name = name;\n this.id = id;\n this.salary = salary;\n this.dateOfBirth = dateOfBirth;\n this.address = address;\n this.mobileNumber = mobileNumber;\n this.emailId = emailId;\n }", "Employee(String empId, String name, int roleId, double basic, double allowancePercentage, double hra){\r\n\t\tthis.empId = empId;\r\n\t\tthis.name = name;\r\n\t\tthis.role.setRoleId(roleId);\r\n\t\tthis.basic = basic;\r\n\t\tthis.allowancePercentage = allowancePercentage;\r\n\t\tthis.hra = hra;\r\n\t}", "private Employee(String name, String city, String id,int salary) {\n\t\tthis.name = name;\n\t\tthis.city = city;\n\t\tthis.id = id;\n\t\tthis.salary = salary;\n\t}", "public EmployeeNotFoundException() {\n super();\n }", "Employees() { \r\n\t\t this(100,\"Hari\",\"TestLeaf\");\r\n\t\t System.out.println(\"default Constructor\"); \r\n\t }", "Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }", "public Employee hireEmployee(int GasStationID, String Name, String SSN, Double salary, String department, EmployeePosition employeePosition, Date startDate) throws SQLException {\n Employee newHire = new Employee(GasStationID, Name, SSN, salary, department, employeePosition, startDate);\n newHire.create();\n return newHire;\n }", "public Manager() {\n\t\tsuper();\n\t\temployees = new Employee[10];\n\t}", "public Employee(int employeeRef, PersonInterface person, String username, String password, String createdBy, Date createdDate) throws RemoteException {\n this.employeeRef = employeeRef;\n this.person = person;\n this.contracts = new ArrayList();\n this.notes = new ArrayList();\n this.modifiedBy = new ArrayList();\n this.createdBy = createdBy;\n this.createdDate = createdDate;\n this.user = new UserImpl(employeeRef, person.getPersonRef(), username, password, null);\n }", "public Employee(String firstName, String lastName, int age, Address address, int id, String ssn) {\n\t\tsuper(firstName, lastName, age, ssn, address);\n\t\tthis.id = id;\n\t}", "public Employe() {\r\n this(NOM_BIDON, null);\r\n }", "public Employee(String name, String email, Address address, String phoneNumber, GenderEnum genderEnum) {\n this();\n this.name = name;\n this.email = email;\n this.address = address;\n this.phoneNumber = phoneNumber;\n this.gender = genderEnum;\n }", "public static void main(String[] args) {\nnew Employee();// Calling the Constructor.\r\n\t}", "public Employee(String nom, int number )\n\t{\n\t\tName = nom;\n\t\tthis.Number = number;\n\t}", "public Employee(String firstName, String lastName, String SSN){\r\n this.firstName=firstName;\r\n this.lastName=lastName;\r\n this.SSN=SSN;\r\n }", "public Employee(int emp_no, Date birth_date, String first_name, String last_name, String gender, Date hire_date) {\n this.emp_no = emp_no;\n this.birth_date = birth_date;\n this.first_name = first_name;\n this.last_name = last_name;\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F;\n this.hire_date = hire_date;\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 }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public Employee(String username,String password,String firstname,String lastname,Date DoB,\n String contactNamber,String email,float salary,String positionStatus,String name,\n String buildingName, String street, Integer buildingNo, String area,\n String city, String country, String postcode){\n\n super(username, password,firstname, lastname,DoB, contactNamber, email,\n name, buildingName, street, buildingNo, area, city, country, postcode);\n setSalary(salary);\n setPositionStatus(positionStatus);\n }", "public void instantiateEmployees(ResultSet resultSet) throws SQLException {\n\n\t\t\n\t\twhile (resultSet.next()) {\n\t\t\t// Instantiate\n\t\t\tEmployee employee = new Employee(\n\t\t\t\t\tresultSet.getString(EmployeeColumns.Email.colNr()),\n\t\t\t\t\tresultSet.getString(EmployeeColumns.Name.colNr()),\n\t\t\t\t\tresultSet.getInt(EmployeeColumns.Telephone.colNr())\n\t\t\t\t);\n\t\t\t\n\t\t\t// Add to model\n\t\t\tmodel.addEmployee(employee);\n\t\t}\n\t}", "public static Employee createEmployee(int id, String name, double salary, String type) {\n if (type.equals(\"permanent\")) {\n return new PermanentEmployee(id, name, salary);\n } else if (type.equals(\"temporary\")) {\n return new TemporaryEmployee(id, name, salary);\n } else {\n throw new IllegalArgumentException(\"Invalid type for employee\");\n }\n }", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public static es.davinciti.liferay.model.SapEmployee create(\n\t\tlong sapEmployeeId) {\n\t\treturn getPersistence().create(sapEmployeeId);\n\t}", "public Employee(String code, Name name, Address address, String[] emails){\n super(code, address);\n this.emails = emails;\n this.name = name;\n }", "public EmployeeTransition() {\n this.id = new UUID(0, 0);\n this.f_name = StringUtils.EMPTY;\n this.l_name = StringUtils.EMPTY;\n this.employeeid = \"-1\";\n this.active = StringUtils.EMPTY;\n this.role = StringUtils.EMPTY;\n this.manager = StringUtils.EMPTY;\n this.password = StringUtils.EMPTY;\n this.createdOn = new Date();\n }", "public EmployeeTransition(Employee employee) {\n this.id = employee.getId();\n this.f_name = employee.getFname();\n this.l_name = employee.getLname();\n this.employeeid = employee.getEmployeeid();\n this.active = employee.getActive();\n this.role = employee.getRole();\n this.manager = employee.getManager();\n this.password = employee.getPassword();\n this.createdOn = employee.getCreatedOn();\n }", "@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}", "private Employee(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\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}", "@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}", "public Employee(String firstName, String secondName, double hourlyRate){\n\t\tthis.firstName = firstName;\n\t\tthis.secondName = secondName;\n\t\tthis.hourlyRate = hourlyRate;\n\t\t\n\t}", "public Empleado() { }", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\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 Large_Employee(\n String txtMobile,\n String txtEmail,\n String emailPassword,\n String corpPhoneType,\n String corpPhoneNumber,\n int employeeID){\n this.txtMobile = txtMobile;\n this.txtEmail = txtEmail;\n this.emailPassword = emailPassword;\n this.corpPhoneType = corpPhoneType;\n this.corpPhoneNumber = corpPhoneNumber;\n this.employeeID = employeeID;\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 Employee(String name,String pos,int sal, int Vbal, int AnBon){\n Random rnd = new Random();\n this.idnum = 100000 + rnd.nextInt(900000);\n this.name = name;\n this.position = pos;\n this.salary = sal;\n this.vacationBal = Vbal;\n this.annualBonus = AnBon;\n this.password = \"AJDLIAFYI\";\n salaryHist[0] = salary;\n }" ]
[ "0.78817695", "0.7866101", "0.7865031", "0.78367496", "0.78169423", "0.7816273", "0.7810965", "0.77583045", "0.77583045", "0.77583045", "0.7743915", "0.77382886", "0.7713318", "0.7713318", "0.76535535", "0.7355357", "0.73237157", "0.731892", "0.73182124", "0.73053324", "0.71325403", "0.7084964", "0.70776325", "0.7074582", "0.70623106", "0.7053669", "0.70456254", "0.7044537", "0.703688", "0.7016443", "0.7009251", "0.700712", "0.6976728", "0.6976011", "0.6966592", "0.6937331", "0.69318616", "0.692792", "0.69193697", "0.689902", "0.6885472", "0.6871941", "0.6863649", "0.6859891", "0.68386257", "0.6817753", "0.6805317", "0.6801643", "0.6784263", "0.67810184", "0.6774956", "0.67677474", "0.67389995", "0.6730061", "0.6691933", "0.6690052", "0.66851556", "0.6681193", "0.6674484", "0.6654043", "0.66475666", "0.6645839", "0.6623598", "0.6586578", "0.65623635", "0.6554952", "0.6550373", "0.6530423", "0.65298516", "0.65174705", "0.65146387", "0.6491847", "0.6460423", "0.64551425", "0.64491385", "0.64483577", "0.6430541", "0.6418679", "0.64034176", "0.63886553", "0.6388534", "0.63821447", "0.6366572", "0.6356179", "0.6348254", "0.63264954", "0.63160115", "0.6310073", "0.6309727", "0.6308565", "0.63082474", "0.63045126", "0.6296858", "0.62428933", "0.62376463", "0.62375826", "0.62372434", "0.6209256", "0.6190817", "0.61844814" ]
0.6676051
58
TODO Autogenerated method stub
@Override public void onFailure(Call arg0, IOException arg1) { onError(callback, arg1.getMessage()); arg1.printStackTrace(); FLogger.e(arg1.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onResponse(Call arg0, Response response) throws IOException { try { String string = response.header("Set-Cookie"); s = string.substring(0, string.indexOf(";")); } catch (Exception e) { // TODO: handle exception } String result = response.body().string(); // String result=""; // 是否有响应 if (response.isSuccessful()) { FLogger.e(Global.INNER_TAG, "success"); onResult(callback, result.toString(),true); } else { FLogger.e(Global.INNER_TAG, "failed"); onResult(callback, result.toString(),false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onFailure(Call arg0, IOException arg1) { FLogger.e(arg1.getMessage()); arg1.printStackTrace(); onError(callback, arg1.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onResponse(Call arg0, Response response) throws IOException { String resultmsg = response.body().string(); String result=""; // try { // result = URLDecoder.decode(resultmsg, "UTF-8"); // } catch (UnsupportedEncodingException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // FLogger.e(Global.INNER_TAG, "解析数据出错"); // } // 是否有响应 if (response.isSuccessful()) { FLogger.e(Global.INNER_TAG, "success"); onResult(callback, result.toString(),true); } else { FLogger.e(Global.INNER_TAG, "failed"); onResult(callback, result.toString(),false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onResponse(Call arg0, Response response) throws IOException { if (response.isSuccessful()) { onSuccess(callback, response.body().string()); } else { onError(callback, response.message()); } }
{ "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
Return the register template with an empty UserDTO
@GetMapping(value="/") public String showRegistrationForm(WebRequest request, Model model) { UserDTO userDTO = new UserDTO(); model.addAttribute("user", userDTO); return "security/register"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserDto create(UserRegistrationDto user);", "UserDTO registerUser(UserRegistrationDTO registrationDTO);", "@GetMapping(\"/register\")\n public String showRegister(Model model){\n model.addAttribute(\"user\", new User());\n return \"registerForm\";\n }", "@GetMapping(\"register\")\n public String registerForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"register_form\";\n }", "@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }", "UserDTO registerUser(final UserDTO userDTO);", "@ModelAttribute(\"user\")\n public UserRegistration userRegistration() {\n return new UserRegistration();\n }", "@GetMapping(\"/registration\")\n\t public String registration(Model model) {\n\t model.addAttribute(\"userForm\", new User());\n\t return \"registration\";\n\t }", "@GetMapping(\"/registration\")\n public String registration(Model model) {\n \t\n model.addAttribute(\"userForm\", new User());\n\n return \"registration\";\n }", "@PostMapping(\"/register\")\n public ResponseEntity<Map<String, String>> registerUser(@RequestBody User user){ \n userService.registerUser(user);\n return new ResponseEntity<>(generateJWTTToken(user), HttpStatus.OK);\n }", "public UserRegisterResponse() {\n }", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"[email protected]\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "@Override\r\n\tpublic User1 userRegistration() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic UserRegistrationResponseDto registerUser(UserRegistrationRequestDto userId) {\n\t\treturn null;\r\n\t}", "@GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);", "boolean registerUser(UserRegisterDTO userRegisterDTO);", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "List<UserRegistrationDto> getAllRegistrations();", "@PostMapping(value = \"/register\") \n\t public RegisterResponseDto\t usersRegister(@RequestBody RegistrationDto registrationDto) {\n\t LOGGER.info(\"usersRegster method\");\n\t return\t userService.usersRegister(registrationDto); \n\t }", "User registration(User user);", "@POST\n @Path(\"register\")\n @Produces(MediaType.APPLICATION_JSON)\n public JAXResult register(UserBE user){\n return null;\n }", "@Override\r\n\tpublic Object registerNewUser(UserDTO userDto) throws DataAccessException, SQLException {\n\t\tlogger.info(\"start : registerNewUser UsersMngDaoImpl \");\r\n\t\tUsers userData = null;\r\n\t\t\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tTimestamp currentTimeStamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n\t\t\r\n\t\tif(isUserExist(userDto.getUserName())) {\r\n\t\t\tthrow new UserAlreadyExistException(\"UserName Already Exist \" + userDto.getUserName());\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\r\n\t\tUsers newUser = new Users();\r\n\t\tnewUser.setUserName(userDto.getUserName());\r\n\t\tnewUser.setPassword(bcryptEncoder.encode(DDCommonConstant.DEFAULT_USER_PASSWORD));\r\n\t\tnewUser.setIsActive(DDCommonConstant.USER_ACTIVATION_FLAG);\r\n\t\tnewUser.setLastUpdated(currentTimeStamp);\r\n\t\tnewUser.setLastaccessed(new Date());\r\n\t\tCollection<Roles> roleList = new ArrayList<Roles>();\r\n\t\tif(userDto.getPassword() == null) {\r\n\t\t\tRoles role = roleRepository.findByRoleId(DDCommonConstant.USER_DEFAULT_ROLE_THROUGH_APP);\r\n\t\t\troleList.add(role);\r\n\t\t}else {\r\n\t\t\tnewUser.setUserName(bcryptEncoder.encode(userDto.getPassword()));\r\n\t\t\tRoles role = (Roles) userDto.getRoles();\r\n\t\t\trole = roleRepository.findByRoleId(role.getRoleId());\r\n\t\t\troleList.add(role);\r\n\t\t}\r\n\t\tnewUser.setRoles(roleList);\r\n\t\t\r\n\t\tuserData = userRepo.save(newUser);\r\n\t\t}\r\n\t\tlogger.info(\"End : registerNewUser UsersMngDaoImpl \");\r\n\t\treturn userData;\r\n\t\t}", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@RequestBody RegistrationRequest registrationRequest){\n return userService.registerUser(registrationRequest);\n }", "private UserDTO createUserDto(User userToReturn) {\n\t\tList<Account> accounts = userToReturn.getAccounts();\r\n\t\tList<AccountDTO> accountsDTO = new ArrayList<AccountDTO>(\r\n\t\t\t\taccounts != null ? accounts.size() : 0);\r\n\t\tif (accounts != null) {\r\n\t\t\tfor (Account account : accounts) {\r\n\t\t\t\taccountsDTO.add(new AccountDTO(account.getId(), account\r\n\t\t\t\t\t\t.getRib(), account.getOpeningDate(),\r\n\t\t\t\t\t\taccount.getSolde(), account.getType(), null, null,\r\n\t\t\t\t\t\tnew UserDTO(), null, null));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new UserDTO(userToReturn.getId(), userToReturn.getLogin(),\r\n\t\t\t\tuserToReturn.getPassword(), userToReturn.getFullName(),\r\n\t\t\t\taccountsDTO);\r\n\t}", "public BUserToRegisterDto register(BUserToRegisterDto bUserToRegisterDto) {\n\t\tBUserToRegisterDto res = new BUserToRegisterDto();\n\t\tList<String> errores = validateBUserToRegisterDto(bUserToRegisterDto);\n\t\tif(errores.isEmpty()){\n\t\t\tBUser bUser = convertDtoToEntity(bUserToRegisterDto);\n\t\t\tbUserRepository.save(bUser);\n\t\t}else{\n\t\t\tres.setErrores(errores);\n\t\t}\n\t\treturn res;\n\t}", "public static RegisterResult register(RegisterRequest r) {\n\n User new_user = new User(UUID.randomUUID().toString(), r.userName, r.password, r.email,\n r.firstName, r.lastName, r.gender);\n\n RegisterResult result = new RegisterResult();\n\n User test_user = UserDao.getUser(r.userName);\n if (test_user != null && !test_user.userName.equals(\"\"))\n {\n result.message = \"Error: Username already taken by another user\";\n result.success = false;\n return result;\n }\n\n result.authToken = UUID.randomUUID().toString();\n AuthTokenDao.updateToken(r.userName, result.authToken);\n\n Person p = new Person(new_user.personID, r.userName, r.firstName, r.lastName, r.gender);\n PersonDao.addPerson(p);\n\n result.userName = r.userName;\n result.personID = new_user.personID;\n UserDao.addUser(new_user);\n\n // Generate 4 generations of ancestry\n GenerateData.generateGenerations(r.userName, 4);\n\n result.success = true;\n\n return result;\n }", "void createUser(CreateUserDto createUserDto);", "Optional<User> create(UserDto dto);", "@Override\n public User register(UserRegisterModel model) {\n User newUser = User.builder()\n .password(model.getPassword())\n .username(model.getUsername())\n .dateOfBirth(model.getDateOfBirth())\n .build();\n return userRepository.save(newUser);\n }", "public IUser getRegistrator(){\n\t\treturn User.get().\n\t\t\t\tsetPerson(Person.get()\n\t\t\t\t\t\t.setFirstname(\"Regisytator\")\n\t\t\t\t\t\t.setLastname(\"Registrator\")\n\t\t\t\t\t\t.setEmail(\"[email protected]\")\n\t\t\t\t\t\t.build()\n\t\t\t\t\t\t)\n\t\t\t\t.setAccount(Account.get()\n\t\t\t\t\t\t.setLogin(\"registrator\")\n\t\t\t\t\t\t.setPassword(\"registrator\")\n\t\t\t\t\t\t.setRole(\"REGISTRATOR\")\n\t\t\t\t\t\t.setStatus(\"ACTIVE\")\n\t\t\t\t\t\t.setCommunity(\"Україна\")\n\t\t\t\t\t\t.build()\n\t\t\t\t\t\t.setData(\"\")\n\t\t\t\t\t\t.setRegisterNumber(\"14\")\n\t\t\t\t\t\t.setRegistratorNumber(\"804:23:17:026:79000:\")\n\t\t\t\t\t\t.setVolumeNumber(\"12345\")\n\t\t\t\t\t\t)\n\t\t\t\t.build();\t\n\t}", "public RegisterUserBean() {\n this.account.setGender(Boolean.TRUE);\n this.roleID = 5;\n }", "public UserDto() {\n }", "@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<?> create(@Validated({UserReqDTO.New.class}) @RequestBody UserReqDTO userDTO) {\n log.info(\"Create user {}\", userDTO);\n return new ResponseEntity<>(service.create(userDTO), HttpStatus.CREATED);\n }", "@PostMapping(value = \"/register\", consumes = \"application/json\")\n\tpublic ResponseEntity<UserDTO> register(@RequestBody UserDTO userDTO){\n\t\tUser user = new User();\n\t\tif(userService.findByUsername(userDTO.getUsername()) != null) {\n\t\t\treturn new ResponseEntity<UserDTO>(HttpStatus.CONFLICT);\n\t\t}\n\t\tuser.setName(userDTO.getName());\n\t\tuser.setUsername(userDTO.getUsername());\n\t\tuser.setPassword(userDTO.getPassword());\n\t\tuser.setPhoto(userDTO.getPhoto());\n\t\t\n\t\tSet<Role> rolesToAdd = new HashSet<>();\n\t\tfor (RoleDTO roleDTO : userDTO.getRoles()) {\n\t\t\tRole role = roleService.findOne(roleDTO.getRoleName());\n\t\t\trolesToAdd.add(role);\n\t\t}\n\t\tuser.setRoles(rolesToAdd);\n\t\t\n\t\tuser = userService.save(user);\n\t\treturn new ResponseEntity<UserDTO>(new UserDTO(user), HttpStatus.CREATED);\n\t\t\n\t}", "@GetMapping(\"/register\")\r\n\tpublic String showRegistrationForm(Model theModel) {\r\n\t\ttheModel.addAttribute(\"user\", new UserCrm());\r\n\t\treturn \"registration\";\r\n\t}", "void saveRegisterInformation(UserDTO userDTO);", "@Override\r\n\tpublic ResponseBean<UsuarioEntity> crear(UsuarioEntity entity) {\n\t\treturn null;\r\n\t}", "UserCreateResponse createUser(UserCreateRequest request);", "public IUser getEmpty() {\n\t\treturn User.get()\n\t\t\t\t\t.setPerson(Person.get()\n\t\t\t\t\t\t\t\t\t.setFirstname(\"\")\n\t\t\t\t\t\t\t\t\t.setLastname(\"\")\n\t\t\t\t\t\t\t\t\t.setEmail(\"\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setMiddlename(\"\")\n\t\t\t\t\t\t\t\t\t.setPhonenumber(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setAccount(Account.get()\n\t\t\t\t\t\t\t\t\t.setLogin(\"\")\n\t\t\t\t\t\t\t\t\t.setPassword(\"\")\n\t\t\t\t\t\t\t\t\t.setRole(\"\")\n\t\t\t\t\t\t\t\t\t.setStatus(\"\")\n\t\t\t\t\t\t\t\t\t.setCommunity(\"\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setData(\"\")\n\t\t\t\t\t\t\t\t\t.setRegisterNumber(\"\")\n\t\t\t\t\t\t\t\t\t.setRegistratorNumber(\"\")\n\t\t\t\t\t\t\t\t\t.setVolumeNumber(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.build()\n\t\t\t\t\t.setAddress(Address.get()\n\t\t\t\t\t\t\t.setRegion(\"\")\n\t\t\t\t\t\t\t.setDistrict(\"\")\n\t\t\t\t\t\t\t.setCity(\"\")\n\t\t\t\t\t\t\t.setStreet(\"\")\n\t\t\t\t\t\t\t.setBuilding(\"\")\n\t\t\t\t\t\t\t.setFlat(\"\")\n\t\t\t\t\t\t\t.setPostcode(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setPassport(Passport.get()\n\t\t\t\t\t\t\t.setSeria(\"\")\n\t\t\t\t\t\t\t.setNumber(\"\")\n\t\t\t\t\t\t\t.setPublished(\"\")\n\t\t\t\t\t\t\t);\n\t}", "@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}", "@PostMapping(path = \"/register\",\n produces={MediaType.APPLICATION_JSON_VALUE, MediaType.TEXT_PLAIN_VALUE})\n @Timed\n public ResponseEntity registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) {\n\n HttpHeaders textPlainHeaders = new HttpHeaders();\n textPlainHeaders.setContentType(MediaType.TEXT_PLAIN);\n\n return userRepository.findOneByLogin(managedUserVM.getLogin().toLowerCase())\n .map(user -> new ResponseEntity<>(\"login already in use\", textPlainHeaders, HttpStatus.BAD_REQUEST))\n .orElseGet(() -> userRepository.findOneByEmail(managedUserVM.getEmail())\n .map(user -> new ResponseEntity<>(\"e-mail address already in use\", textPlainHeaders, HttpStatus.BAD_REQUEST))\n .orElseGet(() -> {\n User user = userService\n .createUser(managedUserVM.getLogin(), managedUserVM.getPassword(),\n managedUserVM.getFirstName(), managedUserVM.getLastName(),\n managedUserVM.getEmail().toLowerCase(), managedUserVM.getImageUrl(), managedUserVM.getLangKey());\n\n mailService.sendActivationEmail(user);\n return new ResponseEntity<>(HttpStatus.CREATED);\n })\n );\n }", "@RequestMapping(\"/register\")\r\n\tpublic ModelAndView register(@ModelAttribute(\"registerForm\") final UserRegisterForm form) {\r\n\t\treturn new ModelAndView(\"users/register\");\r\n\t}", "@Override\n public RegisterBO register(UserRequest userRequest) {\n User user = new User().with(u -> u.email = userRequest.getEmail())\n .with(u -> u.username = userRequest.getEmail())\n .with(u -> u.preferredLanguages.add(new Locale(\"es\", \"CL\")))//TODO: revisar mas adelante\n .with(u -> u.password = userRequest.getPassword())\n .with(u -> u.fullName = userRequest.getFullName());\n if (userRequest.getPhone() != null)\n user.with(u -> u.mobilePhone = userRequest.getPhone().trim());\n\n // Se inicia el registro de usuario y objecto request\n UserRegistration registration = new UserRegistration();\n registration.applicationId = UUID.fromString(aplicationId);\n registration.verified = false;\n\n RegistrationRequest request = new RegistrationRequest(user, registration);\n\n // Uso el objeto ClientResponse para capturar respuesta\n ClientResponse<RegistrationResponse, Errors> response = getFusionAuthClient.register(null, request);\n\n // Traducto respuesta segun exito o error\n return registerTranslate.translate(response);\n }", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@Override\n @RequestMapping(\"/register\")\n public ConfirmationMessage register(@RequestParam(value = \"username\", defaultValue = \"\") String username,\n @RequestParam(value = \"password1\", defaultValue = \"\") String password1,\n @RequestParam(value = \"password2\", defaultValue = \"\") String password2,\n @RequestParam(value = \"email\", defaultValue = \"\") String email,\n @RequestParam(value = \"city\", defaultValue = \"\") String city) {\n return userLogic.register(username, password1, password2, email, city);\n }", "@RequestMapping(value = {\"/register\"}, method = RequestMethod.GET)\n public String newUser(ModelMap model) {\n User user = new User();\n Customer customer = new Customer();\n List<UserProfile> userProfileList = new ArrayList();\n user.setCustomer(customer);\n user.setUserProfileList(userProfileList);\n model.addAttribute(\"user\", user);\n model.addAttribute(\"edit\", false);\n model.addAttribute(\"action\", \"newuser\");\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n return \"registration\";\n }", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@Valid @RequestBody SignupRequest signupRequest) {\n System.out.println(\"Creating User \" + signupRequest);\n\n if (userAccountDetailsService.isUserExistByUsername(signupRequest.getUsername())) {\n System.out.println(\"A User with username: \" + signupRequest.getUsername() + \" already exist\");\n return new ResponseEntity<Void>(HttpStatus.CONFLICT);\n }\n\n UserAccount userAccount = new UserAccount();\n userAccount.setName(signupRequest.getName());\n userAccount.setUsername(signupRequest.getUsername());\n userAccount.setAge(signupRequest.getAge());\n userAccount.setPassword(passwordEncoder.encode(signupRequest.getPassword()));\n\n Set<String> roles = signupRequest.getRole();\n Set<Authorities> authorities = new HashSet<>();\n for(String role: roles) {\n Authorities authority = new Authorities();\n authority.setAuthority(role);\n authority.setUserAccount(userAccount);\n authorities.add(authority);\n }\n userAccount.setAuthorities(authorities);\n\n userAccountDetailsService.saveUser(userAccount);\n\n return new ResponseEntity<Void>(HttpStatus.CREATED);\n }", "public abstract User register(User data);", "public Builder clearCreateUser() {\n \n createUser_ = getDefaultInstance().getCreateUser();\n onChanged();\n return this;\n }", "@GetMapping(\"/register-particular\")\n\tpublic ModelAndView goToRegisterPartForm() {\n\t\t\n\t\tModelAndView mav = new ModelAndView(\"register-particular\");\n\t\tUser user = new User();\n\t\tmav.addObject(\"user\", user);\n\n\t\treturn mav;\n\t}", "@PostMapping(value = \"/registration\")\n public @ResponseBody\n ResponseEntity<Object> register(@RequestParam(\"firstName\") String firstName,\n @RequestParam(\"lastName\") String lastName,\n @RequestParam(\"username\") String username,\n @RequestParam(\"password\") String password) {\n\n Person person = personService.getPersonByCredentials(username);\n\n String securePassword = HashPasswordUtil.hashPassword(password);\n\n if (person == null) {\n\n person = new Person(username, securePassword, firstName, lastName, PersonType.USER);\n\n try {\n personService.add(person);\n } catch (IllegalArgumentException e) {\n logger.error(e.getMessage());\n }\n person = personService.getPersonByCredentials(username);\n\n ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();\n HttpSession session = attr.getRequest().getSession(true); // true == allow create\n session.setAttribute(\"user\", username);\n session.setAttribute(\"userId\", person.getId());\n\n return ResponseEntity.status(HttpStatus.OK).body(null);\n } else {\n return ResponseEntity.status(HttpStatus.FORBIDDEN).body(null);\n }\n\n }", "public BUser convertDtoToEntity(BUserToRegisterDto bUserToRegisterDto){\n\t\tBUser bUser = new BUser();\n\t\tif(bUserToRegisterDto!=null){\n\t\t\tbUser.setUsername(bUserToRegisterDto.getUsername());\n\t\t\tbUser.setName(bUserToRegisterDto.getName());\n\t\t\tbUser.setSurname(bUserToRegisterDto.getSurname());\n\t\t\tbUser.setEmail(bUserToRegisterDto.getEmail());\n\t\t\tbUser.setPhoneNumber(bUserToRegisterDto.getPhoneNumber());\n\t\t\tbUser.setPassword(bUserToRegisterDto.getPassword());\n\t\t}\n\t\treturn bUser;\n\t}", "@Override\n\tpublic Usuario create(Usuario obj) {\n\t\treturn null;\n\t}", "@Override\r\n public String addUser(UserDTO dto) throws DuplicateElementException {\n\r\n User userEsist = userRepository.findByUsername(dto.getUsername());\r\n if(userEsist == null) {\r\n User user = new User();\r\n user.setFirstName(dto.getFirstName());\r\n user.setLastName(dto.getLastName());\r\n user.setRole(Role.valueOf(dto.getRole()));\r\n // Embedded Object\r\n Address address = new Address();\r\n AddressDTO addressDTO = dto.getAddresses();\r\n address.setCity(addressDTO.getCity());\r\n address.setLandmark(addressDTO.getLandmark());\r\n address.setPhoneNumber(addressDTO.getPhoneNumber());\r\n address.setPostboxNo(addressDTO.getPostboxNo());\r\n address.setZipcode(addressDTO.getZipcode());\r\n user.setAddress(address);\r\n user.setEmail(dto.getEmail());\r\n user.setUsername(dto.getUsername());\r\n user.setPassword(dto.getPassword());\r\n userRepository.save(user);\r\n return \"SUCCESS\";\r\n } else {\r\n throw new DuplicateElementException(\"User with username \"+ dto.getUsername()+ \" already present\");\r\n }\r\n\r\n\r\n\r\n\r\n }", "void register() {\n if (registerView.getFirstName().length() == 0 || registerView.getLastName().length() == 0 || registerView.getUsername().length() == 0 || registerView.getPassword().length() == 0) {\n IDialog invalidRegistrationDialog\n = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Fields must be non-empty!\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n } else {\n if (userController.registerUser(registerView.getFirstName(), registerView.getLastName(), registerView.getUsername(), registerView.getPassword()) != null) {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.MAIN_MENU));\n } else {\n IDialog invalidRegistrationDialog = dialogFactory.createDialog(DialogFactoryOptions.dialogNames.MESSAGE, new HashMap<String, Object>() {\n {\n put(\"message\", \"Unable to register: Username is already taken\");\n put(\"title\", \"Authentication Error\");\n put(\"messageType\", DialogFactoryOptions.dialogType.ERROR);\n }\n });\n\n invalidRegistrationDialog.run();\n }\n }\n }", "public String register(RegisterRequest registerRequest) throws EmailAlreadyUsedException,ResourceNotFoundException {\n if (this.userRepository.existsByEmail(registerRequest.getEmail())) {\n throw new EmailAlreadyUsedException(\"Error: Email is already in use!\");\n }\n // Create new user account\n User user = new User();\n user.setFirstName(registerRequest.getFirstName());\n user.setLastName(registerRequest.getLastName());\n user.setEmail(registerRequest.getEmail());\n user.setPassword(passwordEncoder.encode(registerRequest.getPassword()));\n // Traitement des Roles\n Set<String> registerRequestRoles = registerRequest.getRoles();\n Set<Role> roles = new HashSet<>();\n // find Roles\n if (registerRequestRoles == null) {\n Role guestRole = this.roleRepository.findByName(ERole.GUEST)\n .orElseThrow(() -> new ResourceNotFoundException(\"Error: Role is not found.\"));\n roles.add(guestRole);\n }else {\n registerRequestRoles.forEach(role -> {\n switch (role) {\n case \"super-admin\":\n Role superAdminRole = null;\n try {\n superAdminRole = this.roleRepository.findByName(ERole.SUPER_ADMIN)\n .orElseThrow(() -> new ResourceNotFoundException(\"Error: Role is not found.\"));\n } catch (ResourceNotFoundException e) {\n e.printStackTrace();\n }\n roles.add(superAdminRole);\n\n break;\n case \"admin\":\n Role adminRole = null;\n try {\n adminRole = this.roleRepository.findByName(ERole.ADMIN)\n .orElseThrow(() -> new ResourceNotFoundException(\"Error: Role is not found.\"));\n } catch (ResourceNotFoundException e) {\n e.printStackTrace();\n }\n roles.add(adminRole);\n break;\n case \"user\":\n Role userRole = null;\n try {\n userRole = this.roleRepository.findByName(ERole.USER)\n .orElseThrow(() -> new ResourceNotFoundException(\"Error: Role is not found.\"));\n } catch (ResourceNotFoundException e) {\n e.printStackTrace();\n }\n roles.add(userRole);\n break;\n default:\n Role guestRole = null;\n try {\n guestRole = this.roleRepository.findByName(ERole.GUEST).orElseThrow(() -> new ResourceNotFoundException(\"Error: Role is not found.\"));\n } catch (ResourceNotFoundException e) {\n e.printStackTrace();\n }\n roles.add(guestRole);\n }\n });\n }\n // Affect User Roles\n user.setRoles(roles);\n this.userRepository.save(user);\n return \"User registered successfully!\";\n }", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public ec.com.smx.frameworkv2.security.dto.UserDto getUsuarioCreacion() {\n\t\treturn this.usuarioCreacion;\n\t}", "public Register() {\n user = new User();\n em = EMF.createEntityManager();\n valid = false;\n }", "@Override\n\tpublic Usuario createUsuario(Usuario usr) {\n\t\treturn null;\n\t}", "public UserRegistration() {\n // JPA benötigt einen Default-Konstruktor!\n }", "@PostMapping\n @ResponseStatus(HttpStatus.CREATED)\n public UserResponse createUser(@Valid @RequestBody CreateUserRequest createUser) {\n return userMapper.toUserResponse(\n userService.createUser(\n userMapper.toDto(createUser)\n )\n );\n }", "@RequestMapping(\"/register-user\")\n public ResponseEntity<UserProfileEntity> register(@RequestBody UserProfileEntity payload, HttpServletRequest request) throws ServletException{\n UserProfileEntity user = userProfileService.findByUser(payload.getUsername());\n\n //if null add new user and login\n if (user == null) {\n RoleEntity role = new RoleEntity();\n role.setRole(\"ROLE_USER\");\n\n Set<RoleEntity> roleSet = new HashSet<>();\n roleSet.add(role);\n\n UserProfileEntity userToAdd = new UserProfileEntity();\n userToAdd.setEnabled(true);\n userToAdd.setUsername(payload.getUsername());\n userToAdd.setPassword(payload.getPassword());\n userToAdd.setRoles(roleSet);\n\n userProfileService.save(userToAdd);\n\n request.login(userToAdd.getUsername(), userToAdd.getPassword());\n\n return new ResponseEntity<UserProfileEntity>(userToAdd, HttpStatus.CREATED);\n\n } else {\n return new ResponseEntity<UserProfileEntity>(HttpStatus.CONFLICT);\n }\n\n }", "public GrupoUsuarioDTO() {\n }", "@RequestMapping(value = \"/registration\")\n public String registration(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"user/registration\";\n }", "@Operation(description = \"Register/Create a new user.\")\n @PostMapping(\"/register\")\n public Mono<UserDto> create(@RequestBody @Validated UserDto userDto){\n return Mono.create(monoSink -> userService.create(userDto)\n .onErrorMap(error->{\n monoSink.error(error);\n return error;\n })\n .subscribe(monoSink::success)\n );\n }", "@PostMapping(\"v1/register\")\n public ResponseEntity<UserDto> register(@RequestBody UserDto userDto){\n User user = new User(\n userDto.getEmail(),\n userDto.getUserName(),\n passwordEncoder.encode(userDto.getPassword()),\n true,\n \"USER\",\n 0,\n 0\n );\n\n userRepository.save(user);\n\n return new ResponseEntity<>(userDto, HttpStatus.OK);\n }", "@Override\n protected ShowbaseUserBean createUserBean(Member userEntity) {\n return new ShowbaseUserBean(userEntity);\n }", "@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}", "@PostMapping\n public @ResponseBody\n ResponseEntity<Object> register(@RequestParam(\"firstName\") final String firstName,\n @RequestParam(\"lastName\") final String lastName,\n @RequestParam(\"username\") final String username,\n @RequestParam(\"password\") final String password,\n @RequestParam(\"email\") final String email) {\n\n Person person = personService.getPersonByCredentials(username);\n\n final String securePassword = HashPasswordUtil.hashPassword(password);\n\n if (person == null) {\n\n person = new Person(username, securePassword, firstName, lastName, email, PersonType.USER);\n\n try {\n personService.add(person);\n } catch (IllegalArgumentException e) {\n logger.error(e.getMessage());\n }\n person = personService.getPersonByCredentials(username);\n\n ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();\n HttpSession session = attr.getRequest().getSession(true); // true == allow create\n session.setAttribute(\"user\", username);\n session.setAttribute(\"userId\", person.getIdPerson());\n\n return ResponseEntity.status(HttpStatus.OK).body(null);\n } else {\n return ResponseEntity.status(HttpStatus.FORBIDDEN).body(null);\n }\n\n }", "public interface RegistrationService {\n UserDto registrationNewUser(String login, String password, String email);\n\n}", "@RequestMapping(value = \"/registration\", method = RequestMethod.GET)\n public String showPageRegistration(Model model)\n {\n model.addAttribute(\"registeredUser\", new User());\n return \"registration\";\n }", "private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "@RequestMapping(method= RequestMethod.GET, value=\"/staff/signup\")\n public String getSignupTemplate() {\n return \"signup-staff\";\n }", "@Override\n\tpublic UserDto registerManager(UserDto userDto) {\n\t\treturn null;\n\t}", "@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }", "public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}", "@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}", "@GetMapping(\"register\")\n public String registerForm(RegisterForm registerForm) {\n return \"register\";\n }", "private UserBean buildUserBean(HttpServletRequest request) {\n\t\tAccount account = UserManager.getCurrentUser(request.getSession());\n \t\n \tUserBean userBean = new UserBean();\n \tuserBean.setFirstName(account.getGivenName());\n \tuserBean.setLastName(account.getSurname());\n \tString phoneNumber = \"\";\n \tif (account.getCustomData().get(\"phoneNumber\") != null) {\n \t\tphoneNumber = account.getCustomData().get(\"phoneNumber\").toString();\n \t}\n \tuserBean.setPhoneNumber(phoneNumber);\n \tString phoneCarrier = \"\";\n \tif (account.getCustomData().get(\"phoneCarrier\") != null) {\n \t\tphoneCarrier = account.getCustomData().get(\"phoneCarrier\").toString();\n \t}\n \tuserBean.setPhoneCarrier(phoneCarrier);\n \tString uniqueId = \"\";\n \tif (account.getCustomData().get(\"uniqueId\") != null) {\n \t\tuniqueId = account.getCustomData().get(\"uniqueId\").toString();\n \t}\n \tuserBean.setUniqueId(uniqueId);\n \t\n \treturn userBean;\n\t}", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "private RegisterUser() {\n\n }", "@GetMapping(\"/register-pro\")\n\tpublic ModelAndView goToRegisterProForm() {\n\t\t\n\t\tModelAndView mav = new ModelAndView(\"register-pro\");\n\t\tUser user = new User();\n\t\tmav.addObject(\"user\", user);\n\n\t\treturn mav;\n\t}", "@GetMapping(\"/pharmRegister\")\n public String pharmRegister(Model model){\n model.addAttribute(\"pharmacist\", new User());\n return \"views/pharmacist/pharmacistRegister\";\n }", "@PreAuthorize(\"hasAuthority('ADMIN')\")\n @PostMapping(\"\")\n public ResponseEntity createUser(@Valid @RequestBody UserDTO userDTO) {\n return ok(userService.createUser(userDTO));\n }", "@PostMapping(\"/register\")\n public ResponseEntity<?> registerUser(@Valid @RequestBody User user, BindingResult result){\n \t\n \tResponseEntity<?> errorMap = mapValidationErrorService.mapValidationService(result);\n \n\t\tif(errorMap!=null) \n \treturn errorMap;\n\n User newUser = userService.save(user);\n return new ResponseEntity<User>(newUser, HttpStatus.CREATED);\n }", "public void createUtilisateur(UtilisateurBean u) {\n\t}", "@PostMapping(\"/register\")\r\n public Guardian createGuardian(@Valid @RequestBody RegistrationInfo registrationInfo) throws UserExistException {\r\n User user = userService.save(new User(registrationInfo));\r\n if (user != null) {\r\n return guardianRepository.save(new Guardian(registrationInfo));\r\n } else {\r\n throw new UserExistException(\"User is empty. Something went wrong.\");\r\n }\r\n }", "public String registration() {\n if (name != null) {\n int createdUsers = DBUtils.addUser(name, password, email);\n if (createdUsers > 0) {\n try {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n request.login(name, password);\n initUser();\n request.getSession().setAttribute(\"current_user\", this);\n } catch (ServletException e) {\n FacesContext context = FacesContext.getCurrentInstance();\n FacesMessage message = new FacesMessage(\"Wrong login or password\");\n message.setSeverity(FacesMessage.SEVERITY_ERROR);\n context.addMessage(\"login\", message);\n }\n return \"/index?faces-redirect=true\";\n }\n }\n return \"/pages/register.xhtml?faces-redirect=true\";\n }", "@PostMapping(\"/register\")\n public String register(@Valid UserForm userForm, BindingResult result){\n if(!userForm.confirmPassword()){\n result.rejectValue(\"confirmPassword\",\"confirmError\",\"两次密码不一致\");\n// boo = false;\n }\n if(result.hasErrors()){\n return \"register\"; // 如果使用@Valid注解,就表示已经将userForm和result放到了model中,直接可以在前端获取信息\n }\n// if(result.hasErrors()){\n// List<FieldError> fieldErrors = result.getFieldErrors();\n// for(FieldError error : fieldErrors){\n// System.out.println(error.getField() + \" : \" + error.getDefaultMessage() + \" : \" + error.getCode());\n// }\n// boo = false;\n// }\n// if(!boo){\n// return \"register\";\n// }\n User user = userForm.convertToUser();\n userRepository.save(user);\n return \"redirect:/login\";\n }", "@PostMapping(path=\"/register\") // Map ONLY GET Requests\n\tpublic @ResponseBody User addNewUser (@RequestBody User n) throws CloneNotSupportedException {\n\t\tArrayList<User> s = (ArrayList<User>) userRepository.findAllByemail(n.getEmail());\n\t\tUser result =(User) n.clone();\n\t\tif(s.size() > 1) {\n\t\t\tresult.setError(true);\n\t\t\tresult.setError_msg(\"You are already registered!\");\n\t\t\treturn result;\n\t\t} else {\n\t\t\tuserRepository.save(n);\n\t\t}\n\t\treturn result;\n\t}", "@GetMapping(\"/patientRegister\")\n public String patientRegister(Model model){\n model.addAttribute(\"patient\", new User());\n model.addAttribute(\"info\", new PatientInfo());\n return \"views/patient/patientRegister\";\n }", "@PreAuthorize(\"permitAll()\")\n @PostMapping(\"/users/\")\n public ResponseEntity<UserDTO> registerUser(@Valid @RequestBody User user) throws URISyntaxException {\n if (user.getId() != null) {\n return ResponseEntity\n .badRequest()\n .headers(HeaderUtil.failure(\n Constants.EntityNames.USER,\n HeaderUtil.ERROR_CODE_CUSTOM_ID,\n HeaderUtil.ERROR_MSG_CUSTOM_ID))\n .body(null);\n }\n\n // OPTION 1 - provided email is already in use by another user\n if (userService.getUserByEmail(user.getEmail()) != null) {\n return ResponseEntity\n .badRequest()\n .headers(HeaderUtil.failure(\n Constants.EntityNames.USER,\n HeaderUtil.ERROR_CODE_EMAIL_ALREADY_IN_USE,\n HeaderUtil.ERROR_MSG_EMAIL_ALREADY_IN_USE))\n .body(null);\n }\n\n // OPTION 2 - provide username is already in use by another user\n if (userService.getUserByUsername(user.getUsername()) != null) {\n return ResponseEntity.\n badRequest()\n .headers(HeaderUtil.failure(\n Constants.EntityNames.USER,\n HeaderUtil.ERROR_CODE_USERNAME_ALREADY_IN_USE,\n HeaderUtil.ERROR_MSG_USERNAME_ALREADY_IN_USE))\n .body(null);\n }\n\n user.setVerified(false);\n User result = userService.save(user);\n\n mailSender.sendRegistrationMail(user.getFirstName(), user.getEmail(), null);\n\n return ResponseEntity.created(new URI(\"/api/users/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(Constants.EntityNames.USER, result.getId().toString()))\n .body(result.convertToDTO());\n }", "@Override\r\n\tpublic UserBean createUserBean()\r\n\t{\r\n\t\treturn new UserManagedBean();\r\n\t}", "@Secured(\"ROLE_ADMIN\")\n\t@JsonView(Views.Admin.class)\n\t@RequestMapping(value = \"/\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> createUser(@Valid @RequestBody UserEntityDTO userDTO, BindingResult result) {\n\t\tif (result.hasErrors())\n\t\t\treturn new ResponseEntity<>(createErrorMessage(result), HttpStatus.BAD_REQUEST);\n\t\telse { passwordValidator.validate(userDTO, result);\n\t\t\t\tusernameValidator.validate(userDTO, result);\n\t\t}\n\t\t\tParentEntity pe= parentService.createParent(userDTO);\n\t\t\tlogger.info(\"Parent ID: \" + pe.getId() + \", username: \" + pe.getUsername() + \" -- CREATED by: \" + authenticationFacade.getAuthentication().getName());\t\n\t\t\treturn new ResponseEntity<ParentEntity>(pe, HttpStatus.CREATED);\n\t}", "public Response<CustomerRegResponseDto> createCustomer(CustomerRegRequestDto requestDto) {\n\t\tResponse<CustomerRegResponseDto> responseDto = new Response<>();\n\t\tOptional<User> user = userRepo.findByUserId(requestDto.getUserId());\n\t\tif (!user.isPresent())\n\t\t\tthrow new UserNotFoundException(CustomerConstants.USER_NOT_FOUND);\n\n\t\tOptional<User> userEmail = userRepo.findByEmailId(requestDto.getCustomerEmailId());\n\t\tif (userEmail.isPresent())\n\t\t\tthrow new UserAlreadyExistException(CustomerConstants.USER_EMAIL_ID_ALREADY_EXISTS);\n\n\t\tUser userUserName = userRepo.findByUserNameContainsIgnoreCase(requestDto.getCustomerUserName().toLowerCase());\n\t\tif (userUserName != null)\n\t\t\tthrow new UserAlreadyExistException(CustomerConstants.USER_NAME_ALREADY_EXISTS);\n\n\t\tif (!requestDto.getPassword().equals(requestDto.getConfirmPassword())) {\n\t\t\tthrow new NoDataFoundException(CustomerConstants.PASSWORD_CONFIRMATION);\n\n\t\t}\n\n\t\tCustomer addNewCustomer = addCustomerDetails(requestDto);\n\t\tUser newUser = addNewUser(requestDto, addNewCustomer);\n\t\tCustomerRegResponseDto response = new CustomerRegResponseDto();\n\t\tresponse.setCustomerId(addNewCustomer.getCustomerId());\n\t\tresponse.setUserId(newUser.getUserId());\n\t\tresponseDto.setData(response);\n\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_CREATED_SUCCESSFULLY);\n\t\tresponseDto.setStatus(HttpServletResponse.SC_OK);\n\t\tresponseDto.setError(false);\n\t\tsendRegistrationEmailNotification(requestDto);\n\t\treturn responseDto;\n\t}", "boolean userRegistration(UserDTO user) throws UserException,ConnectException;", "@GetMapping(\"/doctorRegister\")\n public String doctorRegister(Model model){\n model.addAttribute(\"doctor\", new User());\n model.addAttribute(\"info\", new PrescriberInfo());\n return \"views/doctor/doctorRegister\";\n }", "@RequestMapping(value = \"/join\", method = RequestMethod.POST)\n public String createUser(@RequestBody UserDto userDto, Model model) {\n if (userDto == null) {\n return \"user1\";\n }\n User user = new User();\n user.setEmail(userDto.getEmail());\n user.setPass(userDto.getPass());\n userService.createUser(user);\n model.addAttribute(\"email\", user.getEmail());\n model.addAttribute(\"pass\", user.getPass());\n return \"one_product\";\n }", "public Usuario fromDTO(NovoUsuarioDTO objDto){\n Usuario user = new Usuario(null, objDto.getEmail(), objDto.getNome(), passwordEncoder.encode(objDto.getSenha()));\n return user;\n }" ]
[ "0.65818685", "0.62338805", "0.6182394", "0.6130215", "0.6102722", "0.6077673", "0.60340166", "0.60226685", "0.597601", "0.5969831", "0.5967139", "0.59524333", "0.5949601", "0.59311897", "0.58936554", "0.5892082", "0.5859008", "0.5856538", "0.5849058", "0.58485633", "0.58233774", "0.5817623", "0.57807285", "0.5775593", "0.5758922", "0.5748968", "0.57486755", "0.5738714", "0.5726991", "0.57053185", "0.5696791", "0.5659478", "0.56472355", "0.5644966", "0.5630242", "0.56142396", "0.56136006", "0.56113636", "0.56112283", "0.5606716", "0.55990654", "0.55798656", "0.5576259", "0.5555464", "0.55547845", "0.55528975", "0.5545844", "0.55441314", "0.55409616", "0.5529463", "0.5529217", "0.55258584", "0.5519581", "0.54966736", "0.54909366", "0.5468064", "0.54665524", "0.54588604", "0.5456922", "0.5450656", "0.5442846", "0.5437488", "0.5435262", "0.54299045", "0.54289675", "0.54222685", "0.54150754", "0.53986037", "0.5398526", "0.5394378", "0.53942466", "0.53833365", "0.53821754", "0.5361192", "0.53609985", "0.5354913", "0.53504336", "0.5349522", "0.53440076", "0.53412867", "0.5340576", "0.53394383", "0.5335429", "0.532837", "0.5325973", "0.5320052", "0.5314225", "0.53096884", "0.5308128", "0.530771", "0.53069764", "0.53044844", "0.5304244", "0.5302886", "0.5300488", "0.52985317", "0.52890193", "0.52884024", "0.528803", "0.5286278" ]
0.62681276
1
profile bit 1 means to use vertical board at the position
boolean bitSet(int p, int b) // check if int p bit b is 1 { return ((p>>b) & 1)>0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkVertical() {\n\n for(int i = 0; i < 2; i++){ // winning column can be either 0-1-2-(3) or (0)-1-2-3\n for (int j = 0; j < stateArray[3].length; j++) {\n\n if (check3Vertical(i, j)) {\n maskResultArray[stateArray[i][j]] = 1;\n maskArray[i][j] = 1;\n maskArray[i+1][j] = 1;\n maskArray[i+2][j] = 1;\n }\n\n }\n }\n\n }", "private static BufferedImage createViewableVerticalProfile(BufferedImage bin, String fileName, List<line> v) {\n int white = 0xff000000;\n int black = 0xffffffff;\n BufferedImage toret = cloneImage(bin);\n int[] vals = new int[toret.getWidth()];\n for (int i = 0; i < vals.length; i++) {\n vals[i] = 0;\n }\n for (int i = 0; i < toret.getWidth(); i++) {\n for (int j = 0; j < toret.getHeight(); j++) {\n if (toret.getRGB(i, j) == white) {\n vals[i]++;\n }\n }\n }\n int[] ordered = Arrays.copyOf(vals, vals.length);\n Arrays.sort(ordered);\n int x = 0;\n List<line> lines = new ArrayList<>();\n int median = ordered[ordered.length / 6];\n median = median + median / 5;\n for (int i = 0; i < vals.length; i++) {\n if (vals[i] > median) {\n for (int j = 0; j < vals[i]; j++) {\n toret.setRGB(i, j, black);\n }\n for (int j = vals[i]; j < toret.getHeight(); j++) {\n toret.setRGB(i, j, white);\n }\n } else {\n for (int j = 0; j < toret.getHeight(); j++) {\n toret.setRGB(i, j, white);\n }\n }\n }\n for (int i = 0; i < vals.length; i++) {\n if (vals[i] <= median) {\n // w.append(\"0\\n\");\n if (x > 0) {\n line l = new line();\n l.setStartHorizontal(x);\n l.setWidth(i - x);\n lines.add(l);\n x = 0;\n }\n } else {\n // w.append(\"\"+vals[i]+\"\\n\");\n if (x == 0) {\n x = i;\n }\n if (i == vals.length - 1) {\n line l = new line();\n l.setStartHorizontal(x);\n l.setWidth(i - x);\n lines.add(l);\n x = 0;\n }\n }\n }\n\n int minimalColumnFraction = 8;\n for (int j = 0; j < lines.size(); j++) {\n line l = lines.get(j);\n //merging needs to consider the magnitude of the difference from median\n if (j > 0) {\n line prev = lines.get(j - 1);\n if (l.getStartHorizontal() - prev.getStartHorizontal() - prev.getWidth() < 25 && (l.getWidth() < bin.getWidth() / minimalColumnFraction || prev.getWidth() < bin.getWidth() / minimalColumnFraction || l.getStartHorizontal() - prev.getStartHorizontal() - prev.getWidth() < 3)) {\n prev.setWidth(prev.getWidth() + l.getWidth());\n lines.remove(l);\n j--;\n } else {\n // System.out.print(\" gap is \"+l.getStartHorizontal()+\" \"+ prev.getStartHorizontal()+\" \"+prev.getWidth()+\"\\n\");\n }\n }\n\n }\n for (int j = 0; j < lines.size(); j++) {\n line l = lines.get(j);\n //if this is a small column try to merge it\n if (l.getWidth() < bin.getWidth() / minimalColumnFraction) {\n /*if(l.getWidth()!=0)\n {\n finalizedLines.add(l);\n l.setStartVertical(0);\n l.setDistance(bin.getHeight()/2);\n imageHelpers.highlightBlock(bin,l.getStartHorizontal(), l.getStartVertical(), l.getDistance(), l.getWidth(), 0x0000ff);\n }*/\n } else {\n v.add(l);\n l.setStartVertical(0);\n l.setDistance(bin.getHeight() - 1);\n\n highlightBlock(bin, l.getStartHorizontal(), l.getStartVertical(), l.getDistance(), l.getWidth(), 0xff0000);\n }\n }\n\n return toret;\n }", "public void topLeftVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(19,12);\n\t\td.set(1,23);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(23);\n\t\tassertTrue(1==test_arr.get(0).getX() && 1==test_arr.get(0).getY());\n\n\t}", "public static void paintPixelOnWhiteboard(int drawingTool, int x, int y, int col){\n\t\t\n\t\tif(drawingTool == 1){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t} else if(drawingTool == 2){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 2, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y - 1, col);\n\t\t\t\n\t\t} else if(drawingTool == 3){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y - 4, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y - 4, col);\n\t\t} else if(drawingTool == 4){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 2, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 4, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 4, col);\n\t\t} else if(drawingTool == 5){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 4, y + 0, col);\n\t\t} else if(drawingTool == 6){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x - 4, y + 4, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 4, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y + 2, col);\n\t\t}\n\t\twhiteboardPanel.repaint();\n\t}", "public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }", "private long top_mask(int col) {\r\n return (long)1 << height - 1 << col*(height+1);\r\n }", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "private int manhattanMoves(int val,int curr_row,int curr_col)\n\t{\n\t\tint correct_row = (int)Math.ceil((double) val/(double)this.dimension)-1;\n\t\tint mod_val = val%this.dimension;\n\t\tint correct_col = 0;\n\t\t// make corrections\n\t\tif (mod_val == 0)\n\t\t\tcorrect_col = this.dimension -1;\n\t\telse\n\t\t\tcorrect_col = mod_val -1;\n\t\tint vertical_moves = Math.abs(correct_row - curr_row);\n\t\tint horizontal_moves = Math.abs(correct_col - curr_col);\n\t\t\n\t\treturn vertical_moves+horizontal_moves;\n\t}", "public long getBitboardPlayer1() {\r\n if(moves%2 == 1)\r\n return bitboard;\r\n else\r\n return bitboard ^ mask;\r\n }", "public void processFrame(Mat in, Mat out)\r\n\t{\r\n\t\t// multiple regions of interest\r\n\t\t\r\n\t\tint playSquares = 32; // number of playable game board squares\r\n\t\t\r\n\t\t// keep track of starting row square\r\n\t\tint parity = 0; // 0 is even, 1 is odd, tied to row number\r\n\t\tint count = 0; // row square\r\n\t\tint rowNum = 0; // row number, starting at 0\r\n\t\t\r\n\t\tint vsegment = in.rows() / 8; // only accounts 8 playable\r\n\t\tint hsegment = in.cols() / 10; // 8 playable, 2 capture\r\n\t\tint hOffset = hsegment * 2; // offset for playable board\r\n\t\tint vOffset = vsegment + 40;\r\n\t\t\r\n\t\t// For angle of camera\r\n\t\tint dx = 80;\r\n\t\tint ddx = 0;\r\n\t\thsegment -= 16;\r\n\t\t\r\n\t\tint dy = 20;\r\n\t\tvsegment -= 24;\r\n\t\t\r\n\t\t// Go through all playable squares\r\n\t\tfor (int i = 0; i < playSquares; i++)\r\n\t\t{\r\n\t\t\t// change offset depending on the row\r\n\t\t\tif (parity == 0) // playable squares start on 2nd square from left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment * 2 + dx;\r\n\t\t\t}\r\n\t\t\telse // playable squares start on immediate left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment + dx;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rowNum == 4)\r\n\t\t\t\tif (count == 6)\r\n\t\t\t\t\tddx = 10;\r\n\t\t\tif (rowNum == 5)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = -6;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 6;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 12;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 20;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 6)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 16;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 32;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 7)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 24;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t\telse\r\n\t\t\t\t\tddx = 52;\r\n\t\t\t}\r\n\r\n\t\t\t// find where roi should be\r\n\t\t\t//System.out.println(\"\" + vOffset);\r\n\t\t\tPoint p1 = new Point(hOffset + count * hsegment + ddx, vOffset + rowNum * vsegment - dy); // top left point of rectangle (x,y)\r\n\t\t\tPoint p2 = new Point(hOffset + (count + 1) * hsegment + ddx, vOffset + (rowNum + 1) * vsegment - dy); // bottom right point of rectangle (x,y)\r\n\t\t\t\r\n\t\t\t// create rectangle that is board square\r\n\t\t\tRect bound = new Rect(p1, p2);\r\n\t\t\t\r\n\t\t\tchar color;\r\n\t\t\tif (i == 0)\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(in, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t\t\r\n\t\t\t\t// copy input image to output image\r\n\t\t\t\tin.copyTo(out);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(out, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// annotate the output image\r\n\t\t\t// scalar values as (blue, green, red)\r\n\t\t\tswitch(color)\r\n\t\t\t{\r\n\t\t\t\tcase COLOR_BLUE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.BLACK; // end user's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_ORANGE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.WHITE; // system's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_WHITE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_BLACK: // this is black\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2); // maybe add 8, 0 as line type and fractional bits\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcount += 2;\r\n\t\t\tif (count == 8)\r\n\t\t\t{\r\n\t\t\t\tparity = ++parity % 2; // change odd or even\r\n\t\t\t\tcount = 0;\r\n\t\t\t\trowNum++;\r\n\t\t\t\thsegment += 2;\r\n\t\t\t\tdx -= 10;\r\n\t\t\t\tdy += 10;\r\n\t\t\t\tvsegment += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void topRightVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(20,22);\n\t\td.set(8,33);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(33);\n\t\tassertTrue(10==test_arr.get(0).getX() && 1==test_arr.get(0).getY());\n\n\t}", "private int attack1Vertical() { //dikey tekli atak fonksiyonu\r\n int status = -1;\r\n\r\n for (int i = 0; i < column; ++i) {\r\n for (int j = row - 1; j > 0; --j) {\r\n if (gameCells[j][i].getCell() == 'O') {\r\n if (isLegal(j - 1, i)) {\r\n status = i;\r\n return status;\r\n }\r\n }\r\n }\r\n }\r\n return status;\r\n }", "private static int upScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && state.getGrid()[row-1][col] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "private int indexOfBoard(int no) {\n return 0;\n }", "public static void printBoard() {\n int separatorLen = 67;\n StringBuilder boardString = new StringBuilder();\n boardString.append(new String(new char [separatorLen]).replace(\"\\0\",\"*\"));\n boardString.append(\"\\n\");\n for(int y = Y_UPPER_BOUND - 1; y >= 0; y--)\n {\n boardString.append(y + 1).append(\" \");\n boardString.append(\"*\");\n for (int x = 0; x < X_UPPER_BOUND; x++)\n {\n Piece p = Board.board[x + y * X_UPPER_BOUND];\n if(p != null)\n {\n boardString.append(\" \").append(p).append(p.getColor()? \"-B\":\"-W\").append(\" \").append((p.toString().length() == 1? \" \":\"\"));\n }\n else\n {\n boardString.append(\" \");\n }\n boardString.append(\"*\");\n }\n boardString.append(\"\\n\").append((new String(new char [separatorLen]).replace(\"\\0\",\"*\"))).append(\"\\n\");\n }\n boardString.append(\" \");\n for(char c = 'A'; c <= 'H';c++ )\n {\n boardString.append(\"* \").append(c).append(\" \");\n }\n boardString.append(\"*\\n\");\n System.out.println(boardString);\n }", "private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }", "private void generateBoard(){\n\t}", "void advancedAvailMovesLine(int num) {\n\t\t\n\t\t //vertically\n\t\tint counter;\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcounter = 0;\n\t\t\tint yPos = 0;\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tif (availMoves[i][j][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tyPos = j;\n\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counter == 1) {\n\t\t\t\tmoveQueue.add(new int[] {i, yPos, num});\n\t\t\t}\t\t\t\n\t\t}\n\t\t//horizontally\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcounter = 0;\n\t\t\tint xPos = 0;\n\t\t\tfor(int j = 0; j < boardSize; j++) {\n\t\t\t\tif (availMoves[j][i][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\txPos = j;\n\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counter == 1) {\n\t\t\t\tmoveQueue.add(new int[] {xPos, i, num});\n\t\t\t}\n\t\t}\n\t\t\n\t}", "static void head(Mat mat) {\n int startcol = 0;\n int endcol = 0;\n\n int whitecount[] = new int[mat.rows()];//Count the number of whites per column\n whitecount[0] = 0;\n int blackcount = 0;\n\n int whitestart = -1;\n int whiteend = -1;\n double values[];\n\n int columncount[] = new int[mat.cols()];//Count the number of whites per column\n\n for(int i = 0; i < mat.cols(); ++i) {\n whitestart = -1;\n whiteend = -1;\n for(int j = 1; j < mat.rows(); ++j) {\n startcol += 1;\n values = mat.get(j, i);\n if(values[0] == 0) {\n whitecount[j] = whitecount[j - 1] + 1;\n if(whitestart == -1) {\n whitestart = j;\n }\n blackcount = 0;\n } else {\n if(blackcount == 0) {\n whiteend = j;\n }\n blackcount += 1;\n if(blackcount > mat.rows() / 10) {\n whitestart = -1;\n }\n }\n }\n if(whitestart != -1 && whiteend != -1 && whitestart < whiteend) {\n columncount[i] = whitecount[whiteend] - whitecount[whitestart];\n }\n }\n\n boolean seen = false;\n boolean bottom = false;\n //top down\n int headindex = 0;\n for(int i = 0; i < mat.cols(); ++i) {\n if(!seen && columncount[i] > 0) {\n seen = true;\n headindex = i;\n Imgproc.line(mat, new Point(i, 0), new Point(i, mat.rows() - 1), new Scalar(127,0), 2);\n break;\n }\n }\n\n int regions[] = new int[mat.cols()];\n\n for(int i = 0; i < mat.cols(); ++i) {\n regions[i] = Utility.regions(mat, i);\n }\n\n\n //bottom up\n int footindex = 0;\n for(int i = mat.cols() - 1; i >= 0; --i) {\n if(regions[i] > 1) {\n footindex = i;\n //get foot index\n Imgproc.line(mat, new Point(i, 0), new Point(i, mat.rows() - 1), new Scalar(127,0), 2);\n break;\n }\n }\n\n int currentcount = 0;\n\n // in between headindex and footindex\n for(int i = headindex; i < footindex; ++i) {\n int thiscount = regions[i];\n // Log.d(\"CurrentCount\", String.valueOf(thiscount) + \" + \" + String.valueOf(currentcount));\n if(thiscount == 3) {\n Imgproc.line(mat, new Point(i, 0), new Point(i, mat.rows() - 1), new Scalar(191,0), 2);\n currentcount = thiscount;\n Log.d(\"RegionCount\", String.valueOf(currentcount));\n break;\n }\n }\n\n // in between headindex and footindex\n for(int i = footindex; i > headindex; --i) {\n int thiscount = regions[i];\n // Log.d(\"CurrentCount\", String.valueOf(thiscount) + \" + \" + String.valueOf(currentcount));\n if(thiscount == 1) {\n Imgproc.line(mat, new Point(i, 0), new Point(i, mat.rows() - 1), new Scalar(191,0), 2);\n break;\n }\n }\n\n\n for(int i = 0; i < mat.rows(); ++i) {\n // Log.d(\"Counter\", String.valueOf(i) + \" rows \" + String.valueOf(columncount[i]));\n double val[] = {127.0};\n mat.put(i, 0, val);\n\n }\n }", "@Test\n\tpublic void topRightHorizWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(17,10);\n\t\td.set(4,9);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(9);\n\t\tassertTrue(9==test_arr.get(0).getX() && 0==test_arr.get(0).getY());\n\n\t}", "void setStepCounterTileXY();", "boolean verticalWin(){\n\t\tint match_counter=1;\n\t\tboolean flag=false;\n\t\tfor(int column=0;column<25;column++){\n\t\t\tfor(int row=8;row>=0;row--){\n\t\t\t\tif(Board[row][column]!='\\u0000'){\n\t\t\t\t\tif(Board[row][column]!='O'){\n\t\t\t\t\t\tif(Board[row][column]==Board[row+1][column])\n\t\t\t\t\t\t\tmatch_counter++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tflag=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(match_counter==4){\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn flag;\n\t}", "@Test\n\tpublic void topLeftHorizWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(24,2);\n\t\td.set(1,3);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(3);\n\t\tassertTrue(1==test_arr.get(0).getX() && 0==test_arr.get(0).getY());\n\t}", "private static int downScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && state.getGrid()[row+1][col] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "@Test\n\tpublic void bottomLeftVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(31,100);\n\t\td.set(1,89);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(89);\n\t\tassertTrue(0==test_arr.get(0).getX() && 9==test_arr.get(0).getY());\n\n\t}", "public void showHeuristics() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out.printf(\"%3d\", getSquareAccessibility(row, col));\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }", "boolean findMove(int row, int col, int[][] someStatusBoard) {\n String leftPieces;\n if (_playerOnMove == ORANGE) {\n leftPieces = Game._orangePieces;\n } else {\n leftPieces = Game._violetPieces;\n }\n String trialMove = \"\";\n int numleftPieces = leftPieces.length();\n int l, ori;\n for (l = 0; l < numleftPieces; l++) {\n for (ori = 0; ori < 8; ori++) {\n String piecename = leftPieces.substring(l, l + 1);\n Pieces thispiece = new Pieces();\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n int m, n;\n for (m = 0; m < depth; m++) {\n for (n = 0; n < length; n++) {\n if (finalPositions[m][n] == 1) {\n int newCol = col - 1 - n;\n int newRow = 15 - row - depth;\n if (newCol >= 0 && newRow >= 0) {\n trialMove = piecename + changeBack(newCol) + changeBack(newRow) + ori;\n System.out.println(newCol);\n System.out.println(newRow);\n System.out.println(trialMove);\n if (isLegal(trialMove)) {\n return true;\n }\n }\n }\n }\n }\n }\n }\n return false;\n }", "void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }", "public static void main(String[] args) {\n boolean[][] board = new boolean[8][8];\n for(int i = 0; i < 8; i++) {\n for(int j = 0; j < 8; j++) {\n board [i][j] = false;\n }\n }\n int row = 3; //can be between -1 and 6 depending where you want first square (row - 2)\n int count = 1;\n int column = 1;\n int addedTrue = 0;\n \n while (count < 9) {\n for(int i = row + 1; i < 8; i++) { \n if(horizontal(board, i) && diagonal(board, column - 1, i)) {\n board[column - 1][i] = true;\n addedTrue++;\n break;\n } \n }\n if(addedTrue == 0) {\n column--;\n count--;\n for(int z = 0; z < 8; z++) {\n if(board[column - 1][z]) {\n row = z;\n board[column - 1][z] = false;\n }\n }\n }\n if(addedTrue == 1) {\n column++;\n count++;\n addedTrue = 0;\n row = -1;\n } \n /*printBoard(board);\n System.out.println(\"\\n\\n\");*/\n }\n printBoard(board);\n }", "public void printBoard() {\n System.out.println(\"---+---+---\");\n for (int x = 0; x < boardLength; x++) {\n for (int y = 0; y < boardWidth; y++) {\n char currentPlace = getFromCoordinates(x, y);\n System.out.print(String.format(\" %s \", currentPlace));\n\n if (y != 2) {\n System.out.print(\"|\");\n }\n }\n System.out.println();\n System.out.println(\"---+---+---\");\n }\n }", "public int getCurrentPawnColumn(){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\treturn curPos.getWhitePosition().getTile().getColumn();\n\t\t\n\t\t} else {\n\t\t\treturn curPos.getBlackPosition().getTile().getColumn();\n\t\t}\r\n }", "public void horizontal_right_bp(int x, int y) {\n if (x == 7)\n return;\n\n if (chessBoard[x + 1][y] == status.WHITE) {\n // i e zoodtarin khaneye meshki ke mibinad\n int i_black_cell = -1;\n boolean change = false;\n for (int k = x + 1; k <= 7; k++) {\n if (chessBoard[k][y] == status.EMPTY)\n break;\n if (chessBoard[k][y] == status.BLACK) {\n i_black_cell = k;\n change = true;\n break;\n }\n }\n if (change) {\n for (int k = x + 1; k < i_black_cell; k++) {\n chessBoard[k][y] = status.BLACK;\n }\n }\n }\n }", "public long getBitboardPlayer2() {\r\n if(moves%2 == 1)\r\n return bitboard ^ mask;\r\n else\r\n return bitboard;\r\n }", "@Test\n public void testCheckVert() throws Exception {\n int[][] game = {\n {1, 1, -1},\n {-1, 1, 0},\n {0, 1, -1}\n };\n\n this.currentGame = new TicTac(game, 0, 1);\n\n System.out.println(\"Game 1: X has won\");\n\n assertEquals(\"X has won\", currentGame.verifyGame()); // X has won (middle column, vertically)\n }", "public int getMode1Pixel(int x, int y) {\n assert ((x >= 0) && (x < 320)) && ((y >= 0) && (y < 200));\n\n int pos = (80 * y) + (x >>> 2);\n return unpackPixelMode1(screenBuffer[pos], (x & 0x03));\n }", "public void blackScreen() {\n boolean var5 = field_759;\n int var1 = this.field_723 * this.field_724;\n int var2;\n if(this.interlace) {\n var2 = 0;\n int var3 = -this.field_724;\n if(var5 || var3 < 0) {\n do {\n int var4 = -this.field_723;\n if(var5) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n while(var4 < 0) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n var2 += this.field_723;\n var3 += 2;\n } while(var3 < 0);\n\n }\n } else {\n var2 = 0;\n if(var5 || var2 < var1) {\n do {\n this.pixels[var2] = 0;\n ++var2;\n } while(var2 < var1);\n\n }\n }\n }", "private void compMode(int col) {\r\n\t\tint colPlayer, rowPlayer, colComp, rowComp;\r\n\t\tColor player = Color.yellow;\r\n\t\tColor comp = Color.red;\r\n\r\n\t\tcolPlayer = col;\r\n\t\trowPlayer = compAI.playerMove(colPlayer);\r\n\t\tsquares[rowPlayer][colPlayer].setBackground(player);\r\n\r\n\t\t/**\r\n\t\t * Automatically places chip for computer (This is where the turn of AI takes place)\r\n\t\t */\r\n\t\tcompAI.compMove();\r\n\t\tcolComp = compAI.getColOfAITurn();\r\n\t\trowComp = compAI.getRowOfAITurn();\r\n\t\tif (!compAI.isColumnFull(colComp)) {\r\n\t\t\tsquares[rowComp][colComp].setBackground(comp);\r\n\t\t}\r\n\t\tif (compAI.isColumnFull(col)) {\r\n\t\t\tbuttons[col].setEnabled(false);\r\n\t\t\tbuttons[col].setBackground(Color.WHITE);\r\n\t\t}\r\n\t}", "public static void printBoard(){\n \n System.out.println(board[0][0] + \" | \" + board[0][1] + \" | \" + board[0][2]);\n System.out.println(board[1][0] + \" | \" + board[1][1] + \" | \" + board[1][2]);\n System.out.println(board[2][0] + \" | \" + board[2][1] + \" | \" + board[2][2]);\n \n }", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "private static void showBoard()\n {\n System.out.println(board[1] + \" | \" + board[2] + \" | \" + board[3]);\n System.out.println(\"----------\");\n System.out.println(board[4] + \" | \" + board[5] + \" | \" + board[6]);\n System.out.println(\"----------\");\n System.out.println(board[7] + \" | \" + board[8] + \" | \" + board[9]);\n }", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "private boolean onBoard(int x, int y){\n if((x<WIDTH&&y<HEIGHT)){\n if(0<=x&&0<=y){\n return true;\n }\n return false;\n }else{\n return false;\n }\n\t}", "protected void takeTurn(int[][] boardState)\n {\n \n }", "@Test\n\tpublic void upDownBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(21,48);\n\t\td.set(27,70);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(70);\n\t\tassertTrue(3==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}", "void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }", "public static void printBoard() {\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Row Counter\n\t\tfor (i = 0; i < numPeople; i++) {\n\n\t\t\t// Column Counter\n\t\t\tfor (j = 0; j < numPeople; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\n\t\t}\n\n\t}", "public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected abstract void paintBoard() throws TilePixelOutOfRangeException;", "public void speckle() {\n\t\tint r = (height / res) - 1;\n\t\tint c = (width / res);\n\t\tfor (int i = 0; i < c; i++)\t\t{\n\t\t\tint x = rng.nextInt(25);\t\t\t\n\t\t\tif (x == 0) { // 1/25 chance of changing bottom row pixel to black\t \n\t\t\t\tvalues[r][i] = color1;\t\t\t\t\n\t\t\t}\n\t\t\telse if (x == 1) { // 1/25 chance of changing bottom row pixel to white\n\t\t\t\tvalues[r][i] = color2;\n\t\t\t}\n\t\t\t// 23/25 chance of leaving bottom pixel alone\n\t\t}\n\t}", "@Test\n\tpublic void bottomRightVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(30,110);\n\t\td.set(12,99);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(99);\n\t\tassertTrue(10==test_arr.get(0).getX() && 9==test_arr.get(0).getY());\n\n\t}", "private void printBoard() {\n\n for (int j=Board.getSize()-1; j >= 0; j--) {\n for (int i=0; i < Board.getSize(); i++) {\n // make sure indexes get printed for my pieces\n if (board.layout[i][j] == player) {\n //System.out.print(\" \"+ getPieceIndex(i,j)+ \" \");\n } else {\n System.out.print(\" \"+ board.layout[i][j]+ \" \");\n }\n }\n System.out.print(\"\\n\");\n\n }\n }", "private int totalBeginning(int row, int col) { //function that determines number of moves\n int count = 0;\n for (int i = 0; i < OPTIONS.length; i += 2) {\n int newRow = row + OPTIONS[i];\n int newCol = col + OPTIONS[i + 1];\n if (newRow >= 0 && newRow < rows && newCol >= 0 && newCol < cols) {\n count++;\n }\n }\n return count;\n }", "public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "public static void drawFullBoard()\n {\n char rowLetter=' '; //Letra de las filas.\n \n System.out.println(\" 1 2 3 4 \" ); //Imprime la parte superior del tablero.\n System.out.println(\" +-------+-------+\");\n \n \n for (int i = 0; i< BOARD_HEIGHT; i++) //Controla los saltos de fila.\n {\n switch(i)\n {\n case 0: rowLetter='A';\n break;\n case 1: rowLetter='B';\n break;\n case 2: rowLetter='C';\n break;\n case 3: rowLetter='D';\n break;\n }\n \n System.out.print(rowLetter);\n \n for (int j = 0; j < BOARD_WIDTH; j++ ) //Dibuja las filas.\n {\n if (boardPos[i][j]==0)\n {\n System.out.print(\"| · \");\n }\n else\n {\n System.out.print(\"| \" + boardPos[i][j] + \" \");\n }\n }\n System.out.println(\"|\");\n \n if (i==((BOARD_HEIGHT/2)-1)) //Si se ha dibujado la mitad del tablero.\n {\n System.out.println(\" +-------+-------+\"); //Dibuja una separación en medio del tablero.\n }\n }\n \n System.out.println(\" +-------+-------+\"); //Dibuja linea de fin del tablero.\n }", "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "static void showBoard() \n\t{\n\t\tSystem.out.println(\"|---|---|---|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[1] + \" | \" + tictactoeBoard[2] + \" | \" + tictactoeBoard[3] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[4] + \" | \" + tictactoeBoard[5] + \" | \" + tictactoeBoard[6] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[7] + \" | \" + tictactoeBoard[8] + \" | \" + tictactoeBoard[9] + \" |\");\n\t\tSystem.out.println(\"|---|---|---|\");\n\t}", "public static void drawPlayerBoard()\n {\n char rowLetter=' '; //Letra de las filas.\n \n System.out.println(\" 1 2 3 4 \" ); //Imprime la parte superior del tablero.\n System.out.println(\" +-------+-------+\");\n \n \n for (int i = 0; i< BOARD_HEIGHT; i++) //Controla los saltos de fila.\n {\n switch(i)\n {\n case 0: rowLetter='A';\n break;\n case 1: rowLetter='B';\n break;\n case 2: rowLetter='C';\n break;\n case 3: rowLetter='D';\n break;\n }\n \n System.out.print(rowLetter);\n \n for (int j = 0; j < BOARD_WIDTH; j++ ) //Dibuja las filas.\n {\n if (playerBoardPos[i][j]==0)\n {\n System.out.print(\"| · \");\n }\n else\n {\n System.out.print(\"| \" + playerBoardPos[i][j] + \" \");\n }\n }\n System.out.println(\"|\");\n \n if (i==((BOARD_HEIGHT/2)-1)) //Si se ha dibujado la mitad del tablero.\n {\n System.out.println(\" +-------+-------+\"); //Dibuja una separación en medio del tablero.\n }\n }\n \n System.out.println(\" +-------+-------+\"); //Dibuja linea de fin del tablero.\n }", "private void decidesActivateBoard(Piece turn){\n\t\tif(multiview()){\n\t\t\tif(this.LOCAL_PIECE.equals(turn))activateBoard();\n\t\t\telse deActivateBoard();\n\t\t}\n\t\telse activateBoard();\n\t}", "private int updataChessBoardScoreBinary(Point x, final int[][] chessData,\r\n\t\t\tint color) {\n\t\tint res = 0;\r\n\t\tint combo = 0;\r\n\t\t// System.out.println(\"\"+x.x+\",\"+x.y);\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tLineState pre = getLineStateBinary(x, chessData, i, color, 2, true);\r\n\t\t\tLineState las = getLineStateBinary(x, chessData, i + 4, color, 2,\r\n\t\t\t\t\tfalse);\r\n\r\n\t\t\tint ax = (pre.line << (las.length)) | las.line;\r\n\t\t\tint buf[] = tanslateStateToScoreBinary(new LineState(ax, las.length\r\n\t\t\t\t\t+ pre.length));\r\n\t\t\tres += calculateScore2(buf);\r\n\t\t\tcombo += buf[0] < 0 ? buf[0] : 0;\r\n\r\n\t\t}\r\n\t\tcombo *= -1;\r\n\t\tres += combo > 600 ? combo : 0;\r\n\t\t// System.out.println(\"res:\"+res);\r\n\t\treturn res;\r\n\r\n\t}", "ProfileViewPager mo106366h();", "public void getTile_B8();", "public void ShowBoard(){\n System.out.println(\" ___________{5}_____{4}_____{3}_____{2}_____{1}_____{0}____________\");\n System.out.println(\"| ____ ____ ____ ____ ____ ____ ____ ____ |\");\n System.out.printf(\"| | | [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] | | |\\n\",\n this.gameBoard[5], this.gameBoard[4], this.gameBoard[3],\n this.gameBoard[2], this.gameBoard[1], this.gameBoard[0]);\n System.out.println(\"| | | | | |\");\n System.out.printf(\"| | %2d | ____ ____ ____ ____ ____ ____ | %2d | |\\n\",\n this.gameBoard[6], this.gameBoard[13]);\n System.out.printf(\"| |____| [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] |____| |\\n\",\n this.gameBoard[7], this.gameBoard[8], this.gameBoard[9],\n this.gameBoard[10], this.gameBoard[11], this.gameBoard[12]);\n System.out.println(\"|_________________________________________________________________|\");\n }", "public byte readMode(int address)\n {\n int i; // Counter\n int offset; // Offset in the memory bank\n int[] plane = new int[4]; // Memory address of plane \n\n // Determien range of host memory used, and any offset \n switch (videocard.graphicsController.memoryMapSelect)\n {\n case 1: // 0xA0000 .. 0xAFFFF\n if (address > 0xAFFFF)\n {\n return (byte) 0xFF;\n }\n offset = address - 0xA0000;\n break;\n \n case 2: // 0xB0000 .. 0xB7FFF\n if ((address < 0xB0000) || (address > 0xB7FFF))\n {\n return (byte) 0xFF;\n }\n return videocard.vgaMemory[address - 0xB0000];\n \n case 3: // 0xB8000 .. 0xBFFFF\n if (address < 0xB8000)\n {\n return (byte) 0xFF;\n }\n return videocard.vgaMemory[address - 0xB8000];\n \n default: // 0xA0000 .. 0xBFFFF\n return videocard.vgaMemory[address - 0xA0000];\n }\n \n // Address is between 0xA0000 and 0xAFFFF\n if (videocard.sequencer.chainFourEnable != 0)\n {\n\n // Mode 13h: 320 x 200 256 colour mode: chained pixel representation\n return videocard.vgaMemory[(offset & ~0x03) + (offset % 4) * 65536];\n }\n\n for (i = 0; i < 4; i++)\n {\n plane[i] = i << 16;\n }\n\n // Address is between 0xA0000 and 0xAFFFF\n switch (videocard.graphicsController.readMode)\n {\n case 0: // Read mode 0 - read value of one plane in vga memory\n // All four latches are read with plane data, even though only one plane/latch is returned\n for (i = 0; i < 4; i++)\n {\n videocard.graphicsController.latch[i] = videocard.vgaMemory[plane[i] + offset];\n }\n return (videocard.graphicsController.latch[videocard.graphicsController.readMapSelect]);\n\n case 1: // Read mode 1 ('colour compare mode') - determine pixel colour of all four planes\n {\n byte colourCompare, colourDontCare;\n byte[] latch = new byte[4];\n byte returnValue;\n\n colourCompare = (byte) (videocard.graphicsController.colourCompare & 0x0F);\n colourDontCare = (byte) (videocard.graphicsController.colourDontCare & 0x0F);\n \n for (i = 0; i < 4; i++)\n {\n latch[i] = videocard.graphicsController.latch[i] = videocard.vgaMemory[plane[i] + offset];\n latch[i] ^= GraphicsController.colourCompareTable[colourCompare][i];\n latch[i] &= GraphicsController.colourCompareTable[colourDontCare][i];\n }\n\n returnValue = (byte) ~(latch[0] | latch[1] | latch[2] | latch[3]);\n\n return returnValue;\n }\n \n default:\n return 0;\n }\n }", "@Test\n\tpublic void testCuatroEnRayaVertical() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int x = 1; x <= 7; ++x) {\n\t\t\tfor (int y = 1; y <= 6 - 3; ++y) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = x;\n\t\t\t\t\tposY[l] = y + l;\n\t\t\t\t}\n\t\t\t\ttestCuatroEnRaya(posX, posY, 0, Counter.WHITE);\n\t\t\t\ttestCuatroEnRaya(posX, posY, 0, Counter.BLACK);\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void leftRighBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(19,38);\n\t\td.set(20,40);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(40);\n\t\tassertTrue(5==test_arr.get(0).getX() && 3==test_arr.get(0).getY());\n\n\t}", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "void displayBoard();", "@Test\n\tpublic void bottomLeftHorizWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(32,112);\n\t\td.set(1,113);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(113);\n\t\tassertTrue(1==test_arr.get(0).getX() && 10==test_arr.get(0).getY());\n\n\t}", "private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}", "private void updateBoard(int column, int turn) {\n rowHeight = cfBoard.rowHeight(column);\n int color = cfBoard.getColor(rowHeight-1, column-1);\n switch(column) {\n case 1:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c1.setBackground(Color.BLACK);\n break;\n case 2:\n r1c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c1.setBackground(Color.BLACK);\n break;\n case 2:\n r2c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c1.setBackground(Color.BLACK);\n break;\n case 2:\n r3c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c1.setBackground(Color.BLACK);\n break;\n case 2:\n r4c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c1.setBackground(Color.BLACK);\n break;\n case 2:\n r5c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c1.setBackground(Color.BLACK);\n break;\n case 2:\n r6c1.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 2:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c2.setBackground(Color.BLACK);\n break;\n case 2:\n r1c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c2.setBackground(Color.BLACK);\n break;\n case 2:\n r2c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c2.setBackground(Color.BLACK);\n break;\n case 2:\n r3c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c2.setBackground(Color.BLACK);\n break;\n case 2:\n r4c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c2.setBackground(Color.BLACK);\n break;\n case 2:\n r5c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c2.setBackground(Color.BLACK);\n break;\n case 2:\n r6c2.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 3:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c3.setBackground(Color.BLACK);\n break;\n case 2:\n r1c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c3.setBackground(Color.BLACK);\n break;\n case 2:\n r2c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c3.setBackground(Color.BLACK);\n break;\n case 2:\n r3c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c3.setBackground(Color.BLACK);\n break;\n case 2:\n r4c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c3.setBackground(Color.BLACK);\n break;\n case 2:\n r5c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c3.setBackground(Color.BLACK);\n break;\n case 2:\n r6c3.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 4:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c4.setBackground(Color.BLACK);\n break;\n case 2:\n r1c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c4.setBackground(Color.BLACK);\n break;\n case 2:\n r2c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c4.setBackground(Color.BLACK);\n break;\n case 2:\n r3c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c4.setBackground(Color.BLACK);\n break;\n case 2:\n r4c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c4.setBackground(Color.BLACK);\n break;\n case 2:\n r5c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c4.setBackground(Color.BLACK);\n break;\n case 2:\n r6c4.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 5:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c5.setBackground(Color.BLACK);\n break;\n case 2:\n r1c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c5.setBackground(Color.BLACK);\n break;\n case 2:\n r2c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c5.setBackground(Color.BLACK);\n break;\n case 2:\n r3c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c5.setBackground(Color.BLACK);\n break;\n case 2:\n r4c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c5.setBackground(Color.BLACK);\n break;\n case 2:\n r5c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c5.setBackground(Color.BLACK);\n break;\n case 2:\n r6c5.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 6:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c6.setBackground(Color.BLACK);\n break;\n case 2:\n r1c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c6.setBackground(Color.BLACK);\n break;\n case 2:\n r2c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c6.setBackground(Color.BLACK);\n break;\n case 2:\n r3c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c6.setBackground(Color.BLACK);\n break;\n case 2:\n r4c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c6.setBackground(Color.BLACK);\n break;\n case 2:\n r5c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c6.setBackground(Color.BLACK);\n break;\n case 2:\n r6c6.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 7:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c7.setBackground(Color.BLACK);\n break;\n case 2:\n r1c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c7.setBackground(Color.BLACK);\n break;\n case 2:\n r2c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c7.setBackground(Color.BLACK);\n break;\n case 2:\n r3c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c7.setBackground(Color.BLACK);\n break;\n case 2:\n r4c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c7.setBackground(Color.BLACK);\n break;\n case 2:\n r5c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c7.setBackground(Color.BLACK);\n break;\n case 2:\n r6c7.setBackground(Color.RED);\n break;\n }\n }\n break;\n }\n \n if (turn%2 ==1) {\n turnButton.setBackground(Color.RED);\n jTextField1.setText(\"It's Red's turn.\");\n }\n if (turn%2 ==0) {\n turnButton.setBackground(Color.BLACK);\n jTextField1.setText(\"It's Black's turn.\");\n }\n \n }", "@Override\n public void displayShuffleboard() {\n\n }", "@Test\n public void verticalAdvantage() throws IOException {\n Board field0 = new Board(\"------\"\n + \"-C--P-\"\n + \"----P-\"\n + \"----P-\"\n + \"-C--P-\"\n + \"----C-\");\n\n assertTrue(field0.evaluate(false) < -50);\n assertTrue(field0.evaluate(true) < -50);\n\n // Gewinnreihe fuer Spieler wird blockiert\n // hohe Bewertung fuer Blockierung bei defensiver Strategie\n Board field2 = new Board(\"----C-\"\n + \"-C--P-\"\n + \"----P-\"\n + \"----P-\"\n + \"-C--P-\"\n + \"----C-\");\n\n assertTrue(field2.evaluate(false) > -10);\n assertTrue(field2.evaluate(false) < 10);\n assertTrue(field2.evaluate(true) > 20);\n }", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}", "public void showBoard() {\n System.out.println(\"The board is\");\n System.out.println(\"| 1 | 2 | 3 |\\n| 4 | 5 | 6 | \\n| 7 | 8 | 9 |\");\n }", "public static int utilVert(Node nd, int a, int b){\n\t\tint nPlayer = 0; //O\n\t\tint nCPU = 0; //X\n\t\tint nSquares = 0;\n\n\t\tfor(int i=0; i<4; i++){\n\t\t\tif((a+i) < 6){\n\t\t\t\tif(nd.board[a+i][b] == cpuChip)\n\t\t\t\t\tnCPU++;\n\t\t\t\telse if(nd.board[a+i][b] == playerChip)\n\t\t\t\t\tnPlayer++;\n\t\t\t\tnSquares++;\n\t\t\t}\n\t\t}\n\n\t\tif(nSquares == 4){\n\t\t\tif(nCPU > 0 && nPlayer == 0){\n\t\t\t\tif(nCPU == 1)\n\t\t\t\t\treturn 1;\n\t\t\t\telse if(nCPU == 2)\n\t\t\t\t\treturn 10;\n\t\t\t\telse if(nCPU == 3)\n\t\t\t\t\treturn 50;\n\t\t\t\telse if(nCPU == 4)\n\t\t\t\t\treturn 512;\n\t\t\t}\n\t\t\tif(nCPU == 0 && nPlayer > 0){\n\t\t\t\tif(nPlayer == 1)\n\t\t\t\t\treturn -1;\n\t\t\t\telse if(nPlayer == 2)\n\t\t\t\t\treturn -10;\n\t\t\t\telse if(nPlayer == 3)\n\t\t\t\t\treturn -50;\n\t\t\t\telse if(nPlayer == 4)\n\t\t\t\t\treturn -512;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void printBoard() {\r\n // Print column numbers.\r\n System.out.print(\" \");\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\" %d \", i+1);\r\n }\r\n System.out.println(\"\\n\");\r\n\r\n\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\"%c %c \", 'A' + i, board[i][0].mark);\r\n\r\n for (int j = 1; j < BOARD_SIZE; j++) {\r\n System.out.printf(\"| %c \", board[i][j].mark);\r\n }\r\n\r\n System.out.println(\"\");\r\n\r\n if (i < BOARD_SIZE - 1) {\r\n System.out.print(\" \");\r\n for (int k = 1; k < BOARD_SIZE * 3 + BOARD_SIZE; k++) {\r\n System.out.print(\"-\");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }\r\n System.out.println(\"\");\r\n }", "public VerticalProfileControl() {\n setAttributeFlags(FLAG_COLOR | FLAG_DATACONTROL | FLAG_DISPLAYUNIT);\n }", "public long getBitboard() {\r\n return bitboard;\r\n }", "@Test\n\tpublic void bottomRightHorizWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(36,120);\n\t\td.set(4,119);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(119);\n\t\tassertTrue(9==test_arr.get(0).getX() && 10==test_arr.get(0).getY());\n\n\t}", "Board() {\n this.ones = -1; // 1\n this.twos = -1; // 2\n this.threes = -1; // 3\n this.fours = -1; // 4\n this.fives = -1; // 5\n this.sixes = -1; // 6\n this.threeOfAKind = -1; // 7\n this.fourOfAKind = -1; // 8\n this.smallStraight = -1;// 9\n this.longStraight = -1; // 10\n this.fullHouse = -1; // 11\n this.yahtzee = -1; // 12\n }", "public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }", "public void displayBoard() {\n newLine();\n for (int row = _board[0].length - 1; row >= 0; row -= 1) {\n String pair = new String();\n for (int col = 0; col < _board.length; col += 1) {\n pair += \"|\";\n pair += _board[col][row].abbrev();\n }\n System.out.println(pair + \"|\");\n newLine();\n }\n }", "private static void paintMatrix(int[][] matrix, Coordinator start) {\n int origColor = matrix[start.x][start.y];\n Queue<Coordinator> queue = new LinkedList<>();\n queue.add(start);\n while (!queue.isEmpty()) {\n Coordinator visiting = queue.poll();\n addNeightbours(queue, matrix, visiting, origColor);\n //flip visiting color\n matrix[visiting.x][visiting.y] = origColor == 1 ? 0 : 1;\n }\n\n for(int[] r: matrix) {\n for(int i : r) {\n System.out.printf(\"%d \", i);\n }\n System.out.println();\n }\n }", "public int getBlockTextureFromSide(int var1)\r\n {\r\n return var1 == 1 ? 72 : (var1 == 0 ? 74 : 73);\r\n }", "public void printBoard(){\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] == 0){\n System.out.print(\"0 \");\n }else{\n System.out.print(currentBoardState[i][j] + \" \");\n }\n }\n System.out.println();\n }\n }", "public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "private static int rightScore(char piece, State state, int row, int col) {\n\t\tif(col != state.getGrid().length-1 && state.getGrid()[row][col+1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "@Override\n\tpublic boolean canMoveTo(Integer row, Integer col, ChessBoard board) {\n\t\tif((0<=(this.row - row)<=1 && 0<=(this.col - col)<=1) && (1==(this.row - row) || (this.col - col)==1));\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t\tfor(int i=0; i<=1 i++) {\n\t\t\tfor(int j=0, j<=1, j++) {\n\t\t\t\tif((i=0) && (j=0))\n\t\t\t\t\t\tcontinue;\n\t\t\t\tboard.pieceAt(row, col);\n\t\t\t}\n\t\t}\n\t\tboard.pieceAt(row, col)\n\t\t\n\t\telse if()\n\t}\n\n\t@Override\n\tpublic void moveTo(Integer row, Integer col) {\n\t\t\n\t\t\n\t}\n\n\t@Override\n\tpublic PieceType getType() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n}", "public void findCaptured(Mat in)\r\n\t{\r\n\t\tint vsegment = in.rows() / 8; // only accounts 8 playable\r\n\t\tint hsegment = in.cols() / 12; // 8 playable, 2 capture, 2 extra\r\n\t\tint offset; // offset for playable board\r\n\t\t\r\n\t\tint capSquares = 12; // number of capture squares\r\n\t\tint rowNum = 1; // starting row number for capture squares\r\n\t\tint rightdx = 48;\r\n\t\tint leftdx = 0;\r\n\t\toffset = hsegment;\r\n\t\tint count = 0;\r\n\t\t// keep track of captured squares\r\n\t\t// left: end user, right: system\r\n\t\tfor (int i = 0; i < capSquares; i++)\r\n\t\t{\t\r\n\t\t\t// find where roi should be\r\n\t\t\tPoint p1 = new Point(offset + count * hsegment, rowNum * vsegment); // top left point of rectangle (x,y)\r\n\t\t\tPoint p2 = new Point(offset + (count + 1) * hsegment, (rowNum + 1) * vsegment); // bottom right point of rectangle (x,y)\r\n\t\t\t// create rectangle that is board square\r\n\t\t\tRect bound = new Rect(p1, p2);\r\n\t\t\t\r\n\t\t\tchar color;\r\n\t\t\t\r\n\t\t\t// frame only includes rectangle\r\n\t\t\tMat roi = new Mat(in, bound);\r\n\t\t\t\r\n\t\t\t// get the color\r\n\t\t\tcolor = identifyColor(roi);\r\n\t\t\t\r\n\t\t\tswitch(color)\r\n\t\t\t{\r\n\t\t\t\tcase COLOR_BLUE:\r\n\t\t\t\t\t//Imgproc.rectangle(in, p1, p2, new Scalar(255, 0, 0), 3);\r\n\t\t\t\t\tCore.rectangle(in, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tcaptured[i] = 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_ORANGE:\r\n\t\t\t\t\t//Imgproc.rectangle(in, p1, p2, new Scalar(0, 128, 255), 3);\r\n\t\t\t\t\tCore.rectangle(in, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tcaptured[i] = 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_WHITE:\r\n\t\t\t\t\t//Imgproc.rectangle(in, p1, p2, new Scalar(255, 255, 255), 3);\r\n\t\t\t\t\tCore.rectangle(in, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tcaptured[i] = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_BLACK:\r\n\t\t\t\t\t//Imgproc.rectangle(in, p1, p2, new Scalar(0, 0, 0), 3);\r\n\t\t\t\t\tCore.rectangle(in, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tcaptured[i] = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcount++;\r\n\t\t\tif (count == 1)\r\n\t\t\t{\r\n\t\t\t\toffset = hsegment * 10 - rightdx;\r\n\t\t\t}\r\n\t\t\telse if (count == 2)\r\n\t\t\t{\r\n\t\t\t\tcount = 0;\r\n\t\t\t\trightdx -= 6;\r\n\t\t\t\tleftdx += 6;\r\n\t\t\t\toffset = hsegment - leftdx;\r\n\t\t\t\trowNum++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void showBoard(){\n }", "public void drawFlag(Mat img, int flag) {\n\t\tPoint p1 = null;\n\t\tPoint p2 = null;\n\n\t\tdouble HALF_WIDTH = img.cols() * 1.0 / 2;\n\t\tdouble HALF_HEIGHT = img.rows() * 1.0 / 2;\n\t\tint size = 3;\n\t\tdouble MIN_VAL = size * 0.5;\n\t\tdouble WIDTH = img.cols() - MIN_VAL;\n\t\tdouble HEIGHT = img.rows() - MIN_VAL;\n\n\t\tswitch (flag) {\n\t\tcase 0:\n\t\t\tp1 = new Point(MIN_VAL, MIN_VAL);\n\t\t\tp2 = new Point(HALF_WIDTH, MIN_VAL);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tp1 = new Point(WIDTH, MIN_VAL);\n\t\t\tp2 = new Point(HALF_WIDTH, MIN_VAL);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tp1 = new Point(MIN_VAL, MIN_VAL);\n\t\t\tp2 = new Point(MIN_VAL, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tp1 = new Point(MIN_VAL, MIN_VAL);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tp1 = new Point(HALF_WIDTH, MIN_VAL);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tp1 = new Point(WIDTH, MIN_VAL);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tp1 = new Point(WIDTH, MIN_VAL);\n\t\t\tp2 = new Point(WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tp1 = new Point(MIN_VAL, HALF_HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tp1 = new Point(WIDTH, HALF_HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tp1 = new Point(MIN_VAL, HEIGHT);\n\t\t\tp2 = new Point(MIN_VAL, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tp1 = new Point(MIN_VAL, HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tp1 = new Point(HALF_WIDTH, HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tp1 = new Point(WIDTH, HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HALF_HEIGHT);\n\t\t\tbreak;\n\t\tcase 13:\n\t\t\tp1 = new Point(WIDTH, HALF_HEIGHT);\n\t\t\tp2 = new Point(WIDTH, HEIGHT);\n\t\t\tbreak;\n\t\tcase 14:\n\t\t\tp1 = new Point(MIN_VAL, HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HEIGHT);\n\t\t\tbreak;\n\t\tcase 15:\n\t\t\tp1 = new Point(WIDTH, HEIGHT);\n\t\t\tp2 = new Point(HALF_WIDTH, HEIGHT);\n\t\t\tbreak;\n\t\t}\n\n\t\tCore.line(img, p1, p2, new Scalar(0, 255, 0), 3);\n\t}", "private static int leftScore(char piece, State state, int row, int col) {\n\t\tif(col != 0 && state.getGrid()[row][col-1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "public void printBoard(){\n\t\tfor(int row = 0; row <9; row++)\n\t\t{\n\t\t\tfor(int column = row; column<25-row; column++)\n\t\t\t{\n\t\t\t\tBoard[row][column]='O';\n\t\t\t}\n\t\t}\n\t\tfor(int iteration_i = 0;iteration_i<9;iteration_i++){\n\t\t\tfor(int iteration_j=0;iteration_j<25;iteration_j++)\n\t\t\t{\t\n\t\t\t\tif (Board[iteration_i][iteration_j]=='\\u0000')\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(Board[iteration_i][iteration_j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public int snapToGridVertically(int p)\r\n {\r\n return p;\r\n }", "void analyzeBoard() {\n if (onProcessCompleteListener == null) {\n return;\n }\n\n if ((!isWin(TTTConstants.CIRCLE, true)) && (!isWin(TTTConstants.CROSS, true)) && (depth >= 9)) {\n onProcessCompleteListener.onGameDraw();\n }\n }", "VIDEO_START( bottom9 )\n\t{\n\t\tlayer_colorbase[0] = 0;\t/* not used */\n\t\tlayer_colorbase[1] = 0;\n\t\tlayer_colorbase[2] = 16;\n\t\tsprite_colorbase = 32;\n\t\tzoom_colorbase = 48;\n\t\tif (K052109_vh_start(REGION_GFX1,NORMAL_PLANE_ORDER,tile_callback))\n\t\t\treturn 1;\n\t\n\t\tif (K051960_vh_start(REGION_GFX2,NORMAL_PLANE_ORDER,sprite_callback))\n\t\t\treturn 1;\n\t\n\t\tif (K051316_vh_start_0(REGION_GFX3,4,TILEMAP_TRANSPARENT,0,zoom_callback))\n\t\t\treturn 1;\n\t\n\t\treturn 0;\n\t}", "private int getCol(int index) {\n return index & (chunkSize - 1);\n }", "public WorldImage drawBoard() {\r\n return new OverlayOffsetAlign(\"center\", \"bottom\",\r\n new TextImage(\"Flood-It!\", Cnst.textHeight, Color.BLUE),\r\n 0, Cnst.boardHeight + Cnst.scale,\r\n new AboveAlignImage(\"center\",\r\n new TextImage(\"Turn Count: \" + Integer.toString(this.currTurn) + \"/\"\r\n + Integer.toString(this.maxTurn), Cnst.textHeight, Color.BLACK),\r\n this.indexHelp(0,0).drawBoard(this.blocks)).movePinhole(0, (Cnst.scale * 7) / 2)\r\n ).movePinhole(0, (Cnst.scale * 76) / 10)\r\n .movePinhole(-Cnst.boardWidth / 2, -Cnst.boardHeight / 2);\r\n }", "public void showGameBoard() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out\n .printf(\"%3d\", playingBoard[row][col].getMoveNumber());\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }" ]
[ "0.56879514", "0.5638899", "0.56151104", "0.55989873", "0.5555081", "0.5510212", "0.5506869", "0.5408581", "0.5364254", "0.53360075", "0.5328619", "0.5309462", "0.5303038", "0.52961904", "0.52949613", "0.5263815", "0.523975", "0.5231796", "0.52316767", "0.5197562", "0.51963985", "0.51963836", "0.5186478", "0.5179827", "0.5179776", "0.5169004", "0.5155151", "0.514405", "0.5142201", "0.5133069", "0.5131756", "0.5130852", "0.5122105", "0.5120209", "0.51197904", "0.5118513", "0.5117495", "0.51159286", "0.5112943", "0.51089513", "0.5102142", "0.50909686", "0.5077346", "0.5074686", "0.5068276", "0.5067777", "0.5062884", "0.50615185", "0.5060124", "0.5056617", "0.50535804", "0.50519234", "0.5049318", "0.5048739", "0.5043859", "0.5041939", "0.5040425", "0.5037517", "0.50328755", "0.5025513", "0.50229836", "0.5021871", "0.502118", "0.5015832", "0.50076205", "0.5003775", "0.50021946", "0.49976656", "0.4993631", "0.49924025", "0.49920708", "0.49917993", "0.49822268", "0.49743924", "0.49694294", "0.49630356", "0.49571866", "0.4955855", "0.4955573", "0.49541405", "0.4953668", "0.49502265", "0.4941137", "0.49278134", "0.49268004", "0.49262503", "0.49244806", "0.49072117", "0.49017528", "0.4901435", "0.48979253", "0.48908645", "0.48891738", "0.48887777", "0.48838642", "0.48825085", "0.4879919", "0.48784342", "0.4877483", "0.48741248", "0.4871498" ]
0.0
-1
Created with 66cfv2 User : Ting.Yao Date : 2015/3/2.
public interface SystemDefaultPropertyRepository extends DomainRepository<SystemDefaultProperty>{ SystemDefaultProperty findByActive(boolean active); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo4359a() {\n }", "public void mo6081a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\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 }", "public void mo55254a() {\n }", "private stendhal() {\n\t}", "public void mo12628c() {\n }", "public final void mo51373a() {\n }", "public Pitonyak_09_02() {\r\n }", "public void mo12930a() {\n }", "private void kk12() {\n\n\t}", "public void mo1531a() {\n }", "@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\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void mo9848a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo3376r() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo21877s() {\n }", "public void mo115190b() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo5382o() {\n }", "public Tbdtokhaihq3() {\n super();\n }", "public void mo21785J() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void mo21825b() {\n }", "public void mo21783H() {\n }", "public contrustor(){\r\n\t}", "public void mo21878t() {\n }", "public void mo115188a() {\n }", "public void mo21779D() {\n }", "public void mo21794S() {\n }", "public void mo3370l() {\n }", "private TMCourse() {\n\t}", "public void skystonePos6() {\n }", "public void mo56167c() {\n }", "public void mo97908d() {\n }", "static void feladat7() {\n\t}", "static void feladat9() {\n\t}", "public void mo21782G() {\n }", "public void mo21787L() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public void mo21793R() {\n }", "public void mo21795T() {\n }", "public void mo44053a() {\n }", "private void m50366E() {\n }", "static void feladat6() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void designBasement() {\n\t\t\r\n\t}", "public void mo3749d() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "static void feladat4() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo1403c() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo21781F() {\n }", "public static void listing5_14() {\n }", "public void skystonePos4() {\n }", "public void mo21879u() {\n }", "public final void mo91715d() {\n }", "public Tbdcongvan36() {\n super();\n }", "public void mo21792Q() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "void mo21072c();", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo97906c() {\n }", "public void mo9233aH() {\n }", "public void skystonePos5() {\n }", "public void m23075a() {\n }", "public void mo2470d() {\n }", "static void feladat5() {\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "void mo67924c();", "@Override\n protected void getExras() {\n }", "public void mo21789N() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private final zzgy zzgb() {\n }", "public void mo6944a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "private void getStatus() {\n\t\t\n\t}", "private UsineJoueur() {}", "public String getName() {\n/* 50 */ return \"M\";\n/* */ }" ]
[ "0.5983929", "0.59540296", "0.5947119", "0.5903877", "0.5898031", "0.589373", "0.589373", "0.589373", "0.589373", "0.589373", "0.589373", "0.589373", "0.5880199", "0.57702744", "0.5725273", "0.5707204", "0.5703019", "0.5696539", "0.56740105", "0.5673375", "0.567314", "0.56722015", "0.56722015", "0.56610346", "0.5638372", "0.5633274", "0.5615638", "0.5598388", "0.556995", "0.55678487", "0.555646", "0.554474", "0.5544382", "0.5533034", "0.5528545", "0.5518915", "0.55186784", "0.55140275", "0.5496044", "0.5495409", "0.54929125", "0.54922235", "0.54826975", "0.54699713", "0.5462202", "0.54523337", "0.54428625", "0.5440817", "0.54400057", "0.5434171", "0.54334277", "0.5423202", "0.5420549", "0.5420447", "0.5411851", "0.54103994", "0.540626", "0.54017377", "0.5398892", "0.539581", "0.5394293", "0.5387435", "0.53787833", "0.5378609", "0.53645104", "0.53562534", "0.5351592", "0.53504926", "0.5343795", "0.53349733", "0.5328421", "0.53246826", "0.5323203", "0.5314807", "0.5313438", "0.5308335", "0.53041196", "0.530323", "0.5300877", "0.5299752", "0.5294826", "0.52927154", "0.5290779", "0.5289007", "0.5280845", "0.5275141", "0.52744913", "0.5274481", "0.52740335", "0.52647775", "0.5262482", "0.5262444", "0.52622837", "0.5261506", "0.525182", "0.52515626", "0.52513295", "0.52505714", "0.5250072", "0.5241506", "0.52394456" ]
0.0
-1
Map of planet (dark) images.
public static Map<Planet,ZImage> getDarkImages() throws IOException { Map<Planet,ZImage> plImgMap = new HashMap<>(); for( Planet planet: planetList ) { System.out.print("."); BufferedImage bImage = ImageIO.read(new File(planet.getFileDark())); // Store image with some metadata ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.BLACK ); plImgMap.put(planet, zimage); } return plImgMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Map<Planet,ZImage> getLightImages()\n throws IOException\n {\n Map<Planet,ZImage> plImgMap = new HashMap<>();\n \n for( Planet planet: planetList )\n {\n System.out.print(\".\");\n BufferedImage bImage = ImageIO.read(new File(planet.getFileLight()));\n \n // Store image with some metadata\n ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.LIGHT_GRAY );\n plImgMap.put(planet, zimage);\n }\n \n return plImgMap;\n }", "private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}", "WorldImage getImage();", "private ImageMappings() {}", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "private void getWeatherPic() {\n\t\tweatherPic=new HashMap<String, Integer>();\n\t\tweatherPic.put(\"晴\", R.drawable.weather_qing_tian);\n\t\tweatherPic.put(\"多云\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阴\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨伴有冰雹\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"雨夹雪\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"阵雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"小雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"雾\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"冻雨\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"小雨-中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨-大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨-暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨-大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨-特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雪-中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪-大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪-暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"浮尘\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"扬沙\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"强沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"霾\", R.drawable.weather_wu_mai_tian);\n\t}", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "private static BufferedImage getMap(int art, GameModel gameModel, Color mapC, Color skyC){\n\n BufferedImage image = new BufferedImage(2800,1800,BufferedImage.TYPE_4BYTE_ABGR);\n\n int genauigkeit = 400;\n\n int[] mapX = new int[genauigkeit + 2];\n int[] mapY = new int[genauigkeit + 2];\n\n mapX[genauigkeit + 1] = 0;\n mapX[genauigkeit] = GameLoop.imgW;\n\n mapY[genauigkeit + 1] = GameLoop.imgH;\n mapY[genauigkeit] = GameLoop.imgH;\n\n double[] rnd = new double[8];\n\n for(int i = 0;i < 4;i++){\n rnd[i] = Math.random() * 0.1;\n rnd[i+4] = Math.random();\n }\n\n for(int i = 0;i < genauigkeit;i++){\n mapX[i] = (int) (GameLoop.imgW/(double)genauigkeit * (i));\n\n switch(art){\n case 1:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/8);\n break;\n case 2:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.01) * gameModel.getHeight()/8);\n break;\n case 3:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/12 + i);\n break;\n case 4:\n mapY[i] = (int) (gameModel.getHeight()*0.8 - 1/(2000 + Math.pow(i - (genauigkeit - 2)/2.0,2)) * 1500000);\n break;\n case 5:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.pow(Math.sin(i * 0.03),3) * gameModel.getHeight()/4);\n break;\n case 6:\n mapY[i] = (int) (gameModel.getHeight()/2.0);\n mapY[i] += Math.sin(i * (rnd[0])) * rnd[4] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[1])) * rnd[5] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[2])) * rnd[6] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[3])) * rnd[7] * gameModel.getHeight()*0.1;\n\n\n\n\n\n }\n\n }\n\n Polygon map = new Polygon(mapX,mapY,genauigkeit+2);\n\n Graphics2D g2d = image.createGraphics();\n\n g2d.setColor(skyC);\n\n g2d.fillRect(0,0,2800,1800);\n\n g2d.setColor(mapC);\n\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n g2d.fillPolygon(map);\n\n return image;\n }", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearImgs.readDirectory(new File(Objects.requireNonNull(classLoader.getResource(\"assets/gear-tiles\")).getPath()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n for (i = 0; i < GEARTILES; i++) {\n list.add(new Location(LocationType.GEAR).withImg(gearImgs.popImg()));\n }\n list.get((int)(Math.random()*list.size())).toggleStartingLoc();\n\n Image waterImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-tile.jpg\")).toString());\n for (i = 0; i < WATERTILES; i++) {\n list.add(new Location(LocationType.WELL).withImg(waterImg));\n }\n\n Image waterFakeImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-fake-tile.jpg\")).toString());\n for (i = 0; i < WATERFAKETILES; i++) {\n list.add(new Location(LocationType.MIRAGE).withImg(waterFakeImg));\n }\n\n //TODO: Finish images\n for (i = 0; i < LANDINGPADTILES; i++) {\n list.add(new Location(LocationType.LANDINGPAD).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/landing-pad.jpg\")).toString())));\n }\n for (i = 0; i < TUNNELTILES; i++) {\n list.add(new Location(LocationType.TUNNEL).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/tunnel.jpg\")).toString())));\n }\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-LR.jpg\")).toString())));\n\n return list;\n }", "public HashMap<String,Image> getIcons(){\n\t\treturn iconMap;\n\t}", "public JQImageMap getImageMap()\n {\n return imageMap;\n }", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tprotected void generateMap() {\n\t\t//read map from tmx\n\t\tmap = null;\n\t\tfinal String tmx = \"res/tiles/map.tmx\";\n\t\ttry {\n\t\t\tTMXMapReader mapReader = new TMXMapReader();\n\t\t\tmap = mapReader.readMap(tmx);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tTileLayer layer = (TileLayer)map.getLayer(0);\n\n\t\ttiles = new PropertyTile[layer.getWidth()][layer.getHeight()];\n\t\tfor(int x=0; x<layer.getWidth(); x++) {\n\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n\t\t\t\tTile tile = layer.getTileAt(x, y);\n\t\t\t\tString type = (String)tile.getProperties().get(\"type\");\n\t\t\t\ttiles[x][y] = new PropertyTile(tile, TileType.valueOf(type.toUpperCase()));\n\t\t\t\ttiles[x][y].setImage(tile.getImage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//generate animated tiles from river tileset\n\t\tTileSet riverset = map.getTileSets().get(1);\n\t\tList<AnimatedTile> animatedTiles = new ArrayList<>();\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tTile[] frames = new Tile[3];\n\t\t\tIterator<Tile> iterator = riverset.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tTile tile = iterator.next();\n\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n\t\t\t\tint frame = Integer.parseInt(tile.getProperties().getProperty(\"frame\"));\n\t\t\t\tif(rtile == i+1) {\n\t\t\t\t\tframes[frame-1] = tile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tAnimatedTile aTile = new AnimatedTile(frames);\n\t\t\tanimatedTiles.add(aTile);\n\t\t}\n\n\t\t//replace tiles in map with animated tiles\n//\t\tfor(int x=0; x<layer.getWidth(); x++) {\n//\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n//\t\t\t\tTile tile = layer.getTileAt(x, y);\n//\t\t\t\tif(tile.getProperties().containsKey(\"animated\")) {\n//\t\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n//\t\t\t\t\tlayer.setTileAt(x, y, animatedTiles.get(rtile-1));\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}", "public Map<Pair<ID, PowerUpT>, List<Image>> getPowerUpImages() {\n return powerUpImages;\n }", "public List<MapImage> convertMetdataToMapImages(PreparedQuery trackedMetadata) {\n List<MapImage> formLocationOptions = new ArrayList<>();\n for (Entity entity : trackedMetadata.asIterable()) {\n String location = (String) entity.getProperty(\"cityName\");\n double latitude = (double) entity.getProperty(\"latitude\");\n double longitude = (double) entity.getProperty(\"longitude\");\n\n formLocationOptions.add(new MapImage(latitude, longitude, location));\n }\n return formLocationOptions;\n }", "private void setupDefaultTerrainMap() {\n defaultTerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SMALL_FISHERY);\n\n defaultTerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n \t \tdefaultTerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t}", "public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}", "Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "private void createHash() throws IOException\n\t{\n\t\tmap = new HashMap<String, ImageIcon>();\n\t\t\n\t\tfor(int i = 0; i < pokemonNames.length; i++)\n\t\t{\n\t\t\tmap.put(pokemonNames[i], new ImageIcon(getClass().getResource(fileLocations[i])));\n\t\t}\n\t}", "public Map<String, Planet> getPlanets(){\n\t\treturn galaxy;\n\t}", "private void createMapOfFourthType() {\n\n this.typeOfMap=4;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.PURPLE, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n }", "public Map<String, List<Image>> getBackgroundImages(){\n return backgroundImages;\n }", "public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "private void createNodesMaps()\n {\n Maze maze = gameState.getMazeState().getMaze();\n\n for (Node node : maze.getNodes()) {\n pixelsNodes.put(nodeToPixelIndex(node), node);\n }\n\n for (Node node : maze.getPillsNodes()) {\n pixelsPillNodes.put(nodeToPixelIndex(node), node);\n }\n\n for (Node node : maze.getPowerPillsNodes()) {\n pixelsPowerPillNodes.put(nodeToPixelIndex(node), node);\n }\n }", "private void createImageMap(final ValueMap properties) {\n if (!(properties.containsKey(\"imageMap\"))) {\n return;\n }\n try {\n final String mapDefinition = properties.get(\"imageMap\", \"\");\n if (StringUtils.isNotEmpty(mapDefinition)) {\n this.imageMap = ImageMap.fromString(mapDefinition);\n this.imageMapId = \"map_\" + Math.round(Math.random() * 2147483647.0D) + \"_\" + System.currentTimeMillis();\n }\n\n } catch (final IllegalArgumentException iae) {\n this.imageMap = null;\n this.imageMapId = null;\n }\n }", "public Map<ID, List<Image>> getEntityImages() {\n return entityImages;\n }", "public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }", "public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }", "public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}", "public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }", "public static Map<String,Planet> getPlanetsByName() { return planetsByName; }", "List<Bitmap> getFavoriteRecipeImgs();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public void createAlbedoMap(String filename) {\n\t\ttry {\n\t\t\t// Read in the image.\n\t\t\tBufferedImage img = new BufferedImage(I1.getRowDimension(), \n\t\t\t\t\tI1.getColumnDimension(),\n\t\t\t\t BufferedImage.TYPE_INT_RGB);\n\t\t\t\n\t\t\tdouble p[][] = this.P.getData();\n\t\t\t\n\t\t\t// Transform the image into a grayscale image.\n\t\t\tfor (int i=0; i < this.P.getRowDimension(); i++) {\n\t\t\t\tfor (int j=0; j < this.P.getColumnDimension(); j++) {\n\t\t\t\t\tint albedo = (int)(p[i][j] * 255);\n\t\t\t\t\timg.setRGB(i, j, new Color(albedo, albedo, albedo).getRGB());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tImageIO.write(img, \"png\", new File(filename));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading \" + \"yeah\");\n\t\t}\n\t}", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "private void setUpImage() {\n Bitmap icon = BitmapFactory.decodeResource( this.getResources(), R.drawable.hotel_icon );\n map.addImage( MARKER_IMAGE_ID, icon );\n }", "public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "public static Map<Integer, PhotoTags> getImagesSpiders() {\n\t\treturn imagesSpiders;\n\t}", "private static Image[][] getTileBases()\n\t{\n\t\tImage[][] tileBases = new Image[2][4];\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[0][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \".png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\t\t}\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[1][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \"_trans.png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn tileBases;\n\t}", "private void initImageBitmaps(){\n imageUrls.add(\"https://i.redd.it/j6myfqglup501.jpg\");\n names.add(\"Rocky Mountains\");\n\n imageUrls.add(\"https://i.redd.it/0u1u2m73uoz11.jpg\");\n names.add(\"Mt. Baker, WA\");\n\n imageUrls.add(\"https://i.redd.it/xgd2lnk56mz11.jpg\");\n names.add(\"Falls Creek Falls, TN\");\n\n imageUrls.add(\"https://i.redd.it/o6jc7peiimz11.jpg\");\n names.add(\"Skogafoss, Iceland\");\n\n imageUrls.add(\"https://i.redd.it/zxd44dfbyiz11.jpg\");\n names.add(\"Black Forest, Germany\");\n\n imageUrls.add(\"https://www.mountainphotography.com/images/xl/20090803-Hermannsdalstinden-Sunset.jpg\");\n names.add(\"Lofoten Islands, Norway\");\n\n imageUrls.add(\"https://i.redd.it/6vdpsld78cz11.jpg\");\n names.add(\"Isle of Skye\");\n\n imageUrls.add(\"https://i.redd.it/i4xb66v5eyy11.jpg\");\n names.add(\"Lago di Carezza, Italy\");\n\n imageUrls.add(\"https://i.redd.it/ttl7f4pwhhy11.jpg\");\n names.add(\"Arches National Park, UT\");\n\n imageUrls.add(\"https://i.redd.it/mcsxhejtkqy11.jpg\");\n names.add(\"Northern Lights\");\n\n imageUrls.add(\"https://i.redd.it/0rhq46ve83z11.jpg\");\n names.add(\"Swiss Alps\");\n\n imageUrls.add(\"https://i.redd.it/0dfwwitwjez11.jpg\");\n names.add(\"Hunan, China\");\n\n //Initialize our recyclerView now that we have our images/names\n initRecyclerView();\n }", "@Override\n public ImageData createPixelMap(double x, double y) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, x, y);\n }", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }", "@Override\n\tpublic Image[] getStaticImages() {\n\t\treturn null;\n\t}", "public static void load(){\n\t\trobot=new BufferedImage[5];\n\t\ttry {\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\trobot[i]=ImageIO.read(new File(\"robot\" + i +\".png\"));\n\t\t\t\n\t\t\tminiRobot=ImageIO.read(new File(\"miniRobot.png\"));\n\t\t\toil=ImageIO.read(new File(\"oil.png\"));\n\t\t\tslime=ImageIO.read(new File(\"slime.png\"));\n\t\t\tmap=ImageIO.read(new File(\"map.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Failed to load images\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Nonnull\n Texture getWorldMap();", "public Map(int r, int c){\r\n try {\r\n bomb = new Image(new FileInputStream(\"Minesweeper_Images/bomb.png\"));\r\n zero = new Image(new FileInputStream(\"Minesweeper_Images/zero.png\"));\r\n one = new Image(new FileInputStream(\"Minesweeper_Images/one.png\"));\r\n two = new Image(new FileInputStream(\"Minesweeper_Images/two.png\"));\r\n three = new Image(new FileInputStream(\"Minesweeper_Images/three.png\"));\r\n four = new Image(new FileInputStream(\"Minesweeper_Images/four.png\"));\r\n five = new Image(new FileInputStream(\"Minesweeper_Images/five.png\"));\r\n six = new Image(new FileInputStream(\"Minesweeper_Images/six.png\"));\r\n seven = new Image(new FileInputStream(\"Minesweeper_Images/seven.png\"));\r\n eight = new Image(new FileInputStream(\"Minesweeper_Images/eight.png\"));\r\n flag = new Image(new FileInputStream(\"Minesweeper_Images/flag.png\"));\r\n square = new Image(new FileInputStream(\"Minesweeper_Images/square.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n map = new Square[r][c];\r\n for(int row = 0; row<map.length; row++){\r\n for(int col = 0; col<map[0].length; col++){\r\n map[row][col] = new Square();\r\n //map[row][col].setVisual(\" \");\r\n int x = row;\r\n int y = col;\r\n map[row][col].setVisual(square);\r\n map[row][col].getSquareButton().setOnMouseClicked(e->{\r\n if(e.getButton() == MouseButton.PRIMARY){\r\n revealArea(x, y);\r\n }\r\n if(e.getButton() == MouseButton.SECONDARY){\r\n flag(x, y);\r\n if(win() == true){\r\n System.out.println(\"WIN\");\r\n EndBox.end(\"Win\", \"YOU WIN!!!\");\r\n System.exit(0);\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n }\r\n }", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "public Map<MediaFileType, MediaFile> getArtworkMap() {\n Map<MediaFileType, MediaFile> artworkMap = new HashMap<>();\n List<MediaFile> mfs = getMediaFiles();\n for (MediaFile mf : mfs) {\n if (!mf.isGraphic()) {\n continue;\n }\n if (!artworkMap.containsKey(mf.getType())) {\n artworkMap.put(mf.getType(), mf);\n }\n }\n return artworkMap;\n }", "private BufferedImage worldToImage() {\n if (world == null) {\n return null;\n }\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n int[] rgbWorld = new int[width * height];\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int index = twoDimIndexToOneDimIndex(x, y);\n rgbWorld[index] = world[x][y].getRgbColor();\n }\n }\n\n image.setRGB(0, 0, width, height, rgbWorld, 0, width);\n\n return image;\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\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}", "public Map<Pair<ID, ID>, List<Image>> getBulletImages() {\n return bulletImages;\n }", "public PgmImage() {\r\n int[][] defaultPixels = {{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}};\r\n pixels = new int[defaultPixels.length][defaultPixels[0].length];\r\n for (int row = 0; row < pixels.length; ++row) {\r\n for (int col = 0; col < pixels[0].length; ++col) {\r\n pixels[row][col] = (int) (defaultPixels[row][col] * 255.0 / 12);\r\n }\r\n }\r\n pix2img();\r\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "public Bitmap getShapesImage();", "@Override\n public ImageData createPixelMap(ImageData pixelMap) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, pixelMap);\n }", "public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\n }", "private static HashMap<String, TColor> createColors(){\n\t\tHashMap<String, TColor> iconColors = new HashMap<String, TColor>();\n\t\ticonColors.put(\"Arts & Entertainment\", TColor.newHex(\"E62733\"));\n\t\ticonColors.put(\"College & University\", TColor.newHex(\"E0006D\"));\n\t\ticonColors.put(\"Food\", TColor.newHex(\"917A2C\"));\n\t\ticonColors.put(\"Nightlife Spot\", TColor.newHex(\"582583\"));\n\t\ticonColors.put(\"Outdoors & Recreation\", TColor.newHex(\"00A43C\"));\n\t\ticonColors.put(\"Professional & Other Places\", TColor.newHex(\"00A38C\"));\n\t\ticonColors.put(\"Residence\", TColor.newHex(\"FFED00\"));\n\t\ticonColors.put(\"Shop & Service\", TColor.newHex(\"0067B2\"));\n\t\ticonColors.put(\"Travel & Transport\", TColor.newHex(\"F39200\"));\n//\t\tfor(Entry<String, TColor> e: iconColors.entrySet()){\n//\t\t\te.getValue().saturate(0.15f);\n//\t\t}\n\t\treturn iconColors;\n\t}", "public void buildEmptyMap() {\n this.emptyMap = new BufferedImage(this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics = (Graphics2D) this.emptyMap.getGraphics();\n graphics.drawImage(this.boulderDashModel.getArea().getImage(), 0, 0, this.boulderDashModel.getArea().getDimensionWidth() * zoom, this.boulderDashModel.getArea().getDimensionHeight() * zoom, null);\n }", "public static void loadTiles() {\n\t\tTILE_SETS.put(\"grass\", TileSet.loadTileSet(\"plains\"));\n\t}", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "public String[] getImagePaths() {\n return new String[]{\"/RpgIcons/fire.png\",\n \"/RpgIcons/water.png\",\n \"/RpgIcons/wind.png\",\n \"/RpgIcons/earth.png\",\n \"/RpgIcons/light.png\",\n \"/RpgIcons/dark.png\",\n \"/RpgIcons/lightning.png\"};\n }", "public HashMap<String, InputStream> getSprites() {\n\t\treturn getFilesByPath(simulationConfig.getString(\"spritepath\"));\n\t}", "private Bitmap decodeMapBitmap() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = false;\n options.inScaled = false;\n options.outWidth = 2048;\n options.outHeight = 2048;\n\n return BitmapFactory.decodeResource(getResources(), R.drawable.map, options);\n }", "public Map<String, String> getImageKeyMap() {\r\n\t\treturn imageKeyMap;\r\n\t}", "private void generateSprites() {\n final int PIXEL_ZOMBIE_SKIN = 0xa0ff90;\n final int PIXEL_SKIN = 0xFF9993;\n\n int pix = 0;\n for (int i = 0; i < 18; i++) {\n int skin = PIXEL_SKIN;\n int clothes = 0xFFffff;\n\n if (i > 0) {\n skin = PIXEL_ZOMBIE_SKIN;\n clothes = (random.nextInt(0x1000000) & 0x7f7f7f);\n }\n for (int t = 0; t < 4; t++) {\n for (int d = 0; d < 16; d++) {\n double dir = d * Math.PI * 2 / 16.0;\n\n if (t == 1)\n dir += 0.5 * Math.PI * 2 / 16.0;\n if (t == 3)\n dir -= 0.5 * Math.PI * 2 / 16.0;\n\n // if (i == 17)\n // {\n // dir = d * Math.PI * 2 / 64;\n // }\n\n double cos = Math.cos(dir);\n double sin = Math.sin(dir);\n\n for (int y = 0; y < 12; y++) {\n int col = 0x000000;\n for (int x = 0; x < 12; x++) {\n int xPix = (int) (cos * (x - 6) + sin * (y - 6) + 6.5);\n int yPix = (int) (cos * (y - 6) - sin * (x - 6) + 6.5);\n\n if (i == 17) {\n if (xPix > 3 && xPix < 9 && yPix > 3 && yPix < 9) {\n col = 0xff0000 + (t & 1) * 0xff00;\n }\n } else {\n if (t == 1 && xPix > 1 && xPix < 4 && yPix > 3 && yPix < 8)\n col = skin;\n if (t == 3 && xPix > 8 && xPix < 11 && yPix > 3 && yPix < 8)\n col = skin;\n\n if (xPix > 1 && xPix < 11 && yPix > 5 && yPix < 8) {\n col = clothes;\n }\n if (xPix > 4 && xPix < 8 && yPix > 4 && yPix < 8) {\n col = skin;\n }\n }\n sprites[pix++] = col;\n\n // If we just drew a pixel, make the next one an almost-black\n // pixel, and if it's already an almost-black one, make it\n // transparent (full black). (This is all honored only if the\n // next pixel isn't actually set to something else.) This takes\n // advantage of the left-to-right scanning of the sprite\n // generation to create a slight shadow effect on each sprite.\n if (col > 1) {\n col = 1;\n } else {\n col = 0;\n }\n }\n }\n }\n }\n }\n }", "interface WorldmapBuffer2 {\n final static byte[] image2 = {\n -125, 47, -3, 77, 51, 29, -45, -103, -120, 119, 76, -122, -82, -22, -106, 61, 113, 4, -59, 124, -116, 59, 115, -26, -44,\n 56, -115, 34, 106, -124, 98, 83, -115, 70, 9, -67, -116, 99, 92, -127, 89, -23, -68, -11, -41, 72, -15, -68, -48, 4,\n 29, 85, -30, 4, -79, -56, -20, 126, 69, 119, -119, -115, -116, 60, -37, -53, -107, 68, 90, -45, 79, -99, 108, 109, 45,\n 84, -65, -93, -44, -79, -23, -40, 23, -40, -48, 98, -92, -50, 125, -104, -52, -58, 50, -97, -119, 13, -78, -81, 82, -86,\n 15, -71, -92, 77, -115, -48, 48, 77, -88, 6, 61, 104, -117, -51, 103, -90, 5, -71, -52, 42, 76, -68, 113, 79, -7,\n 43, -42, -84, 38, -56, -100, 93, -44, 34, 71, -113, 100, -116, 64, 42, 88, -40, 94, 93, -83, -118, -115, 99, -32, -27,\n 72, -26, 43, -104, 35, 7, 37, 101, 12, -66, 107, -104, -128, -106, -116, 54, -93, -83, -119, -50, 23, -47, -117, 39, 89,\n 6, -9, 41, 47, 10, -37, -124, -2, 115, -40, -55, -67, -37, -118, -118, 92, 108, 24, -41, 35, -43, -61, 45, 44, 118,\n 87, 92, 70, -14, 108, -37, -22, -106, -41, -127, 124, -92, -70, -99, -42, 22, -38, 106, 43, -8, -84, -97, -99, -39, -48,\n -6, -62, 78, -10, -98, -38, 109, -98, -23, -87, -45, 112, -67, 73, 42, 21, 99, -25, 109, -40, -21, 10, 120, -88, -110,\n -99, 105, -37, -97, 68, -70, -112, 15, 54, -99, 111, 77, 37, 108, 52, -33, 113, 93, 59, -33, 56, -78, 124, -85, 42,\n 107, -3, -54, -94, 29, -37, 97, -53, -54, -24, 8, -113, -18, 45, 108, 61, 122, -124, 19, 102, 118, -65, -14, -31, 32,\n 30, -30, -8, 35, -40, 102, -106, -109, -33, -115, -58, -27, 38, -37, 43, 88, 106, -11, -104, -51, -16, 11, -39, 116, 24,\n -123, -48, -6, 107, 73, -39, -31, -107, 109, -98, 85, -36, 39, 115, 61, -37, -33, 53, -61, -49, 103, -119, -73, 84, -35,\n -64, -6, 97, -72, -85, -98, -94, 58, -33, 127, 77, -34, 96, 90, -127, 58, -22, -118, -61, -83, 58, 96, 59, 95, 27,\n 11, -29, -123, 76, 79, -108, 11, -48, -35, -100, -40, 82, 4, 97, 57, -18, -36, -63, -94, -28, -105, -87, -76, -57, -84,\n 122, -13, -40, -60, -37, -6, -28, -105, -42, -34, -105, 76, 61, 59, -2, -27, -103, -125, -76, 111, 39, -39, 118, -88, -119,\n 56, 43, 116, 50, 22, -87, 44, 43, -91, 63, -21, -51, -2, -14, -26, -38, -76, 36, -26, -52, -122, -26, 100, -61, -75,\n -108, 7, 24, -24, 92, -37, -28, -116, -51, 52, 126, -33, -103, -102, 114, -27, 77, -24, -124, 87, 68, -13, -119, -28, 99,\n -71, -33, 25, 88, -49, 120, 41, -24, -125, -82, -62, 102, -25, -49, -119, 25, -82, 111, 38, 63, -52, 76, 26, 81, 71,\n 118, -115, 39, 125, -58, -94, -26, 29, -109, -25, -4, -92, -80, 43, -42, -83, -108, -66, -86, -65, 43, -25, 19, 70, -23,\n -80, -68, -54, -72, -3, -43, 32, -117, -93, 102, -93, 27, -29, -77, 56, -70, -38, -34, 27, -67, -94, 52, -75, -119, -73,\n -5, -45, 58, 120, -48, 107, 125, -112, 109, -84, -25, 40, 78, -21, -8, 69, -27, -117, -36, 108, 57, 93, -114, 52, 120,\n -32, 100, 68, -48, -51, 65, -35, -42, 78, 82, 58, -88, 96, -121, 126, -39, 104, 34, -123, -6, 9, 66, -35, 40, 107,\n 66, -120, -65, 127, -125, -19, -75, 6, 122, -30, -21, -74, 42, 126, -121, 2, 3, -19, 22, 20, 53, 85, 89, 61, -21,\n -25, -95, 94, 18, -18, -35, 70, -101, 33, 10, -80, 18, 35, 94, 99, -98, -18, 40, -66, 87, 54, -18, -23, -36, 107,\n -24, 8, 47, -28, -113, -61, -87, -20, -98, -19, -71, 45, -35, -128, -82, -80, -23, -121, -38, 99, -117, -70, 7, 104, -20,\n 52, 122, -18, 76, -115, -40, 36, -6, -16, 88, -59, -72, 127, -58, -111, 59, 126, -2, 82, -17, -68, -49, -18, -63, -118,\n 111, -109, -33, 120, -118, -50, -52, 52, -29, -121, -2, -62, 126, 26, -124, -46, -18, -112, -115, 92, -65, 117, 125, -16, -74,\n 74, 90, -9, 27, -61, 0, 111, 110, 2, -72, -125, -102, 30, 22, 42, -33, 115, 23, -6, -24, 124, -102, -57, -16, 78,\n -62, 76, -119, 91, -48, -87, -65, -71, 126, -118, -123, -89, -18, -31, -92, -13, -95, -68, -35, -63, -100, 55, 88, -68, -47,\n -69, 55, -12, 99, 33, -16, -34, -22, -63, 66, 78, -11, -93, 78, 66, 17, 12, -75, -115, 6, -109, 34, 9, 114, -108,\n -72, -103, 8, -76, 112, 58, 126, -16, -74, -34, 102, 29, -56, -64, 88, 103, 123, -91, 100, 55, 61, -55, -50, 59, -33,\n -22, 90, 55, -90, -106, -3, -20, -79, -35, 53, -112, -2, -47, 49, -114, -23, 30, 95, -16, 25, 70, -17, 75, 53, -9,\n -38, 73, 109, 53, 38, -10, 106, -102, 55, -17, -31, 76, -26, -6, -128, -110, -1, -44, 25, 7, -56, 86, -56, -9, -6,\n 9, -10, -57, -66, -20, 5, 125, -8, 106, -83, -8, -1, -89, -13, -114, 31, -97, -88, -120, 75, -21, 42, -22, -19, -111,\n 101, -117, 107, -30, -71, 121, -11, -99, 23, 88, -68, -8, -88, -85, 25, -128, 72, 47, -95, -122, -125, -87, 50, -82, 50,\n -14, -34, -92, 112, 102, -29, -87, -113, -106, -64, -18, 108, 26, 107, 32, 69, -37, 120, 10, -113, 118, -20, -2, 38, -46,\n 93, -116, -63, 23, 126, -19, 25, -55, -113, -95, -99, 121, -55, 106, -122, 29, 72, -32, 117, 103, -106, 86, -52, 104, -37,\n 15, -14, -122, -27, -33, 77, 79, 96, 4, 27, 34, -87, -6, 69, -69, -69, -93, 113, 3, -49, 69, -75, 56, 101, 106,\n 78, 57, 62, -15, -16, 92, -8, -63, -114, -48, -59, -82, 95, 52, 116, 108, 104, 11, -69, 78, 6, 16, 1, 4, 14,\n 36, 88, -48, -32, 65, -124, 9, 21, 46, 100, 56, 80, 0, 0, 1, 7, 35, 10, -96, 8, 49, 98, -61, -126, 15,\n 1, 108, -28, -40, -47, -29, 71, -112, 33, 69, -114, 36, 89, -46, -28, 73, -108, 41, 47, 98, 76, -88, 113, 100, -59,\n -115, 43, 9, -62, -20, 72, 49, -128, 77, -121, 11, 93, -106, -92, 72, 83, -92, -52, -101, 61, 29, -6, -12, -120, 51,\n -88, -48, -116, 10, -127, 74, 100, 57, 115, 105, 83, -88, 45, -97, 10, -20, 57, 53, 42, 84, -93, 59, 85, 62, 20,\n -86, 53, -27, 87, -80, 97, -59, -114, 37, 91, -42, 108, 88, -85, 87, -43, -82, 101, -120, 52, -93, 70, -93, 87, -67,\n -98, -91, 91, -41, -82, -39, -86, 108, -25, 22, -35, 25, 119, -24, -57, -117, 50, -105, 86, 37, 10, 56, 110, -31, -102,\n 84, -111, 30, -2, -23, 23, -95, 85, -57, 65, 115, 98, -115, -52, 118, 109, 86, -73, -106, -43, 10, 30, -37, -109, 35,\n -30, -69, -2, -95, 69, -113, 38, 93, 58, 100, 90, -51, -87, 85, 27, -52, -85, 23, -76, 105, -40, -79, -47, 14, 69,\n -51, 122, 47, 95, -61, -84, 1, 83, 117, 74, -8, -90, 83, -117, 46, 43, 7, -83, 73, 24, -13, -17, -103, -89, 99,\n 54, -100, -24, -72, -7, 98, -29, -61, 21, -41, 94, -51, 50, 115, 117, -21, -103, 111, -13, -12, 44, -37, -5, 119, -16,\n -31, 65, 82, -57, 94, -34, -68, -50, -18, -30, -43, -81, 79, 60, 25, -29, -21, -94, 55, 79, -21, 110, -1, -5, -16,\n 68, -38, -48, -87, -73, 126, 59, 84, -30, 120, -72, -104, -29, -115, 53, -34, -116, -21, -17, 49, -14, -50, 83, -80, 41,\n -56, -2, -21, 108, 34, -10, 34, -108, 112, 66, -80, 18, 92, -16, -62, -43, -46, -93, 112, 67, -39, 4, -77, 78, 37,\n -86, 78, 3, -118, -90, -107, 112, 10, 44, -90, -86, -118, -77, -112, -71, 18, 31, -37, 77, -70, -57, -108, -102, 46, 58,\n 4, 49, -76, -47, -75, -89, 42, -37, -114, 39, -30, 56, -12, -15, 71, 9, 87, -68, 113, 72, -84, -128, 52, 114, 52,\n 15, -33, -5, -22, -60, -58, 104, 91, 14, 57, -59, -28, -5, -52, 64, 5, 3, 67, 48, -66, -53, 90, -126, 18, 61,\n 24, -119, -12, 50, -71, 39, -35, 123, -85, -84, 18, -113, 52, -13, 76, -46, -124, -4, 114, 77, 7, -47, 116, -77, -77,\n -103, 62, 4, 81, -54, -105, 66, -2, -124, 9, 63, -121, 32, -30, 107, -56, -25, -24, -29, 75, -51, 40, 9, -108, -18,\n 58, 54, 11, 5, 46, -52, -93, 108, -61, 11, -52, 55, 27, 117, 116, 73, 67, 35, 109, -53, -90, 29, 31, -75, 52,\n -52, 4, 43, 125, -47, 36, 38, -21, -53, 19, 75, 27, -97, -93, -76, 83, 80, 47, 27, 49, 63, 26, 37, 85, -107,\n -50, 39, 73, 100, -108, -52, 87, 47, -107, 117, 86, 64, 87, 93, -112, 43, -8, 102, -75, -76, 69, 37, -105, -52, -75,\n -43, -15, 14, 45, -11, -42, 1, 41, 101, 117, 79, -53, -4, 66, -83, 86, 91, 85, 35, -86, -71, 97, 53, -27, 49,\n 68, 93, -85, -107, -107, -39, 102, -85, -85, 8, 66, 107, -83, 53, -111, 65, -76, 78, -30, 118, -73, -93, -126, -67, 49,\n 48, -63, -74, -61, -42, 63, 49, 109, 91, 55, -37, -88, -26, 42, 108, -80, -77, -54, -20, -10, -34, 55, -33, -123, 87,\n -77, -82, -16, -11, 118, 75, -99, 68, 51, -18, 37, 19, -5, -22, -46, -39, -106, -22, -20, 109, -77, 1, -37, 117, 120,\n -33, 42, 81, 26, 76, -38, -97, 62, -11, -9, -30, 35, -7, -125, -40, 75, 13, 49, -34, 21, -32, -124, -21, -30, -17,\n -41, -32, -114, -123, -24, 92, -91, 42, 30, 89, -56, -26, -100, -118, 113, -29, 80, -59, 45, -40, 100, 72, -87, -11, -8,\n 102, 31, -11, -123, -103, 50, -118, 113, -34, -48, 74, -26, -2, 66, 51, -111, 83, 81, -55, 13, 85, 42, 17, -91, 34,\n 15, -49, -55, -46, -43, 121, -25, -128, -125, 123, -115, -79, 37, 17, -19, -39, 103, -84, -45, -124, -102, -29, -85, -77, -114,\n -80, -27, -74, -46, 36, -103, -44, -8, 8, -115, 55, 58, -115, 37, -14, -86, 54, -77, 103, 76, 21, 74, -96, -73, -66,\n 80, -39, -67, 56, -37, 74, 89, -81, -13, 86, -17, 105, -71, 83, -42, -37, -51, 59, -89, -22, -72, 49, -76, 83, 28,\n 79, 102, -102, -91, 62, 85, 109, -76, -109, 114, 92, 41, -31, 14, -114, 44, -45, -103, -5, 38, 114, -22, -116, 36, 6,\n 57, -15, -65, 59, 23, -38, 114, 12, -69, -10, -4, 107, 116, 65, 43, -4, 101, -50, 125, 37, -102, -72, -126, -17, -44,\n -119, 41, 22, 87, 84, -106, 103, 116, 65, -97, 123, -57, 17, 53, 119, 113, 116, -34, -111, -76, -3, -68, -63, 123, -49,\n -8, -74, -74, -75, -76, -7, 59, -83, -26, 125, 29, 118, -32, -29, -52, -82, 70, -105, 127, -41, 107, -38, -52, -87, -9,\n 83, 120, -20, -21, -107, 30, -8, -20, -49, 36, 12, 89, -84, 98, 37, 51, 120, -18, -124, 91, -98, -7, -14, -66, 101,\n 16, 61, -55, 54, -33, 62, 108, -21, -113, 87, 88, -47, -18, -21, 39, -117, 111, -23, 73, -74, 95, -68, 17, -45, 94,\n 95, -4, 7, 125, -81, 124, -84, 74, 75, 1, -101, -41, -66, -1, 65, -18, 113, -2, -17, -21, 21, 73, 114, 7, 32,\n -33, 108, -55, 112, -5, -93, -96, -18, 24, -104, -84, 10, 2, 73, 112, 122, 1, 96, 120, -58, -123, 40, 2, 25, 47,\n 125, 28, -20, -115, -1, -16, -73, 49, 105, -107, 14, 64, 74, -109, -110, -24, 50, 88, -65, -30, 93, 48, 106, 47, -4,\n -103, 8, -49, 102, -79, 32, -127, -49, 54, 54, -44, 22, 9, -99, -57, 67, 25, -50, -112, 96, 117, 43, -99, 91, -32,\n 66, 67, 36, 110, 37, -120, -17, 113, 97, 18, 5, 38, -93, 120, 9, 43, 103, 13, 99, 23, 16, 17, 38, 23, -25,\n 64, 113, -119, 65, -69, -33, 4, -115, -24, 68, 48, 90, 112, -117, 109, 10, -29, 122, 96, 4, -88, -2, -3, -120, 105,\n -127, 58, 31, 118, -48, -120, 58, -12, -115, -47, 111, 104, 73, 79, 119, -56, 87, 70, 60, 126, 70, -114, -41, -53, 35,\n 120, -10, -109, -91, -73, 52, -15, 46, -38, -79, -48, -63, -62, 119, -74, 28, 105, 113, -113, 33, -85, -48, -119, -122, -90,\n -89, 62, 70, -46, 92, 123, -44, -97, 36, 69, -74, 52, 64, -70, 103, -126, 14, 20, 100, -46, 2, 37, 59, 55, -54,\n 69, -127, 112, 92, 36, 25, 37, 118, 50, -55, 84, -46, -110, 97, 124, -37, -5, 58, -71, -54, -102, 89, 39, -109, -101,\n -53, -107, 10, -75, -89, 49, -106, -123, -14, -112, -118, -100, 78, 41, -123, 40, 46, 84, 114, 5, -106, -61, -2, 4, 85,\n -23, -74, -9, 74, 98, -118, 107, 82, -2, -5, 95, 1, 43, 22, -56, -15, 49, -82, -112, -70, 124, 30, 47, -87, -24,\n -53, 64, -118, -114, 108, -55, 36, -90, 49, -39, -120, -86, 19, -14, -117, -101, -90, 97, 91, 15, -35, 39, 63, 79, 101,\n 115, -120, 125, -111, -32, 125, 100, -103, -95, -3, 116, 105, -125, -40, 68, -112, 42, -127, 53, 78, 110, 50, -55, 105, -124,\n 10, -25, 101, -16, 89, -102, 114, 102, -24, -100, 127, 25, 86, 8, 55, -103, 21, 20, -127, -19, -102, -67, 108, -29, 21,\n -95, 39, 32, 82, -46, -77, -125, -100, -76, -25, 63, -111, -88, -49, 4, -50, -115, -117, 22, -3, 28, -5, -32, -55, 68,\n -72, 24, -48, 93, -3, 3, 90, -110, 30, 26, 71, 126, 89, -77, 45, -11, -108, 40, -3, 56, -6, -46, 105, 5, 40,\n -93, -38, 58, -35, -18, 96, 42, -78, 81, -102, -109, 65, 1, -35, -52, 96, 60, -54, 56, -121, -94, -76, -95, -46, -108,\n 104, 69, 111, -118, -49, 113, -127, -110, 123, -122, -71, 14, 50, -113, 42, 56, 67, 70, -47, 60, -52, -102, -35, 74, -43,\n 6, 66, 44, 102, 83, -87, -25, 99, -90, 12, 7, 118, 84, -80, 98, -55, 124, 9, -116, 33, 56, 35, 88, 41, -124,\n -122, -11, 126, 59, 36, -42, 84, 119, -7, -55, -91, -111, 52, -99, 88, -20, 42, 68, -83, 122, 32, -41, 64, -52, -87,\n 106, -59, -2, 99, 29, 17, -7, -80, -22, -119, 40, -123, 56, -28, 43, -30, -94, -89, 81, -73, -18, 114, 84, -120, -52,\n 11, 59, 125, -8, 88, -107, 2, -106, 69, 3, 53, -44, 94, 11, 91, 70, 87, 37, 11, 114, 56, 69, -25, 101, -97,\n -7, -61, -48, 29, 112, -89, 11, -107, -86, 98, -26, 90, 90, -122, 49, -47, -118, 92, 2, -19, -86, 44, -21, 89, 86,\n -114, 21, -78, -90, -75, -117, -35, 96, -21, -55, 5, -74, 53, -79, -76, -101, -22, 105, -33, -6, -37, -55, 10, -107, -95,\n 8, 92, -104, -83, 94, 123, 91, 26, 62, 18, -107, -77, -20, -47, 32, 39, 10, -37, 8, -110, 86, -76, 35, -116, -105,\n 69, 122, -21, -37, -103, 114, -87, 86, -109, 107, -36, 112, 89, 42, -87, -29, 34, 55, -125, -117, -63, -18, 123, -98, -69,\n -42, -13, -14, -107, -92, 101, 21, -24, 116, -63, -75, 92, 109, -23, 16, -75, 67, 53, 85, -125, 22, 39, -62, 126, 54,\n 80, -68, 96, -91, 84, 121, -19, 26, 94, -85, -19, 87, -113, 44, 68, -20, 110, -85, 11, -33, 12, -27, 102, 70, -26,\n -67, 43, 77, 103, 87, -94, -74, 25, 49, 82, 0, 22, -16, 11, 63, -120, 45, -27, 58, -105, -80, -73, 21, 41, 101,\n 83, -22, -34, -9, 34, 56, 53, 68, 116, 108, 100, 67, 88, -91, -82, -12, 73, 42, 39, 94, 19, -123, 43, 108, 97,\n 2, -14, -53, -88, -54, 76, 93, -2, 97, 33, 76, 37, -23, 6, -107, -102, 114, 25, 112, 124, -43, 37, 98, 22, -45,\n 119, -86, 107, -116, 104, -114, 67, -9, -30, -53, -6, 68, 95, 20, -34, 38, 116, 91, -85, -74, 42, 69, -39, -97, 64,\n -106, 113, 99, 18, 90, -28, -43, 38, 118, 89, -62, 61, 23, -110, 109, 76, -89, 119, -71, 56, 56, 21, 54, -87, -112,\n 71, 12, -30, 16, -29, -49, 116, -57, -117, -18, -115, 35, -52, 39, -17, 2, 54, -65, -65, -12, -14, 83, 109, -74, 46,\n 49, 35, -7, -66, -11, -116, 42, 112, 117, 124, 96, 42, -69, 6, -126, -60, -5, -22, 105, -25, -20, 48, -19, 112, 57,\n 102, 9, -83, 51, 76, -19, 21, -24, -115, 54, 90, -61, 79, 94, 96, -97, -33, -71, 99, 30, -9, -40, 89, 107, 67,\n -50, -116, -105, 27, -35, 2, -117, 105, -98, 45, 30, 112, -98, 37, -35, 59, 82, 89, 122, -61, -89, 94, 84, 110, -125,\n -20, 97, 81, 98, 58, -45, 88, 77, 22, -114, 33, 44, 22, 34, -93, -84, -75, -119, 84, 117, -83, 19, 99, 106, 86,\n -13, -82, -65, -2, -75, 105, -80, 91, 125, -40, 34, -97, 16, -44, -20, 125, 53, -96, 105, -51, 92, 68, -29, -102, 77,\n -89, -118, 91, 127, 14, 77, -48, 82, 27, -5, -91, -54, 115, -10, 32, 55, -23, -39, 61, -81, -74, -41, 39, 61, 10,\n -124, -77, -37, 109, -66, -31, -46, -108, -70, 27, 119, -84, -2, -93, -73, -27, -97, -10, -44, 92, -64, -42, -10, -24, -28,\n -43, -19, 122, -47, -51, -55, -82, 86, 116, -104, 121, 105, 72, -86, 126, 16, -46, 56, 18, 92, 0, 57, -106, 31, 88,\n 67, -75, 118, -17, -124, -113, -64, -21, 109, -25, 16, -25, -69, -36, 99, -6, 50, -65, -5, -67, 93, 120, -29, 53, -53,\n 13, 46, 49, -102, 59, -53, 41, -74, 74, 57, 64, -110, 115, -77, -94, -109, -13, 43, 79, 63, 92, -110, -78, -69, 100,\n -32, 8, -87, -42, 68, -38, 117, -29, 51, -49, -15, -96, 10, 119, 115, -25, 104, -38, -29, 77, -28, 76, 63, 83, -68,\n -100, 66, -30, 9, -86, 124, -82, -102, -54, -43, 91, 36, -94, 21, -70, 124, -24, -30, 47, -86, 24, 28, -17, 6, -101,\n -8, -101, -108, -34, -116, -50, 13, -68, -22, 57, 109, 107, -87, -49, -54, -22, 64, -47, 102, -12, 122, -77, 28, -28, -127,\n 85, 98, 115, 45, 10, -22, 75, 71, -99, -36, 102, -82, -94, 100, -99, 61, 103, 122, -31, 69, -74, -15, -3, 108, -38,\n -35, 103, 48, -80, -121, 125, -42, 117, -1, 56, -115, -51, -114, -44, -39, 74, 29, -42, -51, 14, -7, -32, 35, -99, -33,\n -72, 79, -102, -18, 124, -49, 41, -78, 77, 70, -17, -68, 3, 6, -77, 123, -97, 15, -39, 99, 41, -64, 127, 110, -105,\n 50, 80, 118, -9, 50, -37, 77, -58, -49, -1, -37, 119, 110, 28, -5, 40, 71, -2, 45, -81, -56, -17, 45, -27, 127,\n 83, -109, -70, -42, 45, -79, -114, 21, 14, -106, -102, 71, -19, -25, -73, -102, -32, -126, 18, -36, -14, -100, -59, 125, -4,\n 52, 14, -78, 71, -85, 8, -14, -87, 63, -39, -22, -11, 102, 105, -41, -13, -111, 46, -58, -62, 118, 31, 105, -49, -40,\n 15, -37, 125, -60, 70, -21, 105, -15, 0, -84, 51, 85, 54, 40, -73, -63, -49, 54, -15, -3, -24, -4, -96, 79, 50,\n -67, -72, 110, -22, -16, -15, -11, -4, -50, -89, -10, -36, 24, -92, 62, 72, 115, 45, -59, -114, -78, 63, -106, -108, -10,\n -23, -29, 29, -82, 58, -17, -13, 55, -24, 56, -98, -114, -73, -65, 117, -48, 111, -125, 49, -11, 75, 63, 2, 84, -69,\n -23, -53, -67, 21, -77, -72, 60, -61, 48, -98, 107, 54, 115, 75, -91, -61, -127, 21, -29, -53, 63, 48, 10, -67, 68,\n -103, 64, -63, 34, -94, -66, -126, -74, -11, -21, 64, -102, -85, 58, 4, 36, -68, 28, -119, 13, -86, -126, -107, 87, 3,\n -101, -1, -117, 63, -13, -93, 64, 97, 107, -67, 20, 124, 56, -86, -30, 64, 63, 99, -69, -22, 107, 63, 44, 3, 24,\n 12, -12, 61, 57, 65, -81, -100, -104, 24, -125, -86, -79, 10, 25, 63, 22, -20, -90, 92, -94, 45, -67, 11, -68, -89,\n -109, 65, -63, 43, 45, 78, 91, 48, -73, -77, -113, 28, 44, -67, -99, -46, 30, 118, -7, 35, 35, 92, -2, 62, 33,\n 28, 66, 34, -52, -88, 21, -76, 36, 111, -14, 64, 26, 52, 64, 49, -52, 36, 78, 115, 39, -54, -118, 66, 49, -46,\n 47, 19, 108, -95, -63, -77, -110, -67, -78, 45, 45, 12, -85, -5, -96, -101, -32, -61, 60, 61, -53, -118, 25, -108, -71,\n -7, -110, 62, -51, -38, 48, 94, -93, 51, -17, 8, -65, 75, 2, 51, 35, -45, 36, 32, -12, -69, 46, -116, 67, -20,\n 57, -88, -121, 73, -101, 68, 20, -64, -57, 57, -93, 1, -36, 67, -43, 106, 47, 63, -28, -68, 57, -30, 31, 53, 20,\n -103, -10, -64, -92, 78, -93, -62, 67, 84, 68, 57, 92, 40, 103, 122, -79, 13, 42, -94, -18, 114, -65, 62, -52, 67,\n 104, 75, 30, -109, 67, -61, -39, -128, 31, 114, 50, 60, 94, 65, -90, -5, 19, 69, 14, -117, -71, -111, 34, -77, 37,\n 116, -65, 37, 43, -64, -24, -117, -107, 112, -21, 13, 10, -39, -113, 14, -15, 68, -14, 90, -108, 71, -60, -59, 10, -86,\n 42, -68, 90, -58, -3, -47, -66, -68, 122, -102, 94, 83, -74, 98, 27, -58, -65, -101, 16, -74, 57, 70, -91, 57, -85,\n -66, -125, -108, 59, 98, 70, 27, 51, -106, -61, -40, 61, 14, -21, -59, -121, -62, 62, 92, 1, -61, 73, -92, -72, -2,\n 113, 18, 13, -110, -59, 89, -44, 69, -40, 113, -86, -42, -127, 70, 113, -20, 30, 3, -55, 57, 83, -76, -75, -82, -93,\n 58, -10, -2, 74, -58, 76, -71, -70, -1, 48, -73, 0, -100, 34, 64, 124, -94, 106, 19, 41, 91, -60, -107, 97, -53,\n 71, 61, 43, 54, -15, -22, -86, -96, 75, 64, 77, -62, 37, -68, 25, 72, -126, 44, 72, 59, -12, -98, -124, 124, 34,\n 40, -84, -74, 19, 107, -56, -104, -80, 8, -120, -84, -77, 17, -108, -69, 97, -62, 57, -24, -24, 69, -95, -29, 51, -117,\n 28, 67, 36, 100, -100, 107, -55, 68, -40, -128, -106, 86, -63, -81, 124, 43, -118, -109, 68, 73, -27, -13, -107, 22, 90,\n -91, -38, -15, -63, 14, 123, 29, -37, -101, 38, -99, 90, 38, -40, -29, -112, 82, -20, 16, 54, -45, -111, 44, -28, -92,\n -98, 100, -75, -60, 107, -92, 79, -127, 69, -42, -29, 21, 44, -117, -89, 39, 52, 74, 62, 84, -62, -85, -94, -88, 91,\n 52, 35, 70, 34, 65, 116, -14, -63, -88, -92, -88, -87, -108, -76, 7, 2, -54, -65, 120, -56, 72, 82, -88, -83, 28,\n 41, 34, -93, 61, -92, 60, 51, -43, 34, 49, 115, 100, 15, -56, 64, -98, 108, -124, -81, 52, -70, -97, 78, 92, -53,\n 70, 83, 58, -65, -93, 13, 0, -6, 58, 124, 100, -54, -89, -61, -56, 22, -87, 63, 38, 100, -57, 36, 52, 47, -105,\n 43, 56, -124, -4, 73, -128, -86, 27, 81, 123, -91, 103, 17, 38, -62, -116, -56, -88, -100, 24, -47, -60, 72, 20, 105,\n 70, 1, -63, 67, 68, -61, -58, -2, 36, -116, 43, -68, 84, -84, 109, -68, -52, -67, 20, 27, -62, 73, 75, 17, -111,\n 60, -84, -4, 76, 47, 76, -85, -61, -76, -113, -127, -109, -90, -15, -6, 61, -32, 83, -97, 30, -92, 58, -114, 99, 27,\n -111, 4, 70, -103, -116, -51, -81, 113, -87, 99, 116, -96, 43, -124, 19, 121, 73, 30, -36, 20, -80, -126, -103, 18, 110,\n -117, 19, -82, -112, -73, -33, 108, 31, -43, 76, 20, -20, 36, -50, -27, -111, 28, -16, -100, -52, -81, 124, 61, 109, 4,\n -114, -37, -100, 15, -41, -13, -52, -15, -87, -51, 41, -103, 78, 50, -13, 38, 47, 26, -55, -23, -79, -80, 50, 59, -61,\n -92, -72, -49, -43, -20, 70, -62, 43, -49, 101, -6, -56, -13, 36, 68, 96, 107, -78, -30, 88, 62, 7, -22, 62, -8,\n -100, 72, -6, 72, 17, 122, -84, -81, -59, 100, -52, 3, -111, 68, -115, 107, 61, -128, -124, 58, -55, -44, -82, -86, 84,\n -93, 24, 27, 80, -84, 43, -55, 122, -31, -114, 79, 75, 80, -22, -84, 67, -30, 26, -49, -25, 121, -48, 26, 26, 78,\n 15, -13, 41, -83, -108, 62, -76, 12, 67, -109, -93, -85, 111, 44, 70, -79, 50, -53, 25, 117, 74, 9, 18, -47, -8,\n 60, -106, -116, -101, 37, 20, 13, -48, 78, 43, 81, -108, 122, -55, 61, 44, -94, 11, 109, 59, 75, -4, 81, 101, 26,\n 80, 2, -11, -53, -74, -44, -47, -3, -46, 16, -29, -116, -2, -63, 14, 109, -63, 78, 123, 63, -6, 11, -46, 25, 108,\n 55, -106, -95, -58, 42, 53, -109, 38, -3, -100, -12, 76, -70, 79, 83, 82, 40, -75, 31, -54, -23, 41, -38, -52, 26,\n -56, -100, 75, 44, -91, -53, 27, 36, 79, 61, 36, 67, 90, -71, -47, -38, 58, 72, 3, -3, -119, 30, 27, -45, 51,\n 21, 74, -38, -111, -89, -108, -116, -58, -18, -68, -69, 84, -20, -49, -82, 76, -50, 56, 77, 59, 51, -107, -103, -31, -61,\n 15, -84, -84, 36, 8, 89, -44, 62, 93, -60, -103, 4, -56, 112, -12, -100, 114, -116, 40, -52, 49, -44, 67, 69, -44,\n 24, 109, 35, 73, -27, 20, -43, 11, 83, -85, -4, 75, 0, -103, -44, 83, 67, 63, 43, -38, 39, 24, 58, -50, -51,\n 116, 78, 78, 53, 60, 79, -75, -72, -55, 12, 85, 51, -38, 84, 59, -35, 77, 83, -27, 73, 84, 45, 76, -80, 68,\n 76, 57, -29, -45, 70, 33, 36, -33, -48, -97, 116, -103, 83, -57, -29, -77, -37, -85, -90, 47, 21, -98, -25, 104, 63,\n -50, -124, -86, 94, -115, -68, 55, -126, 28, -83, -100, 39, 97, -51, -105, -125, -20, 25, -90, -77, 46, 33, 91, 56, -73,\n -95, 67, -49, 83, 69, -52, -124, -95, 75, 108, 86, 78, 10, -53, 105, -51, -69, 106, 37, 48, -72, 121, -103, 108, 5,\n -100, 109, -51, -70, -112, 18, 67, 112, 45, -73, -14, -101, -46, -72, -102, -100, -117, -2, 58, -41, 92, 109, 18, -26, 92,\n 87, -107, 107, 87, -89, 115, 28, 105, 12, -59, 60, -70, -50, -71, 68, -72, 74, 44, 88, 39, 116, 88, -13, -116, 70,\n -62, -126, -61, 32, 68, 69, -127, -91, -42, 86, -76, 33, 122, 28, 75, -64, 11, -49, -70, -6, 83, -55, -14, 70, -101,\n 76, -82, -26, -93, 88, 49, -30, -66, -117, -123, -63, -116, 37, 37, -56, 36, -43, 124, 90, 41, -3, -28, 64, -115, -108,\n -56, 36, -78, 45, -109, -27, -114, 74, 75, 89, -93, -93, 82, 5, 116, -75, 107, 109, -70, -88, -13, 82, 90, 29, 90,\n 91, -115, 71, -117, -55, 48, -100, -35, 62, -99, 29, -40, -22, 19, -51, 56, 114, 51, -68, -71, -87, -101, 3, -83, 116,\n -5, -44, -66, -116, 75, 97, -31, 88, 27, 4, -66, -50, 88, 90, -104, -5, 43, 82, 60, 61, -76, 43, -41, -105, -107,\n -96, 11, 52, -47, 115, -13, 68, -78, 117, -94, -64, -68, 84, -83, 19, 65, 81, -27, 85, -81, -107, 90, 10, 125, -73,\n 101, 81, -75, -94, -83, -106, -123, 124, -64, 66, -12, 51, -75, 93, 83, 10, -102, 24, 15, 37, -100, 23, 13, 44, 59,\n -20, -52, -68, -99, -37, 107, 113, 85, -6, -78, -64, -78, -28, 40, 19, 74, -44, -76, 117, -47, 110, -94, 89, 114, 41,\n 84, 104, 90, -81, 50, 84, -36, -77, 27, 90, 119, -71, -100, -89, 58, 88, -76, -83, -43, -88, 122, -46, -2, -39, 115,\n 23, 88, -115, 56, -100, 99, 42, -50, -51, 60, 56, 69, -57, -34, 115, 52, -47, -19, -37, 75, -13, 43, -103, 75, -36,\n 124, -79, 92, 98, -13, 19, -83, 45, -48, -42, 29, -89, -69, -123, -35, 3, -108, -38, -58, 77, 82, -7, 66, 29, -36,\n 29, -42, -120, -75, -70, 76, -20, 93, -21, -124, -96, -33, 77, 88, 40, 42, -54, 35, -5, -109, -28, 5, -45, -30, 61,\n 51, 70, 100, -80, -21, 85, 94, -27, 124, 54, 83, -46, -89, 112, 76, -98, 91, -117, -34, 10, -44, -94, -39, -67, -107,\n 82, -119, 87, -84, -95, 94, 89, 101, -97, -92, 18, 82, -90, -24, 94, -17, -3, -34, 76, 17, 43, 60, 5, 88, -84,\n 99, 95, -13, 69, -109, -94, 28, -75, 80, 25, -37, 93, 101, 37, 40, 27, 84, -87, -30, -106, -104, 93, -37, -107, 92,\n -34, -91, 89, 95, -98, -93, -40, -22, -20, -33, 69, -52, -111, -47, 28, -35, 17, 19, 78, 5, 102, 91, -125, 77, 96,\n -122, -7, -71, 119, 124, 92, -56, 101, -32, 72, 3, 76, -71, -109, -46, -128, -107, 96, 76, 77, -42, -111, -46, -85, -114,\n 36, -32, -102, -93, -87, 2, -71, 59, -35, 117, -35, -120, 21, -32, -57, -117, 18, -118, -23, -52, -109, -125, -116, 25, -93,\n 95, 20, -74, -102, -47, -38, 26, -61, 36, 89, 25, -42, 37, -82, 4, -36, -107, -101, 97, 61, -46, -114, -53, 117, 94,\n -91, 43, -2, 41, -104, -67, 84, -61, -8, -31, -113, -95, 93, 96, -75, 29, 31, -10, -93, 115, 82, 51, 89, -67, -39,\n 109, 83, -30, -46, 68, -111, -65, 68, -63, -69, 89, -30, -103, 125, 78, 16, -91, 98, 121, -19, 84, 36, -75, 28, -2,\n -83, -55, 15, -36, -68, -51, -53, -30, 58, -51, 96, -55, 83, -49, -30, 35, 19, 49, 54, -64, 28, 54, 73, 53, -58,\n 94, -26, 107, 88, 87, -46, -32, -62, -77, 68, 124, 27, -59, -17, -83, -40, -30, 123, -61, 65, 1, -29, -46, 124, -29,\n 63, -66, 60, -42, 92, 34, 41, 118, 86, -2, -109, -75, 29, 76, 50, 47, -122, -50, -63, -11, -74, 27, 36, -76, -2,\n -94, 99, -50, 93, -42, 45, -126, 100, 109, -43, -75, 67, -82, 56, -124, 101, 84, 18, 108, 83, -44, -107, 26, 36, -114,\n 100, -65, 60, -46, -33, 17, 101, -128, -126, -40, 77, -93, 60, -24, 26, 98, -63, -60, -47, 67, 117, -71, 127, -107, -27,\n -27, -108, -45, 82, 78, -82, -90, 114, -93, -42, 51, -59, 18, -86, -28, 32, -119, 85, 30, -75, -27, -2, -75, 66, 108,\n -126, 102, -112, 124, 90, 102, -61, -60, 76, 86, 80, 107, 13, 85, 3, 94, 101, 97, 54, 90, 24, -67, 32, 106, -82,\n -26, 74, -77, 96, 21, -106, -57, -119, 52, 70, -28, 73, -61, -41, -4, -26, 58, -114, 99, 113, 38, -30, 122, -20, 102,\n 108, -34, -60, 116, -74, 62, 102, -2, -18, 34, 70, 125, -78, 47, 114, 103, 93, 113, 95, 74, -22, -41, -104, 100, -29,\n 115, 6, -48, 123, 94, -74, 20, 93, -116, -84, -19, 86, 127, -66, 20, -128, 30, -93, 113, 38, 103, -1, -28, 60, -28,\n -37, 89, 0, -52, 95, -42, -19, -94, -56, 65, -39, 16, 109, -24, 42, -42, 84, -120, -82, 89, 74, 4, 42, -32, 28,\n 89, 106, 77, -95, 22, 94, 62, -14, -39, 100, -113, -50, 24, -45, 107, 100, 55, 38, -28, 11, 29, 14, 102, -117, 104,\n -74, 101, -24, -67, -127, -65, -106, -58, 94, -113, 82, -72, -104, -106, -23, -119, 110, 99, 21, 69, 103, 113, -60, -55, 32,\n 73, -58, -99, -10, 95, 23, 101, -36, 125, -79, -23, 91, -98, -23, 2, 2, -44, -75, 92, 84, -116, 78, -22, 98, -52,\n -114, -59, 50, -25, 66, 113, -22, -89, 102, -72, 8, -117, -22, -88, -10, -26, 81, -74, -22, -117, -23, -46, 79, 5, -81,\n 13, -36, 41, 55, 44, 92, 69, -39, 39, -114, -18, -45, 124, -58, 13, -78, -10, 23, 82, -98, 58, 120, -31, 106, -83,\n -15, 33, 35, -126, 74, -121, -44, -111, -117, -75, 88, -112, -61, -21, -99, 46, -62, 122, 54, 46, -23, -99, -83, 76, -51,\n -49, -34, -20, 26, -63, 14, 92, -25, 104, 56, 116, -99, -21, -36, 101, 69, -7, -83, 44, -25, 91, -59, 64, -94, 37,\n -7, 104, 103, -103, -55, -57, -78, 74, 62, -79, -106, 108, -2, -105, 14, 106, -69, -98, -74, -53, 102, -84, 51, -86, -65,\n -20, 52, -23, 58, 105, -20, -20, 81, -25, -49, 114, -19, -122, -66, -53, -32, -78, -20, -61, -90, -20, -1, 90, -106, 57,\n 9, -19, 35, 52, -24, -73, 22, 109, -121, 38, 109, -83, -66, -82, -55, 67, 78, -84, -10, 78, 71, -82, 15, -39, 102,\n 83, -82, 27, 97, -22, 91, 110, 119, 62, 99, 98, -26, -109, -37, -58, 109, -104, 116, 27, 16, -98, 31, -24, -58, -103,\n -14, -19, -51, 26, 11, 76, -32, -42, 91, -98, -94, 101, -30, 118, -31, -111, 110, -68, 31, -78, -52, -92, 13, 102, -97,\n -36, 97, -40, -82, 60, -118, 11, -17, 127, 14, 107, -21, -114, -104, -76, 54, -18, 79, -106, 51, 41, 68, -29, -34, 118,\n 30, -110, 99, 60, -10, -106, 111, 35, -111, 86, -62, -2, -110, -19, -58, -62, 118, -60, -48, 31, 92, -34, -110, 57, -31,\n -2, 38, -24, -3, -51, 110, 1, 127, 20, -88, 68, 109, -114, -87, -18, -6, -50, -41, -90, 97, -32, -85, 29, -40, 6,\n -33, -76, -83, 13, -16, 9, 7, -25, -31, -10, -36, -12, -71, 111, -4, 22, -22, 118, 114, -16, -14, 58, -16, 110, 105,\n 25, 53, 11, 65, 23, -9, -25, -60, -2, -43, 19, -57, 44, -52, 69, -17, -110, -90, -38, 68, -42, 109, -90, 117, 92,\n -101, -14, -15, 17, -9, 22, -71, -76, -15, -59, 59, 95, 105, 26, 91, 37, 71, -2, 86, 59, 21, -14, 35, 68, -68,\n -43, -106, -16, 33, 15, 110, 127, -93, 110, 20, -9, -68, -77, -78, 97, -72, -35, -17, 68, 110, -17, -93, 49, -24, 41,\n -9, 94, 60, -77, -14, 43, 23, 100, 12, 70, -42, 28, 102, -19, 84, -67, -21, 48, -1, -105, -9, 61, -21, -31, 45,\n -13, 49, -92, 109, -2, -98, 31, 59, -26, 69, 54, 111, -13, 127, -122, -16, -58, 34, 115, 12, 103, 114, 43, -58, -63,\n 88, -68, 115, 60, -65, -21, 25, -113, -18, 78, 37, 36, 63, -1, 115, 26, -4, 91, 23, 82, -17, 96, -69, -26, -83,\n 62, 116, 97, 102, 106, 126, -69, 54, 17, 55, 87, 118, -108, -26, 71, -105, -14, 40, -3, -40, 60, -41, 115, 71, -79,\n 116, 57, -21, 50, 63, 13, -22, -15, -18, -12, -28, 30, 71, 76, 47, 111, 81, 7, 28, -38, 5, 96, -11, 61, -11,\n -23, 30, 79, -106, 6, -16, 76, 119, 52, -81, 122, -11, -6, 109, 81, -30, 60, 52, 74, 87, -68, 112, -114, -36, 46,\n -105, -15, 59, 12, -94, 96, 87, -29, 90, -28, -50, 55, 69, 110, 87, 79, -30, -1, -28, -103, 104, -37, 109, 6, -105,\n 67, -17, -2, 105, 94, -9, -56, 98, -87, -62, 35, 38, -67, 100, 26, -17, 102, -30, 87, 106, 47, -10, -48, -107, -93,\n -72, -50, 118, 45, -66, 98, 42, -110, -89, 11, -82, 106, 70, 55, -15, 66, 14, -44, 52, -116, 108, -120, -2, 11, 104,\n 116, 39, -15, -66, 5, 119, -54, -48, -11, 112, 110, -60, 85, 103, 94, -34, -18, -40, 82, 74, 118, -13, 117, -27, -75,\n 43, 104, 48, 95, -32, 126, -81, 112, 66, -89, 50, -126, -65, 106, 95, 122, -8, -33, -3, -32, -38, -122, -13, 58, 23,\n -8, 56, 126, 104, -58, 110, -8, 47, -98, -26, 123, -65, -52, 106, -124, -25, -128, -57, 90, -105, 12, 90, 109, -30, -8,\n 16, -90, 39, -119, 87, 92, 95, 15, 98, 120, 31, -32, -50, -43, 113, 120, -65, -11, -44, 53, 101, 72, -12, -8, -113,\n 111, 102, 8, 63, 65, -25, 6, -38, -127, -66, 100, -29, 49, 62, -25, 85, 101, -100, -49, 121, -78, -36, 121, -97, 61,\n 35, 112, -13, -54, 64, 87, -20, 60, 61, -10, -94, 50, 122, -66, 44, 113, 68, 43, -60, -107, 79, 119, 45, 105, -7,\n -55, -70, 122, -113, 105, 118, 74, -106, -6, -93, 111, 122, -98, 63, -61, 125, -117, 17, 80, 55, 123, -101, -105, -61, 86,\n -97, 48, -80, -49, 105, -79, 95, -31, 119, -11, 116, -30, 21, -7, -96, -9, -20, -106, 26, -7, -74, -105, -74, -73, 39,\n 48, 39, 39, 122, 103, -74, -25, 56, 92, 123, -74, -49, -5, 64, 68, 122, 64, -89, -9, -104, -73, -8, -124, -49, 63,\n -63, -33, 106, -62, 47, -4, -67, -9, 84, -82, -41, 68, -125, -97, 50, -69, -113, -6, -57, -73, -47, 55, -105, 124, -22,\n 52, -37, -2, 27, 34, 119, -17, 107, 124, -45, -50, -4, -101, -116, 124, -105, -60, -13, -77, -81, 71, -48, 15, 125, -52,\n 39, -3, -89, -82, -38, -98, 47, 123, -11, -93, 121, 45, 20, 125, 3, 119, -3, 89, -36, -4, -116, 7, -51, 1, 68,\n 90, -120, -76, -3, 11, -57, -3, -68, -58, -66, -54, 70, 124, 68, 22, -91, 126, 38, 76, -32, 95, 116, -31, -81, 45,\n -35, 71, 94, -71, -105, -3, 34, -59, -51, -27, 55, -11, -26, 23, -45, -92, -124, 116, -34, 23, -89, -23, -84, -2, -22,\n -67, 126, -25, 34, -2, -33, -101, 124, 8, -27, -2, -18, 31, 50, 73, 127, 118, -16, -65, 37, 67, 78, -17, 72, 55,\n -1, -13, -105, -79, 111, 75, -3, 35, 95, 127, -100, 18, 127, -125, 122, 127, 65, 19, -47, -128, -53, -31, -54, 7, -120,\n 0, 2, 7, 18, 44, 104, 112, -96, 0, 0, 10, 23, 50, 108, -24, -16, 33, -60, -120, 18, 39, 82, -84, 104, -15,\n 34, -58, -116, 26, 55, 114, -20, -24, -15, 35, -56, -123, 2, 4, -114, 60, 104, -14, 100, -128, -110, 7, 71, 38, 12,\n -23, -14, 37, -52, -104, 27, 85, -94, 60, -39, 82, 38, -50, -100, 58, 119, -30, -92, 89, -45, -96, -128, -101, 24, 125,\n 6, -3, 105, 20, 40, -49, -92, 74, -105, 50, 109, -22, 84, 105, 73, -97, 71, -127, -94, 12, -6, -12, 42, -42, -105,\n 82, -89, 10, -51, -22, -11, 43, -2, 88, -122, 91, 127, 90, -19, 72, -77, -24, -44, -93, 93, -61, -78, 109, -21, -10,\n -19, 85, -107, 99, -45, -90, -84, 10, -9, 46, -40, -71, 85, -41, -30, -19, -21, 87, -93, -34, -96, -126, 7, -125, -108,\n 11, 64, 47, 93, -110, 127, 23, 51, 110, -36, 88, 110, -30, -107, 104, 11, -14, 117, 108, 57, 36, 98, -54, -107, 47,\n 115, -10, 59, -103, -14, -50, -88, -103, 19, 111, -18, 108, -6, 52, 106, -114, 103, 35, 35, 61, 44, 88, 113, -22, -40,\n 67, 7, -45, -82, 93, 90, 54, 110, -84, -97, -53, -22, 20, 124, -72, 46, -21, -107, 95, 121, -25, 46, 110, -4, 35,\n -28, -32, -96, -59, -34, 62, -18, -4, 57, 116, -73, 69, -101, 107, 117, 61, 90, 109, 88, -33, -47, -73, 115, -1, -115,\n 80, -7, -14, -18, -30, -57, -109, 127, 74, 61, -26, -21, -49, -84, -49, -13, -116, 90, -2, 125, -22, -43, -32, 9, -78,\n -121, 111, -1, 62, -2, -20, 9, -81, -37, -51, -98, 50, 63, -128, -98, 81, 54, 31, 125, 1, 26, 120, 32, -126, -70,\n -127, 87, 95, 123, 12, 38, -8, 32, 122, -12, 17, 24, 30, -124, 21, 90, 120, -31, 80, 11, 74, -73, 31, -122, 29,\n -54, 68, -44, -124, 5, 122, 56, 34, -119, 24, -14, -41, 90, 91, -124, -107, -72, -30, 76, 3, -122, -8, 31, -117, 49,\n -54, 120, -33, -119, 20, -78, 53, -35, -116, 57, 70, 4, -2, 98, -120, 14, -22, -8, 35, -112, -114, -115, 53, -105, 118,\n -46, -111, 68, 91, -112, 51, -14, 56, -95, -113, 73, 58, -7, 100, -118, 72, -99, 85, 36, 92, 91, 53, 9, 37, -115,\n 18, 46, -88, 34, -106, 93, 122, -23, 25, 90, 55, -79, 116, 37, 83, 86, 126, 57, -94, 124, 116, 33, 121, 38, -101,\n 109, -34, 69, -100, 107, -116, -103, -23, -90, -123, 105, -90, 69, 38, -99, 121, -22, 25, -38, 98, 86, -30, -71, -25, 113,\n 75, -34, 9, 40, -95, -123, -42, -87, -103, -95, 7, 10, -54, 85, -94, -115, 58, -118, -33, 89, -113, 2, -72, 40, 118,\n -110, 90, 122, 41, 116, -122, 97, 106, 31, -91, -110, -123, -71, 41, -88, -95, 50, 39, -26, -97, -24, 53, -28, -98, -88,\n -28, 117, -118, 34, -107, -87, -70, -22, -88, 104, 44, 25, -39, 82, 122, -81, -114, 87, 91, -91, -74, -22, 42, -23, -100,\n -2, -91, 52, 38, -100, -69, 58, 71, 106, -91, -91, 10, 123, -84, -116, 82, 25, 91, 24, -118, -56, 102, -86, 16, 75,\n -40, 5, -21, 44, -75, 94, 42, 123, 35, 125, -53, 86, 91, 37, -83, -64, -111, -43, -22, -74, -31, 62, 25, -87, -81,\n -80, -119, 27, 104, -73, -4, 77, 123, 46, -69, 57, 106, 58, 28, -71, -19, 26, -105, 110, -82, -14, -38, -85, 35, -72,\n 113, 53, 123, 47, 110, -55, -43, -92, 45, -65, 1, -17, -87, -34, -111, 2, -9, -2, -5, 29, 89, 6, 43, -84, -85,\n -97, 11, -53, -26, -81, 77, 14, 75, 28, -22, -112, 19, -57, 22, 109, -62, 22, 107, 12, -85, 73, 0, 111, -36, 84,\n 84, -33, 126, 60, 50, -95, 21, -109, 124, 89, -56, 54, 121, 124, 50, -53, -121, 10, -41, -14, 95, 86, 65, 108, 35,\n -52, 53, -113, -37, -80, -51, 111, 30, -119, 112, -57, 57, -5, 124, -77, 104, 63, -65, -7, 26, -49, 61, 11, 125, -12,\n -113, -21, 34, -99, -105, -117, -3, 45, -3, 52, -44, -37, -38, -23, 116, -44, 85, 91, -3, 106, -104, 70, -83, 124, 53,\n -41, 93, 39, 61, -104, -42, 94, -117, 61, -74, -95, -109, -115, -74, 53, -39, 105, -85, -99, -96, -39, 25, -81, -3, 54,\n -36, 73, -18, -25, 109, -60, 113, -37, 125, 119, -78, -45, -3, -117, 55, -33, 125, -93, 73, 55, 85, 104, -5, 61, 56,\n -31, -90, 17, -35, -79, -32, -123, 43, -66, -72, -100, -121, 35, -60, 56, -28, -111, -33, 90, -76, -71, -110, 91, 126, 121,\n 110, -47, 18, 53, -45, -102, -104, 123, -2, -71, 110, 41, 87, 126, -111, -52, -7, -126, 126, 58, -22, -24, 77, 71, 52,\n -125, -76, 38, -98, 58, -20, -96, 59, -2, -85, -46, -79, -37, 126, 59, 84, -23, 117, -114, 59, -17, -67, -73, 71, -69,\n 92, -81, -5, 62, 124, -22, -91, 3, -1, 43, -15, -55, 43, 111, 86, -23, -34, -115, -71, 60, -12, -47, 59, 83, -124,\n -85, -73, -75, 75, 127, 61, -15, -70, 3, 110, 61, -10, -35, -13, -98, 30, 66, 92, 122, 63, -66, -14, -69, -109, 127,\n 126, -10, -74, -95, -65, 126, -7, -36, -77, -1, 62, -4, -15, -53, 63, 63, -3, -11, -37, 127, 63, -2, -7, -21, -65,\n 63, -1, -3, -81, 24, 16, 0, 0, 59\n };\n}", "public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}", "@DirtiesDatabase\n\t@Test\n\tpublic void testGetImageMapProduct() {\n\t\tProduct product = createProduct();\n\t\t\n\t\tImageMap imageMap = service.getImageMap(product);\n\t\tSet<String> imageKeys = imageMap.getImageKeys();\n\t\tassertEquals(\"There should be 3 image keys\", 3, imageKeys.size());\n\t\tassertEquals(\"There should be 3 keys for English\", 3, imageMap.getImageKeys(Locale.ENGLISH).size());\n\t\tassertEquals(\"There should be 3 keys for English Canadian\", 3, imageMap.getImageKeys(new Locale(\"en\", \"CA\")).size());\n\t\tassertEquals(\"There should be 2 keys for French Canadian\", 2, imageMap.getImageKeys(Locale.CANADA_FRENCH).size());\n\t\tassertEquals(\"There should be 1 key for other languages\", 1, imageMap.getImageKeys(Locale.GERMAN).size());\n\t\t\n\t\tassertTrue(\"There should be images for English\", imageMap.hasImages(Locale.ENGLISH));\n\t\tassertTrue(\"There should be images for French Canadian\", imageMap.hasImages(Locale.CANADA_FRENCH));\n\t\tassertTrue(\"There should be images for even German, since we do have a default image!\", imageMap.hasImages(Locale.GERMAN));\n\t\t\n\t\tassertEquals(\"The image for the thumbnail should point to thumbnail.jpg\", \"thumbnail.jpg\", imageMap.getImagePath(\"thumbnail\", Locale.ENGLISH));\n\n\t\tassertEquals(\"There should be a default image\", \"defaultImage.jpg\", imageMap.getImagePath(\"defaultImage\", Locale.ENGLISH));\n\t\tassertEquals(\"The english image should be found\", \"mainImage.jpg\", imageMap.getImagePath(\"mainImage\", Locale.ENGLISH));\n\t\tassertEquals(\"The more specific image should be found\", \"mainImageCanada.jpg\", imageMap.getImagePath(\"mainImage\", new Locale(\"en\", \"CA\")));\n\t\tassertEquals(\"There should be fallback if an image doesn't exist for a specific locale/country\", \"mainImage.jpg\",\n\t\t\t\timageMap.getImagePath(\"mainImage\", new Locale(\"en\", \"AU\")));\n\t}", "public Bitmap getFinalShapesImage();", "public String getStaticPicture();", "public static Map<Integer,Planet> getPlanetsByOrder() { return planetsByOrder; }", "public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }", "private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}", "public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }", "public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}", "private void createImageFiles() {\n\t\tswitchIconClosed = Icon.createImageIcon(\"/images/events/switchImageClosed.png\");\n\t\tswitchIconOpen = Icon.createImageIcon(\"/images/events/switchImageOpen.png\");\n\t\tswitchIconEmpty = Icon.createImageIcon(\"/images/events/switchImageEmpty.png\");\n\t\tswitchIconOff = Icon.createImageIcon(\"/images/events/switchImageOff.png\");\n\t\tswitchIconOn = Icon.createImageIcon(\"/images/events/switchImageOn.png\");\n\t\tleverIconClean = Icon.createImageIcon(\"/images/events/leverImageClean.png\");\n\t\tleverIconRusty = Icon.createImageIcon(\"/images/events/leverImageRusty.png\");\n\t\tleverIconOn = Icon.createImageIcon(\"/images/events/leverImageOn.png\");\n\t}", "private TileType[][] imageToWorld(BufferedImage image) {\n if (image == null) {\n return null;\n }\n\n width = image.getWidth();\n height = image.getHeight();\n int[] rgbWorld = image.getRGB(0, 0, width, height, null, 0, width);\n\n TileType[][] tileWorld = new TileType[width][height];\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int index = twoDimIndexToOneDimIndex(x, y);\n tileWorld[x][y] = TileType.rgbColorToTile(rgbWorld[index]);\n if (tileWorld[x][y] == TileType.UNKNOWN) {\n System.err.println(\"Locaetion: \" + index + \" (\" + x + \",\" + y + \")\");\n }\n }\n }\n return tileWorld;\n }", "Map<String, ISensor> getSensorMap();", "public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }", "public String getImg(){\n switch(image){\n case 0: // Case 0: Ant looks up/north\n return \"imgs/ant_n.png\";\n case 1: // Case 1: Ant looks right/east\n return \"imgs/ant_e.png\";\n case 2: // Case 2: Ant looks down/south\n return \"imgs/ant_s.png\";\n case 3: // Case 3: Ant looks left/west\n return \"imgs/ant_w.png\";\n default: // Default: This shouldn't happen on a normal run. It returns an empty string and prints an error.\n System.err.println(\"Something went wrong while the ant was trying change direction\");\n return \"\";\n }\n }", "public static BufferedImage[] cutMapaImage(String name, int X, int Y) {\n BufferedImage[] sprites = null;\n try {\n BufferedImage imagen = ImageIO.read(new File(CanvasMap.class.getClassLoader().getResource(name).getFile()));\n final int filas = imagen.getHeight() / X;\n final int columnas = imagen.getWidth() / Y;\n sprites = new BufferedImage[filas * columnas];\n\n for (int i = 0; i < filas; i++) {\n for (int j = 0; j < columnas; j++) {\n sprites[(i * columnas) + j] = imagen.getSubimage(j * X, i * Y, X, Y);\n Image img = sprites[(i * columnas) + j].getScaledInstance(tamX, tamY, BufferedImage.SCALE_DEFAULT);\n sprites[(i * columnas) + j] = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n Graphics2D g = (Graphics2D) sprites[(i * columnas) + j].getGraphics();\n g.drawImage(img, 0, 0, null);\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(CanvasMap.class.getName()).log(Level.SEVERE, null, ex);\n }\n return sprites;\n }", "private void setupVariant1TerrainMap() {\n\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-4), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-3), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,-2), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,0), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,2), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,2), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,3), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,3), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,3), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,4), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,4), TerrainKind.FOREST);\n\t}", "@Override\r\n\tpublic Image getImg(int code) {\n\t\treturn seasons[myTime.getDate()[1]][code].getImage();\r\n\t}", "public ImageIcon getSkyIcon(JSONObject j) throws IOException, JSONException{\n BufferedImage img = Utilities.getImage(j.getString(\"icon\") + \"-small.png\");\n ImageIcon icon = new ImageIcon(img);\n return icon;\n }", "public StoneSummon() {\n// ArrayList<BufferedImage> images = SprssssssaasssssaddddddddwiteUtils.loadImages(\"\"\n createStones();\n\n }", "public void setImageGenResults(HashMap<String, View> viewMap, HashMap<String, Bitmap> imageMap) {\n if (map != null) {\n// calling addImages is faster as separate addImage calls for each bitmap.\n map.addImages(imageMap);\n }\n// need to store reference to views to be able to use them as hitboxes for click events.\n this.viewMap = viewMap;\n\n }", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}" ]
[ "0.7582287", "0.6576866", "0.6256235", "0.62015486", "0.6138476", "0.6056112", "0.59021246", "0.5829083", "0.5820949", "0.58013487", "0.5776634", "0.574486", "0.5710069", "0.5652389", "0.56278914", "0.56095576", "0.5598995", "0.55482787", "0.5538197", "0.55169725", "0.547134", "0.54687005", "0.5453821", "0.5427855", "0.54061943", "0.5396845", "0.5390567", "0.5385912", "0.53850764", "0.53817934", "0.5365664", "0.5364928", "0.53560424", "0.5354067", "0.532582", "0.5321302", "0.5310895", "0.5299483", "0.5285924", "0.52851486", "0.5276019", "0.5274723", "0.52737516", "0.52716506", "0.5265914", "0.52435845", "0.522673", "0.52262825", "0.5221057", "0.5214181", "0.5210286", "0.51975125", "0.5195448", "0.51908827", "0.5190148", "0.518644", "0.51816744", "0.5171228", "0.5169598", "0.5163082", "0.51627225", "0.51608074", "0.5158376", "0.5158375", "0.5156019", "0.5139485", "0.51392275", "0.51357555", "0.51335627", "0.5126575", "0.51263994", "0.5118888", "0.51160425", "0.5112697", "0.5110037", "0.5105728", "0.5105553", "0.50986904", "0.50936055", "0.5086894", "0.50843287", "0.5073915", "0.5071918", "0.5069302", "0.5059521", "0.5054744", "0.50543386", "0.5052777", "0.50498706", "0.5044309", "0.5043289", "0.50376594", "0.50339776", "0.5031371", "0.5016354", "0.5014064", "0.50105387", "0.50098217", "0.5007636", "0.50045776" ]
0.81037
0
Map of planet (light) images.
public static Map<Planet,ZImage> getLightImages() throws IOException { Map<Planet,ZImage> plImgMap = new HashMap<>(); for( Planet planet: planetList ) { System.out.print("."); BufferedImage bImage = ImageIO.read(new File(planet.getFileLight())); // Store image with some metadata ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.LIGHT_GRAY ); plImgMap.put(planet, zimage); } return plImgMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Map<Planet,ZImage> getDarkImages()\n throws IOException\n {\n Map<Planet,ZImage> plImgMap = new HashMap<>();\n \n for( Planet planet: planetList )\n {\n System.out.print(\".\");\n BufferedImage bImage = ImageIO.read(new File(planet.getFileDark()));\n \n // Store image with some metadata\n ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.BLACK );\n plImgMap.put(planet, zimage);\n }\n \n return plImgMap;\n }", "public List<ImageResourceWrapper> getMap() {\n // Declare a new list to hold the rendering info for the physics objects.\n List<ImageResourceWrapper> rtrnResources = new ArrayList<>();\n for(PhysicsEntity physicsEntity : this.physModel.getEntities()) {\n // Get the graphics entity corresponding to the current physics entity.\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(physicsEntity.getId());\n String imgResource = graphicsEntity.getImgResId(physicsEntity.getOrientation());\n rtrnResources.add(new ImageResourceWrapper(new Point(physicsEntity.getPosition().x, physicsEntity.getPosition().y), imgResource));\n }\n for(Objective objective : this.gameStateModel.getObjectives()) {\n GraphicsEntity graphicsEntity = this.graphModel.getEntityByID(objective.getId());\n // TODO: Orientation for objectives\n String imgResource = graphicsEntity.getImgResId(0);\n rtrnResources.add(new ImageResourceWrapper(new Point(objective.getPosition().x, objective.getPosition().y), imgResource));\n }\n return rtrnResources;\n }", "private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}", "protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearImgs.readDirectory(new File(Objects.requireNonNull(classLoader.getResource(\"assets/gear-tiles\")).getPath()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n for (i = 0; i < GEARTILES; i++) {\n list.add(new Location(LocationType.GEAR).withImg(gearImgs.popImg()));\n }\n list.get((int)(Math.random()*list.size())).toggleStartingLoc();\n\n Image waterImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-tile.jpg\")).toString());\n for (i = 0; i < WATERTILES; i++) {\n list.add(new Location(LocationType.WELL).withImg(waterImg));\n }\n\n Image waterFakeImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-fake-tile.jpg\")).toString());\n for (i = 0; i < WATERFAKETILES; i++) {\n list.add(new Location(LocationType.MIRAGE).withImg(waterFakeImg));\n }\n\n //TODO: Finish images\n for (i = 0; i < LANDINGPADTILES; i++) {\n list.add(new Location(LocationType.LANDINGPAD).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/landing-pad.jpg\")).toString())));\n }\n for (i = 0; i < TUNNELTILES; i++) {\n list.add(new Location(LocationType.TUNNEL).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/tunnel.jpg\")).toString())));\n }\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-LR.jpg\")).toString())));\n\n return list;\n }", "WorldImage getImage();", "private static BufferedImage getMap(int art, GameModel gameModel, Color mapC, Color skyC){\n\n BufferedImage image = new BufferedImage(2800,1800,BufferedImage.TYPE_4BYTE_ABGR);\n\n int genauigkeit = 400;\n\n int[] mapX = new int[genauigkeit + 2];\n int[] mapY = new int[genauigkeit + 2];\n\n mapX[genauigkeit + 1] = 0;\n mapX[genauigkeit] = GameLoop.imgW;\n\n mapY[genauigkeit + 1] = GameLoop.imgH;\n mapY[genauigkeit] = GameLoop.imgH;\n\n double[] rnd = new double[8];\n\n for(int i = 0;i < 4;i++){\n rnd[i] = Math.random() * 0.1;\n rnd[i+4] = Math.random();\n }\n\n for(int i = 0;i < genauigkeit;i++){\n mapX[i] = (int) (GameLoop.imgW/(double)genauigkeit * (i));\n\n switch(art){\n case 1:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/8);\n break;\n case 2:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.01) * gameModel.getHeight()/8);\n break;\n case 3:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/12 + i);\n break;\n case 4:\n mapY[i] = (int) (gameModel.getHeight()*0.8 - 1/(2000 + Math.pow(i - (genauigkeit - 2)/2.0,2)) * 1500000);\n break;\n case 5:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.pow(Math.sin(i * 0.03),3) * gameModel.getHeight()/4);\n break;\n case 6:\n mapY[i] = (int) (gameModel.getHeight()/2.0);\n mapY[i] += Math.sin(i * (rnd[0])) * rnd[4] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[1])) * rnd[5] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[2])) * rnd[6] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[3])) * rnd[7] * gameModel.getHeight()*0.1;\n\n\n\n\n\n }\n\n }\n\n Polygon map = new Polygon(mapX,mapY,genauigkeit+2);\n\n Graphics2D g2d = image.createGraphics();\n\n g2d.setColor(skyC);\n\n g2d.fillRect(0,0,2800,1800);\n\n g2d.setColor(mapC);\n\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n g2d.fillPolygon(map);\n\n return image;\n }", "public MapGen()//Collect images, create Platform list, create grassy array and generate a random integer as the map wideness\n\t{\n\t\tblocksWide= ThreadLocalRandom.current().nextInt(32, 64 + 1);\n\t\tclouds=kit.getImage(\"Resources/SkyBackground.jpg\");\n\t\tdirt=kit.getImage(\"Resources/Dirt.png\");\n\t\tgrass[0]=kit.getImage(\"Resources/Grass.png\");\n\t\tgrass[1]=kit.getImage(\"Resources/Grass1.png\");\n\t\tgrass[2]=kit.getImage(\"Resources/Grass2.png\");\n\t\tplatforms=new ArrayList<Platform>();\n\t\tgrassy=new int[blocksWide];\n\t\tgrassT=new int[blocksWide];\n\t\tgenerateTerrain();\n\t\t\n\t\t\n\t\t\n\t}", "private ImageMappings() {}", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "@Override\n\tprotected void generateMap() {\n\t\t//read map from tmx\n\t\tmap = null;\n\t\tfinal String tmx = \"res/tiles/map.tmx\";\n\t\ttry {\n\t\t\tTMXMapReader mapReader = new TMXMapReader();\n\t\t\tmap = mapReader.readMap(tmx);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tTileLayer layer = (TileLayer)map.getLayer(0);\n\n\t\ttiles = new PropertyTile[layer.getWidth()][layer.getHeight()];\n\t\tfor(int x=0; x<layer.getWidth(); x++) {\n\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n\t\t\t\tTile tile = layer.getTileAt(x, y);\n\t\t\t\tString type = (String)tile.getProperties().get(\"type\");\n\t\t\t\ttiles[x][y] = new PropertyTile(tile, TileType.valueOf(type.toUpperCase()));\n\t\t\t\ttiles[x][y].setImage(tile.getImage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//generate animated tiles from river tileset\n\t\tTileSet riverset = map.getTileSets().get(1);\n\t\tList<AnimatedTile> animatedTiles = new ArrayList<>();\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tTile[] frames = new Tile[3];\n\t\t\tIterator<Tile> iterator = riverset.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tTile tile = iterator.next();\n\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n\t\t\t\tint frame = Integer.parseInt(tile.getProperties().getProperty(\"frame\"));\n\t\t\t\tif(rtile == i+1) {\n\t\t\t\t\tframes[frame-1] = tile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tAnimatedTile aTile = new AnimatedTile(frames);\n\t\t\tanimatedTiles.add(aTile);\n\t\t}\n\n\t\t//replace tiles in map with animated tiles\n//\t\tfor(int x=0; x<layer.getWidth(); x++) {\n//\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n//\t\t\t\tTile tile = layer.getTileAt(x, y);\n//\t\t\t\tif(tile.getProperties().containsKey(\"animated\")) {\n//\t\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n//\t\t\t\t\tlayer.setTileAt(x, y, animatedTiles.get(rtile-1));\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}", "public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "public final ImageMap getImageMap() {\n return this.imageMap;\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "private void setupDefaultTerrainMap() {\n defaultTerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SMALL_FISHERY);\n\n defaultTerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n \t \tdefaultTerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t}", "public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }", "public Map<String, Planet> getPlanets(){\n\t\treturn galaxy;\n\t}", "public List<MapImage> convertMetdataToMapImages(PreparedQuery trackedMetadata) {\n List<MapImage> formLocationOptions = new ArrayList<>();\n for (Entity entity : trackedMetadata.asIterable()) {\n String location = (String) entity.getProperty(\"cityName\");\n double latitude = (double) entity.getProperty(\"latitude\");\n double longitude = (double) entity.getProperty(\"longitude\");\n\n formLocationOptions.add(new MapImage(latitude, longitude, location));\n }\n return formLocationOptions;\n }", "public HashMap<String,Image> getIcons(){\n\t\treturn iconMap;\n\t}", "public JQImageMap getImageMap()\n {\n return imageMap;\n }", "private void createNodesMaps()\n {\n Maze maze = gameState.getMazeState().getMaze();\n\n for (Node node : maze.getNodes()) {\n pixelsNodes.put(nodeToPixelIndex(node), node);\n }\n\n for (Node node : maze.getPillsNodes()) {\n pixelsPillNodes.put(nodeToPixelIndex(node), node);\n }\n\n for (Node node : maze.getPowerPillsNodes()) {\n pixelsPowerPillNodes.put(nodeToPixelIndex(node), node);\n }\n }", "public static void load(){\n\t\trobot=new BufferedImage[5];\n\t\ttry {\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\trobot[i]=ImageIO.read(new File(\"robot\" + i +\".png\"));\n\t\t\t\n\t\t\tminiRobot=ImageIO.read(new File(\"miniRobot.png\"));\n\t\t\toil=ImageIO.read(new File(\"oil.png\"));\n\t\t\tslime=ImageIO.read(new File(\"slime.png\"));\n\t\t\tmap=ImageIO.read(new File(\"map.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Failed to load images\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private void createMapOfFourthType() {\n\n this.typeOfMap=4;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.PURPLE, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n }", "interface WorldmapBuffer2 {\n final static byte[] image2 = {\n -125, 47, -3, 77, 51, 29, -45, -103, -120, 119, 76, -122, -82, -22, -106, 61, 113, 4, -59, 124, -116, 59, 115, -26, -44,\n 56, -115, 34, 106, -124, 98, 83, -115, 70, 9, -67, -116, 99, 92, -127, 89, -23, -68, -11, -41, 72, -15, -68, -48, 4,\n 29, 85, -30, 4, -79, -56, -20, 126, 69, 119, -119, -115, -116, 60, -37, -53, -107, 68, 90, -45, 79, -99, 108, 109, 45,\n 84, -65, -93, -44, -79, -23, -40, 23, -40, -48, 98, -92, -50, 125, -104, -52, -58, 50, -97, -119, 13, -78, -81, 82, -86,\n 15, -71, -92, 77, -115, -48, 48, 77, -88, 6, 61, 104, -117, -51, 103, -90, 5, -71, -52, 42, 76, -68, 113, 79, -7,\n 43, -42, -84, 38, -56, -100, 93, -44, 34, 71, -113, 100, -116, 64, 42, 88, -40, 94, 93, -83, -118, -115, 99, -32, -27,\n 72, -26, 43, -104, 35, 7, 37, 101, 12, -66, 107, -104, -128, -106, -116, 54, -93, -83, -119, -50, 23, -47, -117, 39, 89,\n 6, -9, 41, 47, 10, -37, -124, -2, 115, -40, -55, -67, -37, -118, -118, 92, 108, 24, -41, 35, -43, -61, 45, 44, 118,\n 87, 92, 70, -14, 108, -37, -22, -106, -41, -127, 124, -92, -70, -99, -42, 22, -38, 106, 43, -8, -84, -97, -99, -39, -48,\n -6, -62, 78, -10, -98, -38, 109, -98, -23, -87, -45, 112, -67, 73, 42, 21, 99, -25, 109, -40, -21, 10, 120, -88, -110,\n -99, 105, -37, -97, 68, -70, -112, 15, 54, -99, 111, 77, 37, 108, 52, -33, 113, 93, 59, -33, 56, -78, 124, -85, 42,\n 107, -3, -54, -94, 29, -37, 97, -53, -54, -24, 8, -113, -18, 45, 108, 61, 122, -124, 19, 102, 118, -65, -14, -31, 32,\n 30, -30, -8, 35, -40, 102, -106, -109, -33, -115, -58, -27, 38, -37, 43, 88, 106, -11, -104, -51, -16, 11, -39, 116, 24,\n -123, -48, -6, 107, 73, -39, -31, -107, 109, -98, 85, -36, 39, 115, 61, -37, -33, 53, -61, -49, 103, -119, -73, 84, -35,\n -64, -6, 97, -72, -85, -98, -94, 58, -33, 127, 77, -34, 96, 90, -127, 58, -22, -118, -61, -83, 58, 96, 59, 95, 27,\n 11, -29, -123, 76, 79, -108, 11, -48, -35, -100, -40, 82, 4, 97, 57, -18, -36, -63, -94, -28, -105, -87, -76, -57, -84,\n 122, -13, -40, -60, -37, -6, -28, -105, -42, -34, -105, 76, 61, 59, -2, -27, -103, -125, -76, 111, 39, -39, 118, -88, -119,\n 56, 43, 116, 50, 22, -87, 44, 43, -91, 63, -21, -51, -2, -14, -26, -38, -76, 36, -26, -52, -122, -26, 100, -61, -75,\n -108, 7, 24, -24, 92, -37, -28, -116, -51, 52, 126, -33, -103, -102, 114, -27, 77, -24, -124, 87, 68, -13, -119, -28, 99,\n -71, -33, 25, 88, -49, 120, 41, -24, -125, -82, -62, 102, -25, -49, -119, 25, -82, 111, 38, 63, -52, 76, 26, 81, 71,\n 118, -115, 39, 125, -58, -94, -26, 29, -109, -25, -4, -92, -80, 43, -42, -83, -108, -66, -86, -65, 43, -25, 19, 70, -23,\n -80, -68, -54, -72, -3, -43, 32, -117, -93, 102, -93, 27, -29, -77, 56, -70, -38, -34, 27, -67, -94, 52, -75, -119, -73,\n -5, -45, 58, 120, -48, 107, 125, -112, 109, -84, -25, 40, 78, -21, -8, 69, -27, -117, -36, 108, 57, 93, -114, 52, 120,\n -32, 100, 68, -48, -51, 65, -35, -42, 78, 82, 58, -88, 96, -121, 126, -39, 104, 34, -123, -6, 9, 66, -35, 40, 107,\n 66, -120, -65, 127, -125, -19, -75, 6, 122, -30, -21, -74, 42, 126, -121, 2, 3, -19, 22, 20, 53, 85, 89, 61, -21,\n -25, -95, 94, 18, -18, -35, 70, -101, 33, 10, -80, 18, 35, 94, 99, -98, -18, 40, -66, 87, 54, -18, -23, -36, 107,\n -24, 8, 47, -28, -113, -61, -87, -20, -98, -19, -71, 45, -35, -128, -82, -80, -23, -121, -38, 99, -117, -70, 7, 104, -20,\n 52, 122, -18, 76, -115, -40, 36, -6, -16, 88, -59, -72, 127, -58, -111, 59, 126, -2, 82, -17, -68, -49, -18, -63, -118,\n 111, -109, -33, 120, -118, -50, -52, 52, -29, -121, -2, -62, 126, 26, -124, -46, -18, -112, -115, 92, -65, 117, 125, -16, -74,\n 74, 90, -9, 27, -61, 0, 111, 110, 2, -72, -125, -102, 30, 22, 42, -33, 115, 23, -6, -24, 124, -102, -57, -16, 78,\n -62, 76, -119, 91, -48, -87, -65, -71, 126, -118, -123, -89, -18, -31, -92, -13, -95, -68, -35, -63, -100, 55, 88, -68, -47,\n -69, 55, -12, 99, 33, -16, -34, -22, -63, 66, 78, -11, -93, 78, 66, 17, 12, -75, -115, 6, -109, 34, 9, 114, -108,\n -72, -103, 8, -76, 112, 58, 126, -16, -74, -34, 102, 29, -56, -64, 88, 103, 123, -91, 100, 55, 61, -55, -50, 59, -33,\n -22, 90, 55, -90, -106, -3, -20, -79, -35, 53, -112, -2, -47, 49, -114, -23, 30, 95, -16, 25, 70, -17, 75, 53, -9,\n -38, 73, 109, 53, 38, -10, 106, -102, 55, -17, -31, 76, -26, -6, -128, -110, -1, -44, 25, 7, -56, 86, -56, -9, -6,\n 9, -10, -57, -66, -20, 5, 125, -8, 106, -83, -8, -1, -89, -13, -114, 31, -97, -88, -120, 75, -21, 42, -22, -19, -111,\n 101, -117, 107, -30, -71, 121, -11, -99, 23, 88, -68, -8, -88, -85, 25, -128, 72, 47, -95, -122, -125, -87, 50, -82, 50,\n -14, -34, -92, 112, 102, -29, -87, -113, -106, -64, -18, 108, 26, 107, 32, 69, -37, 120, 10, -113, 118, -20, -2, 38, -46,\n 93, -116, -63, 23, 126, -19, 25, -55, -113, -95, -99, 121, -55, 106, -122, 29, 72, -32, 117, 103, -106, 86, -52, 104, -37,\n 15, -14, -122, -27, -33, 77, 79, 96, 4, 27, 34, -87, -6, 69, -69, -69, -93, 113, 3, -49, 69, -75, 56, 101, 106,\n 78, 57, 62, -15, -16, 92, -8, -63, -114, -48, -59, -82, 95, 52, 116, 108, 104, 11, -69, 78, 6, 16, 1, 4, 14,\n 36, 88, -48, -32, 65, -124, 9, 21, 46, 100, 56, 80, 0, 0, 1, 7, 35, 10, -96, 8, 49, 98, -61, -126, 15,\n 1, 108, -28, -40, -47, -29, 71, -112, 33, 69, -114, 36, 89, -46, -28, 73, -108, 41, 47, 98, 76, -88, 113, 100, -59,\n -115, 43, 9, -62, -20, 72, 49, -128, 77, -121, 11, 93, -106, -92, 72, 83, -92, -52, -101, 61, 29, -6, -12, -120, 51,\n -88, -48, -116, 10, -127, 74, 100, 57, 115, 105, 83, -88, 45, -97, 10, -20, 57, 53, 42, 84, -93, 59, 85, 62, 20,\n -86, 53, -27, 87, -80, 97, -59, -114, 37, 91, -42, 108, 88, -85, 87, -43, -82, 101, -120, 52, -93, 70, -93, 87, -67,\n -98, -91, 91, -41, -82, -39, -86, 108, -25, 22, -35, 25, 119, -24, -57, -117, 50, -105, 86, 37, 10, 56, 110, -31, -102,\n 84, -111, 30, -2, -23, 23, -95, 85, -57, 65, 115, 98, -115, -52, 118, 109, 86, -73, -106, -43, 10, 30, -37, -109, 35,\n -30, -69, -2, -95, 69, -113, 38, 93, 58, 100, 90, -51, -87, 85, 27, -52, -85, 23, -76, 105, -40, -79, -47, 14, 69,\n -51, 122, 47, 95, -61, -84, 1, 83, 117, 74, -8, -90, 83, -117, 46, 43, 7, -83, 73, 24, -13, -17, -103, -89, 99,\n 54, -100, -24, -72, -7, 98, -29, -61, 21, -41, 94, -51, 50, 115, 117, -21, -103, 111, -13, -12, 44, -37, -5, 119, -16,\n -31, 65, 82, -57, 94, -34, -68, -50, -18, -30, -43, -81, 79, 60, 25, -29, -21, -94, 55, 79, -21, 110, -1, -5, -16,\n 68, -38, -48, -87, -73, 126, 59, 84, -30, 120, -72, -104, -29, -115, 53, -34, -116, -21, -17, 49, -14, -50, 83, -80, 41,\n -56, -2, -21, 108, 34, -10, 34, -108, 112, 66, -80, 18, 92, -16, -62, -43, -46, -93, 112, 67, -39, 4, -77, 78, 37,\n -86, 78, 3, -118, -90, -107, 112, 10, 44, -90, -86, -118, -77, -112, -71, 18, 31, -37, 77, -70, -57, -108, -102, 46, 58,\n 4, 49, -76, -47, -75, -89, 42, -37, -114, 39, -30, 56, -12, -15, 71, 9, 87, -68, 113, 72, -84, -128, 52, 114, 52,\n 15, -33, -5, -22, -60, -58, 104, 91, 14, 57, -59, -28, -5, -52, 64, 5, 3, 67, 48, -66, -53, 90, -126, 18, 61,\n 24, -119, -12, 50, -71, 39, -35, 123, -85, -84, 18, -113, 52, -13, 76, -46, -124, -4, 114, 77, 7, -47, 116, -77, -77,\n -103, 62, 4, 81, -54, -105, 66, -2, -124, 9, 63, -121, 32, -30, 107, -56, -25, -24, -29, 75, -51, 40, 9, -108, -18,\n 58, 54, 11, 5, 46, -52, -93, 108, -61, 11, -52, 55, 27, 117, 116, 73, 67, 35, 109, -53, -90, 29, 31, -75, 52,\n -52, 4, 43, 125, -47, 36, 38, -21, -53, 19, 75, 27, -97, -93, -76, 83, 80, 47, 27, 49, 63, 26, 37, 85, -107,\n -50, 39, 73, 100, -108, -52, 87, 47, -107, 117, 86, 64, 87, 93, -112, 43, -8, 102, -75, -76, 69, 37, -105, -52, -75,\n -43, -15, 14, 45, -11, -42, 1, 41, 101, 117, 79, -53, -4, 66, -83, 86, 91, 85, 35, -86, -71, 97, 53, -27, 49,\n 68, 93, -85, -107, -107, -39, 102, -85, -85, 8, 66, 107, -83, 53, -111, 65, -76, 78, -30, 118, -73, -93, -126, -67, 49,\n 48, -63, -74, -61, -42, 63, 49, 109, 91, 55, -37, -88, -26, 42, 108, -80, -77, -54, -20, -10, -34, 55, -33, -123, 87,\n -77, -82, -16, -11, 118, 75, -99, 68, 51, -18, 37, 19, -5, -22, -46, -39, -106, -22, -20, 109, -77, 1, -37, 117, 120,\n -33, 42, 81, 26, 76, -38, -97, 62, -11, -9, -30, 35, -7, -125, -40, 75, 13, 49, -34, 21, -32, -124, -21, -30, -17,\n -41, -32, -114, -123, -24, 92, -91, 42, 30, 89, -56, -26, -100, -118, 113, -29, 80, -59, 45, -40, 100, 72, -87, -11, -8,\n 102, 31, -11, -123, -103, 50, -118, 113, -34, -48, 74, -26, -2, 66, 51, -111, 83, 81, -55, 13, 85, 42, 17, -91, 34,\n 15, -49, -55, -46, -43, 121, -25, -128, -125, 123, -115, -79, 37, 17, -19, -39, 103, -84, -45, -124, -102, -29, -85, -77, -114,\n -80, -27, -74, -46, 36, -103, -44, -8, 8, -115, 55, 58, -115, 37, -14, -86, 54, -77, 103, 76, 21, 74, -96, -73, -66,\n 80, -39, -67, 56, -37, 74, 89, -81, -13, 86, -17, 105, -71, 83, -42, -37, -51, 59, -89, -22, -72, 49, -76, 83, 28,\n 79, 102, -102, -91, 62, 85, 109, -76, -109, 114, 92, 41, -31, 14, -114, 44, -45, -103, -5, 38, 114, -22, -116, 36, 6,\n 57, -15, -65, 59, 23, -38, 114, 12, -69, -10, -4, 107, 116, 65, 43, -4, 101, -50, 125, 37, -102, -72, -126, -17, -44,\n -119, 41, 22, 87, 84, -106, 103, 116, 65, -97, 123, -57, 17, 53, 119, 113, 116, -34, -111, -76, -3, -68, -63, 123, -49,\n -8, -74, -74, -75, -76, -7, 59, -83, -26, 125, 29, 118, -32, -29, -52, -82, 70, -105, 127, -41, 107, -38, -52, -87, -9,\n 83, 120, -20, -21, -107, 30, -8, -20, -49, 36, 12, 89, -84, 98, 37, 51, 120, -18, -124, 91, -98, -7, -14, -66, 101,\n 16, 61, -55, 54, -33, 62, 108, -21, -113, 87, 88, -47, -18, -21, 39, -117, 111, -23, 73, -74, 95, -68, 17, -45, 94,\n 95, -4, 7, 125, -81, 124, -84, 74, 75, 1, -101, -41, -66, -1, 65, -18, 113, -2, -17, -21, 21, 73, 114, 7, 32,\n -33, 108, -55, 112, -5, -93, -96, -18, 24, -104, -84, 10, 2, 73, 112, 122, 1, 96, 120, -58, -123, 40, 2, 25, 47,\n 125, 28, -20, -115, -1, -16, -73, 49, 105, -107, 14, 64, 74, -109, -110, -24, 50, 88, -65, -30, 93, 48, 106, 47, -4,\n -103, 8, -49, 102, -79, 32, -127, -49, 54, 54, -44, 22, 9, -99, -57, 67, 25, -50, -112, 96, 117, 43, -99, 91, -32,\n 66, 67, 36, 110, 37, -120, -17, 113, 97, 18, 5, 38, -93, 120, 9, 43, 103, 13, 99, 23, 16, 17, 38, 23, -25,\n 64, 113, -119, 65, -69, -33, 4, -115, -24, 68, 48, 90, 112, -117, 109, 10, -29, 122, 96, 4, -88, -2, -3, -120, 105,\n -127, 58, 31, 118, -48, -120, 58, -12, -115, -47, 111, 104, 73, 79, 119, -56, 87, 70, 60, 126, 70, -114, -41, -53, 35,\n 120, -10, -109, -91, -73, 52, -15, 46, -38, -79, -48, -63, -62, 119, -74, 28, 105, 113, -113, 33, -85, -48, -119, -122, -90,\n -89, 62, 70, -46, 92, 123, -44, -97, 36, 69, -74, 52, 64, -70, 103, -126, 14, 20, 100, -46, 2, 37, 59, 55, -54,\n 69, -127, 112, 92, 36, 25, 37, 118, 50, -55, 84, -46, -110, 97, 124, -37, -5, 58, -71, -54, -102, 89, 39, -109, -101,\n -53, -107, 10, -75, -89, 49, -106, -123, -14, -112, -118, -100, 78, 41, -123, 40, 46, 84, 114, 5, -106, -61, -2, 4, 85,\n -23, -74, -9, 74, 98, -118, 107, 82, -2, -5, 95, 1, 43, 22, -56, -15, 49, -82, -112, -70, 124, 30, 47, -87, -24,\n -53, 64, -118, -114, 108, -55, 36, -90, 49, -39, -120, -86, 19, -14, -117, -101, -90, 97, 91, 15, -35, 39, 63, 79, 101,\n 115, -120, 125, -111, -32, 125, 100, -103, -95, -3, 116, 105, -125, -40, 68, -112, 42, -127, 53, 78, 110, 50, -55, 105, -124,\n 10, -25, 101, -16, 89, -102, 114, 102, -24, -100, 127, 25, 86, 8, 55, -103, 21, 20, -127, -19, -102, -67, 108, -29, 21,\n -95, 39, 32, 82, -46, -77, -125, -100, -76, -25, 63, -111, -88, -49, 4, -50, -115, -117, 22, -3, 28, -5, -32, -55, 68,\n -72, 24, -48, 93, -3, 3, 90, -110, 30, 26, 71, 126, 89, -77, 45, -11, -108, 40, -3, 56, -6, -46, 105, 5, 40,\n -93, -38, 58, -35, -18, 96, 42, -78, 81, -102, -109, 65, 1, -35, -52, 96, 60, -54, 56, -121, -94, -76, -95, -46, -108,\n 104, 69, 111, -118, -49, 113, -127, -110, 123, -122, -71, 14, 50, -113, 42, 56, 67, 70, -47, 60, -52, -102, -35, 74, -43,\n 6, 66, 44, 102, 83, -87, -25, 99, -90, 12, 7, 118, 84, -80, 98, -55, 124, 9, -116, 33, 56, 35, 88, 41, -124,\n -122, -11, 126, 59, 36, -42, 84, 119, -7, -55, -91, -111, 52, -99, 88, -20, 42, 68, -83, 122, 32, -41, 64, -52, -87,\n 106, -59, -2, 99, 29, 17, -7, -80, -22, -119, 40, -123, 56, -28, 43, -30, -94, -89, 81, -73, -18, 114, 84, -120, -52,\n 11, 59, 125, -8, 88, -107, 2, -106, 69, 3, 53, -44, 94, 11, 91, 70, 87, 37, 11, 114, 56, 69, -25, 101, -97,\n -7, -61, -48, 29, 112, -89, 11, -107, -86, 98, -26, 90, 90, -122, 49, -47, -118, 92, 2, -19, -86, 44, -21, 89, 86,\n -114, 21, -78, -90, -75, -117, -35, 96, -21, -55, 5, -74, 53, -79, -76, -101, -22, 105, -33, -6, -37, -55, 10, -107, -95,\n 8, 92, -104, -83, 94, 123, 91, 26, 62, 18, -107, -77, -20, -47, 32, 39, 10, -37, 8, -110, 86, -76, 35, -116, -105,\n 69, 122, -21, -37, -103, 114, -87, 86, -109, 107, -36, 112, 89, 42, -87, -29, 34, 55, -125, -117, -63, -18, 123, -98, -69,\n -42, -13, -14, -107, -92, 101, 21, -24, 116, -63, -75, 92, 109, -23, 16, -75, 67, 53, 85, -125, 22, 39, -62, 126, 54,\n 80, -68, 96, -91, 84, 121, -19, 26, 94, -85, -19, 87, -113, 44, 68, -20, 110, -85, 11, -33, 12, -27, 102, 70, -26,\n -67, 43, 77, 103, 87, -94, -74, 25, 49, 82, 0, 22, -16, 11, 63, -120, 45, -27, 58, -105, -80, -73, 21, 41, 101,\n 83, -22, -34, -9, 34, 56, 53, 68, 116, 108, 100, 67, 88, -91, -82, -12, 73, 42, 39, 94, 19, -123, 43, 108, 97,\n 2, -14, -53, -88, -54, 76, 93, -2, 97, 33, 76, 37, -23, 6, -107, -102, 114, 25, 112, 124, -43, 37, 98, 22, -45,\n 119, -86, 107, -116, 104, -114, 67, -9, -30, -53, -6, 68, 95, 20, -34, 38, 116, 91, -85, -74, 42, 69, -39, -97, 64,\n -106, 113, 99, 18, 90, -28, -43, 38, 118, 89, -62, 61, 23, -110, 109, 76, -89, 119, -71, 56, 56, 21, 54, -87, -112,\n 71, 12, -30, 16, -29, -49, 116, -57, -117, -18, -115, 35, -52, 39, -17, 2, 54, -65, -65, -12, -14, 83, 109, -74, 46,\n 49, 35, -7, -66, -11, -116, 42, 112, 117, 124, 96, 42, -69, 6, -126, -60, -5, -22, 105, -25, -20, 48, -19, 112, 57,\n 102, 9, -83, 51, 76, -19, 21, -24, -115, 54, 90, -61, 79, 94, 96, -97, -33, -71, 99, 30, -9, -40, 89, 107, 67,\n -50, -116, -105, 27, -35, 2, -117, 105, -98, 45, 30, 112, -98, 37, -35, 59, 82, 89, 122, -61, -89, 94, 84, 110, -125,\n -20, 97, 81, 98, 58, -45, 88, 77, 22, -114, 33, 44, 22, 34, -93, -84, -75, -119, 84, 117, -83, 19, 99, 106, 86,\n -13, -82, -65, -2, -75, 105, -80, 91, 125, -40, 34, -97, 16, -44, -20, 125, 53, -96, 105, -51, 92, 68, -29, -102, 77,\n -89, -118, 91, 127, 14, 77, -48, 82, 27, -5, -91, -54, 115, -10, 32, 55, -23, -39, 61, -81, -74, -41, 39, 61, 10,\n -124, -77, -37, 109, -66, -31, -46, -108, -70, 27, 119, -84, -2, -93, -73, -27, -97, -10, -44, 92, -64, -42, -10, -24, -28,\n -43, -19, 122, -47, -51, -55, -82, 86, 116, -104, 121, 105, 72, -86, 126, 16, -46, 56, 18, 92, 0, 57, -106, 31, 88,\n 67, -75, 118, -17, -124, -113, -64, -21, 109, -25, 16, -25, -69, -36, 99, -6, 50, -65, -5, -67, 93, 120, -29, 53, -53,\n 13, 46, 49, -102, 59, -53, 41, -74, 74, 57, 64, -110, 115, -77, -94, -109, -13, 43, 79, 63, 92, -110, -78, -69, 100,\n -32, 8, -87, -42, 68, -38, 117, -29, 51, -49, -15, -96, 10, 119, 115, -25, 104, -38, -29, 77, -28, 76, 63, 83, -68,\n -100, 66, -30, 9, -86, 124, -82, -102, -54, -43, 91, 36, -94, 21, -70, 124, -24, -30, 47, -86, 24, 28, -17, 6, -101,\n -8, -101, -108, -34, -116, -50, 13, -68, -22, 57, 109, 107, -87, -49, -54, -22, 64, -47, 102, -12, 122, -77, 28, -28, -127,\n 85, 98, 115, 45, 10, -22, 75, 71, -99, -36, 102, -82, -94, 100, -99, 61, 103, 122, -31, 69, -74, -15, -3, 108, -38,\n -35, 103, 48, -80, -121, 125, -42, 117, -1, 56, -115, -51, -114, -44, -39, 74, 29, -42, -51, 14, -7, -32, 35, -99, -33,\n -72, 79, -102, -18, 124, -49, 41, -78, 77, 70, -17, -68, 3, 6, -77, 123, -97, 15, -39, 99, 41, -64, 127, 110, -105,\n 50, 80, 118, -9, 50, -37, 77, -58, -49, -1, -37, 119, 110, 28, -5, 40, 71, -2, 45, -81, -56, -17, 45, -27, 127,\n 83, -109, -70, -42, 45, -79, -114, 21, 14, -106, -102, 71, -19, -25, -73, -102, -32, -126, 18, -36, -14, -100, -59, 125, -4,\n 52, 14, -78, 71, -85, 8, -14, -87, 63, -39, -22, -11, 102, 105, -41, -13, -111, 46, -58, -62, 118, 31, 105, -49, -40,\n 15, -37, 125, -60, 70, -21, 105, -15, 0, -84, 51, 85, 54, 40, -73, -63, -49, 54, -15, -3, -24, -4, -96, 79, 50,\n -67, -72, 110, -22, -16, -15, -11, -4, -50, -89, -10, -36, 24, -92, 62, 72, 115, 45, -59, -114, -78, 63, -106, -108, -10,\n -23, -29, 29, -82, 58, -17, -13, 55, -24, 56, -98, -114, -73, -65, 117, -48, 111, -125, 49, -11, 75, 63, 2, 84, -69,\n -23, -53, -67, 21, -77, -72, 60, -61, 48, -98, 107, 54, 115, 75, -91, -61, -127, 21, -29, -53, 63, 48, 10, -67, 68,\n -103, 64, -63, 34, -94, -66, -126, -74, -11, -21, 64, -102, -85, 58, 4, 36, -68, 28, -119, 13, -86, -126, -107, 87, 3,\n -101, -1, -117, 63, -13, -93, 64, 97, 107, -67, 20, 124, 56, -86, -30, 64, 63, 99, -69, -22, 107, 63, 44, 3, 24,\n 12, -12, 61, 57, 65, -81, -100, -104, 24, -125, -86, -79, 10, 25, 63, 22, -20, -90, 92, -94, 45, -67, 11, -68, -89,\n -109, 65, -63, 43, 45, 78, 91, 48, -73, -77, -113, 28, 44, -67, -99, -46, 30, 118, -7, 35, 35, 92, -2, 62, 33,\n 28, 66, 34, -52, -88, 21, -76, 36, 111, -14, 64, 26, 52, 64, 49, -52, 36, 78, 115, 39, -54, -118, 66, 49, -46,\n 47, 19, 108, -95, -63, -77, -110, -67, -78, 45, 45, 12, -85, -5, -96, -101, -32, -61, 60, 61, -53, -118, 25, -108, -71,\n -7, -110, 62, -51, -38, 48, 94, -93, 51, -17, 8, -65, 75, 2, 51, 35, -45, 36, 32, -12, -69, 46, -116, 67, -20,\n 57, -88, -121, 73, -101, 68, 20, -64, -57, 57, -93, 1, -36, 67, -43, 106, 47, 63, -28, -68, 57, -30, 31, 53, 20,\n -103, -10, -64, -92, 78, -93, -62, 67, 84, 68, 57, 92, 40, 103, 122, -79, 13, 42, -94, -18, 114, -65, 62, -52, 67,\n 104, 75, 30, -109, 67, -61, -39, -128, 31, 114, 50, 60, 94, 65, -90, -5, 19, 69, 14, -117, -71, -111, 34, -77, 37,\n 116, -65, 37, 43, -64, -24, -117, -107, 112, -21, 13, 10, -39, -113, 14, -15, 68, -14, 90, -108, 71, -60, -59, 10, -86,\n 42, -68, 90, -58, -3, -47, -66, -68, 122, -102, 94, 83, -74, 98, 27, -58, -65, -101, 16, -74, 57, 70, -91, 57, -85,\n -66, -125, -108, 59, 98, 70, 27, 51, -106, -61, -40, 61, 14, -21, -59, -121, -62, 62, 92, 1, -61, 73, -92, -72, -2,\n 113, 18, 13, -110, -59, 89, -44, 69, -40, 113, -86, -42, -127, 70, 113, -20, 30, 3, -55, 57, 83, -76, -75, -82, -93,\n 58, -10, -2, 74, -58, 76, -71, -70, -1, 48, -73, 0, -100, 34, 64, 124, -94, 106, 19, 41, 91, -60, -107, 97, -53,\n 71, 61, 43, 54, -15, -22, -86, -96, 75, 64, 77, -62, 37, -68, 25, 72, -126, 44, 72, 59, -12, -98, -124, 124, 34,\n 40, -84, -74, 19, 107, -56, -104, -80, 8, -120, -84, -77, 17, -108, -69, 97, -62, 57, -24, -24, 69, -95, -29, 51, -117,\n 28, 67, 36, 100, -100, 107, -55, 68, -40, -128, -106, 86, -63, -81, 124, 43, -118, -109, 68, 73, -27, -13, -107, 22, 90,\n -91, -38, -15, -63, 14, 123, 29, -37, -101, 38, -99, 90, 38, -40, -29, -112, 82, -20, 16, 54, -45, -111, 44, -28, -92,\n -98, 100, -75, -60, 107, -92, 79, -127, 69, -42, -29, 21, 44, -117, -89, 39, 52, 74, 62, 84, -62, -85, -94, -88, 91,\n 52, 35, 70, 34, 65, 116, -14, -63, -88, -92, -88, -87, -108, -76, 7, 2, -54, -65, 120, -56, 72, 82, -88, -83, 28,\n 41, 34, -93, 61, -92, 60, 51, -43, 34, 49, 115, 100, 15, -56, 64, -98, 108, -124, -81, 52, -70, -97, 78, 92, -53,\n 70, 83, 58, -65, -93, 13, 0, -6, 58, 124, 100, -54, -89, -61, -56, 22, -87, 63, 38, 100, -57, 36, 52, 47, -105,\n 43, 56, -124, -4, 73, -128, -86, 27, 81, 123, -91, 103, 17, 38, -62, -116, -56, -88, -100, 24, -47, -60, 72, 20, 105,\n 70, 1, -63, 67, 68, -61, -58, -2, 36, -116, 43, -68, 84, -84, 109, -68, -52, -67, 20, 27, -62, 73, 75, 17, -111,\n 60, -84, -4, 76, 47, 76, -85, -61, -76, -113, -127, -109, -90, -15, -6, 61, -32, 83, -97, 30, -92, 58, -114, 99, 27,\n -111, 4, 70, -103, -116, -51, -81, 113, -87, 99, 116, -96, 43, -124, 19, 121, 73, 30, -36, 20, -80, -126, -103, 18, 110,\n -117, 19, -82, -112, -73, -33, 108, 31, -43, 76, 20, -20, 36, -50, -27, -111, 28, -16, -100, -52, -81, 124, 61, 109, 4,\n -114, -37, -100, 15, -41, -13, -52, -15, -87, -51, 41, -103, 78, 50, -13, 38, 47, 26, -55, -23, -79, -80, 50, 59, -61,\n -92, -72, -49, -43, -20, 70, -62, 43, -49, 101, -6, -56, -13, 36, 68, 96, 107, -78, -30, 88, 62, 7, -22, 62, -8,\n -100, 72, -6, 72, 17, 122, -84, -81, -59, 100, -52, 3, -111, 68, -115, 107, 61, -128, -124, 58, -55, -44, -82, -86, 84,\n -93, 24, 27, 80, -84, 43, -55, 122, -31, -114, 79, 75, 80, -22, -84, 67, -30, 26, -49, -25, 121, -48, 26, 26, 78,\n 15, -13, 41, -83, -108, 62, -76, 12, 67, -109, -93, -85, 111, 44, 70, -79, 50, -53, 25, 117, 74, 9, 18, -47, -8,\n 60, -106, -116, -101, 37, 20, 13, -48, 78, 43, 81, -108, 122, -55, 61, 44, -94, 11, 109, 59, 75, -4, 81, 101, 26,\n 80, 2, -11, -53, -74, -44, -47, -3, -46, 16, -29, -116, -2, -63, 14, 109, -63, 78, 123, 63, -6, 11, -46, 25, 108,\n 55, -106, -95, -58, 42, 53, -109, 38, -3, -100, -12, 76, -70, 79, 83, 82, 40, -75, 31, -54, -23, 41, -38, -52, 26,\n -56, -100, 75, 44, -91, -53, 27, 36, 79, 61, 36, 67, 90, -71, -47, -38, 58, 72, 3, -3, -119, 30, 27, -45, 51,\n 21, 74, -38, -111, -89, -108, -116, -58, -18, -68, -69, 84, -20, -49, -82, 76, -50, 56, 77, 59, 51, -107, -103, -31, -61,\n 15, -84, -84, 36, 8, 89, -44, 62, 93, -60, -103, 4, -56, 112, -12, -100, 114, -116, 40, -52, 49, -44, 67, 69, -44,\n 24, 109, 35, 73, -27, 20, -43, 11, 83, -85, -4, 75, 0, -103, -44, 83, 67, 63, 43, -38, 39, 24, 58, -50, -51,\n 116, 78, 78, 53, 60, 79, -75, -72, -55, 12, 85, 51, -38, 84, 59, -35, 77, 83, -27, 73, 84, 45, 76, -80, 68,\n 76, 57, -29, -45, 70, 33, 36, -33, -48, -97, 116, -103, 83, -57, -29, -77, -37, -85, -90, 47, 21, -98, -25, 104, 63,\n -50, -124, -86, 94, -115, -68, 55, -126, 28, -83, -100, 39, 97, -51, -105, -125, -20, 25, -90, -77, 46, 33, 91, 56, -73,\n -95, 67, -49, 83, 69, -52, -124, -95, 75, 108, 86, 78, 10, -53, 105, -51, -69, 106, 37, 48, -72, 121, -103, 108, 5,\n -100, 109, -51, -70, -112, 18, 67, 112, 45, -73, -14, -101, -46, -72, -102, -100, -117, -2, 58, -41, 92, 109, 18, -26, 92,\n 87, -107, 107, 87, -89, 115, 28, 105, 12, -59, 60, -70, -50, -71, 68, -72, 74, 44, 88, 39, 116, 88, -13, -116, 70,\n -62, -126, -61, 32, 68, 69, -127, -91, -42, 86, -76, 33, 122, 28, 75, -64, 11, -49, -70, -6, 83, -55, -14, 70, -101,\n 76, -82, -26, -93, 88, 49, -30, -66, -117, -123, -63, -116, 37, 37, -56, 36, -43, 124, 90, 41, -3, -28, 64, -115, -108,\n -56, 36, -78, 45, -109, -27, -114, 74, 75, 89, -93, -93, 82, 5, 116, -75, 107, 109, -70, -88, -13, 82, 90, 29, 90,\n 91, -115, 71, -117, -55, 48, -100, -35, 62, -99, 29, -40, -22, 19, -51, 56, 114, 51, -68, -71, -87, -101, 3, -83, 116,\n -5, -44, -66, -116, 75, 97, -31, 88, 27, 4, -66, -50, 88, 90, -104, -5, 43, 82, 60, 61, -76, 43, -41, -105, -107,\n -96, 11, 52, -47, 115, -13, 68, -78, 117, -94, -64, -68, 84, -83, 19, 65, 81, -27, 85, -81, -107, 90, 10, 125, -73,\n 101, 81, -75, -94, -83, -106, -123, 124, -64, 66, -12, 51, -75, 93, 83, 10, -102, 24, 15, 37, -100, 23, 13, 44, 59,\n -20, -52, -68, -99, -37, 107, 113, 85, -6, -78, -64, -78, -28, 40, 19, 74, -44, -76, 117, -47, 110, -94, 89, 114, 41,\n 84, 104, 90, -81, 50, 84, -36, -77, 27, 90, 119, -71, -100, -89, 58, 88, -76, -83, -43, -88, 122, -46, -2, -39, 115,\n 23, 88, -115, 56, -100, 99, 42, -50, -51, 60, 56, 69, -57, -34, 115, 52, -47, -19, -37, 75, -13, 43, -103, 75, -36,\n 124, -79, 92, 98, -13, 19, -83, 45, -48, -42, 29, -89, -69, -123, -35, 3, -108, -38, -58, 77, 82, -7, 66, 29, -36,\n 29, -42, -120, -75, -70, 76, -20, 93, -21, -124, -96, -33, 77, 88, 40, 42, -54, 35, -5, -109, -28, 5, -45, -30, 61,\n 51, 70, 100, -80, -21, 85, 94, -27, 124, 54, 83, -46, -89, 112, 76, -98, 91, -117, -34, 10, -44, -94, -39, -67, -107,\n 82, -119, 87, -84, -95, 94, 89, 101, -97, -92, 18, 82, -90, -24, 94, -17, -3, -34, 76, 17, 43, 60, 5, 88, -84,\n 99, 95, -13, 69, -109, -94, 28, -75, 80, 25, -37, 93, 101, 37, 40, 27, 84, -87, -30, -106, -104, 93, -37, -107, 92,\n -34, -91, 89, 95, -98, -93, -40, -22, -20, -33, 69, -52, -111, -47, 28, -35, 17, 19, 78, 5, 102, 91, -125, 77, 96,\n -122, -7, -71, 119, 124, 92, -56, 101, -32, 72, 3, 76, -71, -109, -46, -128, -107, 96, 76, 77, -42, -111, -46, -85, -114,\n 36, -32, -102, -93, -87, 2, -71, 59, -35, 117, -35, -120, 21, -32, -57, -117, 18, -118, -23, -52, -109, -125, -116, 25, -93,\n 95, 20, -74, -102, -47, -38, 26, -61, 36, 89, 25, -42, 37, -82, 4, -36, -107, -101, 97, 61, -46, -114, -53, 117, 94,\n -91, 43, -2, 41, -104, -67, 84, -61, -8, -31, -113, -95, 93, 96, -75, 29, 31, -10, -93, 115, 82, 51, 89, -67, -39,\n 109, 83, -30, -46, 68, -111, -65, 68, -63, -69, 89, -30, -103, 125, 78, 16, -91, 98, 121, -19, 84, 36, -75, 28, -2,\n -83, -55, 15, -36, -68, -51, -53, -30, 58, -51, 96, -55, 83, -49, -30, 35, 19, 49, 54, -64, 28, 54, 73, 53, -58,\n 94, -26, 107, 88, 87, -46, -32, -62, -77, 68, 124, 27, -59, -17, -83, -40, -30, 123, -61, 65, 1, -29, -46, 124, -29,\n 63, -66, 60, -42, 92, 34, 41, 118, 86, -2, -109, -75, 29, 76, 50, 47, -122, -50, -63, -11, -74, 27, 36, -76, -2,\n -94, 99, -50, 93, -42, 45, -126, 100, 109, -43, -75, 67, -82, 56, -124, 101, 84, 18, 108, 83, -44, -107, 26, 36, -114,\n 100, -65, 60, -46, -33, 17, 101, -128, -126, -40, 77, -93, 60, -24, 26, 98, -63, -60, -47, 67, 117, -71, 127, -107, -27,\n -27, -108, -45, 82, 78, -82, -90, 114, -93, -42, 51, -59, 18, -86, -28, 32, -119, 85, 30, -75, -27, -2, -75, 66, 108,\n -126, 102, -112, 124, 90, 102, -61, -60, 76, 86, 80, 107, 13, 85, 3, 94, 101, 97, 54, 90, 24, -67, 32, 106, -82,\n -26, 74, -77, 96, 21, -106, -57, -119, 52, 70, -28, 73, -61, -41, -4, -26, 58, -114, 99, 113, 38, -30, 122, -20, 102,\n 108, -34, -60, 116, -74, 62, 102, -2, -18, 34, 70, 125, -78, 47, 114, 103, 93, 113, 95, 74, -22, -41, -104, 100, -29,\n 115, 6, -48, 123, 94, -74, 20, 93, -116, -84, -19, 86, 127, -66, 20, -128, 30, -93, 113, 38, 103, -1, -28, 60, -28,\n -37, 89, 0, -52, 95, -42, -19, -94, -56, 65, -39, 16, 109, -24, 42, -42, 84, -120, -82, 89, 74, 4, 42, -32, 28,\n 89, 106, 77, -95, 22, 94, 62, -14, -39, 100, -113, -50, 24, -45, 107, 100, 55, 38, -28, 11, 29, 14, 102, -117, 104,\n -74, 101, -24, -67, -127, -65, -106, -58, 94, -113, 82, -72, -104, -106, -23, -119, 110, 99, 21, 69, 103, 113, -60, -55, 32,\n 73, -58, -99, -10, 95, 23, 101, -36, 125, -79, -23, 91, -98, -23, 2, 2, -44, -75, 92, 84, -116, 78, -22, 98, -52,\n -114, -59, 50, -25, 66, 113, -22, -89, 102, -72, 8, -117, -22, -88, -10, -26, 81, -74, -22, -117, -23, -46, 79, 5, -81,\n 13, -36, 41, 55, 44, 92, 69, -39, 39, -114, -18, -45, 124, -58, 13, -78, -10, 23, 82, -98, 58, 120, -31, 106, -83,\n -15, 33, 35, -126, 74, -121, -44, -111, -117, -75, 88, -112, -61, -21, -99, 46, -62, 122, 54, 46, -23, -99, -83, 76, -51,\n -49, -34, -20, 26, -63, 14, 92, -25, 104, 56, 116, -99, -21, -36, 101, 69, -7, -83, 44, -25, 91, -59, 64, -94, 37,\n -7, 104, 103, -103, -55, -57, -78, 74, 62, -79, -106, 108, -2, -105, 14, 106, -69, -98, -74, -53, 102, -84, 51, -86, -65,\n -20, 52, -23, 58, 105, -20, -20, 81, -25, -49, 114, -19, -122, -66, -53, -32, -78, -20, -61, -90, -20, -1, 90, -106, 57,\n 9, -19, 35, 52, -24, -73, 22, 109, -121, 38, 109, -83, -66, -82, -55, 67, 78, -84, -10, 78, 71, -82, 15, -39, 102,\n 83, -82, 27, 97, -22, 91, 110, 119, 62, 99, 98, -26, -109, -37, -58, 109, -104, 116, 27, 16, -98, 31, -24, -58, -103,\n -14, -19, -51, 26, 11, 76, -32, -42, 91, -98, -94, 101, -30, 118, -31, -111, 110, -68, 31, -78, -52, -92, 13, 102, -97,\n -36, 97, -40, -82, 60, -118, 11, -17, 127, 14, 107, -21, -114, -104, -76, 54, -18, 79, -106, 51, 41, 68, -29, -34, 118,\n 30, -110, 99, 60, -10, -106, 111, 35, -111, 86, -62, -2, -110, -19, -58, -62, 118, -60, -48, 31, 92, -34, -110, 57, -31,\n -2, 38, -24, -3, -51, 110, 1, 127, 20, -88, 68, 109, -114, -87, -18, -6, -50, -41, -90, 97, -32, -85, 29, -40, 6,\n -33, -76, -83, 13, -16, 9, 7, -25, -31, -10, -36, -12, -71, 111, -4, 22, -22, 118, 114, -16, -14, 58, -16, 110, 105,\n 25, 53, 11, 65, 23, -9, -25, -60, -2, -43, 19, -57, 44, -52, 69, -17, -110, -90, -38, 68, -42, 109, -90, 117, 92,\n -101, -14, -15, 17, -9, 22, -71, -76, -15, -59, 59, 95, 105, 26, 91, 37, 71, -2, 86, 59, 21, -14, 35, 68, -68,\n -43, -106, -16, 33, 15, 110, 127, -93, 110, 20, -9, -68, -77, -78, 97, -72, -35, -17, 68, 110, -17, -93, 49, -24, 41,\n -9, 94, 60, -77, -14, 43, 23, 100, 12, 70, -42, 28, 102, -19, 84, -67, -21, 48, -1, -105, -9, 61, -21, -31, 45,\n -13, 49, -92, 109, -2, -98, 31, 59, -26, 69, 54, 111, -13, 127, -122, -16, -58, 34, 115, 12, 103, 114, 43, -58, -63,\n 88, -68, 115, 60, -65, -21, 25, -113, -18, 78, 37, 36, 63, -1, 115, 26, -4, 91, 23, 82, -17, 96, -69, -26, -83,\n 62, 116, 97, 102, 106, 126, -69, 54, 17, 55, 87, 118, -108, -26, 71, -105, -14, 40, -3, -40, 60, -41, 115, 71, -79,\n 116, 57, -21, 50, 63, 13, -22, -15, -18, -12, -28, 30, 71, 76, 47, 111, 81, 7, 28, -38, 5, 96, -11, 61, -11,\n -23, 30, 79, -106, 6, -16, 76, 119, 52, -81, 122, -11, -6, 109, 81, -30, 60, 52, 74, 87, -68, 112, -114, -36, 46,\n -105, -15, 59, 12, -94, 96, 87, -29, 90, -28, -50, 55, 69, 110, 87, 79, -30, -1, -28, -103, 104, -37, 109, 6, -105,\n 67, -17, -2, 105, 94, -9, -56, 98, -87, -62, 35, 38, -67, 100, 26, -17, 102, -30, 87, 106, 47, -10, -48, -107, -93,\n -72, -50, 118, 45, -66, 98, 42, -110, -89, 11, -82, 106, 70, 55, -15, 66, 14, -44, 52, -116, 108, -120, -2, 11, 104,\n 116, 39, -15, -66, 5, 119, -54, -48, -11, 112, 110, -60, 85, 103, 94, -34, -18, -40, 82, 74, 118, -13, 117, -27, -75,\n 43, 104, 48, 95, -32, 126, -81, 112, 66, -89, 50, -126, -65, 106, 95, 122, -8, -33, -3, -32, -38, -122, -13, 58, 23,\n -8, 56, 126, 104, -58, 110, -8, 47, -98, -26, 123, -65, -52, 106, -124, -25, -128, -57, 90, -105, 12, 90, 109, -30, -8,\n 16, -90, 39, -119, 87, 92, 95, 15, 98, 120, 31, -32, -50, -43, 113, 120, -65, -11, -44, 53, 101, 72, -12, -8, -113,\n 111, 102, 8, 63, 65, -25, 6, -38, -127, -66, 100, -29, 49, 62, -25, 85, 101, -100, -49, 121, -78, -36, 121, -97, 61,\n 35, 112, -13, -54, 64, 87, -20, 60, 61, -10, -94, 50, 122, -66, 44, 113, 68, 43, -60, -107, 79, 119, 45, 105, -7,\n -55, -70, 122, -113, 105, 118, 74, -106, -6, -93, 111, 122, -98, 63, -61, 125, -117, 17, 80, 55, 123, -101, -105, -61, 86,\n -97, 48, -80, -49, 105, -79, 95, -31, 119, -11, 116, -30, 21, -7, -96, -9, -20, -106, 26, -7, -74, -105, -74, -73, 39,\n 48, 39, 39, 122, 103, -74, -25, 56, 92, 123, -74, -49, -5, 64, 68, 122, 64, -89, -9, -104, -73, -8, -124, -49, 63,\n -63, -33, 106, -62, 47, -4, -67, -9, 84, -82, -41, 68, -125, -97, 50, -69, -113, -6, -57, -73, -47, 55, -105, 124, -22,\n 52, -37, -2, 27, 34, 119, -17, 107, 124, -45, -50, -4, -101, -116, 124, -105, -60, -13, -77, -81, 71, -48, 15, 125, -52,\n 39, -3, -89, -82, -38, -98, 47, 123, -11, -93, 121, 45, 20, 125, 3, 119, -3, 89, -36, -4, -116, 7, -51, 1, 68,\n 90, -120, -76, -3, 11, -57, -3, -68, -58, -66, -54, 70, 124, 68, 22, -91, 126, 38, 76, -32, 95, 116, -31, -81, 45,\n -35, 71, 94, -71, -105, -3, 34, -59, -51, -27, 55, -11, -26, 23, -45, -92, -124, 116, -34, 23, -89, -23, -84, -2, -22,\n -67, 126, -25, 34, -2, -33, -101, 124, 8, -27, -2, -18, 31, 50, 73, 127, 118, -16, -65, 37, 67, 78, -17, 72, 55,\n -1, -13, -105, -79, 111, 75, -3, 35, 95, 127, -100, 18, 127, -125, 122, 127, 65, 19, -47, -128, -53, -31, -54, 7, -120,\n 0, 2, 7, 18, 44, 104, 112, -96, 0, 0, 10, 23, 50, 108, -24, -16, 33, -60, -120, 18, 39, 82, -84, 104, -15,\n 34, -58, -116, 26, 55, 114, -20, -24, -15, 35, -56, -123, 2, 4, -114, 60, 104, -14, 100, -128, -110, 7, 71, 38, 12,\n -23, -14, 37, -52, -104, 27, 85, -94, 60, -39, 82, 38, -50, -100, 58, 119, -30, -92, 89, -45, -96, -128, -101, 24, 125,\n 6, -3, 105, 20, 40, -49, -92, 74, -105, 50, 109, -22, 84, 105, 73, -97, 71, -127, -94, 12, -6, -12, 42, -42, -105,\n 82, -89, 10, -51, -22, -11, 43, -2, 88, -122, 91, 127, 90, -19, 72, -77, -24, -44, -93, 93, -61, -78, 109, -21, -10,\n -19, 85, -107, 99, -45, -90, -84, 10, -9, 46, -40, -71, 85, -41, -30, -19, -21, 87, -93, -34, -96, -126, 7, -125, -108,\n 11, 64, 47, 93, -110, 127, 23, 51, 110, -36, 88, 110, -30, -107, 104, 11, -14, 117, 108, 57, 36, 98, -54, -107, 47,\n 115, -10, 59, -103, -14, -50, -88, -103, 19, 111, -18, 108, -6, 52, 106, -114, 103, 35, 35, 61, 44, 88, 113, -22, -40,\n 67, 7, -45, -82, 93, 90, 54, 110, -84, -97, -53, -22, 20, 124, -72, 46, -21, -107, 95, 121, -25, 46, 110, -4, 35,\n -28, -32, -96, -59, -34, 62, -18, -4, 57, 116, -73, 69, -101, 107, 117, 61, 90, 109, 88, -33, -47, -73, 115, -1, -115,\n 80, -7, -14, -18, -30, -57, -109, 127, 74, 61, -26, -21, -49, -84, -49, -13, -116, 90, -2, 125, -22, -43, -32, 9, -78,\n -121, 111, -1, 62, -2, -20, 9, -81, -37, -51, -98, 50, 63, -128, -98, 81, 54, 31, 125, 1, 26, 120, 32, -126, -70,\n -127, 87, 95, 123, 12, 38, -8, 32, 122, -12, 17, 24, 30, -124, 21, 90, 120, -31, 80, 11, 74, -73, 31, -122, 29,\n -54, 68, -44, -124, 5, 122, 56, 34, -119, 24, -14, -41, 90, 91, -124, -107, -72, -30, 76, 3, -122, -8, 31, -117, 49,\n -54, 120, -33, -119, 20, -78, 53, -35, -116, 57, 70, 4, -2, 98, -120, 14, -22, -8, 35, -112, -114, -115, 53, -105, 118,\n -46, -111, 68, 91, -112, 51, -14, 56, -95, -113, 73, 58, -7, 100, -118, 72, -99, 85, 36, 92, 91, 53, 9, 37, -115,\n 18, 46, -88, 34, -106, 93, 122, -23, 25, 90, 55, -79, 116, 37, 83, 86, 126, 57, -94, 124, 116, 33, 121, 38, -101,\n 109, -34, 69, -100, 107, -116, -103, -23, -90, -123, 105, -90, 69, 38, -99, 121, -22, 25, -38, 98, 86, -30, -71, -25, 113,\n 75, -34, 9, 40, -95, -123, -42, -87, -103, -95, 7, 10, -54, 85, -94, -115, 58, -118, -33, 89, -113, 2, -72, 40, 118,\n -110, 90, 122, 41, 116, -122, 97, 106, 31, -91, -110, -123, -71, 41, -88, -95, 50, 39, -26, -97, -24, 53, -28, -98, -88,\n -28, 117, -118, 34, -107, -87, -70, -22, -88, 104, 44, 25, -39, 82, 122, -81, -114, 87, 91, -91, -74, -22, 42, -23, -100,\n -2, -91, 52, 38, -100, -69, 58, 71, 106, -91, -91, 10, 123, -84, -116, 82, 25, 91, 24, -118, -56, 102, -86, 16, 75,\n -40, 5, -21, 44, -75, 94, 42, 123, 35, 125, -53, 86, 91, 37, -83, -64, -111, -43, -22, -74, -31, 62, 25, -87, -81,\n -80, -119, 27, 104, -73, -4, 77, 123, 46, -69, 57, 106, 58, 28, -71, -19, 26, -105, 110, -82, -14, -38, -85, 35, -72,\n 113, 53, 123, 47, 110, -55, -43, -92, 45, -65, 1, -17, -87, -34, -111, 2, -9, -2, -5, 29, 89, 6, 43, -84, -85,\n -97, 11, -53, -26, -81, 77, 14, 75, 28, -22, -112, 19, -57, 22, 109, -62, 22, 107, 12, -85, 73, 0, 111, -36, 84,\n 84, -33, 126, 60, 50, -95, 21, -109, 124, 89, -56, 54, 121, 124, 50, -53, -121, 10, -41, -14, 95, 86, 65, 108, 35,\n -52, 53, -113, -37, -80, -51, 111, 30, -119, 112, -57, 57, -5, 124, -77, 104, 63, -65, -7, 26, -49, 61, 11, 125, -12,\n -113, -21, 34, -99, -105, -117, -3, 45, -3, 52, -44, -37, -38, -23, 116, -44, 85, 91, -3, 106, -104, 70, -83, 124, 53,\n -41, 93, 39, 61, -104, -42, 94, -117, 61, -74, -95, -109, -115, -74, 53, -39, 105, -85, -99, -96, -39, 25, -81, -3, 54,\n -36, 73, -18, -25, 109, -60, 113, -37, 125, 119, -78, -45, -3, -117, 55, -33, 125, -93, 73, 55, 85, 104, -5, 61, 56,\n -31, -90, 17, -35, -79, -32, -123, 43, -66, -72, -100, -121, 35, -60, 56, -28, -111, -33, 90, -76, -71, -110, 91, 126, 121,\n 110, -47, 18, 53, -45, -102, -104, 123, -2, -71, 110, 41, 87, 126, -111, -52, -7, -126, 126, 58, -22, -24, 77, 71, 52,\n -125, -76, 38, -98, 58, -20, -96, 59, -2, -85, -46, -79, -37, 126, 59, 84, -23, 117, -114, 59, -17, -67, -73, 71, -69,\n 92, -81, -5, 62, 124, -22, -91, 3, -1, 43, -15, -55, 43, 111, 86, -23, -34, -115, -71, 60, -12, -47, 59, 83, -124,\n -85, -73, -75, 75, 127, 61, -15, -70, 3, 110, 61, -10, -35, -13, -98, 30, 66, 92, 122, 63, -66, -14, -69, -109, 127,\n 126, -10, -74, -95, -65, 126, -7, -36, -77, -1, 62, -4, -15, -53, 63, 63, -3, -11, -37, 127, 63, -2, -7, -21, -65,\n 63, -1, -3, -81, 24, 16, 0, 0, 59\n };\n}", "public static void loadTiles() {\n\t\tTILE_SETS.put(\"grass\", TileSet.loadTileSet(\"plains\"));\n\t}", "@Nonnull\n Texture getWorldMap();", "public void createAlbedoMap(String filename) {\n\t\ttry {\n\t\t\t// Read in the image.\n\t\t\tBufferedImage img = new BufferedImage(I1.getRowDimension(), \n\t\t\t\t\tI1.getColumnDimension(),\n\t\t\t\t BufferedImage.TYPE_INT_RGB);\n\t\t\t\n\t\t\tdouble p[][] = this.P.getData();\n\t\t\t\n\t\t\t// Transform the image into a grayscale image.\n\t\t\tfor (int i=0; i < this.P.getRowDimension(); i++) {\n\t\t\t\tfor (int j=0; j < this.P.getColumnDimension(); j++) {\n\t\t\t\t\tint albedo = (int)(p[i][j] * 255);\n\t\t\t\t\timg.setRGB(i, j, new Color(albedo, albedo, albedo).getRGB());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tImageIO.write(img, \"png\", new File(filename));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading \" + \"yeah\");\n\t\t}\n\t}", "private void getWeatherPic() {\n\t\tweatherPic=new HashMap<String, Integer>();\n\t\tweatherPic.put(\"晴\", R.drawable.weather_qing_tian);\n\t\tweatherPic.put(\"多云\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阴\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨伴有冰雹\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"雨夹雪\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"阵雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"小雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"雾\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"冻雨\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"小雨-中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨-大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨-暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨-大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨-特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雪-中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪-大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪-暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"浮尘\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"扬沙\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"强沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"霾\", R.drawable.weather_wu_mai_tian);\n\t}", "public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }", "private void setUpImage() {\n Bitmap icon = BitmapFactory.decodeResource( this.getResources(), R.drawable.hotel_icon );\n map.addImage( MARKER_IMAGE_ID, icon );\n }", "public Map<String, Object> getMapRaster(Map<String, Double> params) {\n Map<String, Object> results = new HashMap<>();\n double lrlon = params.get(\"lrlon\");\n double ullon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double ullat = params.get(\"ullat\");\n double lrlat = params.get(\"lrlat\");\n int depth = computeDepth(lrlon, ullon, w);\n boolean query_success = true;\n if (lrlat >= ullat || lrlon <= ullon || lrlat >= ROOT_ULLAT || lrlon <= ROOT_ULLON || ullat <= ROOT_LRLAT ||ullon >= ROOT_LRLON) {\n query_success = false;\n }\n int numImg = (int) Math.pow(2, depth);\n double wPerImg = W / Math.pow(2.0, depth);\n double hPerImg = H / Math.pow(2.0, depth);\n int xSt = (int) Math.floor(Math.abs(ullon - ROOT_ULLON) / wPerImg);\n int ySt = (int) Math.floor(Math.abs(ullat - ROOT_ULLAT) / hPerImg);\n int xEn = (int) Math.floor(Math.abs(lrlon - ROOT_ULLON) / wPerImg);\n int yEn = (int) Math.floor(Math.abs(lrlat - ROOT_ULLAT) / hPerImg);\n String[][] render_grid = new String[yEn - ySt + 1][xEn - xSt + 1];\n double raster_ul_lon = ROOT_ULLON + xSt * wPerImg;\n double raster_ul_lat = ROOT_ULLAT - ySt * hPerImg;\n double raster_lr_lon = ROOT_ULLON + (xEn + 1) * wPerImg;\n double raster_lr_lat = ROOT_ULLAT - (yEn + 1) * hPerImg;\n if (ullon < ROOT_ULLON) {\n xSt = 0;\n raster_ul_lon = ROOT_ULLON;\n }\n if (ullat > ROOT_ULLAT) {\n ySt = 0;\n raster_ul_lat = ROOT_ULLAT;\n }\n if (lrlon > ROOT_LRLON) {\n xEn = numImg - 1;\n raster_lr_lon = ROOT_LRLON;\n }\n if (lrlat < ROOT_LRLAT) {\n yEn = numImg - 1;\n raster_lr_lat = ROOT_LRLAT;\n }\n for (int i = 0; i < xEn - xSt + 1; ++i) {\n for (int j = 0; j < yEn - ySt + 1; ++j) {\n int x = i + xSt;\n int y = j + ySt;\n render_grid[j][i] = \"d\" + depth + \"_x\" + x + \"_y\" + y + \".png\";\n }\n }\n results.put(\"render_grid\", render_grid);\n results.put(\"raster_ul_lon\", raster_ul_lon);\n results.put(\"raster_ul_lat\", raster_ul_lat);\n results.put(\"raster_lr_lon\", raster_lr_lon);\n results.put(\"raster_lr_lat\", raster_lr_lat);\n results.put(\"depth\", depth);\n results.put(\"query_success\", query_success);\n return results;\n }", "public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}", "private void createHash() throws IOException\n\t{\n\t\tmap = new HashMap<String, ImageIcon>();\n\t\t\n\t\tfor(int i = 0; i < pokemonNames.length; i++)\n\t\t{\n\t\t\tmap.put(pokemonNames[i], new ImageIcon(getClass().getResource(fileLocations[i])));\n\t\t}\n\t}", "public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}", "private void setupVariant1TerrainMap() {\n\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-4), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-3), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,-2), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,0), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,2), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,2), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,3), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,3), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,3), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,4), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,4), TerrainKind.FOREST);\n\t}", "public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }", "public Map<Pair<ID, PowerUpT>, List<Image>> getPowerUpImages() {\n return powerUpImages;\n }", "Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "public static Map<String,Planet> getPlanetsByName() { return planetsByName; }", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }", "public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}", "public StoneSummon() {\n// ArrayList<BufferedImage> images = SprssssssaasssssaddddddddwiteUtils.loadImages(\"\"\n createStones();\n\n }", "private static Image[][] getTileBases()\n\t{\n\t\tImage[][] tileBases = new Image[2][4];\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[0][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \".png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\t\t}\n\t\tfor (int type = 0; type < 4; type++) {\n\t\t\ttry {\n\t\t\t\ttileBases[1][type] = ImageIO.read(new File(tileDirectory\n\t\t\t\t\t\t+ \"tile_\" + tileColours[type] + \"_trans.png\"));\n\t\t\t} catch (IOException ioe) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn tileBases;\n\t}", "public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }", "public Map(ArrayList<City> cities, ArrayList<PointOfInterest> points, ArrayList<Region> regions, int type, int length, int breadth) {\n\t\ttry { \n\t \t this.image = ImageIO.read(new File(\"map.jpg\"));\n\t \t\t} catch (IOException ex) {\n\t \t System.out.println(\"I could not find the image file.\");\n\t \t\t}\n\t \t\tthis.cities = cities;\n\t \t\tthis.points = points;\n\t \t\tthis.type = type;\n\t \t\tthis.regions = regions;\n\t \t\tthis.breadth = breadth;\n\t \t\tthis.length = length;\n \t}", "private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}", "private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }", "WorldMaterialMap getMaterialMap();", "private void createImageMap(final ValueMap properties) {\n if (!(properties.containsKey(\"imageMap\"))) {\n return;\n }\n try {\n final String mapDefinition = properties.get(\"imageMap\", \"\");\n if (StringUtils.isNotEmpty(mapDefinition)) {\n this.imageMap = ImageMap.fromString(mapDefinition);\n this.imageMapId = \"map_\" + Math.round(Math.random() * 2147483647.0D) + \"_\" + System.currentTimeMillis();\n }\n\n } catch (final IllegalArgumentException iae) {\n this.imageMap = null;\n this.imageMapId = null;\n }\n }", "public Map<String, List<Image>> getBackgroundImages(){\n return backgroundImages;\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }", "void loadPlanet(MapSaveSettings settings) {\r\n\t\ttry {\r\n\t\t\tif (renderer.surface == null) {\r\n\t\t\t\tcreatePlanetSurface(33, 66);\r\n\t\t\t}\r\n\t\t\tElement root = XML.openXML(settings.fileName);\r\n\t\t\tElement planet = XML.childElement(root, \"planet\");\r\n\t\t\tif (settings.surface) {\r\n\t\t\t\tdoClearSurfaces(false);\r\n\t\t\t\tElement surface = XML.childElement(planet, \"surface\");\r\n\t\t\t\tif (surface != null) {\r\n\t\t\t\t\tint width = Integer.parseInt(surface.getAttribute(\"width\"));\r\n\t\t\t\t\tint height = Integer.parseInt(surface.getAttribute(\"height\"));\r\n\t\t\t\t\tcreatePlanetSurface(width, height);\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(surface, \"tile\")) {\r\n\t\t\t\t\t\tString type = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tint id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tTile t = galaxyModel.planetTypes.get(type).tiles.get(id);\r\n\t\t\t\t\t\tSurfaceFeature sf = new SurfaceFeature();\r\n\t\t\t\t\t\tsf.id = id;\r\n\t\t\t\t\t\tsf.type = type;\r\n\t\t\t\t\t\tsf.location = Location.of(x, y);\r\n\t\t\t\t\t\tsf.tile = t;\r\n\t\t\t\t\t\trenderer.surface.features.add(sf);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(t, x, y, SurfaceEntityType.BASE, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (settings.buildings) {\r\n\t\t\t\tdoClearBuildings(false);\r\n\t\t\t\tElement buildings = XML.childElement(planet, \"buildings\");\r\n\t\t\t\tif (buildings != null) {\r\n\t\t\t\t\tString tech = null;\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(buildings, \"building\")) {\r\n\t\t\t\t\t\tString id = tile.getAttribute(\"id\");\r\n\t\t\t\t\t\ttech = tile.getAttribute(\"tech\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tBuilding b = new Building(buildingModel.buildings.get(id), tech);\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tb.location = Location.of(x, y);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tb.buildProgress = Integer.parseInt(tile.getAttribute(\"build\"));\r\n\t\t\t\t\t\tb.hitpoints = Integer.parseInt(tile.getAttribute(\"hp\"));\r\n\t\t\t\t\t\tb.setLevel(Integer.parseInt(tile.getAttribute(\"level\")));\r\n\t\t\t\t\t\tb.assignedEnergy = Integer.parseInt(tile.getAttribute(\"energy\"));\r\n\t\t\t\t\t\tb.assignedWorker = Integer.parseInt(tile.getAttribute(\"worker\"));\r\n\t\t\t\t\t\tb.enabled = \"true\".equals(tile.getAttribute(\"enabled\"));\r\n\t\t\t\t\t\tb.repairing = \"true\".equals(tile.getAttribute(\"repairing\"));\r\n\t\t\t\t\t\trenderer.surface.buildings.add(b);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(b.tileset.normal, x, y, SurfaceEntityType.BUILDING, b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tech != null) {\r\n\t\t\t\t\t\tplaceRoads(tech);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trenderer.repaint();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\n }", "public Map(Tile[][] tiles) {\n terrains = new String[]{\"r\", \"p\", \"m1\", \"m2\", \"m3\"};\n this.tiles = tiles;\n }", "private void initImageBitmaps(){\n imageUrls.add(\"https://i.redd.it/j6myfqglup501.jpg\");\n names.add(\"Rocky Mountains\");\n\n imageUrls.add(\"https://i.redd.it/0u1u2m73uoz11.jpg\");\n names.add(\"Mt. Baker, WA\");\n\n imageUrls.add(\"https://i.redd.it/xgd2lnk56mz11.jpg\");\n names.add(\"Falls Creek Falls, TN\");\n\n imageUrls.add(\"https://i.redd.it/o6jc7peiimz11.jpg\");\n names.add(\"Skogafoss, Iceland\");\n\n imageUrls.add(\"https://i.redd.it/zxd44dfbyiz11.jpg\");\n names.add(\"Black Forest, Germany\");\n\n imageUrls.add(\"https://www.mountainphotography.com/images/xl/20090803-Hermannsdalstinden-Sunset.jpg\");\n names.add(\"Lofoten Islands, Norway\");\n\n imageUrls.add(\"https://i.redd.it/6vdpsld78cz11.jpg\");\n names.add(\"Isle of Skye\");\n\n imageUrls.add(\"https://i.redd.it/i4xb66v5eyy11.jpg\");\n names.add(\"Lago di Carezza, Italy\");\n\n imageUrls.add(\"https://i.redd.it/ttl7f4pwhhy11.jpg\");\n names.add(\"Arches National Park, UT\");\n\n imageUrls.add(\"https://i.redd.it/mcsxhejtkqy11.jpg\");\n names.add(\"Northern Lights\");\n\n imageUrls.add(\"https://i.redd.it/0rhq46ve83z11.jpg\");\n names.add(\"Swiss Alps\");\n\n imageUrls.add(\"https://i.redd.it/0dfwwitwjez11.jpg\");\n names.add(\"Hunan, China\");\n\n //Initialize our recyclerView now that we have our images/names\n initRecyclerView();\n }", "public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}", "public Map(int r, int c){\r\n try {\r\n bomb = new Image(new FileInputStream(\"Minesweeper_Images/bomb.png\"));\r\n zero = new Image(new FileInputStream(\"Minesweeper_Images/zero.png\"));\r\n one = new Image(new FileInputStream(\"Minesweeper_Images/one.png\"));\r\n two = new Image(new FileInputStream(\"Minesweeper_Images/two.png\"));\r\n three = new Image(new FileInputStream(\"Minesweeper_Images/three.png\"));\r\n four = new Image(new FileInputStream(\"Minesweeper_Images/four.png\"));\r\n five = new Image(new FileInputStream(\"Minesweeper_Images/five.png\"));\r\n six = new Image(new FileInputStream(\"Minesweeper_Images/six.png\"));\r\n seven = new Image(new FileInputStream(\"Minesweeper_Images/seven.png\"));\r\n eight = new Image(new FileInputStream(\"Minesweeper_Images/eight.png\"));\r\n flag = new Image(new FileInputStream(\"Minesweeper_Images/flag.png\"));\r\n square = new Image(new FileInputStream(\"Minesweeper_Images/square.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n map = new Square[r][c];\r\n for(int row = 0; row<map.length; row++){\r\n for(int col = 0; col<map[0].length; col++){\r\n map[row][col] = new Square();\r\n //map[row][col].setVisual(\" \");\r\n int x = row;\r\n int y = col;\r\n map[row][col].setVisual(square);\r\n map[row][col].getSquareButton().setOnMouseClicked(e->{\r\n if(e.getButton() == MouseButton.PRIMARY){\r\n revealArea(x, y);\r\n }\r\n if(e.getButton() == MouseButton.SECONDARY){\r\n flag(x, y);\r\n if(win() == true){\r\n System.out.println(\"WIN\");\r\n EndBox.end(\"Win\", \"YOU WIN!!!\");\r\n System.exit(0);\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n }\r\n }", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\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}", "public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "public Mountains() {\n\t\tparallaxes = new Parallax[6];\n\t\tbgImage = ResourceManager.createCompatible(ResourceManager\n\t\t\t\t.getMountain());\n\t\tbgImage2 = ResourceManager.createCompatible(ResourceManager\n\t\t\t\t.getMountain2());\n\t\tbgImage3 = ResourceManager.createCompatible(ResourceManager\n\t\t\t\t.getBlueSky());\n\t\tcurrHeight = 0;\n\t\tfor (int i = 0; i < parallaxes.length; i++) {\n\t\t\tparallaxes[i] = new MountainParallax(i);\n\t\t}\n\t}", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "public LinkedHashMap<String, Stack<ColorImage>> getImageCache() {\n return imageCache;\n }", "public Map<ID, List<Image>> getEntityImages() {\n return entityImages;\n }", "private void createLights(TiledMap map)\r\n\t{\r\n\t\tlightLayer = map.getLayers().get(\"Lights\").getObjects();\r\n\r\n\t\tfor (int count = 0; count < lightLayer.getCount(); count++)\r\n\t\t{\r\n\t\t\tRectangleMapObject obj = (RectangleMapObject) lightLayer.get(count);\r\n\r\n\t\t\tnew PointLight(lightHandler, 10, Color.WHITE, 30,\r\n\t\t\t\t\tobj.getRectangle().x / Constants.BOX_SCALE,\r\n\t\t\t\t\tobj.getRectangle().y / Constants.BOX_SCALE);\r\n\t\t}\r\n\t}", "public void init() {\r\n int width = img.getWidth();\r\n int height = img.getHeight();\r\n floor = new Floor(game, width, height);\r\n units = new ArrayList<Unit>();\r\n objects = new ArrayList<GameObject>();\r\n for (int y=0; y<height; y++) {\r\n for (int x=0; x<width; x++) {\r\n int rgb = img.getRGB(x,y);\r\n Color c = new Color(rgb);\r\n Tile t;\r\n if (c.equals(GRASS_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else if (c.equals(STONE_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n } else {\r\n /* Check all the surrounding tiles. Take a consensus for the underlying tile color. */\r\n int numGrass=0, numStone=0;\r\n for (int j=y-1; j<=y+1; j++) {\r\n for (int i=x-1; i<=x+1; i++) {\r\n if (i>=0 && i<img.getWidth() && j>=0 && j<img.getHeight() && !(i==x && j==y)) {\r\n int rgb2 = img.getRGB(i,j);\r\n Color c2 = new Color(rgb2);\r\n if (c2.equals(GRASS_COLOR)) numGrass++;\r\n else if (c2.equals(STONE_COLOR)) numStone++;\r\n }\r\n }\r\n }\r\n if (numGrass >= numStone) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n }\r\n }\r\n floor.setTile(x, y, t);\r\n \r\n if (c.equals(TREE_COLOR)) {\r\n //objects.add(new GameObject(x,y))\r\n } else if (c.equals(WALL_COLOR)) {\r\n objects.add(new Wall(game, new Posn(x,y), \"wall_48x78_1.png\"));\r\n } else if (c.equals(WIZARD_COLOR)) {\r\n addWizard(x,y);\r\n } else if (c.equals(ZOMBIE_COLOR)) {\r\n addZombie(x,y);\r\n } else if (c.equals(BANDIT_COLOR)) {\r\n addBandit(x,y);\r\n } else if (c.equals(PLAYER_COLOR)) {\r\n game.getPlayerUnit().setPosn(new Posn(x,y));\r\n units.add(game.getPlayerUnit());\r\n }\r\n }\r\n }\r\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "private void init() {\r\n\r\n\t\tPlanetLayoutGenerator gen = new PlanetLayoutGenerator();\r\n\t\tint planetCount = 15;\r\n\t\tint width = 5, height = 5, depth = 5;\r\n\t\tint[][][] layout = gen.generate(width, height, depth, planetCount);\r\n\t\tfinal float minSize = 4, maxSize = 10;\r\n\t\tfinal float gap = (C.World.PlanetBoxSize - maxSize*width)/(width-1);\r\n\r\n\t\tTextureRegion textures[] = new TextureRegion[] {\r\n\t\t\tassets.planetNeptune,\r\n\t\t\tassets.planetSaturn,\r\n\t\t\tassets.planetEarth,\r\n\t\t};\r\n\t\tfloat x = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat y = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat z = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\r\n\t\tfor (int ix = 0; ix < width; ++ix) {\r\n\t\t\tfor (int iy = 0; iy < height; ++iy) {\r\n\t\t\t\tfor (int iz = 0; iz < depth; ++iz) {\r\n\t\t\t\t\tif (layout[ix][iy][iz] == 1) {\r\n\t\t\t\t\t\tTextureRegion tex = textures[(ix+iy+iz)%3];\r\n\t\t\t\t\t\tfloat size = MathUtils.random(minSize, maxSize);\r\n\r\n\t\t\t\t\t\tfactory.createPlanet(x+ix*(maxSize+gap), y+iy*(maxSize+gap), z+iz*(maxSize+gap), size, 0, tex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tEntity player = factory.createPlayerShip(0, 0, 5);\r\n\t\tplayerSystem.setPlayer(player);\r\n\r\n\t\tcollisions.relations.connectGroups(CollisionGroups.PLAYER_2D, CollisionGroups.PLANETS_2D);\r\n\t}", "public Map<Pair<ID, ID>, List<Image>> getBulletImages() {\n return bulletImages;\n }", "private void setOverlay() {\n //Initial Map\n mapOverlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.kmuttmap))\n .position(position_Initmap, map_wide, map_high);\n\n //Red Line\n red_lineOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.red_line))\n .position(position_Redline, redline_wide, redline_high);\n\n //Yellow Line\n yellow_lineOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.yellow_line))\n .position(position_Yellowline, yellowline_wide, yellowline_high);\n\n //Map with label\n map_labelOverlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.kmuttmap_label2))\n .position(position_Initmap, map_wide, map_high);\n\n }", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "public Map<String, Image> loadImages(ZipInputStream in) throws IOException {\n Map<String, Image> images = new HashMap<>();\n ZipEntry entry = in.getNextEntry();\n while (entry != null) {\n String name = entry.getName();\n Image image = imageFactory.makeImage(name, in);\n if (image != null) {\n images.put(name, image);\n }\n entry = in.getNextEntry();\n }\n return images;\n }", "public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }", "public static Map<Integer,Planet> getPlanetsByOrder() { return planetsByOrder; }", "public void initMapImageFragment () {\n // Thay doi tieu de\n tabTourMapImageBinding.actionBar.actionBarTitle.setText(R.string.tour_map_image);\n Tour tour = OnlineManager.getInstance().mTourList.get(tourOrder);\n // Gan tour image\n if (!tour.getmMapImageUrl().equals(null) && !tour.getmMapImageUrl().equals(\"\")) {\n Picasso.get()\n .load(tour.getmMapImageUrl())\n .into(tabTourMapImageBinding.tourMapImage);\n// Picasso.with(this).load(tour.getmMapImageUrl()).into(tabTourMapImageBinding.tourMapImage);\n }\n // Tat map image progress\n mapImageProgressOff();\n }", "public static void setMarker() {\n\t\tfor (Picture p : pictures) {\n\t\t\tif (p.getLon() < 200 && p.getLat() < 200) {\n\t\t\t\tMarker myMarker = mMap.addMarker(\n\t\t\t\t\t\tnew MarkerOptions()\n\t\t\t\t\t\t\t\t.position(new LatLng(p.getLat(), p.getLon()))\n\t\t\t\t\t\t\t\t.visible(true)\n\t\t\t\t\t\t//.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_brightness_1_black_24dp))\n\t\t\t\t);\n\t\t\t\tmarkers.put(myMarker, p);\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Location> getLocations() {\n return this.imageLocs; \n }", "public Texture getDepthMapTexture(){\n return depthMap;\n }", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }", "public TurtleMap buildMap(ETurtle turtleTheme)\n\t{\n\t\tTurtleMap map = new TurtleMap(mapTiles.buildTileGrid());\n\n\t\tmap.setTurtle(turtle.getDir(), turtleTheme, turtle.getPos());\n\n\t\tmap.setGoal(hasGoal ? goal : null);\n\n\t\tfor (EntityDescriptor e : entities) {\n\t\t\tmap.addEntity(e.getEntity());\n\t\t}\n\n\t\treturn map;\n\t}", "@Override\r\n\tpublic void createSprites(World world) {\r\n \t// the height of the map since 0,0 in Tiled is in the top left\r\n // compared to the TiledMap's 0,0 in the bottom left\r\n int height = 2400;\r\n\r\n // file locations of different trees\r\n TextureAtlas atlas = new TextureAtlas(\"Game Tilesets/Trees/Trees.pack\");\r\n Skin skin = new Skin();\r\n skin.addRegions(atlas);\r\n TextureRegion T2 = skin.getRegion(\"T2\");\r\n TextureRegion T3 = skin.getRegion(\"T3\");\r\n TextureRegion T7 = skin.getRegion(\"T7\");\r\n TextureRegion T9 = skin.getRegion(\"T9\");\r\n TextureRegion T10 = skin.getRegion(\"T10\");\r\n \r\n // add all of the trees\r\n \tthis.addSprite(new ObjectSprites(T2, 236, height - 1490));\r\n \r\n this.addSprite(new ObjectSprites(T9, 622, height - 1907));\r\n this.addSprite(new ObjectSprites(T9, 683, height - 1687));\r\n this.addSprite(new ObjectSprites(T9, 174, height - 1851));\r\n this.addSprite(new ObjectSprites(T9, 361, height - 1643));\r\n \r\n this.addSprite(new ObjectSprites(T10, 572, height - 1354));\r\n this.addSprite(new ObjectSprites(T10, 0, height - 1475));\r\n this.addSprite(new ObjectSprites(T10, -9, height - 1707));\r\n this.addSprite(new ObjectSprites(T10, 675, height - 1479));\r\n this.addSprite(new ObjectSprites(T10, 416, height - 1903));\r\n\r\n this.addSprite(new ObjectSprites(T3, 428, height - 1453));\r\n this.addSprite(new ObjectSprites(T3, 596, height - 1122));\r\n this.addSprite(new ObjectSprites(T3, -32, height - 988));\r\n this.addSprite(new ObjectSprites(T3, 476, height - 864));\r\n this.addSprite(new ObjectSprites(T3, 640, height - 725));\r\n this.addSprite(new ObjectSprites(T3, 424, height - 2123));\r\n \r\n this.addSprite(new ObjectSprites(T7, 145, height - 1347));\r\n this.addSprite(new ObjectSprites(T7, 83, height - 1935));\r\n this.addSprite(new ObjectSprites(T7, 585, height - 2031));\r\n this.addSprite(new ObjectSprites(T7, 290, height - 2304));\r\n \r\n Bandit b1 = new Bandit();\r\n b1.defineBody(world, 215, 1305);\r\n super.addSprite(b1);\r\n \r\n Bandit b2 = new Bandit();\r\n b2.defineBody(world, 60, 1445);\r\n super.addSprite(b2);\r\n \r\n Bandit b3 = new Bandit();\r\n b3.defineBody(world, 90, 1640);\r\n super.addSprite(b3);\r\n \r\n Bandit b4 = new Bandit();\r\n b4.defineBody(world, 530, 1740);\r\n super.addSprite(b4);\r\n \r\n Bandit b5 = new Bandit();\r\n b5.defineBody(world, 730, 1655);\r\n super.addSprite(b5);\r\n \r\n Bandit b6 = new Bandit();\r\n b6.defineBody(world, 90, 2235);\r\n super.addSprite(b6);\r\n \r\n Bandit b7 = new Bandit();\r\n b7.defineBody(world, 715, 1490);\r\n super.addSprite(b7);\r\n \r\n Bandit b8 = new Bandit();\r\n b8.defineBody(world, 318, 1605);\r\n super.addSprite(b8);\r\n }", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void heightMap(World world, ActivePlayer player, int radius, int i, int k) {\n \t\tlong start = System.currentTimeMillis();\n \t\tint sStart = MiniMapWidget.scale;\n \t\t\n \t\t/*\n \t\t * Generate the image and apply shading \n \t\t */\n \t\tint tx, tz;\n \t\tint y, id, dy, diff;\n \t\t//Map<Integer, Integer[]> pairs = new HashMap<Integer, Integer[]>();\n \t\tint py = player.getLocation().getBlockY();\n \t\t\n \t\tBufferedImage image = null;\n \t\tif(MiniMapWidget.scale <= 0)\n \t\timage = new BufferedImage(radius*2*16, radius*2*16, BufferedImage.TYPE_INT_RGB);\n \t\telse\n \t\timage = new BufferedImage(radius*2, radius*2, BufferedImage.TYPE_INT_RGB);\n \t\tGraphics gr = image.getGraphics();\n \t\tgr.setColor(transparent);\n \t\t\n \t\tfor (int x = -radius; x < radius; x++)\n \t\t\tfor (int z = -radius; z < radius; z++) {\n \t\t\t\t\n \t\t\t\tif(System.currentTimeMillis()-start > 1000+MiniMapWidget.scale*4 || MiniMapWidget.scale != sStart) {\n \t\t\t\t\tgr.dispose();\n \t\t\t\t\t// TODO Add pathing back\n \t\t\t\t\t//writePath(pairs);\n \t\t\t\t\tgr = this.image.getGraphics();\n \t\t\t\t\tgr.drawImage(image, 0, 0, 256, 256, null);\n \t\t\t\t\tgr.dispose();\n \t\t\t\t\t// Can we help stop the memory leak here?\n \t\t\t\t\timage.flush();\n \t\t\t\t\timage = null;\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\ttx = (int) (i + x);\n \t\t\t\ttz = (int) (k + z);\n \t\t\t\t\n \t\t\t\t//MiniMapLocation test = inList(tx, tz);\n \t\t\t\t//if(test != null) {\n \t\t\t\t//int index = test.hashCode();\n \t\t\t\t//Integer[] pair = {(x+MiniMap.radius), (z+MiniMap.radius)};\n \t\t\t\t//pairs.put(index, pair);\n \t\t\t\t//}\n \t\t\t\t\n \t\t\t\ty = getHighestBlockY(world, tx, tz);\n \t\t\t\tid = world.getBlockTypeIdAt(tx, y, tz);\n \t\t\t\t\n \t\t\t\tif(map.isTransparent(id)) {\n \t\t\t\t\tint ly = getHighestNonTransparentBlockY(world, tx, tz);\n \t\t\t\t\tfor(int m=ly; m<y; m++) {\n \t\t\t\t\tint nd = world.getBlockTypeIdAt(tx, m, tz);\n \t\t\t\t\tBufferedImage tile = map.getTexture(nd);\n \t\t\t\t\tgr.drawImage(tile, (x+radius)*16, (z+radius)*16, null);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tdy = ((y-py)*2 + (y-64));\n \t\t\t\tdiff = getRelativeShading(world, tx, y, tz)*15;\n \t\t\t\t\n \t\t\t\tdy = dy+diff+world.getBlockAt(tx, y+1, tz).getLightLevel()*5;\n \t\t\t\t\n \t\t\t\tif(MiniMapWidget.scale <= 0) {\n \t\t\t\t\n \t\t\t\tBufferedImage tile = map.getTexture(id);\n \t\t\t\t\n \t\t\t\tfor(int m=0; m<16; m++)\n \t\t\t\t\tfor(int n=0; n<16; n++) {\n \t\t\t\t\t\tColor color = new Color(tile.getRGB(m, n));\n \t\t\t\t\t\tint r = color.getRed() + dy;\n \t\t\t\t\t\tif (r > 255)\n \t\t\t\t\t\tr = 255;\n \t\t\t\t\t\tif (r < 0)\n \t\t\t\t\t\tr = 0;\n \t\t\t\t\t\tint g = (color.getGreen() + dy);\n \t\t\t\t\t\tif (g > 255)\n \t\t\t\t\t\tg = 255;\n \t\t\t\t\t\tif (g < 0)\n \t\t\t\t\t\tg = 0;\n \t\t\t\t\t\tint b = color.getBlue() + dy;\n \t\t\t\t\t\tif (b > 255)\n \t\t\t\t\t\tb = 255;\n \t\t\t\t\t\tif (b < 0)\n \t\t\t\t\t\tb = 0;\n \t\t\t\t\t\tcolor = new Color(r, g, b);\n \t\t\t\t\t\ttile.setRGB(m, n, color.getRGB());\n \t\t\t\t\t\tcolor = null;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tgr.drawImage(tile, (x+radius)*16, (z+radius)*16, null);\n \t\t\t\t} else {\n \t\t\t\t\tColor color = map.getColor(id);\n \t\t\t\t\tint r = color.getRed() + dy;\n \t\t\t\t\tif (r > 255)\n \t\t\t\t\tr = 255;\n \t\t\t\t\tif (r < 0)\n \t\t\t\t\tr = 0;\n \t\t\t\t\tint g = (color.getGreen() + dy);\n \t\t\t\t\tif (g > 255)\n \t\t\t\t\tg = 255;\n \t\t\t\t\tif (g < 0)\n \t\t\t\t\tg = 0;\n \t\t\t\t\tint b = color.getBlue() + dy;\n \t\t\t\t\tif (b > 255)\n \t\t\t\t\tb = 255;\n \t\t\t\t\tif (b < 0)\n \t\t\t\t\tb = 0;\n \t\t\t\t\tcolor = new Color(r, g, b);\n \t\t\t\t\timage.setRGB(x+image.getWidth()/2, z+image.getHeight()/2, color.getRGB());\n \t\t\t\t\tcolor = null;\n \t\t\t\t}\n \t\t\t}\n \t\tgr.dispose();\n \t\ttry {\n \t\t\tFile file = new File(\"test.png\");\n \t\t\tImageIO.write(image, \"png\", file);\n \t\t} catch (Exception e) {\n \t\t\t\n \t\t}\n \t\t// TODO Add pathing back\n \t\t//writePath(pairs);\n \t\tgr = this.image.getGraphics();\n \t\tgr.drawImage(image, 0, 0, 256, 256, null);\n \t\tgr.dispose();\n \t\t// Can we help stop the memory leak here?\n \t\timage.flush();\n \t\timage = null;\n \t}", "public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }", "public Map<MediaFileType, MediaFile> getArtworkMap() {\n Map<MediaFileType, MediaFile> artworkMap = new HashMap<>();\n List<MediaFile> mfs = getMediaFiles();\n for (MediaFile mf : mfs) {\n if (!mf.isGraphic()) {\n continue;\n }\n if (!artworkMap.containsKey(mf.getType())) {\n artworkMap.put(mf.getType(), mf);\n }\n }\n return artworkMap;\n }", "public TiledMap createMap() {\n map_inter = new MapTile[g_logic.MAP_WIDTH][g_logic.MAP_HEIGHT];\n \n //drawing stuff\n tiles = new Texture(Gdx.files.internal(\"packed/terrain.png\"));\n TextureRegion[][] splitTiles = TextureRegion.split(tiles, 54, 54);\n map = new TiledMap();\n MapLayers layers = map.getLayers();\n TiledMapTileLayer new_layer = new TiledMapTileLayer(g_logic.MAP_WIDTH, g_logic.MAP_HEIGHT, g_logic.ISO_WIDTH, g_logic.ISO_HEIGHT);\n \n //actual generation\n for (int x = 0; x < g_logic.MAP_WIDTH; x++) \n {\n for (int y = 0; y < g_logic.MAP_HEIGHT; y++) \n {\n char chara = '.';\n int ty = 0;\n int tx;\n if (x == 0 || x == g_logic.MAP_WIDTH-1)\n {\n tx = 1;\n chara = '#';\n }\n else\n {\n tx = 0; \n chara = '.';\n }\n \n //set up map tiles\n MapTile tile = new MapTile(x, y, tx, ty, chara);\n Gdx.app.log(\"Map gen\", \"Created a map tile @\" + x + \",\" + y + \" \" + tx + \" \" + ty + \" \" + chara);\n \n //put them in the internal map\n putInterMap(tile, x, y);\n \n //set up renderer cells\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n //y,x\n cell.setTile(new StaticTiledMapTile(splitTiles[tile.getTextureY()][tile.getTextureX()]));\n new_layer.setCell(x, y, cell);\n }\n }\n \n \n float y_off = g_logic.getYOffset();\n new_layer.setOffsetY(y_off);\n layers.add(new_layer);\n \n g_logic.setInterMap(map_inter);\n\n return map;\n }", "public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}", "private void initThumbPixelMap() {\n LogUtil.info(TAG, \"initThumbPixelMap() begin\");\n if (mThumbDrawable == null) {\n return;\n }\n if (mThumbDrawable instanceof StateElement) {\n try {\n setThumbPixelMapValues();\n } catch (IllegalArgumentException e) {\n mThumbPixelMap = getPixelMapFromDrawable(mThumbDrawable, true);\n mPressedThumbPixelMap = mThumbPixelMap;\n }\n } else {\n mThumbPixelMap = getPixelMapFromResId(true, false);\n mPressedThumbPixelMap = mThumbPixelMap;\n }\n LogUtil.info(TAG, \"initThumbPixelMap() end\");\n }", "public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}", "public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }" ]
[ "0.7692597", "0.6589291", "0.64315075", "0.6309046", "0.6285713", "0.6077793", "0.6069116", "0.5921604", "0.5894711", "0.5879806", "0.58697855", "0.58591753", "0.57848006", "0.57276577", "0.56428504", "0.56417817", "0.5611384", "0.5558216", "0.55096334", "0.55006135", "0.5500105", "0.5496343", "0.548999", "0.5479967", "0.54735553", "0.54561204", "0.5452143", "0.54451287", "0.5437855", "0.54345745", "0.5430492", "0.5418027", "0.5407963", "0.5403982", "0.5388985", "0.5387419", "0.5373276", "0.53695756", "0.53690696", "0.53650904", "0.53647155", "0.53589934", "0.53573275", "0.53547907", "0.5354097", "0.533834", "0.5322903", "0.5319927", "0.53198844", "0.5310556", "0.5303492", "0.530347", "0.53015035", "0.52980345", "0.5292331", "0.52640766", "0.5262229", "0.52619374", "0.5261578", "0.5251079", "0.5248387", "0.5247221", "0.5246137", "0.52160144", "0.5216006", "0.52153313", "0.52149016", "0.5213428", "0.520701", "0.5206853", "0.52000666", "0.5196435", "0.51961213", "0.51847124", "0.51817083", "0.5173776", "0.5162286", "0.51612157", "0.5156028", "0.5151493", "0.5151361", "0.5144745", "0.5137605", "0.5126363", "0.51176745", "0.5111973", "0.51103324", "0.51093584", "0.51034945", "0.5097946", "0.509543", "0.5094585", "0.50917447", "0.50904965", "0.5086452", "0.5086147", "0.5084418", "0.507989", "0.5074004", "0.50711626" ]
0.81190556
0
Planet posn. (RA) and offset
public double getRADegrees() { return raDegrees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Vector3f getPlanetPosition() {\r\n\t\tVector3f position = new Vector3f();\r\n\t\tdouble theta = Math.random() * 2 * Math.PI;\r\n\t\tdouble r = MathUtils.randRange(MIN_ORBITAL_RADIUS, MAX_ORBITAL_RADIUS);\r\n\t\tposition.x = (float) (r * Math.cos(theta));\r\n\t\tposition.z = (float) (r * Math.sin(theta));\r\n\t\t// Introduce y variation\r\n\t\tposition.y = (float) MathUtils.randRange(MIN_PLANET_Y, MAX_PLANET_Y);\r\n\t\treturn position;\r\n\t}", "godot.wire.Wire.Vector3 getPosition();", "public abstract Vec2 doorPosition();", "godot.wire.Wire.Vector3 getOrigin();", "godot.wire.Wire.Vector2 getPosition();", "private void adjustPlanetData()\n\t{\n\t\t//variables for function\n\t\tdouble meanAnomalyEarth;\n\t\tdouble helioLongEarth;\n\t\tdouble trueAnomalyEarth;\n\t\tdouble radiusVectorEarth;\n\t\tdouble meanAnomalyPlanet;\n\t\tdouble helioLongPlanet;\n\t\tdouble trueAnomalyPlanet;\n\t\tdouble radiusVectorPlanet;\n\t\tdouble geoLongPlanet;\n\t\tdouble declinationPlanet;\n\t\tdouble rightAscensionPlanet;\n\t\tdouble hourAnglePlanet;\n\t\tPlanet planet;\n\t\tdouble days;\n\t\tdouble n;\n\t\t\n\t\t//find number of days since epoch\n\t\tdays = ((userYear - 1990)* 365.25) + userDecimalDay + ((userMonth - 1) * 30);\n\t\t\n\t\t//normalize the number of days to the orbital period of the planet\n\t\tn = theCalculator.findN(earth.getOrbitalPeriod(), days);\n\t\t\t\t\n\t\t//calculate Mean Anomaly of earth\n\t\tmeanAnomalyEarth = theCalculator.findMeanAnomaly(earth, n);\n\t\t\n\t\t//calculate heliocentric longitude of earth\n\t\thelioLongEarth = theCalculator.findHeliocentricLongitude(earth, meanAnomalyEarth, n);\n\t\t\n\t\t//calculate true anomaly of earth\n\t\ttrueAnomalyEarth = theCalculator.findTrueAnomaly(earth, helioLongEarth);\n\t\t\n\t\t//calculate radius vector length for earth \n\t\tradiusVectorEarth = theCalculator.findVectorRadius(earth, trueAnomalyEarth);\n\t\t\n\t\t//for each planet except earth\n\t\tfor(int i = 0; i < planetList.size(); i++)\n\t\t{\n\t\t\t//get the Planet\n\t\t\tplanet = planetList.get(i);\n\t\t\t\n\t\t\t//normalize days\n\t\t\tn = theCalculator.findN(planet.getOrbitalPeriod(), days);\n\t\t\t\n\t\t\t//calculate mean anomaly\n\t\t\tmeanAnomalyPlanet = theCalculator.findMeanAnomaly(planet, n);\n\t\t\t\n\t\t\t//calculate heliocentric longitude\n\t\t\thelioLongPlanet = theCalculator.findHeliocentricLongitude(planet, meanAnomalyPlanet, n);\n\t\t\t\n\t\t\t//calculate true anomaly\n\t\t\ttrueAnomalyPlanet = theCalculator.findTrueAnomaly(planet, helioLongPlanet);\n\t\t\t\n\t\t\t//calculate radius vector length\n\t\t\tradiusVectorPlanet = theCalculator.findVectorRadius(planet, trueAnomalyPlanet);\n\t\t\t\t\t\t\n\t\t\t//calculate geocentric longitude\n\t\t\tString name = planet.getName();\n\t\t\tgeoLongPlanet = theCalculator.findGeocentricLongitude(name, radiusVectorPlanet, helioLongPlanet, radiusVectorEarth, helioLongEarth);\n\t\t\t\n\t\t\t//calculate and set declination \n\t\t\tdeclinationPlanet = theCalculator.findPlanetDeclination(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setDeclination(declinationPlanet);\n\t\t\t\n\t\t\t//calculate and set right ascension\n\t\t\trightAscensionPlanet = theCalculator.findPlanetRightAscension(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setRightAscension(rightAscensionPlanet);\n\t\t\t\n\t\t\t//calculate and set hour angle\n\t\t\thourAnglePlanet = theCalculator.findHourAngle(rightAscensionPlanet, userLocalTime);\n\t\t\tplanet.setHourAngle(hourAnglePlanet);\n\t\t\t\n\t\t\t//update planetList\n\t\t\tplanetList.set(i, planet);\n\t\t}\n\t}", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "godot.wire.Wire.Vector2 getOrigin();", "double getZ() { return pos[2]; }", "public void projectResponsePosition()\n {\n int width = Agar.GRID_SIZE.width;\n int height = Agar.GRID_SIZE.height;\n int nx, ny, sx, sy, wx, wy, ex, ey;\n\n nx = x;\n ny = ((y + 1) % height);\n wx = x - 1;\n if (wx < 0) { wx += width; }\n wy = y;\n ex = ((x + 1) % width);\n ey = y;\n sx = x;\n sy = y - 1;\n if (sy < 0) { sy += height; }\n switch (response)\n {\n case NORTHWEST:\n x2 = wx;\n y2 = ny;\n break;\n\n case NORTH:\n x2 = nx;\n y2 = ny;\n break;\n\n case NORTHEAST:\n x2 = ex;\n y2 = ny;\n break;\n\n case WEST:\n x2 = wx;\n y2 = wy;\n break;\n\n case STAY:\n x2 = x;\n y2 = y;\n break;\n\n case EAST:\n x2 = ex;\n y2 = ey;\n break;\n\n case SOUTHWEST:\n x2 = wx;\n y2 = sy;\n break;\n\n case SOUTH:\n x2 = sx;\n y2 = sy;\n break;\n\n case SOUTHEAST:\n x2 = ex;\n y2 = sy;\n break;\n }\n }", "@Test\n public void testGetPosition() {\n assertEquals(r1.getPosition(), new Position2D(50, 75));\n assertEquals(r2.getPosition(), new Position2D(-50, 75));\n assertEquals(r3.getPosition(), new Position2D(50, -75));\n assertEquals(r4.getPosition(), new Position2D(-50, -75));\n }", "double getVz() { return vel[2]; }", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "abstract double getOrgZ();", "public PVector getRawPosition(){\n\t\treturn this.leap.convert(this.arm.center());\n\t}", "protected int raster(int[] pos) {\n return FormatTools.positionToRaster(lengths, pos);\n }", "protected int[] pos(int raster, int[] pos) {\n return FormatTools.rasterToPosition(lengths, raster, pos);\n }", "DVector3C getOffsetPosition();", "private double[] getPositionOfSpaceObject(CTS_SpaceObject obj) {\n\t\tif (obj == null) {\n\t\t\t//System.out.println(\"null obj passed to getPositionOfSpaceObject!\");\n\t\t\treturn null;\n\t\t}\n\t\tdouble azimuth = obj.getAzimuth();\n\t\tdouble altitude = obj.getAltitude();\n\t\tif (altitude < 0 || altitude > 90) {\n\t\t\treturn null;\n\t\t}\n\t\tdouble radAlt = toRadians(altitude);\n\t\tdouble r = VIEWING_AREA_WIDTH / 2;\n\t\tdouble x_val, y_val, distanceFromCenter;\n\t\tdistanceFromCenter = abs(r*cos(radAlt));\n\t\t// x_val, y_val are coords relative to the center of the viewing area\n\t\t// being considered 0,0 on the Cartesian plane\n\t\tx_val = distanceFromCenter*(sin(toRadians(azimuth)));\n\t\ty_val = distanceFromCenter*(cos(toRadians(azimuth)));\n\t\t// view_x, view_y are the actual JavaFX coordinates to draw at\n\t\tdouble view_x = 0, view_y = 0;\n\t\tif (azimuth < 90) {\n\t\t\tview_x = x_val + 299;\n\t\t\tview_y = max(0,(299-y_val));\n\t\t} else if (azimuth < 180) {\n\t\t\tview_x = x_val + 299;\n\t\t\tview_y = min(599,(299-y_val));\n\t\t} else if (azimuth < 270) {\n\t\t\tview_x = max(0,(299+x_val));\n\t\t\tview_y = min(599,(299-y_val));\n\t\t} else {\n\t\t\tview_x = max(0,(299+x_val));\n\t\t\tview_y = max(0,(299-y_val));\n\t\t}\n\t\tdouble[] retval = { view_x, view_y};\n\t\treturn retval;\n\t}", "public double getOffset(){\n\t\tdouble percentHeight = networkTableValues.get(\"height\")/cameraHeightPixel;\n\t\t//Get the height of the frame in inches\n\t\tdouble cameraHeightInches = networkTableValues.get(\"height\")/percentHeight;\n\t\t//Get the width of the frame in inches\n\t\tdouble cameraWidthInches = cameraHeightInches*(cameraWidthPixel/cameraHeightPixel);\n\t\t//Get the distanceFromTower from the camera to the goal\n\t\tdistanceFromTower = (cameraWidthInches/2)/Math.tan(cameraFOV*(Math.PI/180));\n\t\t//Get the distanceFromTower from the camera to the base of the tower\n\t\tdouble horizontalDistance = Math.sqrt(Math.pow(distanceFromTower, 2) - Math.pow(towerHeight, 2));\n\t\t//Get offset in inches\n\t\tdouble distanceFromCenterInches = (networkTableValues.get(\"centerX\") / cameraWidthPixel)*cameraWidthInches;\n\t\tdouble offset = Math.atan((distanceFromCenterInches/distanceFromTower)*(180/Math.PI));\n\t\t\n\t\tSystem.out.println(\"OFFSET: \" + offset);\n\t\treturn offset;\n\t}", "Vector getPos();", "N getOrigin();", "public void adjLocation(double l){this.PlayerLocation;}", "public Body getPlanet() {\n return this.currentPlanet;\n }", "public Loc(int x, int y, int z, int r)\n\t\t{\n\t\t\tthis.x = x; this.y = y; this.z = z;\n\t\t\tthis.r = (byte)r;\n\t\t}", "godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder();", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "godot.wire.Wire.Vector3 getZ();", "private Vector3f calcPosition() {\r\n float y = (float) (distance * Math.sin(Math.toRadians(pitch)));\r\n float xzDistance = (float) (distance * Math.cos(Math.toRadians(pitch)));\r\n float x = (float) (xzDistance * Math.sin(Math.toRadians(rotation)));\r\n float z = (float) (xzDistance * Math.cos(Math.toRadians(rotation)));\r\n return new Vector3f(x + center.x, y + center.y, z + center.z);\r\n }", "public static Coord3D helios(Planet p, Observatory obs) {\n\n double T = (DateTimeUtils.jd(obs) - 2451545.0) / 36525;\n double T2 = T * T;\n double T3 = T2 * T;\n // longitude of ascending node\n double N = MathUtils.rev(p.getN(0) + p.getN(1) * T + p.getN(2) * T2 + p.getN(3) * T3);\n // inclination\n double i = p.getI(0) + p.getI(1) * T + p.getI(2) * T2 + p.getI(3) * T3;\n // Mean longitude\n double L = MathUtils.rev(p.getL(0) + p.getL(1) * T + p.getL(2) * T2 + p.getL(3) * T3);\n // semimajor axis\n double a = p.getA(0) + p.getA(1) * T + p.getA(2) * T2 + p.getA(3) * T3;\n // eccentricity\n double e = p.getE(0) + p.getE(1) * T + p.getE(2) * T2 + p.getE(3) * T3;\n // longitude of perihelion\n double P = MathUtils.rev(p.getP(0) + p.getP(1) * T + p.getP(2) * T2 + p.getP(3) * T3);\n double M = MathUtils.rev(L - P);\n double w = MathUtils.rev(L - N - M);\n // Eccentric anomaly\n double E0 = M + (180.0 / Math.PI) * e * MathUtils.sind(M) * (1 + e * MathUtils.cosd(M));\n double E = E0 - (E0 - (180.0 / Math.PI) * e * MathUtils.sind(E0) - M) / (1 - e * MathUtils.cosd(E0));\n while (Math.abs(E0 - E) > 0.0005) {\n E0 = E;\n E = E0 - (E0 - (180.0 / Math.PI) * e * MathUtils.sind(E0) - M) / (1 - e * MathUtils.cosd(E0));\n };\n double x = a * (MathUtils.cosd(E) - e);\n double y = a * Math.sqrt(1 - e * e) * MathUtils.sind(E);\n double r = Math.sqrt(x * x + y * y);\n double v = MathUtils.rev(MathUtils.atan2d(y, x));\n\n double xeclip = r * (MathUtils.cosd(N) * MathUtils.cosd(v + w) - MathUtils.sind(N) * MathUtils.sind(v + w) * MathUtils.cosd(i));\n double yeclip = r * (MathUtils.sind(N) * MathUtils.cosd(v + w) + MathUtils.cosd(N) * MathUtils.sind(v + w) * MathUtils.cosd(i));;\n double zeclip = r * MathUtils.sind(v + w) * MathUtils.sind(i);\n\n return new Coord3D(xeclip, yeclip, zeclip);\n }", "godot.wire.Wire.Vector2OrBuilder getPositionOrBuilder();", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "public Planet (double x, double y, double r, double m, double vx, double vy, Color c) {\n this.xCoor = x;\n this.yCoor = y;\n this.rad = r;\n this.mass = m;\n this.xVel = vx;\n this.yVel = vy;\n this.col = c; \n \n }", "protected abstract void calcOrigin();", "void locate(int pos, int[] ind) {\r\n\t\tind[0] = (int) pos / (dimx * dimy); // t\r\n\t\tind[1] = (pos % (dimx * dimy)) / dimy; // x\r\n\t\tind[2] = pos % (dimy); // y\r\n\t}", "public void setPosEnArcos(Position<Arco<E>> pos){\r\n\t\tposLA = pos;\r\n\t}", "public Position<Arco<E>> getPosEnArco(){\r\n\t\treturn posLA;\t\t\r\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}", "public int stapelPosition(Farbe farbe);", "private Point getEntityPosition(int position, int team) {\n\t\tint xOffset = position * (200);\n\t\tint xPos;\n\t\tif (team == 0) {\n\t\t\txPos = 800 - 100 - xOffset;\n\t\t} else {\n\t\t\txPos = 800 + 100 + xOffset;\n\t\t}\n\n\t\treturn new Point(xPos, 100);\n\t}", "godot.wire.Wire.Vector3 getX();", "private void initOffset(){\n\t\tdouble maxDistance = Math.sqrt(Math.pow(getBattleFieldWidth(),2) + Math.pow(getBattleFieldHeight(),2));\n\n\t\tif(eDistance < 100) { \n\t\t\toffset = 0;\n\t\t} else if (eDistance <=700){\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\n\t\t\t\toffset=eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset=-eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/8;\n\t\t}\n\t\telse {\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\t\t\t\toffset = eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset = -eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/4;\n\t\t}\n\t}", "void position(double x, double y, double z);", "godot.wire.Wire.Plane getPlaneValue();", "double getOffset();", "public Vector getLocation();", "public Location3D getRallyPoint () {\n return myRallyPoint;\n }", "protodef.b_math.coord getCoordInfo();", "public AABB a(World paramaqu, BlockPosition paramdt, Block parambec, float paramFloat, EnumDirection paramej)\r\n/* 147: */ {\r\n/* 148:175 */ if ((parambec.getType() == this) || (parambec.getType().getMaterial() == Material.air)) {\r\n/* 149:176 */ return null;\r\n/* 150: */ }\r\n/* 151:178 */ AABB localbrt = parambec.getType().a(paramaqu, paramdt, parambec);\r\n/* 152:180 */ if (localbrt == null) {\r\n/* 153:181 */ return null;\r\n/* 154: */ }\r\n/* 155:184 */ double d1 = localbrt.minX;\r\n/* 156:185 */ double d2 = localbrt.minY;\r\n/* 157:186 */ double d3 = localbrt.minZ;\r\n/* 158:187 */ double d4 = localbrt.maxX;\r\n/* 159:188 */ double d5 = localbrt.maxY;\r\n/* 160:189 */ double d6 = localbrt.maxZ;\r\n/* 161:192 */ if (paramej.g() < 0) {\r\n/* 162:193 */ d1 -= paramej.g() * paramFloat;\r\n/* 163: */ } else {\r\n/* 164:195 */ d4 -= paramej.g() * paramFloat;\r\n/* 165: */ }\r\n/* 166:197 */ if (paramej.h() < 0) {\r\n/* 167:198 */ d2 -= paramej.h() * paramFloat;\r\n/* 168: */ } else {\r\n/* 169:200 */ d5 -= paramej.h() * paramFloat;\r\n/* 170: */ }\r\n/* 171:202 */ if (paramej.i() < 0) {\r\n/* 172:203 */ d3 -= paramej.i() * paramFloat;\r\n/* 173: */ } else {\r\n/* 174:205 */ d6 -= paramej.i() * paramFloat;\r\n/* 175: */ }\r\n/* 176:207 */ return new AABB(d1, d2, d3, d4, d5, d6);\r\n/* 177: */ }", "@Override\n public int calculerSurface() {\n return (int)(Math.PI * carre(rayon));\n }", "public Location getOffset() {\n\t\treturn pos;\n\t}", "@Override\n\tpublic double getZLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn z-side;\n\t}", "public Position<Arco<E>> getPosEnEntrante(){\r\n\t\treturn posV2;\r\n\t}", "MapLocation getPosition(Unit unit);", "@Override\n\tString getName() {\n\t\treturn \"Planet\"+\": \"+name;\n\t}", "Vector2 getPosition();", "public float particleOffset(int axis);", "void copyOffsetPosition (DVector3 pos);", "public Planet(Planet p){\n\t\tthis.xxPos=p.xxPos;\n\t\tthis.yyPos=p.yyPos;\n\t\tthis.xxVel=p.xxVel;\n\t\tthis.yyVel=p.yyVel;\n\t\tthis.mass=p.mass;\n\t\tthis.imgFileName=p.imgFileName;\n\t}", "public Vector2D getPosition ();", "private void init() {\r\n\r\n\t\tPlanetLayoutGenerator gen = new PlanetLayoutGenerator();\r\n\t\tint planetCount = 15;\r\n\t\tint width = 5, height = 5, depth = 5;\r\n\t\tint[][][] layout = gen.generate(width, height, depth, planetCount);\r\n\t\tfinal float minSize = 4, maxSize = 10;\r\n\t\tfinal float gap = (C.World.PlanetBoxSize - maxSize*width)/(width-1);\r\n\r\n\t\tTextureRegion textures[] = new TextureRegion[] {\r\n\t\t\tassets.planetNeptune,\r\n\t\t\tassets.planetSaturn,\r\n\t\t\tassets.planetEarth,\r\n\t\t};\r\n\t\tfloat x = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat y = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat z = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\r\n\t\tfor (int ix = 0; ix < width; ++ix) {\r\n\t\t\tfor (int iy = 0; iy < height; ++iy) {\r\n\t\t\t\tfor (int iz = 0; iz < depth; ++iz) {\r\n\t\t\t\t\tif (layout[ix][iy][iz] == 1) {\r\n\t\t\t\t\t\tTextureRegion tex = textures[(ix+iy+iz)%3];\r\n\t\t\t\t\t\tfloat size = MathUtils.random(minSize, maxSize);\r\n\r\n\t\t\t\t\t\tfactory.createPlanet(x+ix*(maxSize+gap), y+iy*(maxSize+gap), z+iz*(maxSize+gap), size, 0, tex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tEntity player = factory.createPlayerShip(0, 0, 5);\r\n\t\tplayerSystem.setPlayer(player);\r\n\r\n\t\tcollisions.relations.connectGroups(CollisionGroups.PLAYER_2D, CollisionGroups.PLANETS_2D);\r\n\t}", "public int getRayonV(){\r\n\t\treturn rayonV;\r\n\t}", "org.landxml.schema.landXML11.TrafficControlPosition xgetControlPosition();", "double[] calculateIntercept(ksp.Planet planet, double r1, double r2) {\n // r1 = initial radius of circular orbit\n // r2 = the targets radius of circular orbit\n // SGP = standard gravitation parameter = GM and is different for each astronomical body\n double SGP = planet.standardGravitationalParameter;\n // The radius's provided do not include the planets radius so this must be added\n r1 = r1 + planet.radius;\n r2 = r2 + planet.radius;\n \n // TODO Trying (360 - ) rather than (180 - ) because otherwise following the kerbal engineer readout you (might? not tested) burn at the wrong time\n double phaseAngle = 360 - (Math.sqrt(SGP / Math.pow(r2, 3)) * Math.PI * Math.sqrt(Math.pow((r1 + r2), 3) / (8 * SGP)));\n double deltaV = Math.sqrt(SGP / r1) * (Math.sqrt((2 * r2) / (r1 + r2)) - 1);\n \n // Round the values to 1 decimal place\n phaseAngle = round(phaseAngle, 1);\n deltaV = round(deltaV, 1);\n \n // System.out.println(\"Radius 1 \" + r1 + \" , Radius 2 \" + r2 + \" SGP \" + SGP + \" phaseAngle \" + phaseAngle + \" delta V \" + deltaV);\n return new double[]{deltaV, phaseAngle};\n }", "private Vec3 getLightPosition() {\r\n\t\tdouble elapsedTime = getSeconds() - startTime;\r\n\t\tfloat x = 5.0f * (float) (Math.sin(Math.toRadians(elapsedTime * 50)));\r\n\t\tfloat y = 2.7f;\r\n\t\tfloat z = 5.0f * (float) (Math.cos(Math.toRadians(elapsedTime * 50)));\r\n\t\treturn new Vec3(x, y, z);\r\n\r\n\t\t//return new Vec3(5f,3.4f,5f); // use to set in a specific position for testing\r\n\t}", "public Planet(Vector2 pos, Vector2 vel, double mass, double radius) {\n this.name = null;\n this.mass = mass;\n this.radius = radius;\n \n this.pos = pos;\n this.vel = vel;\n }", "Tile getPosition();", "public int getDesplaceOffsetX(){\n\t\tif(style==Style.ROUTES){\r\n\t\t\treturn -10;\r\n\t\t}else{\r\n\t\t\treturn -6;\r\n\t\t}\r\n\t}", "public int getLon();", "int getRawOffset();", "public int PositionGet();", "public void testOctaedre() {\n\t\t\t\n\t\t\tSolide i = Octaedre.octaedre();\n\t\t\t\n\t\t\t/* creation de points qui ont les memes coordonnees que ceux qui \n\t\t\t * constituent notre solide (car octaedre() n'a pas de parametres)\n\t\t\t */\n\t\t\t\n\t\t\tPoint p1 = new Point(-25, 0,-25);\n\t\t\tPoint p2 = new Point(-25, 0,25);\n\t\t\tPoint p3 = new Point(25, 0,-25);\n\t\t\tPoint p4 = new Point(25,0,25);\n\t\t\tfloat hauteur = (float) (50/Math.sqrt(2));\n\t\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\n\t\t\tPoint p5 = new Point(0, hauteur,0);\n\t\t\tPoint p6 = new Point(0,-hauteur,0);\n\t\t\t\n\t\t\t//On teste si les points de l'octaedre i sont bien les memes que ceux créés\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getAbscisse()==(p1.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(1).getAbscisse()==(p2.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(5).getAbscisse()==(p3.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(3).getAbscisse()==(p4.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(2).getAbscisse()==(p5.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(0).getAbscisse()==(p6.getAbscisse()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getOrdonnee()==(p1.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(1).getOrdonnee()==(p2.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(5).getOrdonnee()==(p3.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(3).getOrdonnee()==(p4.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(2).getOrdonnee()==(p5.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(0).getOrdonnee()==(p6.getOrdonnee()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getProfondeur()==(p1.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(1).getProfondeur()==(p2.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(5).getProfondeur()==(p3.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(3).getProfondeur()==(p4.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(2).getProfondeur()==(p5.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(0).getProfondeur()==(p6.getProfondeur()));\n\t\t\t\n\t\t\t//On teste si les faces de l'octaedre contiennent bien les points créés\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(0).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(1).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(2).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(3).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p6));\n\t\t\n\t\t\tassertTrue(i.getFaces().get(4).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(5).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(6).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(7).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p6));\n\t\t\t\n\t\t\t\n\t\t\t\n\t}", "godot.wire.Wire.Vector2 getX();", "@Override\n\tpublic Point estTraversePar(Rayon r) {\n\t\tassert r != null;\n\t\tint i, indice;\n\t\tdouble distanceMin = 0.0;\n\t\tPoint point;\n\t\tPoint pointReturn = null;\n\t\t\n\t\tfor (i = 0; i<6; i++) {\n\t\t\tpoint = this.plans.get(i).estTraversePar(r);\n\t\t\tindice = this.appartientCube(point);\n\t\t\t\n\t\t\tif (point != null & indice != -1) {\n\t\t\t\tif ((distanceMin > point.distance(r.getOrigine()) | distanceMin < Objet3D.EPSILON) ) {\n\t\t\t\t\tpointReturn = point.copie();\n\t\t\t\t\tdistanceMin = pointReturn.distance(r.getOrigine());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pointReturn;\n\t}", "protected int[] pos(int raster) {\n return FormatTools.rasterToPosition(lengths, raster);\n }", "public int getX() { return loc.x; }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public static void main(String[] args) {\n \n String [] nomePlanetas = {\"Terra\",\"Marte\",\"Plutão\",\"Venuz\"};\n \n //imprimi o valor do vetor na posição\n System.out.println(\"O nome do planeta é: \"+nomePlanetas[3]);\n \n \n }", "double getY() { return pos[1]; }", "String getLawnPosition();", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "public void setPosEnEntrante(Position<Arco<E>> pos){\r\n\t\tposV2 = pos;\r\n\t}", "public Position getRobotPadPosition();", "double getVy() { return vel[1]; }", "public Vector2 getPosition();", "public abstract int getRawOffset();", "public abstract int getRawOffset();", "public double calcDistance(Planet p){\n\t\treturn(Math.sqrt((this.xxPos-p.xxPos)*(this.xxPos-p.xxPos)\n\t\t\t+(this.yyPos-p.yyPos)*(this.yyPos-p.yyPos)));\n\t}", "@Override\n\tpublic void setPositions(){\n\t\ttirePositions[0]=new Vector2(2f,-2.9f);// Rear\n\t\ttirePositions[1]=new Vector2(-2f,-2.9f); \n\n\t\ttirePositions[2]=new Vector2(2f,2.8f); //Fronts\n\t\ttirePositions[3]=new Vector2(-2f,2.8f);\n\t}", "public void leerPlanesDietas();", "godot.wire.Wire.Vector3OrBuilder getOriginOrBuilder();", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "Point getPosition();", "Point getPosition();", "public Planet(Planet p){\n\t\txxPos=p.xxPos;\n\t\tyyPos=p.yyPos;\n\t\txxVel=p.xxVel;\n\t\tyyVel=p.yyVel;\n\t\tmass=p.mass;\n\t\timgFileName=p.imgFileName;\n\t}", "public Vector[] getCardinalPoints(){\r\n\t\tVector[] ret = new Vector[4];\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tret[i] = getPosition().add(new Vector(dx[i] * Tile.SIZE, dy[i] * Tile.SIZE));\r\n\t\treturn ret;\r\n\t}", "public Position position();", "AngleResource inclination();", "public ParkingSpot(Level lvl, int ro, int no, VehicleSize vs){\r\n numOfSp = no;\r\n row = ro;\r\n lv = lvl;\r\n sizeOfSp = vs;\r\n lv = lvl;\r\n }", "private Ray constructReflectedRay(Vector n, Point3D p, Ray l) { // hish\r\n\t\tVector _n = n;// normal at point\r\n\t\tVector _v = l.get_dir(); // direction of vector camera ->geometry\r\n\t\tdouble vn = _v.dotProduct(_n);\r\n\t\tif (vn == 0)\r\n\t\t\treturn null;\r\n\r\n\t\tVector _r = _v.add(_n.scale(-2 * vn));\r\n\t\treturn new Ray(p, _r, _n);\r\n\t}", "godot.wire.Wire.Vector3 getY();" ]
[ "0.6533833", "0.5896695", "0.58836955", "0.5804302", "0.5801189", "0.5784429", "0.5766391", "0.57476085", "0.5719608", "0.56631464", "0.56467414", "0.56391615", "0.5579488", "0.5550368", "0.55234605", "0.55101234", "0.5495934", "0.5447249", "0.54460347", "0.54249585", "0.541857", "0.5413456", "0.540901", "0.5376182", "0.53646934", "0.5363682", "0.5353859", "0.5343996", "0.53413296", "0.53375775", "0.53333914", "0.53321356", "0.53227806", "0.5311341", "0.53040576", "0.5302236", "0.52898", "0.5286024", "0.5279471", "0.52366865", "0.52282596", "0.5221068", "0.52020663", "0.51956135", "0.5193898", "0.5176273", "0.5175924", "0.5172073", "0.51714057", "0.5165815", "0.5157948", "0.51559836", "0.5149016", "0.51474875", "0.51442087", "0.5135669", "0.51349205", "0.51336694", "0.5130472", "0.512256", "0.51195484", "0.5116465", "0.51128703", "0.51118153", "0.5109886", "0.51096666", "0.51073086", "0.50986046", "0.50958323", "0.5079364", "0.50775677", "0.5063193", "0.5059334", "0.50556785", "0.50533897", "0.50507283", "0.5049028", "0.50474024", "0.504704", "0.5046235", "0.50453556", "0.5044469", "0.50402397", "0.5035007", "0.5030954", "0.5027151", "0.5027151", "0.50255513", "0.5024752", "0.5017946", "0.50124025", "0.500599", "0.50031626", "0.50031626", "0.50017977", "0.50005656", "0.49991104", "0.49970087", "0.49964514", "0.4990108", "0.49834365" ]
0.0
-1
Set Right Ascension (degrees)
public void setRADegrees(double degrees) { this.raDegrees = degrees; this.ra = Math.toRadians(degrees); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public void setRight(int x) {\r\n rightSide = x;\r\n }", "@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}", "public UtilsPadding setRight(Number right) {\n if (jsBase == null) {\n this.right = null;\n this.right1 = null;\n \n this.right = right;\n } else {\n this.right = right;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".right(%s)\", right));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".right(%s);\", right));\n js.setLength(0);\n }\n }\n return this;\n }", "public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}", "@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}", "public static void setRight(char right) {\n\t\t\tGamePreferences.right = right;\n\t\t}", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "public Direction toLeft()\n {\n return new Direction(dirInDegrees - (FULL_CIRCLE / 4));\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }", "public void rotateRight() {\n\t\tif (rotRight == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(-90), 0f);\n\t\t\trotRight = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotRight);\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public static int rotateRight(int dir) {\n return (dir - 1) & 3;\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "void setLeftToRight(boolean ltor);", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "public Direction rotate90() {\n return values()[r90index];\n }", "public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }", "@NotNull\n @Override\n public OctilinearDirection toOctilinear() {\n Direction direction;\n double diff = angle % 45;\n if (diff < 45 / 2) {\n direction = fromAngle(angle - diff);\n }\n else {\n direction = fromAngle(angle + (45 - diff));\n }\n return direction.toOctilinear();\n }", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public Direction toRight(int deg)\n {\n return new Direction(dirInDegrees + deg);\n }", "public static void setsRight(char sRight) {\n\t\t\tGamePreferences.sRight = sRight;\n\t\t}", "public double getRight() {\n return this.xR;\n }", "public void setDirection(float directionDegree);", "public MutableImage rotateRight() {\n return rotate(90);\n }", "public void justifyRight() {\n\t\tleft.right();\n\t}", "public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}", "public abstract void rotateRight();", "public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public static char getsRight() {\n\t\t\treturn sRight;\n\t\t}", "public float getRight() {\r\n\t\treturn left + width;\r\n\t}", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public Shape rotateRight()\n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, -y(i));\n\t\t\tresult.setY(i, x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public UtilsPadding setRight(String right1) {\n if (jsBase == null) {\n this.right = null;\n this.right1 = null;\n \n this.right1 = right1;\n } else {\n this.right1 = right1;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".right(%s)\", wrapQuotes(right1)));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".right(%s);\", wrapQuotes(right1)));\n js.setLength(0);\n }\n }\n return this;\n }", "public Direction right() {\n\t\treturn right;\n\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "@Override\n public void reAngle() {\n }", "public char getFillingDirection() {\n\t\treturn dir;\n\t}", "public int getRightX() {\n\t\treturn 0;\r\n\t}", "@JSProperty(\"right\")\n void setRight(Chart3dFrameRightOptions value);", "@Override\r\n\tpublic String moveRight() {\n\t\tif((0<=x && x<50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((40<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}", "public void setDirection(int dir) {\n if((dir % 10) == 0 && dir <=350 && dir >=0) {\n this.directionDegree = dir; \n } else {\n throw new IllegalArgumentException(\"Direction \" + dir +\" is not valid. Directions must be between 0/350 in multiples of 10\"); \n }\n }", "@Override\n public void turnRight(Double angle) {\n turnLeft(angle * -1);\n }", "public static int rotateLeft(int dir) {\n return (dir + 1) & 3;\n }", "public void setPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n leftFront.setPower(left);\n leftRear.setPower(left);\n rightFront.setPower(right);\n rightRear.setPower(right);\n }", "@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}", "public void setRight(IAVLNode node);", "public void setRight(IAVLNode node);", "public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }", "public void setRight(Lane right) {\r\n\t\tthis.right = right;\r\n\t}", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }", "private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }", "public void setRight (Node r) {\r\n\t\tright = r;\r\n\t}", "void resetAngle();", "public Direction rotate180() {\n return values()[r180index];\n }", "public Direction toLeft(int deg)\n {\n return new Direction(dirInDegrees - deg);\n }", "public LeftWallToRightScaleArc() {\n\t\tsuper();\n\t\tthis.highGear = true;\n\t\tcenterProfile = new SrxMotionProfile(centerPoints.length, centerPoints);\n\t}", "public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}", "public void rotateRight(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation + step > 360 )\r\n\t\t\trotation = rotation + step - 360;\r\n\t\telse\r\n\t\t\trotation += step;\r\n\t}", "OrthogonalDir(int rSign, int cSign) {\r\n\r\n //self-check: code will not compile w/ non-orthogonal directions\r\n if (rSign != 0 && cSign != 0) {\r\n throw new IllegalArgumentException(\"Marble Solitaire moves must only be in one direction\");\r\n }\r\n\r\n this.rSign = rSign / Math.max(Math.abs(rSign), 1); //avoid div by 0 w/o changing behavior\r\n this.cSign = cSign / Math.max(Math.abs(cSign), 1); //avoid div by 0 w/o changing behavior\r\n }", "private Node rotateRight(Node h){\n\t\tNode x = h.left;\n\t\th.left = x.right;\n\t\tx.right = h;\n\t\tx.color = h.color;\n\t\th.color = RED;\n\t\treturn x;\n\t}", "@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}", "public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public void setRight(BinNode<E> r)\n {\n right = r;\n }", "public TextRotation getRotationRelativity();", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "private void rightRotateFixup(RedBlackNode y){\n\n // Przypadek 1: tylko y, y.left i y.left.left są nil.\n if (isNil(y.right) && isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 0;\n y.left.numRight = 1;\n }\n\n // Przypadek 2: y.left.right istnieje w dodatku do przypadku 1\n else if (isNil(y.right) && !isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 2 + y.left.right.numRight +\n y.left.right.numLeft;\n }\n\n // Przypadek 3: y.right istnieje w dodatku do przypadku 1\n else if (!isNil(y.right) && isNil(y.left.right)){\n y.numLeft = 0;\n y.left.numRight = 2 + y.right.numRight +y.right.numLeft;\n\n }\n\n // Przypadek 4: y.right i y.left.right istnieją w dodatku do przypadku 1\n else{\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 3 + y.right.numRight +\n y.right.numLeft +\n y.left.right.numRight + y.left.right.numLeft;\n }\n\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public int getRight () {\n\t\treturn right;\n\t}", "public void setRight(boolean right) {\n\t\tthis.right = right;\n\t}", "public char getDirection(){\n\t\treturn direction;\n\t}", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "public Direction right() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}", "public static Vector4 right()\n {\n return new Vector4(1,0,0,0);\n }", "@Override\r\n\tpublic void BuildArmRight() {\n\t\tg.drawLine(70, 50, 90, 100);\r\n\t}", "public void setAngle( double a ) { angle = a; }", "public Bearing rightFrom() {\n return this.get(((this.bearing + 2) + 8) % 8);\n }", "void moveRight() {\n\t\tsetX(x+1);\r\n\t\tdx=1;\r\n\t\tdy=0;\r\n\t}", "public void setOrientation(EditText facingCompass){\n if (facingCompass.getText().toString().matches(\"NORTH\")) {\n orientation = 0;\n rotateRight = orientation;\n angleF = 0;\n\n } else if (facingCompass.getText().toString().matches(\"EAST\")) {\n orientation = 1;\n rotateRight = orientation;\n angleF = 90;\n\n } else if (facingCompass.getText().toString().matches(\"SOUTH\")) {\n orientation = 2;\n rotateRight = orientation;\n angleF = 180;\n\n } else if (facingCompass.getText().toString().matches(\"WEST\")) {\n orientation = 3;\n rotateRight = orientation;\n angleF = 270;\n\n } else\n errorMessage(\"Invalid F Direction...\\ndefaulted to NORTH\");\n return;\n }", "public abstract void setDirection(int dir);", "public String asPolar(){\n// return \"<\" + this.getR() + \", ∠\" + this.getTheta() + \">\";\n return String.format(POLAR_FORMAT, this.getR(), this.getTheta());\n }", "public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }", "public void setRight(IAVLNode node) {\n\t\t\tthis.right = node; // to be replaced by student code\n\t\t}", "public void turnRight(int ticks){\n\t\tposition = (position - ticks)%40;\n\t\tif (position < 0)\n\t\t\tposition+=40;\n\t\tcount++;\n\t\tcheckTurn(ticks);\n\t}", "public void turnRight ()\n\t{\n\t\t//changeFallSpeed (1);\n\t\tturnInt = 1;\n\t}" ]
[ "0.6820031", "0.6656377", "0.65502876", "0.65245163", "0.64460844", "0.64153546", "0.63588804", "0.625995", "0.6149831", "0.6129019", "0.6111203", "0.6089629", "0.6086164", "0.60826975", "0.6063804", "0.605092", "0.6043463", "0.6038355", "0.60057837", "0.60011214", "0.5977318", "0.5956385", "0.59273016", "0.5919375", "0.58919036", "0.58904135", "0.58852226", "0.5879612", "0.5858485", "0.58359826", "0.5814339", "0.58072174", "0.5801226", "0.5773393", "0.57685024", "0.5732037", "0.573021", "0.572448", "0.5721109", "0.5719438", "0.57103246", "0.57022774", "0.56957227", "0.56914556", "0.5678381", "0.5668335", "0.56664", "0.5659634", "0.5621824", "0.56075245", "0.5606369", "0.5592131", "0.559146", "0.55858964", "0.5584041", "0.55833685", "0.55783343", "0.5571122", "0.5542678", "0.5535944", "0.55349505", "0.5531587", "0.5531587", "0.5530321", "0.552968", "0.55270886", "0.5524499", "0.55239385", "0.5514401", "0.55127794", "0.55109155", "0.5489506", "0.5487305", "0.54864436", "0.54802203", "0.54752237", "0.54733545", "0.54703265", "0.54678965", "0.5467554", "0.5467524", "0.5466302", "0.5464012", "0.54637104", "0.5460239", "0.54588294", "0.54536265", "0.5449812", "0.5446354", "0.5446243", "0.54450065", "0.54417926", "0.5432656", "0.54289484", "0.54277813", "0.54235023", "0.54178935", "0.5415654", "0.5414962", "0.5409742", "0.53987384" ]
0.0
-1
Set Right Ascension (rads)
public void setRA(double radians) { this.ra = radians; this.raDegrees = Math.toDegrees(radians); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void setRight(int x) {\r\n rightSide = x;\r\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "public void justifyRight() {\n\t\tleft.right();\n\t}", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}", "public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }", "public UtilsPadding setRight(Number right) {\n if (jsBase == null) {\n this.right = null;\n this.right1 = null;\n \n this.right = right;\n } else {\n this.right = right;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".right(%s)\", right));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".right(%s);\", right));\n js.setLength(0);\n }\n }\n return this;\n }", "private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }", "public static char getsRight() {\n\t\t\treturn sRight;\n\t\t}", "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "public static void setRight(char right) {\n\t\t\tGamePreferences.right = right;\n\t\t}", "void setLeftToRight(boolean ltor);", "public void setRight(BinNode<E> r)\n {\n right = r;\n }", "public Shape rotateRight()\n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, -y(i));\n\t\t\tresult.setY(i, x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static int rotateRight(int dir) {\n return (dir - 1) & 3;\n }", "public static void setsRight(char sRight) {\n\t\t\tGamePreferences.sRight = sRight;\n\t\t}", "public UtilsPadding setRight(String right1) {\n if (jsBase == null) {\n this.right = null;\n this.right1 = null;\n \n this.right1 = right1;\n } else {\n this.right1 = right1;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".right(%s)\", wrapQuotes(right1)));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".right(%s);\", wrapQuotes(right1)));\n js.setLength(0);\n }\n }\n return this;\n }", "public double getRight() {\n return this.xR;\n }", "@Override\r\n\tpublic void BuildArmRight() {\n\t\tg.drawLine(70, 50, 90, 100);\r\n\t}", "protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }", "public void setRight (Node r) {\r\n\t\tright = r;\r\n\t}", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "public Direction right() {\n\t\treturn right;\n\t}", "public int getRight () {\n\t\treturn right;\n\t}", "public void moveAsteroidLeftToRight() {\t\r\n\t\tsetY(this.getY()+1);\r\n\t}", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public String getRad() {\n\t\treturn rad;\r\n\t}", "public void setRight(IAVLNode node);", "public void setRight(IAVLNode node);", "public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}", "public MutableImage rotateRight() {\n return rotate(90);\n }", "public Squarelotron leftRightFlip(int ring);", "public void setPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n leftFront.setPower(left);\n leftRear.setPower(left);\n rightFront.setPower(right);\n rightRear.setPower(right);\n }", "@Override\n\tpublic void buildArmRight() {\n\t\tg.drawLine(70, 50, 100, 80);\n\t}", "public abstract void rotateRight();", "public void drawRightTriangle(){\n\t for(int i = 0; i < height; i++)\n\t {\n\t \tfor(int j = 0; j < width - 1; j++)\n\t \t{\n\t \t\tSystem.out.print(\" \");\n\t \t}\n\t \twidth--;\n\t \tfor(int k = height; k > width; k--)\n\t \t{\n\t \t\tSystem.out.print(appearance);\n\t \t}\n\t \tSystem.out.println(\"\");\n\t }\n\t}", "public int getRadWidth() {\n return radWidth;\n }", "private void rightRotateFixup(RedBlackNode y){\n\n // Przypadek 1: tylko y, y.left i y.left.left są nil.\n if (isNil(y.right) && isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 0;\n y.left.numRight = 1;\n }\n\n // Przypadek 2: y.left.right istnieje w dodatku do przypadku 1\n else if (isNil(y.right) && !isNil(y.left.right)){\n y.numRight = 0;\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 2 + y.left.right.numRight +\n y.left.right.numLeft;\n }\n\n // Przypadek 3: y.right istnieje w dodatku do przypadku 1\n else if (!isNil(y.right) && isNil(y.left.right)){\n y.numLeft = 0;\n y.left.numRight = 2 + y.right.numRight +y.right.numLeft;\n\n }\n\n // Przypadek 4: y.right i y.left.right istnieją w dodatku do przypadku 1\n else{\n y.numLeft = 1 + y.left.right.numRight +\n y.left.right.numLeft;\n y.left.numRight = 3 + y.right.numRight +\n y.right.numLeft +\n y.left.right.numRight + y.left.right.numLeft;\n }\n\n }", "public float getRight() {\r\n\t\treturn left + width;\r\n\t}", "protected int right(int i) { return 2 * i + 2; }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "public Line getRightLine() {\n\n return new Line(this.getupperRigth(), this.getdownRigth());\n\n }", "public void rotateRight() {\n\t\tif (rotRight == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(-90), 0f);\n\t\t\trotRight = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotRight);\n\t}", "private Node rightRotate(Node a) {\n Node b = a.getLeftChild();\n Node n3 = b.getRightChild();\n b.setRightChild(a);\n a.setLeftChild(n3);\n setHeights(a, b);\n return b;\n }", "public Location getRightArmEnd() {\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn r1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}", "public void setRight(boolean right) {\n\t\tthis.right = right;\n\t}", "@Override\n\tchar toChar() {\n\t\treturn 'R';\n\t}", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }" ]
[ "0.66044104", "0.6557008", "0.6497127", "0.64913785", "0.6436702", "0.63717145", "0.6328365", "0.631352", "0.62162095", "0.6203271", "0.6189533", "0.61402124", "0.6133792", "0.61070037", "0.60347456", "0.6031465", "0.6028417", "0.59745353", "0.5974486", "0.59431803", "0.59408087", "0.59243745", "0.59125376", "0.588889", "0.58821386", "0.5872783", "0.5872248", "0.58646804", "0.5845696", "0.5844695", "0.58381397", "0.58380127", "0.5831411", "0.582861", "0.5823376", "0.5823376", "0.5815602", "0.58064324", "0.57968503", "0.57729775", "0.5755164", "0.57504004", "0.5724168", "0.5720907", "0.5719719", "0.5705247", "0.5702735", "0.56988835", "0.56970143", "0.56864536", "0.56572026", "0.56321466", "0.5617076", "0.56133235", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328", "0.5610328" ]
0.0
-1
Return the Planet (by name) map.
public static Map<String,Planet> getPlanetsByName() { return planetsByName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Planet> getPlanets(){\n\t\treturn galaxy;\n\t}", "public static Map<Integer,Planet> getPlanetsByOrder() { return planetsByOrder; }", "@Override\n\tString getName() {\n\t\treturn \"Planet\"+\": \"+name;\n\t}", "public Planet[] getPlanets() {\n return this.planets;\n }", "private byte[] getSelectedPlanetSurface() {\r\n\t\tbyte[] mapBytes;\r\n\t\tPACEntry e = getSurface(gameWorld.player.selectedPlanet.surfaceType.index, gameWorld.player.selectedPlanet.surfaceVariant);\r\n\t\tif (e != null) {\r\n\t\t\tmapBytes = e.data;\r\n\t\t} else {\r\n\t\t\tmapBytes = EMPTY_SURFACE_MAP;\r\n\t\t}\r\n\t\treturn mapBytes;\r\n\t}", "public List<Planet> getPlanets() {\n return planet;\n }", "public static void createPlanets() {\n\t\tplanets = new PlanetV4[planetNames.length];\n\t\tfor (int i = 0; i < planetNames.length; i ++) {\n\t\t\tplanets[i] = new PlanetV4(planetNames[i], planetMasses[i], planetDiameters[i], planetPositions[i], planetVelocities[i], planetCircles[i]);\n\t\t\t//mainFrame.add(planets[i]);\n\t\t}\n\t}", "public List<Planet> getPlanets() {\n return planetList;\n }", "private void createPlanets()\n\t{\n\t\tdouble semimajorAxis;\n\t\tdouble eccentricityOfOrbit;\n\t\tdouble inclinationOnPlane;\n\t\tdouble perihelion;\n\t\tdouble longitudeOfAscendingNode;\n\t\tdouble meanLongitude;\n String unicode_icon;\n\t\t\n\t\tplanetList.clear();\n\t\t\n\t\t//*****************\n\t\t//create Mercury\n\t\t//*****************\n\t\tPlanet mercury = new Planet(\"Mercury\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 60.750646;\n\t\tsemimajorAxis = 0.387099;\n\t\teccentricityOfOrbit = 0.205633;\n\t\tinclinationOnPlane = 7.004540;\n\t\tperihelion = 77.299833;\n\t\tlongitudeOfAscendingNode = 48.212740;\n\t\t\n\t\tmercury.setUnicodeIcon(unicode_icon);\n\t\tmercury.setSemimajorAxis(semimajorAxis);\n\t\tmercury.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmercury.setInclinationOnPlane(inclinationOnPlane);\n\t\tmercury.setPerihelion(perihelion);\n\t\tmercury.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmercury.setMeanLongitude(meanLongitude);\n\t\tmercury.setOrbitalPeriod(0.24852);\n\t\tplanetList.add(mercury);\n\t\t\n\t\t//*****************\n\t\t//create Venus\n\t\t//*****************\n\t\tPlanet venus = new Planet(\"Venus\");\n\t\tunicode_icon = \"\\u2640\";\n\t\tmeanLongitude = 88.455855;\n\t\tsemimajorAxis = 0.723332;\n\t\teccentricityOfOrbit = 0.006778;\n\t\tinclinationOnPlane = 3.394535;\n\t\tperihelion = 131.430236;\n\t\tlongitudeOfAscendingNode = 76.589820;\n\t\t\n\t\tvenus.setUnicodeIcon(unicode_icon);\n\t\tvenus.setSemimajorAxis(semimajorAxis);\n\t\tvenus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tvenus.setInclinationOnPlane(inclinationOnPlane);\n\t\tvenus.setPerihelion(perihelion);\n\t\tvenus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tvenus.setMeanLongitude(meanLongitude);\n\t\tvenus.setOrbitalPeriod(0.615211);\n\t\tplanetList.add(venus);\n\t\t\n\t\t//*****************\n\t\t//create Earth\n\t\t//*****************\n\t\tearth = new Planet(\"Earth\");\n\t\tunicode_icon = \"\\u2695\";\t\n\t\tmeanLongitude = 99.403308;\n\t\tsemimajorAxis = 1.000;\n\t\teccentricityOfOrbit = 0.016713;\n\t\tinclinationOnPlane = 1.00;\n\t\tperihelion = 102.768413;\n\t\tlongitudeOfAscendingNode = 1.00;\n\t\t\n\t\tearth.setUnicodeIcon(unicode_icon);\n\t\tearth.setSemimajorAxis(semimajorAxis);\n\t\tearth.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tearth.setInclinationOnPlane(inclinationOnPlane);\n\t\tearth.setPerihelion(perihelion);\n\t\tearth.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tearth.setMeanLongitude(meanLongitude);\n\t\tearth.setOrbitalPeriod(1.00004);\n\t\t//earth not added to list, kept as separate object\n\t\t\n\t\t//*****************\n\t\t//create Mars\n\t\t//*****************\n\t\tPlanet mars = new Planet(\"Mars\");\n\t\tunicode_icon = \"\\u2642\";\n\t\tmeanLongitude = 240.739474;\n\t\tsemimajorAxis = 1.523688;\n\t\teccentricityOfOrbit = 0.093396;\n\t\tinclinationOnPlane = 1.849736;\n\t\tperihelion = 335.874939;\n\t\tlongitudeOfAscendingNode = 49.480308;\n\t\t\n\t\tmars.setUnicodeIcon(unicode_icon);\n\t\tmars.setSemimajorAxis(semimajorAxis);\n\t\tmars.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmars.setInclinationOnPlane(inclinationOnPlane);\n\t\tmars.setPerihelion(perihelion);\n\t\tmars.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmars.setMeanLongitude(meanLongitude);\n\t\tmars.setOrbitalPeriod(1.880932);\n\t\tplanetList.add(mars);\n\t\t\n\t\t//*****************\n\t\t//create Jupiter\n\t\t//*****************\n\t\tPlanet jupiter = new Planet(\"Jupiter\");\n\t\tunicode_icon = \"\\u2643\";\n\t\tmeanLongitude = 90.638185;\n\t\tsemimajorAxis = 5.202561;\n\t\teccentricityOfOrbit = 0.048482;\n\t\tinclinationOnPlane = 1.303613;\n\t\tperihelion = 14.170747;\n\t\tlongitudeOfAscendingNode = 100.353142;\n\t\t\n\t\tjupiter.setUnicodeIcon(unicode_icon);\n\t\tjupiter.setSemimajorAxis(semimajorAxis);\n\t\tjupiter.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tjupiter.setInclinationOnPlane(inclinationOnPlane);\n\t\tjupiter.setPerihelion(perihelion);\n\t\tjupiter.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tjupiter.setMeanLongitude(meanLongitude);\n\t\tjupiter.setOrbitalPeriod(11.863075);\n\t\tplanetList.add(jupiter);\n\t\t\n\t\t//*****************\n\t\t//create Saturn\n\t\t//*****************\n\t\tPlanet saturn = new Planet(\"Saturn\");\n\t\tunicode_icon = \"\\u2644\";\n\t\tmeanLongitude = 287.690033;\n\t\tsemimajorAxis = 9.554747;\n\t\teccentricityOfOrbit = 0.055581;\n\t\tinclinationOnPlane = 2.488980;\n\t\tperihelion = 92.861407;\n\t\tlongitudeOfAscendingNode = 113.576139;\n\t\t\t\t\n\t\tsaturn.setUnicodeIcon(unicode_icon);\n\t\tsaturn.setSemimajorAxis(semimajorAxis);\n\t\tsaturn.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tsaturn.setInclinationOnPlane(inclinationOnPlane);\n\t\tsaturn.setPerihelion(perihelion);\n\t\tsaturn.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tsaturn.setMeanLongitude(meanLongitude);\n\t\tsaturn.setOrbitalPeriod(29.471362);\n\t\tplanetList.add(saturn);\n\t\t\n\t\t//*****************\n\t\t//create Uranus\n\t\t//*****************\n\t\tPlanet uranus = new Planet(\"Uranus\");\n\t\tunicode_icon = \"\\u2645\";\n\t\tmeanLongitude = 271.063148;\n\t\tsemimajorAxis = 19.21814;\n\t\teccentricityOfOrbit = 0.046321;\n\t\tinclinationOnPlane = 0.773059;\n\t\tperihelion = 172.884833;\n\t\tlongitudeOfAscendingNode = 73.926961;\n\t\t\n\t\turanus.setUnicodeIcon(unicode_icon);\n\t\turanus.setSemimajorAxis(semimajorAxis);\n\t\turanus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\turanus.setInclinationOnPlane(inclinationOnPlane);\n\t\turanus.setPerihelion(perihelion);\n\t\turanus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\turanus.setMeanLongitude(meanLongitude);\n\t\turanus.setOrbitalPeriod(84.039492);\n\t\tplanetList.add(uranus);\n\t\t\n\t\t//*****************\n\t\t//create Neptune\n\t\t//*****************\n\t\tPlanet neptune = new Planet(\"Neptune\");\n\t\tunicode_icon = \"\\u2646\";\n\t\tmeanLongitude = 282.349556;\n\t\tsemimajorAxis = 30.109570;\n\t\teccentricityOfOrbit = 0.009003;\n\t\tinclinationOnPlane = 1.770646;\n\t\tperihelion = 48.009758;\n\t\tlongitudeOfAscendingNode = 131.670599;\n\t\t\n\t\tneptune.setUnicodeIcon(unicode_icon);\n\t\tneptune.setSemimajorAxis(semimajorAxis);\n\t\tneptune.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tneptune.setInclinationOnPlane(inclinationOnPlane);\n\t\tneptune.setPerihelion(perihelion);\n\t\tneptune.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tneptune.setMeanLongitude(meanLongitude);\n\t\tneptune.setOrbitalPeriod(164.79246);\n\t\tplanetList.add(neptune);\n\t\t\n\t\t//*****************\n\t\t//create Pluto\n\t\t//*****************\n\t\tPlanet pluto = new Planet(\"Pluto\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 246.77027;\n\t\tsemimajorAxis = 39.3414;\n\t\teccentricityOfOrbit = 0.24624;\n\t\tinclinationOnPlane = 17.1420;\n\t\tperihelion = 224.133;\n\t\tlongitudeOfAscendingNode = 110.144;\n\t\t\n\t\tpluto.setUnicodeIcon(unicode_icon);\n\t\tpluto.setSemimajorAxis(semimajorAxis);\n\t\tpluto.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tpluto.setInclinationOnPlane(inclinationOnPlane);\n\t\tpluto.setPerihelion(perihelion);\n\t\tpluto.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tpluto.setMeanLongitude(meanLongitude);\n\t\tpluto.setOrbitalPeriod(246.77027);\n\t\tplanetList.add(pluto);\n\t}", "public List<Plan> getPlanes() {\n\t\treturn planes;\n\t}", "public HashMap<String,SupplyNode> getMap(){\n return t;\n }", "public Planet(double x, double y, double velocity_x, double velocity_y, double my_mass, double my_radius,\r\n\t\t\tString name) {\r\n\t\tsuper(x, y, velocity_x, velocity_y, my_mass, my_radius, name);\r\n\t}", "public Plan getPlan(String planName);", "void loadPlanet(MapSaveSettings settings) {\r\n\t\ttry {\r\n\t\t\tif (renderer.surface == null) {\r\n\t\t\t\tcreatePlanetSurface(33, 66);\r\n\t\t\t}\r\n\t\t\tElement root = XML.openXML(settings.fileName);\r\n\t\t\tElement planet = XML.childElement(root, \"planet\");\r\n\t\t\tif (settings.surface) {\r\n\t\t\t\tdoClearSurfaces(false);\r\n\t\t\t\tElement surface = XML.childElement(planet, \"surface\");\r\n\t\t\t\tif (surface != null) {\r\n\t\t\t\t\tint width = Integer.parseInt(surface.getAttribute(\"width\"));\r\n\t\t\t\t\tint height = Integer.parseInt(surface.getAttribute(\"height\"));\r\n\t\t\t\t\tcreatePlanetSurface(width, height);\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(surface, \"tile\")) {\r\n\t\t\t\t\t\tString type = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tint id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tTile t = galaxyModel.planetTypes.get(type).tiles.get(id);\r\n\t\t\t\t\t\tSurfaceFeature sf = new SurfaceFeature();\r\n\t\t\t\t\t\tsf.id = id;\r\n\t\t\t\t\t\tsf.type = type;\r\n\t\t\t\t\t\tsf.location = Location.of(x, y);\r\n\t\t\t\t\t\tsf.tile = t;\r\n\t\t\t\t\t\trenderer.surface.features.add(sf);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(t, x, y, SurfaceEntityType.BASE, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (settings.buildings) {\r\n\t\t\t\tdoClearBuildings(false);\r\n\t\t\t\tElement buildings = XML.childElement(planet, \"buildings\");\r\n\t\t\t\tif (buildings != null) {\r\n\t\t\t\t\tString tech = null;\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(buildings, \"building\")) {\r\n\t\t\t\t\t\tString id = tile.getAttribute(\"id\");\r\n\t\t\t\t\t\ttech = tile.getAttribute(\"tech\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tBuilding b = new Building(buildingModel.buildings.get(id), tech);\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tb.location = Location.of(x, y);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tb.buildProgress = Integer.parseInt(tile.getAttribute(\"build\"));\r\n\t\t\t\t\t\tb.hitpoints = Integer.parseInt(tile.getAttribute(\"hp\"));\r\n\t\t\t\t\t\tb.setLevel(Integer.parseInt(tile.getAttribute(\"level\")));\r\n\t\t\t\t\t\tb.assignedEnergy = Integer.parseInt(tile.getAttribute(\"energy\"));\r\n\t\t\t\t\t\tb.assignedWorker = Integer.parseInt(tile.getAttribute(\"worker\"));\r\n\t\t\t\t\t\tb.enabled = \"true\".equals(tile.getAttribute(\"enabled\"));\r\n\t\t\t\t\t\tb.repairing = \"true\".equals(tile.getAttribute(\"repairing\"));\r\n\t\t\t\t\t\trenderer.surface.buildings.add(b);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(b.tileset.normal, x, y, SurfaceEntityType.BUILDING, b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tech != null) {\r\n\t\t\t\t\t\tplaceRoads(tech);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trenderer.repaint();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public Planet getLocation() {\r\n return location;\r\n }", "public static void main(String[] args) {\n for (Planet p : Planet.values()){\n System.out.println(p);\n }\n\n }", "public ArrayList<Planet> getModifiedPlanets()\n\t{\n\t\treturn planetList;\n\t}", "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "public static Map<Planet,ZImage> getLightImages()\n throws IOException\n {\n Map<Planet,ZImage> plImgMap = new HashMap<>();\n \n for( Planet planet: planetList )\n {\n System.out.print(\".\");\n BufferedImage bImage = ImageIO.read(new File(planet.getFileLight()));\n \n // Store image with some metadata\n ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.LIGHT_GRAY );\n plImgMap.put(planet, zimage);\n }\n \n return plImgMap;\n }", "public Planet()\n {\n super(30, 30, zellenGroesse);\n setBackground(\"images/boden.png\");\n setPaintOrder(String.class, Rover.class, Marke.class, Gestein.class, Huegel.class);\n Greenfoot.setSpeed(20); \n\n prepare();\n }", "private PACEntry getSurface(int surfaceType, int variant) {\r\n\t\tString mapName = \"MAP_\" + (char)('A' + (surfaceType - 1)) + variant + \".MAP\";\r\n\t\treturn gfx.getMap(mapName);\r\n\t}", "public static Map<Planet,ZImage> getDarkImages()\n throws IOException\n {\n Map<Planet,ZImage> plImgMap = new HashMap<>();\n \n for( Planet planet: planetList )\n {\n System.out.print(\".\");\n BufferedImage bImage = ImageIO.read(new File(planet.getFileDark()));\n \n // Store image with some metadata\n ZImage zimage = new ZImage( bImage, Constants.SCALEDP, Constants.SCALEDP, Color.BLACK );\n plImgMap.put(planet, zimage);\n }\n \n return plImgMap;\n }", "public Planet(Planet p){\n\t\tthis.xxPos=p.xxPos;\n\t\tthis.yyPos=p.yyPos;\n\t\tthis.xxVel=p.xxVel;\n\t\tthis.yyVel=p.yyVel;\n\t\tthis.mass=p.mass;\n\t\tthis.imgFileName=p.imgFileName;\n\t}", "@Override\n\tpublic synchronized Map<IOFSwitch, Map<Tenant3, Map<VirtualNetwork, Map<Host, OFPort>>>> getTable() {\n\n\t\treturn switchTenantVirtualNetworkMap;\n\t}", "private static void initPlanets(){\r\n CelestialBody Sun = new CelestialBody(\"Sun\", Color.YELLOW, 50);\r\n \r\n initNewCelestialBody(new CelestialBody(\"Mercury\", Color.GRAY, 10, Sun, 0.3870, 0.3788, 0.0796));\r\n initNewCelestialBody(new CelestialBody(\"Venus\", Color.GREEN, 20, Sun, 0.7219, 0.7219, 0.0049));\r\n initNewCelestialBody(new CelestialBody(\"Earth\", Color.BLUE, 25, Sun, 1.0027, 1.0025, 0.0167));\r\n initNewCelestialBody(new CelestialBody(\"Mars\", Color.RED, 20, Sun, 1.5241, 1.5173, 0.1424));\r\n initNewCelestialBody(new CelestialBody(\"Jupiter\", Color.BEIGE, 50, Sun, 5.2073, 5.2010, 0.2520));\r\n initNewCelestialBody(new CelestialBody(\"Saturn\", Color.CHOCOLATE, 40, Sun, 9.5590, 9.5231, 0.5181));\r\n initNewCelestialBody(new CelestialBody(\"Uranus\", Color.AQUAMARINE, 30, Sun, 19.1848, 19.1645, 0.9055));\r\n initNewCelestialBody(new CelestialBody(\"Neptune\", Color.AQUA, 30, Sun, 30.0806, 30.0788, 0.2687));\r\n \r\n initNewCelestialBody(Sun);\r\n renderService.setFocus(getPlanetController(\"Sun\"));\r\n }", "private void init() {\r\n\r\n\t\tPlanetLayoutGenerator gen = new PlanetLayoutGenerator();\r\n\t\tint planetCount = 15;\r\n\t\tint width = 5, height = 5, depth = 5;\r\n\t\tint[][][] layout = gen.generate(width, height, depth, planetCount);\r\n\t\tfinal float minSize = 4, maxSize = 10;\r\n\t\tfinal float gap = (C.World.PlanetBoxSize - maxSize*width)/(width-1);\r\n\r\n\t\tTextureRegion textures[] = new TextureRegion[] {\r\n\t\t\tassets.planetNeptune,\r\n\t\t\tassets.planetSaturn,\r\n\t\t\tassets.planetEarth,\r\n\t\t};\r\n\t\tfloat x = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat y = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat z = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\r\n\t\tfor (int ix = 0; ix < width; ++ix) {\r\n\t\t\tfor (int iy = 0; iy < height; ++iy) {\r\n\t\t\t\tfor (int iz = 0; iz < depth; ++iz) {\r\n\t\t\t\t\tif (layout[ix][iy][iz] == 1) {\r\n\t\t\t\t\t\tTextureRegion tex = textures[(ix+iy+iz)%3];\r\n\t\t\t\t\t\tfloat size = MathUtils.random(minSize, maxSize);\r\n\r\n\t\t\t\t\t\tfactory.createPlanet(x+ix*(maxSize+gap), y+iy*(maxSize+gap), z+iz*(maxSize+gap), size, 0, tex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tEntity player = factory.createPlayerShip(0, 0, 5);\r\n\t\tplayerSystem.setPlayer(player);\r\n\r\n\t\tcollisions.relations.connectGroups(CollisionGroups.PLAYER_2D, CollisionGroups.PLANETS_2D);\r\n\t}", "void parseOriginalPlanet() {\r\n\t\tXElement e = rl.getXML(\"campaign/main/planets_old\");\r\n\t\tfor (XElement planet : e.childrenWithName(\"planet\")) {\r\n\t\t\tOriginalPlanet op = new OriginalPlanet();\r\n\t\t\top.name = planet.get(\"id\");\r\n\t\t\top.surfaceType = planet.childValue(\"type\");\r\n\t\t\top.location.x = Integer.parseInt(planet.childValue(\"location-x\"));\r\n\t\t\top.location.y = Integer.parseInt(planet.childValue(\"location-y\"));\r\n\t\t\top.surfaceVariant = Integer.parseInt(planet.childValue(\"variant\"));\r\n\t\t\top.race = planet.childValue(\"race\");\r\n\t\t\tfor (XElement building : planet.childElement(\"buildings\").childrenWithName(\"building\")) {\r\n\t\t\t\tOriginalBuilding ob = new OriginalBuilding();\r\n\t\t\t\tob.name = building.childValue(\"id\");\r\n\t\t\t\tob.location = Location.of(Integer.parseInt(building.childValue(\"x\")), \r\n\t\t\t\t\t\tInteger.parseInt(building.childValue(\"y\")));\r\n\t\t\t\top.buildings.add(ob);\r\n\t\t\t}\r\n\t\t\toriginalPlanets.add(op);\r\n\t\t}\r\n\t}", "public Map<EntityMode,String> getTuplizerClassMap();", "public HashMap<String, List<OwnedWarp>> getTable() {\n return warps;\n }", "public ArrayList<Vehicle> getPlanes() {\n return vehicles.stream().filter(loc -> loc.getClass().getSuperclass().getSimpleName().equals(\"Plane\")).collect(Collectors.toCollection(ArrayList::new));\n }", "public Planet(Planet p){\n\t\txxPos=p.xxPos;\n\t\tyyPos=p.yyPos;\n\t\txxVel=p.xxVel;\n\t\tyyVel=p.yyVel;\n\t\tmass=p.mass;\n\t\timgFileName=p.imgFileName;\n\t}", "public void setPlanets(List<Planet> planets) {\n planetList = planets;\n }", "public Map<String, Object> getOverlayMap(String name) {\n Sheet sheet = sheetsByName.get(name);\n if (sheet != null) {\n return sheet.getMap();\n } else {\n return null;\n }\n }", "public HashMap<String, NeonValue> getMap();", "void savePlanet(MapSaveSettings settings) {\r\n\t\ttry {\r\n\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(settings.fileName), 1024 * 1024), \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\t\t\tout.printf(\"<planets>%n\");\r\n\t\t\t\tout.printf(\" <planet id='%s' x='%d' y='%d' radius='%d' type='%s' rotation='%s'>%n\", \"\", 0, 0, 30, \"rocky\", \"left-to-right\");\r\n\t\t\t\tif (settings.surface) {\r\n\t\t\t\t\tout.printf(\" <surface width='%d' height='%d'>%n\", renderer.surface.width, renderer.surface.height);\r\n\t\t\t\t\tfor (SurfaceFeature sf : renderer.surface.features) {\r\n\t\t\t\t\t\tout.printf(\" <tile type='%s' id='%s' x='%d' y='%d'/>%n\", sf.type, sf.id, sf.location.x, sf.location.y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tout.printf(\" </surface>%n\");\r\n\t\t\t\t}\r\n\t\t\t\tif (settings.buildings) {\r\n\t\t\t\t\tout.printf(\" <buildings>%n\");\r\n\t\t\t\t\tfor (Building b : renderer.surface.buildings) {\r\n\t\t\t\t\t\tout.printf(\" <building id='%s' tech='%s' x='%d' y='%d' build='%d' hp='%d' level='%d' worker='%d' energy='%d' enabled='%s' repairing='%s' />%n\",\r\n\t\t\t\t\t\t\t\tb.type.id, b.techId, b.location.x, b.location.y, b.buildProgress, b.hitpoints, b.upgradeLevel, b.assignedWorker, b.assignedEnergy, b.enabled, b.repairing);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tout.printf(\" </buildings>%n\");\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </planet>\");\r\n\t\t\t\tout.printf(\"</planets>\");\r\n\t\t\t} finally {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public Map<String, PhysicalStructure> getStructureNameToStructureMap() throws Exception {\n\t\tSet<DeployedPhysicalStructure> deployedStructures = getCurrentlyDeployedStructures();\n\t\t\n\t\tMap<String, PhysicalStructure> ret = new HashMap<String, PhysicalStructure>();\n\t\t\n\t\tfor (DeployedPhysicalStructure d : deployedStructures) {\n\t\t\tret.put(d.getName(), d.getStructure());\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public static Planet[] getNearbyPlanets(Planet p) {\n return bubbleSort(universe, p);\n }", "public Map<Profile, Archetype> getArchetypeMap() {\n return map;\n }", "public List<Street> getStreetsMap()\r\n {\r\n return streets_map;\r\n }", "public OMETIFFPlane[][] getPlaneInfo() {\n \t\t\treturn info;\n \t\t}", "public Planet getLocation() {\n\t\treturn currentLocation;\n\t}", "public Map<String, String> getTable() {\n return map; // TODO\n }", "public Planet(Planet p){\n\t\tmyXPos = p.myXPos;\n\t\tmyYPos = p.myYPos;\n\t\tmyXVel = p.myXVel;\n\t\tmyYVel = p.myYVel;\n\t\tmyMass = p.myMass;\n\t\tmyFileName = p.myFileName;\n\t}", "void createPlanetSurface(int width, int height) {\r\n\t\trenderer.surface = new PlanetSurface();\r\n\t\trenderer.surface.width = width;\r\n\t\trenderer.surface.height = height;\r\n\t\trenderer.surface.computeRenderingLocations();\r\n\t\tui.allocationPanel.buildings = renderer.surface.buildings;\r\n\t}", "public Map<String, Object> getInfo();", "public Planet(Planet p){\n\txxPos = p.xxPos;\n\tyyPos = p.yyPos;\n\txxVel = p.xxVel;\n\tyyVel = p.yyVel ;\n\tmass = p.mass;\n\timgFileName = new String(p.imgFileName);\n\t}", "public Prostor getProstor(String name){\r\n return mapa.get(name);\r\n }", "public HashMap<HexLocation, Port> parsePortsFromJSON(JSONArray portsJSON){\n HashMap<HexLocation, Port> newPortsMap = new HashMap<>();\n //go parse all the ports data in the Ports JSON array:\n for (int p = 0; p < portsJSON.length(); p++) {\n\n JSONObject currPortStringJSON = portsJSON.getJSONObject(p);\n //get the port's edgeDirection:\n String newPortEdgeDirString = currPortStringJSON.getString(\"direction\");\n //EdgeDirection newPortEdgeDir = exchangeStringForEdgeDirection(newPortEdgeDirString);\n EdgeDirection newPortEdgeDir = Converter.stringToEdgeDirection(newPortEdgeDirString);\n //get the port's location (as a HexLocation)\n JSONObject newPortHexLocJSON = currPortStringJSON.getJSONObject(\"location\");\n int nPHLx = newPortHexLocJSON.getInt(\"x\");\n int nPHLy = newPortHexLocJSON.getInt(\"y\");\n HexLocation newPortHexLoc = new HexLocation(nPHLx, nPHLy);\n\n //determine the port's type:\n //if its ratio is 2, get the resource. if its ratio is 3, set resourcetype to THREE.\n PortType newPortType;\n int newPortRatio = currPortStringJSON.getInt(\"ratio\");\n if (newPortRatio == 2) {\n String newPortTypeString = currPortStringJSON.getString(\"resource\");\n newPortType = Converter.stringToPortType(newPortTypeString);\n }\n else {\n //newPortRatio must be 3, so it's a generic port.\n newPortType = PortType.THREE;\n }\n //Build the new Port obj out of the three parts:\n Port newPort = new Port(newPortType, newPortHexLoc, newPortEdgeDir);\n\n newPortsMap.put(newPort.getLocation(), newPort);\n }\n\n return newPortsMap;\n }", "public Map<String, Host> getVmTable() {\n\t\treturn vmTable;\n\t}", "@Override\n\tpublic Map<Long, Sports> findAllMap() {\n\t\tList<Sports> list1 = shopRepository.findAll();\n\t\tMap<Long,Sports> map1 = new HashMap<Long,Sports>();\n\t\tfor (Sports i : list1) map1.put(i.getId(),i);\n\t\treturn map1;\n\t}", "public static Map<String, Map<String, List<Person>>> getPersonsGroupedByPlanetAndGender(List<Person> personsList)\n\t{\n\t\t\n\t\tMap<String, Map<String, List<Person>>> map = personsList.stream().collect(Collectors.groupingBy(Person::getPlanetOfResidence,Collectors.groupingBy(Person::getGender)));\n\n\t\treturn map;\n\t\t\n\t}", "public List<DataSource.PlanEntry> getPlanEntries () {\n return planEntries;\n }", "public Planet(Vector2 pos, Vector2 vel, double mass, double radius) {\n this.name = null;\n this.mass = mass;\n this.radius = radius;\n \n this.pos = pos;\n this.vel = vel;\n }", "public Map<String, Component> getMapa_componentes() {\r\n\t\treturn tabboxContendor.getMapa_componentes();\r\n\t}", "private void setupVariant1TerrainMap() {\n\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-4), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-3), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,-2), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,0), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,2), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,2), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,3), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,3), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,3), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,4), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,4), TerrainKind.FOREST);\n\t}", "public Body getPlanet() {\n return this.currentPlanet;\n }", "private void setupDefaultTerrainMap() {\n defaultTerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SMALL_FISHERY);\n\n defaultTerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n \t \tdefaultTerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t}", "@Override\n public Map<Integer, PenghuziPlayer> getSeatMap() {\n return seatMap;\n }", "public String getCurrentPlanet()\n\t{\n\t\treturn this.planet;\n\t}", "public static List<Planet> extractPlanetFromJson(String jsonString) {\n List<Planet> planets = new ArrayList<>();\n\n try {\n JSONArray planetsArray = new JSONArray(jsonString);\n\n for (int i = 0; i < planetsArray.length(); i++){\n JSONObject currentPlanet = planetsArray.getJSONObject(i);\n\n\n int id = currentPlanet.getInt(\"id\");\n String name = currentPlanet.getString(\"name\");\n int distance = currentPlanet.getInt(\"distance\");\n\n Planet planet = new Planet(id, name, distance);\n planets.add(planet);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Problem parsing the character JSON results\");\n }\n return planets;\n }", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "public abstract Map<String, Protein> getProteins();", "public Planet(double xP, double yP, double xV,\n double yV, double m, String img) {\n\t\txxPos = xP;\n\t\tyyPos = yP;\n\t\txxVel = xV;\n\t\tyyVel = yV;\n\t\tmass = m;\n\t\timgFileName =img;\n\t}", "public TerrainMap getTerrainMap(){\n\t\treturn this.terrainMap;\n\t}", "public void paintPlanet(Graphics g, Planet p)\n {\n g.setColor(p.getMapColor());\n double xLoc = topLeftX + mapWidth/2 + (p.getXPos()-p.getRadius())* scale;\n double yLoc = topLeftY + mapHeight/2 + (p.getYPos()-p.getRadius()) * scale;\n double diameter = 2 * p.getRadius() * scale;\n if(diameter < MIN_PLANET_DIAMETER)\n {\n diameter = MIN_PLANET_DIAMETER;\n }\n g.fillOval( (int)(Driver.scale*xLoc), (int)(Driver.scale*yLoc), (int)(Driver.scale*diameter), (int)(Driver.scale*diameter));\n }", "private Map<String, Drone> getDroneMap(){\n\t\treturn this.drones;\n\t}", "public Map<String, Factory> getFactoryMap(){\n\t\treturn factoryMap;\n\t}", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "public Planet getPlanetForPerson(Person nextPerson) {\n if (nextPerson == null) {\n return null;\n }\n String prefer = nextPerson.getPlanetPreference();\n if (this.getPlanetIndex(prefer) != -1 && this.canAccept(planets[this\n .getPlanetIndex(prefer)], nextPerson) &&\n !planets[this.getPlanetIndex(prefer)].isFull()) {\n return planets[this.getPlanetIndex(prefer)];\n }\n\n else if ((prefer == null || this.getPlanetIndex(prefer) == -1) && this\n .canAccept(this.getHighestCapacityPlanet(nextPerson), nextPerson)) {\n return this.getHighestCapacityPlanet(nextPerson);\n\n }\n\n return null;\n }", "public ArrayList<PoolMap> get_P_maps(){\n\n\t\treturn poolMaps;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn name + \" - \" + zoneType;\n\t}", "private void generateLayerAirports() {\n\t\tJSONObject geoJsonAirports = new JSONObject();\r\n\r\n\t\tgeoJsonAirports.put(\"type\", \"FeatureCollection\");\r\n\r\n\t\t// complete geoJsonAirports\r\n\t\tgeoJsonAirports.put(\"features\", _airportsFeatures);\r\n\r\n\t\t// generate String from geoJsonAirportsObject\r\n\t\t_airportsLayerString = geoJsonAirports.toString();\r\n\t}", "public Map<String, PhysicalStructure> getStructureBaseNameToStructureMap() throws Exception {\n\t\tSet<DeployedPhysicalStructure> deployedStructures = getCurrentlyDeployedStructures();\n\t\t\n\t\tMap<String, PhysicalStructure> ret = new HashMap<String, PhysicalStructure>();\n\t\t\n\t\tfor (DeployedPhysicalStructure d : deployedStructures) {\n\t\t\tret.put(d.getBasename(), d.getStructure());\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public Map<String, Object> getInfoMap()\n {\n Map<String, Object> paramMap = new HashMap<String, Object>();\n this.putInMap(paramMap);\n return paramMap;\n }", "String getMapName() {\n try {\n fd world = getWorld();\n Class<?> worldclass = world.getClass();\n Field worlddatafield = null;\n while (true) { //\n\n try {\n worlddatafield = worldclass.getDeclaredField(\"x\");\n break;\n } catch (NoSuchFieldException e) {\n worldclass = worldclass.getSuperclass();\n continue;\n }\n }\n if (worlddatafield == null)\n return null;\n worlddatafield.setAccessible(true);\n\n ei worldata;\n\n worldata = (ei) worlddatafield.get(world);\n return worldata.j();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "String getLayer1Info();", "public static Map<String, String> getTableMap() {\n return tableMap;\n }", "public Planet(double xP, double yP, double xV,\n\t\tdouble yV, double m, String img){\n\t\txxPos=xP;\n\t\tyyPos=yP;\n\t\txxVel=xV;\n\t\tyyVel=yV;\n\t\tmass=m;\n\t\timgFileName=img;\n\t}", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}", "public Planet (double x, double y, double r, double m, double vx, double vy, Color c) {\n this.xCoor = x;\n this.yCoor = y;\n this.rad = r;\n this.mass = m;\n this.xVel = vx;\n this.yVel = vy;\n this.col = c; \n \n }", "public Map<String, AccessPoint> createParameters() {\n Map<String, AccessPoint> pm = new TreeMap<>();\n pm.put(\"Minimum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMinimum\", this));\n pm.put(\"Maximum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMaximum\", this));\n pm.put(\"Tourist arrival time to Venice\", new MutableFieldAccessPoint(\"visitorArrivalVenice\", this));\n pm.put(\"Tourist arrival time to Milan\", new MutableFieldAccessPoint(\"visitorArrivalMilan\", this));\n pm.put(\"Tourist arrival time to Ravenna\", new MutableFieldAccessPoint(\"visitorArrivalRavenna\", this));\n return pm;\n }", "public Universe() {\n for (int x = 0; x < universe.length; x++) {\n Planet p = new Planet();\n universe[x] = p;\n }\n }", "public abstract TiledMapTileSet getTileSet();", "Plane getPlane();", "List<AirportDTO> getAirportsByName(String name);", "public static Map<String, Flight> getFlightMap() {\r\n return flightMap;\r\n }", "private void loadPlanets(Scanner sc){\n\t\twhile(sc.hasNextLine()){\n\t\t\tString line = sc.nextLine();\n\t\t\tString [] split = line.split(\",\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tdouble x = Double.parseDouble(split[1]);\n\t\t\t\tdouble y = Double.parseDouble(split[2]);\n\t\t\t\tint population = Integer.parseInt(split[3]);\n\t\t\t\tgalaxy.put(split[0], new Planet(split[0], x, y, population));\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Data can't be loaded\");\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n public static IParkour getParkour(String name) throws NullPointerException {\n if (name == null) {\n throw new NullPointerException(\"name cannot be null\");\n }\n\n return CacheManager.getParkour(name);\n }", "public Map<String, String> getNamesAndDepartmentsOfEmployees() {\n HashMap<String, String> nameDpt = new HashMap<>();\n List<String> names = getNamesFromAllTab();\n List<String> dpts = getEmployeeDepartmentsFromDisplayedDptTab();\n\n for (int i = 0; i < countEmployeeCardsDisplayed(); i++) {\n nameDpt.put(names.get(i), dpts.get(i));\n }\n return nameDpt;\n }", "@Test\n\tpublic void testVirtualPetShelterHasACollectionOfVirtualPets() {\n\t\tVirtualPetShelter testPetShelter = new VirtualPetShelter(); \n\n\t\tMap<String, VirtualPet> virtualPets = new HashMap<String, VirtualPet>(); // I want a map of VP's\n\t\t// Map<Key, Value (instances of virtualPet)> - the key will be the name of pet, the key is assigned to the pets instance\n\t\tString pet1 = \"Tui\"; //this is my first key called \"Tui\"\n\t\tVirtualPet tui = new VirtualPet(\"Tui\", \"Is a cute little calico\", 30, 30, 30);\n\t\tvirtualPets.put(pet1, tui);\n\n\t\tString pet2 = \"Ditch\";\n\t\tVirtualPet ditch = new VirtualPet(\"Ditch\", \"Is as cunning as a shithouse rat\", 10, 40, 15);\n\t\tvirtualPets.put(pet2, ditch);\n\n\t\tString pet3 = \"Blusey\";\n\t\tVirtualPet bluesy = new VirtualPet(\"Bluesy\", \"A black and tan Main coon who is a mushy cat who loves snuggles\",\n\t\t\t\t5, 5, 5);\n\t\tvirtualPets.put(pet3, bluesy);\n\n\t\tString pet4 = \"Jazzy\";\n\t\tVirtualPet jazzy = new VirtualPet(\"Jazzy\", \"Grey tiger who hunter who who be great in the barn\", 15, 20, 25);\n\t\tvirtualPets.put(pet4, jazzy);\n\n\t\tString pet5 = \"Nigel\";\n\t\tVirtualPet nigel = new VirtualPet(\"Nigel\", \"A big old ginger cat\", 10, 10, 50);\n\t\tvirtualPets.put(pet5, nigel);\n\n\t\t// Moved the Map/HashMap below to the VirtualPetShelter\n\t\t// Map<String, VirtualPet> virtualPets = new HashMap<String, VirtualPet>();\n\t\t// Then I created a method in VirtualPetShelter which returned the VirtualPets\n\t\t// \"Values\"\n\n\t\tCollection<VirtualPet> virtualPetCollection = testPetShelter.getVirtualPets(); //Initially got error, eclipse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// asked me to create collection in VPS\n\n\t\tAssert.assertNotNull(testPetShelter.virtualPets);//I got error, eclipse asked me to create a HashMap in VPS\n\t\tAssert.assertEquals(virtualPetCollection, testPetShelter.virtualPets.values()); //\".values() is a Maps \n\t\t //way to return a \"Collection\"\n\t\tAssert.assertEquals(\"Nigel\", virtualPets.get(pet5).name); //test value of local HashMap (moved later to VPS)\n\t\tAssert.assertEquals(30, virtualPets.get(pet1).hunger); //test value of local HashMap (moved later to VPS)\n\t\tAssert.assertEquals(40, virtualPets.get(pet2).boredom); //test value of local HashMap (moved later to VPS)\n\t\tAssert.assertEquals(5, virtualPets.get(pet3).thirst); //test value of local HashMap (moved later to VPS)\n\t\tAssert.assertEquals(\"Grey tiger who hunter who who be great in the barn\", virtualPets.get(pet4).description);\n\t}", "public List<Park> getParkRegistry() {\n return this.pf.getParkList();\n }", "public abstract Map<String, Station> getWbanStationMap() throws DataAccessException;", "public TreeMap<Double, EngineSpecifications> getMapOfEnginePowerInKW() {\n\t\tenginePowerKWMap = new TreeMap<>();\n\n\t\tint index = 0;\n\t\tfor (int i = 0; i < EnginePowerKW.length; i+=2) {\n\t\t\tfor (int j = i; j < i + 2; j++) {\n\t\t\t\tenginePowerKWMap.put(EnginePowerKW[j], engineTurboAndEngineTypeForPowerKWCollection.get(index));\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\n\t\treturn enginePowerKWMap;\n\t}", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "private SortedMap<String, String> getTileItems(Pc pc) {\r\n SortedMap<String, String> items = new TreeMap<>();\r\n\r\n if (pc.getKind() != null) {\r\n items.put(\"Class\", pc.getKind().shortString());\r\n }\r\n if (pc.getRace() != null) {\r\n items.put(\"Race\", pc.getRace().shortString());\r\n }\r\n items.put(\"Level\", String.valueOf(pc.getLevel()));\r\n return items;\r\n }", "public Map<String, Map<String, Set<String>>> getLocationMap();", "public static Map<Integer, Blob> getMarathonJson() {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCrit = session.createCriteria(EnvironmentEntity.class, \"env\");\n\t\tenvCrit.add(Restrictions.isNotNull(\"env.marathonURL\"));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> envList = (List<EnvironmentEntity>)envCrit.list();\n\t\t\n\t\tMap<Integer, Blob> mapEnvJson = new HashMap<Integer,Blob>();\n\t\tfor(EnvironmentEntity ee: envList){\n\t\t\tif(ee.getMarathonURL() == null || ee.getMarathonURL().trim().length() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmapEnvJson.put(ee.getEnvironmentId(), ee.getMarathonJson());\n\t\t}\n\t\ttxn.commit();\n\t\treturn mapEnvJson;\n\t}", "private Planet getHighestCapacityPlanet(Person person) {\n Planet[] copy = Arrays.copyOf(planets, planets.length);\n Arrays.sort(copy, 0, copy.length);\n Planet p = null;\n for (int i = NUM_PLANETS - 1; i >= 0; i--) {\n p = copy[i];\n if (!p.isFull() && p.isQualified(person)) {\n return p;\n }\n p = null;\n }\n return p;\n }", "Map<String, OperationalSets> getSets();" ]
[ "0.7395412", "0.6609919", "0.62092924", "0.6145058", "0.6106492", "0.6043343", "0.6028743", "0.600218", "0.5889792", "0.55765706", "0.54574674", "0.5414785", "0.5402339", "0.5387269", "0.53310025", "0.5312304", "0.5281421", "0.52375835", "0.51660836", "0.51335555", "0.512071", "0.5115472", "0.50866574", "0.5048896", "0.5045507", "0.5025242", "0.5022744", "0.5009795", "0.49961096", "0.49863073", "0.49775606", "0.49704748", "0.4958422", "0.49363723", "0.49036342", "0.48959517", "0.4870068", "0.4865136", "0.48621976", "0.48581535", "0.48556083", "0.48359385", "0.48357952", "0.48305333", "0.48275772", "0.48199064", "0.48145244", "0.48124224", "0.48101592", "0.4797095", "0.4794276", "0.4787011", "0.47837058", "0.47833443", "0.47815272", "0.47756633", "0.47746995", "0.47714984", "0.47594544", "0.47495025", "0.47432223", "0.47414783", "0.4740604", "0.4727911", "0.47206423", "0.47038355", "0.4703809", "0.46971086", "0.46898735", "0.46898124", "0.4687853", "0.4687106", "0.46850726", "0.46794298", "0.4675938", "0.4666219", "0.4661839", "0.46589738", "0.46505466", "0.46476713", "0.46466896", "0.46466175", "0.4641734", "0.46216053", "0.4611203", "0.46076646", "0.46050313", "0.45969716", "0.45955414", "0.45876214", "0.45760167", "0.45677048", "0.45675212", "0.45644316", "0.45638713", "0.45628697", "0.45559394", "0.45550466", "0.45537612", "0.45504993" ]
0.77732724
0
Return the Planet (by order, Sun=0) map.
public static Map<Integer,Planet> getPlanetsByOrder() { return planetsByOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Planet> getPlanets(){\n\t\treturn galaxy;\n\t}", "public static Map<String,Planet> getPlanetsByName() { return planetsByName; }", "public Planet[] getPlanets() {\n return this.planets;\n }", "public List<Planet> getPlanets() {\n return planet;\n }", "public List<Planet> getPlanets() {\n return planetList;\n }", "private void createPlanets()\n\t{\n\t\tdouble semimajorAxis;\n\t\tdouble eccentricityOfOrbit;\n\t\tdouble inclinationOnPlane;\n\t\tdouble perihelion;\n\t\tdouble longitudeOfAscendingNode;\n\t\tdouble meanLongitude;\n String unicode_icon;\n\t\t\n\t\tplanetList.clear();\n\t\t\n\t\t//*****************\n\t\t//create Mercury\n\t\t//*****************\n\t\tPlanet mercury = new Planet(\"Mercury\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 60.750646;\n\t\tsemimajorAxis = 0.387099;\n\t\teccentricityOfOrbit = 0.205633;\n\t\tinclinationOnPlane = 7.004540;\n\t\tperihelion = 77.299833;\n\t\tlongitudeOfAscendingNode = 48.212740;\n\t\t\n\t\tmercury.setUnicodeIcon(unicode_icon);\n\t\tmercury.setSemimajorAxis(semimajorAxis);\n\t\tmercury.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmercury.setInclinationOnPlane(inclinationOnPlane);\n\t\tmercury.setPerihelion(perihelion);\n\t\tmercury.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmercury.setMeanLongitude(meanLongitude);\n\t\tmercury.setOrbitalPeriod(0.24852);\n\t\tplanetList.add(mercury);\n\t\t\n\t\t//*****************\n\t\t//create Venus\n\t\t//*****************\n\t\tPlanet venus = new Planet(\"Venus\");\n\t\tunicode_icon = \"\\u2640\";\n\t\tmeanLongitude = 88.455855;\n\t\tsemimajorAxis = 0.723332;\n\t\teccentricityOfOrbit = 0.006778;\n\t\tinclinationOnPlane = 3.394535;\n\t\tperihelion = 131.430236;\n\t\tlongitudeOfAscendingNode = 76.589820;\n\t\t\n\t\tvenus.setUnicodeIcon(unicode_icon);\n\t\tvenus.setSemimajorAxis(semimajorAxis);\n\t\tvenus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tvenus.setInclinationOnPlane(inclinationOnPlane);\n\t\tvenus.setPerihelion(perihelion);\n\t\tvenus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tvenus.setMeanLongitude(meanLongitude);\n\t\tvenus.setOrbitalPeriod(0.615211);\n\t\tplanetList.add(venus);\n\t\t\n\t\t//*****************\n\t\t//create Earth\n\t\t//*****************\n\t\tearth = new Planet(\"Earth\");\n\t\tunicode_icon = \"\\u2695\";\t\n\t\tmeanLongitude = 99.403308;\n\t\tsemimajorAxis = 1.000;\n\t\teccentricityOfOrbit = 0.016713;\n\t\tinclinationOnPlane = 1.00;\n\t\tperihelion = 102.768413;\n\t\tlongitudeOfAscendingNode = 1.00;\n\t\t\n\t\tearth.setUnicodeIcon(unicode_icon);\n\t\tearth.setSemimajorAxis(semimajorAxis);\n\t\tearth.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tearth.setInclinationOnPlane(inclinationOnPlane);\n\t\tearth.setPerihelion(perihelion);\n\t\tearth.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tearth.setMeanLongitude(meanLongitude);\n\t\tearth.setOrbitalPeriod(1.00004);\n\t\t//earth not added to list, kept as separate object\n\t\t\n\t\t//*****************\n\t\t//create Mars\n\t\t//*****************\n\t\tPlanet mars = new Planet(\"Mars\");\n\t\tunicode_icon = \"\\u2642\";\n\t\tmeanLongitude = 240.739474;\n\t\tsemimajorAxis = 1.523688;\n\t\teccentricityOfOrbit = 0.093396;\n\t\tinclinationOnPlane = 1.849736;\n\t\tperihelion = 335.874939;\n\t\tlongitudeOfAscendingNode = 49.480308;\n\t\t\n\t\tmars.setUnicodeIcon(unicode_icon);\n\t\tmars.setSemimajorAxis(semimajorAxis);\n\t\tmars.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmars.setInclinationOnPlane(inclinationOnPlane);\n\t\tmars.setPerihelion(perihelion);\n\t\tmars.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmars.setMeanLongitude(meanLongitude);\n\t\tmars.setOrbitalPeriod(1.880932);\n\t\tplanetList.add(mars);\n\t\t\n\t\t//*****************\n\t\t//create Jupiter\n\t\t//*****************\n\t\tPlanet jupiter = new Planet(\"Jupiter\");\n\t\tunicode_icon = \"\\u2643\";\n\t\tmeanLongitude = 90.638185;\n\t\tsemimajorAxis = 5.202561;\n\t\teccentricityOfOrbit = 0.048482;\n\t\tinclinationOnPlane = 1.303613;\n\t\tperihelion = 14.170747;\n\t\tlongitudeOfAscendingNode = 100.353142;\n\t\t\n\t\tjupiter.setUnicodeIcon(unicode_icon);\n\t\tjupiter.setSemimajorAxis(semimajorAxis);\n\t\tjupiter.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tjupiter.setInclinationOnPlane(inclinationOnPlane);\n\t\tjupiter.setPerihelion(perihelion);\n\t\tjupiter.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tjupiter.setMeanLongitude(meanLongitude);\n\t\tjupiter.setOrbitalPeriod(11.863075);\n\t\tplanetList.add(jupiter);\n\t\t\n\t\t//*****************\n\t\t//create Saturn\n\t\t//*****************\n\t\tPlanet saturn = new Planet(\"Saturn\");\n\t\tunicode_icon = \"\\u2644\";\n\t\tmeanLongitude = 287.690033;\n\t\tsemimajorAxis = 9.554747;\n\t\teccentricityOfOrbit = 0.055581;\n\t\tinclinationOnPlane = 2.488980;\n\t\tperihelion = 92.861407;\n\t\tlongitudeOfAscendingNode = 113.576139;\n\t\t\t\t\n\t\tsaturn.setUnicodeIcon(unicode_icon);\n\t\tsaturn.setSemimajorAxis(semimajorAxis);\n\t\tsaturn.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tsaturn.setInclinationOnPlane(inclinationOnPlane);\n\t\tsaturn.setPerihelion(perihelion);\n\t\tsaturn.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tsaturn.setMeanLongitude(meanLongitude);\n\t\tsaturn.setOrbitalPeriod(29.471362);\n\t\tplanetList.add(saturn);\n\t\t\n\t\t//*****************\n\t\t//create Uranus\n\t\t//*****************\n\t\tPlanet uranus = new Planet(\"Uranus\");\n\t\tunicode_icon = \"\\u2645\";\n\t\tmeanLongitude = 271.063148;\n\t\tsemimajorAxis = 19.21814;\n\t\teccentricityOfOrbit = 0.046321;\n\t\tinclinationOnPlane = 0.773059;\n\t\tperihelion = 172.884833;\n\t\tlongitudeOfAscendingNode = 73.926961;\n\t\t\n\t\turanus.setUnicodeIcon(unicode_icon);\n\t\turanus.setSemimajorAxis(semimajorAxis);\n\t\turanus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\turanus.setInclinationOnPlane(inclinationOnPlane);\n\t\turanus.setPerihelion(perihelion);\n\t\turanus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\turanus.setMeanLongitude(meanLongitude);\n\t\turanus.setOrbitalPeriod(84.039492);\n\t\tplanetList.add(uranus);\n\t\t\n\t\t//*****************\n\t\t//create Neptune\n\t\t//*****************\n\t\tPlanet neptune = new Planet(\"Neptune\");\n\t\tunicode_icon = \"\\u2646\";\n\t\tmeanLongitude = 282.349556;\n\t\tsemimajorAxis = 30.109570;\n\t\teccentricityOfOrbit = 0.009003;\n\t\tinclinationOnPlane = 1.770646;\n\t\tperihelion = 48.009758;\n\t\tlongitudeOfAscendingNode = 131.670599;\n\t\t\n\t\tneptune.setUnicodeIcon(unicode_icon);\n\t\tneptune.setSemimajorAxis(semimajorAxis);\n\t\tneptune.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tneptune.setInclinationOnPlane(inclinationOnPlane);\n\t\tneptune.setPerihelion(perihelion);\n\t\tneptune.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tneptune.setMeanLongitude(meanLongitude);\n\t\tneptune.setOrbitalPeriod(164.79246);\n\t\tplanetList.add(neptune);\n\t\t\n\t\t//*****************\n\t\t//create Pluto\n\t\t//*****************\n\t\tPlanet pluto = new Planet(\"Pluto\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 246.77027;\n\t\tsemimajorAxis = 39.3414;\n\t\teccentricityOfOrbit = 0.24624;\n\t\tinclinationOnPlane = 17.1420;\n\t\tperihelion = 224.133;\n\t\tlongitudeOfAscendingNode = 110.144;\n\t\t\n\t\tpluto.setUnicodeIcon(unicode_icon);\n\t\tpluto.setSemimajorAxis(semimajorAxis);\n\t\tpluto.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tpluto.setInclinationOnPlane(inclinationOnPlane);\n\t\tpluto.setPerihelion(perihelion);\n\t\tpluto.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tpluto.setMeanLongitude(meanLongitude);\n\t\tpluto.setOrbitalPeriod(246.77027);\n\t\tplanetList.add(pluto);\n\t}", "private byte[] getSelectedPlanetSurface() {\r\n\t\tbyte[] mapBytes;\r\n\t\tPACEntry e = getSurface(gameWorld.player.selectedPlanet.surfaceType.index, gameWorld.player.selectedPlanet.surfaceVariant);\r\n\t\tif (e != null) {\r\n\t\t\tmapBytes = e.data;\r\n\t\t} else {\r\n\t\t\tmapBytes = EMPTY_SURFACE_MAP;\r\n\t\t}\r\n\t\treturn mapBytes;\r\n\t}", "private void adjustPlanetData()\n\t{\n\t\t//variables for function\n\t\tdouble meanAnomalyEarth;\n\t\tdouble helioLongEarth;\n\t\tdouble trueAnomalyEarth;\n\t\tdouble radiusVectorEarth;\n\t\tdouble meanAnomalyPlanet;\n\t\tdouble helioLongPlanet;\n\t\tdouble trueAnomalyPlanet;\n\t\tdouble radiusVectorPlanet;\n\t\tdouble geoLongPlanet;\n\t\tdouble declinationPlanet;\n\t\tdouble rightAscensionPlanet;\n\t\tdouble hourAnglePlanet;\n\t\tPlanet planet;\n\t\tdouble days;\n\t\tdouble n;\n\t\t\n\t\t//find number of days since epoch\n\t\tdays = ((userYear - 1990)* 365.25) + userDecimalDay + ((userMonth - 1) * 30);\n\t\t\n\t\t//normalize the number of days to the orbital period of the planet\n\t\tn = theCalculator.findN(earth.getOrbitalPeriod(), days);\n\t\t\t\t\n\t\t//calculate Mean Anomaly of earth\n\t\tmeanAnomalyEarth = theCalculator.findMeanAnomaly(earth, n);\n\t\t\n\t\t//calculate heliocentric longitude of earth\n\t\thelioLongEarth = theCalculator.findHeliocentricLongitude(earth, meanAnomalyEarth, n);\n\t\t\n\t\t//calculate true anomaly of earth\n\t\ttrueAnomalyEarth = theCalculator.findTrueAnomaly(earth, helioLongEarth);\n\t\t\n\t\t//calculate radius vector length for earth \n\t\tradiusVectorEarth = theCalculator.findVectorRadius(earth, trueAnomalyEarth);\n\t\t\n\t\t//for each planet except earth\n\t\tfor(int i = 0; i < planetList.size(); i++)\n\t\t{\n\t\t\t//get the Planet\n\t\t\tplanet = planetList.get(i);\n\t\t\t\n\t\t\t//normalize days\n\t\t\tn = theCalculator.findN(planet.getOrbitalPeriod(), days);\n\t\t\t\n\t\t\t//calculate mean anomaly\n\t\t\tmeanAnomalyPlanet = theCalculator.findMeanAnomaly(planet, n);\n\t\t\t\n\t\t\t//calculate heliocentric longitude\n\t\t\thelioLongPlanet = theCalculator.findHeliocentricLongitude(planet, meanAnomalyPlanet, n);\n\t\t\t\n\t\t\t//calculate true anomaly\n\t\t\ttrueAnomalyPlanet = theCalculator.findTrueAnomaly(planet, helioLongPlanet);\n\t\t\t\n\t\t\t//calculate radius vector length\n\t\t\tradiusVectorPlanet = theCalculator.findVectorRadius(planet, trueAnomalyPlanet);\n\t\t\t\t\t\t\n\t\t\t//calculate geocentric longitude\n\t\t\tString name = planet.getName();\n\t\t\tgeoLongPlanet = theCalculator.findGeocentricLongitude(name, radiusVectorPlanet, helioLongPlanet, radiusVectorEarth, helioLongEarth);\n\t\t\t\n\t\t\t//calculate and set declination \n\t\t\tdeclinationPlanet = theCalculator.findPlanetDeclination(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setDeclination(declinationPlanet);\n\t\t\t\n\t\t\t//calculate and set right ascension\n\t\t\trightAscensionPlanet = theCalculator.findPlanetRightAscension(planet.getMeanLongitude(), 0.0, geoLongPlanet);\n\t\t\tplanet.setRightAscension(rightAscensionPlanet);\n\t\t\t\n\t\t\t//calculate and set hour angle\n\t\t\thourAnglePlanet = theCalculator.findHourAngle(rightAscensionPlanet, userLocalTime);\n\t\t\tplanet.setHourAngle(hourAnglePlanet);\n\t\t\t\n\t\t\t//update planetList\n\t\t\tplanetList.set(i, planet);\n\t\t}\n\t}", "private static void initPlanets(){\r\n CelestialBody Sun = new CelestialBody(\"Sun\", Color.YELLOW, 50);\r\n \r\n initNewCelestialBody(new CelestialBody(\"Mercury\", Color.GRAY, 10, Sun, 0.3870, 0.3788, 0.0796));\r\n initNewCelestialBody(new CelestialBody(\"Venus\", Color.GREEN, 20, Sun, 0.7219, 0.7219, 0.0049));\r\n initNewCelestialBody(new CelestialBody(\"Earth\", Color.BLUE, 25, Sun, 1.0027, 1.0025, 0.0167));\r\n initNewCelestialBody(new CelestialBody(\"Mars\", Color.RED, 20, Sun, 1.5241, 1.5173, 0.1424));\r\n initNewCelestialBody(new CelestialBody(\"Jupiter\", Color.BEIGE, 50, Sun, 5.2073, 5.2010, 0.2520));\r\n initNewCelestialBody(new CelestialBody(\"Saturn\", Color.CHOCOLATE, 40, Sun, 9.5590, 9.5231, 0.5181));\r\n initNewCelestialBody(new CelestialBody(\"Uranus\", Color.AQUAMARINE, 30, Sun, 19.1848, 19.1645, 0.9055));\r\n initNewCelestialBody(new CelestialBody(\"Neptune\", Color.AQUA, 30, Sun, 30.0806, 30.0788, 0.2687));\r\n \r\n initNewCelestialBody(Sun);\r\n renderService.setFocus(getPlanetController(\"Sun\"));\r\n }", "public Planet()\n {\n super(30, 30, zellenGroesse);\n setBackground(\"images/boden.png\");\n setPaintOrder(String.class, Rover.class, Marke.class, Gestein.class, Huegel.class);\n Greenfoot.setSpeed(20); \n\n prepare();\n }", "public static void main(String[] args) {\n for (Planet p : Planet.values()){\n System.out.println(p);\n }\n\n }", "public static void createPlanets() {\n\t\tplanets = new PlanetV4[planetNames.length];\n\t\tfor (int i = 0; i < planetNames.length; i ++) {\n\t\t\tplanets[i] = new PlanetV4(planetNames[i], planetMasses[i], planetDiameters[i], planetPositions[i], planetVelocities[i], planetCircles[i]);\n\t\t\t//mainFrame.add(planets[i]);\n\t\t}\n\t}", "public static Planet[] getNearbyPlanets(Planet p) {\n return bubbleSort(universe, p);\n }", "public Planet getLocation() {\r\n return location;\r\n }", "public ArrayList<Planet> getModifiedPlanets()\n\t{\n\t\treturn planetList;\n\t}", "private void init() {\r\n\r\n\t\tPlanetLayoutGenerator gen = new PlanetLayoutGenerator();\r\n\t\tint planetCount = 15;\r\n\t\tint width = 5, height = 5, depth = 5;\r\n\t\tint[][][] layout = gen.generate(width, height, depth, planetCount);\r\n\t\tfinal float minSize = 4, maxSize = 10;\r\n\t\tfinal float gap = (C.World.PlanetBoxSize - maxSize*width)/(width-1);\r\n\r\n\t\tTextureRegion textures[] = new TextureRegion[] {\r\n\t\t\tassets.planetNeptune,\r\n\t\t\tassets.planetSaturn,\r\n\t\t\tassets.planetEarth,\r\n\t\t};\r\n\t\tfloat x = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat y = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat z = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\r\n\t\tfor (int ix = 0; ix < width; ++ix) {\r\n\t\t\tfor (int iy = 0; iy < height; ++iy) {\r\n\t\t\t\tfor (int iz = 0; iz < depth; ++iz) {\r\n\t\t\t\t\tif (layout[ix][iy][iz] == 1) {\r\n\t\t\t\t\t\tTextureRegion tex = textures[(ix+iy+iz)%3];\r\n\t\t\t\t\t\tfloat size = MathUtils.random(minSize, maxSize);\r\n\r\n\t\t\t\t\t\tfactory.createPlanet(x+ix*(maxSize+gap), y+iy*(maxSize+gap), z+iz*(maxSize+gap), size, 0, tex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tEntity player = factory.createPlayerShip(0, 0, 5);\r\n\t\tplayerSystem.setPlayer(player);\r\n\r\n\t\tcollisions.relations.connectGroups(CollisionGroups.PLAYER_2D, CollisionGroups.PLANETS_2D);\r\n\t}", "public void createDebugMap(ArrayList<Station> stations) {\r\n\t\tStation stationValby = new Station(\"Valby\", 1);\r\n\t\tstations.add(stationValby);\r\n\r\n\t\tStation stationFrederiksund = new Station(\"Frederiksund\", 2);\r\n\t\tstations.add(stationFrederiksund);\r\n\r\n\t\tStation stationHerlev = new Station(\"Herlev\", 3);\r\n\t\tstations.add(stationHerlev);\r\n\r\n\t\tStation stationHvidovre = new Station(\"Hvidovre\", 4);\r\n\t\tstations.add(stationHvidovre);\r\n\r\n\t\tStation stationHumsum = new Station(\"Husum\", 5);\r\n\t\tstations.add(stationHumsum);\r\n\r\n\t\tStation stationIslev = new Station(\"Islev\", 6);\r\n\t\tstations.add(stationIslev);\r\n\r\n\t\tStation stationDanshoj = new Station(\"Danshoj\", 7);\r\n\t\tstations.add(stationDanshoj);\r\n\r\n\t\tStation stationSkovlunde = new Station(\"Skovlunde\", 8);\r\n\t\tstations.add(stationSkovlunde);\r\n\r\n\t\t// add neighbor connections\r\n\t\tstationValby.neighbors.add(new Neighbor(stationIslev, 4, 4));\r\n\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationValby, 4, 4));\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationHumsum, 8, 8));\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationSkovlunde, 3, 3));\r\n\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationHerlev, 3, 3));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationFrederiksund, 4, 4));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationHvidovre, 2, 2));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationDanshoj, 3, 3));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationIslev, 8, 8));\r\n\r\n\t\tstationHerlev.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationHerlev.neighbors.add(new Neighbor(stationFrederiksund, 2, 2));\r\n\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHumsum, 4, 4));\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHerlev, 2, 2));\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHvidovre, 5, 5));\r\n\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationHumsum, 2, 2));\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationFrederiksund, 5, 5));\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationDanshoj, 4, 4));\r\n\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationHvidovre, 5, 5));\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationSkovlunde, 10, 10));\r\n\r\n\t\tstationSkovlunde.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationSkovlunde.neighbors.add(new Neighbor(stationDanshoj, 10, 10));\r\n\t}", "public void setPlanets(List<Planet> planets) {\n planetList = planets;\n }", "public Vector<City> getCities(){\r\n\t\tif (map.getVerteices()==null){\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\t\treturn map.getVerteices();\r\n\t}", "public CitiesMap(){\r\n\t\tmap=new Graph<City>();\r\n\t}", "public Sun getSunLocalPositions(double mjd, Geodetic obs){\n Sun sp = new Sun();\n \n Vector sunVector = new Vector(3); //equatorial coordinates of the Sun\n Vector horizontal = new Vector(3); //horizontal coordinates of object\n Vector equatorial = new Vector(3); //equatorial coordinates of object from observer view\n Vector observatory = new Vector(3); //equatorial coordinates of observer\n \n sunVector = (new Sun()).getSunPosition(mjd);\n \n horizontal=(new Transformation()).getHorizontalCoordinates3(sunVector,obs, mjd);\n //horizontal coordinates\n sp.az = horizontal.v[0];\n sp.h = horizontal.v[1];\n \n //equatorial (observer) coordinates\n //observer eq. coordinates\n observatory = (new Transformation()).fromGeodToGeoc(obs.lon, obs.lat,\n obs.altitude, (new Constants()).R_Earth, (new Constants()).f_Earth);\n observatory = (new Transformation()).fromGeocToEquat(observatory,mjd);\n //equatorial coordinates of object\n equatorial = equatorial.subtractVectors(sunVector, observatory);\n equatorial = equatorial.fromCartesianToPolar(equatorial);\n //FILLING contructor\n sp.ra = equatorial.v[0];\n sp.dec = equatorial.v[1];\n \n return sp;\n }", "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "public Universe() {\n for (int x = 0; x < universe.length; x++) {\n Planet p = new Planet();\n universe[x] = p;\n }\n }", "public Planet(double x, double y, double velocity_x, double velocity_y, double my_mass, double my_radius,\r\n\t\t\tString name) {\r\n\t\tsuper(x, y, velocity_x, velocity_y, my_mass, my_radius, name);\r\n\t}", "public Planet(Planet p){\n\t\tthis.xxPos=p.xxPos;\n\t\tthis.yyPos=p.yyPos;\n\t\tthis.xxVel=p.xxVel;\n\t\tthis.yyVel=p.yyVel;\n\t\tthis.mass=p.mass;\n\t\tthis.imgFileName=p.imgFileName;\n\t}", "private Vector3f getPlanetPosition() {\r\n\t\tVector3f position = new Vector3f();\r\n\t\tdouble theta = Math.random() * 2 * Math.PI;\r\n\t\tdouble r = MathUtils.randRange(MIN_ORBITAL_RADIUS, MAX_ORBITAL_RADIUS);\r\n\t\tposition.x = (float) (r * Math.cos(theta));\r\n\t\tposition.z = (float) (r * Math.sin(theta));\r\n\t\t// Introduce y variation\r\n\t\tposition.y = (float) MathUtils.randRange(MIN_PLANET_Y, MAX_PLANET_Y);\r\n\t\treturn position;\r\n\t}", "public List<Plan> getPlanes() {\n\t\treturn planes;\n\t}", "private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }", "private void setupDefaultTerrainMap() {\n defaultTerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SMALL_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SMALL_FISHERY);\n\n defaultTerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n defaultTerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n \t \tdefaultTerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.HILLS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.PASTURE);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.SEA);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.MOUNTAINS);\n\t\tdefaultTerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t}", "@Override\n public Map getUniverseOrder() {\n return null;\n }", "public Planet(Planet p){\n\t\txxPos=p.xxPos;\n\t\tyyPos=p.yyPos;\n\t\txxVel=p.xxVel;\n\t\tyyVel=p.yyVel;\n\t\tmass=p.mass;\n\t\timgFileName=p.imgFileName;\n\t}", "@Test\n public void testTimezone() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/Paris\"));\n\n SunTimes paris = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .latitude(48, 51, 24.0) // Latitude of Paris: 48°51'24\" N\n .longitude(2, 21, 6.0) // Longitude: 2°21'06\" E\n .execute();\n System.out.println(\"Sunrise in Paris: \" + paris.getRise());\n System.out.println(\"Sunset in Paris: \" + paris.getSet());\n\n SunTimes newYork = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYork.getRise());\n System.out.println(\"Sunset in New York: \" + newYork.getSet());\n\n SunTimes newYorkTz = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .timezone(\"America/New_York\") // ...New York timezone\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYorkTz.getRise());\n System.out.println(\"Sunset in New York: \" + newYorkTz.getSet());\n }", "public Ocean() {\n for (int i=0; i < N; i++) {\n for (int j=0; j < N; j++) {\n zone[i][j] = new Zone(i,j);\n }\n }\n }", "void parseOriginalPlanet() {\r\n\t\tXElement e = rl.getXML(\"campaign/main/planets_old\");\r\n\t\tfor (XElement planet : e.childrenWithName(\"planet\")) {\r\n\t\t\tOriginalPlanet op = new OriginalPlanet();\r\n\t\t\top.name = planet.get(\"id\");\r\n\t\t\top.surfaceType = planet.childValue(\"type\");\r\n\t\t\top.location.x = Integer.parseInt(planet.childValue(\"location-x\"));\r\n\t\t\top.location.y = Integer.parseInt(planet.childValue(\"location-y\"));\r\n\t\t\top.surfaceVariant = Integer.parseInt(planet.childValue(\"variant\"));\r\n\t\t\top.race = planet.childValue(\"race\");\r\n\t\t\tfor (XElement building : planet.childElement(\"buildings\").childrenWithName(\"building\")) {\r\n\t\t\t\tOriginalBuilding ob = new OriginalBuilding();\r\n\t\t\t\tob.name = building.childValue(\"id\");\r\n\t\t\t\tob.location = Location.of(Integer.parseInt(building.childValue(\"x\")), \r\n\t\t\t\t\t\tInteger.parseInt(building.childValue(\"y\")));\r\n\t\t\t\top.buildings.add(ob);\r\n\t\t\t}\r\n\t\t\toriginalPlanets.add(op);\r\n\t\t}\r\n\t}", "@Override\n\tString getName() {\n\t\treturn \"Planet\"+\": \"+name;\n\t}", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Street> getStreetsMap()\r\n {\r\n return streets_map;\r\n }", "private void erstelleListenMap(){\n farbenMap = new TreeMap<>();\n symbolMap = new TreeMap<>();\n\n for(Symbol symbol:Symbol.values()){\n\n switch (symbol) // sortiert ihn in die entsprechende Liste ein\n {\n case ka_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,karos);\n break;\n case ks_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreise);\n break;\n case kr_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreuze);\n break;\n case st_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,sterne);\n break;\n case qu_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kleeblaetter);\n break;\n\n case ka_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,karos);\n break;\n case ks_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,karos);\n break;\n case ks_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,karos);\n break;\n case ks_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreise);\n break;\n case kr_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreuze);\n break;\n case st_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,sterne);\n break;\n case qu_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,karos);\n break;\n case ks_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreise);\n break;\n case kr_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreuze);\n break;\n case st_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,sterne);\n break;\n case qu_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,karos);\n break;\n case ks_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n }\n\n }\n }", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "void loadPlanet(MapSaveSettings settings) {\r\n\t\ttry {\r\n\t\t\tif (renderer.surface == null) {\r\n\t\t\t\tcreatePlanetSurface(33, 66);\r\n\t\t\t}\r\n\t\t\tElement root = XML.openXML(settings.fileName);\r\n\t\t\tElement planet = XML.childElement(root, \"planet\");\r\n\t\t\tif (settings.surface) {\r\n\t\t\t\tdoClearSurfaces(false);\r\n\t\t\t\tElement surface = XML.childElement(planet, \"surface\");\r\n\t\t\t\tif (surface != null) {\r\n\t\t\t\t\tint width = Integer.parseInt(surface.getAttribute(\"width\"));\r\n\t\t\t\t\tint height = Integer.parseInt(surface.getAttribute(\"height\"));\r\n\t\t\t\t\tcreatePlanetSurface(width, height);\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(surface, \"tile\")) {\r\n\t\t\t\t\t\tString type = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tint id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tTile t = galaxyModel.planetTypes.get(type).tiles.get(id);\r\n\t\t\t\t\t\tSurfaceFeature sf = new SurfaceFeature();\r\n\t\t\t\t\t\tsf.id = id;\r\n\t\t\t\t\t\tsf.type = type;\r\n\t\t\t\t\t\tsf.location = Location.of(x, y);\r\n\t\t\t\t\t\tsf.tile = t;\r\n\t\t\t\t\t\trenderer.surface.features.add(sf);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(t, x, y, SurfaceEntityType.BASE, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (settings.buildings) {\r\n\t\t\t\tdoClearBuildings(false);\r\n\t\t\t\tElement buildings = XML.childElement(planet, \"buildings\");\r\n\t\t\t\tif (buildings != null) {\r\n\t\t\t\t\tString tech = null;\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(buildings, \"building\")) {\r\n\t\t\t\t\t\tString id = tile.getAttribute(\"id\");\r\n\t\t\t\t\t\ttech = tile.getAttribute(\"tech\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tBuilding b = new Building(buildingModel.buildings.get(id), tech);\r\n\t\t\t\t\t\tint x = Integer.parseInt(tile.getAttribute(\"x\"));\r\n\t\t\t\t\t\tint y = Integer.parseInt(tile.getAttribute(\"y\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tb.location = Location.of(x, y);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tb.buildProgress = Integer.parseInt(tile.getAttribute(\"build\"));\r\n\t\t\t\t\t\tb.hitpoints = Integer.parseInt(tile.getAttribute(\"hp\"));\r\n\t\t\t\t\t\tb.setLevel(Integer.parseInt(tile.getAttribute(\"level\")));\r\n\t\t\t\t\t\tb.assignedEnergy = Integer.parseInt(tile.getAttribute(\"energy\"));\r\n\t\t\t\t\t\tb.assignedWorker = Integer.parseInt(tile.getAttribute(\"worker\"));\r\n\t\t\t\t\t\tb.enabled = \"true\".equals(tile.getAttribute(\"enabled\"));\r\n\t\t\t\t\t\tb.repairing = \"true\".equals(tile.getAttribute(\"repairing\"));\r\n\t\t\t\t\t\trenderer.surface.buildings.add(b);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tplaceTile(b.tileset.normal, x, y, SurfaceEntityType.BUILDING, b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tech != null) {\r\n\t\t\t\t\t\tplaceRoads(tech);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trenderer.repaint();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public Map<Integer, PenghuziPlayer> getSeatMap() {\n return seatMap;\n }", "LinkedHashMap<Long, City> getAllCitiesMap();", "public Planet(Vector2 pos, Vector2 vel, double mass, double radius) {\n this.name = null;\n this.mass = mass;\n this.radius = radius;\n \n this.pos = pos;\n this.vel = vel;\n }", "private Map<Good, Integer> initiateMarketplace() {\n Random noise = new Random();\n Map<Good, Integer> map = Collections.synchronizedMap(\n new EnumMap<Good, Integer>(Good.class));\n for (Good item : Good.values()) {\n if (item.getMinTech() <= techLevel) {\n Integer price = Math.max(item.getBasePrice()\n - (techLevel - item.getMinTech()) + alignment.getPriceChange()\n + noise.nextInt(5),\n 5);\n map.put(item, price);\n }\n }\n return map;\n }", "public Planet(Planet p){\n\t\tmyXPos = p.myXPos;\n\t\tmyYPos = p.myYPos;\n\t\tmyXVel = p.myXVel;\n\t\tmyYVel = p.myYVel;\n\t\tmyMass = p.myMass;\n\t\tmyFileName = p.myFileName;\n\t}", "public Sun getAntihelionLocalPositions(double mjd, Geodetic obs){\n Sun sp = new Sun();\n\n Vector sunVector = new Vector(3); //equatorial coordinates of the Sun\n Vector horizontal = new Vector(3); //horizontal coordinates of object\n Vector equatorial = new Vector(3); //equatorial coordinates of object from observer view\n Vector observatory = new Vector(3); //equatorial coordinates of observer\n\n sunVector = sunVector.multiplyVector(new Sun().getSunPosition(mjd),-1);\n\n horizontal=(new Transformation()).getHorizontalCoordinates3(sunVector,obs, mjd);\n //horizontal coordinates\n sp.az = horizontal.v[0];\n sp.h = horizontal.v[1];\n\n //equatorial (observer) coordinates\n //observer eq. coordinates\n observatory = (new Transformation()).fromGeodToGeoc(obs.lon, obs.lat,\n obs.altitude, (new Constants()).R_Earth, (new Constants()).f_Earth);\n observatory = (new Transformation()).fromGeocToEquat(observatory,mjd);\n //equatorial coordinates of object\n equatorial = equatorial.subtractVectors(sunVector, observatory);\n equatorial = equatorial.fromCartesianToPolar(equatorial);\n //FILLING contructor\n sp.ra = equatorial.v[0];\n sp.dec = equatorial.v[1];\n\n return sp;\n }", "public Planet getLocation() {\n\t\treturn currentLocation;\n\t}", "public void paintPlanet(Graphics g, Planet p)\n {\n g.setColor(p.getMapColor());\n double xLoc = topLeftX + mapWidth/2 + (p.getXPos()-p.getRadius())* scale;\n double yLoc = topLeftY + mapHeight/2 + (p.getYPos()-p.getRadius()) * scale;\n double diameter = 2 * p.getRadius() * scale;\n if(diameter < MIN_PLANET_DIAMETER)\n {\n diameter = MIN_PLANET_DIAMETER;\n }\n g.fillOval( (int)(Driver.scale*xLoc), (int)(Driver.scale*yLoc), (int)(Driver.scale*diameter), (int)(Driver.scale*diameter));\n }", "public static Point2D planetaryOrbit(final Celestial sun, Planet planet, int frame) {\n double dTheta = 2 * Math.PI / planet.getPeriodInMS() * Constants.TIME_INTERVAL;\n double angleToSun = (planet.getAngleToSun() + dTheta * frame) % (2 * Math.PI);\n\n // update (x,y) coordinate\n double newX, newY;\n newX = sun.getX() + planet.getDistanceToSun() * Math.cos(angleToSun);\n newY = sun.getY() + planet.getDistanceToSun() * Math.sin(angleToSun);\n return new Point2D.Double(newX, newY);\n }", "public Body getPlanet() {\n return this.currentPlanet;\n }", "public Sun getAntihelionLocalPositionsForGEO(double mjd, Geodetic obs){\n Sun sp = new Sun();\n\n Vector sunVector = new Vector(3); //equatorial coordinates of the Sun\n Vector horizontal = new Vector(3); //horizontal coordinates of object\n Vector equatorial = new Vector(3); //equatorial coordinates of object from observer view\n Vector observatory = new Vector(3); //equatorial coordinates of observer\n\n sunVector = sunVector.multiplyVector(new Sun().getSunPosition(mjd),-1);\n sunVector = Vector.multiplyVector(sunVector, (double)1/Vector.getSize(sunVector));\n sunVector = Vector.multiplyVector(sunVector, 42164150.0);\n\n horizontal=(new Transformation()).getHorizontalCoordinates3(sunVector,obs, mjd);\n //horizontal coordinates\n sp.az = horizontal.v[0];\n sp.h = horizontal.v[1];\n\n //equatorial (observer) coordinates\n //observer eq. coordinates\n observatory = (new Transformation()).fromGeodToGeoc(obs.lon, obs.lat,\n obs.altitude, (new Constants()).R_Earth, (new Constants()).f_Earth);\n observatory = (new Transformation()).fromGeocToEquat(observatory,mjd);\n //equatorial coordinates of object\n equatorial = equatorial.subtractVectors(sunVector, observatory);\n equatorial = equatorial.fromCartesianToPolar(equatorial);\n //FILLING contructor\n sp.ra = equatorial.v[0];\n sp.dec = equatorial.v[1];\n\n return sp;\n }", "public Planet getPlanetForPerson(Person nextPerson) {\n if (nextPerson == null) {\n return null;\n }\n String prefer = nextPerson.getPlanetPreference();\n if (this.getPlanetIndex(prefer) != -1 && this.canAccept(planets[this\n .getPlanetIndex(prefer)], nextPerson) &&\n !planets[this.getPlanetIndex(prefer)].isFull()) {\n return planets[this.getPlanetIndex(prefer)];\n }\n\n else if ((prefer == null || this.getPlanetIndex(prefer) == -1) && this\n .canAccept(this.getHighestCapacityPlanet(nextPerson), nextPerson)) {\n return this.getHighestCapacityPlanet(nextPerson);\n\n }\n\n return null;\n }", "public HashMap<VertexLocation, VertexObject> parseCitiesAndStlmtsFromJSON(JSONArray stlmtsJSON, JSONArray citiesJSON){\n\n HashMap<VertexLocation, VertexObject> newCitiesStlmtsMap = new HashMap<>();\n\n //SETTLEMENTS\n //go parse all the data in the newStlmts array:\n for (int s = 0; s < stlmtsJSON.length(); s++){\n\n JSONObject currStlmtJSON = stlmtsJSON.getJSONObject(s);\n //get the HexLocation object out of the currStlmtJSON:\n JSONObject currStlmtLocJSON = currStlmtJSON.getJSONObject(\"location\");\n int sHLx = currStlmtLocJSON.getInt(\"x\");\n int sHLy = currStlmtLocJSON.getInt(\"y\");\n HexLocation newStlmtHexLoc = new HexLocation(sHLx, sHLy);\n //get the VertexDirection out of the currStlmtLocJSON:\n //VertexDirection newStlmtVtxDir = exchangeStringForVertexDirection(currStlmtLocJSON.getString(\"direction\"));\n VertexDirection newStlmtVtxDir = Converter.stringToVertexDirection(currStlmtLocJSON.getString(\"direction\"));\n //build a VertexLocation obj out of HexLoc and VertexDir:\n VertexLocation newStlmtVtxLoc = new VertexLocation(newStlmtHexLoc, newStlmtVtxDir);\n //get the stlmt owner:\n int newStlmtOwnerIndex = currStlmtJSON.getInt(\"owner\");\n //now build a complete VertexObject to represent the new settlement:\n VertexObject newSettlement = new VertexObject(newStlmtVtxLoc.getNormalizedLocation());\n newSettlement.setOwner(newStlmtOwnerIndex);\n newSettlement.setPieceType(PieceType.SETTLEMENT); //these are all of Settlement pieceType!\n\n newCitiesStlmtsMap.put(newSettlement.getVertexLocation().getNormalizedLocation(), newSettlement);\n }\n\n //CITIES\n for (int c = 0; c < citiesJSON.length(); c++){\n\n JSONObject currCityJSON = citiesJSON.getJSONObject(c);\n //get the HexLocation object out of the currCityJSON:\n JSONObject currCityLocJSON = currCityJSON.getJSONObject(\"location\");\n int cHLx = currCityLocJSON.getInt(\"x\");\n int cHLy = currCityLocJSON.getInt(\"y\");\n HexLocation newCityHexLoc = new HexLocation(cHLx, cHLy);\n //get the VertexDirection out of the currCityLocJSON:\n VertexDirection newCityVtxDir = Converter.stringToVertexDirection(currCityLocJSON.getString(\"direction\"));\n //build a VertexLocation obj out of HexLoc and VertexDir:\n VertexLocation newCityVtxLoc = new VertexLocation(newCityHexLoc, newCityVtxDir);\n //get the city owner:\n int newCityOwnerIndex = currCityJSON.getInt(\"owner\");\n //now build a complete VertexObject to represent the new city:\n VertexObject newCity = new VertexObject(newCityVtxLoc.getNormalizedLocation());\n newCity.setOwner(newCityOwnerIndex);\n newCity.setPieceType(PieceType.CITY); //these are all of City pieceType!\n\n newCitiesStlmtsMap.put(newCity.getVertexLocation().getNormalizedLocation(), newCity);\n }\n\n return newCitiesStlmtsMap;\n }", "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}", "private Planet getHighestCapacityPlanet(Person person) {\n Planet[] copy = Arrays.copyOf(planets, planets.length);\n Arrays.sort(copy, 0, copy.length);\n Planet p = null;\n for (int i = NUM_PLANETS - 1; i >= 0; i--) {\n p = copy[i];\n if (!p.isFull() && p.isQualified(person)) {\n return p;\n }\n p = null;\n }\n return p;\n }", "public static City buildMapFromNewYork(){\n City bangorME = new City(\"Bangor, ME\");\n \n City portlandME = new City(\"Portland, ME\");\n connect(portlandME, bangorME, 118);\n \n City portsmouthNH = new City(\"Portsmouth, NH\");\n connect(portsmouthNH, portlandME, 55);\n \n City burlingtonVT = new City(\"Burlington, VT\");\n connect(burlingtonVT, portsmouthNH, 190);\n connect(burlingtonVT, portlandME, 259);\n \n City bostonMA = new City(\"Boston, MA\");\n connect(bostonMA, portsmouthNH, 60);\n \n City providenceRI = new City(\"Providence, RI\");\n connect(providenceRI, bostonMA, 53);\n \n City worcesterMA = new City(\"Worcester, MA\");\n connect(worcesterMA, bostonMA, 49);\n connect(worcesterMA, portsmouthNH, 83);\n connect(worcesterMA, providenceRI, 44);\n \n City albanyNY = new City(\"Albany, NY\");\n connect(albanyNY, burlingtonVT, 177);\n connect(albanyNY, worcesterMA, 128);\n \n City newHavenCT = new City(\"New Haven, CT\");\n connect(newHavenCT, worcesterMA, 97);\n connect(newHavenCT, providenceRI, 100);\n \n City newYorkNY = new City(\"New York, NY\");\n connect(newYorkNY, newHavenCT, 79);\n connect(newYorkNY, albanyNY, 141);\n \n City buffaloNY = new City(\"Buffalo, NY\");\n connect(buffaloNY, albanyNY, 266);\n \n City philadelphiaPA = new City(\"Philadelphia, PA\");\n connect(philadelphiaPA, newYorkNY, 98);\n \n City washingtonDC = new City(\"Washington, DC\");\n connect(washingtonDC, philadelphiaPA, 145);\n \n City pittsburghPA = new City(\"Pittsburgh, PA\");\n connect(pittsburghPA, washingtonDC, 240);\n connect(pittsburghPA, philadelphiaPA, 288);\n connect(pittsburghPA, buffaloNY, 200);\n \n City clevelandOH = new City(\"Cleveland, OH\");\n connect(clevelandOH, pittsburghPA, 133);\n connect(clevelandOH, buffaloNY, 183);\n \n City richmondVA = new City(\"Richmond, VA\");\n connect(richmondVA, washingtonDC, 105);\n \n City charlestonWV = new City(\"Charleston, WV\");\n connect(charlestonWV, pittsburghPA, 213);\n connect(charlestonWV, washingtonDC, 343);\n connect(charlestonWV, richmondVA, 297);\n \n City charlotteNC = new City(\"Charlotte, NC\");\n connect(charlotteNC, richmondVA, 260);\n connect(charlotteNC, charlestonWV, 254);\n \n City atlantaGA = new City(\"Atlanta, GA\");\n connect(atlantaGA, charlotteNC, 229);\n \n City jacksonvilleFL = new City(\"Jacksonville, FL\");\n connect(jacksonvilleFL, atlantaGA, 300);\n connect(jacksonvilleFL, charlotteNC, 337);\n \n City miamiFL = new City(\"Miami, FL\");\n connect(miamiFL, jacksonvilleFL, 308);\n \n City tampaFL = new City(\"Tampa, FL\");\n connect(tampaFL, miamiFL, 251);\n connect(tampaFL, jacksonvilleFL, 187);\n \n City newOrleansLA = new City(\"New Orleans, LA\");\n connect(newOrleansLA, jacksonvilleFL, 473);\n connect(newOrleansLA, tampaFL, 563);\n connect(newOrleansLA, atlantaGA, 410);\n \n City nashvilleTN = new City(\"Nashville, TN\");\n connect(nashvilleTN, charlotteNC, 390);\n connect(nashvilleTN, atlantaGA, 226);\n connect(nashvilleTN, charlestonWV, 350);\n \n City memphisTN = new City(\"Memphis, TN\");\n connect(memphisTN, nashvilleTN, 191);\n connect(memphisTN, newOrleansLA, 347);\n connect(memphisTN, atlantaGA, 346);\n \n City detroitMI = new City(\"Detroit, MI\");\n connect(detroitMI, clevelandOH, 164);\n \n City indianapolisIN = new City(\"Indianapolis, IN\");\n connect(indianapolisIN, nashvilleTN, 264);\n connect(indianapolisIN, pittsburghPA, 339);\n connect(indianapolisIN, clevelandOH, 294);\n connect(indianapolisIN, detroitMI, 265);\n connect(indianapolisIN, charlestonWV, 299);\n \n City chicagoIL = new City(\"Chicago, IL\");\n connect(chicagoIL, detroitMI, 265);\n connect(chicagoIL, indianapolisIN, 177);\n \n City milwaukeeWI = new City(\"Milwaukee, WI\");\n connect(milwaukeeWI, chicagoIL, 89);\n \n City minneapolisMN = new City(\"Minneapolis, MN\");\n connect(minneapolisMN, milwaukeeWI, 300);\n \n City fargoND = new City(\"Fargo, ND\");\n connect(fargoND, minneapolisMN, 213);\n \n City siouxFallsSD = new City(\"Sioux Falls, SD\");\n connect(siouxFallsSD, fargoND, 214);\n connect(siouxFallsSD, minneapolisMN, 230);\n connect(siouxFallsSD, milwaukeeWI, 443);\n \n City omahaNE = new City(\"Omaha, NE\");\n connect(omahaNE, siouxFallsSD, 164);\n \n City desMoinesIA = new City(\"Des Moines, IA\");\n connect(desMoinesIA, omahaNE, 124);\n connect(desMoinesIA, chicagoIL, 306);\n connect(desMoinesIA, minneapolisMN, 221);\n \n City stLouisMO = new City(\"St. Louis, MO\");\n connect(stLouisMO, chicagoIL, 286);\n connect(stLouisMO, indianapolisIN, 235);\n connect(stLouisMO, nashvilleTN, 281);\n connect(stLouisMO, memphisTN, 256);\n \n City kansasCityMO = new City(\"Kansas City, MO\");\n connect(kansasCityMO, omahaNE, 168);\n connect(kansasCityMO, desMoinesIA, 176);\n connect(kansasCityMO, stLouisMO, 226);\n \n City oklahomaCityOK = new City(\"Oklahoma City, OK\");\n connect(oklahomaCityOK, kansasCityMO, 312);\n connect(oklahomaCityOK, stLouisMO, 449);\n connect(oklahomaCityOK, memphisTN, 416);\n \n City dallasTX = new City(\"Dallas, TX\");\n connect(dallasTX, oklahomaCityOK, 189);\n connect(dallasTX, memphisTN, 408);\n connect(dallasTX, newOrleansLA, 455);\n \n City houstonTX = new City(\"Houston, TX\");\n connect(houstonTX, dallasTX, 214);\n connect(houstonTX, newOrleansLA, 313);\n \n City sanAntonioTX = new City(\"San Antonio, TX\");\n connect(sanAntonioTX, dallasTX, 246);\n connect(sanAntonioTX, houstonTX, 182);\n \n City elPasoTX = new City(\"El Paso, TX\");\n connect(elPasoTX, dallasTX, 552);\n connect(elPasoTX, sanAntonioTX, 473);\n \n City albuquerqueNM = new City(\"Albuquerque, NM\");\n connect(albuquerqueNM, elPasoTX, 234);\n connect(albuquerqueNM, oklahomaCityOK, 482);\n \n City denverCO = new City(\"Denver, CO\");\n connect(denverCO, albuquerqueNM, 392);\n connect(denverCO, kansasCityMO, 528);\n connect(denverCO, omahaNE, 466);\n \n City billingsMT = new City(\"Billings, MT\");\n connect(billingsMT, denverCO, 485);\n connect(billingsMT, siouxFallsSD, 597);\n connect(billingsMT, fargoND, 529);\n \n City butteMT = new City(\"Butte, MT\");\n connect(butteMT, billingsMT, 211);\n \n City saltLakeCityUT = new City(\"Salt Lake City, UT\");\n connect(saltLakeCityUT, butteMT, 366);\n connect(saltLakeCityUT, denverCO, 480);\n \n City phoenixAZ = new City(\"Phoenix, AZ\");\n connect(phoenixAZ, elPasoTX, 379);\n connect(phoenixAZ, albuquerqueNM, 397);\n \n City lasVegasNV = new City(\"Las Vegas, NV\");\n connect(lasVegasNV, saltLakeCityUT, 369);\n connect(lasVegasNV, albuquerqueNM, 514);\n connect(lasVegasNV, phoenixAZ, 294);\n \n City losAngelesCA = new City(\"Los Angeles, CA\");\n connect(losAngelesCA, lasVegasNV, 263);\n connect(losAngelesCA, phoenixAZ, 350);\n \n City sanDiegoCA = new City(\"San Diego, CA\");\n connect(sanDiegoCA, losAngelesCA, 116);\n connect(sanDiegoCA, phoenixAZ, 335);\n connect(sanDiegoCA, lasVegasNV, 311);\n \n City montereyCA = new City(\"Monterey, CA\");\n connect(montereyCA, losAngelesCA, 319);\n \n City sanFranciscoCA = new City(\"San Francisco, CA\");\n connect(sanFranciscoCA, montereyCA, 114);\n connect(sanFranciscoCA, losAngelesCA, 358);\n \n City sacramentoCA = new City(\"Sacramento, CA\");\n connect(sacramentoCA, sanFranciscoCA, 84);\n connect(sacramentoCA, saltLakeCityUT, 585);\n \n City boiseID = new City(\"Boise, ID\");\n connect(boiseID, butteMT, 393);\n connect(boiseID, saltLakeCityUT, 301);\n \n City portlandOR = new City(\"Portland, OR\");\n connect(portlandOR, sacramentoCA, 538);\n connect(portlandOR, boiseID, 407);\n \n City seattleWA = new City(\"Seattle, WA\");\n connect(seattleWA, portlandOR, 175);\n connect(seattleWA, butteMT, 544);\n connect(seattleWA, boiseID, 472);\n \n //change this return city to start wherever you want\n return newYorkNY;\n }", "public abstract Map<Integer, Station> getStations() throws DataAccessException;", "public Planet (double x, double y, double r, double m, double vx, double vy, Color c) {\n this.xCoor = x;\n this.yCoor = y;\n this.rad = r;\n this.mass = m;\n this.xVel = vx;\n this.yVel = vy;\n this.col = c; \n \n }", "public static void setPlanets(ArrayList<Planet> planet){\n //ArrayList is a mutable reference type, so I should make a copy of the input ArrayList when \n //initializing the attribute. \n ArrayList<Planet> copy=new ArrayList<Planet>();\n for(int i=0;i<planet.size();i++){\n copy.add(planet.get(i));\n }\n planets=copy;\n //print out the details of every planet using toString method(the println will automatically using toString method)\n for(int j=0;j<planets.size();j++){\n System.out.println(planets.get(j));\n }\n }", "public Map<String, String> zzfz() {\n Map<String, String> zza;\n synchronized (this.zzrN) {\n zzfz zzjN = zzv.zzcN().zzjN();\n zza = (zzjN == null || this.zzFv == null) ? this.zzFs : zzjN.zza(this.zzFs, this.zzFv.zzfz());\n }\n return zza;\n }", "public final HashMap<Integer, Long> zzu() {\n HashMap<Integer, Long> hashMap = new HashMap<>();\n hashMap.put(0, this.zzsp);\n hashMap.put(1, this.zzsq);\n hashMap.put(2, this.zzsr);\n hashMap.put(3, this.zzfr);\n hashMap.put(4, this.zzfp);\n hashMap.put(5, this.zzss);\n hashMap.put(6, this.zzst);\n hashMap.put(7, this.zzsu);\n hashMap.put(8, this.zzfw);\n hashMap.put(9, this.zzfv);\n hashMap.put(10, this.zzsv);\n return hashMap;\n }", "public GameWorld()\n { super(3000, 1000, 1);\n planet[1][0]=new HomePlanet();\n planet[0][1]=new AlienPlanet();\n planet[0][2]=new AlienPlanet();\n planet[1][1]=new AlienPlanet();\n planet[1][2]=new AlienPlanet();\n prepare();\n \n }", "public ArrayList<Location> getPublicAirports() {\n return getAirports().stream().filter(loc -> loc.getClass().getSimpleName().equals(\"PublicAirport\")).collect(Collectors.toCollection(ArrayList::new));\n }", "void buildCity(VertexLocation vert);", "private HashMap<String, ArrayList<Integer>> createTonyParkerTestMap() {\n HashMap<String, ArrayList<Integer>> knownYearSeasonActivityMap = new HashMap<>();\n knownYearSeasonActivityMap.put(\"2001-02\", new ArrayList<>(Arrays.asList(1, -1, 1)));\n knownYearSeasonActivityMap.put(\"2002-03\", new ArrayList<>(Arrays.asList(1, -1, 1)));\n knownYearSeasonActivityMap.put(\"2003-04\", new ArrayList<>(Arrays.asList(1, -1, 1)));\n knownYearSeasonActivityMap.put(\"2004-05\", new ArrayList<>(Arrays.asList(1, -1, 1)));\n knownYearSeasonActivityMap.put(\"2005-06\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2006-07\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2007-08\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2008-09\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2009-10\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2010-11\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2011-12\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2012-13\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2013-14\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2014-15\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2015-16\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2016-17\", new ArrayList<>(Arrays.asList(1, 1, 1)));\n knownYearSeasonActivityMap.put(\"2017-18\", new ArrayList<>(Arrays.asList(1, -1, 1)));\n knownYearSeasonActivityMap.put(\"2018-19\", new ArrayList<>(Arrays.asList(1, 1, -1)));\n return knownYearSeasonActivityMap;\n }", "public HashMap<String, ArrayList<String>> getStations() \n\t{\n\t\t//return stations hashMap\n\t\treturn stations;\n\t}", "public Map<String, AccessPoint> createParameters() {\n Map<String, AccessPoint> pm = new TreeMap<>();\n pm.put(\"Minimum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMinimum\", this));\n pm.put(\"Maximum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMaximum\", this));\n pm.put(\"Tourist arrival time to Venice\", new MutableFieldAccessPoint(\"visitorArrivalVenice\", this));\n pm.put(\"Tourist arrival time to Milan\", new MutableFieldAccessPoint(\"visitorArrivalMilan\", this));\n pm.put(\"Tourist arrival time to Ravenna\", new MutableFieldAccessPoint(\"visitorArrivalRavenna\", this));\n return pm;\n }", "private static Topology getTopology(){\n final Serde<String> stringSerde = Serdes.String();\n final Serde<VehiclePosition> vpSerde = getJsonSerde();\n StreamsBuilder builder = new StreamsBuilder();\n KStream<String,VehiclePosition> positions = builder\n .stream(\"vehicle-positions\", Consumed.with(stringSerde, vpSerde));\n KStream<String,VehiclePosition> operator47Only =\n positions.filter((key,value) -> value.VP.oper == 47); \n operator47Only.to(\"vehicle-positions-oper-47\",\n Produced.with(stringSerde, vpSerde));\n Topology topology = builder.build();\n return topology;\n }", "private Map<String, Object> createDefaultMap() {\n Map<String, Object> result = new LinkedHashMap<>();\n result.put(\"stream_speed0\", 1);\n result.put(\"stream_start0\", 0);\n result.put(\"stream_end0\", 7);\n result.put(\"stream_speed1\", -2);\n result.put(\"stream_start1\", 15);\n result.put(\"stream_end1\", 19);\n\n result.put(\"fish_quantity\", numFishes);\n result.put(\"fish_reproduction\", 3);\n result.put(\"fish_live\", 10);\n result.put(\"fish_speed\", 2);\n result.put(\"fish_radius\", 4);\n\n result.put(\"shark_quantity\", numSharks);\n result.put(\"shark_live\", 20);\n result.put(\"shark_hungry\", 7);\n result.put(\"shark_speed\", 2);\n result.put(\"shark_radius\", 5);\n\n return result;\n }", "public void sunAndPlanet()\n {\n removeAllObjects();\n addObject (new Body (50, 240.0, new Vector(270, 0.03), new Color(255, 216, 0)), 460, 270);\n addObject (new Body (20, 4.2, new Vector(90, 2.2), new Color(0, 124, 196)), 695, 260);\n }", "@Override\r\n\tpublic void placeCity(VertexLocation vertLoc) {\n\t\t\r\n\t}", "public ForecastCatalog () {\n\t\teqk_count = -1;\n\t\tlat_lon_depth_list = new long[1];\n\t\tlat_lon_depth_list[0] = 0L;\n\t\tmag_time_list = new long[1];\n\t\tmag_time_list[0] = 0L;\n\t}", "private static void m568a() {\n if (f878a == null) {\n HashMap hashMap = new HashMap();\n f878a = hashMap;\n hashMap.put(\"CN\", p.China);\n f878a.put(\"FI\", p.Europe);\n f878a.put(\"SE\", p.Europe);\n f878a.put(\"NO\", p.Europe);\n f878a.put(\"FO\", p.Europe);\n f878a.put(\"EE\", p.Europe);\n f878a.put(\"LV\", p.Europe);\n f878a.put(\"LT\", p.Europe);\n f878a.put(\"BY\", p.Europe);\n f878a.put(\"MD\", p.Europe);\n f878a.put(\"UA\", p.Europe);\n f878a.put(\"PL\", p.Europe);\n f878a.put(\"CZ\", p.Europe);\n f878a.put(\"SK\", p.Europe);\n f878a.put(\"HU\", p.Europe);\n f878a.put(\"DE\", p.Europe);\n f878a.put(\"AT\", p.Europe);\n f878a.put(\"CH\", p.Europe);\n f878a.put(\"LI\", p.Europe);\n f878a.put(\"GB\", p.Europe);\n f878a.put(\"IE\", p.Europe);\n f878a.put(\"NL\", p.Europe);\n f878a.put(\"BE\", p.Europe);\n f878a.put(\"LU\", p.Europe);\n f878a.put(\"FR\", p.Europe);\n f878a.put(\"RO\", p.Europe);\n f878a.put(\"BG\", p.Europe);\n f878a.put(\"RS\", p.Europe);\n f878a.put(\"MK\", p.Europe);\n f878a.put(\"AL\", p.Europe);\n f878a.put(\"GR\", p.Europe);\n f878a.put(\"SI\", p.Europe);\n f878a.put(\"HR\", p.Europe);\n f878a.put(\"IT\", p.Europe);\n f878a.put(\"SM\", p.Europe);\n f878a.put(\"MT\", p.Europe);\n f878a.put(\"ES\", p.Europe);\n f878a.put(\"PT\", p.Europe);\n f878a.put(\"AD\", p.Europe);\n f878a.put(\"CY\", p.Europe);\n f878a.put(\"DK\", p.Europe);\n f878a.put(\"RU\", p.Russia);\n f878a.put(\"IN\", p.India);\n }\n }", "private CityByDegrees getStartingVertexCity() {\r\n\t\treturn this.startingVertexCity;\r\n\t}", "public HashMap<String,SupplyNode> getMap(){\n return t;\n }", "static PlanetWithoutNamePositionRadius builder() {\n return null;\n }", "public ArrayList<Vehicle> getPlanes() {\n return vehicles.stream().filter(loc -> loc.getClass().getSuperclass().getSimpleName().equals(\"Plane\")).collect(Collectors.toCollection(ArrayList::new));\n }", "@Override\n\tpublic Map getPointsForHotArea(String terminalId) {\n\t\tMap map = new HashMap();\n\t\tString lngs = \"\";\n\t\tString lats = \"\";\n\t\ttry {\n\t\t\tList<PositionData> info_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc limit 2000\");\n\t\t\tfor(int i=0;i<info_list.size();i++){\n\t\t\t\tif(info_list.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\tinfo_list.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<PositionData> position_list = new ArrayList<PositionData>();\n\t\t\tfor(int i=0;i<(info_list.size()>2000?2000:info_list.size());i++){\n\t\t\t\tposition_list.add(info_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=0;i<position_list.size();i++){\n\t\t\t\tString point_latitude = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\tpoint_latitude = point_latitude.substring(0,point_latitude.indexOf(\";\"));\n\t\t\t\tpoint_latitude = point_latitude.split(\":\")[1];\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart1 = point_latitude.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\tpoint_latitude = Integer.parseInt(point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\tlats += point_latitude + \",\";\n\t\t\t\t\n\t\t\t\tString point_longitute = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\tpoint_longitute = point_longitute.substring(0,point_longitute.indexOf(\";\"));\n\t\t\t\tpoint_longitute = point_longitute.split(\":\")[1];\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart2 = point_longitute.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart2 = \"0.\" + tempStrPart2;\n\t\t\t\tdouble tempD2 = Double.parseDouble(tempStrPart2)/60*100;\n\t\t\t\tpoint_longitute = Integer.parseInt(point_longitute.split(\"\\\\.\")[0]) + tempD2 + \"\";\n\t\t\t\tlngs += point_longitute + \",\";\n\t\t\t}\n\t\t\tmap.put(\"lngs\",lngs.subSequence(0, lngs.lastIndexOf(\",\")));\n\t\t\tmap.put(\"lats\",lats.subSequence(0, lats.lastIndexOf(\",\")));\n\t\t\t\n\t\t\t\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 map;\n\t}", "public Planet(double xP, double yP, double xV,\n double yV, double m, String img) {\n\t\txxPos = xP;\n\t\tyyPos = yP;\n\t\txxVel = xV;\n\t\tyyVel = yV;\n\t\tmass = m;\n\t\timgFileName =img;\n\t}", "public abstract Map<Integer, Station> getStations(boolean includeSilent);", "private void initMap(String day,int colIndex){\n position.put(day+\" 08\",new Pair(colIndex,1));\n position.put(day+\" 09\",new Pair(colIndex,2));\n position.put(day+\" 10\",new Pair(colIndex,3));\n position.put(day+\" 11\",new Pair(colIndex,4));\n position.put(day+\" 12\",new Pair(colIndex,5));\n position.put(day+\" 13\",new Pair(colIndex,6));\n position.put(day+\" 14\",new Pair(colIndex,7));\n position.put(day+\" 15\",new Pair(colIndex,8));\n position.put(day+\" 16\",new Pair(colIndex,9));\n position.put(day+\" 17\",new Pair(colIndex,10));\n position.put(day+\" 18\",new Pair(colIndex,11));\n position.put(day+\" 19\",new Pair(colIndex,12));\n position.put(day+\" 20\",new Pair(colIndex,13));\n }", "public Planet(Planet p){\n\txxPos = p.xxPos;\n\tyyPos = p.yyPos;\n\txxVel = p.xxVel;\n\tyyVel = p.yyVel ;\n\tmass = p.mass;\n\timgFileName = new String(p.imgFileName);\n\t}", "private Set<WorldAirport> getAirportSet(){\n\t\treturn new HashSet<WorldAirport>(this.getAirportMap().values());\n\t}", "private void setupVariant1TerrainMap() {\n\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-4), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-3), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,-2), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,0), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,2), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,2), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,3), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,3), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,3), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,4), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,4), TerrainKind.FOREST);\n\t}", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "public TravelMap() {\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tadjacencyList.add(new ArrayList<>());\n\t\t}\n\t}", "protected Ocean(){\n for (int i=0; i<10; i++){\n for (int j=0;j<10; j++){\n EmptySea empty = new EmptySea();\n ships[i][j] = empty;\n }\n }\n }", "public TreeMap<Double, EngineSpecifications> getMapOfEnginePowerInKW() {\n\t\tenginePowerKWMap = new TreeMap<>();\n\n\t\tint index = 0;\n\t\tfor (int i = 0; i < EnginePowerKW.length; i+=2) {\n\t\t\tfor (int j = i; j < i + 2; j++) {\n\t\t\t\tenginePowerKWMap.put(EnginePowerKW[j], engineTurboAndEngineTypeForPowerKWCollection.get(index));\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\n\t\treturn enginePowerKWMap;\n\t}", "public MarketingWS() {\n\t\tCity marseille = new City(\"Marseille\");\n\t\tCity antibes = new City(\"Antibes\");\n\t\tCity toulon = new City(\"Toulon\");\n\t\tCity aix = new City(\"Aix-en-provence\");\n\t\tCity nice = new City(\"Nice\");\n\t\tcities.add(marseille);\n\t\tcities.add(antibes);\n\t\tcities.add(toulon);\n\t\tcities.add(aix);\n\t\tcities.add(nice);\n\t}", "void savePlanet(MapSaveSettings settings) {\r\n\t\ttry {\r\n\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(settings.fileName), 1024 * 1024), \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\t\t\tout.printf(\"<planets>%n\");\r\n\t\t\t\tout.printf(\" <planet id='%s' x='%d' y='%d' radius='%d' type='%s' rotation='%s'>%n\", \"\", 0, 0, 30, \"rocky\", \"left-to-right\");\r\n\t\t\t\tif (settings.surface) {\r\n\t\t\t\t\tout.printf(\" <surface width='%d' height='%d'>%n\", renderer.surface.width, renderer.surface.height);\r\n\t\t\t\t\tfor (SurfaceFeature sf : renderer.surface.features) {\r\n\t\t\t\t\t\tout.printf(\" <tile type='%s' id='%s' x='%d' y='%d'/>%n\", sf.type, sf.id, sf.location.x, sf.location.y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tout.printf(\" </surface>%n\");\r\n\t\t\t\t}\r\n\t\t\t\tif (settings.buildings) {\r\n\t\t\t\t\tout.printf(\" <buildings>%n\");\r\n\t\t\t\t\tfor (Building b : renderer.surface.buildings) {\r\n\t\t\t\t\t\tout.printf(\" <building id='%s' tech='%s' x='%d' y='%d' build='%d' hp='%d' level='%d' worker='%d' energy='%d' enabled='%s' repairing='%s' />%n\",\r\n\t\t\t\t\t\t\t\tb.type.id, b.techId, b.location.x, b.location.y, b.buildProgress, b.hitpoints, b.upgradeLevel, b.assignedWorker, b.assignedEnergy, b.enabled, b.repairing);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tout.printf(\" </buildings>%n\");\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </planet>\");\r\n\t\t\t\tout.printf(\"</planets>\");\r\n\t\t\t} finally {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public SimpleMap getSimpleSolidMap() {\n\t\treturn m;\n\t}", "public static Map<String, String> getFcstTableMap() {\n return fcstTableMap;\n }", "public static Vector getSunPosition(double T){\n Vector sunPosition = new Vector(3);\n sunPosition = getMiniSun((T-51544.5)/365.25/100);\n sunPosition = sunPosition.multiplyVector(sunPosition, constants.AU);\n //System.out.println(\"Actual Sun Position \" + sunPosition.getSize(sunPosition)/1000 + \" km\");\n return sunPosition;\n }", "Map<String, Map<String, Double>> getElementCosts();", "public native vector kbGetMapCenter();", "List<Zone> getActiveZones(SpacedVector3 point);", "public void setPlanetSS(PlanetTemp planet) {\n solarSystem.setPlanet(planet);\n }", "@Override\n\tpublic synchronized Map<IOFSwitch, Map<Tenant3, Map<VirtualNetwork, Map<Host, OFPort>>>> getTable() {\n\n\t\treturn switchTenantVirtualNetworkMap;\n\t}", "public void sunPlanetMoon()\n {\n removeAllObjects();\n addObject (new Body (50, 240.0, new Vector(270, 0.0), new Color(255, 216, 0)), 460, 270);\n addObject (new Body (20, 4.2, new Vector(90, 2.2), new Color(0, 124, 196)), 720, 260);\n addObject (new Body (5, 0.8, new Vector(90, 3.25), new Color(240, 220, 96)), 748, 260);\n }", "private static Map<String, DateTimeZone> m68915c() {\n Map linkedHashMap = new LinkedHashMap();\n linkedHashMap.put(\"UT\", DateTimeZone.f8461a);\n linkedHashMap.put(\"UTC\", DateTimeZone.f8461a);\n linkedHashMap.put(\"GMT\", DateTimeZone.f8461a);\n m68911a(linkedHashMap, \"EST\", \"America/New_York\");\n m68911a(linkedHashMap, \"EDT\", \"America/New_York\");\n m68911a(linkedHashMap, \"CST\", \"America/Chicago\");\n m68911a(linkedHashMap, \"CDT\", \"America/Chicago\");\n m68911a(linkedHashMap, \"MST\", \"America/Denver\");\n m68911a(linkedHashMap, \"MDT\", \"America/Denver\");\n m68911a(linkedHashMap, \"PST\", \"America/Los_Angeles\");\n m68911a(linkedHashMap, \"PDT\", \"America/Los_Angeles\");\n return Collections.unmodifiableMap(linkedHashMap);\n }" ]
[ "0.6596835", "0.64581156", "0.60708815", "0.6027259", "0.5994481", "0.58679974", "0.5620886", "0.5518349", "0.5431397", "0.5393265", "0.538897", "0.534997", "0.53117996", "0.5264545", "0.5243326", "0.52167034", "0.51890385", "0.5176214", "0.514661", "0.51170206", "0.5082644", "0.5077382", "0.50738794", "0.50623655", "0.5057798", "0.5056792", "0.49974072", "0.49960265", "0.49756488", "0.49636507", "0.49110746", "0.49110666", "0.4903214", "0.489877", "0.4896677", "0.48917758", "0.4875971", "0.4868644", "0.48663256", "0.48474538", "0.4836761", "0.48250183", "0.4794268", "0.4793544", "0.4787347", "0.47869506", "0.4775617", "0.47734237", "0.4745676", "0.47454277", "0.4733927", "0.47179937", "0.470644", "0.46989867", "0.46984375", "0.4689103", "0.46844253", "0.4680538", "0.46765935", "0.46763605", "0.4671124", "0.4670297", "0.46672428", "0.4663401", "0.4662331", "0.4656748", "0.46441147", "0.46430638", "0.46420795", "0.46375066", "0.46349904", "0.4627804", "0.46142843", "0.46130627", "0.46041635", "0.46029416", "0.46021697", "0.46010014", "0.45982304", "0.45981452", "0.45882308", "0.4588098", "0.4587343", "0.45841488", "0.4573091", "0.4570174", "0.45665306", "0.45646864", "0.4546523", "0.4545851", "0.45437908", "0.45370936", "0.45359623", "0.45311648", "0.4528448", "0.45220244", "0.45186415", "0.45079398", "0.45023137", "0.44997683" ]
0.7157904
0
Instantiates a new criterion entry.
public ExternalDocumentEntry() { super(CDAFactory.eINSTANCE.createExternalDocument()); this.getMdht().getTemplateIds() .add(DatatypesFactory.eINSTANCE.createII("2.16.840.1.113883.10.20.1.36")); this.getMdht().setClassCode(ActClassDocument.DOC); this.getMdht().setMoodCode(ActMood.EVN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3645 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3648 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3649 */ return entry;\n/* */ }", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3586 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* 3588 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3589 */ return entry;\n/* */ }", "public PQEntry() {}", "public Entity() throws Throwable {\r\n\t\tThingsException.softwareProblem(\"Entry() instantiated with default constructor.\");\r\n\t}", "public Entry()\n {\n this(null, null, true);\n }", "public Entry() {\n }", "public DataEntry create(long dataEntryId);", "public KeyedEntry() { }", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "protected void initializeEntry(final IRasterModelEntry entry) {\n\n\t\t// make sure we have an entry\n\t\tif (entry == null) {\n\t\t\t// nothing to do\n\t\t} else if (entry.getEntryType().equals(RasterModelEntryType.VALUE)) {\n\t\t\tfinal int bucketStart = configuration.getGranularity().getMin();\n\t\t\tfinal int bucketEnd = configuration.getGranularity().getMax();\n\t\t\tfinal int step = configuration.getGranularity().getBucketSize();\n\n\t\t\tif (addedModelData > 0) {\n\t\t\t\tthrow new IllegalStateException(\"The RasterModelEntry '\"\n\t\t\t\t\t\t+ entry.getName() + \"' was added to the RasterModel '\"\n\t\t\t\t\t\t+ modelId + \"' after ModelData was added.\");\n\t\t\t}\n\n\t\t\t// create the granularity raster data\n\t\t\tfor (int i = bucketStart; i <= bucketEnd; i += step) {\n\n\t\t\t\t// create the key for this row\n\t\t\t\tfinal RasterBucket bucket = new RasterBucket(i);\n\n\t\t\t\t/*\n\t\t\t\t * now lets create the array for the data of the BaseRaster. We\n\t\t\t\t * can calculate some values for the RasterFunctions already\n\t\t\t\t * (i.e. the static once).\n\t\t\t\t */\n\t\t\t\tfinal IRasterModelData bucketData = new BaseRasterModelData();\n\n\t\t\t\t/*\n\t\t\t\t * Now we will add a the data of the init RasterFunction which\n\t\t\t\t * is used by this BaseRaster\n\t\t\t\t */\n\t\t\t\tentry.initTo(bucketData);\n\n\t\t\t\t// add the value for the bucket\n\t\t\t\tdataCollection.put(bucket, bucketData);\n\t\t\t}\n\t\t}\n\t}", "protected Entry(){}", "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean destroyTarget, boolean useCapacity, float percentageLost, boolean destroyBoth, boolean createOnGround, int customCutOffChance, double aMinimumSkill, CreationCategories category) {\n/* 3746 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, destroyTarget, useCapacity, percentageLost, destroyBoth, createOnGround, customCutOffChance, aMinimumSkill, category);\n/* */ \n/* */ \n/* 3749 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3750 */ return entry;\n/* */ }", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public NewsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Entry(String n)\n {\n name = n;\n }", "public ScriptureEntry(ScriptCit cv){\n chapVerse = cv;\n citations = null;\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n TCpyBankCreditExample example = new TCpyBankCreditExample();\n return example.createCriteria();\n }", "public RentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public StatVersionExample() {\r\n\t\toredCriteria = new ArrayList();\r\n\t}", "public Criteria createCriteria(Class<?> cl) throws HibException;", "public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void newCriteria(){\r\n this.criteria = EasyCriteriaFactory.createQueryCriteria(em, classe);\r\n }", "public LogEntry () {\n }", "public EvEntry() {\n\t}", "public UIBuilder getNewInstance(Map<String, Object> entries);", "public StockExistingExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria(TCpyBankCreditExample example) {\n super();\n this.example = example;\n }", "public GermchitExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria(SaleClassifyGoodExample example) {\n super();\n this.example = example;\n }", "public ActivityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n SaleClassifyGoodExample example = new SaleClassifyGoodExample();\n return example.createCriteria();\n }", "public qEntry() { }", "public PostInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ProjectCaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected StandardEntrySet() {}", "Instance(int N,int L){\r\n\t\tthis.x=new ArrayList<Entry>();\r\n\t\tthis.y=new HashSet<Integer>();\r\n\t\tthis.N=N;\r\n\t\tthis.L=L;\r\n\t}", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean depleteSource, boolean depleteTarget, float percentageLost, boolean destroyBoth, boolean createOnGround, CreationCategories category) {\n/* 3712 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, depleteSource, depleteTarget, percentageLost, destroyBoth, createOnGround, category);\n/* */ \n/* 3714 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3715 */ return entry;\n/* */ }", "public NewsCustomerSurveyExample() {\r\n oredCriteria = new ArrayList();\r\n }", "public ScriptureEntry(ScriptCit cv, List<SermCit> cits){\n chapVerse = cv;\n citations = cits;\n }", "public ExperimentInfo() { }", "public WaterExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public QuestEntity() {\r\n\r\n }", "public CommentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public LineInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "public StudentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n LitemallOrderExample example = new LitemallOrderExample();\n return example.createCriteria();\n }", "public DataSourceEntityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ApplyExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public CategoryratingcriteriaResource() {\n }", "public CDoorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public RegysDateCentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public CrkProductExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public JobExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "public ReportMetadataExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "protected Criteria(BDicTreeCodeExample example) {\n super();\n this.example = example;\n }", "public ExpertiseEntity() {\n }", "public ScheduleExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public GoodsExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public SearchConditionSB() {\r\n }", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public PurchaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected SafeHashMap.EntrySet instantiateEntrySet()\n {\n return new EntrySet();\n }", "public Entry() {\n this(GtkEntry.createEntry());\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "public TBusineCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ColumnStatisticsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }" ]
[ "0.5892874", "0.57654756", "0.56774586", "0.5634083", "0.5586621", "0.5579049", "0.5490071", "0.54777086", "0.54739803", "0.5466958", "0.5463326", "0.5462918", "0.5454926", "0.54171735", "0.5366101", "0.5363178", "0.5336755", "0.5330192", "0.5330192", "0.53301835", "0.5321808", "0.5284104", "0.5281848", "0.5279629", "0.5256856", "0.5242877", "0.5211052", "0.5209178", "0.52072066", "0.51941013", "0.51817816", "0.5179458", "0.51793903", "0.51385295", "0.5123627", "0.51080966", "0.5105175", "0.50801253", "0.5072003", "0.5039682", "0.5034767", "0.5021886", "0.501501", "0.5000903", "0.4976844", "0.49724832", "0.49710143", "0.49620342", "0.4955927", "0.4953774", "0.495227", "0.49522212", "0.49494192", "0.49419045", "0.49289986", "0.49271813", "0.49249995", "0.49239042", "0.49126762", "0.49108768", "0.49108768", "0.49079847", "0.4906972", "0.49036273", "0.49013463", "0.48991042", "0.48964435", "0.48895338", "0.48833016", "0.4878062", "0.48765182", "0.48645857", "0.4864224", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48577785", "0.48521122", "0.4840132", "0.4840132", "0.4840132", "0.4840132" ]
0.0
-1
Instantiates a new criterion entry.
public ExternalDocumentEntry( org.openhealthtools.mdht.uml.cda.ExternalDocument externalReference) { super(externalReference); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3645 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3648 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3649 */ return entry;\n/* */ }", "public static CreationEntry createSimpleEntry(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3586 */ CreationEntry entry = new SimpleCreationEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* 3588 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3589 */ return entry;\n/* */ }", "public PQEntry() {}", "public Entity() throws Throwable {\r\n\t\tThingsException.softwareProblem(\"Entry() instantiated with default constructor.\");\r\n\t}", "public Entry()\n {\n this(null, null, true);\n }", "public Entry() {\n }", "public DataEntry create(long dataEntryId);", "public KeyedEntry() { }", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "protected void initializeEntry(final IRasterModelEntry entry) {\n\n\t\t// make sure we have an entry\n\t\tif (entry == null) {\n\t\t\t// nothing to do\n\t\t} else if (entry.getEntryType().equals(RasterModelEntryType.VALUE)) {\n\t\t\tfinal int bucketStart = configuration.getGranularity().getMin();\n\t\t\tfinal int bucketEnd = configuration.getGranularity().getMax();\n\t\t\tfinal int step = configuration.getGranularity().getBucketSize();\n\n\t\t\tif (addedModelData > 0) {\n\t\t\t\tthrow new IllegalStateException(\"The RasterModelEntry '\"\n\t\t\t\t\t\t+ entry.getName() + \"' was added to the RasterModel '\"\n\t\t\t\t\t\t+ modelId + \"' after ModelData was added.\");\n\t\t\t}\n\n\t\t\t// create the granularity raster data\n\t\t\tfor (int i = bucketStart; i <= bucketEnd; i += step) {\n\n\t\t\t\t// create the key for this row\n\t\t\t\tfinal RasterBucket bucket = new RasterBucket(i);\n\n\t\t\t\t/*\n\t\t\t\t * now lets create the array for the data of the BaseRaster. We\n\t\t\t\t * can calculate some values for the RasterFunctions already\n\t\t\t\t * (i.e. the static once).\n\t\t\t\t */\n\t\t\t\tfinal IRasterModelData bucketData = new BaseRasterModelData();\n\n\t\t\t\t/*\n\t\t\t\t * Now we will add a the data of the init RasterFunction which\n\t\t\t\t * is used by this BaseRaster\n\t\t\t\t */\n\t\t\t\tentry.initTo(bucketData);\n\n\t\t\t\t// add the value for the bucket\n\t\t\t\tdataCollection.put(bucket, bucketData);\n\t\t\t}\n\t\t}\n\t}", "protected Entry(){}", "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean destroyTarget, boolean useCapacity, float percentageLost, boolean destroyBoth, boolean createOnGround, int customCutOffChance, double aMinimumSkill, CreationCategories category) {\n/* 3746 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, destroyTarget, useCapacity, percentageLost, destroyBoth, createOnGround, customCutOffChance, aMinimumSkill, category);\n/* */ \n/* */ \n/* 3749 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3750 */ return entry;\n/* */ }", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public NewsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Entry(String n)\n {\n name = n;\n }", "public ScriptureEntry(ScriptCit cv){\n chapVerse = cv;\n citations = null;\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n TCpyBankCreditExample example = new TCpyBankCreditExample();\n return example.createCriteria();\n }", "public RentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public StatVersionExample() {\r\n\t\toredCriteria = new ArrayList();\r\n\t}", "public Criteria createCriteria(Class<?> cl) throws HibException;", "public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void newCriteria(){\r\n this.criteria = EasyCriteriaFactory.createQueryCriteria(em, classe);\r\n }", "public LogEntry () {\n }", "public EvEntry() {\n\t}", "public UIBuilder getNewInstance(Map<String, Object> entries);", "public StockExistingExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria(TCpyBankCreditExample example) {\n super();\n this.example = example;\n }", "public GermchitExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria(SaleClassifyGoodExample example) {\n super();\n this.example = example;\n }", "public ActivityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n SaleClassifyGoodExample example = new SaleClassifyGoodExample();\n return example.createCriteria();\n }", "public qEntry() { }", "public PostInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ProjectCaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected StandardEntrySet() {}", "Instance(int N,int L){\r\n\t\tthis.x=new ArrayList<Entry>();\r\n\t\tthis.y=new HashSet<Integer>();\r\n\t\tthis.N=N;\r\n\t\tthis.L=L;\r\n\t}", "public static AdvancedCreationEntry createAdvancedEntry(int primarySkill, int objectSource, int objectTarget, int objectCreated, boolean depleteSource, boolean depleteTarget, float percentageLost, boolean destroyBoth, boolean createOnGround, CreationCategories category) {\n/* 3712 */ AdvancedCreationEntry entry = new AdvancedCreationEntry(primarySkill, objectSource, objectTarget, objectCreated, depleteSource, depleteTarget, percentageLost, destroyBoth, createOnGround, category);\n/* */ \n/* 3714 */ CreationMatrix.getInstance().addCreationEntry(entry);\n/* 3715 */ return entry;\n/* */ }", "public NewsCustomerSurveyExample() {\r\n oredCriteria = new ArrayList();\r\n }", "public ScriptureEntry(ScriptCit cv, List<SermCit> cits){\n chapVerse = cv;\n citations = cits;\n }", "public ExperimentInfo() { }", "public WaterExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public QuestEntity() {\r\n\r\n }", "public CommentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public LineInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Entry create(int compoID,\n\t\t\tint entryID,\n\t\t\tString entryName,\n\t\t\tString entryDesc,\n\t\t\tString entryAuthor) throws CreateException, RemoteException;", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "public StudentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static Criteria newAndCreateCriteria() {\n LitemallOrderExample example = new LitemallOrderExample();\n return example.createCriteria();\n }", "public DataSourceEntityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ApplyExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public CategoryratingcriteriaResource() {\n }", "public CDoorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public RegysDateCentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public CrkProductExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public JobExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "public ReportMetadataExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "protected Criteria(BDicTreeCodeExample example) {\n super();\n this.example = example;\n }", "public ExpertiseEntity() {\n }", "public ScheduleExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "public GoodsExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public SearchConditionSB() {\r\n }", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public PurchaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected SafeHashMap.EntrySet instantiateEntrySet()\n {\n return new EntrySet();\n }", "public Entry() {\n this(GtkEntry.createEntry());\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "protected Criteria createCriteriaInternal() {\r\n Criteria criteria = new Criteria();\r\n return criteria;\r\n }", "public TBusineCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ColumnStatisticsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }", "protected Criteria createCriteriaInternal() {\n Criteria criteria = new Criteria();\n return criteria;\n }" ]
[ "0.5892874", "0.57654756", "0.56774586", "0.5634083", "0.5586621", "0.5579049", "0.5490071", "0.54777086", "0.54739803", "0.5466958", "0.5463326", "0.5462918", "0.5454926", "0.54171735", "0.5366101", "0.5363178", "0.5336755", "0.5330192", "0.5330192", "0.53301835", "0.5321808", "0.5284104", "0.5281848", "0.5279629", "0.5256856", "0.5242877", "0.5211052", "0.5209178", "0.52072066", "0.51941013", "0.51817816", "0.5179458", "0.51793903", "0.51385295", "0.5123627", "0.51080966", "0.5105175", "0.50801253", "0.5072003", "0.5039682", "0.5034767", "0.5021886", "0.501501", "0.5000903", "0.4976844", "0.49724832", "0.49710143", "0.49620342", "0.4955927", "0.4953774", "0.495227", "0.49522212", "0.49494192", "0.49419045", "0.49289986", "0.49271813", "0.49249995", "0.49239042", "0.49126762", "0.49108768", "0.49108768", "0.49079847", "0.4906972", "0.49036273", "0.49013463", "0.48991042", "0.48964435", "0.48895338", "0.48833016", "0.4878062", "0.48765182", "0.48645857", "0.4864224", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48634237", "0.48577785", "0.48521122", "0.4840132", "0.4840132", "0.4840132", "0.4840132" ]
0.0
-1
one id can be provided
public Identificator getId() { Identificator id = null; if ((getMdht().getIds() != null) && (getMdht().getIds().size() > 0)) { id = new Identificator(getMdht().getIds().get(0)); } return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "public void setId(int id){ this.id = id; }", "public void setID(String id){\n this.id = id;\n }", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "id(int id, id id, int id) {}", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void setID( String id ) {\r\n this.id = id;\r\n }", "void id(int id, id id, int id) {}", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setID(String id) {\n this.id = id;\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "void setId(final String id);", "void setId(java.lang.String id);", "public void setID(int id){\n this.id=id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "public void setId(String id)\n {\n this.id = id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "void setId(int id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id);", "public void setId(String id) {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }" ]
[ "0.7414571", "0.7326482", "0.73204035", "0.728184", "0.72053176", "0.72053176", "0.7171675", "0.7084579", "0.7084579", "0.706377", "0.7054895", "0.70423466", "0.70423466", "0.7007279", "0.6991791", "0.698788", "0.698788", "0.698788", "0.698788", "0.698788", "0.698788", "0.69877833", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.69798964", "0.69768566", "0.6974068", "0.6968685", "0.6962389", "0.6961309", "0.69564253", "0.6953036", "0.69384533", "0.69289243", "0.6927721", "0.6918343", "0.6918343", "0.6910493", "0.6910493", "0.6910493", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877" ]
0.0
-1
Gets the narrative text for the reference.
public String getReferenceNarrativeText() { if ((this.getMdht().getText() != null) && (this.getMdht().getText().getText() != null)) { return this.getMdht().getText().getText(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextWithReferences getTextWithReferences();", "@Override\n public String getText(Object object) {\n String label = ((Reference)object).getName();\n return label == null || label.length() == 0 ?\n getString(\"_UI_Reference_type\") :\n getString(\"_UI_Reference_type\") + \" \" + label;\n }", "public String getDisplayText() {\n\n\t\tString s = FindAndReplace.replace(this.getDescription(), \"<br>\", \"\\n\", true);\n\t\treturn removeEntityRefs(s);\n\t}", "public java.lang.String getReference_Doc() {\r\n return reference_Doc;\r\n }", "java.lang.String getRef();", "String getReference();", "String getReference();", "public String getReference();", "public String getReference();", "public java.lang.String getReference() {\n return reference;\n }", "public String getDocumentNote();", "@Nullable\n String getRef();", "String getRemark();", "@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}", "public RichText getDescr();", "@Override\n\tpublic String getNotes() {\n\t\treturn text;\n\t}", "public String getDisplayText() {\r\n\t\treturn Strings.isNOTNullOrEmpty(this.getText())\r\n\t\t\t\t\t\t? this.getText()\r\n\t\t\t\t\t\t: Strings.isNOTNullOrEmpty(this.getDescription())\r\n\t\t\t\t\t\t\t\t? this.getDescription()\r\n\t\t\t\t\t\t\t\t: this.getUrl() != null\r\n\t\t\t\t\t\t\t\t\t\t? this.getUrl().asString()\r\n\t\t\t\t\t\t\t\t\t\t: \"NO TEXT DEFINED\";\r\n\t}", "public final String getReference() {\n return reference;\n }", "public String getText() {\n\t\t\treturn text.get();\n\t\t}", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}", "protected String getCodeDescription(ResolvedConceptReference ref) throws LBException {\r\n EntityDescription desc = ref.getEntityDescription();\r\n if (desc != null)\r\n return desc.getContent();\r\n return \"<Not assigned>\";\r\n }", "public PdfObject getRichText() {\n return getPdfObject().get(PdfName.RC);\n }", "private String getString(Proposal proposal) {\n\t\tif (proposal == null) {\n\t\t\treturn EMPTY;\n\t\t}\n\t\t// if (labelProvider == null) {\n\t\t// return proposal.getLabel() == null ? proposal.getContent()\n\t\t// : proposal.getLabel();\n\t\t// }\n\t\t// return labelProvider.getText(proposal);\n\t\treturn proposal.getValue();\n\t}", "org.hl7.fhir.String getDocumentation();", "public String getAnnouncement();", "java.lang.String getNotes();", "java.lang.String getNotes();", "java.lang.String getExperienceText();", "@Override\n public String getText() {\n try {\n return doc.select(\".post-content\").get(0).text().replaceAll(\"\\n\", \" \").\n // removing references\n replaceAll(\"\\\\[[\\\\w\\\\s\\\\.\\\\-\\\\,;\\\\?\\\\!\\\\:]+\\\\]\", \"\");\n } catch (NullPointerException e) {\n return null;\n }\n }", "public String getSntext() {\n return sntext;\n }", "public String getText() {\n\t\treturn null;\n\t}", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public String getText() {\n return (getFieldValue(fields[0]) + \".\" + getFieldValue(fields[1]) + \".\" + getFieldValue(fields[2]) + \".\" + getFieldValue(fields[3]));\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public final String getText() {\n\t\treturn text;\n\t}", "public String getText() {\n\t\treturn this.text;\n\t}", "public String getText() {\n\t\treturn this.text;\n\t}", "private Text rel() {\n\t\tText rel = text();\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn rel;\r\n\t}", "String getContainmentReference();", "public java.lang.String getExperienceText() {\n java.lang.Object ref = experienceText_;\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 experienceText_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "public String getRef() {\n return ref;\n }", "public String getCustomerRelationshipAlertNarrative() {\n return customerRelationshipAlertNarrative;\n }", "protected Text getText() {\n \t\treturn text;\n \t}", "public String getText() {\r\n\t\treturn text;\r\n\t}", "public String getText() {\r\n\t\treturn text;\r\n\t}" ]
[ "0.658477", "0.64111733", "0.6394869", "0.6387471", "0.63291925", "0.6316659", "0.6316659", "0.63018584", "0.63018584", "0.62968117", "0.62671274", "0.62101775", "0.62049973", "0.6199648", "0.6197073", "0.61940175", "0.618964", "0.61592144", "0.6138579", "0.61350465", "0.61350465", "0.61350465", "0.6125956", "0.6108853", "0.61059475", "0.6099135", "0.60817486", "0.60747266", "0.6052632", "0.6041354", "0.6041354", "0.60300463", "0.60228926", "0.6015476", "0.6009633", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.6001532", "0.5999799", "0.59832454", "0.5981564", "0.5970401", "0.5970401", "0.5970401", "0.59692", "0.59539986", "0.59539986", "0.5950448", "0.5940055", "0.59396875", "0.5933469", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.5932482", "0.59307146", "0.5927901", "0.5922575", "0.5922403", "0.5922403" ]
0.8563752
0
Gets the url for the reference.
public String getReferenceUrl() { if ((this.getMdht().getText() != null) && (this.getMdht().getText().getReference() != null)) { return this.getMdht().getText().getReference().getValue(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public URI getReferenceUri() {\n return m_referenceUri;\n }", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public String getURL();", "public String getURL()\n {\n return getURL(\"http\");\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public Reference getHref() {\n return this.href;\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n }\n return s;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getUrl() {\n Object ref = url_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n url_ = s;\n return s;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n url_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 url_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public java.lang.String getURL() {\n return URL;\n }", "Uri getUrl();", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "@Override\r\n public String getURL() {\n return url;\r\n }", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "@Nonnull public String getURL() {\n return url;\n }", "public java.lang.String getUrl() {\n return url;\n }", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\n\t\tif (null != this.url) {\n\t\t\treturn this.url;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"url\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getUrl() {\n\t\treturn this.url;\n\t}", "public java.lang.CharSequence getURL() {\n return URL;\n }", "String getReference();", "String getReference();", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }", "public String getURL() {\r\n\t\treturn url;\r\n\t}", "String getHref();", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getURL() {\n\t\treturn getName();\n\t}", "public java.lang.CharSequence getURL() {\n return URL;\n }", "ReferenceLink createReferenceLink();", "public String getURL() {\n\t\treturn url;\n\t}", "public String getURL() {\n\t\treturn URL;\n\t}", "String getLink();", "public String getUrl()\n {\n return this.url;\n }", "public String getURL() {\r\n return url;\r\n }", "public String getUrl() {\n return this.Url;\n }", "public String getURL() {\n return url;\n }", "public String getLink();", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "public String getUrl() {\n return this.url;\n }", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public String url() {\n return this.url;\n }", "public java.lang.String getURL() {\n return uRL;\n }", "java.net.URL getUrl();", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl()\n {\n return url;\n }", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "public URL getURL() {\r\n try {\r\n return new URL(\"http://www.bluej.org/doc/writingextensions.html\");\r\n } catch (Exception eee) {\r\n // The link is either dead or otherwise unreachable\r\n System.out.println(\"Simple extension: getURL: Exception=\" + eee.getMessage());\r\n return null;\r\n }\r\n }", "public String getUri();", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }", "public static Reference getReference() {\n return getRequest() == null ? null : getRequest().getResourceRef();\n }" ]
[ "0.72877663", "0.7225614", "0.72042286", "0.7191793", "0.7185918", "0.7173457", "0.7173457", "0.71667874", "0.71549183", "0.7143246", "0.71006906", "0.71002847", "0.708858", "0.70617443", "0.7046611", "0.70133024", "0.70133024", "0.698944", "0.698944", "0.698944", "0.6981676", "0.69733477", "0.69607645", "0.6956589", "0.6953852", "0.6953852", "0.69298583", "0.69298583", "0.6920931", "0.6882354", "0.6874651", "0.6874651", "0.686589", "0.6840576", "0.68380874", "0.6813409", "0.67925674", "0.67641646", "0.67629087", "0.6755032", "0.67454904", "0.67439497", "0.67439497", "0.67285657", "0.67255443", "0.6724697", "0.67238027", "0.67238027", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6715543", "0.6710238", "0.66937524", "0.6683824", "0.66765225", "0.6674439", "0.6674439", "0.6674439", "0.6674439", "0.6670709", "0.6668362", "0.66635436", "0.66620827", "0.66608095", "0.66593826", "0.6652385", "0.6649934", "0.6646739", "0.66277444", "0.6607413", "0.6595193", "0.6592224", "0.658727", "0.6575572", "0.65752673", "0.65749407", "0.65734196", "0.65734196", "0.65734196", "0.65734196", "0.65734196", "0.65734196", "0.65734196", "0.6568095", "0.6567538", "0.6567538", "0.6567538", "0.6567538", "0.6567538", "0.6567538", "0.6565433", "0.656383", "0.65592587", "0.6553209" ]
0.7731569
0
one id can be provided
public void setId(Identificator id) { this.getMdht().getIds().clear(); if (id != null) { this.getMdht().getIds().add(id.getIi()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "public void setId(int id){ this.id = id; }", "public void setID(String id){\n this.id = id;\n }", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "id(int id, id id, int id) {}", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void setID( String id ) {\r\n this.id = id;\r\n }", "void id(int id, id id, int id) {}", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setID(String id) {\n this.id = id;\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "void setId(final String id);", "void setId(java.lang.String id);", "public void setID(int id){\n this.id=id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "public void setId(String id)\n {\n this.id = id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "void setId(int id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id);", "public void setId(String id) {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void set_id(String id)\r\n\t{\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }" ]
[ "0.7414571", "0.7326482", "0.73204035", "0.728184", "0.72053176", "0.72053176", "0.7171675", "0.7084579", "0.7084579", "0.706377", "0.7054895", "0.70423466", "0.70423466", "0.7007279", "0.6991791", "0.698788", "0.698788", "0.698788", "0.698788", "0.698788", "0.698788", "0.69877833", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.6981181", "0.69798964", "0.69768566", "0.6974068", "0.6968685", "0.6962389", "0.6961309", "0.69564253", "0.6953036", "0.69384533", "0.69289243", "0.6927721", "0.6918343", "0.6918343", "0.6910493", "0.6910493", "0.6910493", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877", "0.69005877" ]
0.0
-1
Sets the text reference.
public void setReference(String value, String narrativeText) { this.getMdht().setText(Util.createReference(value, narrativeText)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void setReferenceText(String reference) {\n\t\tgetRoot().setText(CoreDataTypeHelpers.createEDWithReference(reference));\n\t}", "private void setText(Text text) {\n \t\tthis.text = text;\n \t}", "public void setText(String text)\n\t{\n\t\tthis.text = text;\n\t}", "public void setText(String text)\n\t{\n\t\tthis.text = text;\n\t}", "public void setText(String text) {\r\n\t\tthis.text = text;\r\n\t}", "public void setText(String text) {\r\n\t\tthis.text= text;\r\n\t}", "public void setText(String text) {\n\t\tthis.text = text;\n\t}", "public void setText(String text) {\n\t\tthis.text = text;\n\t}", "public void setText(String text) {\n\t\tthis.text = text;\n\t}", "public void setText(String text) {\r\n this.text = text;\r\n }", "public void setText(String text)\n {\n this.text = text;\n }", "public void setText(String text) {\n\t\t\n\t}", "public void setText(String text) {\r\n\r\n\t}", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n this.text = text;\n }", "public void setText(String text) {\n mText = text;\n }", "public void setText(String text) {\n this.text.setText(text);\n }", "public void setText(java.lang.String text)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$18, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TEXT$18);\n }\n target.setStringValue(text);\n }\n }", "public void setText(String text) {\n this.textData = text;\n }", "void setReference(String reference);", "public void setText(String text)\n\t{\n\t Change.push(new BufferNote(this));\n\t\tthis.text = text;\n\t\tChange.push(new BufferNote(this));\n\n\t\trepaint();\n\t}", "public void xsetText(org.apache.xmlbeans.XmlString text)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TEXT$18, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TEXT$18);\n }\n target.set(text);\n }\n }", "public void setReference(String reference);", "public void setText(String t) {\n\t\t\ttext.set(t);\n\t\t}", "public void setText(java.lang.String text)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TEXT$0);\n }\n target.setStringValue(text);\n }\n }", "public void setText(String t) {\n\t\ttext = t;\n\t\tb.setText(t);\n\t}", "public void setText(java.lang.String newText) {\n \t\ttext = newText;\n \t}", "public void xsetText(org.apache.xmlbeans.XmlString text)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TEXT$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TEXT$0);\n }\n target.set(text);\n }\n }", "void setRef(java.lang.String ref);", "public void setText(String s) {\n text = s;\n }", "public void setText(String text);", "public void setText(String text) {\n if (text.equals(_text))\n return;\n\n _text = text;\n resetLayout();\n //enableCache(text != null && text.length() != 0);\n update();\n }", "public void setText(String text) {\n\t\tthis.text = text;\n\t\thandleConfig(\"text\", text);\n\t}", "public void setText(String text) {\n this.originalText = text;\n this.a_text.setText(text);\n this.a_text.setEnabled(true);\n }", "public void setText(String text) {\n\t\tthis.text = text;\n\t\tupdateView();\n\t}", "public void setText( String text );", "public synchronized void setText(final String text) {\n try {\n int length = document.getLength();\n if (document instanceof AbstractDocument) {\n ((AbstractDocument)document).replace(0, length, text, null);\n } else {\n document.remove(0, length);\n document.insertString(0, text, null);\n }\n } catch (final BadLocationException e) {\n }\n }", "public void setText(String text) {\n\t\ttry {\n\t\t\tdoc.remove(0, doc.getLength());\n\t\t\tdoc.insertString(0, text, PLAIN);\n\t\t} catch (BadLocationException ignore) {\n\t\t\tignore.printStackTrace();\n\t\t\teditor.setCaretPosition(0);\n\t\t}\n\t}", "void set(String text);", "public void setText(String text){\n this.roomText = text;\n this.hasText = true;\n }", "public void setAsText(String text)\n {\n setValue(getAsDocument(text));\n }", "public void setText(String text) {\n\t\tthis.textPane.setText(text);\n\t}", "public void setText(String text) {\n\t\tcurrentTrack.setText(text);\n\t}", "public void updateText( String text ) {\n\t\tthis.text = text;\n\t}", "void setText(String text);", "public void setText(String text) {\n mTextContainer.setText(text);\n }", "public final void setReference(final String newReference) {\n reference = newReference;\n }", "public void setText(byte[] text) {\n\t\tthis.text = text;\n\t}", "private void setText(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n text_ = value;\n }", "public void setText(String text) {\n this.text = text;\n setChanged();\n notifyObservers();\n }", "void setText (String text);", "public void setText ( String text ) {\r\n\t\tgetStateHelper().put(PropertyKeys.text, text);\r\n\t\thandleAttribute(\"text\", text);\r\n\t}", "public void setText(String text) {\n\t\tthis.smartField.setContents(text);\n\t}", "private void setReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (!allRefs.contains(ref) && allRefs.contains(\"chr\" + ref)) {\n ref = \"chr\" + ref;\n }\n currentReference = ref;\n Genome loadedGenome = GenomeController.getInstance().getGenome();\n setMaxRange(new Range(1, loadedGenome.getLength()));\n setRange(1, Math.min(1000, loadedGenome.getLength()));\n }", "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public void setText(CharSequence text){\n if(text == null){\n text = \"\";\n }\n\n if(mText != null){\n mText.removeContentListener(this);\n }\n mText = new Content(text);\n mCursor = mText.getCursor();\n mCursor.setAutoIndent(mAutoIndent);\n mCursor.setLanguage(mLanguage);\n mEventHandler.reset();\n mText.addContentListener(this);\n mText.setUndoEnabled(mUndoEnabled);\n\n if(mSpanner != null){\n mSpanner.setCallback(null);\n }\n mSpanner = new TextColorProvider(mLanguage.createAnalyzer());\n mSpanner.setCallback(this);\n\n TextColorProvider.TextColors colors = mSpanner.getColors();\n colors.getSpans().clear();\n mSpanner.analyze(getText());\n\n mMaxPaintX = 0;\n mMinModifiedLine = -1;\n //requestLayout();\n\n if(mInputMethodManager != null) {\n mInputMethodManager.restartInput(this);\n }\n invalidate();\n }", "public void setText(String text) {\n\t\ttextLabel.setText(text);\n\t}", "public void setText (String text) {\r\n\r\n\t\tif (getLength() > 0) {\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsuper.remove(0, getLength());\r\n\t\t\t} catch (BadLocationException ble) {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (text != null) {\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsuper.insertString(0, text, null);\r\n\t\t\t} catch (BadLocationException ble) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setText(String text)\n {\n field.setText(text);\n }", "public void setRelativeText(java.lang.String newRelativeText) {\n \t\trelativeText = newRelativeText;\n \t}", "public void setText(CharSequence newText) {\n getTextBuffer().replace(new SelectionSetter(), 0, getTextBuffer().length(), newText, new SelectionSetter(0));\n }", "public void setText(String text) {\n\t\ttextField.setText(text);\n\t}", "public void setText(String newText) {\n\t\t_pcs.firePropertyChange(\"text\", this.text, newText); //$NON-NLS-1$\n\t\tthis.text = newText;\n\t}", "public void setText(String text) {\n GtkEntry.setText(this, text);\n }", "public void setDefaultText(String text){\n this.defaultText = text;\n try {\n getDocument().insertString(0,defaultText,null); \n }catch (BadLocationException ble){\n System.err.println(\"DefaultText einfuegen ist fehlgeschlagen!\");\n }\n }", "public HBuilder setText(String text)\r\n\t\t{\r\n\t\t\th.innerText = text;\r\n\t\t\treturn this;\r\n\t\t}", "public void setText(String s) {\n this.getDocument().removeUndoableEditListener(undoableEditListener);\n super.setText(s);\n this.getDocument().addUndoableEditListener(undoableEditListener);\n }", "@Override\r\n\tpublic void setText(String text) {\n\t\tsuper.setText(foundedRecords + \" : \" +text);\r\n\t}", "public void setTxt(String txt) {\n this.txt = txt;\n }", "public void setText(String txt)\n {\n fileName.setText(txt);\n }", "public void setReference(java.lang.String reference) {\n this.reference = reference;\n }", "public void setRichText(String text) {\n if (ViewCompat.isAttachedToWindow(this)) {\n RichText.from(text).into(this);\n\n } else {\n tempRichText = text;\n }\n }", "public void setTextValue(String textValue) {\r\n this._textValue = textValue;\r\n }", "@Override\n\t\tpublic void setText(CharSequence text, BufferType type) {\n\t\t\tsuper.setText(text, type);\n\t\t\tmDeleteStatus = false;\n\t\t}", "public void setText(final String text) {\n\t\tclear();\n\t\tsummaryEditorPane.setText(text);\n\t\tsummaryEditorPane.setCaretPosition(0);\n\t}", "public void setReference(String reference) {\n this.reference = reference;\n }", "public void setReference(String reference) {\n this.reference = reference;\n }", "public void setText(String text) {\n this.text = text == null ? null : text.trim();\n }", "public void setText(String text) {\n this.text = text == null ? null : text.trim();\n }", "public void setAsText (String text) throws java.lang.IllegalArgumentException {\n String programmaticName = findProgrammaticName(text);\n setValue((programmaticName == null) ? text : programmaticName);\n }", "public void setText(String text) {\r\n this.text = text == null ? null : text.trim();\r\n }", "@Override\n public void setText(String text) {\n label.setText(text);\n textArea.setText(text);\n }", "public void setAsText( String pText) {\n\t\tsetValue( pText);\n\t}", "public void setText(String text)\n {\n getComponent().setText(text);\n invalidateSize();\n }", "void setText(String text) throws XmlBuilderException;", "public void text( String text )\n {\n markup( escape( text ) );\n }", "public void setValue(String text) {\n\t\tthis.value = text;\n\t}", "public void setAsText(String text) throws java.lang.IllegalArgumentException {\n modifiedEditor.setAsText (text);\n }", "public void addText(String text) {\n\t\tthis.text = text;\n\t}", "public Builder setSubtitleRef(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subtitleRef_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "void setText(int offset, int length, String newText)\n\t{\n\t}", "protected final void _setDocText(String text)\n throws BadLocationException\n {\n _doc.remove(0, _doc.getLength());\n _doc.insertString(0, text, null);\n }", "public void setText(final String text) {\n this.text = text;\n reply = EntitiesExtractor.getReply(text);\n mentions = EntitiesExtractor.getMentions(text);\n hashtags = EntitiesExtractor.getHashTags(text);\n urls = EntitiesExtractor.getURLs(text);\n rtOrigins = EntitiesExtractor.getRTOrigins(text);\n }", "TextWithReferences getTextWithReferences();" ]
[ "0.7904168", "0.737174", "0.70941573", "0.70941573", "0.70909655", "0.70764524", "0.70713896", "0.70713896", "0.70713896", "0.70691574", "0.705905", "0.7039602", "0.70278", "0.7005279", "0.7005279", "0.7005279", "0.7005279", "0.7005279", "0.7005279", "0.7005279", "0.6999899", "0.6964364", "0.6953238", "0.6951826", "0.6947024", "0.6911179", "0.6901075", "0.6872899", "0.6866521", "0.68631035", "0.68630356", "0.6859607", "0.6831292", "0.6831131", "0.675415", "0.6710878", "0.6704574", "0.6684338", "0.6676108", "0.6664493", "0.6647935", "0.6637222", "0.66003954", "0.6576594", "0.65545714", "0.65524906", "0.65505826", "0.65391487", "0.65303546", "0.6520708", "0.65072536", "0.6477164", "0.6463488", "0.64494735", "0.6421571", "0.6404109", "0.64026856", "0.639803", "0.63877976", "0.6372445", "0.6364256", "0.63318306", "0.63127655", "0.6295813", "0.6294673", "0.6291123", "0.6272992", "0.62551993", "0.6252139", "0.62444234", "0.6198724", "0.61984164", "0.6196524", "0.6194308", "0.6194143", "0.61780185", "0.6172483", "0.615447", "0.6133983", "0.6133351", "0.61229825", "0.61229825", "0.6121804", "0.6121804", "0.6115821", "0.61141837", "0.6113617", "0.61127454", "0.6105268", "0.609539", "0.60940003", "0.6089962", "0.60879683", "0.6087508", "0.6081118", "0.60798395", "0.6077569", "0.6074", "0.6069386", "0.6047751" ]
0.7373215
1
1. make an array of 5 Strings
public static void main(String[] args) { String[] names = new String[5]; names[0]="Bob"; names[1]="Jeff"; names[2]="Sam"; names[3]="Mason"; names[4]="Jack"; //2. print the third element in the array System.out.println(names[2]); //3. set the third element to a different value names[2]="Rick"; //4. print the third element again System.out.println(names[2]); //5. use a for loop to print all the values in the array // BE SURE TO USE THE ARRAY'S length VARIABLE for (int i = 0; i < names.length; i++) { System.out.println(names[i]); } //6. make an array of 50 integers int[] counters = new int[50] ; Random r = new Random(); //7. use a for loop to make every value of the integer array a random number for (int i = 0; i < counters.length; i++) { counters[i]= r.nextInt(50); } //8. without printing the entire array, print only the smallest number in the array int smallest = counters[0]; for (int i = 0; i < counters.length; i++) { if(smallest>counters[i]) { smallest=counters[i]; } System.out.println(counters[i]); } System.out.println(smallest); //9 print the entire array to see if step 8 was correct //10. print the largest number in the array. int largest = counters[0]; for (int i = 0; i < counters.length; i++) { if(largest<counters[i]) { largest=counters[i]; } } System.out.println(largest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stringObject(){\n\n String s1[] = new String[5];\n\n s1[0] = \"A1\";\n s1[1] = \"A2\";\n s1[2] = \"A3\";\n s1[3] = \"A4\";\n s1[4] = \"A5\";\n\n for(int i=0; i < s1.length; i++){\n System.out.println(\"s1[\" + i + \"] = \" + s1[i]);\n\n }\n }", "private static String[] randomStrings(int elements) {\n String[] array = new String[elements];\n for (int i = 0; i < array.length; i++) {\n int randomLength = (int) (Math.random() * 16) + 10; // 10 - 25 length\n StringBuilder builder = new StringBuilder();\n for (int j = 0; j < randomLength; j++) {\n /* Pick random integer in the range of 65-90 and create a character \n * out of it. The range 65-90 represents characters set of A-Z. 65 = 'A' */\n int randomChar = (int) (Math.random() * 26) + 65; \n builder.append((char) randomChar);\n }\n array[i] = builder.toString(); // add current word to the array\n }\n return array;\n }", "public static String[] strings() {\n\tString[]update = new String[MAX];\n\tfor (int i = 0; i < MAX; i++) {\n\t update[i] = new String (\"george\");\n\t}\n\n\treturn update;\n }", "@Override\n protected List<String> initialize(int size) {\n String[] ia = Generated.array(String.class,\n new RandomGenerator.String(), size);\n return Arrays.asList(ia);\n }", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "private static void initialise( String booth[] ) {\n\r\n for (int x = 0; x < 6; x++ ) { //Assigning all the 6 booths as \"empty\"\r\n booth[x] = \"empty\";\r\n }\r\n }", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public String[] getStringArray();", "public static Object[] shuffleAndList(String[] arr){\n ArrayList<String> newArr = new ArrayList<String>();\n List<String> nameList = new ArrayList<String>();\n for(int i=0; i < arr.length; i++) {\n nameList.add(arr[i]);\n \n }\n Collections.shuffle(nameList);\n for(int i=0; i < nameList.size(); i++) {\n System.out.println(nameList.get(i));\n if (nameList.get(i).length() > 5) {\n newArr.add(nameList.get(i));\n }\n \n }\n return newArr.toArray();\n }", "public static String[] ranTenStrings() {\n String[] ranTenStrings = new String[10];\n for(int i=0; i < 10; i++){\n ranTenStrings[i] = ranLetterString();\n }\n return ranTenStrings;\n\n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "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 }", "private static void standardPopulate(String[] s) {\n\t\tfor(/*int i = 0; i<s.length;i++*//* String z: s*/ int i = 0;i<s.length;i++){\r\n\t\t\t//s[i] = \"String #\"+(i+1);\r\n\t\t\t/*i++;\r\n\t\t\tz = \"String #\"+(i+1); */\r\n\t\t\tString string= \"String #\"+(i+1);\r\n\t\t\ts[i] = string; // setting position i into string\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n StringySuperArray data = new StringySuperArray(5);\n\n //System.out.println(data1.toStringDebug());\n System.out.println(data.toStringDebug());\n\n // data1.add(\"hi\");\n //data.add(\"hi\");\n \n int i = 0;\n while(i < 26){\n\tdata.add(\"\"+(char)('A'+i%26));\n\t//data1.add(\"asd\");\n\ti++;\n }\n\n //data1.add(\"hi\");\n \n //System.out.println(data1.add(\"wfd\"));\n\n //System.out.println(data.size());\n \n //System.out.println(data.get(10));\n\n //System.out.println(data.toStringDebug());\n\n System.out.println(data);\n System.out.println(\"Standard loop:\");\n\n for(int n = 0; n < data.size(); n++){\n System.out.print(data.get(n)+\" \");\n }\n \n System.out.println();\n System.out.println(\"for-each loop:\");\n \n for(String s : data){\n System.out.print(s+\" \");\n }\n }", "public JsArrayString generateArray(String[] array){\r\n\t\tif ( array==null||array.length==0)\r\n\t\t\treturn null ;\r\n\t\t\r\n\t\tJsArrayString retval = (JsArrayString)JavaScriptObject.createArray();\r\n\t\tfor ( String scn : array){\r\n\t\t\tretval.push(scn);\r\n\t\t}\r\n\t\treturn retval;\r\n\t\t\r\n\t}", "private void createArray()\r\n\t{\r\n\t\tscorers = new String[NUMBER_OF_ENTRIES];\r\n\t\tfor(int i = 0; i < NUMBER_OF_ENTRIES; i += 2)\r\n\t\t{\r\n\t\t\tscorers[i] = \"[NULL]\";\r\n\t\t\tscorers[i + 1] = String.valueOf(-1);\r\n\t\t}\r\n\t}", "public static String[][] createArr(int row, int col){\n String constant= \"asdfghjkls\";\n array = new String[row][col];\n\t for (int ctr1 = 0; ctr1 < array.length; ctr1 ++) {\n\t for (int ctr2 = 0; ctr2 < array[ctr1].length; ctr2 ++) {\n String entry = \"\";\n int stringCount;\n int a = 0;\n //random chooses if string is 3 or 4 characters\n\t\t if (Math.random() < 0.5){\n\t\t stringCount = 3;\n\t\t }\n\t\t else {\n\t\t stringCount = 4;\n\t\t }\n\t\twhile (a < stringCount){\n //strings created from String constant\n\t\t int i = (int)(Math.random()*constant.length());\n\t\t entry += constant.substring(i,i+1);\n\t\t a+=1;\n }\n\t\tarray[ctr1][ctr2] = entry;\n }\n}\n print( array);\n return array;\n }", "private static String[] calc5(String[] s) {\n\t\ts[0]+=\"!\";\n\t\treturn s;\n\t}", "public static void main(String[] args) {\n\t\tString[] arrStr = new String[4];\r\n\t\t\r\n\t\tfor(int i = 0;i<arrStr.length;i++) {//string이여야만 가능\r\n\t\t\tarrStr[i] = \"test\"+i;\r\n\t\t}\r\n\t\t\r\n\t\tfor(String str:arrStr) {\r\n\t\tSystem.out.println(str);\r\n\t\t}\r\n\t\t\r\n\t\tString[] arr = {\"보검\",\"정국\",\"은우\"};//방번호와 초기화 동시\r\n\t\tSystem.out.println(arr[1]);\r\n\t\t\r\n\t\tString[][] multiArr = {{\"1\",\"2\",\"3\"},{\"4\"},{\"5\",\"6\",\"7\"}};\r\n\t\tSystem.out.println(multiArr[0][2]);\r\n\t\t\r\n\t\t\tfor(String[] strs: multiArr) {\r\n\t\t\tfor(String str : strs) {\r\n\t\t\t\tSystem.out.println(str);\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\r\n\t\t\r\n\t\t\r\n\t\tArrayList<String> strList = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0;i<arrStr.length;i++) {\r\n\t\t\tstrList.add( \"test\"+i);\r\n\t\t}\r\n\t\t\r\n\t\tfor(String str:arrStr) {\r\n\t\t\tSystem.out.println(str);\r\n\t\t\t}\r\n\t}", "@Override protected List<String> initialize(int size){\n container.clear();\n container.addAll(Arrays.asList(Generated.array(String.class, new RandomGenerator.String(), size)));\n return container;\n }", "public static void main(String[] args)\n {\n String[][] stringArray = new String[10][10];\n for (int row = 0; row < stringArray.length; row++)\n {\n for (int i = 0; i < stringArray.length; i++)\n {\n stringArray[row][i] = \"Row \" + row + \" Item \" + i;\n }\n }\n for (int row = 0; row < stringArray.length; row++)\n {\n for (int i = 0; i < stringArray.length; i++)\n {\n System.out.println(stringArray[row][i]); \n }\n }\n\n }", "public static void main(String[] args) {\n\n\t\tString myStrings[] = { \"Apple\", \"Orange\", \"Lemon\" };\n\n\t\tSystem.out.println(myStrings[0]);\n\t\tSystem.out.println(myStrings[1]);\n\t\tSystem.out.println(myStrings[2]);\n\n\t\tString[] newArray = new String[10]; // (0 to 9) I can add 10 array value\n\n\t\tSystem.out.println(\"\\n\");\n\n\t\tnewArray[0] = \"Zero\";\n\t\tnewArray[1] = \"One\";\n\t\tnewArray[2] = \"Two\";\n\t\tnewArray[3] = \"Three\";\n\n\t\tSystem.out.println(newArray[0]);\n\t\tSystem.out.println(newArray[1]);\n\t\tSystem.out.println(newArray[2]);\n\t\tSystem.out.println(newArray[3]);\n\n\t}", "public static void main(String[] args) {\n\n\n Scanner input = new Scanner(System.in);\n String[] arr = new String[5];\n for (int i=0;i<5;i++)\n {\n arr[i] = input.nextLine();\n }\n\n for(int i=0; i<arr.length; i++){\n String each = arr[i].substring(0,3);\n System.out.println(each);\n }\n\n\n\n }", "String[][] packData();", "@Test\n public void testArrayCreation() {\n final String[] array = ArrayUtils.toArray(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "public static String[] recorrerElementos(String[] arr){\n\n int maxLenght = maxLength(arr);\n for (int i = maxLenght-1; i >= 0 ; i--){\n HashMap listas = getListas(10);\n for(String arrayElement: arr){\n String key = \"L\" + arrayElement.charAt(i);\n\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n itemsList.add(arrayElement);\n }\n arr = getNewArray(listas);\n }\n return arr;\n }", "public void genericStringArray() {\n\t\tArrayList<String> b1 = new ArrayList<String>();\n\t\tb1.add(\"ABC\");\n\t\tb1.add(\"sdfsdfs\");\n\t\tSystem.out.println(\"String generic ArrayList b1: \" + b1);\n\n\t}", "public static String[] createArray(int arraySize) {\n\n\t\t\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tString[] myArray = new String[arraySize];\n\n\t\tfor (int i = 0; i < myArray.length; i++) {\n\t\t\t\n\t\t\tSystem.out.println(\"Enter some cars #\"+(i+1));\n\t\t\tmyArray[i] = scan.next();\n\t\t}\n\n\t\treturn myArray;\n\n\t}", "private String[][] initBoard() {\n String[][] tmp=new String[this.SIZE][this.SIZE];\n for (String[] ae:\n tmp) {\n Arrays.fill(ae, \" \");\n }\n return tmp;\n }", "public static void main(String[] args) {\n\t\tString test = \"ddef\";\n\t\t\n\t\tchar[][] array = new char[2][10];\n\t\t\n\t\tarray[0] = test.toCharArray();\n\t\t\n\t\tSystem.out.println(array[0].length);\n\t\t\n\t\tfor (char a : array[0]) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void main(String[] args) {\n String [] names = new String[3];\n System.out.println(names);\n System.out.println(names.length);\n\n names[0] = \"ram\";\n names[1] = \"shyam\";\n names[2] = \"hari\";\n// names[3] = \"krishna\";\n System.out.println(names[0]);\n System.out.println(names[1]);\n System.out.println(names[2]);\n// System.out.println(names[3]);\n }", "public String[] getStringArr() {\n String[] tasks = new String[USER_TASKS.size() + 1];\n for (int i = 0; i < USER_TASKS.size(); i++) {\n int tempNum = i + 1;\n tasks[tempNum] = tempNum + \". \" + USER_TASKS.get(i);\n }\n return tasks;\n }", "public void inicializarArrays(){\n for(int i=0;i<=10;i++){\n dni[i] = 0;\n nombre[i] = \"\";\n apellido[i] = \"\";\n direccion[i] = \"\";\n telefono[i] = \"\";\n fNacimiento[i] = \"\";\n }\n }", "private String[] createNamesArray(){\n\t\t//TODO just test data\n\t\t/*\n\t\tfor(int i=0; i<20; i++){\n\t\t\tReplayData rd = new ReplayData(\"Game \" + i);\n\t\t\ttotalData.replays.add(rd);\n\t\t}*/\n\t\tString[] gameNames = new String[totalData.replays.size()];\n\t\tfor(int i =0; i<totalData.replays.size(); i++){\n\t\t\tgameNames[i] = totalData.replays.get(i).getName() + \" @ \" + totalData.replays.get(i).getDate();\n\t\t}\n\t\treturn gameNames;\n\t}", "public String[] getStrings(){\n\t\tArrayList<String> s = new ArrayList<>();\n\t\tif (answertext0!=null && answertext0.isEmpty() == false)\n\t\t\ts.add(answertext0);\n\t\tif (answertext1!=null && answertext1.isEmpty() == false)\n\t\t\ts.add(answertext1);\n\t\tif (answertext2!=null && answertext2.isEmpty() == false)\n\t\t\ts.add(answertext2);\n\t\tif (answertext3!=null && answertext3.isEmpty() == false)\n\t\t\ts.add(answertext3);\n\t\tif (answertext4!=null && answertext4.isEmpty() == false)\n\t\t\ts.add(answertext4);\n\t\tif (answertext5!=null && answertext5.isEmpty() == false)\n\t\t\ts.add(answertext5);\n\t\tif (answertext6!=null && answertext6.isEmpty() == false)\n\t\t\ts.add(answertext6);\n\t\tif (answertext7!=null && answertext7.isEmpty() == false)\n\t\t\ts.add(answertext7);\n\t\tif (answertext8!=null && answertext8.isEmpty() == false)\n\t\t\ts.add(answertext8);\n\t\tif (answertext9!=null && answertext9.isEmpty() == false)\n\t\t\ts.add(answertext9);\n\t\treturn (String[]) s.toArray(new String[0]);\n\t}", "private void initializeArrays(){\n arrayOfBadges = new String[6];\n stateArray = new int[6];\n for (int i = 0; i<6; i++){\n stateArray[i]=0;\n }\n arrayOfBadges[0] = \"Community\";\n arrayOfBadges[1] = \"Academic\";\n arrayOfBadges[2] = \"Dean\";\n arrayOfBadges[3] = \"Honor\";\n arrayOfBadges[4] = \"Abroad\";\n arrayOfBadges[5] = \"Graduation\";\n\n\n }", "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}", "public String[] getStringList();", "public static String[] createFixedRandomStrings(int count) {\n return createFixedRandomStrings(count, MIN_LENGTH, MAX_LENGTH);\n }", "public ArrayList<String> createStringArray() throws Exception {\n ArrayList<String> stringsFromFile = new ArrayList<>();\n while (reader.hasNext()) {\n stringsFromFile.add(reader.nextLine());\n }\n return stringsFromFile;\n }", "public List<String> remake_array(List<String> lists){\n List<String> listItemtemp = new ArrayList<>();\n for (int i = 0; i < lists.size(); i++) {\n listItemtemp.add(i + 1 + \". \" + lists.get(i).substring(3).trim());\n }\n return listItemtemp;\n\n }", "public static int[] getArr(){\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Enter five random numbers to place in array: \");\n String input = sc.nextLine();\n String[] stringArr = input.split(\" \");\n int maxSize = 5;\n //final int SIZE = stringArr.length;\n int[] intArr = new int[maxSize];\n\n //populate array in sequence//\n for (int i = 0; i < maxSize; i++){\n intArr[i] = Integer.parseInt(stringArr[i]);\n }\n sc.close();\n return intArr;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str = null;\n System.out.println(\"请输入您想输入的字符串:\");\n str = sc.nextLine();\n int nStr = str.length();\n char[] elevenTwo = new char[nStr];\n elevenTwo = str.toCharArray();\n char[][] array = new char[4][nStr];\n\n array[0][0] = '3';\n for (int i = 1; i < 4; i++){\n for (int j = 0, k = i - 1; j <nStr && k < nStr ; j++, k+=3){\n array[i][j] = elevenTwo[k];\n }\n }\n for (int i = 0; i < 4; i++){\n for (int j = 0; j < nStr; j++){\n System.out.print(array[i][j]);\n }\n System.out.println();\n }\n\n for (int i = 0; i < 4; i++){\n for (int j = 0; j < nStr; j++){\n System.out.print(array[i][j]);\n }\n }\n char[] bStr = new char[nStr];\n int k = 0;\n for (int m = 0; m < nStr; m++){\n for (int n = 1; n < 4 && k < nStr; n++){\n bStr[k++] = array[n][m];\n }\n }\n System.out.println();\n for (int i = 0; i < nStr; i++){\n System.out.print(bStr[i]);\n }\n }", "public abstract ArrayList<String[]> toStrings();", "private void testStringArray() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\tString array[] = { \"Gimme\", \"a\", \"break\", \"dude\" };\n\t\tmessage.setPayload(array);\n\t\tsend(message);\n\t}", "public static void main(String[] args) {\n\t\tRandom random = new Random();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n//\t\tSystem.out.print(n);\n\t\tint[] lotto = new int[6];\n\t\tString str = \"[\";\n\t\t\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tfor(int j=0; j<6; j++) {\n\t\t\t\tlotto[i] = random.nextInt(45)+1;\n\t\t\t\tif (j == 5) {\n\t\t\t\t\tstr += String.valueOf(lotto[i])+\"\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstr += String.valueOf(lotto[i])+\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tstr += \"]\";\n\t\t\t\n\t\t\tSystem.out.println((i+1) + \"번째 : \" + str);\n\t\t\tstr = \"[\";\n\t\t}\n\t}", "public static CreateUser[] createArrayOfEmployeeNames(){\n\n CreateUser[] arr1 = new CreateUser[5];\n\n for (int i=0; i < arr1.length; i++){\n int age = (int) Math.random()* 100;\n String name = \"John\"+i;\n arr1[i] = new CreateUser(age, name); // create random peop;e w/ ages\n\n }\n\n return arr1;\n }", "public void setStringArray(String[] value);", "public void displayData(String[] str);", "String[] mo1153c();", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "public String[] getString();", "public static String[] readStringArray(int MAX) {\n\n\t\tString[] temp = new String[MAX];\n\n\t\tfor (int i = 0; i < MAX; i++) {\n\t\t\tSystem.out.print(\"Enter any String : \");\n\t\t\ttemp[i] = UserIO.readInput();\n\t\t}\n\n\t\treturn temp;\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tArrayList<Character> a = new ArrayList<Character>();\r\n\t\t/*ensureCapacity means manually declare\r\n\t\tcapacity 'cause it takes time to change\r\n\t\tcapacity.\r\n\t\t*/\r\n\t\ta.ensureCapacity(10);\r\n\t\t\r\n\t\ta.add('1');\r\n\t\ta.add('g');\r\n\t\t\r\n\t\ta.trimToSize();//free unused capacity\r\n\t\t\r\n\t\tfor(Object i:a) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\tCharacter[] ch = new Character[2];\r\n\t\tch = a.toArray(ch);\r\n\t}", "public static String[][][] soRandom() {\n Random r = new Random();\n int length = r.nextInt(10) + 1;\n //3D is length\n String[][][] array = new String[length][][];\n //array = new String[length][][];\n //System.out.println(length);\n \n //create 2D's with random length\n for (int i = 0; i < array.length; i++) {\n int length1 = r.nextInt(10) + 1;\n //System.out.println(length1);\n array[i] = new String[length1][];\n\n }\n //create 1D's with random length\n for (int i = 0; i < array.length; i++) {\n for (int j = 0; j < array[i].length; j++) {\n int length2 = r.nextInt(10) + 1;\n //System.out.println(length2);\n array[i][j] = new String[length2];\n\n }\n\n\n }\n\n //return empty randomized 3D array\n return array;\n\n }", "public ResizingArrayQueueOfStrings(){\n s = (Item[]) new Object[2];\n n = 0;\n first = 0;\n last = 0;\n }", "public static String[] randomize(String[] array, int n)\n\t{\n\t\tArrayList<String> list = new ArrayList<String>(array.length);\n\t\tfor (String s: array)\n\t\t{\n\t\t\tlist.add(s);\n\t\t}\n\t\tCollections.shuffle(list);\n\t\tString[] random = new String[n];\n\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\trandom[i] = list.get(i);\n\t\t}\n\n\t\tArrays.sort(random);\n\n\t\treturn random;\n\t}", "public String[] toStrings();", "public static void main(String[] args) {\n\r\n\t\tint a[] = new int [5];\t\t\r\n\t\ta[0]=10;\r\n\t\ta[1]=20;\r\n\t\ta[2]=30;\r\n//\t\ta[3]=40;\r\n\t\ta[4]=50;\r\n\t\t\t\t\r\n\t\tSystem.out.println(a[0]);\r\n\t\tSystem.out.println(a[1]);\r\n\t\tSystem.out.println(a[2]);\r\n\t\tSystem.out.println(a[3]);\r\n\t\tSystem.out.println(a[4]);\r\n\t\t\r\n\t\t\r\n\t\tString b[] = new String [5];\t\t\r\n\t\tb[0]=\"Selenium\";\r\n\t\tb[1]=\"QTP\";\r\n\t\tb[2]=\"Testing sfsf\";\r\n\t\t\r\n\t\tSystem.out.println(b[0]);\r\n\t\tSystem.out.println(b[1]);\r\n\t\tSystem.out.println(b[2]);\r\n\t\tSystem.out.println(b[3]);\r\n\t\t\r\n\t}", "public String[] getDataArray(String name){\n String[] string = new String[5];\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"SELECT * FROM gericht WHERE name='\"+name+\"';\", null);\n\n if(cursor.moveToFirst()){\n do{\n for(int i=0; i<5; i++){\n string[i]=cursor.getString(i);\n }\n }while(cursor.moveToNext());\n }\n\n cursor.close();\n db.close();\n\n return string;\n }", "private static ArrayList<String>[] buildArrayNumbers(int size,int numbers) {\n\n\t\tString digits = Integer.toString(numbers);\n\t\tArrayList<String>[] digitsArreglo= new ArrayList[digits.length()];\n\n\t\tfor (int i = 0; i < digitsArreglo.length; i++) {\n\t\t\tString[] plantilla1=getTemplate(Integer.parseInt(digits.charAt(i)+\"\"));\n\t\t\tArrayList<String> resultado;\n\t\t\tif(size==1){\n\t\t\t\tresultado=transmit(plantilla1);\n\t\t\t\tdigitsArreglo[i]=resultado;\n\t\t\t}else {\n\t\t\t\tresultado=expandColumns(size,plantilla1);\n\t\t\t\tresultado=expandRows(size, resultado);\n\t\t\t\tdigitsArreglo[i]=resultado;\n\t\t\t}\n\t\t}\n\t\treturn digitsArreglo;\n\t}", "public static void initializeArr(String[] arr){\n\t for(int i = 0; i < arr.length; i++){\n\t arr[i] = \"\";\n\t }\n\t}", "public static void main(String[] args) {\n\n ArrayList<String> arr1 = new ArrayList<String>();\n arr1.add(\"Pune\");\n arr1.add(\"Mumbai\");\n arr1.add(\"Delhi\");\n arr1.add(\"Nagpur\");\n System.out.println(\"Actual ArrayList is: \"+arr1);\n String [] strArr = new String[arr1.size()];\n arr1.toArray(strArr);\n System.out.println(\"Created Array Content is: \");\n for(String str : strArr) {\n \t System.out.println(str);\n }\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tchar arr1[] = new char[4];\n\t\t\n\t\tarr1[0]= 'A';\n\t\tarr1[1]= 'D';\n\t\tarr1[2]='E';\n\t\tarr1[3]= 'M';\n\t\t\n\t\tfor(int i=0; i<4; i++) {\n\t\t\tSystem.out.println(arr1[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(arr1[3]);\n\t\t\n\t\t// Arrayin lenghti bulmak icin arrayin ismi arr1.lenght yazmak yeterlidir\n\t\t// stringlerde de lenhgt metodu kullanilir ama stringlerde kulanilan lenght methodu parantezlidir . yani stringlerde \n\t\t//==> lenght() Arraylarde ==> lenght var \n\t\tSystem.out.println(arr1.length);//4\n\t\t\n\t\t\n\t\t\n\t\t// Arraydeki son elemani bulmak icin lenght kullaniniz\n\t\tSystem.out.println(arr1[arr1.length-1]);//M\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "static void random(String[]array) {\n\t\tRandom ran=new Random();\n\tfor (int i = 0; i < array.length; i++) {\n\t\tSystem.out.println(array[ran.nextInt(array.length)]);\n\t}\n\t}", "public static String[] randomStrings(int count, int length, String chars) {\n final String[] strings = new String[count];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomString(length, chars);\n }\n return strings;\n }", "private String[] convertList(String[][] l){\n String[] list = new String[l.length];\n for(int i =0; i<list.length;i++){\n String input = l[i][1];\n System.out.println(input);\n list[i] = input;\n }\n \n return list;\n }", "public static String[] initializeQuestionName() {\n\n File ques_name = new File(\"Files/Question/question_name.txt\"); // creating file object\n\n try {\n Scanner que_name = new Scanner(ques_name); // creating Scanner for file\n\n while (que_name.hasNext()) { // iteration untill EOF\n String n = que_name.nextLine();\n t_que_name_o.add(n);\n }\n\n } catch (FileNotFoundException ex) {\n \n }\n\n String[] questionName = new String[t_que_name_o.size()]; // declaring and creating String[]\n t_que_name_o.toArray(questionName); // from arrayList to -> Array\n\n return questionName;\n\n }", "private Function1<Seq<String>, String[]> arrayFunction() {\n return new AbstractFunction1<Seq<String>, String[]>() {\n @Override\n public String[] apply(Seq<String> v1) {\n String[] array = new String[v1.size()];\n v1.copyToArray(array);\n return array;\n }\n };\n }", "protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }", "static char[] generateAZLowercaseAndNumbersAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateNumberChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "public void roomMems(){\r\n\tString[] names ={\"vivek\", \"satish\", \"neeraj\", \"Raju\", \"Dilip\"};\r\n\r\n\tfor(String i:names){ \r\n\t\tSystem.out.println(names[3]);\r\n\t}\r\n\t}", "String getStringList();", "public static void main(String[] args) {\n\t\tString str1 = \"Humpty Dumpty Sat On The Wall.\";\n\t\tchar array1[] = new char[30];\n\t\t\n\t\tstr1.getChars(0, 30, array1, 0);;\n\t\tSystem.out.println(array1);\n\t\t\n\t\tfor(int i = 29; i >= 0; i--) {\n\t\t\tSystem.out.print(array1[i]);\n\t\t}\n\t}", "public static void main(String[] args) {\n final int N = Integer.parseInt(args[0]);\n final int L = Integer.parseInt(args[1]);\n final String chars = args[2];\n final String[] randomStrings = randomStrings(N, L, chars);\n for (String randomString : randomStrings) {\n System.out.println(randomString);\n }\n }", "public static PropertyDescriptionBuilder<String[]> arrayOfStringsProperty(String name) {\n return PropertyDescriptionBuilder.start(name, String[].class, Parsers.parseArray(String.class, Parsers::parseString));\n }", "public String[] getStringArray() {\r\n\t\tString[] a = value.getStringArray();\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tint n = a.length;\r\n\t\tString[] b = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\tb[i] = substitution(a[i]);\r\n\t\treturn (b);\r\n\t}", "private void createString(){\n for(int i=0;i<this.textPalindrome.length;i++){\n this.joinedTextPalindrome=this.joinedTextPalindrome.concat(this.textPalindrome[i]);\n }\n }", "public static void main(String[] args) {\n\tString [] ciudades_init = {\"Barcelona\", \"Madrid\", \"Valencia\", \"Malaga\", \"Cadis\", \"Santander\"};\t\r\n\t\r\n\t//Iniciar Arraylist. 4.1\r\n\tArrayList<char[]> CiudadArray = new ArrayList<char[]>();\r\n\tfor(int i = 0;i<ciudades_init.length;i++)\r\n\t{\r\n\t\t// Crear Char Array para cada ciudad\r\n\t\tCiudadArray.add(new char[ciudades_init[i].length()]);\r\n\t\t\r\n\t\t//4.2\r\n\t\tchar [] temp = new char[ciudades_init[i].length()];\r\n\t\t\r\n\t\tfor (int j = 0;j<ciudades_init[i].length();j++)\r\n\t\t{\r\n\t\t\ttemp[j]=ciudades_init[i].charAt(j);\r\n\t\t}\r\n\t\t\r\n\t\tCiudadArray.set(i, temp);\r\n\t\t\r\n\t\t//4.3\r\n\t\tSystem.out.print(ciudades_init[i] + \" - \");\r\n\t\tfor (int j = CiudadArray.get(i).length-1; j >= 0 ; j--){\r\n\t\t System.out.print(CiudadArray.get(i)[j]);\t\t\t\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\t\r\n\t}\r\n}", "public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public static String[] randStrings()\r\n\t{\n\t\t\r\n\t\t\t\tlong start = System.nanoTime();\r\n\t\t\t\tchallengeTwo;\r\n\t\t\t\tlong end = System.nanoTime();\r\n\t\t\t\tlong time = end - start;\r\n\t\t\t\t//Challenge 3 >75% Sorted Int Test\r\n\t}", "public static void main(String[] args) {\n\t\tint[] x = { 10, 20, 30, 40 };\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(x[0]);\n\t\tSystem.out.println(x[1]);\n\t\tSystem.out.println(x[2]);\n\t\tSystem.out.println(x[3]);\n\n\t\t// array declaration.initialization and creation in a single line.(char array)\n\t\tchar[] ch = { 'a', 'e', 'i', 'o', 'u' };\n\t\tSystem.out.println(ch);\n\t\tSystem.out.println(ch.toString());\n\t\tSystem.out.println(ch[0]);\n\t\tSystem.out.println(ch[1]);\n\t\tSystem.out.println(ch[2]);\n\t\tSystem.out.println(ch[3]);\n\t\tSystem.out.println(ch[4]);\n\n\t\t// array declaration.initialization and creation in a single line.(String Array)\n\t\tString[] s = { \"Babu\", \"Rahul\", \"Riju\", \"Buni\", \"Shaan\" };\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s.length);\n\t\tSystem.out.println(s.toString());\n\t\tSystem.out.println(s[0]);\n\t\tSystem.out.println(s[1]);\n\t\tSystem.out.println(s[2]);\n\t\tSystem.out.println(s[3]);\n\t\tSystem.out.println(s[4]);\n\t\t\n\n\t}", "public static String[] selecionar(String tabela){\n String[] lista = new String[10];\n \n // Só de exemplo\n lista[0] = \"Amauri\";\n //...\n \n return lista;\n }", "public MultipleStrings(int num, double probabilityOfControl) {\n r = new Random(42);\n str = new String[num];\n for (int i = 0; i < num; i++)\n str[i] = generateString(r.nextDouble() < probabilityOfControl);\n last = -1;\n }", "StringList createStringList();", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }", "String[][] createGameBoard(int size) {\r\n\t\tString board[][] = new String[size][size];\r\n\t\t// Create a 3*3 board first\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\tboard[i][j] = \"@\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Board created successfully\");\r\n\t\treturn board;\r\n\r\n\t}", "public static String generateSubarrays(int[] sequence)\n {\n String result = \"\";\n List<String> list = new ArrayList<>();\n list.add(\"[\"+sequence[0]+\"]\");\n return generateSubarraysUsingRecursion(sequence,list,1);\n }", "public boolean genStringAsCharArray();", "public static void main(String[] args) {\n\n\t\tInteger [] t = new Integer [ 6 ];\n\n\t\tTestAnagrams ta = new TestAnagrams ();\n\t\tTestAnagrams [] taA = new TestAnagrams [4];\n\n\n\n\n\n\t\tArrayList<Integer> foo = new ArrayList<Integer>();\n\t\tfoo.add(1);\n\t\tfoo.add(1);\n\t\tfoo.add(2);\n\t\tfoo.add(3);\n\t\tfoo.add(5);\n\t\tjava.lang.Integer[] bar = foo.toArray(new Integer[0]);\n\t\tSystem.out.println(\"bar.length = \" + bar.length);\n\n\t\t//\n\t\t//\n\t\t//String [] sA = { \"tt\", \"hh\" };\n\t\t//\n\t\t//java.util.ArrayList < String > sAl = new java.util.ArrayList < String > ( java.util.Arrays.asList ( sA ) ) ; \n\t\t//\n\t\t//sAl.add ( \"qq\");\n\t\t//\n\t\t//Collections.sort(sAl);\n\t\t//\n\t\t//String [] sA2 = sAl.toArray ( new String [ 0 ] );\n\t\t//\n\t\t//System.out.println ( sA2 [ 0 ] );\n\t\t//\n\t\t//long [] a = { 5,7,6,3,4,9,8,1,0,2};\n\t\t//\n\t\t//java.util.Arrays.sort (a);\n\t\t//\n\t\t//for ( int i = 0; i < a.length; i++ ){\n\t\t//\tSystem.out.print( a [ i ] + \" \");\n\t\t//}\n\n\n\t\tString [] sArray = { \n\t\t\t\t\"acaballadero \", \n\t\t\t\t\"acaballerado \", \n\t\t\t\t\"gallardeaba \", \n\t\t\t\t\"acaballerad \", \n\t\t\t\t\"abogadeara \", \n\t\t\t\t\"acebollado \", \n\t\t\t\t\"acebollada \", \n\t\t\t\t\"acaballero \", \n\t\t\t\t\"acogollara \", \n\t\t\t\t\"acollarado \", \n\t\t\t\t\"decoloraba \", \n\t\t\t\t\"acogollaba \", \n\t\t\t\t\"cagalaolla \", \n\t\t\t\t\"acordelaba \", \n\t\t\t\t\"bacaladero \", \n\t\t\t\t\"acabellado \", \n\t\t\t\t\"acaballara \", \n\t\t\t\t\"cabalgador \", \n\t\t\t\t\"alcaldable \", \n\t\t\t\t\"acollarada \", \n\t\t\t\t\"acaballare \", \n\t\t\t\t\"acollaraba \", \n\t\t\t\t\"acogollare \", \n\t\t\t\t\"bacaladera \", \n\t\t\t\t\"acaballera \", \n\t\t\t\t\"elaborado \", \n\t\t\t\t\"cabellado \", \n\t\t\t\t\"colgadera \", \n\t\t\t\t\"acaballar \", \n\t\t\t\t\"cabalgare \", \n\t\t\t\t\"acaballad \", \n\t\t\t\t\"albardela \", \n\t\t\t\t\"agradable \", \n\t\t\t\t\"cabalgada \", \n\t\t\t\t\"acodalare \", \n\t\t\t\t\"alegadora \", \n\t\t\t\t\"acogollar \", \n\t\t\t\t\"alboreado \", \n\t\t\t\t\"caballada \", \n\t\t\t\t\"caballera \", \n\t\t\t\t\"acogedora \", \n\t\t\t\t\"regoldaba \", \n\t\t\t\t\"gallardea \", \n\t\t\t\t\"abocelada \", \n\t\t\t\t\"acaloraba \", \n\t\t\t\t\"acebadara \", \n\t\t\t\t\"caballear \", \n\t\t\t\t\"coleadora \", \n\t\t\t\t\"alboreada \", \n\t\t\t\t\"colgadero \", \n\t\t\t\t\"gallardeo \", \n\t\t\t\t\"acollador \", \n\t\t\t\t\"alabadora \", \n\t\t\t\t\"cebollada \", \n\t\t\t\t\"coloreaba \", \n\t\t\t\t\"bolaceara \", \n\t\t\t\t\"acallador \", \n\t\t\t\t\"cabalgara \", \n\t\t\t\t\"agaleraba \", \n\t\t\t\t\"acabadora \", \n\t\t\t\t\"ardaleaba \", \n\t\t\t\t\"rodaballo \", \n\t\t\t\t\"baleadora \", \n\t\t\t\t\"abogadear \", \n\t\t\t\t\"colaborad \", \n\t\t\t\t\"cordelaba \", \n\t\t\t\t\"acollarad \", \n\t\t\t\t\"acogollad \", \n\t\t\t\t\"bellacada \", \n\t\t\t\t\"abocelado \", \n\t\t\t\t\"alardeaba \", \n\t\t\t\t\"adoloraba \", \n\t\t\t\t\"laceadora \", \n\t\t\t\t\"acodalaba \", \n\t\t\t\t\"declaraba \", \n\t\t\t\t\"caballero \", \n\t\t\t\t\"aldabeara \", \n\t\t\t\t\"abaleador \", \n\t\t\t\t\"acodalara \", \n\t\t\t\t\"lacerado \", \n\t\t\t\t\"cagalera \", \n\t\t\t\t\"cogedora \", \n\t\t\t\t\"recolado \", \n\t\t\t\t\"coladora \", \n\t\t\t\t\"alcaller \", \n\t\t\t\t\"recalaba \", \n\t\t\t\t\"collalba \", \n\t\t\t\t\"bacalada \", \n\t\t\t\t\"acebadar \", \n\t\t\t\t\"acollaro \", \n\t\t\t\t\"cabalgar \", \n\t\t\t\t\"recodaba \", \n\t\t\t\t\"carabela \", \n\t\t\t\t\"lacerada \", \n\t\t\t\t\"coloraba \", \n\t\t\t\t\"coleador \", \n\t\t\t\t\"gallardo \", \n\t\t\t\t\"aballara \", \n\t\t\t\t\"rebalgad \", \n\t\t\t\t\"ladreaba \", \n\t\t\t\t\"bolacero \", \n\t\t\t\t\"galleara \", \n\t\t\t\t\"lardacea \", \n\t\t\t\t\"legadora \", \n\t\t\t\t\"celadora \", \n\t\t\t\t\"calleara \", \n\t\t\t\t\"cebadara \", \n\t\t\t\t\"cobardea \", \n\t\t\t\t\"acobrada \", \n\t\t\t\t\"albacara \", \n\t\t\t\t\"bolacear \", \n\t\t\t\t\"ocaleaba \", \n\t\t\t\t\"laboread \", \n\t\t\t\t\"galerada \", \n\t\t\t\t\"colargol \", \n\t\t\t\t\"abogadeo \", \n\t\t\t\t\"acobrado \", \n\t\t\t\t\"debocara \", \n\t\t\t\t\"aladraba \", \n\t\t\t\t\"agalerad \", \n\t\t\t\t\"alargaba \", \n\t\t\t\t\"cabalgad \", \n\t\t\t\t\"algarada \", \n\t\t\t\t\"regalado \", \n\t\t\t\t\"allegara \", \n\t\t\t\t\"caldeara \", \n\t\t\t\t\"regalaba \", \n\t\t\t\t\"caldeaba \", \n\t\t\t\t\"adorable \", \n\t\t\t\t\"acabador \", \n\t\t\t\t\"abocarde \", \n\t\t\t\t\"arboleda \", \n\t\t\t\t\"balacera \", \n\t\t\t\t\"alargado \", \n\t\t\t\t\"arbolada \", \n\t\t\t\t\"caladora \", \n\t\t\t\t\"acodalar \", \n\t\t\t\t\"alegador \", \n\t\t\t\t\"cobardeo \", \n\t\t\t\t\"baleador \", \n\t\t\t\t\"aballare \", \n\t\t\t\t\"adargaba \", \n\t\t\t\t\"albeldar \", \n\t\t\t\t\"decalogo \", \n\t\t\t\t\"acallare \", \n\t\t\t\t\"gallarda \", \n\t\t\t\t\"baldeara \", \n\t\t\t\t\"braceada \", \n\t\t\t\t\"cobreado \", \n\t\t\t\t\"cebollar \", \n\t\t\t\t\"allegada \", \n\t\t\t\t\"boleador \", \n\t\t\t\t\"acordela \", \n\t\t\t\t\"goleador \", \n\t\t\t\t\"acordaba \", \n\t\t\t\t\"cagadero \", \n\t\t\t\t\"caladero \", \n\t\t\t\t\"recalada \", \n\t\t\t\t\"clareaba \", \n\t\t\t\t\"acaballa \", \n\t\t\t\t\"alobroge \", \n\t\t\t\t\"acollare \", \n\t\t\t\t\"alabador \", \n\t\t\t\t\"acaballe \", \n\t\t\t\t\"abocardo \", \n\t\t\t\t\"abogador \", \n\t\t\t\t\"acollara \", \n\t\t\t\t\"caladera \", \n\t\t\t\t\"allegado \", \n\t\t\t\t\"cableara \", \n\t\t\t\t\"acollaba \", \n\t\t\t\t\"acogolle \", \n\t\t\t\t\"alcabala \", \n\t\t\t\t\"alboroce \", \n\t\t\t\t\"caballar \", \n\t\t\t\t\"colgador \", \n\t\t\t\t\"cegadora \", \n\t\t\t\t\"acogolla \", \n\t\t\t\t\"alborada \", \n\t\t\t\t\"acogedor \", \n\t\t\t\t\"bacallao \", \n\t\t\t\t\"acordelo \", \n\t\t\t\t\"albarelo \", \n\t\t\t\t\"alegraba \", \n\t\t\t\t\"acebrado \", \n\t\t\t\t\"albacora \", \n\t\t\t\t\"ocaleara \", \n\t\t\t\t\"acallara \", \n\t\t\t\t\"abacorad \", \n\t\t\t\t\"calleaba \", \n\t\t\t\t\"laceador \", \n\t\t\t\t\"decolora \", \n\t\t\t\t\"acaballo \", \n\t\t\t\t\"coloread \", \n\t\t\t\t\"allegaba \", \n\t\t\t\t\"bolacead \", \n\t\t\t\t\"laceraba \", \n\t\t\t\t\"alabarda \", \n\t\t\t\t\"cableado \", \n\t\t\t\t\"aclarado \", \n\t\t\t\t\"aclarada \", \n\t\t\t\t\"abollare \", \n\t\t\t\t\"aclaraba \", \n\t\t\t\t\"coladero \", \n\t\t\t\t\"abollara \", \n\t\t\t\t\"bocelara \", \n\t\t\t\t\"cableada \", \n\t\t\t\t\"regalada \", \n\t\t\t\t\"acalorad \", \n\t\t\t\t\"ablegado \", \n\t\t\t\t\"galleaba \", \n\t\t\t\t\"colabora \", \n\t\t\t\t\"robledal \", \n\t\t\t\t\"abaleara \", \n\t\t\t\t\"arbolado \", \n\t\t\t\t\"acallaba \", \n\t\t\t\t\"abogadea \", \n\t\t\t\t\"cebadora \", \n\t\t\t\t\"lardaceo \", \n\t\t\t\t\"colabore \", \n\t\t\t\t\"bacallar \", \n\t\t\t\t\"colorada \", \n\t\t\t\t\"albergad \", \n\t\t\t\t\"aldabear \", \n\t\t\t\t\"abocarda \", \n\t\t\t\t\"balacear \", \n\t\t\t\t\"bolaceo \", \n\t\t\t\t\"bragado \", \n\t\t\t\t\"bacalao \", \n\t\t\t\t\"brollad \", \n\t\t\t\t\"adolora \", \n\t\t\t\t\"rollaba \", \n\t\t\t\t\"garlaba \", \n\t\t\t\t\"acaloro \", \n\t\t\t\t\"albarda \", \n\t\t\t\t\"cebrado \", \n\t\t\t\t\"acedara \", \n\t\t\t\t\"colgado \", \n\t\t\t\t\"alobada \", \n\t\t\t\t\"alegaba \", \n\t\t\t\t\"cebolla \", \n\t\t\t\t\"llagara \", \n\t\t\t\t\"adobera \", \n\t\t\t\t\"gallear \", \n\t\t\t\t\"alabado \", \n\t\t\t\t\"bragada \", \n\t\t\t\t\"acaraba \", \n\t\t\t\t\"alobado \", \n\t\t\t\t\"lobrego \", \n\t\t\t\t\"redobla \", \n\t\t\t\t\"alberca \", \n\t\t\t\t\"acabare \", \n\t\t\t\t\"llegado \", \n\t\t\t\t\"claread \", \n\t\t\t\t\"alagaba \", \n\t\t\t\t\"alardeo \", \n\t\t\t\t\"clorado \", \n\t\t\t\t\"erogaba \", \n\t\t\t\t\"recabad \", \n\t\t\t\t\"abacero \", \n\t\t\t\t\"callaba \", \n\t\t\t\t\"albarde \", \n\t\t\t\t\"abacoro \", \n\t\t\t\t\"argolla \", \n\t\t\t\t\"recalad \", \n\t\t\t\t\"baladre \", \n\t\t\t\t\"raleaba \", \n\t\t\t\t\"adoraba \", \n\t\t\t\t\"acabado \", \n\t\t\t\t\"acabada \", \n\t\t\t\t\"laceaba \", \n\t\t\t\t\"callado \", \n\t\t\t\t\"coreaba \", \n\t\t\t\t\"declaro \", \n\t\t\t\t\"ladeaba \", \n\t\t\t\t\"legrado \", \n\t\t\t\t\"alegara \", \n\t\t\t\t\"legraba \", \n\t\t\t\t\"cobarde \", \n\t\t\t\t\"cargada \", \n\t\t\t\t\"bocelar \", \n\t\t\t\t\"acodaba \", \n\t\t\t\t\"reglada \", \n\t\t\t\t\"bellaco \", \n\t\t\t\t\"acalora \", \n\t\t\t\t\"acerolo \", \n\t\t\t\t\"abollar \", \n\t\t\t\t\"abollad \", \n\t\t\t\t\"bocarda \", \n\t\t\t\t\"acodara \", \n\t\t\t\t\"abogare \", \n\t\t\t\t\"lebrada \", \n\t\t\t\t\"calador \", \n\t\t\t\t\"bolacea \", \n\t\t\t\t\"acoraba \", \n\t\t\t\t\"agaloco \", \n\t\t\t\t\"acalore \", \n\t\t\t\t\"regalad \", \n\t\t\t\t\"agalero \", \n\t\t\t\t\"begardo \", \n\t\t\t\t\"albacea \", \n\t\t\t\t\"colgada \", \n\t\t\t\t\"robleda \", \n\t\t\t\t\"bodocal \", \n\t\t\t\t\"acodala \", \n\t\t\t\t\"abocare \", \n\t\t\t\t\"redoblo \", \n\t\t\t\t\"acollad \", \n\t\t\t\t\"recabdo \", \n\t\t\t\t\"abocara \", \n\t\t\t\t\"laceara \", \n\t\t\t\t\"abocado \", \n\t\t\t\t\"abocada \", \n\t\t\t\t\"ladeara \", \n\t\t\t\t\"dallare \", \n\t\t\t\t\"acerado \", \n\t\t\t\t\"abeldar \", \n\t\t\t\t\"alocada \", \n\t\t\t\t\"gallera \", \n\t\t\t\t\"acebada \", \n\t\t\t\t\"acollar \", \n\t\t\t\t\"abogara \", \n\t\t\t\t\"lacraba \", \n\t\t\t\t\"aballad \", \n\t\t\t\t\"cerollo \", \n\t\t\t\t\"albarca \", \n\t\t\t\t\"aldabeo \", \n\t\t\t\t\"lobeara \", \n\t\t\t\t\"bocelad \", \n\t\t\t\t\"aldabea \", \n\t\t\t\t\"beldara \", \n\t\t\t\t\"ocelada \", \n\t\t\t\t\"collado \", \n\t\t\t\t\"labrada \", \n\t\t\t\t\"baldare \", \n\t\t\t\t\"aclareo \", \n\t\t\t\t\"dolobre \", \n\t\t\t\t\"alcalde \", \n\t\t\t\t\"baladro \", \n\t\t\t\t\"abacera \", \n\t\t\t\t\"callear \", \n\t\t\t\t\"cebadar \", \n\t\t\t\t\"caballo \", \n\t\t\t\t\"rallaba \", \n\t\t\t\t\"alborea \", \n\t\t\t\t\"callare \", \n\t\t\t\t\"gallero \", \n\t\t\t\t\"alagare \", \n\t\t\t\t\"alagara \", \n\t\t\t\t\"cabalgo \", \n\t\t\t\t\"cebrada \", \n\t\t\t\t\"alberga \", \n\t\t\t\t\"aballar \", \n\t\t\t\t\"cabread \", \n\t\t\t\t\"baldara \", \n\t\t\t\t\"agalera \", \n\t\t\t\t\"acedaba \", \n\t\t\t\t\"laborea \", \n\t\t\t\t\"colorea \", \n\t\t\t\t\"laboral \", \n\t\t\t\t\"laborad \", \n\t\t\t\t\"cobread \", \n\t\t\t\t\"acebado \", \n\t\t\t\t\"rebalga \", \n\t\t\t\t\"abacore \", \n\t\t\t\t\"brocado \", \n\t\t\t\t\"adolore \", \n\t\t\t\t\"coleada \", \n\t\t\t\t\"rebollo \", \n\t\t\t\t\"llagada \", \n\t\t\t\t\"cabalga \", \n\t\t\t\t\"dallaba \", \n\t\t\t\t\"boceara \", \n\t\t\t\t\"lloraba \", \n\t\t\t\t\"colgare \", \n\t\t\t\t\"colgara \", \n\t\t\t\t\"cablera \", \n\t\t\t\t\"agoraba \", \n\t\t\t\t\"acabara \", \n\t\t\t\t\"clorada \", \n\t\t\t\t\"rebalgo \", \n\t\t\t\t\"baldear \", \n\t\t\t\t\"codeara \", \n\t\t\t\t\"gradaba \", \n\t\t\t\t\"collage \", \n\t\t\t\t\"acodare \", \n\t\t\t\t\"ocelado \", \n\t\t\t\t\"grabado \", \n\t\t\t\t\"callara \", \n\t\t\t\t\"baleara \", \n\t\t\t\t\"legador \", \n\t\t\t\t\"blocara \", \n\t\t\t\t\"cerolla \", \n\t\t\t\t\"bollero \", \n\t\t\t\t\"bollera \", \n\t\t\t\t\"goleara \", \n\t\t\t\t\"bollare \", \n\t\t\t\t\"cablear \", \n\t\t\t\t\"goleada \", \n\t\t\t\t\"llagare \", \n\t\t\t\t\"goleaba \", \n\t\t\t\t\"cordelo \", \n\t\t\t\t\"careaba \", \n\t\t\t\t\"colador \", \n\t\t\t\t\"boleara \", \n\t\t\t\t\"ardaleo \", \n\t\t\t\t\"llegada \", \n\t\t\t\t\"ardalea \", \n\t\t\t\t\"cargado \", \n\t\t\t\t\"caldear \", \n\t\t\t\t\"bolardo \", \n\t\t\t\t\"dallara \", \n\t\t\t\t\"rodeaba \", \n\t\t\t\t\"aclarad \", \n\t\t\t\t\"reglado \", \n\t\t\t\t\"lloredo \", \n\t\t\t\t\"albardo \", \n\t\t\t\t\"glabela \", \n\t\t\t\t\"allegar \", \n\t\t\t\t\"arbolad \", \n\t\t\t\t\"llorada \", \n\t\t\t\t\"collera \", \n\t\t\t\t\"acallar \", \n\t\t\t\t\"lograda \", \n\t\t\t\t\"acallad \", \n\t\t\t\t\"abogada \", \n\t\t\t\t\"loadora \", \n\t\t\t\t\"llagaba \", \n\t\t\t\t\"caldera \", \n\t\t\t\t\"celador \", \n\t\t\t\t\"cebador \", \n\t\t\t\t\"carabao \", \n\t\t\t\t\"abacado \", \n\t\t\t\t\"garbead \", \n\t\t\t\t\"lacerad \", \n\t\t\t\t\"corlaba \", \n\t\t\t\t\"doblare \", \n\t\t\t\t\"alocado \", \n\t\t\t\t\"albeara \", \n\t\t\t\t\"alelada \", \n\t\t\t\t\"cabello \", \n\t\t\t\t\"albergo \", \n\t\t\t\t\"coleara \", \n\t\t\t\t\"gallead \", \n\t\t\t\t\"logrado \", \n\t\t\t\t\"cordela \", \n\t\t\t\t\"cargaba \", \n\t\t\t\t\"codeaba \", \n\t\t\t\t\"regoldo \", \n\t\t\t\t\"baldero \", \n\t\t\t\t\"declara \", \n\t\t\t\t\"ocalear \", \n\t\t\t\t\"ocalead \", \n\t\t\t\t\"acodale \", \n\t\t\t\t\"caballa \", \n\t\t\t\t\"abalead \", \n\t\t\t\t\"algebra \", \n\t\t\t\t\"colorad \", \n\t\t\t\t\"alargad \", \n\t\t\t\t\"caldero \", \n\t\t\t\t\"bellaca \", \n\t\t\t\t\"abalear \", \n\t\t\t\t\"llorado \", \n\t\t\t\t\"baladra \", \n\t\t\t\t\"allegad \", \n\t\t\t\t\"callead \", \n\t\t\t\t\"alelado \", \n\t\t\t\t\"robledo \", \n\t\t\t\t\"cloraba \", \n\t\t\t\t\"caladre \", \n\t\t\t\t\"labrado \", \n\t\t\t\t\"doblara \", \n\t\t\t\t\"begarda \", \n\t\t\t\t\"oledora \", \n\t\t\t\t\"acerada \", \n\t\t\t\t\"laboreo \", \n\t\t\t\t\"cablero \", \n\t\t\t\t\"cogedor \", \n\t\t\t\t\"reglaba \", \n\t\t\t\t\"colgaba \", \n\t\t\t\t\"bollara \", \n\t\t\t\t\"arelaba \", \n\t\t\t\t\"blocare \", \n\t\t\t\t\"cablead \", \n\t\t\t\t\"ecologa \", \n\t\t\t\t\"lobrega \", \n\t\t\t\t\"coleaba \", \n\t\t\t\t\"abacora \", \n\t\t\t\t\"alardea \", \n\t\t\t\t\"dragaba \", \n\t\t\t\t\"lacrado \", \n\t\t\t\t\"abogado \", \n\t\t\t\t\"cegador \", \n\t\t\t\t\"acodalo \", \n\t\t\t\t\"alcolla \", \n\t\t\t\t\"allegro \", \n\t\t\t\t\"acerola \", \n\t\t\t\t\"colodra \", \n\t\t\t\t\"rocalla \", \n\t\t\t\t\"cordoba \", \n\t\t\t\t\"llagado \", \n\t\t\t\t\"cebadal \", \n\t\t\t\t\"bracead \", \n\t\t\t\t\"alboreo \", \n\t\t\t\t\"aceraba \", \n\t\t\t\t\"debocar \", \n\t\t\t\t\"alegrad \", \n\t\t\t\t\"balero \", \n\t\t\t\t\"ollero \", \n\t\t\t\t\"bodega \", \n\t\t\t\t\"dolare \", \n\t\t\t\t\"barloa \", \n\t\t\t\t\"aclara \", \n\t\t\t\t\"alegad \", \n\t\t\t\t\"callar \", \n\t\t\t\t\"cebado \", \n\t\t\t\t\"alagar \", \n\t\t\t\t\"bardal \", \n\t\t\t\t\"rodaba \", \n\t\t\t\t\"ballar \", \n\t\t\t\t\"abolle \", \n\t\t\t\t\"acalla \", \n\t\t\t\t\"acabar \", \n\t\t\t\t\"barcal \", \n\t\t\t\t\"alegar \", \n\t\t\t\t\"agrace \", \n\t\t\t\t\"robalo \", \n\t\t\t\t\"calare \", \n\t\t\t\t\"brolle \", \n\t\t\t\t\"redola \", \n\t\t\t\t\"aldaba \", \n\t\t\t\t\"baldeo \", \n\t\t\t\t\"rogada \", \n\t\t\t\t\"albera \", \n\t\t\t\t\"deboco \", \n\t\t\t\t\"lobado \", \n\t\t\t\t\"aballa \", \n\t\t\t\t\"rallad \", \n\t\t\t\t\"bregad \", \n\t\t\t\t\"acorde \", \n\t\t\t\t\"adarce \", \n\t\t\t\t\"acabad \", \n\t\t\t\t\"redaba \", \n\t\t\t\t\"regaba \", \n\t\t\t\t\"lacado \", \n\t\t\t\t\"brolla \", \n\t\t\t\t\"albaca \", \n\t\t\t\t\"abolla \", \n\t\t\t\t\"ladear \", \n\t\t\t\t\"bolada \", \n\t\t\t\t\"dallar \", \n\t\t\t\t\"cebara \", \n\t\t\t\t\"bocera \", \n\t\t\t\t\"oleaba \", \n\t\t\t\t\"recado \", \n\t\t\t\t\"aleaba \", \n\t\t\t\t\"legara \", \n\t\t\t\t\"aladre \", \n\t\t\t\t\"bocela \", \n\t\t\t\t\"aladra \", \n\t\t\t\t\"galera \", \n\t\t\t\t\"bocear \", \n\t\t\t\t\"bocead \", \n\t\t\t\t\"rocada \", \n\t\t\t\t\"abogad \", \n\t\t\t\t\"rabead \", \n\t\t\t\t\"bocado \", \n\t\t\t\t\"acerad \", \n\t\t\t\t\"corola \", \n\t\t\t\t\"ladreo \", \n\t\t\t\t\"cabare \", \n\t\t\t\t\"balago \", \n\t\t\t\t\"lobear \", \n\t\t\t\t\"aborde \", \n\t\t\t\t\"abocar \", \n\t\t\t\t\"ladera \", \n\t\t\t\t\"coread \", \n\t\t\t\t\"redolo \", \n\t\t\t\t\"beldar \", \n\t\t\t\t\"abrego \", \n\t\t\t\t\"colera \", \n\t\t\t\t\"recaba \", \n\t\t\t\t\"dolera \", \n\t\t\t\t\"gallea \", \n\t\t\t\t\"golead \", \n\t\t\t\t\"cordal \", \n\t\t\t\t\"labrad \", \n\t\t\t\t\"aladar \", \n\t\t\t\t\"acordo \", \n\t\t\t\t\"abaleo \", \n\t\t\t\t\"calara \", \n\t\t\t\t\"alarga \", \n\t\t\t\t\"labore \", \n\t\t\t\t\"colage \", \n\t\t\t\t\"lobera \", \n\t\t\t\t\"lobero \", \n\t\t\t\t\"recodo \", \n\t\t\t\t\"colora \", \n\t\t\t\t\"aclaro \", \n\t\t\t\t\"recalo \", \n\t\t\t\t\"alagad \", \n\t\t\t\t\"agallo \", \n\t\t\t\t\"caldea \", \n\t\t\t\t\"recala \", \n\t\t\t\t\"acerbo \", \n\t\t\t\t\"recabo \", \n\t\t\t\t\"llorad \", \n\t\t\t\t\"gredal \", \n\t\t\t\t\"alcoba \", \n\t\t\t\t\"reglad \", \n\t\t\t\t\"grecal \", \n\t\t\t\t\"oleara \", \n\t\t\t\t\"reblad \", \n\t\t\t\t\"alabeo \", \n\t\t\t\t\"calada \", \n\t\t\t\t\"ladero \", \n\t\t\t\t\"colgad \", \n\t\t\t\t\"agorad \", \n\t\t\t\t\"colero \", \n\t\t\t\t\"balead \", \n\t\t\t\t\"albero \", \n\t\t\t\t\"colega \", \n\t\t\t\t\"balear \", \n\t\t\t\t\"colear \", \n\t\t\t\t\"aballe \", \n\t\t\t\t\"brocal \", \n\t\t\t\t\"arbolo \", \n\t\t\t\t\"cagada \", \n\t\t\t\t\"bolera \", \n\t\t\t\t\"aladro \", \n\t\t\t\t\"laboro \", \n\t\t\t\t\"callao \", \n\t\t\t\t\"colare \", \n\t\t\t\t\"colara \", \n\t\t\t\t\"alegra \", \n\t\t\t\t\"adargo \", \n\t\t\t\t\"goldre \", \n\t\t\t\t\"barceo \", \n\t\t\t\t\"colado \", \n\t\t\t\t\"gacela \", \n\t\t\t\t\"colada \", \n\t\t\t\t\"agrado \", \n\t\t\t\t\"celaba \", \n\t\t\t\t\"albala \", \n\t\t\t\t\"erogad \", \n\t\t\t\t\"colaba \", \n\t\t\t\t\"global \", \n\t\t\t\t\"grabad \", \n\t\t\t\t\"cogera \", \n\t\t\t\t\"bagara \", \n\t\t\t\t\"robada \", \n\t\t\t\t\"balare \", \n\t\t\t\t\"ocaleo \", \n\t\t\t\t\"llegar \", \n\t\t\t\t\"gallar \", \n\t\t\t\t\"codera \", \n\t\t\t\t\"bogara \", \n\t\t\t\t\"oreaba \", \n\t\t\t\t\"codear \", \n\t\t\t\t\"adarga \", \n\t\t\t\t\"abocad \", \n\t\t\t\t\"arcada \", \n\t\t\t\t\"edraba \", \n\t\t\t\t\"roblad \", \n\t\t\t\t\"cobreo \", \n\t\t\t\t\"baldea \", \n\t\t\t\t\"labora \", \n\t\t\t\t\"cobrea \", \n\t\t\t\t\"oblada \", \n\t\t\t\t\"araceo \", \n\t\t\t\t\"boreal \", \n\t\t\t\t\"arelad \", \n\t\t\t\t\"calado \", \n\t\t\t\t\"robeco \", \n\t\t\t\t\"alegro \", \n\t\t\t\t\"abordo \", \n\t\t\t\t\"abalea \", \n\t\t\t\t\"coalla \", \n\t\t\t\t\"oleado \", \n\t\t\t\t\"abollo \", \n\t\t\t\t\"loador \", \n\t\t\t\t\"decoro \", \n\t\t\t\t\"cloral \", \n\t\t\t\t\"rolaba \", \n\t\t\t\t\"agalla \", \n\t\t\t\t\"recoda \", \n\t\t\t\t\"aleara \", \n\t\t\t\t\"rogado \", \n\t\t\t\t\"regala \", \n\t\t\t\t\"obrada \", \n\t\t\t\t\"bolead \", \n\t\t\t\t\"clareo \", \n\t\t\t\t\"gordal \", \n\t\t\t\t\"alargo \", \n\t\t\t\t\"clarea \", \n\t\t\t\t\"acorad \", \n\t\t\t\t\"gabela \", \n\t\t\t\t\"callad \", \n\t\t\t\t\"colead \", \n\t\t\t\t\"glabra \", \n\t\t\t\t\"oleada \", \n\t\t\t\t\"cabrea \", \n\t\t\t\t\"alcedo \", \n\t\t\t\t\"lacead \", \n\t\t\t\t\"llagar \", \n\t\t\t\t\"arable \", \n\t\t\t\t\"groaba \", \n\t\t\t\t\"celara \", \n\t\t\t\t\"acarad \", \n\t\t\t\t\"clorad \", \n\t\t\t\t\"corlad \", \n\t\t\t\t\"celada \", \n\t\t\t\t\"alocar \", \n\t\t\t\t\"cablea \", \n\t\t\t\t\"abarca \", \n\t\t\t\t\"aballo \", \n\t\t\t\t\"cegara \", \n\t\t\t\t\"loable \", \n\t\t\t\t\"albead \", \n\t\t\t\t\"bolero \", \n\t\t\t\t\"bracea \", \n\t\t\t\t\"cegaba \", \n\t\t\t\t\"collar \", \n\t\t\t\t\"calaba \", \n\t\t\t\t\"blocar \", \n\t\t\t\t\"ollera \", \n\t\t\t\t\"bogare \", \n\t\t\t\t\"blocad \", \n\t\t\t\t\"acolle \", \n\t\t\t\t\"bogada \", \n\t\t\t\t\"arbole \", \n\t\t\t\t\"lobead \", \n\t\t\t\t\"lacrad \", \n\t\t\t\t\"golear \", \n\t\t\t\t\"acedar \", \n\t\t\t\t\"bollar \", \n\t\t\t\t\"algaba \", \n\t\t\t\t\"garbeo \", \n\t\t\t\t\"lacara \", \n\t\t\t\t\"dolara \", \n\t\t\t\t\"cebada \", \n\t\t\t\t\"lacare \", \n\t\t\t\t\"bolear \", \n\t\t\t\t\"acodar \", \n\t\t\t\t\"ralead \", \n\t\t\t\t\"albedo \", \n\t\t\t\t\"bocelo \", \n\t\t\t\t\"arcedo \", \n\t\t\t\t\"balara \", \n\t\t\t\t\"bacara \", \n\t\t\t\t\"cargad \", \n\t\t\t\t\"labelo \", \n\t\t\t\t\"legado \", \n\t\t\t\t\"allega \", \n\t\t\t\t\"legaba \", \n\t\t\t\t\"caread \", \n\t\t\t\t\"acalle \", \n\t\t\t\t\"becara \", \n\t\t\t\t\"allego \", \n\t\t\t\t\"cardal \", \n\t\t\t\t\"gradeo \", \n\t\t\t\t\"carbol \", \n\t\t\t\t\"carado \", \n\t\t\t\t\"carada \", \n\t\t\t\t\"carabo \", \n\t\t\t\t\"balaca \", \n\t\t\t\t\"carabe \", \n\t\t\t\t\"baldar \", \n\t\t\t\t\"caraba \", \n\t\t\t\t\"abrace \", \n\t\t\t\t\"acerba \", \n\t\t\t\t\"garbea \", \n\t\t\t\t\"rabada \", \n\t\t\t\t\"galleo \", \n\t\t\t\t\"aboral \", \n\t\t\t\t\"acelga \", \n\t\t\t\t\"lacear \", \n\t\t\t\t\"calleo \", \n\t\t\t\t\"labaro \", \n\t\t\t\t\"becado \", \n\t\t\t\t\"cordel \", \n\t\t\t\t\"croaba \", \n\t\t\t\t\"callea \", \n\t\t\t\t\"glabro \", \n\t\t\t\t\"oledor \", \n\t\t\t\t\"lacera \", \n\t\t\t\t\"ordago \", \n\t\t\t\t\"garlad \", \n\t\t\t\t\"arbola \", \n\t\t\t\t\"balada \", \n\t\t\t\t\"aclare \", \n\t\t\t\t\"ocalea \", \n\t\t\t\t\"calera \", \n\t\t\t\t\"legrad \", \n\t\t\t\t\"bacera \", \n\t\t\t\t\"doblar \", \n\t\t\t\t\"deboca \", \n\t\t\t\t\"caldeo \", \n\t\t\t\t\"cableo \", \n\t\t\t\t\"lacada \", \n\t\t\t\t\"acollo \", \n\t\t\t\t\"ollado \", \n\t\t\t\t\"dolora \", \n\t\t\t\t\"regalo \", \n\t\t\t\t\"lacero \", \n\t\t\t\t\"albada \", \n\t\t\t\t\"dolaba \", \n\t\t\t\t\"cobrad \", \n\t\t\t\t\"orlaba \", \n\t\t\t\t\"abogar \", \n\t\t\t\t\"bollad \", \n\t\t\t\t\"bagare \", \n\t\t\t\t\"cabala \", \n\t\t\t\t\"aborda \", \n\t\t\t\t\"oreada \", \n\t\t\t\t\"brollo \", \n\t\t\t\t\"doraba \", \n\t\t\t\t\"colgar \", \n\t\t\t\t\"acallo \", \n\t\t\t\t\"cagare \", \n\t\t\t\t\"cagara \", \n\t\t\t\t\"llagad \", \n\t\t\t\t\"cabreo \", \n\t\t\t\t\"aracea \", \n\t\t\t\t\"cagado \", \n\t\t\t\t\"ladrea \", \n\t\t\t\t\"albear \", \n\t\t\t\t\"brecol \", \n\t\t\t\t\"cagaba \", \n\t\t\t\t\"blocao \", \n\t\t\t\t\"rodela \", \n\t\t\t\t\"rollad \", \n\t\t\t\t\"areola \", \n\t\t\t\t\"algara \", \n\t\t\t\t\"cadera \", \n\t\t\t\t\"braceo \", \n\t\t\t\t\"lacaba \", \n\t\t\t\t\"alarde \", \n\t\t\t\t\"colore \", \n\t\t\t\t\"galeo \", \n\t\t\t\t\"gorda \", \n\t\t\t\t\"cabra \", \n\t\t\t\t\"credo \", \n\t\t\t\t\"alcor \", \n\t\t\t\t\"borde \", \n\t\t\t\t\"codea \", \n\t\t\t\t\"colad \", \n\t\t\t\t\"rodea \", \n\t\t\t\t\"codal \", \n\t\t\t\t\"llore \", \n\t\t\t\t\"rollo \", \n\t\t\t\t\"badea \", \n\t\t\t\t\"cable \", \n\t\t\t\t\"caber \", \n\t\t\t\t\"coleo \", \n\t\t\t\t\"acaro \", \n\t\t\t\t\"greba \", \n\t\t\t\t\"aldol \", \n\t\t\t\t\"gabro \", \n\t\t\t\t\"lacar \", \n\t\t\t\t\"erogo \", \n\t\t\t\t\"aboga \", \n\t\t\t\t\"grada \", \n\t\t\t\t\"cabro \", \n\t\t\t\t\"celar \", \n\t\t\t\t\"alega \", \n\t\t\t\t\"rolle \", \n\t\t\t\t\"alaga \", \n\t\t\t\t\"cagar \", \n\t\t\t\t\"clero \", \n\t\t\t\t\"legro \", \n\t\t\t\t\"braco \", \n\t\t\t\t\"reala \", \n\t\t\t\t\"reglo \", \n\t\t\t\t\"corea \", \n\t\t\t\t\"cabal \", \n\t\t\t\t\"calad \", \n\t\t\t\t\"gerbo \", \n\t\t\t\t\"alear \", \n\t\t\t\t\"corlo \", \n\t\t\t\t\"roela \", \n\t\t\t\t\"bagad \", \n\t\t\t\t\"raleo \", \n\t\t\t\t\"alalo \", \n\t\t\t\t\"cello \", \n\t\t\t\t\"decor \", \n\t\t\t\t\"calar \", \n\t\t\t\t\"cabre \", \n\t\t\t\t\"ralle \", \n\t\t\t\t\"carlo \", \n\t\t\t\t\"breca \", \n\t\t\t\t\"careo \", \n\t\t\t\t\"orale \", \n\t\t\t\t\"clore \", \n\t\t\t\t\"regla \", \n\t\t\t\t\"braga \", \n\t\t\t\t\"drago \", \n\t\t\t\t\"acoda \", \n\t\t\t\t\"carda \", \n\t\t\t\t\"colla \", \n\t\t\t\t\"rabea \", \n\t\t\t\t\"braca \", \n\t\t\t\t\"laceo \", \n\t\t\t\t\"racel \", \n\t\t\t\t\"cobra \", \n\t\t\t\t\"coral \", \n\t\t\t\t\"logro \", \n\t\t\t\t\"gordo \", \n\t\t\t\t\"grabo \", \n\t\t\t\t\"bollo \", \n\t\t\t\t\"caoba \", \n\t\t\t\t\"goleo \", \n\t\t\t\t\"coala \", \n\t\t\t\t\"cebar \", \n\t\t\t\t\"greco \", \n\t\t\t\t\"garla \", \n\t\t\t\t\"cobla \", \n\t\t\t\t\"bolla \", \n\t\t\t\t\"golea \", \n\t\t\t\t\"delga \", \n\t\t\t\t\"boleo \", \n\t\t\t\t\"cebad \", \n\t\t\t\t\"eroga \", \n\t\t\t\t\"llera \", \n\t\t\t\t\"claro \", \n\t\t\t\t\"ocelo \", \n\t\t\t\t\"calao \", \n\t\t\t\t\"cargo \", \n\t\t\t\t\"globo \", \n\t\t\t\t\"balad \", \n\t\t\t\t\"colar \", \n\t\t\t\t\"lobea \", \n\t\t\t\t\"legra \", \n\t\t\t\t\"cagad \", \n\t\t\t\t\"barde \", \n\t\t\t\t\"ladeo \", \n\t\t\t\t\"rabel \", \n\t\t\t\t\"aboca \", \n\t\t\t\t\"cardo \", \n\t\t\t\t\"geada \", \n\t\t\t\t\"bogar \", \n\t\t\t\t\"roblo \", \n\t\t\t\t\"bogad \", \n\t\t\t\t\"dallo \", \n\t\t\t\t\"garle \", \n\t\t\t\t\"rolde \", \n\t\t\t\t\"rolad \", \n\t\t\t\t\"bolea \", \n\t\t\t\t\"greca \", \n\t\t\t\t\"dalla \", \n\t\t\t\t\"boceo \", \n\t\t\t\t\"greda \", \n\t\t\t\t\"olead \", \n\t\t\t\t\"dable \", \n\t\t\t\t\"calor \", \n\t\t\t\t\"robla \", \n\t\t\t\t\"callo \", \n\t\t\t\t\"cegad \", \n\t\t\t\t\"larga \", \n\t\t\t\t\"croad \", \n\t\t\t\t\"bocea \", \n\t\t\t\t\"cebra \", \n\t\t\t\t\"bocal \", \n\t\t\t\t\"reoca \", \n\t\t\t\t\"goral \", \n\t\t\t\t\"corla \", \n\t\t\t\t\"bloco \", \n\t\t\t\t\"roble \", \n\t\t\t\t\"rallo \", \n\t\t\t\t\"rebol \", \n\t\t\t\t\"beldo \", \n\t\t\t\t\"eraba \", \n\t\t\t\t\"bloca \", \n\t\t\t\t\"doral \", \n\t\t\t\t\"bledo \", \n\t\t\t\t\"alead \", \n\t\t\t\t\"beodo \", \n\t\t\t\t\"beoda \", \n\t\t\t\t\"debla \", \n\t\t\t\t\"broca \", \n\t\t\t\t\"lleco \", \n\t\t\t\t\"doler \", \n\t\t\t\t\"bella \", \n\t\t\t\t\"belga \", \n\t\t\t\t\"areca \", \n\t\t\t\t\"ergol \", \n\t\t\t\t\"boldo \", \n\t\t\t\t\"oraba \", \n\t\t\t\t\"legar \", \n\t\t\t\t\"alego \", \n\t\t\t\t\"geoda \", \n\t\t\t\t\"carea \", \n\t\t\t\t\"becar \", \n\t\t\t\t\"ollao \", \n\t\t\t\t\"becad \", \n\t\t\t\t\"doble \", \n\t\t\t\t\"loaba \", \n\t\t\t\t\"locro \", \n\t\t\t\t\"lleca \", \n\t\t\t\t\"ralea \", \n\t\t\t\t\"rabeo \", \n\t\t\t\t\"barda \", \n\t\t\t\t\"barco \", \n\t\t\t\t\"olear \", \n\t\t\t\t\"droga \", \n\t\t\t\t\"cerda \", \n\t\t\t\t\"brego \", \n\t\t\t\t\"draba \", \n\t\t\t\t\"brega \", \n\t\t\t\t\"alala \", \n\t\t\t\t\"acare \", \n\t\t\t\t\"baleo \", \n\t\t\t\t\"dalle \", \n\t\t\t\t\"adobe \", \n\t\t\t\t\"albor \", \n\t\t\t\t\"oread \", \n\t\t\t\t\"bello \", \n\t\t\t\t\"balea \", \n\t\t\t\t\"gacel \", \n\t\t\t\t\"rolla \", \n\t\t\t\t\"graba \", \n\t\t\t\t\"algol \", \n\t\t\t\t\"albar \", \n\t\t\t\t\"acoro \", \n\t\t\t\t\"celda \", \n\t\t\t\t\"calla \", \n\t\t\t\t\"colea \", \n\t\t\t\t\"delco \", \n\t\t\t\t\"rodal \", \n\t\t\t\t\"balda \", \n\t\t\t\t\"llora \", \n\t\t\t\t\"acabe \", \n\t\t\t\t\"balar \", \n\t\t\t\t\"ollar \", \n\t\t\t\t\"ardea \", \n\t\t\t\t\"acara \", \n\t\t\t\t\"glera \", \n\t\t\t\t\"dobla \", \n\t\t\t\t\"llago \", \n\t\t\t\t\"larda \", \n\t\t\t\t\"orlad \", \n\t\t\t\t\"groad \", \n\t\t\t\t\"lacad \", \n\t\t\t\t\"bagre \", \n\t\t\t\t\"labro \", \n\t\t\t\t\"dolar \", \n\t\t\t\t\"coger \", \n\t\t\t\t\"bagar \", \n\t\t\t\t\"draga \", \n\t\t\t\t\"lodra \", \n\t\t\t\t\"legal \", \n\t\t\t\t\"badal \", \n\t\t\t\t\"borda \", \n\t\t\t\t\"grado \", \n\t\t\t\t\"loare \", \n\t\t\t\t\"grade \", \n\t\t\t\t\"acodo \", \n\t\t\t\t\"acode \", \n\t\t\t\t\"acebo \", \n\t\t\t\t\"grabe \", \n\t\t\t\t\"lobeo \", \n\t\t\t\t\"lacro \", \n\t\t\t\t\"lacre \", \n\t\t\t\t\"erala \", \n\t\t\t\t\"caera \", \n\t\t\t\t\"argel \", \n\t\t\t\t\"labra \", \n\t\t\t\t\"arelo \", \n\t\t\t\t\"cobol \", \n\t\t\t\t\"balde \", \n\t\t\t\t\"arela \", \n\t\t\t\t\"cerdo \", \n\t\t\t\t\"lerda \", \n\t\t\t\t\"garbo \", \n\t\t\t\t\"abada \", \n\t\t\t\t\"bolle \", \n\t\t\t\t\"bocel \", \n\t\t\t\t\"color \", \n\t\t\t\t\"calda \", \n\t\t\t\t\"godeo \", \n\t\t\t\t\"abaco \", \n\t\t\t\t\"lacea \", \n\t\t\t\t\"local \", \n\t\t\t\t\"borla \", \n\t\t\t\t\"alago \", \n\t\t\t\t\"bordo \", \n\t\t\t\t\"doblo \", \n\t\t\t\t\"gleba \", \n\t\t\t\t\"calle \", \n\t\t\t\t\"acera \", \n\t\t\t\t\"cabed \", \n\t\t\t\t\"acedo \", \n\t\t\t\t\"clara \", \n\t\t\t\t\"acaba \", \n\t\t\t\t\"arbol \", \n\t\t\t\t\"arado \", \n\t\t\t\t\"arada \", \n\t\t\t\t\"alada \", \n\t\t\t\t\"olera \", \n\t\t\t\t\"garlo \", \n\t\t\t\t\"labor \", \n\t\t\t\t\"arabo \", \n\t\t\t\t\"cella \", \n\t\t\t\t\"arabe \", \n\t\t\t\t\"araba \", \n\t\t\t\t\"redol \", \n\t\t\t\t\"oblea \", \n\t\t\t\t\"alora \", \n\t\t\t\t\"obelo \", \n\t\t\t\t\"celad \", \n\t\t\t\t\"gallo \", \n\t\t\t\t\"coreo \", \n\t\t\t\t\"agoro \", \n\t\t\t\t\"acero \", \n\t\t\t\t\"cegar \", \n\t\t\t\t\"agora \", \n\t\t\t\t\"galla \", \n\t\t\t\t\"codeo \", \n\t\t\t\t\"acora \", \n\t\t\t\t\"cedro \", \n\t\t\t\t\"radal \", \n\t\t\t\t\"legad \", \n\t\t\t\t\"abogo \", \n\t\t\t\t\"acore \", \n\t\t\t\t\"colgo \", \n\t\t\t\t\"bread \", \n\t\t\t\t\"clora \", \n\t\t\t\t\"albeo \", \n\t\t\t\t\"adoro \", \n\t\t\t\t\"galea \", \n\t\t\t\t\"barca \", \n\t\t\t\t\"alabe \", \n\t\t\t\t\"algar \", \n\t\t\t\t\"aceda \", \n\t\t\t\t\"caldo \", \n\t\t\t\t\"alero \", \n\t\t\t\t\"alera \", \n\t\t\t\t\"adobo \", \n\t\t\t\t\"alelo \", \n\t\t\t\t\"lagar \", \n\t\t\t\t\"coged \", \n\t\t\t\t\"caobo \", \n\t\t\t\t\"corle \", \n\t\t\t\t\"dogre \", \n\t\t\t\t\"regad \", \n\t\t\t\t\"agore \", \n\t\t\t\t\"roleo \", \n\t\t\t\t\"olada \", \n\t\t\t\t\"lloro \", \n\t\t\t\t\"ralla \", \n\t\t\t\t\"cloro \", \n\t\t\t\t\"ladea \", \n\t\t\t\t\"alado \", \n\t\t\t\t\"reblo \", \n\t\t\t\t\"cobre \", \n\t\t\t\t\"rebla \", \n\t\t\t\t\"baldo \", \n\t\t\t\t\"corbe \", \n\t\t\t\t\"lacra \", \n\t\t\t\t\"albea \", \n\t\t\t\t\"cobro \", \n\t\t\t\t\"rodeo \", \n\t\t\t\t\"bardo \", \n\t\t\t\t\"labre \", \n\t\t\t\t\"llaga \", \n\t\t\t\t\"grelo \", \n\t\t\t\t\"carel \", \n\t\t\t\t\"carga \", \n\t\t\t\t\"robda \", \n\t\t\t\t\"dogal \", \n\t\t\t\t\"aldea \", \n\t\t\t\t\"dolor \", \n\t\t\t\t\"ladra \", \n\t\t\t\t\"llaca \", \n\t\t\t\t\"lerdo \", \n\t\t\t\t\"loara \", \n\t\t\t\t\"largo \", \n\t\t\t\t\"acabo \", \n\t\t\t\t\"aboco \", \n\t\t\t\t\"obrad \", \n\t\t\t\t\"adore \", \n\t\t\t\t\"rabal \", \n\t\t\t\t\"adora \", \n\t\t\t\t\"lardo \", \n\t\t\t\t\"roda \", \n\t\t\t\t\"albo \", \n\t\t\t\t\"agro \", \n\t\t\t\t\"rolo \", \n\t\t\t\t\"caro \", \n\t\t\t\t\"caga \", \n\t\t\t\t\"alce \", \n\t\t\t\t\"garo \", \n\t\t\t\t\"groo \", \n\t\t\t\t\"cara \", \n\t\t\t\t\"cora \", \n\t\t\t\t\"laco \", \n\t\t\t\t\"logo \", \n\t\t\t\t\"cada \", \n\t\t\t\t\"roel \", \n\t\t\t\t\"coda \", \n\t\t\t\t\"orco \", \n\t\t\t\t\"alga \", \n\t\t\t\t\"orce \", \n\t\t\t\t\"redo \", \n\t\t\t\t\"cago \", \n\t\t\t\t\"loor \", \n\t\t\t\t\"arlo \", \n\t\t\t\t\"boro \", \n\t\t\t\t\"doga \", \n\t\t\t\t\"role \", \n\t\t\t\t\"bada \", \n\t\t\t\t\"olla \", \n\t\t\t\t\"ordo \", \n\t\t\t\t\"cala \", \n\t\t\t\t\"calo \", \n\t\t\t\t\"cero \", \n\t\t\t\t\"reda \", \n\t\t\t\t\"cela \", \n\t\t\t\t\"bale \", \n\t\t\t\t\"alar \", \n\t\t\t\t\"lace \", \n\t\t\t\t\"cole \", \n\t\t\t\t\"cabe \", \n\t\t\t\t\"dolo \", \n\t\t\t\t\"bago \", \n\t\t\t\t\"cola \", \n\t\t\t\t\"loro \", \n\t\t\t\t\"daga \", \n\t\t\t\t\"caer \", \n\t\t\t\t\"caed \", \n\t\t\t\t\"daba \", \n\t\t\t\t\"dore \", \n\t\t\t\t\"croo \", \n\t\t\t\t\"lada \", \n\t\t\t\t\"rogo \", \n\t\t\t\t\"edro \", \n\t\t\t\t\"blao \", \n\t\t\t\t\"obro \", \n\t\t\t\t\"arac \", \n\t\t\t\t\"cabo \", \n\t\t\t\t\"crea \", \n\t\t\t\t\"godo \", \n\t\t\t\t\"colo \", \n\t\t\t\t\"goda \", \n\t\t\t\t\"arda \", \n\t\t\t\t\"agre \", \n\t\t\t\t\"groa \", \n\t\t\t\t\"rego \", \n\t\t\t\t\"ador \", \n\t\t\t\t\"agra \", \n\t\t\t\t\"cego \", \n\t\t\t\t\"raba \", \n\t\t\t\t\"bode \", \n\t\t\t\t\"boda \", \n\t\t\t\t\"alla \", \n\t\t\t\t\"rala \", \n\t\t\t\t\"raed \", \n\t\t\t\t\"croe \", \n\t\t\t\t\"cedo \", \n\t\t\t\t\"rada \", \n\t\t\t\t\"croa \", \n\t\t\t\t\"creo \", \n\t\t\t\t\"doro \", \n\t\t\t\t\"aedo \", \n\t\t\t\t\"aeda \", \n\t\t\t\t\"adra \", \n\t\t\t\t\"algo \", \n\t\t\t\t\"deba \", \n\t\t\t\t\"aloa \", \n\t\t\t\t\"boca \", \n\t\t\t\t\"eral \", \n\t\t\t\t\"deca \", \n\t\t\t\t\"orlo \", \n\t\t\t\t\"orle \", \n\t\t\t\t\"groe \", \n\t\t\t\t\"aleo \", \n\t\t\t\t\"orla \", \n\t\t\t\t\"oreo \", \n\t\t\t\t\"baca \", \n\t\t\t\t\"bala \", \n\t\t\t\t\"boga \", \n\t\t\t\t\"orea \", \n\t\t\t\t\"alea \", \n\t\t\t\t\"doce \", \n\t\t\t\t\"doca \", \n\t\t\t\t\"roce \", \n\t\t\t\t\"cale \", \n\t\t\t\t\"lodo \", \n\t\t\t\t\"orbe \", \n\t\t\t\t\"brea \", \n\t\t\t\t\"oral \", \n\t\t\t\t\"orad \", \n\t\t\t\t\"lera \", \n\t\t\t\t\"gola \", \n\t\t\t\t\"olor \", \n\t\t\t\t\"beco \", \n\t\t\t\t\"breo \", \n\t\t\t\t\"geco \", \n\t\t\t\t\"ello \", \n\t\t\t\t\"balo \", \n\t\t\t\t\"llar \", \n\t\t\t\t\"roca \", \n\t\t\t\t\"oler \", \n\t\t\t\t\"oleo \", \n\t\t\t\t\"rabo \", \n\t\t\t\t\"lago \", \n\t\t\t\t\"oled \", \n\t\t\t\t\"coba \", \n\t\t\t\t\"lobo \", \n\t\t\t\t\"ardo \", \n\t\t\t\t\"grao \", \n\t\t\t\t\"gara \", \n\t\t\t\t\"galo \", \n\t\t\t\t\"olea \", \n\t\t\t\t\"bola \", \n\t\t\t\t\"alba \", \n\t\t\t\t\"bogo \", \n\t\t\t\t\"ogro \", \n\t\t\t\t\"odre \", \n\t\t\t\t\"bolo \", \n\t\t\t\t\"ceda \", \n\t\t\t\t\"lela \", \n\t\t\t\t\"goce \", \n\t\t\t\t\"arco \", \n\t\t\t\t\"real \", \n\t\t\t\t\"cebo \", \n\t\t\t\t\"coge \", \n\t\t\t\t\"codo \", \n\t\t\t\t\"arce \", \n\t\t\t\t\"laca \", \n\t\t\t\t\"ella \", \n\t\t\t\t\"ocal \", \n\t\t\t\t\"area \", \n\t\t\t\t\"debo \", \n\t\t\t\t\"abad \", \n\t\t\t\t\"obre \", \n\t\t\t\t\"edra \", \n\t\t\t\t\"roed \", \n\t\t\t\t\"obra \", \n\t\t\t\t\"oboe \", \n\t\t\t\t\"acal \", \n\t\t\t\t\"arad \", \n\t\t\t\t\"aloe \", \n\t\t\t\t\"lado \", \n\t\t\t\t\"lord \", \n\t\t\t\t\"lora \", \n\t\t\t\t\"robo \", \n\t\t\t\t\"lega \", \n\t\t\t\t\"lolo \", \n\t\t\t\t\"erad \", \n\t\t\t\t\"rola \", \n\t\t\t\t\"leal \", \n\t\t\t\t\"lead \", \n\t\t\t\t\"abre \", \n\t\t\t\t\"baga \", \n\t\t\t\t\"boer \", \n\t\t\t\t\"beca \", \n\t\t\t\t\"loco \", \n\t\t\t\t\"celo \", \n\t\t\t\t\"loca \", \n\t\t\t\t\"raca \", \n\t\t\t\t\"orca \", \n\t\t\t\t\"arel \", \n\t\t\t\t\"abra \", \n\t\t\t\t\"gala \", \n\t\t\t\t\"dare \", \n\t\t\t\t\"dara \", \n\t\t\t\t\"ledo \", \n\t\t\t\t\"leda \", \n\t\t\t\t\"daca \", \n\t\t\t\t\"bloc \", \n\t\t\t\t\"loba \", \n\t\t\t\t\"dora \", \n\t\t\t\t\"dola \", \n\t\t\t\t\"loar \", \n\t\t\t\t\"dogo \", \n\t\t\t\t\"acre \", \n\t\t\t\t\"load \", \n\t\t\t\t\"ralo \", \n\t\t\t\t\"dole \", \n\t\t\t\t\"arca \", \n\t\t\t\t\"core \", \n\t\t\t\t\"lelo \", \n\t\t\t\t\"lego \", \n\t\t\t\t\"rode \", \n\t\t\t\t\"ergo \", \n\t\t\t\t\"rodo \", \n\t\t\t\t\"cera \", \n\t\t\t\t\"ocre \", \n\t\t\t\t\"crol \", \n\t\t\t\t\"broa \", \n\t\t\t\t\"ceba \", \n\t\t\t\t\"laro \", \n\t\t\t\t\"arde \", \n\t\t\t\t\"coro \", \n\t\t\t\t\"dala \", \n\t\t\t\t\"abro \", \n\t\t\t\t\"alo \", \n\t\t\t\t\"leo \", \n\t\t\t\t\"bel \", \n\t\t\t\t\"ego \", \n\t\t\t\t\"loa \", \n\t\t\t\t\"lle \", \n\t\t\t\t\"bar \", \n\t\t\t\t\"bao \", \n\t\t\t\t\"gea \", \n\t\t\t\t\"ceo \", \n\t\t\t\t\"caa \", \n\t\t\t\t\"ore \", \n\t\t\t\t\"ada \", \n\t\t\t\t\"ara \", \n\t\t\t\t\"ora \", \n\t\t\t\t\"aca \", \n\t\t\t\t\"gel \", \n\t\t\t\t\"are \", \n\t\t\t\t\"del \", \n\t\t\t\t\"cea \", \n\t\t\t\t\"goa \", \n\t\t\t\t\"ola \", \n\t\t\t\t\"oco \", \n\t\t\t\t\"rob \", \n\t\t\t\t\"dar \", \n\t\t\t\t\"reg \", \n\t\t\t\t\"oca \", \n\t\t\t\t\"reo \", \n\t\t\t\t\"oda \", \n\t\t\t\t\"col \", \n\t\t\t\t\"gro \", \n\t\t\t\t\"loo \", \n\t\t\t\t\"roa \", \n\t\t\t\t\"aga \", \n\t\t\t\t\"cor \", \n\t\t\t\t\"era \", \n\t\t\t\t\"coa \", \n\t\t\t\t\"ero \", \n\t\t\t\t\"loe \", \n\t\t\t\t\"rea \", \n\t\t\t\t\"rae \", \n\t\t\t\t\"rol \", \n\t\t\t\t\"clo \", \n\t\t\t\t\"rad \", \n\t\t\t\t\"dea \", \n\t\t\t\t\"lar \", \n\t\t\t\t\"car \", \n\t\t\t\t\"rao \", \n\t\t\t\t\"oro \", \n\t\t\t\t\"cao \", \n\t\t\t\t\"ade \", \n\t\t\t\t\"cal \", \n\t\t\t\t\"gol \", \n\t\t\t\t\"boa \", \n\t\t\t\t\"red \", \n\t\t\t\t\"ole \", \n\t\t\t\t\"bol \", \n\t\t\t\t\"ado \", \n\t\t\t\t\"erg \", \n\t\t\t\t\"cae \", \n\t\t\t\t\"gal \", \n\t\t\t\t\"ala \", \n\t\t\t\t\"aro \", \n\t\t\t\t\"roe \", \n\t\t\t\t\"ale \", \n\t\t\t\t\"eco \", \n\t\t\t\t\"de \", \n\t\t\t\t\"lo \", \n\t\t\t\t\"da \", \n\t\t\t\t\"go \", \n\t\t\t\t\"le \", \n\t\t\t\t\"ea \", \n\t\t\t\t\"ro \", \n\t\t\t\t\"ad \", \n\t\t\t\t\"oc \", \n\t\t\t\t\"re \", \n\t\t\t\t\"ar \", \n\t\t\t\t\"be \", \n\t\t\t\t\"la \", \n\t\t\t\t\"el \", \n\t\t\t\t\"al \", \n\t\t\t\t\"do \", \n\t\t\t\t\"ce \", \n\t\t\t\t\"ge \", \n\t\t\t\t\"ab \"\t\t\n\t\t};\n\n\t\tputAnagramsTogether(sArray);\t\n\n\t}", "private static void stringBuilder(String[] ss, int n) {\n Timer t = new Timer(); \n String res = null;\n StringBuilder buf = new StringBuilder();\n for (int i=0; i<n; i++) \n buf.append(ss[i]);\n res = buf.toString();\n System.out.format(\"Result length:%7d; time:%8.3f sec\\n\" , res.length(), t.Check());\n }", "public String[] getArrayValue();", "public static void main(String[] args) {\n\n int N = 4;\n int [] arr = new int[N];\n\n generateBinaryString(N, arr, 0);\n // 2 items and 4 spaces\n }", "private String[] getNodeStringArray(){\n String[] nodes = new String[truss.getNodeModel().size()];\n for(int i =0;i<truss.getNodeModel().size();i++){\n nodes[i] = \"Node\" + truss.getNodeModel().get(i).getNumber();\n }\n return nodes;\n }", "private String[] subStringArray(String[] array, int from, int to) {\r\n int length = to - from;\r\n String[] result = new String[length];\r\n for (int i = from; i < to; i++) {\r\n result[i - from] = array[i];\r\n }\r\n return result;\r\n }", "public static MekString[] getMekStringArray(){\n\t\treturn setOfStrings;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString[][] str=new String[2][3];\r\n\t\tstr[0][0]=\"1-one\";\r\n\t\tstr[0][1]=\"2-two\";\r\n\t\tstr[0][2]=\"3-three\";\r\n\t\tstr[1][0]=\"4-four\";\r\n\t\tstr[1][1]=\"5-five\";\r\n\t\tstr[1][2]=\"6-six\";\r\n\t\tSystem.out.println(\"Displaying String values without using loops:\");\r\n\t\tSystem.out.println(str[0][0]+\" \"+str[0][1]+\" \"+str[0][2]);\r\n\t\tSystem.out.println(str[1][0]+\" \"+str[1][1]+\" \"+str[1][2]);\r\n\t\tSystem.out.println(\"Displaying String values without using nested loops:\");\r\n\t\tfor(int i=0;i<2;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tSystem.out.print(str[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\r\n\r\n\t}", "private static TriNode buildTri(String[] str) {\r\n TriNode n = new TriNode();\r\n for (String s : str) {\r\n n.append(s);\r\n }\r\n return n;\r\n }" ]
[ "0.67670757", "0.6662818", "0.66011935", "0.6350539", "0.6299632", "0.62401116", "0.6228285", "0.6216742", "0.6213391", "0.62108564", "0.6201113", "0.6131302", "0.6110208", "0.60881877", "0.6075369", "0.60366917", "0.6029954", "0.6020436", "0.5985632", "0.5972385", "0.586627", "0.5842626", "0.58364624", "0.5834825", "0.58167195", "0.58089036", "0.57911104", "0.57591385", "0.5757446", "0.5747192", "0.57367", "0.5728738", "0.5714619", "0.57121843", "0.57118213", "0.57101774", "0.57052165", "0.56953", "0.56890625", "0.56795704", "0.5668389", "0.5655801", "0.5643543", "0.5640962", "0.56252897", "0.561224", "0.5580181", "0.55738896", "0.55659497", "0.5560147", "0.55507404", "0.5549225", "0.5536079", "0.55285", "0.55265296", "0.55262625", "0.5521677", "0.552162", "0.55088514", "0.550757", "0.54978764", "0.5492946", "0.5484976", "0.54813725", "0.5473461", "0.54657865", "0.5459743", "0.54585576", "0.5449702", "0.54493284", "0.5432424", "0.5427504", "0.54228336", "0.5422669", "0.542022", "0.5418801", "0.54179335", "0.5416785", "0.54095256", "0.54092246", "0.5407611", "0.5401818", "0.53993887", "0.5394527", "0.53870535", "0.5376819", "0.53762805", "0.53736794", "0.53726107", "0.53645974", "0.53628325", "0.5361325", "0.53591216", "0.53473616", "0.53457695", "0.53450364", "0.53447616", "0.53408444", "0.5334227", "0.53339535", "0.532988" ]
0.0
-1
Devuelve el tipo de IVA del producto
public IVA getIva() { return iva; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType xgetProductType();", "public String getType() {\r\n\t\treturn productType;\r\n\t}", "public IProduto getCodProd();", "String productKind();", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum getProductType();", "public Class getType() {\n return SSProduct.class;\n }", "Object getTipo();", "@Override\r\n\tpublic String getType() {\n\t\treturn \"Pigiste\";\r\n\t}", "public String getViptype() {\n return viptype;\n }", "public String getProductType() {\n\t\treturn productType;\n\t}", "public TypeProduct getTypeProduct() {\r\n\t\treturn typeProduct;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.productType = type;\r\n\t}", "public int getIva() {\n\t\treturn producto.getIva();\n\t}", "public ProductosInventario(String codigoDeBarras, String nombre, Empresa empresa, int presentacion, int iva, int costo, int cantidad, String tipo, int precio) {\n\t\tthis.producto = new Producto(codigoDeBarras, nombre, empresa, presentacion, iva, costo,precio);\n\t\tthis.cantidad = 0;\n\t\tsetCantidad(cantidad);\n\t\tthis.tipo = tipo;\n\t}", "ProductoO getIzq();", "public String getTipo();", "public String getTipo();", "public ProductType getProduct() {\n return product;\n }", "@Override\r\n\tpublic String typeV() {\n\t\treturn hio.TyreType();\r\n\t}", "private int getTipo(String _type) {\n\t\tif (_type.equals(TAG_CELL_TYPE_EMPTY)) {\n\t\t\treturn TAG_C_VUOTA;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_OPTION)) {\n\t\t\treturn TAG_C_SCELTA;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_EFFECT)) {\n\t\t\treturn TAG_C_EFFETTO;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_END)) {\n\t\t\treturn TAG_C_FINALE;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_LOOT)) {\n\t\t\treturn TAG_C_LOOT;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_GATE)) {\n\t\t\treturn TAG_C_GATE;\n\t\t}\n\t\treturn TAG_C_VUOTA;\n\t}", "ImageType getType();", "void setProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum productType);", "public interface Product {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the etag property: The entity tag used for optimistic concurrency when modifying the resource.\n *\n * @return the etag value.\n */\n String etag();\n\n /**\n * Gets the displayName property: The display name of the product.\n *\n * @return the displayName value.\n */\n String displayName();\n\n /**\n * Gets the description property: The description of the product.\n *\n * @return the description value.\n */\n String description();\n\n /**\n * Gets the publisherDisplayName property: The user-friendly name of the product publisher.\n *\n * @return the publisherDisplayName value.\n */\n String publisherDisplayName();\n\n /**\n * Gets the publisherIdentifier property: Publisher identifier.\n *\n * @return the publisherIdentifier value.\n */\n String publisherIdentifier();\n\n /**\n * Gets the offer property: The offer representing the product.\n *\n * @return the offer value.\n */\n String offer();\n\n /**\n * Gets the offerVersion property: The version of the product offer.\n *\n * @return the offerVersion value.\n */\n String offerVersion();\n\n /**\n * Gets the sku property: The product SKU.\n *\n * @return the sku value.\n */\n String sku();\n\n /**\n * Gets the billingPartNumber property: The part number used for billing purposes.\n *\n * @return the billingPartNumber value.\n */\n String billingPartNumber();\n\n /**\n * Gets the vmExtensionType property: The type of the Virtual Machine Extension.\n *\n * @return the vmExtensionType value.\n */\n String vmExtensionType();\n\n /**\n * Gets the galleryItemIdentity property: The identifier of the gallery item corresponding to the product.\n *\n * @return the galleryItemIdentity value.\n */\n String galleryItemIdentity();\n\n /**\n * Gets the iconUris property: Additional links available for this product.\n *\n * @return the iconUris value.\n */\n IconUris iconUris();\n\n /**\n * Gets the links property: Additional links available for this product.\n *\n * @return the links value.\n */\n List<ProductLink> links();\n\n /**\n * Gets the legalTerms property: The legal terms.\n *\n * @return the legalTerms value.\n */\n String legalTerms();\n\n /**\n * Gets the privacyPolicy property: The privacy policy.\n *\n * @return the privacyPolicy value.\n */\n String privacyPolicy();\n\n /**\n * Gets the payloadLength property: The length of product content.\n *\n * @return the payloadLength value.\n */\n Long payloadLength();\n\n /**\n * Gets the productKind property: The kind of the product (virtualMachine or virtualMachineExtension).\n *\n * @return the productKind value.\n */\n String productKind();\n\n /**\n * Gets the productProperties property: Additional properties for the product.\n *\n * @return the productProperties value.\n */\n ProductProperties productProperties();\n\n /**\n * Gets the compatibility property: Product compatibility with current device.\n *\n * @return the compatibility value.\n */\n Compatibility compatibility();\n\n /**\n * Gets the inner com.azure.resourcemanager.azurestack.fluent.models.ProductInner object.\n *\n * @return the inner object.\n */\n ProductInner innerModel();\n}", "public String getTipo() {\r\n return tipo;\r\n }", "public String getTipo() {\r\n return tipo;\r\n }", "public String getKind_of_product() {\r\n return kind_of_product;\r\n }", "ProductType(String name)\n {\n this.name = name;\n }", "public int getTipo() {\r\n\t\treturn tipo;\r\n\t}", "Object getProduct();", "public Object getTipo() {\n\t\treturn null;\n\t}", "public void setCodProd(IProduto codigo);", "public TipoPedina getTipo() {\n return tipo;\n }", "public JComboBox getCmbTipoProducto() {\r\n\t\treturn cmbTipoProducto;\r\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public int getTipo() {\r\n return tipo;\r\n }", "public int getTipo() {\n return tipo;\n }", "@java.lang.Override public int getDisplayUploadProductTypeValue() {\n return displayUploadProductType_;\n }", "public void setKind_of_product(String kind_of_product) {\r\n this.kind_of_product = kind_of_product;\r\n }", "public String getTipo(){\r\n return tipo;\r\n }", "public String getTipo(){\n\t\treturn this.tipo;\n\t}", "public void setTipoInmueble(Valor tipoInmueble) {\n this.tipoInmueble = tipoInmueble;\n }", "public void setTipo(String tipo) {\r\n this.tipo = tipo;\r\n }", "public String getTipo(){\n return tipo;\n }", "@java.lang.Override public int getDisplayUploadProductTypeValue() {\n return displayUploadProductType_;\n }", "public Integer getProductTypeId() {\r\n return productTypeId;\r\n }", "@Override\r\n public String toString() {\r\n return tipo;\r\n }", "@Override\n\tpublic TipoCarne getTipo() {\n\t\treturn hamburguer.getTipo();\n\t}", "public String getTipo() {\n\t\treturn \"Berlina\";\r\n\t}", "@Override\n\tpublic String getDiType() {\n\t\treturn App.ATZGB_DI_TYPE;\n\t}", "public byte getIProduct() {\r\n\t\treturn iProduct;\r\n\t}", "@Override\r\n\tpublic String getTipo() {\n\t\treturn this.tipo;\r\n\t}", "public interface ModeloProdutoProduto extends DCIObjetoDominio , ModeloProdutoProdutoAgregadoI , ModeloProdutoProdutoDerivadaI\n{\n\n\t\n\tpublic long getIdModeloProdutoProduto();\n\tpublic void setIdModeloProdutoProduto(long valor);\n\t\n\t\n\tpublic long getIdModeloProdutoRa();\n\tpublic void setIdModeloProdutoRa(long valor);\n\t\n\t\n\tpublic long getIdProdutoRa();\n\tpublic void setIdProdutoRa(long valor);\n\t\n\t\n}", "public String getTipo() {\n\t\treturn this.tipo;\n\t}", "public TipoVehiculo getTipoVehiculo() {\r\n\t\treturn TipoVehiculo.valueOf(cb_TipoVehiculo.getSelectedItem().toString());\r\n\t}", "public void setViptype(String viptype) {\n this.viptype = viptype == null ? null : viptype.trim();\n }", "PiEntityType entityType();", "@Override\n public void compraProducto(String nombre, int cantidad) {\n\n }", "public void setTipoPartida( String tipoPartida ) {\n this.tipoPartida = tipoPartida;\n }", "@DISPID(2) //= 0x2. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n short objectType();", "void xsetProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType productType);", "x0401.oecdStandardAuditFileTaxPT1.SAFPTtextTypeMandatoryMax60Car xgetProductCode();", "public String getTipo(){\r\n return Tipo;\r\n }", "public void setTipo(int tipo) {\r\n this.tipo = tipo;\r\n }", "public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}", "public String getProductInstallType();", "private int seleccionarImagenTipo(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"compañia\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"informatica\")){\n return R.drawable.ordenador;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"clases\")){\n return R.drawable.clases;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"menaje/hogar\")){\n return R.drawable.herramientas;\n }\n return 0;\n }", "String getVolume_type();", "static int askProductType() {\n\n int choice; // initialize return variable\n\n choice = Validate.readInt(ASK_PRODUCT_TYPE, 2); // display options to user for products and store result if valid choice\n\n return choice; // return users choice\n }", "public abstract @NotNull String getEquipmentType();", "@Override\n public VheicleType getType() {\n return sedanType;\n }", "public SelectItem[] getTipoInformazioneItems() {\n\t\tSearch<TipoInformazione> ricerca = new Search<TipoInformazione>(\n\t\t\t\tTipoInformazione.class);\n\t\treturn checkItems(ricerca, tipoInformazioniRepository, \"id\", \"nome\",\n\t\t\t\t\"nessun tipo disponibile\", \"seleziona tipo...\");\n\t}", "public GiftCardProductQuery type() {\n startField(\"type\");\n\n return this;\n }", "public String getCarteTypeId() {\n return carteTypeId;\n }", "public String darTipoVehiculo() {\n\t\treturn tipoVehiculo;\n\t}", "public void setIva(int iva) {\n\t\tproducto.setIva(iva);\n\t}", "public ProductType getProductType(String productTypeName){ \n\t if (productTypeName == null) { \n\t return null; \n\t } \n\t if (productTypeName.equalsIgnoreCase(\"PHOTOSET\")) { \n\t return new PhotoSet(); \n\t } \n\t else if (productTypeName.equalsIgnoreCase(\"SINGLECD\")) { \n\t return new SingleCD(); \n\t } \n\t else if (productTypeName.equalsIgnoreCase(\"TWOSHOT\")) { \n\t return new TwoShot(); \n\t } \n\t return null; \n\t}", "public void setTipo(String tipo) {\n\t\tthis.tipo = tipo;\n\t}", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();", "public interface IGoto {\n\n int[] productionIds();\n\n int gotoStateId();\n\n}", "IProductInfo getM_piSelectedItem();", "public String getProductTypeName() {\r\n return productTypeName;\r\n }", "public OreVein(OreType oreType) {\n type = oreType.getType();\n data = oreType.getData();\n amount = oreType.getAmount();\n targetType = oreType.getTargetType();\n }", "public void setTipoEquipo(Long tipoEquipo) {\n\t\tthis.tipoEquipo = tipoEquipo;\n\t}", "OurIfcElementType createOurIfcElementType();", "@Override\r\n\tpublic String getTipoPersona() {\n\t\treturn \"alumno del curso \" + curso + \" de \" + grupo + \" de \" + tipoEstudios ;\r\n\t\t\r\n\t}", "public InvoiceType getInvoiceType()\n {\n return INVOICE_TYPE;\n }", "public ItemType getType();", "public java.lang.String getTipo() {\n return tipo;\n }", "public java.lang.String getTipo() {\n return tipo;\n }", "@Override\r\n\tpublic Tipo getTipo() {\n\t\treturn null;\r\n\t}", "public abstract SoType getTypeId();", "public String productTypeSelected() {\n String productType = \"\";\n rbListAddElement();\n for (int i = 0; i < rbProductType.size(); i++) {\n if (rbProductType.get(i).isSelected()) {\n productType += (rbProductType.get(i).getText());\n System.out.println(\"Selected product type :\" + productType);\n }\n }\n return productType;\n }", "public abstract String getObjectType();", "public interface ProductTypeConstants {\n // 商品类型 1: 网课; 2: 图书\n Integer NETWORK_COURSE = 1;\n Integer BOOK = 2;\n}", "public abstract Product productFactory(String type);", "fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType getType();", "public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }" ]
[ "0.63963705", "0.6282003", "0.61990845", "0.6165504", "0.60893756", "0.6031012", "0.6028247", "0.6016618", "0.5976386", "0.58996767", "0.5896415", "0.5871282", "0.58469456", "0.5829614", "0.58244216", "0.58125466", "0.58125466", "0.57420146", "0.57193524", "0.5706483", "0.56867766", "0.56789327", "0.5649892", "0.56230503", "0.56230503", "0.5619851", "0.5597421", "0.55964994", "0.5562141", "0.5550313", "0.5548419", "0.5544199", "0.5540905", "0.55391306", "0.55391306", "0.55391306", "0.55391306", "0.5537661", "0.5529377", "0.5514024", "0.5509833", "0.55051833", "0.5484264", "0.54833955", "0.5462364", "0.54603547", "0.5442439", "0.544227", "0.54420817", "0.5434632", "0.54147583", "0.5414282", "0.54136443", "0.54109365", "0.54103816", "0.5407174", "0.5406033", "0.54058987", "0.53977525", "0.5397372", "0.5396136", "0.5395731", "0.5386962", "0.5384095", "0.53788435", "0.5376483", "0.5366532", "0.53659064", "0.5358724", "0.53426206", "0.533621", "0.5333835", "0.53266835", "0.532037", "0.53153193", "0.53104174", "0.5301334", "0.5292984", "0.5291011", "0.5277566", "0.5273754", "0.5270679", "0.5268208", "0.5255701", "0.5251966", "0.5247604", "0.52425075", "0.5233928", "0.5231231", "0.52300364", "0.5228595", "0.5228595", "0.5225486", "0.52223253", "0.52201784", "0.52180094", "0.5215737", "0.52096766", "0.5207511", "0.520692" ]
0.5345812
69
Establece el tipo de IVA
private void setIva(IVA iva) throws IvaInvalidoException { if (iva == null) { throw new IvaInvalidoException("El IVA debe ser válido."); } this.iva = iva; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTipoInmueble(Valor tipoInmueble) {\n this.tipoInmueble = tipoInmueble;\n }", "public IVA getIva() {\n return iva;\n }", "public String getViptype() {\n return viptype;\n }", "Object getTipo();", "private int getTipo(String _type) {\n\t\tif (_type.equals(TAG_CELL_TYPE_EMPTY)) {\n\t\t\treturn TAG_C_VUOTA;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_OPTION)) {\n\t\t\treturn TAG_C_SCELTA;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_EFFECT)) {\n\t\t\treturn TAG_C_EFFETTO;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_END)) {\n\t\t\treturn TAG_C_FINALE;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_LOOT)) {\n\t\t\treturn TAG_C_LOOT;\n\t\t}\n\t\tif (_type.equals(TAG_CELL_TYPE_GATE)) {\n\t\t\treturn TAG_C_GATE;\n\t\t}\n\t\treturn TAG_C_VUOTA;\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn \"Pigiste\";\r\n\t}", "@Override\r\n\tpublic String typeV() {\n\t\treturn hio.TyreType();\r\n\t}", "ImageType getType();", "public int getTipo() {\r\n return tipo;\r\n }", "public String getTipo();", "public String getTipo();", "public int getTipo() {\n return tipo;\n }", "@Override\n public VheicleType getType() {\n return sedanType;\n }", "public int getTipoAtaque(){return tipoAtaque;}", "public void setTipo(int tipo) {\r\n this.tipo = tipo;\r\n }", "public int getTipo() {\r\n\t\treturn tipo;\r\n\t}", "public void setTipo(int value) {\n this.tipo = value;\n }", "public void setIva(int iva) {\n\t\tproducto.setIva(iva);\n\t}", "Regione(Terreno tipoTerreno, int ID) {\n\t\tthis.tipoTerreno = tipoTerreno;\n\t\tthis.ID = ID;\n\t\tpecore = new ArrayList<Agnello>();\n\t}", "@Override\n\tpublic String getAiType() {\n\t\treturn App.ATZGB_AI_TYPE;\n\t}", "private void setTipo(int tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public Integer getVatType() {\r\n\t\treturn vatType;\r\n\t}", "@Override\r\n public String toString() {\r\n return tipo;\r\n }", "public void setViptype(String viptype) {\n this.viptype = viptype == null ? null : viptype.trim();\n }", "public void setTipo(String tipo) {\r\n this.tipo = tipo;\r\n }", "void setIVA(float iva);", "public String getTipo(){\r\n return tipo;\r\n }", "public TipoPedina getTipo() {\n return tipo;\n }", "public int getType() // pro rozeznani kdy vyuzit ai\n {\n return this.type;\n }", "public String getTipo() {\r\n return tipo;\r\n }", "public String getTipo() {\r\n return tipo;\r\n }", "public String getTipo(){\n return tipo;\n }", "public String darTipoVehiculo() {\n\t\treturn tipoVehiculo;\n\t}", "public void setTipo(String tipo);", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "public int getType() { return type; }", "public int getType() { return type; }", "public RepositorioAvioes() {\n avioes = new ArrayList<Aviao>();\n }", "public void setTipo(Tipo tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "@Override\n public String toString() {\n return \"IrNivelMedio\";\n }", "public int getType() throws PDFNetException {\n/* 466 */ return GetType(this.a);\n/* */ }", "public String getTipo(){\n\t\treturn this.tipo;\n\t}", "public void setTipoAnexoSRI(String tipoAnexoSRI)\r\n/* 618: */ {\r\n/* 619:687 */ this.tipoAnexoSRI = tipoAnexoSRI;\r\n/* 620: */ }", "public void setTipo(String tipo) {\n\t\tthis.tipo = tipo;\n\t}", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public String getTipoAnexoSRI()\r\n/* 612: */ {\r\n/* 613:676 */ this.tipoAnexoSRI = ParametrosSistema.getTipoAnexoSRI(AppUtil.getOrganizacion().getId());\r\n/* 614:677 */ return this.tipoAnexoSRI;\r\n/* 615: */ }", "@Override\r\n\tpublic String getTipoPersona() {\n\t\treturn \"alumno del curso \" + curso + \" de \" + grupo + \" de \" + tipoEstudios ;\r\n\t\t\r\n\t}", "public abstract String typeIcon();", "public void setTipoEco(String tipoEco) {\n this.tipoEco = tipoEco;\n }", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "public String getTipo() {\n\t\treturn tipo;\n\t}", "@Override\n\tpublic TipoCarne getTipo() {\n\t\treturn hamburguer.getTipo();\n\t}", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getIva() {\n\t\treturn producto.getIva();\n\t}", "public Object getTipo() {\n\t\treturn null;\n\t}", "public void setType(int atype)\n {\n type = atype;\n }", "public TipoVehiculo getTipoVehiculo() {\r\n\t\treturn TipoVehiculo.valueOf(cb_TipoVehiculo.getSelectedItem().toString());\r\n\t}", "@Override\n\tpublic void tipoInteligencia() {\n\t\tSystem.out.println(super.getNome() + \" é um animal \" + ((super.isRacional() == true) ? \"racional.\" : \"irracional.\"));\n\t}", "public void setTipo(String t) {\n\t\tthis.tipo = t;\n\t}", "public String getTipo(){\r\n return Tipo;\r\n }", "public TipoObra(String descripcion) {\n this.descripcion = descripcion;\n\n switch (descripcion) {\n case \"REFORMA\": {\n this.id = 1;\n break;\n }\n case \"CASA\": {\n this.id = 2;\n break;\n }\n case \"EDIFICIO\": {\n this.id = 3;\n break;\n }\n case \"VIAL\": {\n this.id = 4;\n break;\n }\n default : this.id = 0;\n }\n }", "public TypeOffreDTO getVieVia(){\n\t\tvieVia = null;\n\t\tList<TypeOffreDTO> l = getNomenclatureDomainService().getTypesOffre();\n\t\tfor(TypeOffreDTO t : l){\n\t\t\tif(t.getCodeCtrl().equalsIgnoreCase(DonneesStatic.TYPE_OFFRE_CODE_CTRL_VIEVIA)){\n\t\t\t\tvieVia=t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn vieVia;\n\t}", "public int getType() { \n return type; \n }", "public void setType(){\r\n if(rbtnTruncamiento.isSelected()){\r\n interpretador.setTipoValores(1);\r\n in.setTipoValores(1);\r\n }else{\r\n interpretador.setTipoValores(2);\r\n in.setTipoValores(2);\r\n }\r\n getK();\r\n }", "public void setTipo(java.lang.String tipo) {\n this.tipo = tipo;\n }", "public void setTipo(java.lang.String tipo) {\n this.tipo = tipo;\n }", "public int getType(){\n return type;\n }", "public int getType() {\n return type;\n }", "public void setTipo(String x){\r\n tipo = x;\r\n }", "public String getTipo() {\n\t\treturn \"Berlina\";\r\n\t}", "public abstract int getType();", "public abstract int getType();", "public abstract int getType();", "@Override\r\n\tpublic String getTipo() {\n\t\treturn this.tipo;\r\n\t}", "public String getTipo() {\n\t\treturn this.tipo;\n\t}", "private Acao.Tipo getTipo(String tipo) {\n if (tipo.contentEquals(DISPARO.getName())) {\n return DISPARO;\n }\n\n if (tipo.contentEquals(DESCONEXAO.getName())) {\n return DESCONEXAO;\n }\n\n return null;\n }", "public String getAtype() {\n return atype;\n }", "float getIva();", "@Override\r\n\tpublic void setTipo(Tipo t) {\n\t\t\r\n\t}", "public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }", "public void setTipo(Object tipo2) {\n\t\t\n\t}", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "private String getType(){\r\n return type;\r\n }", "@DISPID(2) //= 0x2. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n short objectType();", "public Tarta(int tipo) {\r\n\t\tthis.setTipo(tipo);\r\n\t}", "public void setTipoCasilla(int tipo) {\n\t\ttipoCasella = tipo;\n\t}", "int getType(){\n return type;\n }" ]
[ "0.6442789", "0.63390094", "0.6161444", "0.6157023", "0.60478884", "0.59316033", "0.5931533", "0.5923432", "0.59183687", "0.59140545", "0.59140545", "0.590438", "0.59026694", "0.5898252", "0.58767617", "0.58180124", "0.58015627", "0.5781874", "0.57589066", "0.5749205", "0.5737269", "0.5735099", "0.5732271", "0.5725843", "0.57200706", "0.57157177", "0.5695855", "0.56880087", "0.5684112", "0.5669585", "0.5669585", "0.5646053", "0.56051767", "0.5599545", "0.5589786", "0.55769217", "0.55769217", "0.5573292", "0.5560151", "0.55341357", "0.5526081", "0.551597", "0.551417", "0.55012", "0.5488154", "0.5488154", "0.5488154", "0.5488154", "0.5488154", "0.5488154", "0.5488154", "0.5488154", "0.54754287", "0.54654884", "0.5462404", "0.54595", "0.54590034", "0.54590034", "0.54590034", "0.54590034", "0.5458569", "0.5452582", "0.5452582", "0.5452582", "0.5452582", "0.5452582", "0.5447009", "0.54332066", "0.5425361", "0.5418722", "0.53975046", "0.5389516", "0.5378538", "0.53698945", "0.5364578", "0.536189", "0.5357136", "0.5355582", "0.5355582", "0.5354826", "0.5350277", "0.53460187", "0.53428525", "0.5333489", "0.5333489", "0.5333489", "0.532711", "0.53269756", "0.53240937", "0.53159904", "0.5312059", "0.5291687", "0.5283207", "0.5282173", "0.528177", "0.52813995", "0.52762926", "0.52747947", "0.52745974", "0.52725214" ]
0.58040386
16
Getter precio de compra
public double getPrecioCompra() { return precioCompra; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }", "private prestarComputador obtenerComputador() {\n String d = dFormat.format(TXTFechaDeEntrega.getDate());\n prestarComputador elcomputador = new prestarComputador();\n elcomputador.setFechaDeEntrega(dFormat.format(TXTFechaDeEntrega.getDate()));\n elcomputador.setSerialComputadorDoy(TXTSerialEquipo.getText());\n elcomputador.setIdBibliotecario(TXTIdBibliotecario.getText());\n elcomputador.setIdUsuario(TXTIdUsuario.getText());\n elcomputador.setFechaDePrestamo(TXTFechaDePrestamo.getText());\n return elcomputador;\n }", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public String getAutorizacionCompleto()\r\n/* 184: */ {\r\n/* 185:316 */ return this.establecimiento + \"-\" + this.puntoEmision + \" \" + this.autorizacion;\r\n/* 186: */ }", "public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }", "String getPrecio();", "public int getPrecio(){\n return precio;\n }", "public String getClasz() {\r\n \t\treturn clasz;\r\n \t}", "public abstract java.lang.String getAcma_cierre();", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "public java.lang.String getCodigo(){\n return localCodigo;\n }", "public com.spirit.sri.reoc.Compras getCompras()\r\n {\r\n return this._compras;\r\n }", "String getCmt();", "java.lang.String getCit();", "public CuentaContable getCuentaContableCierre()\r\n/* 98: */ {\r\n/* 99:115 */ return this.cuentaContableCierre;\r\n/* 100: */ }", "public Compte getCompte() {\n\t\treturn compte;\n\t}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public abstract java.lang.String getAcma_valor();", "public Complemento getC() {\n return C;\n }", "public int getCiclo() { return this.ciclo; }", "public String getComentario () {\n return comentario;\n }", "public String getCodaComponent() {\n return codaComponent;\n }", "public IProduto getCodProd();", "public java.lang.String getCodigo_pcom();", "public String getCompMode ()\n {\n return compMode;\n }", "String getCidade();", "public double getClassificacao()\n {\n return this.classificacao;\n }", "public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }", "String getTitolo();", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "public double getPreco();", "public double getPreco();", "Nodo_B getPrimero(){\n return this.primero;\n }", "public int getCodigo_producto() {\n return codigo_producto;\n }", "String getCognome();", "public String getMascara()\r\n/* 287: */ {\r\n/* 288:355 */ if (this.dimensionContable.getMascara() != null) {\r\n/* 289:356 */ if (this.dimensionContable.getDimensionPadre() != null) {\r\n/* 290:358 */ this.mascara = (this.dimensionContable.getDimensionPadre().getCodigo() + this.dimensionContable.getMascara().substring(this.dimensionContable.getDimensionPadre().getCodigo().length()));\r\n/* 291: */ } else {\r\n/* 292:360 */ this.mascara = this.dimensionContable.getMascara();\r\n/* 293: */ }\r\n/* 294: */ }\r\n/* 295:363 */ return this.mascara;\r\n/* 296: */ }", "public String tipoConta() {\n return \"Conta Comum\";\n }", "public abstract java.lang.String getCod_tecnico();", "public String getComentario( )\n\t{\n\t\treturn comentario;\n\t}", "@Override\r\n\tpublic TIPO_COMPONENTE getTipoComponente() {\n\t\treturn TIPO_COMPONENTE.S_PROGETTI_CURRICULARI;\r\n\t}", "public String getC() {\n return c;\n }", "public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "public int getCosto() {\n\t\treturn producto.getCosto();\n\t}", "public java.lang.String getOrigen(){\n return localOrigen;\n }", "public int getBrillo(){\n return brillo;\n }", "String getNombreProducto();", "public long getPlateau()\n {\n return plateau;\n }", "public String getCompoId() {\n\t return compoId;\r\n\t }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "@Override\n public String getModu() {\n return null;\n }", "public abstract String getLibelle();", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "Object getValor();", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public double getPreco(){\n return pagamento.getPreco();\n }", "public int getComienza() {\n\t\treturn comienza;\n\t}", "int getC();", "public String getNombreCompleto();", "int getCp();", "int getCp();", "public Comentarios getCom() {\r\n\t\treturn com;\r\n\t}", "@Override\r\n\tpublic double getPrezzo() {\n\t\treturn prezzo;\r\n\t}", "public int getTipoAtaque(){return tipoAtaque;}", "public String getMaj(){\n return this.major;\n }", "java.lang.String getPrenume();", "public String getCpe() {\n return cpe;\n }", "public PuntoDeVenta getPuntoDeVenta()\r\n/* 140: */ {\r\n/* 141:162 */ return this.puntoDeVenta;\r\n/* 142: */ }", "Object getComparefile();", "public java.lang.String getValor();", "public double getParidadCosto() {\r\n return paridadCosto;\r\n }", "public double getPrecio() {\n return precio;\n }", "public int getModopelea(){return modopelea;}", "@Override\n\tpublic String getCultivos() {\n\t\treturn model.getCultivos();\n\t}", "public String getRazaN(){\n return razaP1.nombre1();\n }", "public double getCapacidadeCarga() {\n return capacidadeCarga;\n }", "public int getEgresosPorCompras(){\n return this.egresosPorCompras;\n }", "public String getCROFM_CODIGO(){\n\t\treturn this.myCrofm_codigo;\n\t}", "public int getOperacion()\r\n/* 22: */ {\r\n/* 23:45 */ return this.operacion;\r\n/* 24: */ }", "public String getCurp(){\r\n return beneficiario[0].toString();\r\n }", "public String getMarca(){\n return marca;\n }", "public String obtenModelo(){\r\n return this.modelo;\r\n }", "public String getCoda2Component() {\n return coda2Component;\n }", "public Integer calcularCosto() {\n return componente.getPrecio() + tipoDeEnvio.calcularCosto(this.componente.getPeso(), cliente.getUbicacion());\n }", "public String getNombreLibro()\n {\n return nombre;\n }", "int getNombreLignesPlateau();", "public CuentaContable getCuentaContable()\r\n/* 78: */ {\r\n/* 79: 99 */ return this.cuentaContable;\r\n/* 80: */ }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public String getPuntoEmision()\r\n/* 124: */ {\r\n/* 125:207 */ return this.puntoEmision;\r\n/* 126: */ }", "public java.lang.String getLibelle(){\r\n return this.libelle;\r\n }", "String getCodiceFiscale();", "public String getLibCompletUeChoisie() {\r\n\t\tif (eoDiplSelected != null) {\r\n\t\t\treturn (String)eoDiplSelected.valueForKey(\"mueCode\")+ \" \" +\r\n\t\t\t(String)eoDiplSelected.valueForKey(\"mueLibelle\");\r\n\t\t}\r\n\t\telse return null;\r\n\t}", "public Integer getCedula() {return cedula;}" ]
[ "0.69318646", "0.68780154", "0.67832434", "0.676848", "0.66431373", "0.65888494", "0.649607", "0.6448788", "0.64306813", "0.641247", "0.6389084", "0.6381059", "0.6378677", "0.63602453", "0.63581103", "0.6352698", "0.6341879", "0.63338715", "0.63205063", "0.62993777", "0.62835675", "0.6257826", "0.6250106", "0.6249536", "0.624804", "0.6242129", "0.6241923", "0.6229745", "0.62073696", "0.61925113", "0.6189265", "0.6189265", "0.6182004", "0.61668795", "0.615967", "0.61512274", "0.61469454", "0.6122182", "0.61127186", "0.6107159", "0.6099812", "0.6099383", "0.60972613", "0.6093925", "0.60884774", "0.6080111", "0.60790414", "0.60745937", "0.60721236", "0.6071453", "0.6071453", "0.6071453", "0.6071453", "0.6071453", "0.6071453", "0.6071453", "0.6071453", "0.60706466", "0.60652477", "0.6059242", "0.6041937", "0.6036332", "0.6031613", "0.6030346", "0.6020079", "0.6016132", "0.601381", "0.601381", "0.60097134", "0.6009211", "0.6007189", "0.60017604", "0.59964854", "0.598297", "0.59809506", "0.598026", "0.5975007", "0.597204", "0.5970193", "0.5969819", "0.5966767", "0.5965034", "0.59641457", "0.59638464", "0.59484136", "0.5945998", "0.59448564", "0.5941494", "0.5939594", "0.59342855", "0.59302056", "0.5924292", "0.5923679", "0.59215176", "0.59207416", "0.59105307", "0.5901847", "0.58995646", "0.5898849", "0.58947027" ]
0.72004986
0
Setter de precio de compra en el que se controla que el precio de compra no sea negativo
private void setPrecioCompra(double precioCompra) throws PrecioCompraNegativoException { if (precioCompra < 0) throw new PrecioCompraNegativoException("El precio de compra no puede ser negativo."); this.precioCompra = precioCompra; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPrecioVenta(double precioVenta) throws PrecioVentaNegativoException {\n if (precioVenta < 0)\n throw new PrecioVentaNegativoException(\"El precio de venta no puede ser negativo.\");\n this.precioVenta = precioVenta;\n }", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public void setPreco(Double preco);", "public void setPrecio(float precio) {\r\n this.precio = precio;\r\n }", "public void setPrecio(int precio) {\r\n\t\tthis.precio = precio;\r\n\t}", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public void setPrecio(double precio) {\n\t\tthis.precio = precio;\n\t}", "public void setPrecio(Double precio) {\n this.precio = precio;\n }", "public void setCantidadCUVErrado(java.math.BigInteger param){\n \n this.localCantidadCUVErrado=param;\n \n\n }", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "@Test\r\n public void testSetPrecio() {\r\n int expResult = 3;\r\n articuloPrueba.setPrecio(expResult);\r\n assertEquals(expResult, articuloPrueba.getPrecio());\r\n }", "public void setCantidadFaltanteAnunciado(java.math.BigInteger param){\n \n this.localCantidadFaltanteAnunciado=param;\n \n\n }", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "public void cambiarPrecio(double precio) {\n\n\t\tif (precio <= 0) {\n\t\t\t\n\t\t\tthrow new Error(\"Precio debe ser mayor a cero\");\n\t\t}\n\t\t\n\t\tif (this.disponibilidad != Disponibilidad.LIBRE) {\n\t\t\t\n\t\t\tthrow new Error(\"Solo se puede cambiar el precio cuando está LIBRE\");\n\t\t}\n\t\tthis.precio = precio;\n\t}", "@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}", "public void setPorcentajeDiscapacidad(BigDecimal porcentajeDiscapacidad)\r\n/* 239: */ {\r\n/* 240:439 */ this.porcentajeDiscapacidad = porcentajeDiscapacidad;\r\n/* 241: */ }", "public void setPrecio(double value) {\n this.precio = value;\n }", "public void setPreco(Float preco) { this.preco = preco; }", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "private void actualizaPremio(){\n\t\tif(botonAp1.isSelected()){\n\t\t\ttipo = 1;\n\t\t\tcoef = modelo.getPartidoApuesta().getCoefLocal();\n\t\t\tpremio.set(apostado.get()*coef);\n\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t}else{\n\t\t\tif(botonApX.isSelected()){\n\t\t\t\ttipo = 0;\n\t\t\t\tcoef = modelo.getPartidoApuesta().getCoefEmpate();\n\t\t\t\tpremio.set(apostado.get()*coef);\n\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t}else{\n\t\t\t\tif(botonAp2.isSelected()){\n\t\t\t\t\ttipo = 2;\n\t\t\t\t\tcoef = modelo.getPartidoApuesta().getCoefVisitante();\n\t\t\t\t\tpremio.set(apostado.get()*coef);\n\t\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t\t}else{\n\t\t\t\t\ttipo = -1;\n\t\t\t\t\tcoef = 0.0;\n\t\t\t\t\tpremio.set(0.0);\n\t\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setMontoPedidoRechazado(double param){\n \n this.localMontoPedidoRechazado=param;\n \n\n }", "public void setPreco(double preco) {\n\t\tthis.preco = preco;\n\t}", "@Override\n\tpublic double perimetro() {\n\t\treturn 0;\n\t}", "private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "private void resetaPadraoEFundo() {\r\n\t\tdiferencaDeFundoATopo = new BigDecimal(0);\r\n\t\t\r\n\t\tif (!isNovoFundo) {\r\n\t\t\tvalorDoFundoAnterior = new BigDecimal(0);\r\n\t\t}\r\n\r\n\t\tvalorDoTopo = new BigDecimal(0);\r\n\t\tultimoFoiTopo = false;\r\n\t\t\r\n\t\tvalorDoFundo = valorCorrente;\r\n\t\tultimoFoiFundo = true;\r\n\t\t\r\n\t\tcorrecaoCorrente = new BigDecimal(0);\r\n\t\tformouPivoDeCompra = false;\r\n\t\tentrouNoRangeDeInicio = false;\r\n\t\testaNoRangeDeLimite = false;\r\n\t\tformadoSegundoTopo = false;\r\n\t\tformadoTopoRelevante = false;\r\n\t\tformouSegundoFundo = false;\r\n\t}", "public void setPrecio(int precio) {\n\t\tthis.producto.setPrecio(precio);\n\t}", "public void setMontoFacturadoSinDescuento(double param){\n \n this.localMontoFacturadoSinDescuento=param;\n \n\n }", "public void prepararPago(){\n pago = (float) 0.00;\n nuevoSaldo = (float) 0.00;\n intereses = (float) 0.00;\n mora = (float) 0.00;\n pagoValido = false;\n }", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "public void setBorneSup() { \n\t\tif(profondeur < ListObjet.size())borneSup = borneInf + ((poids_maximal - poidsActuelle)*ListObjet.get(profondeur).getRapport());\n\t\telse borneSup = borneInf + ((poids_maximal - poidsActuelle)*0);\n\t}", "public double ValidaValor(){\n\t return 0;\n }", "@Test\r\n public void testSetCantidadVendidos() {\r\n int expResult = 5;\r\n articuloPrueba.setCantidadVendidos(expResult);\r\n assertEquals(expResult, articuloPrueba.getCantidadVendidos());\r\n }", "public void setPrezzo (float prezzo) {\r\n\t\tthis.prezzo=prezzo;\r\n\t}", "public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }", "public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }", "@Test\n public void testSetPourcentage() {\n \n assertEquals(0.0,soin3.getPourcentage(),0.01);\n soin3.setPourcentage(0.7);\n assertEquals(0.7,soin3.getPourcentage(),0.01);\n }", "public abstract void setCntPoa(int cntPoa);", "public void vaciarCafetera() {\n\t\tthis.setCantidadActual(0);\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "public void setPredeterminado(boolean predeterminado)\r\n/* 159: */ {\r\n/* 160:274 */ this.predeterminado = predeterminado;\r\n/* 161: */ }", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public void vaciar() {\n\t\tprimero = ultimo = null;\n\t\ttotal = 0;\n\t}", "public void setHasVacuum(boolean value){this.hasVacuum = value;}", "private float compruebaPorcentajeBarra(float porcentajeBarra)\n {\n if(porcentajeBarra<0)\n porcentajeBarra=0;\n return porcentajeBarra;\n }", "private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }", "public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }", "public void setValorCertificado(double p) { this.valorCertificado = p; }", "public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "@Test\n\tpublic void testSetLimitX() {\n\t\tPlateauImpl.setPlateau(\"5 5\");\n\t\tassertEquals(5, PlateauImpl.getLimitX());\n\t\tPlateauImpl.setLimitX(3);\n\t\tassertEquals(3, PlateauImpl.getLimitX());\n\t}", "@Override\r\n\tpublic double porcentajeDelComercio() {\n\t\treturn 0.25;\r\n\t}", "public void setAnio(int p) { this.anio = p; }", "public void setDatossolicitudBfmarcaPreaprobado(int value) {\n this.datossolicitudBfmarcaPreaprobado = value;\n }", "public void mo12203o() {\n this.f10960o = 0;\n }", "public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }", "public void setMontoFacturado(double param){\n \n this.localMontoFacturado=param;\n \n\n }", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "private void restaApostado() {\n\t\tif(apostado.get() >= 1.0) apostado.set(apostado.get() -1.0);\n\t\t\tdiruField.setText(String.format(\"%.2f\", apostado.get()));\n\t\t\tactualizaPremio();\n\t\t\t\n\t}", "public void azzera() { setEnergia(0.0); }", "public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }", "public final void setUnspecified() {_occ.setUnspecified();}", "public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }", "public void setPeso(int peso) {\r\n\t\tif(peso < 0){\r\n\t\t\tSystem.out.println(\"Error peso\");\r\n\t\t}else{\r\n\t\tthis.peso = peso;\r\n\t\t}\r\n\t}", "public int getPrecio(){\n return precio;\n }", "public void llenarCafetera() {\n\t\tthis.setCantidadActual(this.get_capacidadMaxima());\n\t}", "public double getPrecioCompra() {\n return precioCompra;\n }", "public void setPrecioBase(double precioBase) {\r\n this.precioBase = precioBase;\r\n }", "@Test\n\tpublic void testPotencia0() {\n\t\tdouble resultado=Producto.potencia(0, 8);\n\t\tdouble esperado=0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "public void setScoreZero() {\n this.points = 10000;\n }", "public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }", "public boolean aUnPrix() {\n return false;\n }", "public void setMostrarBaseImponible(boolean mostrarBaseImponible)\r\n/* 607: */ {\r\n/* 608:667 */ this.mostrarBaseImponible = mostrarBaseImponible;\r\n/* 609: */ }", "@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}", "public void setPerdu()\n\t{\n\t\tthis.perdu = true;\n\t}", "public void mo12202n() {\n this.f10959n = -1;\n }", "@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}", "@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}", "public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }", "public boolean PilaVacia()\n {\n if(tope == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public void setBSCA_ProfitPriceLimitEntered (BigDecimal BSCA_ProfitPriceLimitEntered);", "public void setPrixDeVente(Produit p){\n\t\tif (p.getNomProduit() == \"50%\") {\n\t\t\tthis.prixDeVente.set(0, this.getPrixDeVenteParProduit(p));\n\t\t}\n\t\telse {\n\t\t\tif (p.getNomProduit() == \"60%\") {\n\t\t\t\tthis.prixDeVente.set(1, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.prixDeVente.set(2, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t}\n\t}", "public void setX(int x ){\n if(x>0){\n this.x=x;\n }\n \n }", "public void coMina(){\n espM=true;\r\n }", "public void setNumeroInicial(int numeroInicial)\r\n/* 185: */ {\r\n/* 186:198 */ this.numeroInicial = numeroInicial;\r\n/* 187: */ }", "@Test\r\n public void testGetPrecio() {\r\n int expResult = 2;\r\n articuloPrueba.setPrecio(expResult);\r\n int result = articuloPrueba.getPrecio();\r\n assertEquals(expResult, result);\r\n }", "public BigDecimal getPorcentajeDiscapacidad()\r\n/* 234: */ {\r\n/* 235:429 */ return this.porcentajeDiscapacidad;\r\n/* 236: */ }", "public void setPriceLimitOld (BigDecimal PriceLimitOld);", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "public void setpremiumcounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, -1).commit();\r\n\t}", "public final void setUnbounded() {_occ.setUnbounded();}", "public void setNota(double nota) {\r\n\t\tthis.nota = nota;\r\n\t}", "public void setPremAmt(BigDecimal premAmt) {\n\t\tthis.premAmt = premAmt;\n\t}", "public final void setZero() {\n \t\n\t\tthis.m00 = 0.0F;\n\t\tthis.m01 = 0.0F;\n\t\tthis.m02 = 0.0F;\n\t\tthis.m10 = 0.0F;\n\t\tthis.m11 = 0.0F;\n\t\tthis.m12 = 0.0F;\n\t\tthis.m20 = 0.0F;\n\t\tthis.m21 = 0.0F;\n\t\tthis.m22 = 0.0F;\n }", "private void notEligibleForRealMin() {\n eligibleForRealMin = false;\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "void setNilWagerMinimum();" ]
[ "0.6504442", "0.64030915", "0.6396143", "0.6387171", "0.637055", "0.6340185", "0.62777066", "0.6238101", "0.6236165", "0.6140335", "0.61284876", "0.6106877", "0.6084995", "0.6077252", "0.60622215", "0.6038498", "0.59814924", "0.59611315", "0.59512174", "0.59377635", "0.5915648", "0.59136784", "0.58946186", "0.589161", "0.5889162", "0.5809465", "0.5808064", "0.58071923", "0.57993853", "0.5789527", "0.57638544", "0.5755594", "0.57544196", "0.57284236", "0.57188666", "0.56989396", "0.5689666", "0.5679526", "0.5670488", "0.5660488", "0.5653463", "0.5649819", "0.564613", "0.5644436", "0.56406116", "0.563245", "0.56308395", "0.560953", "0.56082845", "0.5591853", "0.5588634", "0.5578933", "0.5563078", "0.555794", "0.55570805", "0.5539197", "0.5539123", "0.5535549", "0.5534886", "0.5525974", "0.5523745", "0.55147123", "0.5511695", "0.5499166", "0.54918444", "0.5488096", "0.5486773", "0.5483895", "0.5481762", "0.54772127", "0.54756355", "0.54717344", "0.54704654", "0.5465074", "0.54517096", "0.54504424", "0.5450049", "0.54490936", "0.5444398", "0.54423386", "0.54363376", "0.5430495", "0.54296446", "0.5420729", "0.5420418", "0.5415727", "0.5407806", "0.5404509", "0.5402951", "0.5401772", "0.5395969", "0.5391437", "0.5389791", "0.53827167", "0.53825414", "0.5382111", "0.5380568", "0.53805524", "0.5352463", "0.5349607" ]
0.7443248
0
Getter precio de venta
public double getPrecioVenta() { return precioVenta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPrecio(){\n return precio;\n }", "public int getPesoV() \r\n\t\t{\r\n\t\t\treturn PesoV;\r\n\t\t}", "public double obtenerPrecio() {\n return precio;\n }", "public float getPrecio() {\r\n return precio;\r\n }", "String getPrecio();", "public double getPrecio() {\n return precio;\n }", "public double getPreco(){\n return pagamento.getPreco();\n }", "public Double getPrecio() {\n return precio;\n }", "public Float getPrecio() {\r\n return precio;\r\n }", "public int getPrecio() {\n\t\treturn this.producto.getPrecio();\n\t}", "public double getPrecio() {\n\t\treturn precio;\n\t}", "public double getTotal_Venta() {\n return total_Venta;\n }", "public PuntoDeVenta getPuntoDeVenta()\r\n/* 140: */ {\r\n/* 141:162 */ return this.puntoDeVenta;\r\n/* 142: */ }", "public double getPreco();", "public double getPreco();", "public double obtenerPrecio() {\n\t\t\n\t\treturn this.precio;\n\t}", "public Double getPotencia(){\n return this.valor;\n }", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public Float getPuntuacion( )\n\t{\n\t\treturn puntuacion;\n\t}", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "@Override\n public int getPeso(){\n return(super.getPeso());\n }", "@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}", "public double getValorProduto() {\n return valorProduto;\n }", "public double getPrecioCompra() {\n return precioCompra;\n }", "public double getPeso() {\r\n return peso;\r\n }", "public int getPrecios()\r\n {\r\n for(int i = 0; i < motos.size(); i++)\r\n {\r\n precio_motos += motos.get(i).getCoste();\r\n }\r\n \r\n return precio_motos;\r\n }", "public static Float getPrixTva() {\n return PRIX_TVA;\n }", "public double getPromedio() {\r\n return promedio;\r\n }", "public double getParidadCliente() {\r\n return paridadCliente;\r\n }", "public static int getVelocidade() {\n return velocidade;\n }", "@Override\n public double obtenerVolumen(){\n return (1.0 / 3.0) * c.obtenerArea() * c.obtenerAltura();\n }", "public double getPercepcion(){\n return localPercepcion;\n }", "public double getValorParcela() {\n return valorParcela;\n }", "@Override\r\n\tpublic double getPrezzo() {\n\t\treturn prezzo;\r\n\t}", "public double getProcenatOtkazivanje() {\n return procenatOtkazivanje;\n }", "double getPerimetro(){\n return 2 * 3.14 * raggio;\n }", "public int getIngresosPorVentas(){\n return this.ingresosPorVentas;\n }", "public int getVonalAzonosito()\r\n\t{\r\n\t\treturn vonalAzonosito;\r\n\t}", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public int getCantidadAvenidas();", "public int getValor() {\r\n return valor;\r\n }", "Object getValor();", "public double getPreco() {\n\t\treturn preco;\n\t}", "public int getTamanio(){\r\n return tamanio;\r\n }", "public Double getPrecio(){\n\t\t// Implementar\n\t\tDouble precio = 0.0;\n\t\tfor (Ingrediente ingrediente : ingredientes) {\n\t\t\tprecio+=ingrediente.getPrecio();\n\t\t}\n\t\treturn precio;\n\t}", "public double getMontoCatalogoEstimado(){\n return localMontoCatalogoEstimado;\n }", "public int getValor() {\n return valor;\n }", "public java.lang.Double getPorcentaje() {\n return porcentaje;\n }", "public Double calcularPrecio() {\n double adicion = 0.0;\n\n switch (tipoAlimento) {\n case 'N':\n // Producto Natural\n adicion += 40;\n break;\n\n case 'C':\n // Producto con Conservantes\n adicion += 20;\n break;\n\n default:\n break;\n }\n\n // El peso tambien afecta el precio final del producto\n if (peso >= 0 && peso <= 9) {\n adicion += 6;\n }\n if (peso > 9 && peso <= 16) {\n adicion += 8;\n }\n if (peso > 16) {\n adicion += 20;\n }\n\n return precioBase + adicion;\n }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public double getParidadCosto() {\r\n return paridadCosto;\r\n }", "public int getVelocidadBala() {\n return velocidadBala;\n }", "public double getMontoDescuento(){\n return localMontoDescuento;\n }", "public double getMontoFacturado(){\n return localMontoFacturado;\n }", "public double obtValor() {\r\n\t\treturn v;\r\n\t}", "public int getValor() {\n return Valor;\n }", "@Override\r\n\tpublic double getVET() {\r\n\t\treturn getTMB() * getFatorAtividadeFisica();\r\n\t}", "public double getMontoPedidoRechazado(){\n return localMontoPedidoRechazado;\n }", "public double getVega() {\r\n return vega;\r\n }", "public double getPreco() {\n\t\treturn this.preco;\n\t}", "public double getMontoFacturadoSinDescuento(){\n return localMontoFacturadoSinDescuento;\n }", "@Override\n\tpublic float getPrecio() {\n\t\treturn 60.2f;\n\t}", "double getPerimetro();", "public int pontuacao() {\n\t\treturn this.pontuacao;\n\t}", "public Float getPreco() { return this.preco; }", "public Double getValor() {\n return valor;\n }", "public double getMontoSolicitado(){\n return localMontoSolicitado;\n }", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public String getVigencia() { return this.vigencia; }", "public double getPrecioBase() {\r\n return precioBase;\r\n }", "public float getPrezzoTotale() {\n return prezzoTotale;\n }", "public int getPesoA() \r\n\t\t{\r\n\t\t\treturn PesoA;\r\n\t\t}", "public double getCapacidadeCarga() {\n return capacidadeCarga;\n }", "public Number getPesocont()\n {\n return (Number)getAttributeInternal(PESOCONT);\n }", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "public int getminutoStamina(){\n return tiempoReal;\n }", "public String getFecha_Venta() {\n return fecha_Venta;\n }", "public int getQuantidade();", "public double getPeso() {\n\t\treturn this.peso;\n\t}", "public int getProfundidad() {\n return this.profundidad;\n }", "public String getPeso() {\r\n return peso;\r\n }", "public Integer getDistanciaVivienda() {\n return distanciaVivienda;\n }", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public int getPresencaPolicial() {\n return presencaPolicial;\n }", "public BigDecimal getPorcentajeDiscapacidad()\r\n/* 234: */ {\r\n/* 235:429 */ return this.porcentajeDiscapacidad;\r\n/* 236: */ }", "public java.lang.Integer getValor_servicio() {\n return valor_servicio;\n }", "public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}", "double getDiametro(){\n return raggio * 2;\n }", "public java.math.BigInteger getCantidadCUVErrado(){\n return localCantidadCUVErrado;\n }", "public int getCosto() {\n\t\treturn producto.getCosto();\n\t}", "public int getAptitud() {\n\treturn aptitud;\n }", "public int getPantallaActual() {\r\n return this.iPantallaActual;\r\n }", "public ValoresCalculo getValorCalculo()\r\n/* 88: */ {\r\n/* 89:107 */ return this.valorCalculo;\r\n/* 90: */ }", "public double getValorCliente() {\r\n return valorCliente;\r\n }", "public double getMontoEstimado(){\n return localMontoEstimado;\n }", "public double getClassificacao()\n {\n return this.classificacao;\n }", "public double getFxSpotCliente() {\r\n return fxSpotCliente;\r\n }", "public java.lang.String getValor();", "@Column(name=\"ValorCota\")\n\tpublic BigDecimal getValorCota() {\n\t\treturn valorCota;\n\t}", "@Override\r\n\tpublic double getPesoTeorico() {\r\n\r\n\t\treturn anamnese.getAltura() * anamnese.getAltura() * 22.0;\r\n\t}" ]
[ "0.82927346", "0.7791202", "0.77598745", "0.7741481", "0.7699125", "0.7676923", "0.7633457", "0.7584889", "0.7536277", "0.7511841", "0.74501204", "0.7443947", "0.7440363", "0.73855793", "0.73855793", "0.7351199", "0.73133975", "0.7110491", "0.70996696", "0.7091167", "0.70793664", "0.7043433", "0.7032174", "0.70269", "0.7020509", "0.6973378", "0.6958422", "0.6939654", "0.6938147", "0.69244957", "0.6920333", "0.69162834", "0.69152766", "0.69035876", "0.68922454", "0.6891901", "0.68875736", "0.688609", "0.68804735", "0.68644994", "0.6856426", "0.68519926", "0.68432903", "0.6843235", "0.6841915", "0.6837011", "0.68351364", "0.68304145", "0.6830015", "0.68263507", "0.680725", "0.68068695", "0.68025506", "0.68005604", "0.67782766", "0.6776445", "0.6771498", "0.67690533", "0.6766124", "0.67647463", "0.6762517", "0.6756938", "0.67542654", "0.67454916", "0.6731725", "0.67271245", "0.67194426", "0.6715796", "0.67117095", "0.6708414", "0.6693918", "0.6692494", "0.66758275", "0.66697353", "0.664924", "0.6637143", "0.66337484", "0.6632818", "0.6620186", "0.6619245", "0.66183835", "0.66177315", "0.6616929", "0.6612163", "0.6610775", "0.6609069", "0.6604156", "0.65759605", "0.6575401", "0.65716046", "0.6569798", "0.656743", "0.65647984", "0.6558222", "0.65542465", "0.6546919", "0.65453106", "0.6536962", "0.65336007", "0.6532848" ]
0.8608808
0
Setter precio de venta en el que se controla que el precio de venta no sea negativo
private void setPrecioVenta(double precioVenta) throws PrecioVentaNegativoException { if (precioVenta < 0) throw new PrecioVentaNegativoException("El precio de venta no puede ser negativo."); this.precioVenta = precioVenta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrecio(float precio) {\r\n this.precio = precio;\r\n }", "public void setPrecio(int precio) {\r\n\t\tthis.precio = precio;\r\n\t}", "private void setPrecioCompra(double precioCompra) throws PrecioCompraNegativoException {\n if (precioCompra < 0)\n throw new PrecioCompraNegativoException(\"El precio de compra no puede ser negativo.\");\n this.precioCompra = precioCompra;\n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public void setPrecio(Double precio) {\n this.precio = precio;\n }", "public void setPrecio(double precio) {\n\t\tthis.precio = precio;\n\t}", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}", "public void setPreco(Double preco);", "public void setPrecio(double value) {\n this.precio = value;\n }", "public void setPorcentajeDiscapacidad(BigDecimal porcentajeDiscapacidad)\r\n/* 239: */ {\r\n/* 240:439 */ this.porcentajeDiscapacidad = porcentajeDiscapacidad;\r\n/* 241: */ }", "public void setPrecio(int precio) {\n\t\tthis.producto.setPrecio(precio);\n\t}", "public boolean PilaVacia()\n {\n if(tope == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "@Test\r\n public void testSetPrecio() {\r\n int expResult = 3;\r\n articuloPrueba.setPrecio(expResult);\r\n assertEquals(expResult, articuloPrueba.getPrecio());\r\n }", "public void prepararPago(){\n pago = (float) 0.00;\n nuevoSaldo = (float) 0.00;\n intereses = (float) 0.00;\n mora = (float) 0.00;\n pagoValido = false;\n }", "public double ValidaValor(){\n\t return 0;\n }", "@Override\n\tpublic double perimetro() {\n\t\treturn 0;\n\t}", "public void setPreco(Float preco) { this.preco = preco; }", "public void setCantidadFaltanteAnunciado(java.math.BigInteger param){\n \n this.localCantidadFaltanteAnunciado=param;\n \n\n }", "public void setNota(double nota) {\r\n\t\tthis.nota = nota;\r\n\t}", "public void setCantidadCUVErrado(java.math.BigInteger param){\n \n this.localCantidadCUVErrado=param;\n \n\n }", "@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }", "public void vaciarCafetera() {\n\t\tthis.setCantidadActual(0);\n\t}", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "@Override\n\tprotected double calcularImpuestoVehiculo() {\n\t\treturn this.getValor() * 0.003;\n\t}", "public void setPrixDeVente(Produit p){\n\t\tif (p.getNomProduit() == \"50%\") {\n\t\t\tthis.prixDeVente.set(0, this.getPrixDeVenteParProduit(p));\n\t\t}\n\t\telse {\n\t\t\tif (p.getNomProduit() == \"60%\") {\n\t\t\t\tthis.prixDeVente.set(1, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.prixDeVente.set(2, this.getPrixDeVenteParProduit(p));\n\t\t\t}\n\t\t}\n\t}", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public void setPeso(int peso) {\r\n\t\tif(peso < 0){\r\n\t\t\tSystem.out.println(\"Error peso\");\r\n\t\t}else{\r\n\t\tthis.peso = peso;\r\n\t\t}\r\n\t}", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "private void resetaPadraoEFundo() {\r\n\t\tdiferencaDeFundoATopo = new BigDecimal(0);\r\n\t\t\r\n\t\tif (!isNovoFundo) {\r\n\t\t\tvalorDoFundoAnterior = new BigDecimal(0);\r\n\t\t}\r\n\r\n\t\tvalorDoTopo = new BigDecimal(0);\r\n\t\tultimoFoiTopo = false;\r\n\t\t\r\n\t\tvalorDoFundo = valorCorrente;\r\n\t\tultimoFoiFundo = true;\r\n\t\t\r\n\t\tcorrecaoCorrente = new BigDecimal(0);\r\n\t\tformouPivoDeCompra = false;\r\n\t\tentrouNoRangeDeInicio = false;\r\n\t\testaNoRangeDeLimite = false;\r\n\t\tformadoSegundoTopo = false;\r\n\t\tformadoTopoRelevante = false;\r\n\t\tformouSegundoFundo = false;\r\n\t}", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public void cambiarPrecio(double precio) {\n\n\t\tif (precio <= 0) {\n\t\t\t\n\t\t\tthrow new Error(\"Precio debe ser mayor a cero\");\n\t\t}\n\t\t\n\t\tif (this.disponibilidad != Disponibilidad.LIBRE) {\n\t\t\t\n\t\t\tthrow new Error(\"Solo se puede cambiar el precio cuando está LIBRE\");\n\t\t}\n\t\tthis.precio = precio;\n\t}", "@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}", "public void vaciar() {\n\t\tprimero = ultimo = null;\n\t\ttotal = 0;\n\t}", "public void setMontoPedidoRechazado(double param){\n \n this.localMontoPedidoRechazado=param;\n \n\n }", "@Test\r\n public void testSetCantidadVendidos() {\r\n int expResult = 5;\r\n articuloPrueba.setCantidadVendidos(expResult);\r\n assertEquals(expResult, articuloPrueba.getCantidadVendidos());\r\n }", "public void setPuntuacion( Float puntuacion )\n\t{\n\t\tthis.puntuacion = puntuacion;\n\t}", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "public void izbaciElementeSaDecimalnimZarezom() {\n while (prvi != null && (int)prvi.info != prvi.info) {\n prvi = prvi.veza;\n }\n if (prvi != null) {\n Element tekuci = prvi;\n Element prethodni;\n while (tekuci.veza != null) {\n prethodni = tekuci;\n tekuci = tekuci.veza;\n if ((int)tekuci.info != tekuci.info) {\n prethodni.veza = tekuci.veza;\n tekuci = prethodni;\n }\n }\n }\n }", "private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }", "private void actualizaPremio(){\n\t\tif(botonAp1.isSelected()){\n\t\t\ttipo = 1;\n\t\t\tcoef = modelo.getPartidoApuesta().getCoefLocal();\n\t\t\tpremio.set(apostado.get()*coef);\n\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t}else{\n\t\t\tif(botonApX.isSelected()){\n\t\t\t\ttipo = 0;\n\t\t\t\tcoef = modelo.getPartidoApuesta().getCoefEmpate();\n\t\t\t\tpremio.set(apostado.get()*coef);\n\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t}else{\n\t\t\t\tif(botonAp2.isSelected()){\n\t\t\t\t\ttipo = 2;\n\t\t\t\t\tcoef = modelo.getPartidoApuesta().getCoefVisitante();\n\t\t\t\t\tpremio.set(apostado.get()*coef);\n\t\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t\t}else{\n\t\t\t\t\ttipo = -1;\n\t\t\t\t\tcoef = 0.0;\n\t\t\t\t\tpremio.set(0.0);\n\t\t\t\t\tpremioLabel.setText(String.format(\"%.2f\", premio.get()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setPrezzo (float prezzo) {\r\n\t\tthis.prezzo=prezzo;\r\n\t}", "private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }", "public void setMontoFacturadoSinDescuento(double param){\n \n this.localMontoFacturadoSinDescuento=param;\n \n\n }", "public void setScoreZero() {\n this.points = 10000;\n }", "@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}", "public long setAmountNeg() {\n return -amount;\n }", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }", "public void setValorCertificado(double p) { this.valorCertificado = p; }", "public double getPrecioVenta() {\n return precioVenta;\n }", "public int getPrecio(){\n return precio;\n }", "@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}", "public void pagar(int precio){\r\n this.dinero -=precio;\r\n }", "public void setPreco(double preco) {\n\t\tthis.preco = preco;\n\t}", "private void restaApostado() {\n\t\tif(apostado.get() >= 1.0) apostado.set(apostado.get() -1.0);\n\t\t\tdiruField.setText(String.format(\"%.2f\", apostado.get()));\n\t\t\tactualizaPremio();\n\t\t\t\n\t}", "@Test\n public void testSetPourcentage() {\n \n assertEquals(0.0,soin3.getPourcentage(),0.01);\n soin3.setPourcentage(0.7);\n assertEquals(0.7,soin3.getPourcentage(),0.01);\n }", "public abstract void setCntPoa(int cntPoa);", "void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }", "public final void setPointsDeVie(final int pv) {\n this.pointsDeVie = pv;\n }", "public boolean PilaVacia() {\r\n return UltimoValorIngresado == null;\r\n }", "public boolean esPositivo() {\n\t\treturn !esNegativo();\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }", "public void setPorcentaje(java.lang.Double porcentaje) {\n this.porcentaje = porcentaje;\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "@Override\n\tpublic double netoAnual(double precio) {\n\t\treturn this.precio * 12;\n\t}", "public void cambiarPrecio(Float porcent) {\r\n\t\tmodelo.cambiarPrecio(porcent);\r\n\t}", "public void setCantidad(int cantidad) {\n\t\tif(cantidad>=0) {\n\t\t\tthis.cantidad = cantidad;\n\t\t}else {\n\t\t\tthis.cantidad = 0;\n\t\t}\n\t}", "public void setPesoV(int pesoV) \r\n\t\t{\r\n\t\t\tPesoV = pesoV;\r\n\t\t}", "public void defValor(double v) {\r\n\t\tthis.v = v;\r\n\t}", "@Test\n\tpublic void testPotencia0() {\n\t\tdouble resultado=Producto.potencia(0, 8);\n\t\tdouble esperado=0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "public Piso(boolean vacio) {\n\t\tthis.id=-1;\n\t\tthis.zona = \"1\";\n\t\tthis.direccion = \"\";\n\t\tthis.banos = 0;\n\t\tthis.habitaciones = 0;\n\t\tthis.permite_mascotas = false;\n\t\tthis.aire_acondicionado = false;\n\t\tthis.amueblado = false;\n\t\tthis.piscina = false;\n\t\tthis.ascensor = false;\n\t\tthis.gimnasio = false;\n\t\tthis.precio_venta = 0;\n\t\tthis.img_url = \"\";\n\t}", "public double oppervlakte() {\n return 0.0;\n }", "@Test\n\tvoid calcularSalarioSinVentasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Hiromu Arakawa\", \"p24\", 400000, 0);\n\t\tdouble salarioEsperado = 400000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public BigDecimal getPorcentajeDiscapacidad()\r\n/* 234: */ {\r\n/* 235:429 */ return this.porcentajeDiscapacidad;\r\n/* 236: */ }", "@Override\r\n\tpublic double recargoImpuesto() {\n\t\treturn 0.03;\r\n\t}", "public void azzera() { setEnergia(0.0); }", "public void setProcenatOtkazivanje(double value) {\n this.procenatOtkazivanje = value;\n }", "@Test\n\tpublic void testDeveFalharAtualizarUmDocumentoDoBanco() {\n\t\tdouble d = documentoDao.updateDocumento(deveFalharAlterarDocumentoExistente());\n\t\tAssert.assertEquals(0, d, 0.0001);\t\n\t}", "public void setBorneSup() { \n\t\tif(profondeur < ListObjet.size())borneSup = borneInf + ((poids_maximal - poidsActuelle)*ListObjet.get(profondeur).getRapport());\n\t\telse borneSup = borneInf + ((poids_maximal - poidsActuelle)*0);\n\t}", "public void setCantidad(int value) {\n this.cantidad = value;\n }", "public void setPrice(double price) {\n this.price = price;\n if (this.price < 0) {\n this.price = 0;\n }\n }", "public void setMontoFacturado(double param){\n \n this.localMontoFacturado=param;\n \n\n }", "public boolean aUnPrix() {\n return false;\n }", "@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}", "public void setPeso(int peso) {\r\n this.peso = peso;\r\n }", "public void setPriceLimitOld (BigDecimal PriceLimitOld);", "public void setHasVacuum(boolean value){this.hasVacuum = value;}", "public float getPrecio() {\r\n return precio;\r\n }", "void setDiscount(float sconto);", "@Override\r\n\tpublic double porcentajeDelComercio() {\n\t\treturn 0.25;\r\n\t}", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "public void resetValor();", "public void SetNoPasajeros(int nopasajeros) {\n\t\ttry {\n\t\t\tthis.NoPasajeros=nopasajeros;\n\t\t} catch (NumberFormatException e) {\n\t\t\tthis.NoPasajeros=0;\n\t\t}\n\t}", "public void setAnio(int p) { this.anio = p; }" ]
[ "0.6815965", "0.6732846", "0.6708984", "0.661247", "0.6589082", "0.6550953", "0.6485617", "0.6352273", "0.6329473", "0.6311042", "0.6239513", "0.6227922", "0.6174822", "0.6145231", "0.612736", "0.6122811", "0.6113451", "0.61097246", "0.61044747", "0.610133", "0.60939026", "0.60888475", "0.60816467", "0.60231376", "0.6011894", "0.6007658", "0.599005", "0.5974154", "0.5970608", "0.59685844", "0.5953101", "0.59348524", "0.5915386", "0.59139186", "0.5911215", "0.59109426", "0.58974475", "0.5883203", "0.5867418", "0.5858501", "0.5855533", "0.58503693", "0.58458394", "0.5824076", "0.5820882", "0.5808118", "0.5806885", "0.58049095", "0.58042365", "0.57717603", "0.57636535", "0.5748794", "0.57459575", "0.5745405", "0.5743501", "0.5735114", "0.5725088", "0.5724463", "0.5718661", "0.5717199", "0.5715418", "0.5709984", "0.5708333", "0.57067686", "0.5703627", "0.569623", "0.5694109", "0.5690817", "0.5690593", "0.56821245", "0.56803286", "0.5680052", "0.56767374", "0.5668985", "0.56660694", "0.56491673", "0.5646882", "0.56333673", "0.5631207", "0.56253743", "0.56252974", "0.5613397", "0.56063914", "0.56042457", "0.56013083", "0.55962104", "0.5590632", "0.5587189", "0.5575343", "0.557468", "0.55699956", "0.5561554", "0.5561161", "0.55280495", "0.5514393", "0.551221", "0.5508954", "0.5507971", "0.5506435", "0.5504359" ]
0.7751366
0
Setter de stock en el que se controla que el stock no sea negativo
private void setStock(int stock) throws StockNegativoException { if (stock < 0) throw new StockNegativoException("El stock no puede ser negativo."); this.stock = stock; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(Integer stock) {\n this.stock = stock;\n }", "public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }", "public void setStock(int stock) {\n\t\tthis.stock = stock;\n\t}", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "private void copyStock(OwnedStock stock){\n\t\t//If quantity == 0, then \n\t\tif(stock.getQuantityOfShares() > 0){\n\t\t\tsetQuantityOfShares(stock.getQuantityOfShares());\n\t\t\tsetPrinciple(stock.getPrinciple());\n\t\t\tsetTotalValue(stock.getTotalValue());\n\t\t\tsetNet(stock.getNet());\n\t\t}\n\t\telse{\n\t\t\tprinciple = new BigDecimal(0);\n\t\t\ttotalValue = new BigDecimal(0);\n\t\t\tnet = new BigDecimal(0);\n\t\t}\n\t}", "public void setLowStock(boolean lowStock)\r\n\t{\r\n\t\tthis.lowStock = lowStock;\r\n\t\tif(this.lowStock)\r\n\t\t{\r\n\t\t\tnotifyObserver();\r\n\t\t}\r\n\t}", "public abstract void setstockNumber();", "private void setStock(String stockIn) throws InvalidDataException {\n\t\tif (stockIn == null || stockIn.isEmpty()) throw new InvalidDataException(\"The stock cannot be null.\");\n\t\tstock = stockIn;\n\t}", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "@Test(expected = NegativeValueException.class)\n public void setProductPriceIsNegative() throws NegativeValueException {\n cartItem.setProductPrice(-36);\n }", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "public void setStock_num(Integer stock_num) {\n this.stock_num = stock_num;\n }", "public void setMaximumStock (double maximumStock) {\r\n\t\tthis.maximumStock = maximumStock;\r\n\t}", "@Override\n\tpublic double getStockPrice(String stockName) {\n\t\treturn 0;\n\t}", "public Integer getStock() {\n return stock;\n }", "@Override\n\tpublic Stock getStock() {\n\t\treturn null;\n\t}", "public int getStock() {\n return stock;\n }", "public DefaultOwnedStock(Stock stock) {\n\t\tsuper(stock);\n\t\tif(stock instanceof OwnedStock){\n\t\t\tcopyStock((OwnedStock) stock);\n\t\t}\n\t\telse{\n\t\t\tprinciple = new BigDecimal(0);\n\t\t\ttotalValue = new BigDecimal(0);\n\t\t\tnet = new BigDecimal(0);\n\t\t}\n\t}", "public void setMinimumStock (double minimumStock) {\r\n\t\tthis.minimumStock = minimumStock;\r\n\t}", "public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}", "void stockPriceChanged(Stock stock, double oldValue, double newValue);", "@Test\n public void setProductPriceIs0() throws NegativeValueException {\n cartItem.setProductPrice(0);\n double expected = 0;\n double actual = cartItem.getProductPrice();\n assertEquals(expected, actual, 0.0);\n }", "public void resetAmountSold() { amountSold = 0; }", "public void setVoid_Inventory_ID (int Void_Inventory_ID)\n{\nif (Void_Inventory_ID <= 0) set_Value (\"Void_Inventory_ID\", null);\n else \nset_Value (\"Void_Inventory_ID\", new Integer(Void_Inventory_ID));\n}", "@Test\n public void setProductPrice() throws NegativeValueException {\n cartItem.setProductPrice(536);\n double expected = 536;\n double actual = cartItem.getProductPrice();\n assertEquals(expected, actual, 0.0);\n }", "@Override\r\n\tpublic MvtStock AjouterEnStock(MvtStock mvtStock) {\n\t\tif (mvtStock.getTypeMvt() == 0) {\r\n\t\t\tthrow new RuntimeException(\"Veillez cocher l'operation à faire\");\r\n\t\t}\r\n\t\treturn mv.save(mvtStock);\r\n\t}", "@Test(expected = NegativeValueException.class)\n public void setTotalIsNegative() throws NegativeValueException {\n cartItem.setTotal(-5);\n }", "public void Entrada(int cantidad) {\n if(cantidad*-1>this.stock) {\n System.out.println(\"La cantidad a retirar es mayor que la que hay en stock, no es posible hacer la operacion.\");\n }else {\n this.stock+=cantidad;\n }\n }", "@Test(expected = NegativeValueException.class)\n public void setProductCountIsNegative() throws NegativeValueException {\n cartItem.setProductCount(-5);\n }", "public long setAmountNeg() {\n return -amount;\n }", "public void setStock_flag ( String stock_flag ) { this.stock_flag = stock_flag ; }", "public int getStock() {\n\t\treturn stock;\n\t}", "void unsetValueQuantity();", "public void setStockNumber(Integer stockNumber) {\n this.stockNumber = stockNumber;\n }", "@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }", "public void setStockPrice(double stockPrice) {\n\t\tthis.stockPrice = stockPrice;\n\t}", "@Override\n\tpublic int getStock() {\n\t\treturn 2;\n\t}", "public double getMaximumStock () {\r\n\t\treturn maximumStock;\r\n\t}", "@Test\n public void setTotalIs0() throws NegativeValueException {\n cartItem.setTotal(0);\n double expected = 0;\n double actual = cartItem.getTotal();\n assertEquals(expected, actual, 0.0);\n }", "public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}", "public void setStock_price(BigDecimal stock_price) {\n this.stock_price = stock_price;\n }", "public DefaultOwnedStock(String symbol){\n\t\tsuper(symbol);\n\t\tprinciple = new BigDecimal(0);\n\t\ttotalValue = new BigDecimal(0);\n\t\tnet = new BigDecimal(0);\n\t}", "public void setStockCode(Integer stockCode) {\r\n this.stockCode = stockCode;\r\n }", "public Integer getStockNumber() {\n return stockNumber;\n }", "public String getStock() {\n return stock;\n }", "public String getStock() {\n return stock;\n }", "public Integer getStock_num() {\n return stock_num;\n }", "public boolean aUnPrix() {\n return false;\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 double getMinimumStock () {\r\n\t\treturn minimumStock;\r\n\t}", "public void setIsFixPrice (String IsFixPrice);", "public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\t}", "@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }", "public boolean inStock() {\n return inStock;\n }", "public void setGrossSales(double grossSales) {\n if (grossSales < 0.0) { // validate\n throw new IllegalArgumentException(\"Gross sales must be >= 0.0\");\n }\n\n this.grossSales = grossSales;\n}", "private String getStock() {\n\t\treturn stock;\n\t}", "void setRemainingVolume(int newRemainingVolume) throws Exception;", "private void actualizarStock(String codBarras) throws SQLException {\n\n }", "public boolean actualizarStock(Pieza p, int cantidad) {\n\t\tboolean resultado = false;\n\t\ttry {\n\t\t\tXPathQueryService consulta = (XPathQueryService)\n\t\t\t\t\tcol.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tconsulta.query(\"update replace /piezas/pieza[@codigo='\"+ p.getCodigo()+\n\t\t\t\t\t\"']/stock with <stock>\" + \n\t\t\t\t\t(p.getStock()-cantidad) +\"</stock>\");\n\t\t\tresultado = true;\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public void setLow(double value){low = value;}", "@Override\n\tpublic boolean updateShopCartMoney(double price) {\n\t\treturn false;\n\t}", "private void decreaseStock() {\n\t\tint decreaseBy; // declares decreaseBy\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the card you wish to edit:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if the card with the inputed ID exists\n\t\tSystem.out.println(\"Please enter the amount you wish to decrease the stock by (Note: This should be a positive number):\");\n\t\tdecreaseBy = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(decreaseBy <= 0) { //checks to see is decrease by is negative\n\t\t\tSystem.out.println(\"Error! You must decrease the stock by 1 or more\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tif(inventoryObject.quantitySize(sic_idHolder) - decreaseBy < 0 ) { // checks to see if the current quantity minus decreasedBy is negative\n\t\t\tSystem.out.println(\"Error. Quantity can not be reduced to a negative number\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tinventoryObject.decreaseStock(sic_idHolder, decreaseBy); // calls decreaseStock in InventoryManagement\n\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"There are no cards with the ID you entered\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\n\tpublic Integer updateQtyForFrozen(InvBaseStock baseStock) {\n\t\treturn invBaseStockDao.updateQtyForFrozen(baseStock);\n\t}", "void setMinValue();", "@Override\n public void onCheckStocksRaised() {\n if (coffeeStock <= 0) {\n coffeeButton.setEnabled(false);\n }\n if (espressoStock <= 0) {\n espressoButton.setEnabled(false);\n }\n if (teaStock <= 0) {\n teaButton.setEnabled(false);\n }\n if (soupStock <= 0) {\n soupButton.setEnabled(false);\n }\n if (icedTeaStock <= 0) {\n icedTeaButton.setEnabled(false);\n }\n if (syrupStock <= 0) {\n optionSugar.setEnabled(false);\n }\n if (vanillaStock <= 0) {\n optionIceCream.setEnabled(false);\n }\n if (milkStock <= 0) {\n optionMilk.setEnabled(false);\n }\n if (breadStock <= 0) {\n optionBread.setEnabled(false);\n }\n if (sugarStock <= 4) {\n sugarSlider.setMaximum(sugarStock);\n }\n }", "private void setTotalValueAndNet(){\n\t\tBigDecimal currentPrice = getCurrentPrice(); //getCurrentPrice() is synchronized already\n\t\tsynchronized(this){\n\t\t\t//If quantity == 0, then there's no total value or net\n\t\t\tif(quantityOfShares > 0){\n\t\t\t\ttotalValue = currentPrice.multiply(new BigDecimal(quantityOfShares));\n\t\t\t\tnet = totalValue.subtract(principle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttotalValue = new BigDecimal(0);\n\t\t\t\tnet = new BigDecimal(0);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void setTotal() throws NegativeValueException {\n cartItem.setTotal(45);\n double expected = 45;\n double actual = cartItem.getTotal();\n assertEquals(expected, actual, 0.0);\n }", "public void setPriceLimitOld (BigDecimal PriceLimitOld);", "public void onStockpriceChanged();", "public void resetSaleAndCostTracking() {\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the beanBag object at the current position is \"isSold\" bool is true.\r\n if (((BeanBag) stockList.get(i)).isSold()) {\r\n // Remove beanBag object at that position from the \"stockList\".\r\n stockList.remove(i);\r\n }\r\n }\r\n }", "public void markUnsold(){\n\n myMaxRejectCountCount--;\n }", "void setPrice(double price) throws NegativeNumberException {\n if (price <= 0) {\n throw new NegativeNumberException(\"Negative number.Try again.\");\n }\n this.price = price;\n }", "public void buyFarm(){\n bought = !bought;\n }", "public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }", "public void setNegative(boolean negative) {\n this.negative = negative;\n }", "public void setPrice(double price){\r\n Random chance = new Random();\r\n int crashChance = chance.nextInt(100);\r\n double droppedPrice = price * ThreadLocalRandom.current().nextDouble(0.6, 0.8);\r\n if (crashChance > 95) {\r\n setPlusMinus(\"Down\");\r\n System.out.println(\"This stock has crashed.\");\r\n super.setPrice(price - droppedPrice);\r\n } else if(crashChance < 5){\r\n setPlusMinus(\"Up\");\r\n System.out.println(\"This stock has surged.\");\r\n super.setPrice(price + droppedPrice);\r\n } else {\r\n super.setPrice(price);\r\n }\r\n }", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "public void Restock() {\n for (Ingredient ingredient : stock.keySet()) {\n stock.put(ingredient, inventoryMax);\n }\n }", "public void setPrice(double price) {\n this.price = price;\n if (this.price < 0) {\n this.price = 0;\n }\n }", "DefaultOwnedStock(){\n\t\tsuper(\"\");\n\t\tprinciple = new BigDecimal(0);\n\t\ttotalValue = new BigDecimal(0);\n\t\tnet = new BigDecimal(0);\n\t}", "public void setPriceStdOld (BigDecimal PriceStdOld);", "private void resetAvailable(Roll roll){\n\t\tStock replacementStock = new Stock(roll, inventoryLevel);\n\n\t\tint i;\n\t\tint listSize = inventory.size();\n\t\tRoll temp;\n\t\tString rollType = roll.getType();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(inventory.get(i).getRoll().getType().equals(rollType)){\n\t\t\t\tinventory.set(i,replacementStock);\n\t\t\t}\n\t\t}\n\t}", "public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n _stocks.put(x, _stocks.get(x) - 1);\n }\n _money += x.getPrice();\n x.gain();\n break;\n } else {\n _happy = true;\n }\n }\n }", "public void setStock_update(String stock_update) {\n this.stock_update = stock_update;\n }", "@Override\n\t\t\tpublic double getPrice() {\n\t\t\t\treturn 0;\n\t\t\t}", "public void changepay(){\n pay = !pay;\n }", "public void setIsSetPriceStd (boolean IsSetPriceStd);", "public void changeChecker()\n {\n\tif (pennies < 0 || nickels < 0 || dimes < 0 || quarters < 0)\n\t throw new IllegalArgumentException();\t// no negative amounts\n }", "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getIndex(game.getHighestSharePriceStock())) + numShares);\n player.setFunds(-numShares*(game.getHighestSharePriceStock().getSharePrice()+3));\n }\n }", "public synchronized void setStockId(int stockId) {\n\t\tthis.stockId = stockId;\n\t}", "public void setStockIto(java.math.BigDecimal stockIto) \n\t{\n\t\tthis.stockIto = stockIto;\n\t}", "@Override\r\n\tpublic double getNettoPrice() {\n\t\treturn 0;\r\n\t}", "public void sell(String n,int shares, Stock s){\n for (PersonStocks x :myStocks) {\n if(n.equals(x.getName())) {\n x.addShares(0-shares);\n money+= (s.getPrice()*shares);\n }\n }\n for (int i = 0; i < myStocks.size(); i++) {\n if (myStocks.get(i).getNumShares()<=0){\n myStocks.remove(i);//if they now have 0 and now removes it from person stocks\n }\n }\n\n }", "public void setStockName(String stockName) {\r\n this.stockName = stockName == null ? null : stockName.trim();\r\n }", "public void setQuantidade(Integer quantidade) { this.quantidade = quantidade; }", "public void removeStock(int qtearajouter) {\n\t\tthis.stock -= qtearajouter;\n\t}" ]
[ "0.69623405", "0.6776985", "0.6776985", "0.6738666", "0.67226285", "0.65668714", "0.654542", "0.6476988", "0.64654875", "0.63255686", "0.63213336", "0.6271611", "0.6271611", "0.62442464", "0.6218676", "0.61985606", "0.6116546", "0.60931313", "0.6043537", "0.6033654", "0.6001235", "0.59995455", "0.59950554", "0.5979983", "0.59713453", "0.59606946", "0.594874", "0.5926929", "0.5905415", "0.5901744", "0.5882696", "0.5877959", "0.58736956", "0.5846127", "0.5836617", "0.5827979", "0.58275515", "0.57810277", "0.5759412", "0.5754396", "0.57386404", "0.5736564", "0.57311654", "0.5721365", "0.5708933", "0.5693709", "0.56903136", "0.5684043", "0.5654489", "0.5654489", "0.5651499", "0.5644822", "0.56428313", "0.56410193", "0.56353986", "0.5618568", "0.5612996", "0.5599248", "0.55960447", "0.5584851", "0.55832386", "0.5567922", "0.5564689", "0.5543464", "0.5532461", "0.55268997", "0.55254245", "0.5518783", "0.55184793", "0.5516812", "0.5513742", "0.5505501", "0.55024415", "0.5484126", "0.5482441", "0.5481627", "0.5480958", "0.5476635", "0.54677033", "0.54669654", "0.54639024", "0.5455819", "0.54209673", "0.54193836", "0.54073906", "0.5406868", "0.5404896", "0.54026103", "0.5402054", "0.5400271", "0.5392808", "0.53874207", "0.5380831", "0.53791785", "0.5377264", "0.537509", "0.53722435", "0.5351678", "0.5346222", "0.53455997" ]
0.8043651
0
ApplicationContext context = new ClassPathXmlApplicationContext("configuration.xml");
@BeforeClass(alwaysRun = true) public void beforeClass() { baseConfig = PropertyLoader.newInstance().populate(BaseConfig.class); extendedWebDriver.manage().window().maximize(); extendedWebDriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); extendedWebDriver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n /*\n Check to see if the file exists\n File file = new File(\"src/main/java/applicationContext.xml\");\n System.out.println(file.exists());\n \n */\n \n //retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n //call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n //close the context\n \n context.close();\n \n /*Note: PUT THE FILE IN THE RESOURCES FOLDER, OR ELSE YOU'LL GET A FILE NOT FOUND ERROR*/\n }", "private SpringApplicationContext() {}", "public static void main(String[] args) \r\n\t{\n\t\tString s = \"resources/spring.xml\";\r\nApplicationContext ac = new ClassPathXmlApplicationContext(s);\r\nCar c=(Car)ac.getBean(\"c\");\r\nc.printCarDetails();\r\n\t}", "public Context getApplicationContext();", "private static BeanFactory getBeanFactory() {\n\t\tBeanFactory factory = new ClassPathXmlApplicationContext(\"withauto/beans.xml\");\n\t\treturn factory;\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"spring-test.xml\");\n\t\tSystem.out.println(context.getBean(\"test\"));\n\t\tSystem.out.println(context.getBean(MyConfig.class));\n\t\t//context.close();\n\t}", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext_work.xml\");\n SqlSessionFactory c = context.getBean(\"C\", SqlSessionFactory.class);\n System.out.println(c);\n\n\n }", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\tApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n\tStudentDAO studentDao=context.getBean(\"studentDAO\",StudentDAO.class);\n\tstudentDao.selectAllRows(); \n\t((ClassPathXmlApplicationContext)context).close();\n\n}", "@Before\n public void init() throws IOException {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"config/applicationContext.xml\");\n //this.test();\n bookMapper = context.getBean(BookMapper.class);\n }", "public static void main(String[] args) {\nApplicationContext context=new ClassPathXmlApplicationContext(\"spring.xml\");\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\tCoach coach2=(Coach)context.getBean(\"myCCoach\");\r\n\r\n\t\r\n\tSystem.out.println(coach2);\r\n\t((ClassPathXmlApplicationContext)context).close();\r\n\t\r\n\t\r\n\tSystem.out.println(coach2.getDailyFortune());\r\n\t\r\n\t}", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{\"applicationContext.xml\",\"application.xml\"});\n\n Student student = (Student) context.getBean(\"student\");\n\n\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// XmlBeanFactory beanFactory = new XmlBeanFactory(resource);\n// Student student = (Student) beanFactory.getBean(\"student\");\n//\n// //资源\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// //容器\n// DefaultListableBeanFactory factory = new DefaultListableBeanFactory();\n// //BeanDefinition读取器,通过回调配置给容器\n// XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);\n// //读取配置\n// reader.loadBeanDefinitions(resource);\n\n// Student student = (Student) factory.getBean(\"student\");\n// System.out.println(student);\n }", "public static void main( String[] args )\n {\n \tApplicationContext context=new FileSystemXmlApplicationContext(\"beans.xml\");\n \tTraveller traveller=(Traveller)context.getBean(\"traveller\"); //SPRING CONTAINER\n \tSystem.out.println(traveller.getTravelDetails());\n\n }", "String getApplicationContextPath();", "public static void main(String[] args) {\n\n\n\n\n\n ClassPathXmlApplicationContext contexto=new ClassPathXmlApplicationContext(\"applicationContext3.xml\");\n \n \n\n Empleados Maria=contexto.getBean(\"secretarioEmpleado2\",Empleados.class);\n\n \n \n \n //System.out.println(\"Tareas del director: \"+Maria.getTareas());\n System.out.println(\"Informes del director: \"+Maria.getInformes());\n //System.out.println(\"El correo es: \"+Maria.getEmail());\n //System.out.println(\"El nombre de la empresa es: \"+Maria.getNombreEmpresa());\n \n\n contexto.close();\n\n\n \n }", "private SpringApplicationContextProvider() {\r\n\t}", "ApplicationContext getAppCtx();", "public static void main(String[] args) {\n\t\tApplicationContext container = new ClassPathXmlApplicationContext(\"context.xml\");\n\t\tSystem.out.println(\"container created\");\n\n\t\t//Animal dog = container.getBean(\"animal\", Animal.class);\n\t\t//System.out.println(dog);\n\n\t}", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n new ClassPathXmlApplicationContext(\"bean4.xml\");\n Orders orders = context.getBean(\"orders\", Orders.class);\n System.out.println(\"第四步 得到bean实例\");\n System.out.println(orders);\n// orders.initMethod();\n context.close();\n }", "public static void main(String args[]) {\n\r\n\t\r\n\tApplicationContext ac = new ClassPathXmlApplicationContext(\"com/springcore/annotations/anootationconfig.xml\");\r\n\t \r\n Employee emp = ac.getBean(\"myemployee\", Employee.class);\r\n System.out.println(emp.toString());\r\n\t}", "public static void main(String[] args) {\n \n ApplicationContext context =\n new ClassPathXmlApplicationContext(\"spring-beans.xml\");\n \n \n Dependant dependant = context.getBean(\"dependant\", Dependant.class);\n \n }", "public static ApplicationContext getInstance() {\r\n\t\tsynchronized (SpringApplicationContextProvider.class) {\r\n\t\tif (applicationContext == null) {\r\n\t\t\tapplicationContext = new ClassPathXmlApplicationContext(\r\n\t\t\t\t\tnew String[] { \"META-INF/app-context.xml\" });\r\n\t\t}\r\n\t\t}\r\n\t\treturn (ApplicationContext) applicationContext;\r\n\t}", "public static void main(String[] args) {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"classpath:data.xml\");\n\n Employee emp1 = context.getBean(\"employee1\", Employee.class);\n\n System.out.println(\"Employee Details \" + emp1);\n\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext contexto= new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t \r\n\t\tdirectorEmpleado Juan=contexto.getBean(\"miEmpleado\",directorEmpleado.class);\r\n\t\tSystem.out.println(Juan.getTareas());\r\n\t\tSystem.out.println(Juan.getInforme());\r\n\t\tSystem.out.println(Juan.getEmail());\r\n\t\tSystem.out.println(Juan.getNombreEmpresa());\r\n\t\t\r\n\t\t/*secretarioEmpleado Maria=contexto.getBean(\"miSecretarioEmpleado\",secretarioEmpleado.class);\r\n\t\tSystem.out.println(Maria.getTareas());\r\n\t\tSystem.out.println(Maria.getInforme());\r\n\t\tSystem.out.println(\"Email= \"+Maria.getEmail());\r\n\t\tSystem.out.println(\"Nombre Empresa= \"+Maria.getNombreEmpresa());*/\r\n\t\t\r\n\t\tcontexto.close();\r\n\t}", "public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\n//\n// SpeakerService service = context.getBean(\"speakerService\", SpeakerService.class);\n//\n// System.out.println(service);\n//\n// System.out.println(service.findAll().get(0).getFirstName());\n//\n /*\n * In case of Singleton\n * This will not instantiate new object of SpeakerService because it is singleton\n * Same reference will be returned\n * */\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n\n // XML Configuration\n// ApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\");\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n }", "public ApplicationContext getApplicationContext()\n {\n return this.applicationContext;\n }", "private static ConfigDocumentContext createConfigurationContext(String resource) \n throws LifecycleException \n {\n try {\n Object contextBean = null;\n URL configUrl = Thread.currentThread().getContextClassLoader().getResource(resource);\n if( configUrl == null ) {\n // we can't find the config so we just an instance of Object for the ConfigDocumentContext.\n if( log.isDebugEnabled() )\n log.debug(\"Cannot find configuration at resource '\"+resource+\"'.\");\n contextBean = new Object();\n } else {\n // we have a config, create a DOM out of it and use it for the ConfigDocumentContext.\n if( log.isDebugEnabled() ) {\n log.debug(\"Loading xchain config file for url: \"+configUrl.toExternalForm());\n }\n \n // get the document builder.\n DocumentBuilder documentBuilder = XmlFactoryLifecycle.newDocumentBuilder();\n \n InputSource configInputSource = UrlSourceUtil.createSaxInputSource(configUrl);\n Document document = documentBuilder.parse(configInputSource);\n contextBean = document;\n }\n // create the context\n ConfigDocumentContext configDocumentContext = new ConfigDocumentContext(null, contextBean, Scope.chain);\n configDocumentContext.setConfigUrl(configUrl);\n configDocumentContext.setLenient(true);\n return configDocumentContext;\n } catch( Exception e ) {\n throw new LifecycleException(\"Error loading configuration from resource '\"+resource+\"'.\", e);\n }\n }", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public ApplicationContext getApplicationContext() {\n return applicationContext;\n }", "public static Context getApplicationContext() { return mApplicationContext; }", "@Before\n public void setUp() {\n this.context = new AnnotationConfigApplicationContext(\"com.fxyh.spring.config\");\n// this.context = new ClassPathXmlApplicationContext(\"classpath*:applicationContext-bean.xml\");\n this.user = this.context.getBean(User.class);\n this.user2 = this.context.getBean(User.class);\n this.department = this.context.getBean(Department.class);\n this.userService = (UserService) this.context.getBean(\"userService\");\n }", "public static void main(String[] args) {\n ApplicationContext ctx=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n HelloWord h=(HelloWord) ctx.getBean(\"helloWord\");\n h.sayHello();\n Car car=(Car) ctx.getBean(\"car\");\n System.out.println(car);\n Person person=(Person) ctx.getBean(\"person\");\n System.out.println(person);\n\t}", "public static void main( String[] args )\n {\n ApplicationContext bean = new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie = (Movie) bean.getBean(\"movie1\");\n System.out.println(movie);\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(\"contextApplicationXML.xml\");\n\n\t\t//retrieve bean from spring container\n\t\tCoach coach=context.getBean(\"myCoach\", Coach.class);\n\t\tSystem.out.println(coach.getWorkout());\n\t\t\n\t\t//close the context \n\t\tcontext.close();\n\t}", "private AnnotationConfigWebApplicationContext getGlobalApplicationContext() {\r\n\t\tAnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();\r\n\t\t//rootContext.register(ApplicationConfig.class);\r\n\t\trootContext.register(new Class[] {ApplicationConfig.class});\r\n\t\treturn rootContext;\r\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tSystem.out.println(\"context loaded\");\n\t\t// Sim sim = (Sim) context.getBean(\"sim\");\n\t\t/**\n\t\t * Avoid above type casting\n\t\t */\n\t\tSim sim = context.getBean(\"sim\", Sim.class);\n\t\tsim.calling();\n\t\tsim.data();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tApplicationContext appContext = \n\t \t new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t \t\n\t ElectronicDao dao = (ElectronicDao)appContext.getBean(\"d\");\n\t/*\tResource r=new ClassPathResource(\"applicationContext.xml\"); \n\t BeanFactory factory=new XmlBeanFactory(r); \n\t \n\t ElectronicDao dao=(ElectronicDao)factory.getBean(\"d\"); */\n\t \n\t Electronic e= new Electronic(115,\"vasdasra3sdun\",\"asda3s\"); \n\n\t System.out.println(\"Hello1\");\n\t dao.saveElectronic(e); \n\t System.out.println(\"Hello2\");\n\t}", "public static void main(String[] args)\n {\n ApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie=context.getBean(\"movie\",Movie.class);\n movie.displayActor();\n\n // intialize XmlBeanFactory with beanx.xml\n BeanFactory beanFactory=new XmlBeanFactory(new ClassPathResource(\"beans.xml\"));\n Movie movie1=(Movie) beanFactory.getBean(\"movie\");\n movie1.displayActor();\n // intialize BeanDefinitionRegistry and BeanDefinitionReader with beanx.xml\n DefaultListableBeanFactory factory=new DefaultListableBeanFactory();\n BeanDefinitionRegistry registry=new GenericApplicationContext(factory);\n BeanDefinitionReader reader = new XmlBeanDefinitionReader(registry);\n reader.loadBeanDefinitions(\"beans.xml\");\n Movie picture1 = (Movie) factory.getBean(\"movie\");\n picture1.displayActor();\n\n\n }", "public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);\n }", "public static ApplicationContext getApplicationContext() {\n return appContext;\n }", "public static void main(String[] args) {\n\t\tApplicationContext ctx=new ClassPathXmlApplicationContext(\"performance.xml\");\r\n\t Performer p=ctx.getBean(\"sonu nigam\", Performer.class); \r\n\t p.Performe();\r\n\t ConfigurableApplicationContext cfgCtx=(ConfigurableApplicationContext) ctx;\r\n\t cfgCtx.close();\r\n\t \r\n\t\r\n\t}", "public static void main(String[] args) {\r\nApplicationContext context=new ClassPathXmlApplicationContext(\"/beans.xml\");\t\t\r\n\tServlet s=(Servlet)context.getBean(\"servletRef\");\r\n\ts.serviceMethod();\r\n\t}", "public static void main(String[] args) {\n\tBeanFactory factory;\n\tfactory=new XmlBeanFactory(new ClassPathResource(\"kcp/spring/configuration/applicationContext.xml\"));\n\tClass c1=null;\n\tc1=factory.getBean(\"c1\",Class.class);\n\tSystem.out.println(c1+\" \"+c1.getClass());\n\t Properties c2=factory.getBean(\"c2\",Properties.class);\n\tSystem.out.println(c2+\" \"+c2.getClass());\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t\r\n\t\tCricketCoach coach = context.getBean(\"myCricketCoach\", CricketCoach.class);\r\n\t\t\r\n\t\tSystem.out.println(coach.getDailyWorkout());\r\n\t\t\r\n\r\n\t\tSystem.out.println(coach.getDailyFortune());\r\n\t\t\r\n\t\tSystem.out.println(coach.getEmail());\r\n\t\t\r\n\t\tSystem.out.println(coach.getName());\r\n\t\t\r\n\t\tcoach.print();\r\n\t\t\r\n\t\tcontext.close();\r\n\r\n\t}", "public static void main(String[] args) {\n ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(\"config.xml\");\n // ctx.start();\n Database d =ctx.getBean(\"mysql\",Database.class);\n System.out.println(\"name --->\" + d.getName() + \" port-->\" + d.getPort());\n d.connect();\n // d.getInteger();\n // d.throwException();\n // d.checkdata(\"richa\");\n // d.getIntdata(200);\n // Dummy dummy = ctx.getBean(\"dummy\", Dummy.class);\n // dummy.display();\n // ctx.stop();\n /* Dummytest dummytest=ctx.getBean(\"dummyTest\",Dummytest.class);\nSystem.out.print(dummytest);\n PersonalisedService personalisedService=ctx.getBean(\"personalisedService\",PersonalisedService.class);\n System.out.println(personalisedService);\n System.out.println(personalisedService.employee.getCity());\n*/\n\n }", "void open(final Configuration configuration) throws Exception;", "public static void main(String args[]) {\r\n\t\tApplicationContext appContext=new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\tEmployeeBean emp1=(EmployeeBean) appContext.getBean(\"Employee\");\r\n\t\tSystem.out.println(emp1.getName());\r\n\t}", "public static ApplicationContext getApplicationContext() {\r\n\t\treturn applicationContext;\r\n\t}", "public static void main(String[] args) {\n\t\tResource resource = new ClassPathResource(\"config/p51.xml\");\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"config/p51.xml\");\n\t\t//context.getBean()....\n\t\t\n\t\t\n\t\tGreetingService greetingService =(GreetingService)factory.getBean(\"greeting\");\n\t\tSystem.out.println(greetingService.sayHello(\"아무거나 \"));\n\t\tGreetingService greetingService2 =(GreetingService)factory.getBean(\"greeting2\");\n\t\tSystem.out.println(greetingService2.sayHello(\"아무거나 \"));\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);\n\nStudent s1 = context.getBean(\"s1\", Student.class);\n\nSystem.out.println(s1);\n\n\n\t}", "public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContextPart2.xml\");\n // get bean from the application context\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n // call the method from the beans\n System.out.println(theCoach.getDailyWorkout());\n System.out.println(theCoach.getFortune());\n\n // close the application context\n context.close();\n\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"springconfig.xml\");\n\t\t\n\t\t//2.Retrive Bean object from Bean Factory\n\t\tPhysicsTeacher teacherService = applicationContext.getBean(\"teacherService\", PhysicsTeacher.class);\n\t\t\n\t\t//3.1 Call the methods of bean to check dependency injection using setter injection\n\t\tteacherService.getHomeWork();\n\t\tteacherService.getQuotes();\n\t\t\n\t\t//3.2 Call the getters of literal values which are set through config file\n\t\tSystem.out.println(\"Name is: \"+teacherService.getName());\n\t\tSystem.out.println(\"Age is: \"+teacherService.getAge());\n\t\tSystem.out.println(\"City : \"+teacherService.getCity());\n\n\t\t\n\t\t//4 Close the Context\n\t\tapplicationContext.close();\n\n\t}", "public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n Person person = context.getBean(\"person\", Person.class);\n System.out.println(person.getName());\n System.out.println(person.getMessage());\n System.out.println(\"Shutting down...\");\n context.close();\n }", "public static void main(String[] args) {\n BeanFactory beanFactory = new ClassPathXmlApplicationContext(\"/com/bridgelabz/Spring/bean.xml\"); \n /* beans are loaded as soon as bean factory instance is created but \n * the beans are created only when getBean() method is called.\n * getBean: Return an instance, which may be shared*/\n GreetingMessage obj = (GreetingMessage) beanFactory.getBean(\"greetingMessage\"); \n String message = obj.getMessage();\n System.out.println(message);\n }", "public void configureContextInitializationComponents(AppConfiguration appConfig,\n\t SpringBeansXMLBuilder builder);", "public DataSource getDataSource(){\n\n // open/read the applicliation context file\n // belove instruction to ger absolute path of current java apps\n //URL location = NaicsUtility.class.getProtectionDomain().getCodeSource().getLocation();\n //System.out.println(location);\n ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(\"./../db.xml\");\n DataSource dataSource = null;\n try{ \n dataSource = (DataSource) appContext.getBean(\"dataSource\");\n } catch ( Exception ex ) {\n logger.log( Level.SEVERE, \"ERROR: can't create spring context and data source from application context\", ex.getMessage() );\n } finally {\n appContext.close();\n }\n return dataSource;\n }", "public static void main(String[] args) {\n\t\tAbstractApplicationContext ctx=new ClassPathXmlApplicationContext(\"SpringConfig.xml\");\n\n\tClassificationService classificationService = ctx.getBean(\"classificationService\", ClassificationServiceImpl.class);\n\t\t\n//\t\tClassification classification = new Classification();\n//\t\tclassification.setClassificationName(\"spring\");\n//\t\t\n//\t\tclassificationService.storeClassification(classification);\n\t\t\n//\t\tfor(Classification classification:classificationService.getClassification()) {\n//\t\t\tSystem.out.println(classification.getId()+\" \"+classification.getClassificationName());\n//\t\t}\n\t\t\n\t\t\n\t}", "public interface Configuration {\n\n}", "public static void main(String args[])\n {\n ClassPathXmlApplicationContext context = new\n ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\n // retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\",Coach.class);\n\n// call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n\n// lest call our new method for fortunes\n System.out.println(theCoach.getDailyFortune());\n\n// close the context\n context.close();\n\n\n }", "public static void main(String[] args) {\n\t\t\tResource r = new ClassPathResource(\"resources/spring.xml\");\n\t\t\tBeanFactory factory = new XmlBeanFactory(r);\n\t\t//ApplicationContext factory1 = new ClassPathXmlApplicationContext(\"resources/spring.xml\");\n\t\t\n\t\t\n\t\t\t//Test t1 = (Test)factory1.getBean(\"t\");\n\t\t\t//Test t2 = (Test)factory1.getBean(\"t\");\n\t\t\t//t1.hello();\n\t\t\t//t2.hello();\n\t\t\t//System.out.println(t1==t2);\n\t\t\n\t\tfactory.getBean(\"t\");\n\t}", "public static Configuration getConfiguration() {\r\n\t\treturn config;\r\n\t}", "public static void main(String[] args) {\n ApplicationContext context =new ClassPathXmlApplicationContext(\"spring.xml\");\n\t \n\t\tService ser= context.getBean(Service.class);\n\t\tSystem.out.println(ser.getAccountID());\n\t}", "@Test\n public void testLoadConfigurationFromFile() throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE);\n checkConfiguration();\n }", "public static void main(String[] args) {\n\n System.out.println(\"开始初始化容器\");\n ApplicationContext ac = new ClassPathXmlApplicationContext(\"classpath:dispatcher-servlet.xml\");\n\n System.out.println(\"xml加载完毕\");\n Person person1 = (Person) ac.getBean(\"person1\");\n System.out.println(person1);\n System.out.println(\"关闭容器\");\n ((ClassPathXmlApplicationContext)ac).close();\n\n }", "public static void main(String[] args) {\r\n\tAnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(SwimConfig.class);\r\n\tCoach myCoach=context.getBean(\"swimCoach\",Coach.class);\r\n\tSystem.out.println(myCoach.getDailyFortune());\r\n\tSystem.out.println(myCoach.getDailyWorkOut());\r\n\tcontext.close();\r\n\r\n}", "@Test\n public void testBeanFactoryCreateBean() {\n ClassPathResource resource = new ClassPathResource(\"spring-bean.xml\");\n XmlBeanFactory factory = new XmlBeanFactory(resource);\n //\n System.out.println(\"begin get bean.\");\n factory.getBean(\"bean\");\n System.out.println(\"end get bean.\");\n }", "public static void main(String[] args) {\n\t\tAbstractApplicationContext appContext = new FileSystemXmlApplicationContext(\"src/ApplicationMetaData.xml\");\n\t\tEmployee employee = appContext.getBean(\"tcsEmployee\", Employee.class);\n\t\t//2.Print out Employee Bean\n\t\tSystem.out.println(\"**************\");\n\t\tSystem.out.println(\"Employee Id::\"+ employee.getEmployeeId());\n\t\tSystem.out.println(\"Employee Name::\" + employee.getEmployeeName());\n\t\tSystem.out.println(\"**************\");\n\t\tappContext.close();\n\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\r\n\t\t \r\n\t\tIMensaje mensaje = context.getBean(\"miBean\", Mensaje.class);\r\n\t\t\r\n\t\tmensaje.printHelloWorld(\"prueba Spring\");\r\n\t\t\r\n\t\t((AnnotationConfigApplicationContext) context).close();\r\n\t}", "private void config() {\n\t}", "public static void main( String[] args )\r\n {\r\n \tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\r\n \t\r\n \t/* Recupera un bean avente id='helloWorld' nel file di configurazione\r\n \t * beans.xml */\r\n \tHelloWorld obj = (HelloWorld) context.getBean(\"helloWorld\");\r\n \t\r\n \t/* Invoco il metodo che stampa il messaggio su tale oggetto */\r\n \tSystem.out.println(\"Messaggio: \" + obj.getMessage());\r\n \t\r\n \tobj = (HelloWorld) context.getBean(\"moseca\");\r\n \tSystem.out.println(\"Messaggio: \" + obj.getMessage());\r\n }", "public static void main(String[] args) {\n\t\tApplicationContext ac = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t//System.out.println(ac.getBean(\"user\"));\r\n\t\t//User user = ac.getBean(User.class);\r\n\t\tString[] beanNames = ac.getBeanNamesForType(User.class);\r\n\t\t//System.out.println(user);\r\n\t\tfor (String string : beanNames) {\r\n\t\t\tSystem.out.println(string);\r\n\t\t\t\r\n\t\t}\r\n\t\tUser user = (User) ac.getBean(\"hkk.spring.javaBeans.User#0\");\r\n\t\tUser user2 = (User) ac.getBean(\"user\");\r\n\t\tUser user3 = (User) ac.getBean(\"user\");\r\n\t\tSystem.out.println(user3==user2);\r\n\t}", "public UniqueResourcesAndLocations() {\n this.context = new ClassPathXmlApplicationContext(\"spring-dao.xml\");\n this.jtemp = (JdbcTemplate)context.getBean(\"jt\");\n\t}", "public void configure() throws ConfigurationException;", "public static void main(String[] args) {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"complex-config.xml\");\n Complex complex = applicationContext.getBean(\"complexBean\",Complex.class);\n System.out.println(complex.getList());\n System.out.println(complex.getSet());\n System.out.println(complex.getMap());\n\n }", "public static void main(String[] args){\n\t\tAnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);\n\t\t//applicationContext.addApplicationListener(new MyApplicationStartListener());\n\t\tapplicationContext.setParent(new ClassPathXmlApplicationContext(\"WEB-INF/application-context.xml\"));\n\t\tapplicationContext.start();\n\t\t\n\t\tHelloWorld helloWorld = (HelloWorld) applicationContext.getBean(\"helloWorld\");\n\t\thelloWorld.sayHello();\n\t\t\n\t\t/*BookJdbcTemplate bookJdbcTemplate = new BookJdbcTemplate();\n\t\tJdbcTemplate jdbcTemplate = (JdbcTemplate) applicationContext.getBean(\"jdbcTemplate\");\n\t\tbookJdbcTemplate.setJdbcTemplate(jdbcTemplate);\n\t\tSystem.out.println(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));\n\t\tlogger.debug(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));*/\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext c = new ClassPathXmlApplicationContext(\"hello.xml\");\r\n\t\tTextEditor t = (TextEditor) c.getBean(\"text\");\r\n\t\tt.test();\r\n\t}", "@BeforeClass\n\tpublic static void prepare() {\n\t\t final ApplicationContext ctx = new\n\t\t ClassPathXmlApplicationContext(\"file:src/main/webapp/WEB-INF/employee-servlet.xml\");\n\t\temployeeDAO = ctx.getBean(\"employeeDAO\", EmployeeDAO.class);\n\t}", "SpringLoader getSpringLoader();", "@Test\n void configuration_mixedConfiguration() {\n ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfigThree.class);\n\n MessageRenderer messageRenderer = ctx.getBean(\"messageRenderer\", MessageRenderer.class);\n messageRenderer.render();\n }", "@StartStep(localName=\"create-config-document-context\", after={\"xml-factory-lifecycle\"})\n public static void startCreateConfigDocumentContext() \n throws LifecycleException \n {\n Lifecycle.configDocumentContext = createConfigurationContext(XCHAIN_CONFIG);\n }", "public static void main(String[] args) {\n\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"empaccconfig.xml\");\r\n\t\t\r\n\t\tEmployee em = (Employee)ctx.getBean(\"emp\");\r\n\t\tem.printValues();\r\n\t}", "public synchronized Context getContext() throws ConfigurationException {\n if (context == null) {\n if (contextXml.exists()) {\n // load configuration if already exists\n try {\n context = Context.createGraph(contextXml);\n } catch (IOException e) {\n String msg = NbBundle.getMessage(TomcatModuleConfiguration.class, \"MSG_ConfigurationXmlReadFail\", contextXml.getPath());\n throw new ConfigurationException(msg, e);\n } catch (RuntimeException e) {\n // context.xml is not parseable\n String msg = NbBundle.getMessage(TomcatModuleConfiguration.class, \"MSG_ConfigurationXmlBroken\", contextXml.getPath());\n throw new ConfigurationException(msg, e);\n }\n } else {\n // create context.xml if it does not exist yet\n context = genereateContext();\n TomcatModuleConfiguration.<Context>writeToFile(contextXml, () -> getContext());\n }\n }\n return context;\n }", "protected Configuration getConfiguration(){\n return configuration;\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context =new \r\n\t\t\t\tClassPathXmlApplicationContext(\"initMethodConcept.xml\");\r\n\t\tCoach c=context.getBean(\"myApp\",Coach.class);\r\n//\t\tCoach d=context.getBean(\"myApp\",Coach.class);\r\n//\t\tboolean result =(c==d);\r\n//\t\tSystem.out.println(\"Same instance\" +result);\r\n//\t\tSystem.out.println(\"location1\" +c);\r\n//\t\tSystem.out.println(\"location1\" +d);\r\n//\t\t\r\n//\t\tc.print();\r\n\t\tSystem.out.println(\"myFortune is \"+c.getDailyFortune());\r\n//\t\tSystem.out.println(\"emailAddress\"+c.getEmailAddress());\r\n//\t\tSystem.out.println(\"team name is\"+c.getTeam());\r\n\t\tcontext.close();\r\n\r\n\t}", "public void loadConfig() {\n\t}", "@Override\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\n\t\t//retrieve the beans\n\t\tCoach theCoach = context.getBean(\"tennisCoach\", Coach.class);\n\t\tCoach coach2 = context.getBean(\"soccerCoach\",SoccerCoach.class);\n\t\tCoach coach3 = context.getBean(\"karateCoach\", KarateCoach.class);\n\t\t\n\t\t//call some methods\n\t\tSystem.out.println(theCoach.getDailyWorkout());\n\t\tSystem.out.println(theCoach.getDailyFortune());\n\t\tSystem.out.println(coach2.getDailyFortune());\n\t\tSystem.out.println(coach3.getDailyFortune());\n\t\t\n\t\t//close the container\n\t\tcontext.close();\n\t\t\n\t}", "public static ConfigManager getConfiguration() {\n return configuration;\n }", "private static ConfigurationObject getConfig() throws Exception {\n\t\tXMLFilePersistence persistence = new XMLFilePersistence();\n\n\t\t// Get configuration\n\t\tConfigurationObject obj = persistence.loadFile(\n\t\t\t\t\"com.topcoder.management.reviewfeedback.stress\", new File(\n\t\t\t\t\t\t\"test_files/stress/config.xml\"));\n\n\t\treturn obj;\n\t}", "@Override\n protected void configure() {\n bind(ApplicationContext.class).toInstance(ctxt);\n }", "static void loadConfiguration() throws Exception {\n cleanConfiguration();\n\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"test_conf/stress/logging.xml\");\n cm.add(\"test_conf/stress/dbconnectionfactory.xml\");\n cm.add(\"test_conf/stress/simplecache.xml\");\n cm.add(\"test_conf/stress/profiletypes.xml\");\n cm.add(\"test_conf/stress/daofactory.xml\");\n cm.add(\"test_conf/stress/dao.xml\");\n }", "private static CamelContext configureCamelContext(ApplicationContext context) throws Exception {\n //normal way of getting camel context but i have it defined in camelSpringApplicationContext.xml\n // CamelContext camel = new DefaultCamelContext();\n // CamelContext camel = new SpringCamelContext(context);\n CamelContext camel = (CamelContext) context.getBean(\"myCamelContext\");\n // shows up in jmx with this context name instead of camel-1\n camel.setNameStrategy(new DefaultCamelContextNameStrategy(\"steves_camel_driver\"));\n // camel.setTracing(true); // set in camelSpringApplicationContext.xml\n camel.addStartupListener(new StartupListener() {\n @Override\n public void onCamelContextStarted(CamelContext context, boolean alreadyStarted) throws Exception {\n LOG.info(\"Seeing when startup strategy is called. CamelContext=\" + context);\n }\n });\n\n return camel;\n }", "@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}", "@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t//AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(TennisCoach.class);\n\t\t//get the bean from spring container\n\t\t//1. Default bean id\n\t\tCoach theCoach=context.getBean(\"tennisCoach\", Coach.class);\n\t\t//2. Explicit bean id\n\t\t//Coach theCoach=context.getBean(\"thatCoach\", Coach.class);\n\t\tSystem.out.println(theCoach.getDailyWorkout());\n\t\t//call method to get a daily fortune\n\t\tSystem.out.println(theCoach.getDailyFortune());\n\t\tcontext.close();\n\t}", "@Test\n public void testConfig() {\n DatabaseClientConfig config = getApplicationContext().getBean(DatabaseClientConfig.class);\n assertEquals(\"localhost\", config.getHost());\n assertEquals(8101, config.getPort());\n }", "@Test\n public void testLoadConfiguration() throws ConfigurationException\n {\n factory.setFile(TEST_FILE);\n checkConfiguration();\n }", "public static void registerConfig(Class<?>... configurationClasses) {\n if (context == null) {\n context = new AnnotationConfigApplicationContext(configurationClasses);\n }\n }" ]
[ "0.68689525", "0.66262007", "0.6547543", "0.6497489", "0.6477103", "0.6469593", "0.64296323", "0.6278141", "0.627218", "0.62137365", "0.6174788", "0.61571324", "0.61546296", "0.6154513", "0.61464345", "0.6139055", "0.6116318", "0.61154985", "0.60851187", "0.60796493", "0.60264", "0.60068345", "0.59976614", "0.5982122", "0.5966899", "0.5958735", "0.5882611", "0.58763725", "0.58763725", "0.58763725", "0.58763725", "0.58759975", "0.5868798", "0.5862746", "0.58533335", "0.5836733", "0.5797175", "0.5781515", "0.57779866", "0.5763268", "0.5751723", "0.5745319", "0.57218724", "0.5720313", "0.57149965", "0.57067615", "0.56918186", "0.5691639", "0.5685962", "0.5680762", "0.567917", "0.5653019", "0.56527454", "0.5648849", "0.56277895", "0.5617977", "0.5611731", "0.56068105", "0.5604955", "0.5601693", "0.5568686", "0.5566807", "0.5563262", "0.5557669", "0.5554154", "0.5552543", "0.5532811", "0.55277306", "0.550776", "0.5506932", "0.5491779", "0.5490444", "0.54877555", "0.5481691", "0.54810476", "0.5475458", "0.5474571", "0.54611117", "0.54505914", "0.5449346", "0.5446836", "0.54428613", "0.5431685", "0.54301983", "0.5429244", "0.54188234", "0.5417984", "0.54081196", "0.5407557", "0.53981483", "0.539749", "0.5390404", "0.5389337", "0.5387833", "0.5386694", "0.53790796", "0.53790796", "0.5376727", "0.53717715", "0.53715485", "0.5366539" ]
0.0
-1
This interface sets methods used by a UserContent Object
public interface UserContent { public String getURL(); public String getID(); public void setURL(String URL); public void setID(String ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setContentObject(Object object);", "public abstract void setContent(Object o);", "private void setUserData(){\n }", "public synchronized void setContent(Object content) {\n // nothing\n }", "public interface UserProfileView {\r\n\r\n void setAboutMe(String aboutMe);\r\n void setSocialNetworks(HashMap<String,String> socialNetworks);\r\n void setPreferenceDays(ArrayList<Integer> preferenceDays);\r\n void setPreferenceHours(ArrayList<Integer> preferenceHours);\r\n\r\n void showEditAboutMe(String aboutMe);\r\n void showEditSocialNetworks(HashMap<String,String> socialNetworks);\r\n void showEditPreferenceDays(ArrayList<Integer> preferenceDays);\r\n void showEditPreferenceHours(ArrayList<Integer> preferenceHours);\r\n}", "public void setUser(User user) { this.user = user; }", "void setUserData(Object userData);", "public void setContent(T content);", "public void setUserObject(Object o);", "public interface MainView {\n void tampilkandata(User user);\n}", "protected void setContents(Object contents) {\n\t}", "public interface IUserEditView {\r\n\r\n LinearLayout getLLHeadView();\r\n CircleImageView getCIVHeadView();\r\n EditText getETName();\r\n EditText getETDescripetion();\r\n RadioGroup getRGGender();\r\n EditText getETLocation();\r\n\r\n}", "public interface PhrasingContent extends ContentInterface {\r\n\r\n}", "public interface IMineView extends IBaseView{\n\n /**\n * @param user\n */\n void fillUserData(User user);\n /**\n * @param tools\n */\n void fillToolsData(List<Tool> tools);\n}", "public interface UserInfoView {\n\n void onGetUserData(List<UserBean> followings);\n\n\n\n}", "abstract public void setUserData(Object data);", "public interface Content {\n}", "public interface Userable {\n\n}", "public interface UserModle {\n void setID(int id);\n void setNumber(String number);\n void setPassword(String password);\n UserBaen load(int id);\n}", "public void setUserData(Object data);", "public interface IUserSet {\n void initData();\n}", "public void setContent(Object content) {\n this.content = content;\n }", "void setUser(OSecurityUser user);", "public interface User extends Serializable {\r\n\r\n Long getId();\r\n String getUserName();\r\n String getPassword();\r\n String getDescription();\r\n boolean isEnabled();\r\n\r\n void setUserName(String userName);\r\n void setPassword(String password);\r\n void setDescription(String description);\r\n void setEnabled(boolean value);\r\n public void addUserGroup(UserGroup userGroup);\r\n public void removeUserGroup(UserGroup userGroup);\r\n public void removeAllGroups();\r\n public void setGroups(Set<UserGroup> groups);\r\n public Set<UserGroup> getGroups();\r\n\r\n\r\n/*\r\n void addGroup(Group group);\r\n void removeGroup(Group group);\r\n public void removeAllGroups();\r\n List<Group> getGroups();\r\n*/\r\n\r\n}", "@Override\n public void edit(User user) {\n }", "public User getUserData();", "public interface CommunityView extends HHBaseView {\n\n void setHeadline(Article article);\n}", "public void setUser(String user)\n {\n _user = user;\n }", "public interface MineUserInModelfoInterface {\n\n void getMineUserInfoData();\n\n}", "public void setUser(Motile user) {\n\n this.user = user;\n }", "public abstract void setContentDescription(String description);", "public abstract Object getContent();", "public void setUserContent(User user, String location) {\r\n\t\tLOG.info(\"AutoSenderService: - setUserContent: location = \" + location);\r\n\t\tList<UserContent> contentList = (List<UserContent>) user\r\n\t\t\t\t.getUserContents();\r\n\t\tif (contentList == null) {\r\n\t\t\tcontentList = new ArrayList<UserContent>();\r\n\t\t}\r\n\t\tUserContent content = new UserContent();\r\n\t\tUserContentName userContentName = getUserContentName(location);\r\n\t\tcontent.setName(userContentName);\r\n\t\tcontentList.add(content);\r\n\t\tuser.setUserContents(contentList);\r\n\t}", "public interface IUser\n{\n void subscribe(IFollowable entity);\n void unsubscribe(IFollowable entity);\n Date getLastUpdateTime();\n void setLastUpdateTIme(Date timeOfLatestUpdate);\n String getUserName();\n String getUserHomeAdress();\n String getLegislativeDistrict();\n String getCity();\n String getCounty();\n List<IFollowable> getDefaultIFollowables();\n JSONArray getUpdatesFromAllSubscriptions(Date lastUpdateTime);\n\n }", "public interface Iuser extends Remote{\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tpublic String getUsername();\r\n\r\n\t\t\r\n\t\tpublic String getPassword();\r\n\r\n\r\n\t\tpublic void setPassword(String string);\r\n\t\t\r\n\t\tpublic void setUsername(String string);\r\n\t\t\r\n\t\tpublic void getItem(IItem item);\r\n\t\t\r\n\t\tpublic void purchaseItems();\r\n\t\t\r\n\t public int getItemCounter();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public interface IHelpCenterView extends BaseView {\n void getHelpData(String userId,int Page);\n void setHelpData(List<HelpBean> data);\n void setMoreHelpData(List<HelpBean> data);\n}", "public interface OnUserActionListener {\n\n /**\n * Handles on list item click\n * @param user {@link User}\n * @param action int\n */\n\n public void onUserListItemClicked(User user, int action, int position);\n\n /**\n * Adds new user to remote database via API methods\n * @param user {@link User}\n */\n public void addUser(User user);\n\n /**\n * Edits user data stored in remote database via API methods\n * @param user {@link User}\n */\n public void editUser(User user);\n\n /**\n * Deletes user data stored in remote database via API methods\n * @param userId long\n */\n public void deleteUser(long userId);\n}", "@Override\n\tpublic void doUser(UserInfo ui) {\n\n\t}", "private UserInterface() {\r\n\t\tif (yesOrNo(\"Look for saved data and use it?\")) {\r\n\t\t\tretrieve();\r\n\t\t} else {\r\n\t\t\tstore = Store.instance();\r\n\t\t}\r\n\t}", "public interface MainView {\n void setContacts(Cursor cursor);\n}", "public interface UIMember extends UIUser {\r\n\t\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe user-name of the member\r\n\t */\r\n\tpublic String getUsername();\r\n\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe last name of the member\r\n\t */\r\n\tpublic String getLastName();\r\n\t\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe first name of the member\r\n\t */\r\n\tpublic String getFirstName();\r\n\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tThe e-mail address of the member\r\n\t */\r\n\tpublic String getEmail();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tThe number of messages posted by the member\r\n\t */\r\n\tpublic int getPostsNumber();\r\n\t\r\n\tpublic boolean askChangePassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tA string representation of the member\r\n\t */\r\n\tpublic String toString();\r\n\r\n}", "abstract public Object getUserData();", "public interface UserData {\n /**\n * the run method that is run during UserNavigators\n */\n public static void run(){};\n\n String currentUser();\n}", "public interface IExploreItemModel {\n public abstract void getPostData(int page,int count,int type);\n public abstract void updateFollow(boolean isFollowed,MyUser postUser);\n public abstract void updateLikeNum(int num,String postId,int tag);\n public abstract void deletePost(String objectId);\n\n}", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "public interface IPeopleView extends BaseView{\n void oninsertStaffAdd(String data);\n\n void ondeleteStaffAdd(String data);\n\n void onupdateStaffAdd(String data);\n\n void onauditStaffAdd(String data);\n\n void OngetStaffAddList(List<PeopleBean> data);\n\n void ongetStaffAddDetail(PeopleBean data);\n\n\n void onGgetParentDepartmentStaffList(List<MeParentBean> data);\n}", "public interface IDetailView {\n public void setImage(String url);\n\n // mètodes per assignar el nom i cognom\n public void setNom(String text);\n public void setDivisio(String text);\n public void setNivell(String text);\n public void setObjPref(String text);\n public void setTipusAtac(String text);\n /*public void setUrlImatge(String text) ;*/\n}", "@Override\n protected void setContentObject(Serializable contentObject) {\n result = (TResult)contentObject;\n }", "@Override\n public void set(C content) {\n this.content = content;\n }", "public void setUserContext(UserContext userContext);", "public interface UserModel {\n\n\n}", "interface UserDetailsView {\n void addPhoto(StorageReference image);\n\n void removePhoto(int position);\n\n void startPhotoDetailsView(Map<String, Serializable> args);\n\n Serializable getArg(String key);\n\n void updateUsername(String username);\n}", "@Override\n public void setUserData(final Object userData) {\n this.userData = userData;\n }", "public interface IUserInfoView extends BaseView {\n void showUserData(UserBean userBean);\n}", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "private UserPrefernce(){\r\n\t\t\r\n\t}", "public interface ContactListView {\n void onContactAdded(User user);\n void onContactChanged(User user);\n void onContactRemoved(User user);\n}", "public interface IUserInformation {\n void updateUserInformation(String teacherId, ArrayList<String> images, String tName, int sex, String college, String profession, int education, int grade, List<Integer> pbxType, String introduction, String headUrl, Response.Listener<BaseBean> listener, Response.ErrorListener errorListener);\n\n void getUserInfo(String teacherId, Response.Listener<User> listener, Response.ErrorListener errorListener);\n\n void updateUserPhone(String teacherId, String mobile, Response.Listener<BaseBean> listener, Response.ErrorListener errorListener);\n\n\n}", "public interface User {\n\t\n\t/**\n\t * Set user name.\n\t * @param name - a name.\n\t */\n\tpublic void setName(String name);\n\t\n\t/**\n\t * Get user name.\n\t * @return - the name.\n\t */\n\tpublic String getName();\n\t \n\t/**\n\t * Set user ID number.\n\t * @param numID - an ID number.\n\t */\n\tpublic void setID(Number numID);\n\t \n\t/**\n\t * Get user ID number.\n\t * @return - the ID number.\n\t */\n\tpublic Number getID();\n\t \n\t/**\n\t * Get list of user's GroupParameter's.\n\t * @return - list of GroupParameter's.\n\t */\n\tpublic List<GroupParameter> getParameters();\n\n}", "protected UserWordData() {\n\n\t}", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "public void setModifiedByUser(String modifiedByUser);", "public interface UserOperations {\n\n\t/**\n\t * <strong>get me</strong><br>\n\t * <br>\n\t * files ex) counts,created_at,creator,description\n\t * \n\t * @param fields\n\t * @return\n\t */\n\tData<User> getMe(String fields);\n\n\t/**\n\t * <strong>get me</strong><br>\n\t * <br>\n\t * The default field <br>\n\t * <strong> id,image,username,first_name,last_name,bio,created_at,counts,\n\t * account_type,url </strong>\n\t * \n\t * @return\n\t */\n\tData<User> getMe();\n\n\t/**\n\t * <strong>user search</strong><br>\n\t * user <br>\n\t * The default field <br>\n\t * <strong> account_type,bio,counts,created_at,first_name,id,image,last_name\n\t * ,url,username </strong>\n\t * \n\t * @param user\n\t * @return\n\t */\n\tData<User> getUserSearch(String user);\n\n\t/**\n\t * <strong>user search</strong><br>\n\t * user <br>\n\t * field ex)\n\t * <strong> account_type,bio,counts,created_at,first_name,id,image,last_name\n\t * ,url,username </strong>\n\t * \n\t * @param user\n\t * @param fields\n\t * @return\n\t */\n\tData<User> getUserSearch(String user, String fields);\n\n\t/**\n\t * <strong>getboard</strong><br>\n\t * field ex)\n\t * <strong> counts,created_at,creator,description,id,image,name,privacy,\n\t * reason,url</strong>\n\t * \n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getBoards(String fields);\n\n\t/**\n\t * <strong>getboard</strong><br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,\n\t * reason,url</strong>\n\t * \n\t * @return\n\t */\n\tData<List<Boards>> getBoards();\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin, count, fields <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param pin\n\t * @param count\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin, Integer count, String fields);\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin, count <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param pin\n\t * @param count\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin, Integer count);\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @param pin\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin);\n\n\n\t/*********************************************/\n\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * limit, fields <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\n\tData<List<User>> getFollowers(Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getFollowers(Integer limit);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * The default limit 25 <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @return\n\t */\n\tData<List<User>> getFollowers();\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * next<br>\n\t * @param next\n\t * @return\n\t */\n\tData<List<User>> getFollowersNext(String next);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * cursor, limit, fields\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getFollowersCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * \t<strong>getFollowers</strong><br>\n\t * cursor, limit\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getFollowersCursor(String cursor, Integer limit);\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * limit fields\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\n\tData<List<Boards>> getFollowersBoards(Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoards(Integer limit);\n\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * The default limit 25 <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoards();\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsNext(String next);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * cursor, limit, fields <br>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * curosr , limit\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit);\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>followingBoards</strong><br>\n\t * board\n\t * @param board\n\t * @return\n\t */\n\tData<String> followingBoards(String board);\n\n\t/**\n\t * <strong>unfollowingBoards</strong><br>\n\t * board\n\t * @param board\n\t */\n\tvoid unfollowingBoards(String board);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * limit\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterests(Integer limit);\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterestsNext(String next);\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * cursor, limit\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterestsCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * limit\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsers(Integer limit, String fields);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsers(Integer limit);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\n\tData<List<User>> getfollowingUsersNext(String next);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * cursor, limit\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsersCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * cursor, limit, fields <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsersCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>followingUsers</strong><br>\n\t * user\n\t * @param user\n\t * @return\n\t */\n\tData<String> followingUsers(String user);\n\n\t/**\n\t * <strong>unfollowingUsers</strong><br>\n\t * @param user\n\t */\n\tvoid unfollowingUsers(String user);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * limit, fields\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getLike(Integer limit, String fields);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getLike(Integer limit);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getLikeNext(String next);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * cursor, limit, fields\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getLikeCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * cursor, limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getLikeCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * limit, fields\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getPins(Integer limit, String fields);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getPins(Integer limit);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getPinsNext(String next);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * cursor, limit, fields\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getPinsCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * cursor, limi <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getPinsCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, fields\n\t * @param query\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoards(String query, String fields);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query<br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param query\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoards(String query);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsNext(String next);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, cursor, fields\n\t * @param query\n\t * @param cursor\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, cursor <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @param query\n\t * @param cursor\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsCursor(String query, String cursor);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, limit, fields\n\t * @param query\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPins(String query, Integer limit, String fields);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, limit\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param query\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPins(String query, Integer limit);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsNext(String next);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, cursor, limit\n\t * @param query\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, cursor, limit<br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param query\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit);\n}", "public interface user_interface {\n public Double getCredit();\n\n\n public void setCredit(Double credit);\n\n\n public String getName();\n\n public String getType();\n\n public void setFirstName(String name);\n\n public String getSurename();\n\n public void setSurename(String surename);\n\n public String getTypeOfCar();\n\n public String getCarID();\n\n public void setTypeOfCar(String typeOfCar);\n}", "public void setUser(UserData data) {\n user = data;\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "private void populateInterfaceElements() {\n usernameTextView.setTypeface(Default.sourceSansProBold);\n userFullNameText.setTypeface(Default.sourceSansProLight);\n userFollowButton.setTypeface(Default.sourceSansProLight);\n\n setupUserProfilePicImageView();\n setupUsernameAndFullNameTextView();\n setupUserFollowButton();\n setupUserRelativeLayout();\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "public User getUser(){return this.user;}", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "protected EntriesBaseAdapter(Context context, CustomAttributes userUIPreferences) {\n super(context, userUIPreferences);\n setupData();\n }", "@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}", "public interface User {\n\n//\tpublic void addPost(ForumPost post);\n//\tpublic void removePost(ForumPost post);\n//\tpublic List<ForumPost> getPosts();\n//\t\n//\tpublic void setUserDetails(UserDetails details);\n//\tpublic UserDetails getUserDetails();\n//\t\n//\tpublic Forum moderateForum(Forum forum);\n//\tpublic void unmoderateForum(Forum forum);\n//\tpublic List<Forum> getModeratedForums();\n//\t\n//\tpublic String getUsername();\n//\tpublic String getEmail();\n//\tpublic Date getCreationDate();\n}", "public interface IDetailView {\n\n void populateListOfComments(List<String> comments);\n void setComments();\n}", "public interface MainView extends BaseView {\n\n /**\n * 初始化权限\n */\n void initPermission();\n}", "@Override\n public void doAction(User user) {\n }", "public abstract User getUser();", "@Override\n\tpublic void onSetCustomUserDataDone(LiveUserInfoEvent arg0) {\n\t\t\n\t}", "private void populateInterfaceElements() {\n prismUserTextView.setTypeface(Default.sourceSansProBold);\n prismPostDateTextView.setTypeface(Default.sourceSansProLight);\n likesCountTextView.setTypeface(Default.sourceSansProLight);\n repostsCountTextView.setTypeface(Default.sourceSansProLight);\n\n setupPostUserUIElements();\n setupPostImageView();\n setupActionButtons();\n }", "public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }", "private void setDescription(String UserDescription){\n Description = UserDescription;\n }", "public interface UserModel extends BaseModel<User> {\n\tpublic long getUserId();\n\n\tpublic void setUserId(long userId);\n\n\tpublic String getFirstName();\n\n\tpublic void setFirstName(String firstName);\n\n\tpublic String getLastName();\n\n\tpublic void setLastName(String lastName);\n\n\tpublic String getPassword();\n\n\tpublic void setPassword(String password);\n\n\tpublic boolean getActive();\n\n\tpublic void setActive(boolean active);\n\n\tpublic byte[] getImage();\n\n\tpublic void setImage(byte[] image);\n\n\tpublic interface Info extends Serializable {\n\t\tpublic Date getDob();\n\n\t\tpublic void setDob(Date dob);\n\n\t\tpublic interface Address extends Serializable {\n\t\t\tpublic String getStreet();\n\n\t\t\tpublic void setStreet(String street);\n\n\t\t\tpublic int getZip();\n\n\t\t\tpublic void setZip(int zip);\n\n\t\t\tpublic Map<String, Object> toMap();\n\t\t}\n\n\t\tpublic Address getAddress();\n\n\t\tpublic void setAddress(Address address);\n\n\t\tpublic String getPhone();\n\n\t\tpublic void setPhone(String phone);\n\n\t\tpublic List<Date> getReminders();\n\n\t\tpublic void setReminders(List<Date> reminders);\n\n\t\t/**\n\t\t* Appends to the end of List, irrespective of value already existing.\n\t\t* See addToReminders to add without duplicating.\n\t\t*/\n\t\tpublic void appendToReminders(Date reminders);\n\n\t\t/**\n\t\t* Appends to the end of List, irrespective of value already existing.\n\t\t* See addToReminders to add without duplicating.\n\t\t*/\n\t\tpublic void appendToReminders(List<Date> reminders);\n\n\t\t/**\n\t\t* Adds to the List by treating List as a Set.\n\t\t* Thus adds only if not already exists in the List and avoids duplication.\n\t\t* See appendToReminders to append to List.\n\t\t*/\n\t\tpublic void addToReminders(Date reminders);\n\n\t\t/**\n\t\t* Adds to the List by treating List as a Set.\n\t\t* Thus adds only if not already exists in the List and avoids duplication.\n\t\t* See appendToReminders to append to List.\n\t\t*/\n\t\tpublic void addToReminders(List<Date> reminders);\n\n\t\t/**\n\t\t* Removes all occurences of value from the List\n\t\t*/\n\t\tpublic void removeFromReminders(Date reminders);\n\n\t\t/**\n\t\t* Removes all occurences of all values from the List\n\t\t*/\n\t\tpublic void removeFromReminders(List<Date> reminders);\n\n\t\tpublic Map<String, Object> toMap();\n\t}\n\n\tpublic Info getInfo();\n\n\tpublic void setInfo(Info info);\n\n\tpublic List<String> getLikedCars();\n\n\tpublic void setLikedCars(List<String> likedCars);\n\n\t/**\n\t* Appends to the end of List, irrespective of value already existing.\n\t* See addToLikedCars to add without duplicating.\n\t*/\n\tpublic void appendToLikedCars(String likedCars);\n\n\t/**\n\t* Appends to the end of List, irrespective of value already existing.\n\t* See addToLikedCars to add without duplicating.\n\t*/\n\tpublic void appendToLikedCars(List<String> likedCars);\n\n\t/**\n\t* Adds to the List by treating List as a Set.\n\t* Thus adds only if not already exists in the List and avoids duplication.\n\t* See appendToLikedCars to append to List.\n\t*/\n\tpublic void addToLikedCars(String likedCars);\n\n\t/**\n\t* Adds to the List by treating List as a Set.\n\t* Thus adds only if not already exists in the List and avoids duplication.\n\t* See appendToLikedCars to append to List.\n\t*/\n\tpublic void addToLikedCars(List<String> likedCars);\n\n\t/**\n\t* Removes all occurences of value from the List\n\t*/\n\tpublic void removeFromLikedCars(String likedCars);\n\n\t/**\n\t* Removes all occurences of all values from the List\n\t*/\n\tpublic void removeFromLikedCars(List<String> likedCars);\n\n\tpublic List<String> getFollowedUsers();\n\n\tpublic void setFollowedUsers(List<String> followedUsers);\n\n\t/**\n\t* Appends to the end of List, irrespective of value already existing.\n\t* See addToFollowedUsers to add without duplicating.\n\t*/\n\tpublic void appendToFollowedUsers(String followedUsers);\n\n\t/**\n\t* Appends to the end of List, irrespective of value already existing.\n\t* See addToFollowedUsers to add without duplicating.\n\t*/\n\tpublic void appendToFollowedUsers(List<String> followedUsers);\n\n\t/**\n\t* Adds to the List by treating List as a Set.\n\t* Thus adds only if not already exists in the List and avoids duplication.\n\t* See appendToFollowedUsers to append to List.\n\t*/\n\tpublic void addToFollowedUsers(String followedUsers);\n\n\t/**\n\t* Adds to the List by treating List as a Set.\n\t* Thus adds only if not already exists in the List and avoids duplication.\n\t* See appendToFollowedUsers to append to List.\n\t*/\n\tpublic void addToFollowedUsers(List<String> followedUsers);\n\n\t/**\n\t* Removes all occurences of value from the List\n\t*/\n\tpublic void removeFromFollowedUsers(String followedUsers);\n\n\t/**\n\t* Removes all occurences of all values from the List\n\t*/\n\tpublic void removeFromFollowedUsers(List<String> followedUsers);\n}", "public Object getUserObject();", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "public interface IUserView {\n\n\n public void resultDataCallBack(String name);\n}", "UserInterface modify(UserInterface userInterface, UserPreferences prefs);", "public interface IMorePersonalInfoView {\n void getMorePersonalInfoData(String userId);\n void setMorePersoalInfoData(MorePersonalInfo info);\n void showError(String errorString);\n void setHobby(String hobbys);\n void saveSucceed();\n}", "public void setUserData(Object argUserData) {\n userData = argUserData;\n }", "public interface User_data extends Logic{\n UserPO signUp(UserPO userInfo);\n UserPO login(UserPO userInfo);\n UserPO modify(UserPO userInfo);\n}", "List<UserContentAccess> findContentAccess();", "public interface User {\r\n\r\n /**\r\n * Is this user in a specified role?\r\n * @param roleName the name of the role\r\n * @return true if in role\r\n */\r\n public boolean hasRole(String roleName);\r\n\r\n /**\r\n * Remove a role. Implementation is optional\r\n */\r\n public void removeRole(String roleName) throws UnsupportedOperationException;\r\n\r\n /**\r\n * Adds a role to this user. Implementation is optional\r\n * @param roleName the name of the role\r\n */\r\n public void addRole(String roleName) throws UnsupportedOperationException;\r\n\r\n /**\r\n * Is this user in a specified group?\r\n * @param groupName\r\n * @return true if in group\r\n */\r\n public boolean inGroup(String groupName);\r\n\r\n /**\r\n * Remove a group. Implementation is optional\r\n * @param groupName\r\n */\r\n public void removeGroup(String groupName) throws UnsupportedOperationException;\r\n\r\n /**\r\n * Adds this user to a group. Implementation is optional\r\n * @param groupName\r\n */\r\n public void addGroup(String groupName) throws UnsupportedOperationException;\r\n\r\n /**\r\n * get user language\r\n * @return language string\r\n */\r\n\r\n public abstract String getLanguage();\r\n\r\n /**\r\n * get user name\r\n * @return name string\r\n */\r\n public abstract String getName();\r\n\r\n /**\r\n * get user password\r\n * @return password string\r\n */\r\n public abstract String getPassword();\r\n\r\n /**\r\n * get groups that user is in\r\n * @return\r\n */\r\n public abstract Collection getGroups();\r\n\r\n /**\r\n * get roles tha are assigned to user\r\n * @return\r\n */\r\n public abstract Collection getRoles();\r\n}", "void setPassedUser(User passedUser);", "public interface IAComponentContext\r\n {\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n public de.uka.ipd.sdq.simucomframework.variables.userdata.UserData getUserData();\r\n \t \r\n public void setUserData(de.uka.ipd.sdq.simucomframework.variables.userdata.UserData data);\r\n\n\r\n\r\n }", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "public interface UserDetailViewImpl extends IBaseViewImpl {\n void onUserDetailSuccess(UserDetailResponseBean userDetailResponseBean);\n void onUserDetailFailed(String msg);\n}" ]
[ "0.64012945", "0.62295127", "0.59505963", "0.5904618", "0.59030515", "0.5882063", "0.58803153", "0.58719486", "0.5861193", "0.5825143", "0.57922673", "0.57670736", "0.573969", "0.573196", "0.57313454", "0.5719534", "0.56751466", "0.56748104", "0.56401694", "0.5639096", "0.5633792", "0.56275636", "0.56271136", "0.5616812", "0.56041026", "0.56033146", "0.558164", "0.55602825", "0.55397916", "0.5531665", "0.55074686", "0.5495982", "0.5487714", "0.548703", "0.5481858", "0.5478094", "0.5440382", "0.54391724", "0.54302907", "0.54281974", "0.54266053", "0.54194266", "0.5410557", "0.53949606", "0.53880364", "0.53835016", "0.538229", "0.537768", "0.53733575", "0.5347221", "0.5338591", "0.5336545", "0.53329766", "0.53288054", "0.53241926", "0.5322498", "0.5321189", "0.53154033", "0.53138626", "0.53066736", "0.53050345", "0.52991146", "0.5298231", "0.5295927", "0.5292298", "0.52871287", "0.5285335", "0.5280251", "0.5280251", "0.5280251", "0.5277075", "0.52760106", "0.52721053", "0.5269789", "0.5256289", "0.5254514", "0.5249436", "0.5249372", "0.5246676", "0.52431273", "0.52423865", "0.52349156", "0.5233068", "0.52274525", "0.5226169", "0.5223288", "0.52217096", "0.52198476", "0.5215475", "0.52107936", "0.5209282", "0.5208667", "0.52036345", "0.52016354", "0.52010715", "0.5200006", "0.5199989", "0.5198969", "0.519644", "0.5194077" ]
0.7275029
0
hotel.getRooms().stream().filter(room > room.getBookings().stream() .anyMatch(booking > booking.getClientCode() == clientCode && booking.isActive())).findFirst();
public Optional<Booking> findClientActiveBooking(int clientCode) { for (Room room : hotel.getRooms()) { for (Booking booking : room.getBookings()) { if (booking.getClientCode() == clientCode && booking.isActive()) { return Optional.of(booking); } } } return Optional.empty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Appointment> getAppointmentByStatus(AppointmentStatus a){\n List<Appointment> appList = new ArrayList();\n try{\n appointments.stream().filter((app) -> (app.getStatus()==a)).forEachOrdered((app) -> {\n appList.add(app);\n });\n return appList;\n }\n catch(Exception e){\n return appList;\n }\n }", "@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfRoomsRequired());\n boolean filterByTravellers = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfTravellers());\n boolean filterByRating = !ObjectUtils.isEmpty(hotelFilterRequest.getRating());\n boolean filterByFacilities = hotelFilterRequest.getFacilities() != null && hotelFilterRequest.getFacilities().size() > 0;\n List<HotelMinimalResponseDTO> hotelMinimalResponses = hotels.stream()\n .filter(hotel -> {\n boolean roomFilter = !filterByRooms || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalNumberOfRooms(hotel) >= hotelFilterRequest.getNumberOfRoomsRequired()\n );\n boolean travelFilter = !filterByTravellers || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalRoomsCapacity(hotel) >= hotelFilterRequest.getNumberOfTravellers()\n );\n boolean ratingFilter = !filterByRating || (\n hotel.getReviews() != null && hotel.getReviews().size() > 0 &&\n getAverageRating(hotel) >= hotelFilterRequest.getRating()\n );\n List<String> facilities = new ArrayList<>();\n if (filterByFacilities) {\n facilities = getCombinedFacilities(hotel);\n }\n List<String> distinctHotelFacilities = facilities.stream().distinct().collect(Collectors.toList());\n boolean facilitiesFilter = !filterByFacilities || (distinctHotelFacilities.containsAll(hotelFilterRequest.getFacilities()));\n return roomFilter && travelFilter && ratingFilter && facilitiesFilter;\n })\n .map(this::makeHotelMinimalResponseDTO)\n .collect(Collectors.toList());\n logger.info(\"Fetched hotels information by filters successfully\");\n String sortOrder = hotelFilterRequest.getSortOrder() != null ? hotelFilterRequest.getSortOrder().equalsIgnoreCase(\"DESC\") ? \"DESC\" : \"ASC\" : \"ASC\";\n if (\"COST\".equalsIgnoreCase(hotelFilterRequest.getSortBy())) {\n hotelMinimalResponses.sort((o1, o2) -> {\n if (o1.getAverageRating().equals(o2.getAverageRating())) {\n return 0;\n } else if (o1.getAverageRating() > o2.getAverageRating()) {\n return sortOrder.equals(\"DESC\") ? -1 : 1;\n } else {\n return sortOrder.equals(\"DESC\") ? 1 : -1;\n }\n });\n }\n return hotelMinimalResponses;\n }", "ObservableList<Booking> getFilteredBookingList();", "private boolean compareBookings(Iterable<Booking> bookings,\n\t\t\tBookingRequest booking) {\n\t\tfor (Booking book : bookings) {\n\t\t\tif (book.getPerformer().equals(booking.getPerformer())\n\t\t\t\t\t&& book.getVenueName().equals(booking.getVenueName())\n\t\t\t\t\t&& booking.getOpen().equals(book.getOpen())\n\t\t\t\t\t&& booking.getClose().equals(book.getClose())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public GenericResponse<Set<BookingRoom>> findExistedBookings(User user) {\n logger.info(user.toString());\n\n GenericResponse genericResponse = HotelBookingValidation.validateUserInfo(logger, user);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<BookingRoom> existedBookings = hotel.getBookings().entrySet()\n .stream()\n .filter(booking -> booking.getValue().equals(user))\n .map(Map.Entry::getKey)\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(existedBookings);\n }", "boolean bookingListIsNotFull(Book book);", "public boolean book(Traveler traveler, int numRooms) {\n if (hotels == null) return false;\n\n boolean booked = false;\n for (Hotel hotel : hotels) {\n if (hotel.isAvailable(numRooms))\n booked = hotel.bookRooms(traveler, numRooms);\n if (booked) break;\n }\n\n return booked;\n }", "public Book getBookById(int id){\n Book book = null;\n //list.stream->to take the stream\n\n book = list.stream().filter(e->e.getId()==id).findFirst().get();\n return book;\n }", "private Optional<ItemVenda> buscarItemPorCerveja(Cerveja cerveja) {\r\n\t\t// retorna somente ItemVenda iguais ao passado no parametro \r\n\t\treturn itens.stream()\r\n\t\t\t\t.filter(i -> i.getCerveja().equals(cerveja))\r\n\t\t\t\t.findAny();\r\n\t}", "public void findingAndMatching(){\n //The anyMatch method returns a boolean and is therefore a terminal operation.\n //Is there an element in the stream matching the given predicate?\n if(menu.stream().anyMatch(Dish::isVegetarian)) {\n System.out.println(\"The menu is (somewhat) vegetarian friendly!!\");\n }\n\n //The allMatch method works similarly to anyMatch but\n // will check to see if all the elements of the stream match the given predicate.\n boolean isHealthy = menu.stream()\n .allMatch(dish -> dish.getCalories() < 1000);\n\n //It ensures that no elements in the stream\n //match the given predicate.\n boolean isHealthy2 = menu.stream()\n .noneMatch(d -> d.getCalories() >= 1000);\n\n //The findAny method returns an arbitrary element of the current stream. It can be\n //used in conjunction with other stream operations.\n Optional<Dish> dish =\n menu.stream()\n .filter(Dish::isVegetarian)\n .findAny();\n // .ifPresent(dish -> System.out.println(dish.getName());\n\n /*\n When to use findFirst and findAny\n You may wonder why we have both findFirst and findAny.\n The answer is parallelism. Finding the first element is more constraining in parallel.\n If you don’t care about which element is returned,\n use findAny because it’s less constraining when using parallel streams.\n * */\n List<Integer> someNumbers = Arrays.asList(1, 2, 3, 4, 5);\n Optional<Integer> firstSquareDivisibleByThree =\n someNumbers.stream()\n .map(n -> n * n)\n .filter(n -> n % 3 == 0)\n .findFirst(); // 9\n }", "@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }", "public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}", "public boolean checkHotelPresent(int hotelId);", "@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();", "public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }", "public List<Vehicle> filterOlderVehicles2(){\n List<Vehicle> resultingVehicles = this.vehicles.stream().filter(vehicle ->\n vehicle.isYoungerThanGivenYear(FILTER_YEAR)).collect(Collectors.toList());\n\n resultingVehicles.forEach(vehicle -> Vehicle.printMakeModelAndYear(vehicle));\n return resultingVehicles;\n }", "boolean hasFindGameRoomsResponse();", "boolean hasFindGameRoomsRequest();", "public boolean checkRoom(List<Room> list, int value){\n boolean exists = false;\n for (Room r : list){\n if(r.getId() == value)\n exists = true;\n }\n return exists;\n }", "public List<Candidates> getMultiWinnerCandidates() {\n List<Candidates> singleCandidates = getWinningSingleCandidates();\n List<Candidates> multiWinners = new ArrayList<>();\n Map<Integer, Integer> partyResult = multiService.mandatesByParty();\n for (Entry<Integer, Integer> partyMandateCount : partyResult.entrySet()) {\n int numberMandates = partyMandateCount.getValue();\n int counter=0;\n for (Candidates partyCandidates : candidateService.findByPartyId(partyMandateCount.getKey())) { \n while (numberMandates >= 1) { \n Candidates newPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n counter + 1);\n// Candidates newAlsoPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n// counter+2);\n counter++; \n if (singleCandidates.contains(newPartyCandidate)) {\n while(singleCandidates.contains(newPartyCandidate)==false){\n multiWinners.add(newPartyCandidate);\n counter++;\n break;\n }\n } else {\n multiWinners.add(newPartyCandidate);\n break;\n } \n \n }\n numberMandates--;\n \n }\n }\n\n System.out.println(multiWinners.size());\n\n for (Candidates candidate : multiWinners) {\n candidate.setCandidate_elected(\"multi\");\n candidateService.saveOrUpdate(candidate);\n }\n return multiWinners;\n }", "ObservableList<Booking> getUpcomingBookingList();", "Ticket find(String event, String sellerName) {\n return ticketList.stream()\r\n .filter(ticket -> event.equals(ticket.getEvent()) && sellerName.equals(ticket.getSellerName()))\r\n .findAny().orElse(null);\r\n }", "private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }", "public ArrayList<Flight> SearchPreferFlight1(double maxprice,Date date, String depar,String arriv){\n ArrayList<Flight> result= new ArrayList<>();\n //System.out.println(\"in_search1\\n\");\n System.out.print(maxprice + \" \");\n System.out.print(date + \" \");\n System.out.print(depar + \" \");\n System.out.print(arriv + \"\\n\");\n for(Airliners airliner:airlDir.getAirlinersList()){\n //System.out.printf(\"result of if airls eaquals is:\"+airliner.equals(airls)+\"\\n\");\n for(Flight flyt:airliner.getFleetlist()){\n System.out.print(flyt.getPrice() + \" \");\n System.out.print(flyt.getDate() + \" \");\n System.out.print(flyt.getFromlocaltion() + \" \");\n System.out.print(flyt.getTolocation() + \"\\n\");\n if( (flyt.getPrice()<=maxprice || maxprice==-1) \n &&(depar.equals(\"\")||depar.equals(flyt.getFromlocaltion()))\n &&(arriv.equals(\"\")||arriv.equals(flyt.getTolocation()))\n &&(date==null || date.equals(flyt.getDate())) ) \n {\n result.add(flyt);\n }\n } \n \n }\n System.out.printf(\"resultlist size:%d\",result.size());\n return result;\n \n }", "private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }", "List<Bill> findBillsForReservation(long reservationId);", "public boolean bookable() {\n for (Flight flight : itinerary) {\n if (flight.getNumSeats() <= 0) {\n return false;\n }\n }\n return true;\n }", "ObservableList<Appointment> getFilteredAppointmentList();", "public List<Candidates> getWinningSingleCandidates() {\n List<Candidates> allCandidates = candidateService.findAll();\n Map<Integer, Integer> mandatesResults = singleService.singleWinners();\n List<Candidates> allWinningCandidates = new ArrayList<>();\n // Map<Integer, Integer> mandatesResults = new HashMap<>();\n for (Candidates candidate : allCandidates) {\n for (Integer winnerIds : mandatesResults.keySet()) {\n if (candidate.getId().equals(winnerIds)) {\n allWinningCandidates.add(candidate);\n }\n }\n }\n\n for (Candidates candidate : allWinningCandidates) {\n candidate.setCandidate_elected(\"single\");\n candidateService.saveOrUpdate(candidate);\n }\n return allWinningCandidates;\n }", "@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "@Override\n public Set PatientsWithCaughingAndFever() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>coughingAndFever = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getPatientMedicalRecord().getSymptoms().equals(\"Coughing\") || patient.getPatientMedicalRecord().getSymptoms().equals(\"Fever\")){\n coughingAndFever.add(patient);\n }else {\n System.out.println(\"No older patients with symptoms such as caughing and fever\");\n }\n });\n }\n\n return coughingAndFever;\n }", "private void showCourtBookings()\n {\n ArrayList<Court> courtList = new ArrayList<Court>();\n ArrayList<Booking> bookingList = new ArrayList<Booking>();\n for(Sport sObj : sportsClub.sportList)\n {\n System.out.println(\"Displaying Courts for : \" + sObj.getSportName());\n courtList = sObj.getCourtList();\n for(Court cObj : courtList)\n { \n if(cObj.getCourtBookings().size()==0)\n System.out.println(\"Booking are not yet started for sport :\" + sObj.getSportName() + \" on Court : \" + cObj.getCourtId());\n else\n { \n\n Collections.sort(cObj.getCourtBookings());\n System.out.println(cObj.getCourtBookings().toString());\n\n } \n }\n } \n }", "public HotelCard searchHotel() {\n System.out.println(ANSI() + \"Here is your hotel card list:\" + ANSI_RESET);\n // Presentation of player's hotel card list\n for (HotelCard hc : hotel_list) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET);\n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET);\n }\n System.out.println(ANSI() + \"Please type the id of the hotel you choose\" + ANSI_RESET);\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : hotel_list) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET); \n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid ID\" + ANSI_RESET);\n }\n }\n // Junk \n return null;\n }", "public abstract List<LocationDto> match_building(ScheduleDto schedule,SlotDto slot);", "public Set<Booking> getBooking() {\n return booking;\n }", "LazyResponse<List<Offer> > getCurrentActiveOffers(LocationBit location);", "public Reviews filterByHotel(Hotel hotel)\n\t{\n\t\treturn filterByHotel(hotel.getId());\n\t}", "List<SrHotelRoomInfo> selectByExample(SrHotelRoomInfoExample example);", "public static ArrayList<AvailableHotelRoom> SearchByStar(int Star) {\n\t\tArrayList<AvailableHotelRoom> nAHR = new ArrayList<AvailableHotelRoom>();\n\t\tfor (AvailableHotelRoom ahr : AHR)\n\t\t\tif (ahr.getHotelStar() == Star)\n\t\t\t\tnAHR.add(ahr);\n\t\treturn nAHR;\n\t}", "private ArrayList<Room> roomAvailability(LocalDate start, LocalDate end, int small, int medium, int large) {\n ArrayList<Room> availableRooms = new ArrayList<Room>();\n // Iterate for all rooms in the venue\n for (Room room : rooms) {\n // Search the venue's reservations that contain the specified room.\n ArrayList<Reservation> reservationsWithRoom = Reservation.searchReservation(reservations, room);\n // Try to find rooms that fulfil the request.\n switch(room.getSize()) {\n case \"small\":\n // Ignore if no small rooms are needed.\n if (small > 0) {\n // If there no reservations with the room or the reserved dates do not\n // overlap, then add the room sinced it is available.\n if(reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n\n availableRooms.add(room);\n small--;\n } \n }\n break;\n\n case \"medium\":\n // Ignore if no medium rooms are needed.\n if (medium > 0) {\n \n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n medium--;\n }\n }\n break;\n\n case \"large\":\n // Ignore if no large rooms ar eneeded.\n if (large > 0) {\n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n large--;\n }\n break;\n }\n }\n }\n // A request cannot be fulfilled if there are no rooms available in the venue\n if (small > 0 || medium > 0 || large > 0) {\n \n return null;\n } else {\n return availableRooms;\n }\n }", "@Override\n public HotelReviewResponseDTO getHotelReviews(String hotelId, String gender, String residentialCity) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n boolean filterByGender = !ObjectUtils.isEmpty(gender);\n boolean filterByCity = !ObjectUtils.isEmpty(residentialCity);\n List<Review> reviews = reviewRepository.findByHotel(hotel);\n logger.info(\"Fetched hotel reviews information successfully | hotelId:{}\", hotelId);\n List<ReviewResponseDTO> reviewResponses = reviews.stream()\n .filter(review -> {\n boolean isDeleted = !review.isDeleted();\n boolean genderFilter = !filterByGender || (review.getReviewedBy() != null && review.getReviewedBy().getGender().equalsIgnoreCase(gender));\n boolean cityFilter = !filterByCity || (review.getReviewedBy() != null && review.getReviewedBy().getResidentialCity().equalsIgnoreCase(residentialCity));\n return isDeleted && genderFilter && cityFilter;\n })\n .map(review -> {\n ReviewResponseDTO reviewResponse = new ReviewResponseDTO();\n reviewResponse.setReviewId(review.getReviewId());\n reviewResponse.setComment(review.getComment());\n reviewResponse.setRatingValue(review.getRatingValue());\n if (review.getReviewedBy() != null) {\n reviewResponse.setReviewedBy(review.getReviewedBy().getFullName());\n }\n reviewResponse.setReviewedDate(review.getReviewedDate());\n return reviewResponse;\n })\n .collect(Collectors.toList());\n long ratingCount = reviews.stream().filter(review -> !review.isDeleted()).count();\n double averageRating = reviews.stream()\n .filter(review -> !review.isDeleted())\n .collect(Collectors.summarizingDouble(Review::getRatingValue))\n .getAverage();\n\n HotelReviewResponseDTO hotelReviewResponse = new HotelReviewResponseDTO();\n hotelReviewResponse.setAverageRating(averageRating);\n hotelReviewResponse.setRatingCount(ratingCount);\n hotelReviewResponse.setReviews(reviewResponses);\n return hotelReviewResponse;\n }", "public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }", "public List<Orders> findAccepted2(int userID);", "private void checkIfRestaurantShouldOpen(CityTime time) {\n\t\tif (!(CityTime.timeDifference(time, morningShiftStart) >= 0 && CityTime.timeDifference(time, morningShiftEnd) < 0) &&\n\t\t\t\t!(CityTime.timeDifference(time, afternoonShiftStart) >= 0 && CityTime.timeDifference(time, closingTime) < 0)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (host.getPerson() != null && cashier.getPerson() != null && cook.getPerson() != null) {\n\t\t\tfor (RestaurantWaiterRole w : waiters) {\n\t\t\t\tif (w.getPerson() != null) {\n\t\t\t\t\tAlertLog.getInstance().logMessage(AlertTag.RESTAURANT, this.toString(), \"Open for business!\");\n\t\t\t\t\tthis.isOpen = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testFindFreeFacility2WorkplacesFullyAvailible() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 2);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, validStartDate, validEndDate, true);\n\n\t\t// should find the one room with the two workplaces.\n\t\tassertNotNull(result);\n\t\tassertEquals(1, result.size());\n\t\tassertEquals(validStartDate, result.iterator().next().start);\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "private boolean hasSeating() {\n return getPassengers() < getSeats();\n }", "public Hotel bestHotel() {\r\n \tArrayList<Hotel> hotels = hotelDAO.getHotelList();\r\n \tHotel bestHotel=hotels.get(0);\r\n \tfor (int i=0; i<hotels.size();i++) {\r\n \t\tif(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) {\r\n \t\t\tbestHotel=hotels.get(i);\r\n \t\t}\r\n \t}\r\n \treturn bestHotel;\r\n }", "@Query(value = \"SELECT * FROM booking WHERE customer_id = ?1 AND booking_status_id = ?2\", nativeQuery = true)\n List<Booking> findBookingByCustomerAndStatus(String customerId, Integer bookingStatusId);", "void onMatched(List<Offer> offers);", "public List<Room> findAppropriate(String applicationId) throws DAOException {\n List<Room> rooms = new ArrayList<Room>();\n Map<Integer, Integer> dayCompletionList;\n boolean isAvailable = true;\n int minPlacesAvailable;\n int neededPlacesAmount = 0;\n Date mainArrival = null;\n Date mainDeparture = null;\n PreparedStatement statement = null;\n PreparedStatement getApplicationData = null;\n PreparedStatement getRoomType = null;\n PreparedStatement getApplicationsForRoom = null;\n ResultSet applicationDataResultSet;\n ResultSet resultSet;\n ResultSet roomTypeResultSet;\n ResultSet applicationsForRoom;\n try {\n getApplicationData = proxyConnection.prepareStatement(SQL_SELECT_APPLICATION_DATA);\n getApplicationData.setLong(1, Long.parseLong(applicationId));\n\n applicationDataResultSet = getApplicationData.executeQuery();\n if (applicationDataResultSet.next()) {\n neededPlacesAmount = applicationDataResultSet.getInt(1);\n mainArrival = applicationDataResultSet.getDate(2);\n mainDeparture = applicationDataResultSet.getDate(3);\n }\n getRoomType = proxyConnection.prepareStatement(SQL_SELECT_ROOM_TYPE);\n getApplicationsForRoom = proxyConnection.prepareStatement(SQL_SELECT_APPLICATIONS_FOR_ROOM);\n getApplicationsForRoom.setInt(1, CONFIRMED);\n\n statement = proxyConnection.prepareStatement(SQL_SELECT_ROOMS_FOR_APPLICATION);\n statement.setLong(1, Long.parseLong(applicationId));\n\n resultSet = statement.executeQuery();\n while (resultSet.next()) {//all rooms of type\n dayCompletionList = new HashMap<>();\n Room room = new Room();\n room.setId(resultSet.getLong(1));\n room.setMaxPlaces(resultSet.getInt(2));\n room.setPrice(resultSet.getInt(3));\n getRoomType.setLong(1, Long.parseLong(resultSet.getString(4)));\n\n roomTypeResultSet = getRoomType.executeQuery();\n if (roomTypeResultSet.next()) {\n room.setType(roomTypeResultSet.getString(1));\n }\n getApplicationsForRoom.setLong(2, room.getId());\n getApplicationsForRoom.setDate(3, mainDeparture);\n getApplicationsForRoom.setDate(4, mainArrival);\n\n applicationsForRoom = getApplicationsForRoom.executeQuery();\n //number of day from 0 year\n int firstDay;\n int lastDay;\n int placesAmount = 0;\n minPlacesAvailable = room.getMaxPlaces();\n //through all confirmed applications for current room (only in case smn has already booked it)\n while (applicationsForRoom.next()) {\n placesAmount = applicationsForRoom.getInt(1);\n firstDay = applicationsForRoom.getInt(2);\n lastDay = applicationsForRoom.getInt(3);\n Integer i = firstDay;\n while (i <= lastDay) {\n if (dayCompletionList.containsKey(i)) {\n dayCompletionList.put(i, dayCompletionList.get(i) + placesAmount);\n } else {\n dayCompletionList.put(i, placesAmount);\n }\n i++;\n }\n }\n //заполненность дней по подтвержденным заявкам (сколько уже занято)\n for (int amount : dayCompletionList.values()) {\n if (room.getMaxPlaces() - amount < minPlacesAvailable) {\n //сколько осталось мест на такой период\n minPlacesAvailable = room.getMaxPlaces() - amount;\n }\n if (amount + neededPlacesAmount > room.getMaxPlaces()) {\n isAvailable = false;\n }\n }\n if (isAvailable) {\n room.setFreePlaces(minPlacesAvailable);\n rooms.add(room);\n }\n }\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n close(statement);\n close(getApplicationData);\n close(getApplicationsForRoom);\n close(getRoomType);\n }\n return rooms;\n }", "public static void findByOR() {\n\t\tFindIterable<Document> findIterable = collection.find(or(eq(\"status\", \"A\"), lt(\"qty\", 30)));\r\n\t\tprint(findIterable);\r\n\t}", "private boolean contieneCarrera(List<ProyectoCarreraOferta> carrerasProyecto, ProyectoCarreraOferta carreraProyecto) {\r\n boolean var = false;\r\n for (ProyectoCarreraOferta pco : carrerasProyecto) {\r\n if (pco.getCarreraId().equals(carreraProyecto.getCarreraId())) {\r\n var = true;\r\n }\r\n }\r\n return var;\r\n }", "boolean overlap(Reservation other);", "public ArrayList<VacancyQueryDTO> findVacantRooms (VacancyQueryDTO query);", "List<Seat> getSeatsWithState(int filmSessionId);", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}", "@Test\n public void lab5() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n //List<Long> listOfAges = students.stream()\n Set<Long> listOfAges = students.stream()\n .filter(s -> s.getStatus() == Student.Status.HIBERNATING)\n .map(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS))\n .collect(toSet());\n\n\n }", "@Override\n public Set PatientsOlderThenEnlistedAfter() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>olderThanEnlistedSince = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getAge() > 21 && patient.getEnlistmentDate().after(new Date(01-01-2020))){\n olderThanEnlistedSince.add(patient);\n }else {\n System.out.println(\"No patients older than 21 enlisted after 1.1.2020.\");\n }\n });\n }\n\n return olderThanEnlistedSince;\n }", "@Test\n public void Given_store_with_books_When_filtering_by_existing_author_Then_only_books_of_the_author_are_returned() {\n booksList.add(B1_A);\n booksList.add(B2_A);\n booksList.add(B3_B);\n\n when(dao.getBooks()).thenReturn(booksList);\n\n List<Book> booksFilteredByAuthor = store.getBooksByAuthor(B1_A.getAuthor());\n\n assertThat(booksFilteredByAuthor).containsExactlyInAnyOrder(B1_A, B2_A);\n }", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "@Test\n\tpublic void testFindFreeFacility2Workplaces() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 2);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, validStartDate, validEndDate, false);\n\n\t\t// should find the one room with the two workplaces.\n\t\tassertNotNull(result);\n\t\tassertEquals(1, result.size());\n\t\tassertEquals(validStartDate, result.iterator().next().start);\n\t}", "@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}", "List<Appointment> getAppointmentByLawyerNumber(long lawyerNumber);", "@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }", "@Override\r\n\tpublic boolean IsSatisfiedBy(Member member) {\n\t\tboolean res=member.getLoans().stream().filter(Loan::hasNotBeenReturned).count()<3;\r\n\t\treturn res;\r\n\t}", "public static boolean CheckOverlap(int Customer_ID, LocalDate date, LocalTime start, LocalTime end, int Appointment_ID) {\n\n ObservableList<Appointment> AList = DBAppointments.GetAllAppointment();\n ObservableList<Appointment> FList = AList.filtered(A -> {\n if (A.getAppointment_ID() != Appointment_ID /*&& A.getCustomerid() == Customer_ID*/) {\n return true;\n\n }\n return false;\n });\n\n LocalDateTime ps = LocalDateTime.of(date, start);\n LocalDateTime pe = LocalDateTime.of(date, end);\n for (Appointment a : FList) {\n LocalDateTime as = LocalDateTime.of(a.getDate(), a.getStartTime());\n LocalDateTime ae = LocalDateTime.of(a.getDate(), a.getEndTime());\n\n if ((as.isAfter(ps) || as.isEqual(ps)) && as.isBefore(pe)) {\n return true;\n }\n if (ae.isAfter(ps) && (ae.isBefore(pe) || ae.isEqual(pe))) {\n return true;\n }\n if ((as.isBefore(ps) || as.isEqual(ps)) && (ae.isAfter(pe) || ae.isEqual(pe))) {\n return true;\n }\n }\n\n return false;\n }", "private Car identifyCarWinner(Collection<Car> cars) {\n\t\tOptional<Car> winner = cars.stream()\n\t\t\t.max((x, y) -> Comparator.<Double>naturalOrder()\n\t\t\t.compare(x.getDistance(), y.getDistance()));\n\t\t\n\t\treturn winner.get();\n\t}", "Reservation checkReservationByFamilyName(String familyName);", "public abstract List<LocationDto> match_building_and_type(ScheduleDto schedule, SlotDto slot);", "public boolean checkList(int[] array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tboolean flag = true;\r\n\t\t\t\r\n\t\t\twhile(i < array.length) { //Looping by room types\r\n\t\t\t\tif (array[i] <= RoomList.getQuantity(i+1)) flag = true; //If there are enough rooms, flag = true\r\n\t\t\t\telse { //else flag = false and return\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t}", "List<Booking> getBookingByUserID(LibraryUser libraryUser);", "@Override\n public List<Auction> meetCriteria(List<Auction> auctions) \n {\n List<Auction> firstCriteriaItems = criteria1.meetCriteria(auctions);\n List<Auction> otherCriteriaItems = criteria2.meetCriteria(auctions);\n // if an item b is in Collection B but is not in Collection A,\n // add item b to collection A. This yields unique elements b and a\n // in the new collection C.\n for (Auction auction : otherCriteriaItems) \n {\n if(!firstCriteriaItems.contains(auction))\n {\n firstCriteriaItems.add(auction);\n }\n }\t\n return firstCriteriaItems;\n }", "@Override\n public RoomRatesEntity findOnlineRateForRoomType(Long roomTypeId, Date currentDate) throws NoAvailableOnlineRoomRateException {\n Query query = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId\");\n query.setParameter(\"roomTypeId\", roomTypeId);\n List<RoomRatesEntity> roomRates = query.getResultList();\n\n //Check what rate type are present\n boolean normal = false;\n boolean promo = false;\n boolean peak = false;\n\n for (RoomRatesEntity roomRate : roomRates) {\n// if (!checkValidityOfRoomRate(roomRate)) { //skips expired/not started rates, price is determined by check in and check out date, it becomes not considered in our final prediction\n// continue;\n// }\n// if null do smt else\n if (roomRate.getIsDisabled() == false) {\n if (null != roomRate.getRateType()) {\n System.out.println(roomRate.getRateType());\n switch (roomRate.getRateType()) {\n case NORMAL:\n normal = true;\n \n break;\n case PROMOTIONAL:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n promo = true;\n }\n break;\n\n case PEAK:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n peak = true;\n }\n break;\n default:\n break;\n }\n }\n\n System.out.println(normal + \" \" + promo + \" \" + peak);\n //5 rules here\n if (normal && promo && peak) {\n //find promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (promo && peak && !normal || normal && peak && !promo) {\n //apply peak, assume only 1\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.PEAK);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n } else if (normal && promo && !peak) {\n //apply promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (normal && !promo && !peak) {\n //apply normal\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.NORMAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n }\n }\n\n }\n throw new NoAvailableOnlineRoomRateException(\"There is no available room rate to be used!\");\n }", "public static void findByAND_OR() {\n\t\tFindIterable<Document> findIterable = collection.find(\r\n\t\t and(eq(\"status\", \"A\"),\r\n\t\t or(lt(\"qty\", 30), regex(\"item\", \"^p\")))\r\n\t\t);\r\n\t\tprint(findIterable);\r\n\t}", "public Iterable<Boat> boatsOwnedByMember(){ return this.boats; }", "public List getValidarSapExistencia(Map criteria);", "public Booking getBooking(int bookingNr)\r\n {\r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getBookingNr() == bookingNr)\r\n {\r\n return booking;\r\n }\r\n }\r\n \r\n return null;\r\n }", "@Test\r\n\tpublic void getBookingIdWithoutFilterTest() {\n\t\tResponse response = RestAssured.get(\"https://restful-booker.herokuapp.com/booking\");\r\n\t\tresponse.print();\r\n\r\n\t\t// verify response 200\r\n\t\tAssert.assertEquals(response.getStatusCode(), 200, \"statuscode should 200 but it not\");\r\n\r\n\t\t// verify at least 1 booking id in response;\r\n\r\n\t\tList<Integer> bookingIds = response.jsonPath().getList(\"bookingid\");\r\n\r\n\t\tAssert.assertFalse(bookingIds.isEmpty(), \"LIst of booking is empty,but it not\");\r\n\r\n\t}", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "private QueryAndProgram queryAndProgFind(ProgramPath pp,String queryClause,String qp) {\n Optional opt = queryAndProgramLink.stream().filter(p -> p.qtp.queryClause.equals(queryClause) \n && p.getPaths().stream().anyMatch(q -> q.pathId.equals(pp.pathId))\n && p.queryPoint.equals(qp)).findFirst();\n // && p.getPaths().contains(pp)).findFirst();\n if(opt.isPresent())\n return (QueryAndProgram)opt.get();\n return null;\n \n \n }", "public boolean lastRoomsIsEmpty(){return this.aLastRooms.empty();}", "public static List<Parcel> getLessOrMoreBambooParcel(List<Parcel> parcels, GardenerGoal goal, boolean isMore, Board board) {\n List<Parcel> parcelsFound = new ArrayList<>();\n\n for (Parcel parcel : parcels) {\n if (BoardUtils.isParcelIrrigated(board, parcel) && parcel.getColor() == goal.getColor() && (goal.getFacility() == Facility.WHATEVER_FACILITY || parcel.getFacility() == goal.getFacility())) {\n if (isMore && parcel.getBambooStack().size() > 0 && parcel.getBambooStack().size() > goal.getSize() + 1) {\n parcelsFound.add(parcel);\n } else if (!isMore && parcel.getBambooStack().size() > 0 && parcel.getBambooStack().size() < goal.getSize() - 1) {\n parcelsFound.add(parcel);\n }\n }\n }\n return parcelsFound;\n }", "private boolean checkPlayerActionAvailability(List<PlayerAction> playerActionList, Game game, Player player) {\n List<CompositeAction> possibleActions = player.getCharacterState().getPossibleActions(game.isFrenzy());\n return possibleActions.stream()\n // checks whether the different lists of Ids of the possible actions contain the list of Ids of the input\n .filter(composite ->\n composite.getAction().stream()\n .map(Targetable::getId)\n .collect(Collectors.toList()) // list of Ids of a particular possible action\n .containsAll\n (playerActionList.stream() // list of Ids of the input\n .map(Targetable::getId)\n .collect(Collectors.toList())))\n .anyMatch(composite -> { // checks whether among the possible actions that have the same Ids as the input, the move action has an allowed distance\n Supplier<Stream<PlayerAction>> supplier = () ->\n composite.getAction().stream()\n .filter(possiblePlayerAction -> possiblePlayerAction.getId().equals(Constants.MOVE)); // gets only the Move action\n if (supplier.get().count()==0) { // checks the presence of possible actions,\n return true; // if there is none it returns true,\n } // otherwise anyMatch would return false with no elements in the stream\n boolean res = supplier.get()\n .anyMatch(possiblePlayerAction -> { // the actual anyMatch that performs the check of the Move's distance\n MovePlayerAction mpa = playerActionList.stream()\n .filter(playerAction -> playerAction.getId().equals(Constants.MOVE))\n .map(pa -> (MovePlayerAction) pa)\n .findFirst().orElseThrow(IllegalStateException::new);\n int distance = game.getBoard().getTileTree()\n .distance(mpa.getPlayer().getCharacterState().getTile(), mpa.getMoveList().get(0));\n Logger.getGlobal().info(\"allowed distance :\" + possiblePlayerAction.getAmount());\n Logger.getGlobal().info(\"actual distance:\" + distance);\n if (possiblePlayerAction.getAmount() < distance || distance == -1) {\n // the predicate that checks the distance, if the selected tile gives a\n // greater distance then the action is not allowed\n // also checks reachability\n return false;\n }\n return true;\n });\n Logger.getGlobal().info(String.valueOf(res));\n\n if (!res) {\n addErrorMessage(MOVE_ACTION_ERROR_MESSAGE);\n } else {\n resetErrorMessages();\n }\n\n return res; // the result of the the internal anyMatch, it is returned as value of the external anyMatch\n }\n );\n }", "public List<Seat> findMatch(int numOfPassengers, List<Passenger> passengerList) throws Exception{\n\t\tPassenger seats[][] = getSeats();\n\t\tList<Seat> seatList = new ArrayList<>();\n\t\t//Finds seating for 3 passengers\n\t\tif(numOfPassengers == 3) {\n\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\tif (seats[i][0] == null &&\n\t\t\t\t\t\tseats[i][1] == null &&\n\t\t\t\t\t\tseats[i][2] == null) {\n\t\t\t\t\tseatList.add(new Seat(i, 0));\n\t\t\t\t\tseatList.add(new Seat(i, 1));\n\t\t\t\t\tseatList.add(new Seat(i, 2));\n\n\t\t\t\t\treturn seatList;\n\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 1] == null &&\n\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 2] == null &&\n\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 3] == null) {\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 1));\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 3));\n\n\t\t\t\t\treturn seatList;\n\t\t\t\t}\n\n\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(numOfPassengers == 2) {\n\t\t\tboolean noOneWantsWindow = false;\n\t\t\tif(!passengerList.get(0).getSeatingPreference().equals(SeatingPreferences.WINDOW) &&\n\t\t\t\t\t!passengerList.get(0).getSeatingPreference().equals(SeatingPreferences.WINDOW)) {\n\t\t\t\tnoOneWantsWindow = true;\n\t\t\t}\n\t\t\t//Finds seating for passengers who don't want to sit near a window\n\t\t\tif(noOneWantsWindow) {\n\t\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\t\tif (seats[i][1] == null &&\n\t\t\t\t\t\t\tseats[i][2] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, 1));\n\t\t\t\t\t\tseatList.add(new Seat(i, 2));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 2] == null &&\n\t\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 3] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 3));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\t\tif (seats[i][0] == null &&\n\t\t\t\t\t\t\tseats[i][1] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, 0));\n\t\t\t\t\t\tseatList.add(new Seat(i, 1));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 1] == null &&\n\t\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 2] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 1));\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public boolean checkWithFragmentingWarhead ()\n {\n List<Player> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate);\n }\n\n for (Player playerIterate : players)\n {\n if (playerIterate.getSquare().getPlayerList().size()>1)\n return true;\n }\n\n return false;\n }", "List<Reservation> findReservationsByUserBookId (Long userId);", "@Test\n\tpublic void testFindFreeFacility2WorkplacesNotFullyAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(workplace1.getId()), startDate,\n\t\t\t\treservationEndDate);\n\n\t\t// search for 2 workplaces\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 2);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, true);\n\n\t\t// should find no room because room1 is not fullyAvailible\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "default <K> List<Condition> composeFilterConditionsForCompositePrimaryKey(K key) {\n\t\tList<Condition> conditions = new ArrayList<>();\n\t\tList<Pair<Attribute<T, ?>, Object>> attributesToValues = decomposePrimaryKey(key);\n\t\tif (attributesToValues != null) {\n\t\t\tfor (Pair<Attribute<T, ?>, Object> p : attributesToValues) {\n\t\t\t\tAttribute<T, ?> attr = p.getFirst();\n\t\t\t\tObject value = p.getSecond();\n\t\t\t\tconditions.add(Condition.eq(attr, value));\n\t\t\t}\n\t\t}\n\t\treturn conditions;\n\t}", "protected Optional<Counter> find(Function<Counter, Boolean> func) {\n return servers.stream()\n .filter(x -> func.apply(x).equals(true))\n .findFirst();\n }", "public List<Employee> getEmployeesByOffice(String officeCode) {\n return employeeDao.selectOfficeCode(officeCode);\n// return getAll().stream().filter(emp -> emp.getOfficeCode() == null\n// ? null\n// : emp.getOfficeCode().equals(officeCode))\n// .collect(Collectors.toList());\n }", "boolean isWinningCombination(Ticket ticket);", "public static void main(String[] args) {\t\r\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Amit\", \"DSFSDF8989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"SDFSDF23423\", 63));\r\n\t\tempList.add(new Employee(\"Syamala\", \"SDFSDF23423\", 343));\r\n\t\r\n//\t\tusing ifPresent to avoid returning empty data.\r\n\t\tempList.stream()\r\n\t\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t\t.findFirst()\r\n\t\t\t\t.ifPresent(System.out::println);\r\n\t\t\r\n//\t\t\r\n\t\tOptional<Employee> optionalEmployee = empList.stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(emp -> emp.getName().matches(\"dummy\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t.findFirst();\r\n\t\tSystem.out.println(\"optionalEmployee: \" + optionalEmployee.toString());\r\n\t\t\r\n\t\t\r\n//\t\tuse of Stream.findAny() method\r\n//\t\tunlike findFirst() the findAny() method select any element of the stream in parallel stream,\r\n//\t\tto increase the performance of the application,\r\n//\t\tThe cost of invoking multiple invocation on same source of data may not return same result!\r\n//\t\thence try to use the findFirst() instread.\r\n\t\tempList.stream()\r\n\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t.findAny()\r\n\t\t\t.ifPresent(System.out::println);\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public LiveData<GetUserHouseJob> getUserHouse() {\n GetUserHouseJob getUserHouseJob = new GetUserHouseJob(FirestoreJob.JobStatus.IN_PROGRESS);\n MutableLiveData<GetUserHouseJob> job = new MutableLiveData<>(getUserHouseJob);\n\n db.collection(HOUSES_COLLECTION_NAME)\n .whereGreaterThan(\"roomies.\" + FirebaseAuth.getInstance().getCurrentUser().getUid(), \"\")\n .get()\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n if (task.getResult().size() == 1) {\n getUserHouseJob.setUserHasHouse(true);\n getUserHouseJob.setHouse(\n task.getResult().getDocuments().get(0).toObject(House.class)\n );\n getUserHouseJob.setJobStatus(FirestoreJob.JobStatus.SUCCESS);\n } else if (task.getResult().size() == 0) {\n getUserHouseJob.setUserHasHouse(false);\n getUserHouseJob.setJobStatus(FirestoreJob.JobStatus.SUCCESS);\n } else {\n // found multiple houses - this should not happen\n getUserHouseJob.setJobStatus(FirestoreJob.JobStatus.ERROR);\n getUserHouseJob.setJobErrorCode(FirestoreJob.JobErrorCode.GENERAL);\n }\n\n job.setValue(getUserHouseJob);\n } else {\n getUserHouseJob.setJobStatus(FirestoreJob.JobStatus.ERROR);\n getUserHouseJob.setJobErrorCode(FirestoreJob.JobErrorCode.GENERAL);\n\n job.setValue(getUserHouseJob);\n\n Log.d(TAG, \"Error while fetching the user house: \", task.getException());\n }\n });\n\n return job;\n }", "public void exercise() {\n List<Transaction> ex1 = transactions.stream()\n .filter(transaction -> transaction.getYear() == 2011)\n .sorted(Comparator.comparing(Transaction::getValue))\n .collect(Collectors.toList());\n System.out.println(ex1);\n\n //2 What are all the unique cities where the traders work?\n List<String> ex2 = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .distinct()\n .collect(Collectors.toList());\n System.out.println(ex2);\n\n //alternative solution\n Set<String> ex2alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getCity())\n .collect(Collectors.toSet());\n\n //3 Find all traders from Cambridge and sort them by name.\n List<Trader> ex3 = transactions.stream()\n .map(Transaction::getTrader)\n .distinct()\n .filter(trader -> trader.getCity() == \"Cambridge\")\n .sorted(Comparator.comparing(Trader::getName))\n .collect(Collectors.toList());\n System.out.println(ex3);\n\n //4 Return a string of all traders’ names sorted alphabetically.\n String ex4 = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .reduce(\"\", (n1, n2) -> n1 + n2);\n System.out.println(ex4);\n\n //alternative solution\n String ex4Alt = transactions.stream()\n .map(transaction -> transaction.getTrader().getName())\n .distinct()\n .sorted()\n .collect(Collectors.joining());\n System.out.println(ex4Alt);\n\n //5 Are any traders based in Milan?\n Boolean ex5 = transactions.stream()\n .anyMatch(transaction -> transaction.getTrader().getCity().equals(\"Milan\"));\n System.out.println(ex5);\n\n //6 Print the values of all transactions from the traders living in Cambridge.\n transactions.stream()\n .filter(transaction -> transaction.getTrader().getCity().equals(\"Cambridge\"))\n .forEach(System.out::println);\n\n //7 What’s the highest value of all the transactions?\n Optional<Integer> ex7 = transactions.stream()\n .map(Transaction::getValue)\n .reduce(Integer::max);\n System.out.println(ex7);\n\n //8 Find the transaction with the smallest value.\n Optional<Transaction> ex8 = transactions.stream()\n .reduce((t1, t2) -> t1.getValue() < t2.getValue() ? t1 : t2);\n System.out.println(ex8);\n\n //alternative solution\n Optional<Transaction> ex8Alt = transactions.stream()\n .min(Comparator.comparing(Transaction::getValue));\n System.out.println(ex8Alt);\n\n }", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }" ]
[ "0.5584621", "0.556784", "0.55280876", "0.5274865", "0.5260311", "0.521304", "0.51604164", "0.5067801", "0.49666843", "0.4958298", "0.4950058", "0.49487737", "0.493667", "0.4912274", "0.4901992", "0.48909512", "0.48386723", "0.48363087", "0.47994605", "0.47698626", "0.47591522", "0.47280675", "0.465662", "0.46387818", "0.4628039", "0.46271878", "0.4589315", "0.45740137", "0.45717248", "0.45671242", "0.45630345", "0.4548246", "0.45441207", "0.45421118", "0.45373648", "0.45305166", "0.45304534", "0.45292023", "0.45256436", "0.4524153", "0.45056382", "0.44965097", "0.44876018", "0.4478829", "0.44759837", "0.4465552", "0.44638053", "0.44636238", "0.44589636", "0.44554153", "0.44553068", "0.4453298", "0.44531283", "0.4446676", "0.44443467", "0.44375503", "0.44303575", "0.44262028", "0.4422457", "0.44211796", "0.4418856", "0.4415877", "0.44082546", "0.4399659", "0.43996558", "0.439849", "0.43877667", "0.43877575", "0.4381463", "0.43784928", "0.4367882", "0.4367606", "0.43602276", "0.43521753", "0.43503383", "0.434834", "0.43460798", "0.43459287", "0.43421164", "0.4341028", "0.4340131", "0.43391946", "0.43385106", "0.4331285", "0.4330023", "0.4326754", "0.43264574", "0.4326378", "0.43255585", "0.43207845", "0.43203482", "0.43170667", "0.43091884", "0.43067503", "0.43052503", "0.43032262", "0.43009183", "0.42981687", "0.42978314", "0.42970318" ]
0.69752574
0
Constructs a Scanner for input from the console.
public Ch12Ex1to9() { scan = new Scanner( System.in ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ConsoleScanner() {}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "public ConsoleView() {\n\t\tcrapsControl = new CrapsControl();\n\t\tinput = new Scanner(System.in);\n\t}", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public Console(Client client, Controller controller){\r\n\t\tsuper(client,controller);\r\n\t\tsc = new Scanner(System.in);\r\n\t\tnew Thread(new ReadInput()).start();\r\n\t}", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public CLI()\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = \"\";\r\n\t\t//this.exitStr = exitStr;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public Scanner getScanner(){\n\t\t\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t\t//DIFFERENT FROM OTHER INIT FILE!\n\t\t\t\tfilename = filename.trim().replace(\".s230\", \".S230\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tString dirName = System.getProperty(\"user.dir\");\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\source\",\"\\\\\").trim();\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\classes\",\"\\\\\").trim();\n\t\tdirName = dirName.concat(\"\\\\InputOutputFolder\\\\\");\n\t\tSystem.out.println(dirName+filename);\n\t\tFile file = new File(dirName, filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public Game()\n {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Get player name\"); \n playerName = userInput.nextLine(); \n }", "public Scanner getScanner(){\n\t\t\n\t\tboolean hasFile = false;\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\thasFile = true;\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tFile file = new File(System.getProperty(\"user.dir\")+\"\\\\ARM230Compiler\\\\InputOutputFolder\\\\\", filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}", "public AnalizadorSintactico(java_cup.runtime.Scanner s) {super(s);}", "public Menu(Calendar calendar) {\n this.calendar = calendar;\n input = new Scanner(System.in);\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public static void initiate() {\n System.out.println(\n \" Welcome to crawler by sergamesnius \\n\" +\n \" 1. Start \\n\" +\n \" 2. Options \\n\" +\n \" 3. Print top pages by total hits \\n\" +\n \" 4. Exit \\n\" +\n \"------======------\"\n\n\n );\n try {\n int input = defaultScanner.nextInt();\n switch (input) {\n case 1:\n System.out.println(\"Input URL link\");\n Console.start(defaultScanner.next());\n break;\n case 2:\n Console.options();\n break;\n case 3:\n Console.printResultsFromCSV();\n break;\n case 4:\n return;\n }\n } catch (NoSuchElementException e) {\n System.err.println(\"Incorrect input\");\n defaultScanner.next();\n }\n Console.initiate();\n }", "public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }", "public GameMainMenu(Scanner in) {\n this.in = in;\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}", "public SintacticoH(java_cup.runtime.Scanner s) {\r\n super(s);\r\n }", "public parser(Scanner s) {super(s);}", "public Skeleton() throws IOException {\n\t\tconsoleIn = new BufferedReader(new InputStreamReader(System.in));\n\t}", "public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\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 static void setScanner(Scanner s) {\n scanner = s;\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "public void getInput(){\n\t\tScanner scan= new Scanner(System.in);\n\t\t//Get the range\n\t\tif(scan.hasNext()){\n\t\t\tcount=Integer.parseInt(scan.nextLine()); \n\t\t}\n\t\t//Initialize the array\n\t\tpeople = new People[count];\n\t\t//Get the array elements\n\t\tint i=0;\n\t\twhile(i<count){\n\t\t\tString lin[] = scan.nextLine().split(\" \");\n\t\t\tpeople[i] = new People(Integer.parseInt(lin[0]), Double.parseDouble(lin[1]));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t\n\t}", "public void readInput(Scanner inputScanner) throws RuntimeException {\n\n\t\tcolumns = inputScanner.nextInt();\n\t\trows = inputScanner.nextInt();\n\t\tinputScanner.nextLine(); // omit the newline\n\n\t\tcellMatrix = new Cell[rows][columns];\n\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tfor (int col = 0; col < columns; col++) {\n\t\t\t\tString data = inputScanner.nextLine().trim().toUpperCase();\n\t\t\t\tint cellNumber = (row * columns) + col;\n\t\t\t\tcellMatrix[row][col] = new Cell(cellNumber, row, col, data);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "private void inicializar()\n\t{\n\t\tif( this.getIn() != null )\n\t\t\tthrow new ConsolaTecladoSoloPuedeHaberUnaInstanciaException();\n\t\t\t\n\t\tthis.setIn( new Scanner( System.in ) );\n\t}", "public static void main(String[] args) {\n\n\t\tScanner console = new Scanner(System.in);\n\t\tint numEntries = console.nextInt();\n\t\tfor(int ii = 0; ii < numEntries; ii++){\n\t\t\tconsole.nextLine();\n\t\t\tString lineScan = console.nextLine();\n\t\t}\n\t}", "public static void echoContents(Scanner in) {\n }", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "private static Scanner createScanner(File inputFile)\n\t{\n\t\t/// create Scanner to read from file and also check if the file exists\n\t Scanner in = null; // closes before the end of readDataFile\n\t try \n\t {\n\t \tin=new Scanner(inputFile);\n\t }\n\t catch(FileNotFoundException e) \n\t {\n\t \tSystem.out.println(\"The file \"+ inputFile.getName() + \" can not be found!\");\n\t \tSystem.exit(0);\n\t }\n\t \n\t return in;\n\t}" ]
[ "0.7679628", "0.73641104", "0.7144629", "0.6991727", "0.6991727", "0.6892135", "0.6863805", "0.6863805", "0.6814603", "0.6776605", "0.6564853", "0.651814", "0.6506444", "0.6431977", "0.6383405", "0.6333323", "0.62605554", "0.62468827", "0.62176657", "0.62101084", "0.6177626", "0.6177626", "0.61502236", "0.61356956", "0.6111675", "0.6088265", "0.60809493", "0.6070492", "0.6070492", "0.6070492", "0.6070492", "0.6070492", "0.6070492", "0.6070492", "0.6070492", "0.603575", "0.603575", "0.603575", "0.603575", "0.603575", "0.603575", "0.6014265", "0.6013943", "0.6012991", "0.59845877", "0.59750056", "0.5939068", "0.5905191", "0.5888931", "0.5885416", "0.58808357", "0.58780825", "0.5847205", "0.5844294", "0.58303255", "0.57903457", "0.5750004", "0.5734276", "0.5726419", "0.5701307", "0.5686854", "0.5681579", "0.5681021", "0.5679175", "0.56735396", "0.56713814", "0.5648852", "0.56324273", "0.56283224", "0.561445", "0.5584396", "0.55656195", "0.5562249", "0.55562454", "0.5554719", "0.5531011", "0.55215394", "0.5517498", "0.5517498", "0.5517498", "0.5517498", "0.5517498", "0.5517498", "0.5517498", "0.551702", "0.551702", "0.551702", "0.551702", "0.551702", "0.551702", "0.551702", "0.551702", "0.551702", "0.5511042", "0.550191", "0.5496026", "0.5478437", "0.5478177", "0.54688346", "0.54631454" ]
0.61801434
20
Constructs a Scanner to evaluate passed input (used for testing).
public Ch12Ex1to9( String str ) { scan = new Scanner( str ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}", "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 static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "private ConsoleScanner() {}", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public SintaxAnalysis(java_cup.runtime.Scanner s) {super(s);}", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public parser(Scanner s) {super(s);}", "public Scanner getScanner(){\n\t\t\n\t\tboolean hasFile = false;\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\thasFile = true;\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tFile file = new File(System.getProperty(\"user.dir\")+\"\\\\ARM230Compiler\\\\InputOutputFolder\\\\\", filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public void readInput(Scanner inputScanner) throws RuntimeException {\n\n\t\tcolumns = inputScanner.nextInt();\n\t\trows = inputScanner.nextInt();\n\t\tinputScanner.nextLine(); // omit the newline\n\n\t\tcellMatrix = new Cell[rows][columns];\n\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tfor (int col = 0; col < columns; col++) {\n\t\t\t\tString data = inputScanner.nextLine().trim().toUpperCase();\n\t\t\t\tint cellNumber = (row * columns) + col;\n\t\t\t\tcellMatrix[row][col] = new Cell(cellNumber, row, col, data);\n\t\t\t}\n\t\t}\n\t}", "public Scanner getScanner(){\n\t\t\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t\t//DIFFERENT FROM OTHER INIT FILE!\n\t\t\t\tfilename = filename.trim().replace(\".s230\", \".S230\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tString dirName = System.getProperty(\"user.dir\");\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\source\",\"\\\\\").trim();\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\classes\",\"\\\\\").trim();\n\t\tdirName = dirName.concat(\"\\\\InputOutputFolder\\\\\");\n\t\tSystem.out.println(dirName+filename);\n\t\tFile file = new File(dirName, filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn toReturn;\n\t}", "private Scanner getScanner(String fixedString) throws IOException {\n\t\tURLConnection connection = new URL(SUPERVALU_URL_START +fixedString).openConnection();\n\t\treturn new Scanner(connection.getInputStream());\n\t}", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "private static Scanner createScanner(File inputFile)\n\t{\n\t\t/// create Scanner to read from file and also check if the file exists\n\t Scanner in = null; // closes before the end of readDataFile\n\t try \n\t {\n\t \tin=new Scanner(inputFile);\n\t }\n\t catch(FileNotFoundException e) \n\t {\n\t \tSystem.out.println(\"The file \"+ inputFile.getName() + \" can not be found!\");\n\t \tSystem.exit(0);\n\t }\n\t \n\t return in;\n\t}", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "public XPathParser(java_cup.runtime.Scanner s) {super(s);}", "public CompParser(java_cup.runtime.Scanner s) {super(s);}", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "@Test\n public void testConstructor() {\n System.out.println(\"KEntry\");\n String expResult = \"a 2 - 9 3\";\n Scanner scanner = new Scanner(expResult);\n KEntry instance = new KEntry(scanner);\n assertEquals(\"direction\", Direction.HORIZONTAL, instance.getDirection());\n assertEquals(\"toString\", expResult, instance.toString());\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public java_cup.runtime.Symbol scan()\r\n throws java.lang.Exception\r\n {\r\n\r\n\tSymbol s = this.getScanner().next_token();\r\n\tif (s != null && s.value != null) \r\n\t\tlog.info(s.toString() + \" \" + s.value.toString());\r\n\treturn s;\r\n\r\n }", "public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}", "public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public QuestionsGame(Scanner input){\n //initialize questionTree by using content stored in input\n this.questionTree = this.readTree(input);\n }", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public void parse(Scanner S) {\n if (!S.expectedToken(Core.INPUT)) {\n Utility.expectedhelper(Core.INPUT, S.currentToken());\n System.exit(-1);\n }\n if (S.currentToken() == Core.ID) {\n id = S.getID();\n S.nextToken();\n } else {\n Utility.expectedhelper(Core.ID, S.currentToken());\n System.exit(-1);\n }\n if (!S.expectedToken(Core.SEMICOLON)) {\n Utility.expectedhelper(Core.SEMICOLON, S.currentToken());\n System.exit(-1);\n }\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public MJParser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner scan() throws LexicalException {\r\n\t\t/* TODO Replace this with a correct and complete implementation!!! */\r\n\t\tint pos = 0;\r\n\t\tint line = 1;\r\n\t\tint posInLine = 1;\r\n\t\tboolean isEOF = true;\r\n\t\twhile(pos < chars.length - 1) {\r\n\t\t\t\r\n\t\t\tchar c = chars[pos];\r\n\t\t\t\r\n\t\t\t// Check if valid character or throw Lexical Exception\r\n\t\t\tif(!(Character.isDigit(c) || Character.isWhitespace(c) || idSet.contains(c) || opSet.contains(c) || \r\n\t\t\t\t\tsepSet.contains(c) || c == '\"' || c == '\\0' || whSet.contains(c)))\r\n\t\t\t\tthrow new LexicalException(c + \" isn't a valid character\", pos);\r\n\t\t\t\r\n\t\t\t//Check if EOFChar\r\n\t\t\tif(c == '\\0') {\r\n\t\t\t\ttokens.add(new Token(Kind.EOF, pos, 0, line, posInLine));\r\n\t\t\t\tisEOF = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check if new line\r\n\t\t\tif(chars[pos] == '\\n' || chars[pos] == '\\r') {\r\n\t\t\t\tif(chars[pos] == '\\r' && chars[pos + 1] == '\\n')\r\n\t\t\t\t\tpos++;\r\n\t\t\t\tline++;\r\n\t\t\t\tposInLine = 0;\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t// Check if comment\r\n\t\t\tif(pos < chars.length - 1 && (chars[pos] == '/' && chars[pos+1] == '/')){\r\n\t\t\t\tpos += 2;\r\n\t\t\t\twhile(pos < chars.length - 1) {\r\n\t\t\t\t\tif(chars[pos] == '\\n' || chars[pos] == '\\r') {\r\n\t\t\t\t\t\tif(chars[pos] == '\\r' && chars[pos + 1] == '\\n')\r\n\t\t\t\t\t\t\tpos++;\r\n\t\t\t\t\t\tline++;\r\n\t\t\t\t\t\tposInLine = 0;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t}\r\n\t\t\t\tif(!(pos < chars.length))\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// Check if seperator\r\n\t\t\tif(sepSet.contains(chars[pos])) {\r\n\t\t\t\tif(chars[pos] == ';'){\r\n\t\t\t\t\ttokens.add(new Token(Kind.SEMI, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '(') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.LPAREN, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == ')') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.RPAREN, pos, 1, line, posInLine));\r\n\t\t\t\t}\t\r\n\t\t\t\tif(chars[pos] == '[') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.LSQUARE, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif(chars[pos] == ']') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.RSQUARE, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif(chars[pos] == ',') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.COMMA, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t// Check if operator\r\n\t\t\tif(opSet.contains(chars[pos])) {\r\n\t\t\t\tif(chars[pos] == '=') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '=') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_EQ, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_ASSIGN, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_ASSIGN, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\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\tif(chars[pos] == '>') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '=') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_GE, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_GT, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_GT, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '-') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '>') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_RARROW, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_MINUS, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_MINUS, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '<') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '=') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_LE, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(chars[pos] == '-') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_LARROW, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_LT, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_LT, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '!') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '=') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_NEQ, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_EXCL, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_EXCL, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '?') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_Q, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == ':') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_COLON, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '&') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_AND, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '|') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_OR, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '+') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_PLUS, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '*') {\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tif(pos < chars.length) {\r\n\t\t\t\t\t\tif(chars[pos] == '*') {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_POWER, pos - 1, 2, line, posInLine));\r\n\t\t\t\t\t\t\tposInLine++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ttokens.add(new Token(Kind.OP_TIMES, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\t\tpos--;\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\ttokens.add(new Token(Kind.OP_TIMES, pos - 1, 1, line, posInLine));\r\n\t\t\t\t\t\tpos--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(chars[pos] == '/') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_DIV, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '%') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_MOD, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tif(chars[pos] == '@') {\r\n\t\t\t\t\ttokens.add(new Token(Kind.OP_AT, pos, 1, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check if Integer Literal\r\n\t\t\tif(chars[pos] == '0') {\r\n\t\t\t\ttokens.add(new Token(Kind.INTEGER_LITERAL, pos, 1, line, posInLine));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(intLitSet.contains(chars[pos])) {\r\n\t\t\t\tint marker = pos;\r\n\t\t\t\twhile(marker < chars.length && (intLitSet.contains(chars[marker]) || chars[marker] == '0'))\r\n\t\t\t\t\tmarker++;\r\n\t\t\t\t\r\n\t\t\t\tString sb = String.valueOf(chars).substring(pos, marker);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tInteger.parseInt(sb);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\tthrow new LexicalException(sb + \" exceeds the integer range.\", pos);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttokens.add(new Token(Kind.INTEGER_LITERAL, pos, marker - pos, line, posInLine));\r\n\t\t\t\tposInLine += marker - (pos + 1);\r\n\t\t\t\tpos = marker - 1;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check if Identifier\r\n\t\t\tif(idSet.contains(chars[pos])) {\r\n\t\t\t\tint marker = pos;\r\n\t\t\t\twhile(marker < chars.length && (idSet.contains(chars[marker]) || intLitSet.contains(chars[marker]) || chars[marker] == '0')) {\r\n\t\t\t\t\tmarker++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString sb = String.valueOf(chars).substring(pos, marker);\r\n\t\t\t\tif(keywordMap.containsKey(sb)) {\r\n\t\t\t\t\ttokens.add(new Token(keywordMap.get(sb), pos, marker - pos, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\telse if(sb.equals(\"true\") || sb.equals(\"false\")){\r\n\t\t\t\t\ttokens.add(new Token(Kind.BOOLEAN_LITERAL, pos, marker - pos, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokens.add(new Token(Kind.IDENTIFIER, pos, marker - pos, line, posInLine));\r\n\t\t\t\t}\r\n\t\t\t\tposInLine += marker - (pos + 1);\r\n\t\t\t\tpos = marker - 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check if valid String Literal\r\n\t\t\tif(chars[pos] == '\\\"') {\r\n\t\t\t\tboolean flag = false;\r\n\t\t\t\tint marker = pos;\r\n\t\t\t\twhile(marker < chars.length - 1) {\r\n\t\t\t\t\tmarker++;\r\n\t\t\t\t\tif(chars[marker] == '\\\"') {\r\n\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(chars[marker] == '\\n' || chars[marker] == '\\r') {\r\n\t\t\t\t\t\tflag = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(chars[marker] == '\\\\') {\r\n\t\t\t\t\t\tmarker++;\r\n\t\t\t\t\t\tString chk = new StringBuilder().append('\\\\').append(chars[marker]).toString();;\r\n\t\t\t\t\t\tif(!esSet.contains(chk)) {\r\n\t\t\t\t\t\t\tthrow new LexicalException(\"Invalid String literal\", marker);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t\tthrow new LexicalException(\"Invalid String literal\", marker);\r\n\t\t\t\telse {\r\n\t\t\t\t\ttokens.add(new Token(Kind.STRING_LITERAL, pos, marker - pos + 1, line, posInLine));\r\n\t\t\t\t\tposInLine += marker - pos;\r\n\t\t\t\t\tpos = marker;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpos++;\r\n\t\t\tposInLine++;\r\n\t\t}\r\n\t\tif(isEOF)\r\n\t\t\ttokens.add(new Token(Kind.EOF, pos, 0, line, posInLine));\r\n\t\treturn this;\r\n\r\n\t}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public interface IOperation {\n Scanner scanner=new Scanner(System.in);\n void work(BookList bookList);\n}", "public CalculatorTokenStream(String input) {\n\t\tscanner = new CalculatorScanner(input);\n\t\t// prime the first token.\n\t\tadvance();\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public static void launch(Scanner userinput) {\n int userint; //initializes the variable before hand so it can be modified to catch exception without compile issues\n userint = userinput.nextInt();//handled to take int for the function poschecker\n methods.poschecker(userint);//function to validate if its positive\n }", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}" ]
[ "0.67595524", "0.6731651", "0.67129594", "0.67129594", "0.6556401", "0.64397925", "0.63161576", "0.62522614", "0.6245106", "0.62130827", "0.62130827", "0.62130827", "0.62130827", "0.62130827", "0.62130827", "0.62130827", "0.62130827", "0.62028503", "0.6168102", "0.61573267", "0.6144739", "0.6138954", "0.6046805", "0.6046805", "0.6046805", "0.6046805", "0.6046805", "0.6046805", "0.6022208", "0.6010987", "0.597408", "0.5952059", "0.5952059", "0.5950464", "0.5938074", "0.593184", "0.59166485", "0.5897312", "0.5857775", "0.58452576", "0.58452576", "0.5832924", "0.5793174", "0.5792418", "0.57688195", "0.576298", "0.5738241", "0.570925", "0.5708248", "0.5702903", "0.56820184", "0.56502163", "0.5634423", "0.5627535", "0.5622759", "0.55974984", "0.5595828", "0.55902636", "0.5587612", "0.55859476", "0.55815893", "0.5558995", "0.5556828", "0.555086", "0.555086", "0.555086", "0.555086", "0.555086", "0.555086", "0.555086", "0.555086", "0.555086", "0.5507326", "0.5489786", "0.54810244", "0.54759455", "0.5470604", "0.5465004", "0.54510826", "0.5445754", "0.5445754", "0.5445754", "0.5445754", "0.5445754", "0.5445754", "0.5445754", "0.5432668", "0.5427627", "0.5404117", "0.5395202", "0.53947455", "0.53947455", "0.5348155", "0.53409827", "0.5332968", "0.53214043", "0.5317396", "0.5307799", "0.52905315", "0.52827626", "0.52766293" ]
0.0
-1
Calculate discounted price of item.
public void discountPrices() { System.out.print( "Enter amount of purchases: " ); int cost = scan.nextInt(); int discount = cost - cost / 10; if ( cost > 1000 ) { System.out.print( "Discounted price: " + discount ); } else { System.out.print( "Discounted price: " + cost ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDiscountedPrice(double itemPrice);", "public double discountedPrice (){\n return basePrice - basePrice * discountRate;\n }", "public double applyDiscount(){\n SaleDTO saleDTO = sale.createSaleDTO();\n List<DiscountDTO> itemDiscounts=dc.findDiscounts(saleDTO,new ItemDiscount());\n List<DiscountDTO> saleDiscounts=dc.findDiscounts(saleDTO,new SaleDiscount());\n \n sale.applyItemDiscounts(itemDiscounts);\n sale.applyDiscounts(saleDiscounts);\n return sale.getTotalPrice();\n }", "public double discountPrice() {\n double tot = 0;\n for (Equipment e : equipments) {\n tot += e.discountPrice();\n }\n\n return tot;\n }", "@Override\n\tpublic double calcDiscount() {\n\t\treturn discount;\n\t}", "BigDecimal getDiscount();", "double calculateNewPrice(double discount_rate, double price);", "float getDiscount();", "public abstract double applyDiscount(double p);", "public abstract double getDiscount(int qty, double price);", "Optional<BigDecimal> getDiscountedTotalPrice(List<Item> items) throws CheckoutProcessingException;", "public double getDiscount();", "public double getDiscount(){\n\t\tdouble sub_tot = getSubTotal();\n\t\tdouble discount_rate = getDiscountRate();\n\t\tdouble discount = sub_tot * discount_rate;\n\t\t//this should round the discount to 2 decimal places\n\t\tdouble rounded_discount = Math.round(discount * 100.0) / 100.0;\n\t\treturn rounded_discount;\n\t}", "public BigDecimal getDiscountPrice() {\n return discountPrice;\n }", "Money getDiscountValue();", "@Override\n\tpublic double getDiscountedPrice (double price) {\n\t\treturn price - 5;\n\t}", "abstract double calculateCurrentDiscountRate();", "@Override\n\tpublic double getDiscount(double price) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getUnitPrice()\n\t{\n\t\tdouble discount = discountRate * super.getUnitPrice();\n\t\tdiscountedprice=discount;\n\t\treturn (int) Math.floor(super.getUnitPrice() -discount);\n\t}", "@Override\n\tpublic float discount() {\n\t\treturn 5.0f;\n\t}", "public static double computeDiscountInfo(double price, double discountRate)\n\t {\n\t\t double savings;\n\t\t savings = price * discountRate / 100;\n\t\t return savings;\n\t }", "public void getDiscount(){\n System.out.println(\"10% off, final price: \" + price * 0.9);\n }", "public abstract double getDepositDiscount();", "public Float getDiscountPrice() {\n return this.DiscountPrice;\n }", "public abstract double getDiscountRate();", "@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }", "public String calculateTotal(String quantity, String price, String discount) {\n double percentageDisc, discountedPrice, total;\n percentageDisc = Double.parseDouble(discount) / 100;\n discountedPrice = Double.parseDouble(price) - (Double.parseDouble(price) * percentageDisc);\n total = (Double.parseDouble(quantity) * discountedPrice);\n return df2.format(total);\n }", "public java.math.BigDecimal getDiscount () {\n\t\treturn discount;\n\t}", "public double getPricePerItem()\r\n {\r\n return pricePerItem;\r\n }", "public double discountRate () {\n return discountRate;\n }", "private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}", "public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }", "public double getDiscount()\n\t{\n\t\tif(customerPurchase >= 2000)\n\t\t\treturn 0.1;\n\t\telse if(customerPurchase >= 1500)\n\t\t\treturn 0.07;\n\t\telse if(customerPurchase >= 1000)\n\t\t\treturn 0.06;\n\t\telse if(customerPurchase >= 500)\n\t\t\treturn 0.05;\n\t\telse\n\t\t\treturn 0;\n\t}", "public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}", "float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}", "@SuppressWarnings(\"rawtypes\")\n public double calculateCouponItemDiscountAdjustments(List commerceItems) {\n double discountAdjustment = 0.0d;\n if (commerceItems != null && commerceItems.size() > 0) {\n Iterator iter = commerceItems.iterator();\n while (iter.hasNext()) {\n MFFCommerceItemImpl pItem = (MFFCommerceItemImpl) iter.next();\n if (pItem.getPriceInfo() != null) {\n List adjustments = pItem.getPriceInfo().getAdjustments();\n if (adjustments != null && adjustments.size() > 0) {\n discountAdjustment = getDiscountedAmount(adjustments);\n }\n }\n }\n }\n return discountAdjustment;\n }", "public double calcPrice() {\r\n\t\tdouble drinkPrice = getBasePrice();\r\n\t\tif(this.getSize()==SIZE.MEDIUM) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\telse if(this.getSize()==SIZE.LARGE) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\t\r\n\t\tif(onWeekend) {\r\n\t\t\tdrinkPrice+=0.6;\r\n\t\t}\r\n\t\treturn drinkPrice;\r\n\t}", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "private static double discountedPrice(RegularItem pFirstItem, RegularItem pSecondItem, RegularItem...pAdditionalItems)\r\n\t{\r\n\t\tassert pFirstItem != null && pSecondItem != null;\r\n\t\tArrays.asList(pAdditionalItems).forEach(item -> { assert item != null; });\r\n\r\n\t\treturn (originalPrice(pFirstItem, pSecondItem) + originalPrice(pAdditionalItems)) * (1 - DISCOUNT);\r\n\t}", "@JsonIgnore\r\n public Double priceReduction() {\n if (wasPrice == null || nowPrice == null)\r\n return 0D;\r\n\r\n return wasPrice - nowPrice;\r\n }", "public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }", "double calculatePrice();", "@Override\n public double getDiscount() {\n return (30 /(1 + Math.exp(-1 * (this.years - 2) )))/100;\n }", "public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n Math.min(order.quantity * order.itemPrice * 0.1, 100);\r\n }", "static float addDiscount(float originalPrice, String discountName, float discountPercentage) {\n float discountedPrice = originalPrice * (1 - discountPercentage);\n float discount = discountedPrice - originalPrice;\n printEntry(discountName, discount);\n return discountedPrice;\n }", "@Override\n public USMoney calculatePrice() {\n USMoney sumPrice = new USMoney();\n for (int i = 0; i < curArrayIndex; i++) {\n sumPrice = sumPrice.add(items[i].getPrice());\n if (items[i].isFragile()) {\n sumPrice.addTo(10, 0);\n }\n }\n sumPrice.addTo(100, 0);\n return sumPrice;\n }", "public double getPrice() {\n\t\treturn regularCheckOut.getPrice() * subscriberDiscount;\n\t}", "public double getPrice(){\n\n double price1 = 1/Math.pow(1+interests, payments);\n double finalPrice = coupon * (1-price1) + valueMaturity * price1;\n\n return finalPrice;\n\n }", "public int getPrice() {\n for (Item item : items) {\n price +=item.getPrice();\n }\n return price;\n }", "@Override\n\tpublic double getDiscount() {\n\t\treturn 0.0;\n\t}", "public double calculatePrice() {\r\n\t\treturn menuItem.getPrice() * quantity;\t\r\n\t}", "@Override\r\n public double computeTax(PurchasedItems items, Date receiptDate) {\r\n\r\n if (taxHoliday(receiptDate) == true) {\r\n return 0.0;\r\n } else {\r\n return items.getTotalCost() * this.salesTax;\r\n }\r\n }", "@Override\n\tpublic double getItemPrice(String itemCode) {\n\n\t\treturn 100.00;\n\t}", "public MMDecimal getDiscountAmount() {\r\n return this.discountAmount;\r\n }", "public Float getUnitPriceDiscount() {\n return this.UnitPriceDiscount;\n }", "public BigDecimal getItemPrice(Item item) {\n\t\tif (item instanceof BarcodedItem) {\n\t\t\tBarcodedItem barcodedItem = (BarcodedItem) item;\n\t\t\tBarcode code = barcodedItem.getBarcode();\n\n\t\t\tBarcodedProduct product;\n\t\t\t// look up the price in the database\n\t\t\ttry {\n\t\t\t\tproduct = productDatabase.getProductByBarcode(code);\n\t\t\t} catch (NonexistentBarcodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased BarcodedItem does not exist\");\n\t\t\t}\n\t\t\treturn product.getPrice().setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (item instanceof PLUCodedItem) {\n\t\t\tPLUCodedItem pluItem = (PLUCodedItem) item;\n\t\t\tPriceLookupCode code = pluItem.getPLUCode();\n\t\t\tPLUCodedProduct pluProduct;\n\t\t\tBigDecimal itemWeight;\n\t\t\ttry {\n\t\t\t\tpluProduct = productDatabase.getProductByPLUCode(code);\n\t\t\t} catch (NonexistentPLUCodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased PLUCodedItem does not exist\");\n\t\t\t}\n\t\t\titemWeight = BigDecimal.valueOf(pluItem.getWeight());\n\t\t\treturn pluProduct.getPrice().multiply(itemWeight).setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (!(item instanceof BagItem)) {\n\t\t\t// if the item is a bag, it is the customer's bag and doesn't\n\t\t\t// cost anything\n\t\t\tthrow new ControlSoftwareException(\"Couldn't find price of item.\");\n\t\t}\n\t\treturn new BigDecimal(\"0.00\");\n\t}", "public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }", "public static double computeDiscountInfo(double pr, double dscnt)\n\n\t{\n\t\tdouble saving;\n\t\tsaving = pr * dscnt / 100;\n\t\treturn saving;\n\t}", "public double getDiscountedAmount()\n\t{\n\t\treturn purchase.getPayment().getDiscountedAmount();\n\t}", "@Override\n\tpublic float getDiscount() {\n\t\treturn 0.0f;\n\t}", "public double calculatePrice() {\n return 0;\n }", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "public float getTotalPrice(){\n return price * amount;\n }", "public int getCost(BasketItem basketItem) {\n for (ItemPrice ip : priceList) {\n if (ip.getSku().equalsIgnoreCase(basketItem.getSku())) {\n\n if (ip.getDiscountQuantity() == 0 || (basketItem.getNumberPurchased() < ip.getDiscountQuantity())) {\n return ip.getUnitPrice() * basketItem.getNumberPurchased();\n } else {\n int multipleDiscount = basketItem.getNumberPurchased() / ip.getDiscountQuantity();\n if (multipleDiscount > 0) {\n int price = multipleDiscount * ip.getDiscountPrice();\n price += (basketItem.getNumberPurchased() % ip.getDiscountQuantity()) * ip.getUnitPrice();\n return price;\n }\n }\n }\n }\n\n return 0;\n }", "public static double priceCalculator(String item, double currentPrice){\n // if the string start with 'n' that mean no item is selected so we add 0 to the total price.\n if (item.charAt(0) == 'n' || item.equalsIgnoreCase(\" \"))\n {\n currentPrice += 0;\n } else{ // if not we add 0.5 to the total price.\n currentPrice += 0.50;\n }\n return currentPrice;\n }", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public double netPrice () {\n return discountedPrice() + taxCharged();\n }", "private void setDiscountedPrice() {\n seekbarNewprice.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n tvDiscountPerc.setText(progress * 5 + \"%\");\n try {\n double originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n double sp = (progress * 5 * originalPrice) / 100;\n\n tvNewPrice.setText(String.format(Locale.US, \"%.2f\", originalPrice - sp));\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n }", "public double getDiscountedSubTotal() {\n\t\tdouble sub_tot = getSubTotal();\n\t\tdouble discount_rate = getDiscount ();\n\t\tdouble disc_sub = sub_tot - discount_rate;\n\t\t//this should round the subtotal to 2 decimal places\n\t\tdouble rounded_disc = Math.round(disc_sub *100.0) / 100.0;\n\t\treturn rounded_disc;\n\t}", "@Override\r\n\tpublic void makeDiscount() {\n\t\t\r\n\t}", "public int getDiscount() {\n\t\treturn discount;\n\t}", "public double getPriceForItem(Item i)\n\t{\n\t\tdouble price = 0.0;\n\t\tprice = strDAO.getPriceForStorenameAndItem(name, i);\n\t\treturn price;\t\t\t\n\t}", "public double getNewPrice(CartObject item, ShoppingCartViewHolder holder) {\n double price = item.getmPrice();\n double newPrice;\n int qty = helper.getQuantityFromTable(item);\n int position = holder.getAdapterPosition();\n if (qty > 0) {\n if (qty == 1) {\n return price;\n }\n newPrice = price*qty;\n newPrice = Math.floor(newPrice * 100) / 100;\n // total += helper.getQuantityFromTable(item) * item.getmPrice();\n return newPrice;\n\n } else {\n removeByPosition(position);\n Toast.makeText(mContext, \"Adios, \" + item.getmName() + \"!\", Toast.LENGTH_SHORT).show();\n Log.d(KEY, \"quantity hit 0, removed \" + item.getmName());\n // total += helper.getQuantityFromTable(item) * item.getmPrice();\n return 0;\n }\n\n }", "@Override\r\n public long priceBasket(List<String> items) throws UnrecognisedItemException {\n Order order = orderService.createOrder(items);\r\n\r\n //NOTE - in real world, offers are expected to change very frequently and hence its best\r\n //to encapsulate it into a separate service.\r\n List<Offer> offers = orderService.getOffers(order);\r\n\r\n long discount = orderService.calculateDiscount(order, offers);\r\n\r\n return order.getTotalOriginalPriceInPence() - discount;\r\n }", "public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }", "public String getDiscount() {\n return discount;\n }", "private double calculateDiscountPercent(Amount discountAmount) {\n Amount runningTotalBeforeDiscount = saleState.getRunningTotal();\n double totalBeforeDiscount = \n runningTotalBeforeDiscount.getAmount().doubleValue();\n double totalDiscount = \n discountAmount.getAmount().doubleValue();\n double totalsQuotient = totalDiscount / totalBeforeDiscount;\n double discountPercent = totalsQuotient * 100;\n return discountPercent;\n }", "public int discountByItemPrice(String[] order, boolean isMember) {\n\t\t//TODO\n\t\t\n\t\tfor(int i=0;i<order.length;i++) {\n\t\t\t\n\t\t\tif(findItemPrice(order[i])>50.00 && isMember) {\n\t\t\t\treturn 18;\n\t\t\t\t\n\t\t\t}else if(findItemPrice(order[i])>75.00 && !isMember) {\n\t\t\t\treturn 7;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}return 0;\n\t\t\t\n\n\t\t\t\n\t\t}", "private static double getDiscount() {\n System.out.print(\"Fill your coupon code: \");\n String code = sc.nextLine();\n for (String aDiscount : SKERestaurant.discount) {\n System.out.println(aDiscount);\n if (code.equalsIgnoreCase(aDiscount.split(\";\")[0])) {\n return Double.parseDouble(aDiscount.split(\";\")[2].replaceAll(\" \", \"\"));\n }\n }\n System.out.println(\"Coupon not found, Proceed to checkout\");\n return 0;\n }", "public double findItemPrice(String item){\n\t\t//TODO\n\t\t\n\t\tdouble price=0.0;\n\t\tfor(int i=0; i<ITEMS.length;i++) {\n\t\t\t\n\t\t\tif(ITEMS[i].equalsIgnoreCase(item)) {\n\t\t\t\tprice=PRICES[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}return price;\n\t}", "public double getDiscountRate(){\n\t\t//only valid choices are 0 (std), 1(senior), 2(pref cust)\n\t\tDISCOUNT_RATE = 0.05;\n\t\tswitch (discount_type) {\n\t\t case 0:\n\t\t\t break;\n\t\t case 1:\n\t\t\t DISCOUNT_RATE += .10;\n\t\t break;\n\t\t case 2:\n\t\t ;\n\t\t DISCOUNT_RATE += .15;\n\t\t break;\n\t\t default:\n\t\t System.out.println(\"Invalid Discout Type. Only standard discount will be applied\");\n\t\t}\n\t\treturn DISCOUNT_RATE; \n\t}", "public double cost()\n\t{\n\t\t//initiates the price variable\n\t\tdouble price = 0;\n\t\t\n\t\t//if the customer is aged between 18 and 64 years and is not a student\n\t\tif (this.age >= 18 && this.age <= 64 && !this.isStudent)\n\t\t{\n\t\t\t//the price is $10\n\t\t\tprice = 10;\n\t\t}\n\t\t\n\t\t//if not, but it has less than 18 years\n\t\telse if (this.age < 18)\n\t\t{\n\t\t\t//the price is 7\n\t\t\tprice = 7;\n\t\t}\n\t\t\n\t\t//why between 10 and 25 if people aged less than 18 pay 7 dollars?\n\t\t//it would not make sense someone aged 17 and is not a student pay $7\n\t\t//if someone aged 17 and is a student pay $8.50\n\t\t\n\t\t//if not, but the age is bigger than 10 and less than 25 and is a student\n\t\telse if (this.age >= 10 && this.age <= 25 && this.isStudent)\n\t\t{\n\t\t\t//give 15% of discount\n\t\t\tprice = 0.85f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 25 and is a students\n\t\telse if (this.age > 25 && this.isStudent)\n\t\t{\n\t\t\t//give 10% of discount\n\t\t\tprice = 0.90f * 10;\n\t\t}\n\t\t\n\t\t//if not, but the age is bigger than 64 and is not a student\n\t\telse if (this.age > 64 && !this.isStudent)\n\t\t{\n\t\t\t//give 7% of discount\n\t\t\tprice = 0.93f * 10;\n\t\t}\n //returns the price \n\t\treturn price;\n\t}", "public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }", "protected Double getItemPrice() {\n return itemPrice;\n }", "public ItemPrice getItemsPriceByCartons(Item itm) {\n ItemPrice itmPrice = new ItemPrice();\n itmPrice.calculateTotalByCarton(itm);\n return itmPrice;\n }", "public int calcMarketPrice() {\r\n player = Context.getInstance().getPlayer();\r\n //Random r = new Random();\r\n int techLevel = player.getCurrentPlanet().getTechLevel();\r\n Event event = player.getCurrentPlanet().getEvent();\r\n Resource resource = player.getCurrentPlanet().getResource();\r\n double price = basePrice;\r\n price += (ipl * (techLevel - mtlb)) + variance;\r\n if (player.getCurrentPlanet().getTechLevel() == this.ttp) {\r\n price *= Context.TECH_PRICE_MULT;\r\n }\r\n if (event.equals(this.ie)) {\r\n price *= event.getUpMult();\r\n } else if (event.equals(this.de)) {\r\n price *= event.getDownMult();\r\n }\r\n if (resource.equals(this.cr)) {\r\n price *= resource.getDownMult();\r\n } else if (resource.equals(this.er)) {\r\n price *= resource.getUpMult();\r\n }\r\n price *= (((double) player.getTrader() / DFIFTY) + 1.0);\r\n int finalPrice = (int) price;\r\n if (player.getTrader() > 0) {\r\n double discountedPrice = price;\r\n double trader = (double) player.getTrader();\r\n discountedPrice -= (price) * (4.0 * trader / PERCENT);\r\n return (int) discountedPrice;\r\n } else {\r\n return finalPrice;\r\n }\r\n }", "private void calculatePrice(int quantity, int pricePerCup) {\n int price = quantity * pricePerCup;\n }", "public double getDiscountRate() {\n\t return discountRate;\n\t}", "double getSDPrice() {\n ArrayList<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n allPrices.addAll(pricesOfFirm.subList(pricesOfFirm.size() - SimulationManager.sizeOfExaminationInterval, pricesOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getSD(allPrices), 2);\n }", "private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }", "public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }", "public static int calculateDiscount(ItemType type, int quantity) {\n int discount = 0;\n switch (type) {\n case NEW:\n return 0;\n case SECOND_FREE:\n if (quantity > 1)\n discount = 50;\n break;\n case SALE:\n discount = 70;\n break;\n }\n discount += quantity / 10;\n if (discount > 80)\n discount = 80;\n return discount;\n }", "public static double getItemPrice(String item) {\n\t\tdouble price;\t\n\t\tswitch(item) {\n\t\tcase \"bread\":\n\t\t\tprice = 4.99;\n\t\t\tbreak;\n\t\tcase \"water\":\n\t\t\tprice = 2.99;\n\t\t\tbreak;\n\t\tcase \"apple\":\n\t\t\tprice = 1.50;\n\t\t\tbreak;\n\t\tcase \"bear\":\n\t\t\tprice = 7.90;\n\t\t\tbreak;\n\t\tcase \"red bull\":\n\t\t\tprice = 2.59;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprice = 0.00;\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\treturn price;\n\t}", "private Amount calculateDiscountAmount(SaleDTO saleAfterDiscount) {\n Amount runningTotalBeforeDiscount = saleState.getRunningTotal();\n Amount runningTotalAfterDiscount = saleAfterDiscount.getRunningTotal();\n Amount discountAmount = \n runningTotalBeforeDiscount.minus(runningTotalAfterDiscount);\n return discountAmount;\n }", "public void calculateEndPrice(int TotalPrice, int Discount) {\n\n }", "@SuppressWarnings(\"rawtypes\")\n public double calculateCouponOrderDiscountAdjustments(Order order) {\n double discountAdjustment = 0.0d;\n\n if (order != null) {\n List orderAdjustments = order.getPriceInfo().getAdjustments();\n if (orderAdjustments != null && orderAdjustments.size() > 0) {\n discountAdjustment = getDiscountedAmount(orderAdjustments);\n }\n }\n return discountAdjustment;\n }", "@Test\n public void amountEqualsItemPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "public void setDiscountPrice(BigDecimal discountPrice) {\n this.discountPrice = discountPrice;\n }", "void setDiscount(BigDecimal discount);", "public BigDecimal getPriceActual();", "public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }" ]
[ "0.84056485", "0.79828244", "0.7819291", "0.76256925", "0.7577455", "0.7551225", "0.75309193", "0.731896", "0.7276604", "0.72732335", "0.7267618", "0.7195236", "0.710067", "0.7068082", "0.70604146", "0.70490307", "0.70300424", "0.7022139", "0.6925713", "0.6901843", "0.68895024", "0.6885626", "0.68674654", "0.6837732", "0.67942804", "0.67898995", "0.6775101", "0.6769062", "0.67594814", "0.6725316", "0.67024606", "0.6650034", "0.6643349", "0.66337556", "0.6622611", "0.6595673", "0.65927637", "0.6519595", "0.65169716", "0.65117526", "0.6485522", "0.6478989", "0.6472597", "0.6472505", "0.6468156", "0.6456606", "0.6456201", "0.642633", "0.6422708", "0.6418769", "0.6413769", "0.6410838", "0.6400877", "0.6380676", "0.6376448", "0.63755", "0.6357981", "0.6355479", "0.63541824", "0.6348629", "0.63418067", "0.6335734", "0.63330203", "0.63311005", "0.6322328", "0.6310338", "0.6292466", "0.6265533", "0.6259764", "0.62527394", "0.62465256", "0.62382424", "0.6234768", "0.6225971", "0.6224276", "0.62148523", "0.6214062", "0.62109244", "0.6199711", "0.6159879", "0.6158884", "0.615659", "0.61452603", "0.61353767", "0.61270124", "0.6123696", "0.6115478", "0.6107671", "0.6091954", "0.60910904", "0.60820484", "0.6075521", "0.6071053", "0.6068131", "0.60557735", "0.6051042", "0.6044822", "0.60406864", "0.60378885", "0.6031971", "0.6029945" ]
0.0
-1
Total cost of materials.
public void orderChecker() { System.out.print( "Number of bolts: " ); int bolts = scan.nextInt(); System.out.print( "Number of nuts: " ); int nuts = scan.nextInt(); System.out.print( "Number of washers: " ); int washers = scan.nextInt(); if ( nuts >= bolts ) { if ( washers >= 2 * bolts ) { System.out.println( "Check the Order: Order is OK." ); } else { System.out.println( "Check the Order: Too few washers." ); } } else { System.out.println( "Check the Order: Too few nuts." ); if ( ( washers < 2 * bolts ) ) { System.out.println( "Check the Order: Too few washers." ); } } final int boltPrice = 5; final int nutPrice = 3; final int washerPrice = 1; int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers; System.out.println( "Total cost: " + cost ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotal() {\n return totalCost;\n }", "public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}", "public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }", "public double getTotalCost() {\r\n return totalCost;\r\n }", "@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }", "double getTotalCost();", "public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public float getTotalCost() {\n return this.totalCost;\n }", "public int totalCostOfComponents( ){\n\t\tint total=0;\n\t\tfor (Component temp : components){\n\t\t\ttotal+=temp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "public double getTotalCost(){\r\n\t\t//return the totalCost to the App\r\n\t\treturn totalCost;\r\n\t}", "private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }", "public double getCost() {\n return quantity*ppu;\n\n }", "public double cost() {\n return roomType.cost() + COST;\n }", "public String getTotalCost() {\n return this.TotalCost;\n }", "public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}", "public int totalCost()\n {\n int cost = 0;\n for (DessertItem item : dessertList) {\n cost += item.getCost();\n }\n return cost;\n }", "public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}", "double getCost();", "double getCost();", "@Override\n\tpublic double calcConsumedEnergy() {\n\t\treturn (getBasicEnergyCost() * 4);\n\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }", "public double getCost() {\r\n return cost;\r\n }", "@Pure\n\tdouble getCost();", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn medicalRecord.cost() + 4.88;\n\t}", "String getTotalCost() {\n return Double.toString(totalCost);\n }", "public double cost()\n\t{\n\t\treturn (price * weight);\n\t}", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "public double getCost() {\n\t\treturn cost;\n\t}", "@Override\n public double getCost() {\n\t return 13;\n }", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "public double getCost() {\n\n\t\treturn cost;\n\t}", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}", "public int getCost() {\n \t\treturn cost;\n \t}", "@Override\n public double getCost() {\n return cost;\n }", "@Override\n public double calculateMaterialCost(double pipeVolume, int pipeGrade) {\n double materialCost = 0;\n \n switch (pipeGrade) {\n case 2:\n materialCost = pipeVolume * 0.6;\n break;\n case 3:\n materialCost = pipeVolume * 0.75;\n break;\n case 4:\n materialCost = pipeVolume * 0.8;\n break;\n case 5:\n materialCost = pipeVolume * 0.95;\n break;\n default:\n materialCost = pipeVolume * 0.6;\n break;\n }\n return materialCost;\n }", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public double getCost()\r\n\t{\treturn this.cost;\t}", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }", "public double getCosts();", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "public double getCost() {\n\t\treturn 1.25;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "public int getCost() {\n return cost;\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}", "public int totalCostOfComponents()\n\t{\n\t\tint total = 0;\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\ttotal += comp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}", "public abstract double getCost();", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "int getCost();", "int getCost();", "int getCost();", "public double getCost(){\n return cost;\n }", "public int getCost() {\n\t\treturn cost;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "@Override\r\n\tpublic int cost() {\n\t\treturn b1.cost() + 1;\r\n\t}", "public int getCost()\n {\n return cost;\n }", "@Override\n protected double calcTotalCost() {\n \n double totalCost, templateBasicRate = DEFAULT_BASIC_RATE;\n double extraBedrooms = 0, extraBathrooms = 0;\n\n // if there are extra beds/baths\n if (this.getNumBedrooms() > DEFAULT_NUM_BEDROOMS)\n extraBedrooms = this.getNumBedrooms() - DEFAULT_NUM_BEDROOMS;\n\n if (this.getNumBathrooms() > DEFAULT_NUM_BATHROOMS)\n extraBathrooms = this.getNumBathrooms() - DEFAULT_NUM_BATHROOMS;\n\n // multiply basic rate by 1.5 if the total area is >= 3,000 sq ft\n if (this.getTotalArea() >= 3000)\n templateBasicRate *= 1.5;\n\n // calculate total cost\n totalCost = (templateBasicRate + ((800 * extraBedrooms) + (500 * extraBathrooms)));\n\n // add tax\n totalCost += (TAX * totalCost);\n\n return totalCost;\n }", "public double getTotal() {\n double amount = 0;\n amount = (this.getQuantity() * product.getPrice().doubleValue());\n return amount;\n }", "public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "@Override\n public int getCost() {\n\treturn 0;\n }", "public double getProductCost() {\r\n\t\treturn (this.getPricePerUnit() * this.getNumUnits());\r\n\t}", "public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }", "public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }", "@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }", "public BigDecimal getCost() {\r\n return cost;\r\n }", "public double totalQuantity() {\r\n\t\tdouble t = 0;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) t += quantity[i][j][k];\r\n\t\treturn t;\r\n\t}", "public double getCost() \n { \n return super.getCost() +22;\n }", "@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getMass() { return modules.values().stream().mapToDouble(Module::getMass).sum(); }", "public double getUnitCost() {\r\n return unitCost;\r\n }", "@Override\n public double getCost() {\n if (lunch != null && dinner != null) {\n return lunch.getCost() + dinner.getCost();\n }\n return 0;\n }", "public int cost() {\n\t\treturn value;\n\t}", "@Pure\n\tdouble getEstimatedCost();", "public Float getAdditionalCost() {\r\n\t\treturn additionalCost;\r\n\t}", "public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}", "public int sumEquipmentWeight(){\n int sum = 0;\n for (Equipment e: equipment){\n sum += e.getWeight();\n }\n return sum;\n }", "public static double calculateTotal (double[] array, int[] quantity, int quantityMaterials){\n\t\tdouble result = 0; \n\t\tfor (int i = 0; i<quantityMaterials; i++){\n\t\t\tresult += (array[i]*quantity[i]);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}" ]
[ "0.75116134", "0.74123895", "0.7375955", "0.7352688", "0.7311897", "0.7236697", "0.722021", "0.7211604", "0.71976525", "0.71703213", "0.7106546", "0.7065222", "0.7009391", "0.6926238", "0.6925217", "0.6923177", "0.6911327", "0.6908921", "0.68897235", "0.68826145", "0.68814087", "0.68806666", "0.6875948", "0.6875948", "0.68477064", "0.68309873", "0.6795382", "0.6792082", "0.67815566", "0.677631", "0.6776185", "0.67633605", "0.67621535", "0.6756321", "0.6729238", "0.6729238", "0.6723603", "0.67198193", "0.6717601", "0.6707125", "0.67070305", "0.66823727", "0.66783565", "0.667761", "0.66770095", "0.66671824", "0.66665405", "0.66665405", "0.6658603", "0.66551614", "0.66515505", "0.66501284", "0.66408324", "0.66286665", "0.6621518", "0.66179365", "0.6616028", "0.6599439", "0.65845543", "0.65759724", "0.65436", "0.6542184", "0.6534686", "0.6534686", "0.65284985", "0.6508565", "0.64979076", "0.64979076", "0.64979076", "0.6484693", "0.64837956", "0.6483748", "0.6481407", "0.64663845", "0.6465353", "0.64639866", "0.6448218", "0.64180845", "0.64013207", "0.6374448", "0.6373439", "0.6369074", "0.63613075", "0.6360184", "0.63585746", "0.63512784", "0.63476676", "0.6342551", "0.6341548", "0.63386285", "0.6326832", "0.6323815", "0.6319905", "0.6318382", "0.63086444", "0.6308554", "0.6293451", "0.6290792", "0.6288598", "0.62756425", "0.6273336" ]
0.0
-1
Program that helps decide if driver needs gas or not.
public void lastChanceGas() { System.out.print( "Tank capacity: " ); int capacity = scan.nextInt(); System.out.print( "Gage reading: " ); int gage = scan.nextInt(); System.out.print( "Miles per gallon: " ); int mpg = scan.nextInt(); double gasLeft = capacity * ( gage * 0.01 ); double milesDriveable = gasLeft * mpg; if ( milesDriveable >= 200 ) { System.out.println( "Safe to Proceed!" ); } else { System.out.println( "Get Gas!" ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.441 -0400\", hash_original_method = \"1010518D3DB50B5D3F092DFF8F5EA0A4\", hash_generated_method = \"654DD58672DC42C6BDE5C6ADE3A22CF1\")\n \n public static boolean startDriverCommand(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "public static void main(String[] args) {\n neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,\n 10.00);\n feedGas.addComponent(\"nitrogen\", 1.03);\n feedGas.addComponent(\"CO2\", 1.42);\n feedGas.addComponent(\"methane\", 83.88);\n feedGas.addComponent(\"ethane\", 8.07);\n feedGas.addComponent(\"propane\", 3.54);\n feedGas.addComponent(\"i-butane\", 0.54);\n feedGas.addComponent(\"n-butane\", 0.84);\n feedGas.addComponent(\"i-pentane\", 0.21);\n feedGas.addComponent(\"n-pentane\", 0.19);\n feedGas.addComponent(\"n-hexane\", 0.28);\n feedGas.addComponent(\"water\", 0.0);\n feedGas.addComponent(\"TEG\", 0);\n feedGas.createDatabase(true);\n feedGas.setMixingRule(10);\n feedGas.setMultiPhaseCheck(true);\n\n Stream dryFeedGas = new Stream(\"dry feed gas\", feedGas);\n dryFeedGas.setFlowRate(11.23, \"MSm3/day\");\n dryFeedGas.setTemperature(30.4, \"C\");\n dryFeedGas.setPressure(52.21, \"bara\");\n StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas);\n Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream());\n saturatedFeedGas.setName(\"water saturator\");\n neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 });\n\n Stream TEGFeed = new Stream(\"lean TEG to absorber\", feedTEG);\n TEGFeed.setFlowRate(6.1 * 1100.0, \"kg/hr\");\n TEGFeed.setTemperature(35.4, \"C\");\n TEGFeed.setPressure(52.21, \"bara\");\n\n SimpleTEGAbsorber absorber = new SimpleTEGAbsorber(\"SimpleTEGAbsorber\");\n absorber.addGasInStream(waterSaturatedFeedGas);\n absorber.addSolventInStream(TEGFeed);\n absorber.setNumberOfStages(10);\n absorber.setStageEfficiency(0.35);\n\n Stream dehydratedGas = new Stream(absorber.getGasOutStream());\n dehydratedGas.setName(\"dry gas from absorber\");\n Stream richTEG = new Stream(absorber.getSolventOutStream());\n\n ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);\n glycol_flash_valve.setName(\"Rich TEG HP flash valve\");\n glycol_flash_valve.setOutletPressure(4.9);\n\n Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream());\n richGLycolHeaterCondeser.setName(\"rich TEG preheater\");\n richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5);\n\n Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream());\n richGLycolHeater.setName(\"rich TEG heater HP\");\n richGLycolHeater.setOutTemperature(273.15 + 62.0);\n\n Separator flashSep = new Separator(richGLycolHeater.getOutStream());\n flashSep.setName(\"degasing separator\");\n Stream flashGas = new Stream(flashSep.getGasOutStream());\n flashGas.setName(\"gas from degasing separator\");\n Stream flashLiquid = new Stream(flashSep.getLiquidOutStream());\n flashLiquid.setName(\"liquid from degasing separator\");\n\n Heater richGLycolHeater2 = new Heater(flashLiquid);\n richGLycolHeater2.setName(\"LP rich glycol heater\");\n richGLycolHeater2.setOutTemperature(273.15 + 139.0);\n richGLycolHeater2.setOutPressure(1.23);\n\n Mixer mixerTOreboiler = new Mixer(\"reboil mxer\");\n mixerTOreboiler.addStream(richGLycolHeater2.getOutStream());\n\n Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream());\n heaterToReboiler.setOutTemperature(273.15 + 206.6);\n\n Separator regenerator2 = new Separator(heaterToReboiler.getOutStream());\n\n Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream());\n\n Heater sepregenGasCooler = new Heater(gasFromRegenerator);\n sepregenGasCooler.setOutTemperature(273.15 + 109.0);\n sepregenGasCooler.setOutPressure(1.23);\n//\t\tsepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream());\n\n Separator sepRegen = new Separator(sepregenGasCooler.getOutStream());\n\n Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream());\n\n Recycle resycle2 = new Recycle(\"reflux resycle\");\n resycle2.addStream(liquidRegenReflux);\n\n Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream());\n coolerRegenGas.setOutTemperature(273.15 + 35.5);\n\n Separator sepregenGas = new Separator(coolerRegenGas.getOutStream());\n\n Stream gasToFlare = new Stream(sepregenGas.getGasOutStream());\n\n Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream());\n\n Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream());\n\n neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });\n\n Stream strippingGas = new Stream(\"stripGas\", stripGas);\n strippingGas.setFlowRate(70.0, \"kg/hr\");\n strippingGas.setTemperature(206.6, \"C\");\n strippingGas.setPressure(1.23, \"bara\");\n\n WaterStripperColumn stripper = new WaterStripperColumn(\"TEG stripper\");\n stripper.addGasInStream(strippingGas);\n stripper.addSolventInStream(hotLeanTEG);\n stripper.setNumberOfStages(10);\n stripper.setStageEfficiency(0.5);\n\n Recycle resycle3 = new Recycle(\"gas stripper resycle\");\n resycle3.addStream(stripper.getGasOutStream());\n\n Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream());\n hotLeanTEGPump.setName(\"hot lean TEG pump\");\n hotLeanTEGPump.setOutletPressure(20.0);\n\n Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream());\n coolerhOTteg.setName(\"hot lean TEG cooler\");\n coolerhOTteg.setOutTemperature(273.15 + 116.8);\n\n Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream());\n coolerhOTteg2.setName(\"medium hot lean TEG cooler\");\n coolerhOTteg2.setOutTemperature(273.15 + 89.3);\n\n Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream());\n coolerhOTteg3.setName(\"lean TEG cooler\");\n coolerhOTteg3.setOutTemperature(273.15 + 44.85);\n\n Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream());\n hotLeanTEGPump2.setName(\"lean TEG HP pump\");\n hotLeanTEGPump2.setOutletPressure(52.21);\n\n Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream());\n leanTEGtoabs.setName(\"lean TEG to absorber\");\n\n neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 });\n\n Stream makeupTEG = new Stream(\"lean TEG to absorber\", pureTEG);\n makeupTEG.setFlowRate(1e-6, \"kg/hr\");\n makeupTEG.setTemperature(35.4, \"C\");\n makeupTEG.setPressure(52.21, \"bara\");\n\n Calculator makeupCalculator = new Calculator(\"makeup calculator\");\n makeupCalculator.addInputVariable(dehydratedGas);\n makeupCalculator.addInputVariable(flashGas);\n makeupCalculator.addInputVariable(gasToFlare);\n makeupCalculator.addInputVariable(liquidToTrreatment);\n makeupCalculator.setOutputVariable(makeupTEG);\n\n StaticMixer makeupMixer = new StaticMixer(\"makeup mixer\");\n makeupMixer.addStream(leanTEGtoabs);\n makeupMixer.addStream(makeupTEG);\n\n Recycle resycleLeanTEG = new Recycle(\"lean TEG resycle\");\n resycleLeanTEG.addStream(makeupMixer.getOutStream());\n\n neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();\n operations.add(dryFeedGas);\n operations.add(saturatedFeedGas);\n operations.add(waterSaturatedFeedGas);\n operations.add(TEGFeed);\n operations.add(absorber);\n operations.add(dehydratedGas);\n operations.add(richTEG);\n operations.add(glycol_flash_valve);\n operations.add(richGLycolHeaterCondeser);\n operations.add(richGLycolHeater);\n operations.add(flashSep);\n operations.add(flashGas);\n operations.add(flashLiquid);\n operations.add(richGLycolHeater2);\n operations.add(mixerTOreboiler);\n operations.add(heaterToReboiler);\n operations.add(regenerator2);\n operations.add(gasFromRegenerator);\n operations.add(sepregenGasCooler);\n operations.add(sepRegen);\n operations.add(liquidRegenReflux);\n operations.add(resycle2);\n\n operations.add(coolerRegenGas);\n operations.add(sepregenGas);\n operations.add(gasToFlare);\n operations.add(liquidToTrreatment);\n operations.add(hotLeanTEG);\n operations.add(strippingGas);\n operations.add(stripper);\n\n operations.add(resycle3);\n operations.add(hotLeanTEGPump);\n operations.add(coolerhOTteg);\n operations.add(coolerhOTteg2);\n operations.add(coolerhOTteg3);\n operations.add(hotLeanTEGPump2);\n operations.add(leanTEGtoabs);\n operations.add(makeupCalculator);\n operations.add(makeupTEG);\n operations.add(makeupMixer);\n operations.add(resycleLeanTEG);\n\n operations.run();\n richGLycolHeater2.getOutStream().getFluid().display();\n System.out.println(\"Energy reboiler \" + heaterToReboiler.getDuty());\n mixerTOreboiler.addStream(liquidRegenReflux);\n mixerTOreboiler.addStream(resycle3.getOutStream());\n //\n operations.run();\n absorber.replaceSolventInStream(resycleLeanTEG.getOutStream());\n operations.run();\n // richGLycolHeater2.getOutStream().getFluid().display();\n\n System.out.println(\"Energy reboiler 2 \" + heaterToReboiler.getDuty());\n\n System.out.println(\"wt lean TEG after stripper \"\n + ((WaterStripperColumn) operations.getUnit(\"TEG stripper\")).getSolventOutStream().getFluid()\n .getPhase(\"aqueous\").getWtFrac(\"TEG\"));\n\n operations.save(\"c:/temp/TEGprocessSimple.neqsim\");\n }", "public static void main(String[] args) {\n\n\t\tScanner driversLicense=new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"How old are you?\");\n\t\tint num1=driversLicense.nextInt();\n\t\t\n\t\tif (num1>=18) {\n\t\t\tSystem.out.println(\"Drivers license issued\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You can only get a learners permit\");\n\t\t}\n\t\t\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:39:04.267 -0400\", hash_original_method = \"72AA0749EB72637CFB3A4B9EB2F826FD\", hash_generated_method = \"79412C44C5EBC96089ED825481F0892D\")\n \n public static boolean scanCommand(boolean forceActive){\n \tdouble taintDouble = 0;\n \ttaintDouble += ((forceActive) ? 1 : 0);\n \n \treturn ((taintDouble) == 1);\n }", "public static void main(String[] args){\n Car audi = new Car(\"ABC\", \"Audi\", \"A3\", 26000);\n Car vw = new Car(\"XYZ\", \"VolksWagen\", \"Golf\", 250000);\n Car ford = new Car(\"ABC\", \"Ford\", \"focus\", 20000);\n CarDealer beterAuto = new CarDealer(\"Beter Auto\");\n CarDealer autoConcurrent = new CarDealer(\"De Autoconcurrent\");\n CarOwner jantje = new CarOwner(\"Jan\", 6);\n CarOwner hans = new CarOwner(\"Hans\", 34);\n CarOwner oma = new CarOwner(\"Jeanet\", 80);\n\n audi.registerTo(beterAuto);\n vw.registerTo(beterAuto);\n ford.registerTo(beterAuto);\n beterAuto.sellCar(vw, jantje);\n beterAuto.sellCar(vw, hans);\n beterAuto.sellCar(vw, oma);\n beterAuto.sellCar(ford, oma);\n vw.registerTo(autoConcurrent);\n }", "public void gas(double amount){\n if (amount >= 0.0 && amount <= 1.0 && !isLoaded) {\n incrementSpeed(amount);\n }\n }", "public static void main(String[] args) {\n Virus Ebola = new Virus();\n // set member variables on the instance of Virus stored in Herpes\n Ebola.Baltimore = \"V\";\n Ebola.Order = \"Mononegavirales\";\n Ebola.Family = \"Filoviridae\";\n Ebola.Genus = \"Ebolavirus\";\n Ebola.Tropism = \"Anything it can liquefy\";\n Ebola.HumanOnly = false;\n Ebola.Envelope = false;\n Ebola.GenomeSize = 19;\n \n // send our Car instance to a helper method to print its member variables\n displayVirusStats(Ebola);\n // test its methods\n Ebola.startReplication();\n Ebola.notReplicating();\n Ebola.getCurrentSpeed();\n \n}", "public static void main(String[] args) {\n\t\t\n\t\tdouble mortgageRate = 4.5;\n\t\tint mortgagePrice=200000;\n\t\t\n\t\tif(mortgageRate>4.5) {\n\t\t\tSystem.out.println(\"should not buy a House\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You Can buy a House\");\n\t\t}if(mortgagePrice>200000) {\n\t\t\tSystem.out.println(\"You should take a Loan\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You will pay cash\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "public static void main(String[] args)\n {\n computeCharge circuit = new computeCharge();\n }", "public static void main(String[] args) {\n\n\t\tdouble shoePrice = 220.99;\n\t\tdouble allowance = 200.00;\n\n\t\tif (shoePrice > allowance) {\n\t\t\tSystem.out.println(\"We cant buy it :(\");\n\t\t} else {\n\t\t\tSystem.out.println(\"We can buy it :D\");\n\n\t\t}\n\t\t\n\t\t//declare boolean variable its raining and if it is true your program should say take an umbrella\n\t\t\n\t\tboolean isRaining = true;\n\t\t\n\t\tif (isRaining) {\n\t\t\tSystem.out.println(\"stay home and code\");\n\t\t}else {\n\t\t\tSystem.out.println(\"take a walk and listen to java\");\n\t\t}\n\t}", "public static void main(String[] args) {\n Engine engine = new Engine(\"suzuki\", 100, 0, 887, 500);\r\n Boing747 aircraft = new Boing747(engine);\r\n aircraft.fly(1_000_000);\r\n if (engine.doesEngineNeedsRestart()) {\r\n System.out.println(\"take engine to repair...\");\r\n }\r\n }", "public static void main (String[] args)\n\t{\n\t\tint startMiles1 = 20015, endMiles1 = 20098;\n\t\tdouble gallonsUsed1 = 6.05, pricePerGallon1 = 2.99;\n\t\tString carType1 = \"Jeep Wrangler\";\n\t\t\n\t\t//declaration and initialization for car2\n\t\tint startMiles2 = 20015, endMiles2 = 20098;\n\t\tdouble gallonsUsed2 = 4.71, pricePerGallon2 = 2.99;\n\t\tString carType2 = \"TOYOTA Carola\";\n\t\t\n\t\t//objects construction\n\t\tCarV7 car1 = new CarV7(carType1, endMiles1, startMiles1, gallonsUsed1, pricePerGallon1);\n\t\tCarV7 car2 = new CarV7(carType2, endMiles2, startMiles2, gallonsUsed2, pricePerGallon2);\n\t\t\n\t\t//calculation for car1\n\t\tint distance1 = car1.calcDistance();\n\t\tdouble gpm1 = car1.calcGPM(distance1);\n\t\tdouble mpg1 = car1.calcMPG(distance1);\n\t\tdouble ttlCost1 = car1.totalCost();\n\t\t\n\t\t//calculation for car2\n\t\tint distance2 = car2.calcDistance();\n\t\tdouble gpm2 = car2.calcGPM(distance2);\n\t\tdouble mpg2 = car2.calcMPG(distance2);\n\t\tdouble ttlCost2 = car2.totalCost();\n\t\t\n\t\t//output\n\t\tSystem.out.printf(\"\\t\\tGas Mileage Calculations\\n\");\n\t\tSystem.out.printf(\"Type of Car\\tStart Miles\\tEnd Miles\\tDistance\\tGallons\\t\\tPrice\\t\\tCost\\t\\tMiles/Gal\\tGal/Mile\\n\");\n\t\tfor (int i = 0; i < 150; i++) {\n\t\t\tSystem.out.printf(\"=\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\n\t\t\n\t\t//print out info for car1\n\t\tcar1.printCarType();\n\t\tSystem.out.printf(\"\\t%d\\t\\t%d\\t\\t%d\\t\\t%f\\t%.2f\\t\\t%.2f\\t\\t%f\\t%f\\n\", startMiles1, endMiles1, distance1, gallonsUsed1, pricePerGallon1, ttlCost1, mpg1, gpm1);\n\t\t\n\t\t//print out info for car2\n\t\tcar2.printCarType();\n\t\tSystem.out.printf(\"\\t%d\\t\\t%d\\t\\t%d\\t\\t%f\\t%.2f\\t\\t%.2f\\t\\t%f\\t%f\\n\", startMiles2, endMiles2, distance2, gallonsUsed2, pricePerGallon2, ttlCost2, mpg2, gpm2);\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n List<UsedCar> carList = new ArrayList<>();\n int menuChoice = -1;\n int numCars = 0;\n\n populateList(carList);\n do { // repeat this loop until the user wants to quit\n do { // repeat this loop until we have a valid response\n numCars = carCount(carList);\n printList(carList, numCars);\n menuChoice = queryUser(scan, carList, numCars);\n } while (menuChoice == -1); // repeat if user input is invalid\n purchaseCar(scan, carList, menuChoice, numCars);\n } while (menuChoice != numCars); //repeat so long as user chooses to keep going\n\n System.out.println(\"Have a great day!\");\n\n scan.close();\n }", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "boolean hasHeadGear();", "@Test\n public void checkFuelEnough() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(SolarSystems.SOMEBI.getDistance(SolarSystems.ADDAM) + 1);\n assertTrue(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.374 -0400\", hash_original_method = \"39DCFC1582517FA4E303D5BE244931DB\", hash_generated_method = \"8BE1689918F7031C416EACC24E00B6C4\")\n \n public static boolean loadDriver(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "public static void main(String[] args) {\n AbstractFactory engineFactory = getFactory(\"ENGINE\");\n IEngines engine1 = engineFactory.getEngine(\"DIESEL\");\n engine1.installEngine();\n IEngines engine2 = engineFactory.getEngine(\"OTTO\");\n engine2.installEngine();\n IEngines engine3 = engineFactory.getEngine(\"ELECTRIC\");\n engine3.installEngine();\n IEngines engine4 = engineFactory.getEngine(\"TURBO\");\n engine4.installEngine();\n\n // This part of code checks the installation procedure of all types of tires which have been implemented;\n // Several variables are being declared and initialized;\n AbstractFactory tireFactory = getFactory(\"TIRES\");\n ITires tire1 = tireFactory.getTires(\"WINTER\");\n tire1.installTires();\n ITires tire2 = tireFactory.getTires(\"CASUAL\");\n tire2.installTires();\n ITires tire3 = tireFactory.getTires(\"RACING\");\n tire3.installTires();\n\n\n }", "public static void main(String[] args) {\n\t\tOilStation benzinostanciq = new OilStation(\"OMV\");\r\n\t\tbenzinostanciq.printInfo();\r\n\t\t\r\n\t\t//2\r\n\t\tString[] names = {\"Petar\", \"Dragomir\", \"Svetoslav\", \"Canko\", \"Dencho\", \"Ivan\", \"Hristo\", \"Stamat\"};\r\n\t\tdouble[] money = {6500, 6100, 4900, 5900, 6000, 5700, 6200};\r\n\t\t\r\n\t\tArrayList<Driver> drivers = new ArrayList<>();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdrivers.add(new Driver(names[new Random().nextInt(names.length)], money[new Random().nextInt(money.length)], benzinostanciq));\r\n\t\t}\r\n\t\t\r\n\t\t//3\r\n\t\tArrayList<Vehicle> avtomobili = new ArrayList<>();\r\n\t\t\r\n\t\tfor (int i = 0; i < 200; i++) {\r\n\t\t\tswitch (new Random().nextInt(3)) {\r\n\t\t\tcase 0:\r\n\t\t\t\tavtomobili.add(new Car(\"Golf\", 2005));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tavtomobili.add(new Bus(\"Man\", 2006));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tavtomobili.add(new Truck(\"Scania\", 2011));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tint broiAvt = 10;\r\n\t\t\twhile (broiAvt > 0) {\r\n\t\t\t\tint idx = new Random().nextInt(avtomobili.size());\r\n\t\t\t\tdrivers.get(i).addVehicle(avtomobili.get(idx));\r\n\t\t\t\tavtomobili.remove(idx);\r\n\t\t\t\tbroiAvt--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//4\r\n\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tif (i % 3 == 0) {\r\n\t\t\t\tint buyVinetki = 5;\r\n\t\t\t\twhile (buyVinetki > 0) {\r\n\t\t\t\t\tint idx = new Random().nextInt(drivers.get(i).getVehicle().size());\r\n\t\t\t\t\tif (drivers.get(i).getVehicle().get(idx).getVinetka() == null) {\r\n\t\t\t\t\t\tdrivers.get(i).buyVinetka(idx, ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t\t\t\tbuyVinetki--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdrivers.get(i).buyVinetki(ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//5\r\n\t\tfor (Driver dr : drivers) {\r\n\t\t\tdr.printInfoForDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//6\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-----ÑÏÈÑÚÊ ÍÀ ÂÈÍÅÒÊÈ ÑËÅÄ ÏÐÎÄÀÆÁÀ-----\");\r\n\t\tbenzinostanciq.printInfo();\r\n\r\n\t}", "private void createCar() throws Exception {\n\t\tString id = \"\", make, model, driverName;\n\t\tString type, refreshments;\n\t\tboolean proceed = true;\n\t\tdouble sscStandardFee = 0;\n\t\tint numPassengers = 0;\n\t\tSystem.out.print(\"Enter registration number: \");\n\t\tid = promptUserForRegNo();\n\t\t\n\t\tif (id.length() != 0) {\n\t\t\t\n\t\t\t// Get details required for creating a car.\n\t\t\tSystem.out.print(\"Enter Make: \");\n\t\t\tmake = console.nextLine();\n\t\t\t\n\t\t\tif (make.length() == 0) {\n\t\t\t\tthrow new InvalidMakeException(\"Error: Make is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Model: \");\n\t\t\tmodel = console.nextLine();\n\t\t\t\n\t\t\tif (model.length() == 0) {\n\t\t\t\tthrow new InvalidModelException(\"Error: Model is empty.\");\n\t\t\t}\n\n\t\t\tSystem.out.print(\"Enter Driver Name: \");\n\t\t\tdriverName = console.nextLine();\n\t\t\t\n\t\t\tif (driverName.length() == 0) {\n\t\t\t\tthrow new InvalidDriverNameException(\"Error: Driver Name is empty.\");\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter number of passengers: \");\n\t\t\t\tnumPassengers = promptForPassengerNumbers();\n\t\t\t}\n\t\t\t\n\t\t\tcatch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Error: Number should be an integer from 1 to 9\");\n\t\t\t\tproceed = false;\n\t\t\t}\n\t\t\t\n\t\t\t// If there is no errors, continue.\n\t\t\tif (proceed) {\n\t\t\t\tSystem.out.println(\"Enter Service Type (SD/SS): \");\n\t\t\t\t\n\t\t\t\ttype = console.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (!type.equals(\"SD\") && !type.equals(\"SS\")) {\n\t\t\t\t\tthrow new InvalidServiceTypeException(\"Error: Service Type is invalid.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (type.equals(\"SD\")) {\n\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\n\t\t\t\t\tif (!result) {\n\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers);\n\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error: Already exists in the system\");\n//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (type.equals(\"SS\")) {\n\t\t\t\t\tboolean proceed2 = true;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Enter Standard Fee: \");\n\t\t\t\t\t\tsscStandardFee = Double.parseDouble(console.nextLine());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"Error: Please input a numeric value\");\n\t\t\t\t\t\tproceed2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (proceed2) {\n\t\t\t\t\t\tSystem.out.println(\"Enter List of Refreshments: \");\n\t\t\t\t\t\trefreshments = console.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (refreshments.substring(refreshments.length() - 1).equals(\",\")) {\n\t\t\t\t\t\t\trefreshments = refreshments.substring(0, refreshments.length() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tboolean result = application.checkIfCarExists(id);\n\t\t\t\t\t\tboolean result2 = application.bookingFeeSilverServiceCar(sscStandardFee);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!result && result2) {\n\t\t\t\t\t\t\tString carRegistrationNumber = application.createCar(id, make, model, driverName, numPassengers, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsscStandardFee, refreshments);\n\t\t\t\t\t\t\tSystem.out.println(carRegistrationNumber);\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (!result && !result2) {\n\t\t\t\t\t\t\tthrow new InvalidSSCFeeException(\"Error - Standard Fee must be $3.00 or more.\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Standard Fee must be $3.00 or more.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow new InvalidRegNoException(\"Error - Already exists in the system\");\n\t//\t\t\t\t\t\tSystem.out.println(\"Error - Already exists in the system\");\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 static void main(String[] args) {\n\t\t\n\t\tBlackBox core = new BlackBox();\n\t\tcore.newEnvironment();\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * insert fire fighter agents\n\t\t\t * insert fire building tasks\n\t\t\t * insert fire station agents\n\t\t\t */\n\t\t\tcore.addAgent(FireFighter.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.variables\"));\n\t\t\tcore.addTask(FireBuildingTask.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.values\"));\n\t\t\tcore.addAgent(FireStation.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.central\"));\n\t\t\t\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcore.simulationStart();\n\t\t} catch (SimulatorException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\tfor(Variable var : core.getEnvironment().getVariables())\n\t\t{\n\t\t\tSystem.out.println(var.getClass());\n\t\t\tif(var instanceof Human){\n\t\t\t\tHuman h = (Human)var;\n\t\t\t\tSystem.out.println(\"Attributes of Human \"+h.getId());\n\t\t\t\tSystem.out.println(\"Strength \"+h.getStrength());\n\t\t\t\tSystem.out.println(\"Dexterity \"+h.getDexterity());\n\t\t\t\tSystem.out.println(\"Stamina \"+h.getStamina());\n\t\t\t\tSystem.out.println(\"Charisma \"+h.getCharisma());\n\t\t\t\tSystem.out.println(\"Appearance \"+h.getAppearance());\n\t\t\t\tSystem.out.println(\"Leadership \"+h.getLeadership());\n\t\t\t\tSystem.out.println(\"Intelligence \"+h.getIntelligence());\n\t\t\t\tSystem.out.println(\"Reasoning \"+h.getReasoning());\n\t\t\t\tSystem.out.println(\"Perception \"+h.getPerception());\n\t\t\t\tSystem.out.println(\"ph \"+((h.getStrength()-1)+(h.getDexterity()-1)+(h.getStamina()-1)));\n\t\t\t\tSystem.out.println(\"sc \"+((h.getCharisma()-1)+(h.getAppearance()-1)+(h.getLeadership()-1)));\n\t\t\t\tSystem.out.println(\"mn \"+((h.getIntelligence()-1)+(h.getReasoning()-1)+(h.getPerception()-1)));\n\t\t\t\tSystem.out.println(\"will \"+h.getWill());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}else if(var instanceof FireStation){\n\t\t\t\tFireStation h = (FireStation)var;\n\t\t\t\tSystem.out.println(\"Attributes of the Fire Station \"+h.getId());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tfor(Value val : core.getEnvironment().getValues())\n\t\t{\n\t\t\tSystem.out.println(val.getClass());\n\t\t\tFireBuildingTask t = (FireBuildingTask)val;\n\t\t\tSystem.out.println(\"Attributes of building \"+t.getId());\n\t\t\tSystem.out.println(\"Temperature \"+t.getTemperature());\n\t\t\tSystem.out.println(\"Floors \"+t.getFloors());\n\t\t\tSystem.out.println(\"Ground Area \"+t.getGroundArea());\n\t\t\tSystem.out.println(\"Success \"+t.getSuccess());\n\t\t\tSystem.out.println(\"HP \"+t.getBuildingHP());\n\t\t\tSystem.out.println(\"x \"+t.getX());\n\t\t\tSystem.out.println(\"y \"+t.getY());\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public String run() {\r\n // Check if ironCurtain is available to use and GreedyIronCurtain is available\r\n if (myself.ironCurtainAvailable && myself.energy >= 120 && checkGreedyIronCurtain()) {\r\n return buildIC();\r\n } else if (myself.isIronCurtainActive && canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n // Check if GreedyWinRate is available\r\n if (checkGreedyWinRate() && checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n }\r\n // Check if there is an attack..\r\n else if (myTotal.get(3) > 0 || myTotal.get(0) > 0) {\r\n // Check if GreedyDefense is available\r\n if (canBuy(DEFENSE) && checkGreedyDefense()) \r\n return defendRow();\r\n else if (canBuy(ATTACK)) return buildTurret();\r\n return doNothingCommand();\r\n } \r\n // Check if GreedyEnergy is available\r\n else if (checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n } \r\n // Just Attack if there is no greedy or do nothing if there is no energy\r\n else if (canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n return doNothingCommand();\r\n }\r\n }\r\n }", "boolean hasGenesis();", "public static void main(String[] args) {and-- &&\n//\t\tor-- ||\n//\t\tnot-- !\n//\t\t\n//\t\tGood-Brand and onsale\n//\t\tcondition1&& condition2\n//\t\t \n//\t\ttrue-true=ture\n//\t\ttrue-false-false true stable\n//\t\tfalse-false= false\n//\t\tfalse-false= false\n\t\t\n//\t\t\n\n\t\tint pincode=200;\n\t\tif (!(pincode<0)) {\n\t\t\tSystem.out.println(\"Pincode cannot be 0 or negative number\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n double carMiles;\n double carHalon;\n double carCost;\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Введите пробег автомобиля в американских милях:\");\n carMiles = sc.nextInt();\n\n System.out.println(\"Введите расход топлива автомобиля в галонах на милю:\");\n carHalon = sc.nextInt();\n\n System.out.println(\"Введите стоимость автомобиля $:\");\n carCost = sc.nextInt();\n\n //перевод в европейскую систему\n System.out.println(\"Пробег автомобиля: \" + carMiles * 1.61 + \"км\"); //формул: http://www.for6cl.uznateshe.ru/mili-v-kilometry/\n\n System.out.println(\"Расход топлива автомобиля: \" + ( 378.5 / ( carHalon * 1.609 )) + \" литров на 100 км\" ); // формула: https://planetcalc.ru/4357/\n\n System.out.println(\"Стоимость автомобиля: \" + carCost * 28.3 + \" грн\");\n\n\n\n }", "public void execute()\n {\n // obtain object references\n ttlAG = (TTL_Autoguider)TTL_Autoguider.getInstance();\n AUTOGUIDE a = (AUTOGUIDE)command;\n AGS_State desired = null;\n pmc = new AltAzPointingModelCoefficients();\n telescope.getMount().getPointingModel().addCoefficients( pmc );\n\n // start of command execution\n Timestamp start = telescope.getTimer().getTime();\n\n try\n {\n AutoguideMode mode = a.getAutoguideMode();\n\n // Guide on the Brightest guide star\n if( mode == AutoguideMode.BRIGHTEST )\n {\n\tttlAG.guideOnBrightest();\n\tdesired = AGS_State.E_AGS_ON_BRIGHTEST;\n }\n\n // Gide on a guide star between magnitudes i1 and i2\n else if( mode == AutoguideMode.RANGE )\n {\n\tint i1 = (int)\n\t ( Math.rint\n\t ( a.getFaintestMagnitude() ) * 1000.0 );\n\n\tint i2 = (int)\n\t ( Math.rint\n\t ( a.getBrightestMagnitude() ) * 1000.0 );\n\n\tttlAG.guideOnRange( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_RANGE;\n }\n\n // Guide on teh Nth brightest star\n else if( mode == AutoguideMode.RANK )\n {\n\tttlAG.guideOnRank( a.getBrightnessRank() );\n\tdesired = AGS_State.E_AGS_ON_RANK;\n }\n\n // Guide on the star at pixel coords X,Y\n else if( mode == AutoguideMode.PIXEL )\n {\n\tint i1 = (int)\n\t ( Math.rint( a.getXPixel() * 1000.0 ) );\n\n\tint i2 = (int)\n\t ( Math.rint( a.getYPixel() * 1000.0 ) );\n\n\tttlAG.guideOnPixel( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_PIXEL;\n }\n\n\n // wait for AGS state change and see if it's the desired one\n // after 200 seconds\n int sleep = 5000;\n while( ( ttlAG.get_AGS_State() == AGS_State.E_AGS_WORKING )&&\n\t ( slept < TIMEOUT ) )\n {\n\n\ttry\n\t{\n\t Thread.sleep( sleep );\n\t slept += sleep;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n }\n\n AGS_State actual = ttlAG.get_AGS_State();\n if( actual != desired )\n {\n\tString s = ( \"after \"+slept+\"ms AGS has acheived \"+actual.getName()+\n\t\t \" state, desired state is \"+desired.getName() );\n\tcommandDone.setErrorMessage( s );\n\tlogger.log( 1, logName, s );\n\treturn;\n }\n\n\n // get x,y of guide star depending on mode and check for age of\n // returned centroids - centroids MUST have been placed SINCE this\n // cmd impl was started.\n TTL_AutoguiderCentroid centroid;\n\n // sleep for 0.5 sec to check values have been updated\n int updateSleep = 500;\n do\n {\n\ttry\n\t{\n\t Thread.sleep( 500 );\n\t slept += 500;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n\n\tcentroid = ttlAG.getCentroidData();\n }\n while( centroid.getTimestamp().getSeconds() < start.getSeconds() );\n\n guideStar = ttlAG.getGuideTarget( centroid );\n\n }\n catch( TTL_SystemException se )\n {\n\n }\n\n stopGuiding = false;\n new Thread( this ).start();\n\n commandDone.setSuccessful( true );\n }", "public static void startUp() {\r\n\t//Variables for the choices\r\n\tint buyAgain = 0;\r\n\tint whileLoop = 0;\r\n\t//Variables for the receipt\r\n\tint totalQuantity = 0;\r\n\tint roadsterQuantity = 0;\r\n\tint civicQuantity = 0;\r\n\tint chironQuantity = 0;\r\n\t//variables for cost and tax\r\n\tdouble carCost = 0;\r\n\tdouble totalCost = 0;\r\n\tdouble totalTax = 0;\r\n\t//Scanners\r\n\tScanner scStr = new Scanner( System.in );\r\n\tScanner scNum = new Scanner( System.in );\r\n\tSystem.out.println(\"Hello! Welcome to Andre's Borderline Legal Vehicles\");\r\n\t//The loop to buy the cars and add tax\r\n\twhile (whileLoop == 0) {\r\n\tSystem.out.println(\"What would you like to buy?\"\r\n\t+ \"\\n1. Tesla Roadster = $257 000\"\r\n\t+ \"\\n2. Honda Civic Type R = $33 900\"\r\n\t+ \"\\n3. Bugatti Chirron = $3 000 000\");\r\n\t//This determines their car choice\r\n\tSystem.out.println(\"What car would you like?\");\r\n\tint carChoice = scNum.nextInt();\r\n\t//Asks how many you would like\r\n\tSystem.out.println(\"How many would you like?\");\r\n\tint carQuantity = scNum.nextInt();\r\n\t//Decides the course of action\r\n\tif (carChoice == 1) {\r\n\t//calculates cost, adds to the quantity receipt, adds to tax adds to total cost\r\n\tcarCost = calculations(carQuantity, 257000);\r\n\ttotalQuantity += carQuantity;\r\n\troadsterQuantity += carQuantity;\r\n\ttotalCost += carCost;\r\n\ttotalTax += calculateTax(carQuantity*257000);\r\n\t//Asks if you would like to buy again\r\n\tSystem.out.println(\"Would you like to buy anything else?\\n1. Yes\\n2. No\");\r\n\tbuyAgain = scNum.nextInt();\r\n\tif (buyAgain == 1) {\r\n\t}\r\n\telse if (buyAgain == 2) {\r\n\tbreak;\r\n\t}\r\n\telse {\r\n\tSystem.out.println(\"Not a valid option.\");\r\n\t}\r\n\t}\r\n\telse if (carChoice == 2) {\r\n\t//calculates cost, adds to the quantity receipt, adds to tax adds to total cost\r\n\tcarCost = calculations(carQuantity, 33900);\r\n\ttotalQuantity += carQuantity;\r\n\tcivicQuantity += carQuantity;\r\n\ttotalCost += carCost;\r\n\ttotalTax += calculateTax(carQuantity*257000);\r\n\t//Asks if you would like to buy again\r\n\tSystem.out.println(\"Would you like to buy anything else?\\n1. Yes\\n2. No\");\r\n\tbuyAgain = scNum.nextInt();\r\n\tif (buyAgain == 1) {\r\n\t}\r\n\telse if (buyAgain == 2) {\r\n\tbreak;\r\n\t}\r\n\telse {\r\n\tSystem.out.println(\"Not a valid option.\");\r\n\t}\r\n\t}\r\n\telse if (carChoice == 3) {\r\n\t//calculates cost, adds to the quantity receipt, adds to tax adds to total cost\r\n\tcarCost = calculations(carQuantity, 3000000);\r\n\ttotalQuantity += carQuantity;\r\n\tchironQuantity += carQuantity;\r\n\ttotalCost += carCost;\r\n\ttotalTax += calculateTax(carQuantity*257000);\r\n\t//Asks if you would like to buy again\r\n\tSystem.out.println(\"Would you like to buy anything else?\\n1. Yes\\n2. No\");\r\n\tbuyAgain = scNum.nextInt();\r\n\tif (buyAgain == 1) {\r\n\t}\r\n\telse if (buyAgain == 2) {\r\n\tbreak;\r\n\t}\r\n\telse {\r\n\tSystem.out.println(\"Not a valid option.\");\r\n\t}\r\n\t}\r\n\telse {\r\n\tSystem.out.println(\"Not a valid option.\");\r\n\t}\r\n\t}\r\n\t//Prints the quantity of each car, the total tax and the total cost\r\n\tSystem.out.printf(\"\\nChiron: \" + chironQuantity\r\n\t+ \"\\nRoadster : \" + roadsterQuantity\r\n\t+ \"\\nCivic : \" + civicQuantity\r\n\t+ \"\\nThe total tax is: $%.2f\" , totalTax);\r\n\tSystem.out.printf(\"\\nThe total cost is: %.2f\", totalCost);\r\n\t}", "@Override\n\tpublic void gasDiesel() {\n\n\t}", "public static void main(String[] args) {\n\t\tDriver driver = new BenzDriver();\r\n\t\tCar car = driver.driverCar();\r\n\t\tcar.driver();\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tversion += getVersion()+\".54\";\r\n\t\tboolean swWarn = false;\r\n\t\tboolean swFinns = false;\r\n\t\tlong totalSpace; //total disk space in bytes.\r\n//\t\tlong usableSpace; ///unallocated / free disk space in bytes.\r\n\t\tlong freeSpace; //unallocated / free disk space in bytes.\r\n\t\tlong freePct; //unallocated / free disk space in %.\r\n\t\tlong totalSpaceG; //total disk space in bytes.\r\n\t\tlong freeSpaceG; //unallocated / free disk space in bytes.\r\n\r\n\t\tif (args.length < 1) {\r\n\t\t\tSystem.out.println(\"\\n\\n\"+version+\" by Michael Ekdal Sweden.\\n\");\r\n\r\n\t\t\tSystem.out.println(\"\\nThe parameters and their meaning are:\\n\"+\r\n\t\t\t\t\t\"\\n-jvakt \\tA switch to enable report to Jvakt. Default is no connection to Jvakt.\" +\r\n\t\t\t\t\t\"\\n-id \\tUsed as identifier in the Jvakt monitoring system.\" +\r\n\t\t\t\t\t\"\\n-config \\tThe directory where to find the Jvakt.properties file. like \\\"-config c:\\\\Temp\\\". Optional. Default is the current directory.\"+\r\n\t\t\t\t\t\"\\n-drv \\tThree values is mandatory: drive min-percentage min-gigabyte. e.g -drv D: 10 150 -drv F: 12 120 (optional)\" +\r\n\t\t\t\t\t\"\\n \\tAutomatically found drives are checked against the default values 10 % and 10 GB\" +\r\n\t\t\t\t\t\"\\n\\nReturncode is 0 when OK else 12. \"\r\n\t\t\t\t\t);\r\n\r\n\t\t\tSystem.exit(4);\r\n\t\t}\r\n\t\t\r\n\t\t// Gets command line arguments\r\n\t\tint j=0;\r\n\t\tfor ( int i = 0; i < args.length; i++) {\r\n\t\t\tif (args[i].equalsIgnoreCase(\"-id\")) id = args[++i];\r\n\t\t\tif (args[i].equalsIgnoreCase(\"-jvakt\")) swJvakt=true;\r\n\t\t\tif (args[i].equalsIgnoreCase(\"-config\")) config = args[++i];\r\n\t\t\tif (args[i].equalsIgnoreCase(\"-drv\")) {\r\n\t\t\t\tdrive[j] = args[i+1];\r\n\t\t\t\tpct[j] = args[i+2];\r\n\t\t\t\tgig[j] = args[i+3];\r\n//\t\t\t\tSystem.out.println(\"Drive \"+drive[j]+\" Pct \"+pct[j]+\" Gig \"+gig[j]);\r\n\t\t\t\ti++; i++; j++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\n----- \"+ new Date()+\" \"+version + \" by Michael Ekdal Sweden. -----\");\r\n\t\t\r\n\t\tpaths = File.listRoots(); // Get all drives into paths \r\n\r\n//\t\t ** Part where the drives found and saved into the drive array ** \r\n\r\n\t\t// spin through all drives\r\n\t\tfor(File path:paths)\r\n\t\t{\r\n\t\t \r\n\t\t if (fsv.isFloppyDrive(path)) continue; \t\t\t\t\t\t\t\t// Skip if it's a floppy\r\n\t\t if (fsv.getSystemTypeDescription(path).indexOf(\"CD \") >= 0) continue; \t// Skip if it's a CD or DVD\r\n\r\n\t\t // Check if the drive is already entered via the command line arguments. No need to check it twice.\r\n\t\t swFinns = false;\r\n\t\t for ( int i = 0; i <= j-1; i++) {\r\n\t\t\t if (drive[i].compareToIgnoreCase(path.toString().substring(0, 2)) == 0 ) {\r\n\t\t\t\t swFinns = true; // Found the drive already entered via command line parameters\r\n\t\t\t\t break;\r\n\t\t\t }\r\n\t\t }\r\n\t\t if (swFinns) {\r\n\t\t \tcontinue; // Check if the next drive is new\r\n\t\t }\r\n\t\t \r\n\t\t // Enter the newly found drive to the tables with default values.\r\n\t\t\tdrive[j] = path.toString().substring(0, 2); \r\n\t\t\tpct[j] = \"10\";\r\n\t\t\tgig[j] = \"10\";\r\n\t\t\tj++;\r\n\t\t \r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\nNumber of drives found: \"+j);\r\n\r\n//\t\t ** Section two where the drives are checked for available disk ** \r\n\t\t\r\n\t\t// Get the properties needed to find the Jvakt server, if Jvakt server are to be used\r\n\t\tif (swJvakt) { \r\n\t\t\t\t\t\tif (config == null ) \tconfigF = new File(\"Jvakt.properties\");\r\n\t\t\t\t\t\telse \t\t\t\t\tconfigF = new File(config,\"Jvakt.properties\");\r\n\t\t\tSystem.out.println(\"-config file: \"+configF);\r\n\t\t\tgetProps();\r\n\t\t}\r\n\r\n\t\t// Check the drives for available space\r\n\t\tfor (int i=0; i<drive.length; i++) {\r\n\t\t\tif (drive[i]==null) break;\r\n\t\t\tswWarn = false;\r\n\t\t\tFile file = new File(drive[i]);\r\n\t\t\ttotalSpace = file.getTotalSpace(); // total disk space in bytes.\r\n//\t\t\tusableSpace = file.getUsableSpace(); // unallocated / free disk space in bytes.\r\n\t\t\tfreeSpace = file.getFreeSpace(); // unallocated / free disk space in bytes.\r\n\r\n\t\t\tif (totalSpace==0) continue; // Non existing drive probably\r\n\r\n//\t\t\tSystem.out.println(\" pct : \" + pct[i]);\r\n//\t\t\tSystem.out.println(\" gig : \" + gig[i]);\r\n\r\n\t\t\t\r\n//\t\t\tSystem.out.println(\" === bytes \"+drive[i]+\" ===\");\r\n//\t\t\tSystem.out.println(\"Total size : \" + totalSpace + \" bytes\");\r\n//\t\t\tSystem.out.println(\"Space free : \" + usableSpace + \" bytes\");\r\n//\t\t\tSystem.out.println(\"Space free : \" + freeSpace + \" bytes\");\r\n\r\n\t\t\tSystem.out.println(\" === \"+drive[i]+\" ===\");\r\n\t\t\ttotalSpaceG =totalSpace /1024 /1024 /1024;\r\n\t\t\tSystem.out.println(\"Total size : \" + totalSpaceG + \" GB\");\r\n//\t\t\tSystem.out.println(\"User space free : \" + usableSpace /1024 /1024 /1024 + \" GB\");\r\n\t\t\tfreeSpaceG =freeSpace /1024 /1024 /1024;\r\n\t\t\tSystem.out.println(\"Total space free : \" + freeSpaceG + \" GB\");\r\n\r\n\t\t\tfreePct = freeSpace * 100 / totalSpace ;\r\n\t\t\tSystem.out.println(\"Free space % : \" + freePct + \" %\");\r\n\r\n\t\t\tif (freePct < Long.parseLong(pct[i] )) {\r\n\t\t\t\tt_desc = \"Low on space \"+drive[i] + \" \"+ freePct +\" % is less than \" + pct[i] + \" %\";\r\n\t\t\t\tSystem.out.println(t_desc);\r\n\t\t\t\tswWarn = true;\r\n\t\t\t\tsendSTS(swWarn);\r\n\t\t\t}\r\n\t\t\tif (freeSpaceG < Long.parseLong(gig[i] )) {\r\n\t\t\t\tt_desc = \"Low on space \"+drive[i] + \" \"+ freeSpaceG +\" GB is less than \" + gig[i] + \" GB\";\r\n\t\t\t\tSystem.out.println(t_desc);\r\n\t\t\t\tswWarn = true;\r\n\t\t\t\tsendSTS(swWarn);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\r\n\r\n\t\tif (!swWarn) {\r\n\t\t\tt_desc = \"Disk space is within limits\";\r\n\t\t\tsendSTS(swWarn);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\telse System.exit(12);\r\n\t}", "public static void main(String[] args) {\n\n\t\tCar myCar = new Car(30);// 30 miles per gallon\n\t\tmyCar.addFuel(20);\n\t\tmyCar.distance = 90;\n\t\tmyCar.drive();\n\t\tSystem.out.print(myCar.getFuel());\n\t}", "void z_piracy()\n {\n //branch (!f_setup.piracy);\n\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:14:32.668 -0400\", hash_original_method = \"3572479FA0526880B7682F89388F5ECA\", hash_generated_method = \"39C716F918385A9F3482EB744B20B2BC\")\n \n private static boolean doBooleanCommand(String command){\n \tdouble taintDouble = 0;\n \ttaintDouble += command.getTaintInt();\n \n \treturn ((taintDouble) == 1);\n }", "public UsedCarWarehouse()\r\n {\r\n carStorage = new CarList();\r\n exitFlag = false;\r\n scan = new Scanner(System.in);\r\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.377 -0400\", hash_original_method = \"88A5F2FF82493D52EB9119CA317D3580\", hash_generated_method = \"9D01F5D917174F43A47160216A82653A\")\n \n public static boolean isDriverLoaded(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "@Test\n public void testCostToDeployDapps() {\n TransactionResult result = deployContract(Contract.AION_BUFFER_PERF);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.BASIC_PERF);\n Assert.assertEquals(2_062_419L, result.energyUsed);\n \n result = deployContract(Contract.POC_EXCHANGE);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.ERC20);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.BASIC_APP);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.TRS);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n }", "protected void execute() {\n \tRobot.logger.log(\"Gear Detected?\", (int)Robot.gearX);\n \tturn = Robot.gearX - 173; //centered is 160\n \tturn*= .0215; //.05\n \tif(Math.abs(turn)>.6 && turn <0) //.51 omni\n \t\tturn = -.6; //.61\n \tif(Math.abs(turn)>.6 && turn >0)\n \t\tturn = .6;\n \tif(Math.abs(turn)<.575 && turn >0) //.5 traction\n \t\tturn = .575; //.55\n \tif(Math.abs(turn)<.575 && turn <0)\n \t\tturn = -.575;\n \tRobot.drivetrain.tankDrive(turn, -turn);\n }", "public void onBuyGasButtonClicked(View arg0) {\n\t\tLog.d(TAG, \"Buy gas button clicked.\");\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// complain(\"No need! You're subscribed to infinite gas. Isn't that awesome?\");\n\t\t// return;\n\t\t// }\n\t\t// if (mTank >= TANK_MAX) {\n\t\t// complain(\"Your tank is full. Drive around a bit!\");\n\t\t// return;\n\t\t// }\n\t\t// launch the gas purchase UI flow.\n\t\t// We will be notified of completion via mPurchaseFinishedListener\n\t\tsetWaitScreen(true);\n\t\tLog.d(TAG, \"Launching purchase flow for gas.\");\n\t\t/*\n\t\t * TODO: for security, generate your payload here for verification. See\n\t\t * the comments on verifyDeveloperPayload() for more info. Since this is\n\t\t * a SAMPLE, we just use an empty string, but on a production app you\n\t\t * should carefully generate this.\n\t\t */\n//\t\tString payload = \"\";\n//\t\tmHelper.launchPurchaseFlow(GameRenderer.mStart, SKU_150000, RC_REQUEST,mPurchaseFinishedListener, payload);\n\t}", "public static void main(String[] param) {\t\t\r\n //(new virtualModem()).nechopackets(5);\r\n //(new virtualModem()).imagepackets(\"error\");\r\n//(new virtualModem()).chronoechopackets(480000);\r\n//(new virtualModem()).gpspackets();\r\n //(new virtualModem()).acknackpackets(480000);\r\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner (System.in);\n\t\t\n\t\tSystem.out.println(\"Welcome to DMV\");\n\t\tSystem.out.println(\"How old are you?\");\n\t\t\n\t\tint age = scan.nextInt();\n\t\t\n\t\tif (age >= 18)\n\t\t{ System.out.println(\" You are old enough for Driver's License\"); }\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"You are too young, but you can have a permit\");\n\t\t}\n\t\t\n\t}", "public static void main(String args[]) {\n Scanner s = new Scanner(System.in);\n int T = s.nextInt();\n\n for(int i = 0; i < T; i++) {\n \n int hardness = s.nextInt();\n float carbon = s.nextFloat();\n int ts = s.nextInt();\n \n int grade = 5;\n \n boolean a = hardness > 50;\n boolean b = carbon < 0.7f;\n boolean c = ts > 5600;\n \n if (a && b && c) {\n grade = 10;\n } else if(a && b) {\n grade = 9;\n } else if(b && c) {\n grade = 8;\n } else if(a && c) {\n grade = 7;\n } else if(a || b || c) {\n grade = 6;\n }\n \n System.out.println(grade);\n }\n }", "void askDefaultProduction();", "private static void simpleRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tboolean testHardware = args[0].equals(\"-testCGRAVerilog\");\n\t\t\n\t\t\n\t\tboolean synthesis = false;\n\t\tif(args[0].equals(\"-testCGRAVerilog\") || args[3].equals(\"true\")){\n\t\t\tsynthesis = true;\n\t\t} else if (args[3].equals(\"false\")){\n\t\t\tsynthesis = false;\n\t\t} else{\n\t\t\tSystem.out.println(\"Synthesis parameter not set correctly: \" + args[3]+ \"\");\n\t\t\tSystem.out.println(\"Valid values are \\\"true\\\" and \\\"false\\\"\");\n\t\t\tSystem.out.println(\"Aborting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tConfMan configManager = new ConfMan(args[1], applicationPath, synthesis);\n\t\t\n\t\tTrace simpleRunTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tsimpleRunTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(simpleRunTrace);\n\t\t}\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#.000\", symbols);\n\t\t\n\t\tAmidarSimulationResult results = run(configManager, null, testHardware);\n\t\t\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tsimpleRunTrace.setPrefix(\"results\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Synthesis \"+(configManager.getSynthesis()?\"ON\":\"OFF\"));\n\t\t\tsimpleRunTrace.println(\"Ticks: \"+results.getTicks());\n\t\t\tsimpleRunTrace.println(\"Bytecodes: \"+results.getByteCodes());\n\t\t\tsimpleRunTrace.println(\"Energy consumption: \"+formater.format(results.getEnergy()));\n\t\t\tsimpleRunTrace.println(\"Execution Time: \"+results.getExecutionDuration()+\" ms\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresults.getProfiler().reportProfile(simpleRunTrace);\n\t\t\tsimpleRunTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresults.getKernelProfiler().reportProfile(simpleRunTrace, results.getTicks());\n\t\t}\n\t\t\n\t\tif(testHardware){\n\t\t\tsimpleRunTrace.setPrefix(\"CGRA verilog test\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Testing CGRA Verilog descrption\");\n\t\t\tAmidar core = results.getAmidarCore();\n\t\t\tCGRA myCGRA = (CGRA)core.functionalUnits[core.functionalUnits.length-1]; // CGRA is the last one\n\t\t\t\n\t\t VerilogGenerator gen = target.Processor.Instance.getGenerator();\n\t\t CgraModel model = myCGRA.getModel();\n\t\t model.finalizeCgra();\n\t\t simpleRunTrace.println(\"Generate Verilog...\");\n\t\t gen.printVerilogDescription(\"out\",model);\n\t\t TestbenchGeneratorAmidar tbgen = new TestbenchGeneratorAmidar((VerilogGeneratorAmidar) gen);\n\t\t StimulusAmidar[] stimuli = new StimulusAmidar[1];\n\t\t stimuli = myCGRA.getStimulus().toArray(stimuli);\n\t\t TestbenchContextGenerator tbcongen = new TestbenchContextGenerator(model);\n\t\t tbcongen.exportContext(myCGRA.getContextCopyPEs(), myCGRA.getContextCopyCBOX(), myCGRA.getContextCopyCCU());\n//\t\t for(Stimulus stim : stimuli){\n//\t\t \tSystem.out.println(stim);\n//\t\t }\n\t\t \n\t\t tbgen.exportAppAndPrintTestbench(stimuli);\n\t\t \n//\t\t tbgen.importAppAndPrintTestbench(\"SimpleTest.main\");\n\t\t TestbenchExecutor tbex = new TestbenchExecutor();\n\t\t \n\t\t if(tbex.runTestbench()){\n\t\t \tsimpleRunTrace.println(\"Run was successful - Cosimulation succeeded\");\n\t\t }\n\t\t else{\n\t\t \tConsistencyChecker sammi = new ConsistencyChecker();\n\t\t \tboolean mismatch = sammi.findRegfileMismatch();\n\t\t \tif(mismatch){\n\t\t \t\tsimpleRunTrace.println(\"Error(s) during Simulation. Something went wrong in the data path\");\n\t\t \t}\n\t\t \telse{\n\t\t \t\tsimpleRunTrace.println(\"Emulation / HDL missmatch. Maybe there's is something not equal concerning the communication or FSM.\");\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\n\t}", "public final void initialCompute() {\n\n\t\t// Create and initialize the prover\n\t\tProver p = UtilFactory.getPrototype().newProver();\n\t\tProverSettings proverSettings = ProverSettings.get();\n\t\tif (\"OpenGeoProver\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tif (\"Wu\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_WU);\n\t\t\t} else if (\"Area\".equalsIgnoreCase(proverSettings.proverMethod)) {\n\t\t\t\tp.setProverEngine(ProverEngine.OPENGEOPROVER_AREA);\n\t\t\t}\n\t\t} else if (\"Botana\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.BOTANAS_PROVER);\n\t\t} else if (\"Recio\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.RECIOS_PROVER);\n\t\t} else if (\"PureSymbolic\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.PURE_SYMBOLIC_PROVER);\n\t\t} else if (\"Auto\".equalsIgnoreCase(proverSettings.proverEngine)) {\n\t\t\tp.setProverEngine(ProverEngine.AUTO);\n\t\t}\n\t\tp.setTimeout(proverSettings.proverTimeout);\n\t\tp.setConstruction(cons);\n\t\tp.setStatement(root);\n\t\t// Compute extra NDG's:\n\t\tp.setReturnExtraNDGs(true);\n\n\t\t// Adding benchmarking:\n\t\tdouble startTime = UtilFactory.getPrototype().getMillisecondTime();\n\t\tp.compute(); // the computation of the proof\n\t\tint elapsedTime = (int) (UtilFactory.getPrototype().getMillisecondTime()\n\t\t\t\t- startTime);\n\t\t/*\n\t\t * Don't remove this. It is needed for automated testing. (String match\n\t\t * is assumed.)\n\t\t */\n\t\tLog.debug(\"Benchmarking: \" + elapsedTime + \" ms\");\n\n\t\tProofResult proofresult = p.getProofResult();\n\t\tExtendedBoolean result = p.getYesNoAnswer();\n\n\t\tLog.debug(\"STATEMENT IS \" + proofresult + \" (yes/no: \" + result + \")\");\n\n\t\tif (proofresult == ProofResult.PROCESSING) {\n\t\t\tlist.setUndefined();\n\t\t\treturn;\n\t\t}\n\n\t\tlist.setDefined(true);\n\t\tlist.clear();\n\n\t\tif (!ExtendedBoolean.UNKNOWN.equals(result)) {\n\t\t\tBoolean unreadable = false;\n\n\t\t\tif (proofresult == ProofResult.TRUE_NDG_UNREADABLE || proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\tunreadable = true;\n\t\t\t}\n\n\t\t\tGeoBoolean answer = new GeoBoolean(cons);\n\t\t\tanswer.setValue(result.boolVal());\n\t\t\tlist.add(answer);\n\t\t\tif (result.boolVal()) {\n\t\t\t\tHashSet<NDGCondition> ndgresult = p.getNDGConditions();\n\t\t\t\tGeoList ndgConditionsList = new GeoList(cons);\n\t\t\t\tndgConditionsList.clear();\n\t\t\t\tndgConditionsList.setDrawAsComboBox(true);\n\t\t\t\tIterator<NDGCondition> it = ndgresult.iterator();\n\t\t\t\tTreeSet<GeoText> sortedSet = new TreeSet<>(\n\t\t\t\t\t\tGeoText.getComparator());\n\n\t\t\t\t// Collecting the set of NDG conditions.\n\t\t\t\t// The OGP data collector may left some unreadable conditions\n\t\t\t\t// so we make sure if the condition is readable.\n\t\t\t\twhile (!unreadable && it.hasNext()) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tNDGCondition ndgc = it.next();\n\t\t\t\t\t// Do not print unnecessary conditions:\n\t\t\t\t\tif (ndgc.getReadability() > 0) {\n\t\t\t\t\t\tndgc.rewrite(cons);\n\t\t\t\t\t\tStringBuilder s = null;\n\n\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\tRelationNumerical rn = new RelationNumerical(kernel);\n\t\t\t\t\t\t\tString cond = ndgc.getCondition();\n\t\t\t\t\t\t\tif (\"AreParallel\".equals(cond)) {\n\t\t\t\t\t\t\t\t// non-parallism in 2D means intersecting\n\t\t\t\t\t\t\t\t// FIXME: this is not true for 3D\n\t\t\t\t\t\t\t\ts = sb(rn.intersectString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\ttrue, getLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCollinear\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn\n\t\t\t\t\t\t\t\t\t\t.triangleNonDegenerateString(\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\t\t\t(GeoPoint) ndgc.getGeos()[2],\n\t\t\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreEqual\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.equalityString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t} else if (\"ArePerpendicular\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.perpendicularString(\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[0],\n\t\t\t\t\t\t\t\t\t\t(GeoLine) ndgc.getGeos()[1], false,\n\t\t\t\t\t\t\t\t\t\tgetLoc()));\n\t\t\t\t\t\t\t} else if (\"AreCongruent\".equals(cond)) {\n\t\t\t\t\t\t\t\ts = sb(rn.congruentSegmentString(\n\t\t\t\t\t\t\t\t\t\tndgc.getGeos()[0], ndgc.getGeos()[1],\n\t\t\t\t\t\t\t\t\t\tfalse, getLoc()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (s == null || !relTool) {\n\t\t\t\t\t\t\tGeoElement[] geos = ndgc.getGeos();\n\t\t\t\t\t\t\tif (geos == null) { // formula with quantities\n\t\t\t\t\t\t\t\ts = sb(ndgc.getCondition());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts = sb(getLoc()\n\t\t\t\t\t\t\t\t\t\t.getCommand(ndgc.getCondition()));\n\t\t\t\t\t\t\t\ts.append(\"[\");\n\t\t\t\t\t\t\t\tfor (int i = 0; i < ndgc\n\t\t\t\t\t\t\t\t\t\t.getGeos().length; ++i) {\n\t\t\t\t\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\t\t\t\t\ts.append(',');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\t * There can be a case when the underlying\n\t\t\t\t\t\t\t\t\t * prover sends such objects which cannot be\n\t\t\t\t\t\t\t\t\t * understood by GeoGebra. In this case we\n\t\t\t\t\t\t\t\t\t * use the \"Objects\" word. In this case we\n\t\t\t\t\t\t\t\t\t * normally return ProveResult.UNKNOWN to\n\t\t\t\t\t\t\t\t\t * not confuse the student, but for sure, we\n\t\t\t\t\t\t\t\t\t * still do the check here as well.\n\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\tGeoElement geo = ndgc.getGeos()[i];\n\t\t\t\t\t\t\t\t\tif (geo != null) {\n\t\t\t\t\t\t\t\t\t\ts.append(ndgc.getGeos()[i]\n\t\t\t\t\t\t\t\t\t\t\t\t.getLabelSimple());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.append(Unicode.ELLIPSIS);\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\ts.append(\"]\");\n\t\t\t\t\t\t\t\tif (relTool) {\n\t\t\t\t\t\t\t\t\ts.insert(0, getLoc().getMenu(\"not\") + \" \");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tndgConditionText.setTextString(s.toString());\n\t\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\t}\n\t\t\t\t\t// For alphabetically ordering, we need a sorted set here:\n\t\t\t\t}\n\t\t\t\t// Copy the sorted list into the output:\n\t\t\t\tIterator<GeoText> it2 = sortedSet.iterator();\n\t\t\t\twhile (it2.hasNext()) {\n\t\t\t\t\tndgConditionsList.add(it2.next());\n\t\t\t\t}\n\n\t\t\t\tif (unreadable) {\n\t\t\t\t\tGeoText ndgConditionText = new GeoText(cons);\n\t\t\t\t\tString cond = Unicode.ELLIPSIS + \"\";\n\t\t\t\t\tndgConditionText.setTextString(cond);\n\t\t\t\t\tndgConditionText.setLabelVisible(false);\n\t\t\t\t\tndgConditionText.setEuclidianVisible(false);\n\t\t\t\t\tsortedSet.add(ndgConditionText);\n\t\t\t\t\tndgConditionsList.add(ndgConditionText);\n\t\t\t\t}\n\n\t\t\t\t// Put this list to the final output (if non-empty):\n\t\t\t\tif (ndgConditionsList.size() > 0) {\n\t\t\t\t\tlist.add(ndgConditionsList);\n\t\t\t\t}\n\n\t\t\t\tif (proofresult == ProofResult.TRUE_ON_COMPONENTS) {\n\t\t\t\t\tGeoText classification = new GeoText(cons);\n\t\t\t\t\tString c = \"c\";\n\t\t\t\t\tclassification.setTextString(c);\n\t\t\t\t\tclassification.setLabelVisible(false);\n\t\t\t\t\tclassification.setEuclidianVisible(false);\n\t\t\t\t\tlist.add(classification);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Don't remove this. It is needed for testing the web platform. (String\n\t\t * match is assumed.)\n\t\t */\n\t\tLog.debug(\"OUTPUT for ProveDetails: \" + list);\n\n\t}", "public static void main(String[] args){\n String ser=\"0061-0F01-178B-FBFF-3E98-320B\";\n String reg=\"8B920D89AAFCD9034648\";\n if(new CheckRegister().CheckRegistered(reg,ser)){\n System.out.println(\"true\");\n }else {\n System.out.println(\"false\");\n }\n }", "public void gas(double amount){\n if(acceptedValueRange(amount)){\n incrementSpeed(Math.abs(amount));\n }\n }", "@Test\n public void checkFuelEmpty() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(0);\n assertFalse(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n \n \n \n }", "public static void main(String[] args) {\n\t\tGorilla theGorilla = new Gorilla();\n\t\t\n\t\ttheGorilla.throwSomething();\n\t\ttheGorilla.throwSomething();\n\t\ttheGorilla.throwSomething();\n\t\ttheGorilla.eatBananas();\n\t\ttheGorilla.eatBananas();\n\t\ttheGorilla.climb();\n\t\tSystem.out.print(theGorilla.energy);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n Scanner giris= new Scanner(System.in);\n System.out.print(\"Not Giriniz = \");\n int ogrNot= giris.nextInt();\n\n if (ogrNot>=50)\n {\n System.out.println(\"Gectiniz, Tebrikler\");\n }\n else\n\n {\n System.out.println(\"Kaldiniz\");\n }\n // eger if, else kalibi olmasaydi bu islemi iki if kosulu kullanarak yapardik. bu sekilde hem kolaylik\n //sagladik hem de ilk if kosulu saglandiginda tekrar else inmemesini sagladik. iki if kosulunda her ikisini de\n // kontrol ederdi.\n }", "int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }", "void askDevCardProduction();", "public static void main(String[]args){\n\t\n\tdouble budget =500;\n\t\n\tdouble phone =250.0;\n\tdouble watch =105.5;\n\tdouble bag = 80.00;\n\t\n\t\n\tif(budget< 80.0) {\n\t\tSystem.out.println(\"Cannot buy anything\");\n\t\t\n\t}if (budget >=435.5) {\n\t\tSystem.out.println(\"You can buy all items\");\n\t\n\t\t\n\t} else if (budget >= phone + watch) {\n\t\tSystem.out.println(\"You can buy Phone +Watch OR Phone + Bag OR watch + Bag\");\n\t\t\n\t} else if (budget >= phone +bag); {\n\t\tSystem.out.println(\"You can buy Phone OR watch + bag\");\n\t\t\t\t\n\t if (budget >= watch) {\n\t\tSystem.out.println(\"You can buy a watch or a bag\");\n\t\t\n\t} else {\n\t\tSystem.out.println(\"You can buy a bag\");}\n\t\n\t}\n\t}", "public static void main(String[] gears) {\n float value = 5; //prints 3\n\n System.out.print(new Q48().drive(value));\n }", "public static void main(String[] args) {\n\t\tCar bmw = new Car();\r\n\t\tbmw.make=2021;\r\n\t\tbmw.colour=\"Blue\";\r\n\t\tbmw.transmission=\"Auto\";\r\n\tbmw.displayCharacteristics();\r\n\tbmw.accelarate();\r\n\tbmw.brake();\r\n\t\t\r\n\r\n\t}", "boolean hasSoftware();", "public static void main(String[] args) {\n\t\t\n\t\tboolean allergy = true;\n\t\tboolean peanut = true;\n\t\tboolean lactose = false;\n\t\tboolean bee = true;\n\t\t\n\t\tif(!allergy) {\n\t\t\tSystem.out.println(\"You are healthy.\");\n\t\t}else {\n\t\t\tif(peanut) {\n\t\t\t\tSystem.out.println(\"Dot't eat peanut\");\n\t\t\t}\n\t\t\tif(lactose) {\n\t\t\t\tSystem.out.println(\"Dot't drink milk\");\n\t\t\t}\n\t\t\tif(bee) {\n\t\t\t\tSystem.out.println(\"Dot't mess with bees\");\n\t\t\t}\n\t\t}\n\t}", "public static void main(final String[] args) {\n final StoreEngine engine = new StoreEngine();\n final StoreCar car = new StoreCar();\n final StoreDriver drivers = new StoreDriver();\n drivers.getStore().dropTable(\"owner\");\n drivers.getStore().dropTable(\"engine\");\n drivers.getStore().dropTable(\"car\");\n drivers.getStore().dropTable(\"driver\");\n Engine v40 = new Engine(\"4.0\");\n Engine v50 = new Engine(\"5.0\");\n Engine v60 = new Engine(\"6.0\");\n v40 = engine.getStore().save(v40);\n v50 = engine.getStore().save(v50);\n v60 = engine.getStore().save(v60);\n Car bmw540 = new Car(\"bmw\", \"5\", v40);\n Car bmw750 = new Car(\"bmw\", \"7\", v50);\n Car s600 = new Car(\"mrc\", \"S\", v60);\n car.getStore().save(bmw540);\n car.getStore().save(bmw750);\n car.getStore().save(s600);\n final List<Car> bmwA = car.getByBrand(\"bmw\");\n s600.setModel(\"SL\");\n car.getStore().update(s600);\n s600 = car.getStore().getById(s600.getId(), Car.class);\n final Set<Car> bmw = new HashSet<>(bmwA);\n final Driver max = new Driver(\"Max\", bmw);\n drivers.getStore().save(max);\n final Driver name = drivers.getDriverByName(\"Max\");\n final List<Car> carLst = drivers.getCarsByDriverName(\"Max\");\n System.out.println(s600);\n System.out.println(name);\n carLst.forEach(System.out::println);\n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public static void main(String[] args) {\n Inventory inventory = new Inventory();\n DB.initializeInventory(inventory);\n\n Map properties = new HashMap();\n \n Scanner scan = new Scanner(System.in);\t\n \n properties.put(\"builder\", Builder.GIBSON);\n properties.put(\"backWood\", Wood.MAPLE);\n InstrumentSpec whatBryanLikes = new InstrumentSpec(properties);\n\n List matchingInstruments = inventory.search(whatBryanLikes);\n \n if (!matchingInstruments.isEmpty()) {\n System.out.println(\"Mister, you might like these instruments:\");\n for (Iterator i = matchingInstruments.iterator(); i.hasNext(); ) {\n Instrument instrument = (Instrument)i.next();\n InstrumentSpec spec = instrument.getSpec();\n System.out.println(\"We have a \" + spec.getProperty(\"instrumentType\") +\n \" with the following properties:\");\n for (Iterator j = spec.getProperties().keySet().iterator(); \n j.hasNext(); ) {\n String propertyName = (String)j.next();\n if (propertyName.equals(\"instrumentType\"))\n continue;\n System.out.println(\" \" + propertyName + \": \" +\n spec.getProperty(propertyName));\n } \n System.out.println(\" You can have this \" + \n spec.getProperty(\"instrumentType\") + \" for $\" + \n instrument.getPrice() + \"\\n---\");\n }\n } else {\n System.out.println(\"Sorry, Bryan, we have nothing for you.\");\n }\n }", "public static void main(String[] args) {\n\n Scanner shoppingMethod = new Scanner(System.in);\n System.out.println(\"DO YOU WANT TO SHOP ?\");\n boolean wantToShop = shoppingMethod.nextBoolean();\n\n System.out.println(\"WHAT IS THE WAY YOU SHOPPIG ?\");\n String onlineOrStore = shoppingMethod.next();\n\n if(wantToShop==true) {\n if (onlineOrStore.equals(\"Online\")) {\n System.out.println(\"GOING TO ONLINE SHOOPING\");\n } else {\n System.out.println(\"GOING TO STORE SHOPPING\");\n }\n } else {\n System.out.println(\"GOOD JOB\");\n }\n\n }", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public static void execute() {\n EFsupply.standardGroundSupply(70036690, -63257400, \"EF Tasmania Supply 1\");\n\n //Default Zeon supply i Tasmania.\n ZeonSupply.standardGroundSupply(69616733, -63019640, \"Zeon Tasmania Supply 1\");\n\n ZeonNpcEF1();\n EfNpcZeon1();\n }", "public static void main(String[] args) {\n\r\n\t\tMachine mac = new Machine();\r\n\t\t\r\n\t\tmac.start();\r\n\t\tmac.stop();\r\n\t\tSystem.out.println(\"----------------------\");\r\n\t\t\r\n\t\tCar bmw = new Car();\r\n\t\tbmw.start();\r\n\t\tbmw.stop();\r\n\t\tbmw.re_strat();\r\n\t\tSystem.out.println(\"-------------------\");\r\n\t\t\r\n\t\tMachine alto = new Car();\r\n\t\t\t\talto.start();\r\n\t\talto.stop();\r\n\t\tSystem.out.println(alto.engsize);\r\n\t\tSystem.out.println(\"---------------------------\");\t\r\n\t}", "public void priceCheck() {\n\t\tnew WLPriceCheck().execute(\"\");\n\t}", "public static void main(String[] args) {\n\n\t\t/**************************************/\n\t\tboolean startPlanetensystem = true;\n\t\tboolean startFreierFall = true;\n\n\t\tboolean testExpliziteVerfahren = true;\n\t\tboolean testKonvergenzordnung = true;\n\t\t/**************************************/\n\n\t\tif (startPlanetensystem) {\n\t\t\tnew PlanetenGUI().setVisible(true);\n\t\t}\n\n\t\tif (startFreierFall) {\n\t\t\tnew FastTransportGui().setVisible(true);\n\t\t}\n\n\t\tif (testExpliziteVerfahren)\n\t\t\ttestExpliziteVerfahren();\n\t\t\n\t\tif(testKonvergenzordnung)\n\t\t{\n\t\t\ttestKonvergenzordnung();\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\t\tif(getPin()==pin)\n\t\t\t\t{\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tgetOptions();\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tincorrectPin();\n\t\t\t}\n\t}", "public static void main(String[] args) {\n\n\n\n for (int i = 1; i < 6; i++) {\n Car randomCar = randomCar();\n System.out.println(\"Car #\" + i + \"\\n\" + randomCar.accelerate() + \"\\n\"\n + randomCar.startEngine() + \"\\n\");\n\n }\n\n }", "public static void main(String [] args) throws Exception{\n\tint Systemexit= ToolRunner.run(new DriverIndianAirport(), args);\r\n\tSystem.exit(Systemexit);\r\n}", "public static void main(String args[]) {\n\n\ttry {\n\n\t CommandTokenizer parser = new CommandTokenizer(\"--\");\n\t parser.parse(args);\n\t ConfigurationProperties config = parser.getMap();\n\n\t Logger slogger = LogManager.getLogger(\"SIM\");\n\t slogger.setLogLevel(config.getIntValue(\"log-level\", 3));\n\t ConsoleLogHandler console = new ConsoleLogHandler(new SimulationLogFormatter());\n\t console.setLogLevel(config.getIntValue(\"log-level\", 3));\n\t slogger.addHandler(console);\n\n\t LogProxy logger = new LogProxy(\"QST\",\"\",slogger);\n\n\t Site site = new Site(config.getProperty(\"site\"), \n\t\t\t\t Math.toRadians(config.getDoubleValue(\"lat\")), \n\t\t\t\t Math.toRadians(config.getDoubleValue(\"long\")));\n\t \n\t long start = (ScheduleSimulator.sdf.parse(config.getProperty(\"start\"))).getTime();\n long end = (ScheduleSimulator.sdf.parse(config.getProperty(\"end\"))).getTime();\n\n\t // Instruments.\n\t InstrumentRegistry instruments = (InstrumentRegistry)Naming.lookup(\"rmi://localhost/InstrumentRegistry\");\n\t \n\t // Exec model\n\t File bxf = new File(config.getProperty(\"exec\")); // exec model properties\n BasicExecutionTimingModel bxtm = new BasicExecutionTimingModel(site, instruments);\n\t PropertiesConfigurator.use(bxf).configure(bxtm);\n\n\t // Allow 2 day for this test...\n bxtm.setExternalTimeConstraint(end+30*24*3600*1000L, \"End of simulation\");\n\n\t // Stochastic wrapper.\n\t //File bsef = new File(config.getProperty(\"sexm\")); // stochastic exec model properties\n\t //BasicStochasticExecutionTimingModel bsem = new BasicStochasticExecutionTimingModel(bxtm);\n\t //PropertiesConfigurator.use(bsef).configure(bsem);\n\n\t // TC window calculator.\n\t BasicTimingConstraintWindowCalculator btcwc = new BasicTimingConstraintWindowCalculator(bxtm, site, 5*60*1000L);\n\n\t // Charging\n\t File bcaf = new File(config.getProperty(\"cost\")); // charge model properties\n\t BasicChargeAccountingModel bcam = new BasicChargeAccountingModel();\n\t PropertiesConfigurator.use(bcaf).configure(bcam);\n\n\t // Selector\n //BasicSelectionHeuristic bsel = new BasicSelectionHeuristic();\n\n\t // Env prediction\n\t File bepf = new File(config.getProperty(\"env\")); // Environment properties\t \n\t BasicEnvironmentPredictor bep = new BasicEnvironmentPredictor();\n\t PropertiesConfigurator.use(bepf).configure(bep); \n\t //BasicMutableEnvironmentPredictor bep = new BasicMutableEnvironmentPredictor();\n\t //bep.setPhotom(true);\n\t //bep.setSeeing(seeing);\n\n\n\t // Weather prediction - this will be replaced with Weather scenario model\n\t //File swpf = new File(config.getProperty(\"weather\")); // weather properties\n\t //StandardWeatherPredictor swp = new StandardWeatherPredictor();\n\t //PropertiesConfigurator.use(swpf).configure(swp);\n\t // and pre-compute weather for the full run\n\t //swp.preCompute(start, end);\n\t BasicMutableWeatherModel bwm = new BasicMutableWeatherModel();\n\t bwm.setGood(true);\n\n\t // RTC\n\t // RemainingTimeCalculator rtc = new DummyRemainingTimeCalculator();\n\n\t // ODB\n\t String root = config.getProperty(\"root\");\n\t \n\t Phase2ModelProvider provider = (Phase2ModelProvider)Naming.\n\t\tlookup(\"rmi://localhost/\"+root+\"_Phase2ModelProvider\");\n\t Phase2Model phase2 = provider.getPhase2Model();\n\n\t // History\n BasicHistoryModel history = new BasicHistoryModel();\n\t history.loadHistory(phase2, start);\n\n\t BasicAccountingModel bam = new BasicAccountingModel();\n\t bam.loadAccounts(phase2, start);\n\n\n\t // Select a scoring model here - there will be others \n\t // Scoring model\n\t File smf = new File(config.getProperty(\"score\")); // bogstandard scoring properties\n\t BasicScoringModel bsm = new BasicScoringModel(site);\n\t PropertiesConfigurator.use(smf).configure(bsm);\n\t \n\t BasicCandidateGenerator bcg = new BasicCandidateGenerator(phase2,\n\t\t\t\t\t\t\t\t history,\n\t\t\t\t\t\t\t\t bam,\n\t\t\t\t\t\t\t\t bxtm,\n\t\t\t\t\t\t\t\t bsm);\n\n\n\t // Alternative using despath scheduler\n\t BasicSelectionHeuristic selector = new BasicSelectionHeuristic();\n \t BasicDespatcher bds = new BasicDespatcher(bcg,\n\t\t\t\t\t\t selector);\n\n\n\t slogger.log(1, \"Start sim run...\");\n\n\t // fixed env for now\n\t EnvironmentSnapshot env = new EnvironmentSnapshot();\n\t env.seeing = Group.EXCELLENT;\n\t env.photom = true;\n\n\t // setup some stats.\n\t PriorityUtilityCalculator puc;\n\t OptimalAirmassUtilityCalculator oauc;\n\t RemainingNightsUtilityCalculator rnuc;\n\t ScoringUtilityCalculator suc;\n\n\t oauc = new OptimalAirmassUtilityCalculator(site, btcwc, bxtm, 5*60*1000L);\n\t puc = new PriorityUtilityCalculator(bxtm);\n\t rnuc = new RemainingNightsUtilityCalculator(btcwc);\n\t suc = new ScoringUtilityCalculator(bxtm, bsm, bam);\n \n\t double pqm =0.0;\n\t double oaqm = 0.0;\n\t double rnqm = 0.0;\n\t double xtqm = 0.0;\n\t double ngqm = 0.0;\n\t double sqm = 0.0;\n\n\t int it = 0;\n\t //while (t < end) {\n\n\t int ndays = (int)((end - start)/86400000);\n\t\n\t // run for many days\t\t\n\t for (int in = 0; in < ndays; in++) {\n\t\t\n\t\tlong ds = start + in*86400*1000L;\n\t\tlong de = ds + 86400*1000L;\n\t\t\n\t\t// work out the night length\n\t\tlong night = 0L;\n\t\tlong astro = 0L;\n\t\tlong t = ds;\n\t\twhile (t < de) {\n\t\t Position sun = Astrometry.getSolarPosition(t);\n\t\t double sunElev = sun.getAltitude(t, site);\n\t\t if (sunElev < 0.0)\n\t\t\tnight += 5*60*1000L;\n\t\t if (sunElev < Math.toRadians(-18.0))\n\t\t\tastro += 5*60*1000L;\n\t\t t += 5*60*1000L;\n\t\t}\n\t\t\n\t\t// DAILY totals\n\t\tint ngs = 0;\n\t\tdouble phm = 0.0;\n\t\tdouble oahm = 0.0;\n\t\tdouble rnhm = 0.0;\n\t\tdouble xtm = 0.0;\n\t\tdouble shm = 0.0;\n\n\t\t// a days worth\n\t\tt = ds;\n\t\twhile (t < de) {\n\t\t \n\t\t Position sun = Astrometry.getSolarPosition(t);\n\t\t if (sun.getAltitude(t, site) > Math.toRadians(-1.0)) {\n\t\t\tt += 5*60*1000L;\n\t\t\tlogger.log(1, \"SUNUP at \"+ScheduleSimulator.sdf.format(new Date(t)));\n\t\t\tcontinue;\n\t\t }\n\t\t \n\t\t // Using BDS\n\t\t Metric metric = bds.getScheduleItem(t, env);\n\t\t \n\t\t if (metric == null) {\n\t\t\tt += 5*60*1000L;\n\t\t\tlogger.log(1, \"SELECT \"+it+\" at \"+ScheduleSimulator.sdf.format(new Date(t))+\" NONE\");\n\t\t } else {\n\t\t\t\n\t\t\tGroup group = metric.group;\n\t\t\tExecutionStatistics hist = history.getExecutionStatistics(group);\n\t\t\tlong xt = bxtm.getExecTime(group);\n\t\t\t\n\t\t\t// SQM updates\n\t\t\tngs++;\n\t\t\tphm += puc.getUtility(group, t, env, hist);\n\t\t\toahm += oauc.getUtility(group, t, env, hist);\n\t\t\trnhm += rnuc.getUtility(group, t, env, hist);\t\t\n\t\t\txtm += (double)xt;\n\t\t\tshm += suc.getUtility(group, t, env, hist);\n\n\t\t\tlogger.log(1, \"SELECT \"+it+\" at \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+group.getName()+\n\t\t\t\t \" until \"+ScheduleSimulator.sdf.format(new Date(t+xt)));\n\t\t\tt += xt;\n\t\t\thistory.updateHistory(group, t-10000L);\n\t\t\t\n\t\t }\n\t\t it++;\n\t\t}\n\n\t\t// daily averages\n\t\tlogger.log(1, \"CDAT_NG \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+ngs);\n\t\tlogger.log(1, \"CDAT_PX \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+(phm/night));\n\t\tlogger.log(1, \"CDAT_OA \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+(oahm/(double)ngs));\n\t\tlogger.log(1, \"CDAT_RN \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+(rnhm/(double)ngs));\n\t\tlogger.log(1, \"CDAT_XT \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+((double)xtm/night));// hours\n\t\tlogger.log(1, \"CDAT_SU \"+ScheduleSimulator.sdf.format(new Date(t))+\" \"+shm);\n\t\t\n\t\tngqm += ngs;\n\t\tpqm += phm/night;\n\t\toaqm += oahm/(double)ngs;\n\t\trnqm += rnhm/(double)ngs;\n\t\txtqm += xtm/3600000.0;\n\t\tsqm += shm;\n\n\t } // next day\n\t \n\t // averages for SQM\n\t logger.log(1, \"CDAT_SQ_NG \"+(ngqm/(double)ndays));\n\t logger.log(1, \"CDAT_SQ_PX \"+(pqm/(double)ndays));\n\t logger.log(1, \"CDAT_SQ_OA \"+(oaqm/(double)ndays));\n\t logger.log(1, \"CDAT_SQ_RN \"+(rnqm/(double)ndays));\n\t logger.log(1, \"CDAT_SQ_XT \"+(xtqm/(double)ndays));// hours\n\t logger.log(1, \"CDAT_SQ_SU \"+(sqm/(double)ndays));\n\t \n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t return;\n\t}\n\t\n }", "public static void main(String[] args) {\n\t\t\n\t\tboolean creditCard=true;\n\t\tint balance=2000;\n\t\t\n\t\tif (creditCard) {\n\t\t\tSystem.out.println(\"Lets check the balance\");\n\t\t\tif(balance>1000) {\n\t\t\t\tSystem.out.println(\"pay off now\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"you are good\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"Do you want a credit card?\");\n\t\t}\n\n\t}", "private void check(final VProgram program) {\n\t}", "public static void main(String[] agrs) {\n\t\tconditionalOperEx();\r\n\t}", "boolean hasGcj02();", "public static void main(String[] args) {\n\t\n\t int velocidad = 130; //KM/H\n\t int limiteVelocidad = 80;\n\t \n//\t if (velocidad > limiteVelocidad) {\n//\t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n//\t }else {\n//\t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n//\t }\n\t \n//\t IF Anidado\n\t \n\t boolean carretera = true;\n\t \n\t if (carretera) {\n\t \t\n\t System.out.println(\"Estas en una carretera\");\n\t \t\n\t limiteVelocidad = 110;\n\t \t\n\t \tif(velocidad > limiteVelocidad) {\n\t \t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n\t \t }else {\n\t \t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n\t \t }\n\t }else if (velocidad > limiteVelocidad) {\n\t\t\t\t\tSystem.out.println(\"El coche esta en una calle y va a excceso de velocidad\");\n\t\t}else {\n\t\t\tSystem.out.println(\"El coche esta en una calle y va en la velocidad adecuada\");\n\t\t}\t \n\t \n//\t SWITCH CASE\n\t \n\t int temperatura = 30;\n\t switch(temperatura) {\n\t \n\t case 5:\n\t \tSystem.out.println(\"mucho frio\");\n\t \tbreak;\n\t \t\n\t case 10:\n\t \tSystem.out.println(\"frio\");\n\t \tbreak;\n\n\t case 20:\n\t\t\tSystem.out.println(\"clima agradable\");\n\t\t\tbreak;\t \n\t\t\t\n\t case 30:\n\t\t\tSystem.out.println(\"calor\");\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"no encontro temperatura\");\n\t\t \n\t }\n\t \t\t\n\t}", "@Test\r\n\tpublic void MakeBeverageTest() throws InsuficientException, InterruptedException\r\n\t{\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(1));\r\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(0));\r\n\t\tSystem.out.println(\"Servered Successfully !!\");\r\n\t}", "public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil());\n\t}", "public static void main(String args[])\n {\n new HardwareDeviceRental();\n }", "public void run() throws IOException{\t\n\t\t\tString command;\n\t\t\tprintUsage();\n\t\t\tSystem.out.print(\">> \");\n\t\t\twhile(!(command = consoleIn.readLine()).trim().equals(\"exit\")){\n\t\t\t\ttry{\n\t\t\t\t\tswitch(command){\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\tsimulatable = MordorFrameBuilds.getInstance();\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAPRUNE_TRAP);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAPRUNE_TOWER);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.DEFAULT);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.TRAP_AFFECTS);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\t\tsimulatable = MissileDamageSimulator.getInstance();\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.TOWER_FIRES);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TOWER_GROUND);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.TRAP_ROAD);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"10\":\n\t\t\t\t\t\tsimulatable = CastSimulator.getInstance();\n\t\t\t\t\t\t((CastSimulator)simulatable).configureFor(CastAlias.MAGIC);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"11\":\n\t\t\t\t\t\tsimulatable = TroopStepSimulator.getInstance();\n\t\t\t\t\t\t((TroopStepSimulator)simulatable)\n\t\t\t\t\t\t\t.configureFor(TroopStepSimulator.TroopStepAlias.DAMAGES_MOUNTAIN);\n\t\t\t\t\t\trunSimulation();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: printUsage();\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException e){\n\t\t\t\t\tSystem.out.println(\"io error: \"+e.getClass().getName()+\": \"+e.getMessage());\n\t\t\t\t}catch(Exception ex){\n\t\t\t\t\tSystem.out.println(\"exception in main thread: \"+ex.getClass()+\": \"+ex.getMessage());\n\t\t\t\t}finally{\n\t\t\t\t\tSystem.out.print(\">> \");\n\t\t\t\t}\n\t\t\t}\n\t}", "public static void main(String[] args) {\n TestAutoTask task = new TestAutoTask();\n while (true){\n System.out.println(task.getRandomAmount().toString());\n }\n\n /*double d = 0.111;\n System.out.println(new BigDecimal(String.valueOf(d)));*/\n\n /*double rmb = 25 * 0.0001 * 6000;\n System.out.print(rmb);\n int i = 2;\n switch (i){\n case 1:\n System.out.println(\"test\");\n break;\n }*/\n }", "void useGodPower(boolean use);", "public static void main(String[] args) {\n Factory factory = new SuTenCarFactory();\n Car car = factory.create();\n car.drive();\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tdouble money=5;\t\t\t\t\n\t\tdouble iceCream=5.59;\n\n\t\tif (money<= iceCream); {\n System.out.println(\"I am going to buy iceCream\");\n }else {\n\t\tSystem.out.println(\"I cant buy iceCream\");\n\t\n\t\t}\n\t\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.397 -0400\", hash_original_method = \"FC9A66B03EDC591DD9B38410E60AAA0B\", hash_generated_method = \"575EBCA96DF418DE2A7F2DFD0BCD9A9A\")\n \n public static boolean pingCommand(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "public static void main(String[] args) {\n Scanner op=new Scanner(System.in);\r\n byte s=1;\r\n byte c;\r\n double n=0.0, t=0.0;\r\n \r\n System.out.println(\"Bienvenidos\");\r\n System.out.println(\"¿Cauntos productos desea registrar?\");\r\n c=op.nextByte();\r\n \r\n do{\r\n System.out.println(\"Ingrese el precio del producto\" + s);\r\n n=op.nextDouble();\r\n t=t+n;\r\n \r\n s++;\r\n \r\n\t}while(s<=c);\r\n \r\n System.out.println(\"El monto total es: \"+t);\r\n \r\nif(t>=1500){\r\n\tt=t*1.11;\r\n}else{\r\n\tt=t*1.10;\r\n}\r\nSystem.out.println(\"El precio total es: \"+t);\r\n}", "public void smogCheck(){\n if(!cargo){\n System.out.println(\"Hey ya don't got any cargo, might as well get your smog checked.\");\n this.cargo = true;\n }\n }", "public static void main(String[] args) {\n\t\tScanner a=new Scanner(System.in);\r\n\t\t/*System.out.println(\"Enter the number\");\r\n\t\tSystem.out.println(\"1.Micro\");\r\n\t\tSystem.out.println(\"2.Prime\");\r\n\t\t\r\n\t\tint cab=a.nextInt();\r\n\t\tSystem.out.println(\"Enter the KM\");\r\n\t\tint Km=a.nextInt();\r\n\t\tif(cab==1) {\r\n\t\t\tint price=10;\r\n\t\t\tSystem.out.println(\"Drop Charge =\"+(price*Km));\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(cab==2){\r\n\t\t\tint price=20;\r\n\t\t\tSystem.out.println(\"Drop Charge =\"+(price*Km));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Invalid\");\r\n\t\t}*/\r\n\tSystem.out.println(\"enter your choice\");\r\n\tSystem.out.println(\"bike\");\r\n\tSystem.out.println(\"car\");\r\n\tString vehicle=a.next();\r\n\t\r\n\tif(vehicle.equals(\"bike\")) {\r\n\t\trateforbike(vehicle);\r\n\t}\r\n\telse if(vehicle.equals(\"car\")) {\r\n\t\trateforcar(vehicle);\r\n\t}\r\n\t\r\n\r\n}", "public static void main(String[] args) {\n\t\t\n\t\tGerenciadorDeCupons gerenciador = new GerenciadorDeCupons();\n\t\t\n\t\tDouble desconto = gerenciador.validaCupons(\"CUP22\");\n\t\t\n\t\tif(desconto != null){\n\t\t\tSystem.out.println(\"Cupom de desconto valido!\");\n\t\t\tSystem.out.println(\"Valor de \" + desconto);\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom nao existe\");\n\t\t}\n\n\t\t\n\t\t//----------------------------------------------\n\t\t\nGerenciadorDeCupons1 gerenciador1 = new GerenciadorDeCupons1();\n\t\t\n\t\tif(gerenciador1.validaCupons(\"CUP231\")){\n\t\t\tSystem.out.println(\"Cupom TIPO 1 de desconto valido!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom TIPO 1 nao existe\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//----------------------------------------------\n\t\tGerenciadorDeCupons2 gerenciador2 = new GerenciadorDeCupons2();\n\t\t\n\t\tif(gerenciador2.validaCupons(\"CUP54\")){\n\t\t\tSystem.out.println(\"Cupom TIPO 2 de desconto valido!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom TIPO 2 nao existe\");\n\t\t}\n\n\t}", "public boolean eval() throws Exception\n {\n return isOs( family, name, arch, version );\n }", "public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }", "public static void main(String[] args) {\n Gearbox auto = GearboxFactory.create(GearboxFactory.Type.AUTOMATIC);\r\n // Create a manual gearbox\r\n Gearbox manual = GearboxFactory.create(GearboxFactory.Type.MANUAL);\r\n }", "public static void main(String[] args) {\n\n\t\tString drink = \"\";\n\t\tBoolean a;\n\t\tBoolean b;\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Are you thirsty?\");\n\n\t\ta = scan.nextBoolean();\n\n\t\tSystem.out.println(\"Are you sleepy?\");\n\t\tb = scan.nextBoolean();\n\n\t\tif (a && !b) {\n\t\t\tdrink = \"Water\";\n\n\t\t} else if (a && b) {\n\t\t\tdrink = \"Coffee\";\n\n\t\t} else if (!a && b) {\n\t\t\tdrink = \"Tea\";\n\n\t\t} else {\n\t\t\tdrink = \"Unknown\";\n\n\t\t}\n\t\tSystem.out.println(\"Looks like you need drink \" + drink);\n\t}", "public static void main(String[] args){\n// kazan.megtolt();\n// kazan.kiurit();\n// kazan.megtolt();\n gombEsemeny(false);\n gombEsemeny(false);\n gombEsemeny(true);\n gombEsemeny(false);\n }", "public static void main(String... args) throws Exception {\n //ScanUtils.getPrivateFields(PkgMain.class);\n// byte[] testPkg = new byte[]{\n// 0x1c,0x2d,0x3e,0x4f,\n// 0x13,0x00,0x00,0x00,\n// 0x06,0x00,0x00,0x00,\n// 0x01,0x00,0x00,0x00,\n// (byte) 0xE1,0x07,0x7,0x0f,\n// 0x16,0x35,0x0b,\n// 0x6e,0x01\n// };\n//\n// PkgTime tmpTestTime = new PkgTime(new Date());\n// PkgMain tmpTestMain = new PkgMain();\n// tmpTestMain.setInfo(tmpTestTime);\n// tmpTestMain.setSerialsNo(6);\n// tmpTestMain.setPyType(1);\n// tmpTestMain.setHeader(0x4f3e2d1c);\n// tmpTestMain.getPackageLength();\n// byte[] tmpbuffer = tmpTestMain.getThisBytes();\n//\n// PkgMain pkgMain = new PkgMain();\n// pkgMain.checkPackageIsReady(testPkg);\n// pkgMain.resolvePackage(testPkg,0);\n// byte[] testPk = new byte[100];\n// ByteBuffer byteBuffer = ByteBuffer.wrap(testPkg,0,testPkg.length);\n// byteBuffer.order(ByteOrder.LITTLE_ENDIAN);\n// byteBuffer.getInt(12);\n// byteBuffer = ByteBuffer.wrap(testPk);\n// byteBuffer.putInt(10);\n// byteBuffer.putInt(16);\n//\n// PackageUtil.resolvePackage(testPkg,0,pkgMain);\n// ScanUtils.setFieldValue(pkgMain,\"header\",0x6c7d8e9f);\n// PkgTime pkgTime = (PkgTime)ScanUtils.makeFieldInst(PkgTime.class);\n// PkgTD pkgTD =new PkgTD();\n// //pkgTD.setTest(pkgTime);\n// pkgMain.setInfo(pkgTD);\n// System.out.println(ScanUtils.getObjectSize(pkgMain));\n// return;\n if(args == null || args.length==0){\n System.out.println(\"arg = s or arg = c\");\n }else{\n if(args[0].equals(\"s\")){\n LabServer labServer = new LabServer();\n labServer.startTest();\n }\n if(args[0].equals(\"c\")){\n LabClient labClient = new LabClient();\n labClient.sendTest();\n }\n }\n }", "boolean hasMainUtteranceDynamicGain();", "public static void main(String[] args) {\n\n\t\tboolean creditcard=false;\n\t\tint balance=1000;\n\t\t\n\t\tif(creditcard) {\n\t\t\tSystem.out.println(\"lets check the balance\");\n\t\tif(balance>=1000) {\n\t\t\tSystem.out.println(\"pay off now\");\n\t\t}else \n\t\tSystem.out.println(\"you are good\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"do you want a creditcard\");\n\t\t}\n\t\t\n\t\t\n\t}", "private void checkAndActivateCPU() {\n statusController.checkIfCPU();\n if (modelCheck.isCurrentPlayerCPU()) {\n CPU.actionSequence();\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tACMESmartphone myACMESmartphone = new ACMESmartphone(2.0, \"398978fdskj\");\n\n\t\t// Locate the roadrunner.\n\t\tmyACMESmartphone.findRoadRunner(\"Santa Clara\",\"California\");\n\n\t\t// Zap the roadrunner with the amount of voltage you want.\n\t\tmyACMESmartphone.zapRoadRunner(40);\n\n\t}", "public static void main(String[] args) {\n\t\t\t\tint complexity = 0;\n\n\t\t\tcomplexity == (temps < 30) && (ingredients < 5) ;\n\n\t\tSystem.out.println(complexity);\n\n\n\n\n\t\t\tif (complexity < 30 && ingredients < 5) {\n\t\t\tSystem.out.println(\"easy\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(complexity < 60 && ingredients < 10) {\n\t\t\t\tSystem.out.println(\"medium\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\telse if(complexity >= 60 && ingredients >= 10) {\n\t\t\t\tSystem.out.println(\"hard\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\n\t\t\t\n\t}", "public void sendGas(String gas) {\n sendMessage(Prefix.GAS, gas);\n }" ]
[ "0.5701274", "0.55835056", "0.5553162", "0.54939073", "0.5485782", "0.5421624", "0.54087186", "0.53981185", "0.53868794", "0.53514224", "0.5347286", "0.5328077", "0.5322269", "0.5275935", "0.5274336", "0.52586174", "0.52524984", "0.5246883", "0.5232393", "0.52286136", "0.522163", "0.52101654", "0.51985306", "0.5178981", "0.51645315", "0.5117989", "0.51069313", "0.5104204", "0.5098542", "0.5092317", "0.50822735", "0.50762266", "0.505733", "0.5047032", "0.5044122", "0.50417095", "0.5041497", "0.5040059", "0.50393933", "0.5035193", "0.50327384", "0.5028931", "0.50261945", "0.5019436", "0.50160074", "0.50112814", "0.50095975", "0.5004549", "0.49927703", "0.49859732", "0.4984145", "0.498091", "0.498029", "0.4977408", "0.496907", "0.4966509", "0.4965191", "0.4963225", "0.49572876", "0.49558574", "0.49459845", "0.4940581", "0.49397364", "0.49357188", "0.49351236", "0.49310136", "0.4930361", "0.4924814", "0.4923735", "0.49220663", "0.49178433", "0.49170867", "0.49163225", "0.48974624", "0.48922455", "0.48863798", "0.48821166", "0.48764816", "0.48729542", "0.48721653", "0.48713076", "0.4870635", "0.48705631", "0.487053", "0.4863459", "0.4861924", "0.4859293", "0.4856318", "0.4847713", "0.48459622", "0.48434392", "0.4842595", "0.48410878", "0.48370272", "0.4833662", "0.48321557", "0.48320234", "0.48318294", "0.4829291", "0.48249653" ]
0.59244883
0
Program that calculates the wind chill index (WCI).
public void windChillIndex() { System.out.print( "Enter the damn wind speed: " ); double v = scan.nextDouble(); System.out.print( "Enter the darn temperature: " ); double t = scan.nextDouble(); double wci; if ( 0 <= v && v <= 4 ) { wci = t; System.out.println( "The wind chill index is: " + wci ); } if ( v >= 45 ) { wci = 1.6 * t - 55; System.out.println( "The wind chill index is: " + wci ); } wci = 91.4 + ( 91.4 - t ) * ( 0.0203 * v - 0.304 * Math.sqrt( (double)v ) - 0.474 ); System.out.println( "The wind chill index is: " + wci ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getWindChill() {\n float tempC;\n float windSpeed;\n double windChill = 0;\n double windChillr = 0;\n\n\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n windSpeed = readings.get(readings.size() - 1).windSpeed;\n windChill = 13.12 + (0.6215 * tempC) - (11.37 * Math.pow(windSpeed, 0.16)) + 0.3965 * 6 * Math.pow(2, 0.16);\n windChillr = Math.round(windChill * 10.0) / 10.0;\n } else {\n\n }\n return windChillr;\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\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\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "protected int getBinIndex(double w){\n\t\tdouble lnw = Math.log(w);\n\t\tdouble i = Math.floor((lnw - m_lnA0)/m_lnR);\n\t\tint result = (int)i;\n\t\tif(result >= m_numBins.getValue() || result < 0){\n\t\t\tresult = -1;\n\t\t}\n\t\treturn result;\n\t}", "private int numberOfCritters(int wave){\n\t\treturn 9 + (wave%3)*6;\n\t}", "C1000w mo7300a(int i);", "@Test\n\tpublic void westSWC()\n\t{\n\t\t\n\t\tData d = new Data();\n\t\td.set(19, 35);\n\t\td.set(21, 46);\n\t\td.set(23, 89);\n\t\td.set(27, 68);\n\t\td.set(29, 79);\n\t\td.set(1, 34);\n\t\td.set(2, 45);\n\t\td.set(3, 56);\n\t\td.set(4, 67);\n\t\td.set(5, 78);\n\t\td.set(31, 23);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(23);\n\t\tassertTrue(0==test_arr.get(0).getX() && 3==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 4==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 5==test_arr.get(2).getY()\n\t\t\t&& 0==test_arr.get(3).getX() && 6==test_arr.get(3).getY()\n\t\t\t&& 0==test_arr.get(4).getX() && 7==test_arr.get(4).getY());\n\t}", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public int mo80c() {\n return 7;\n }", "double getStartW();", "@Override\n public SpaceCoordinates getWind(SpaceCoordinates cUAV) {\n int currentIntensity = new Integer(this.intensity);\n if(currentIntensity == 1) {\n wind.setX(randomGenerator(-LIGHT_MAX,LIGHT_MAX));\n wind.setY(randomGenerator(-LIGHT_MAX,LIGHT_MAX));\n wind.setZ(randomGenerator(-LIGHT_MAX,LIGHT_MAX));\n }\n else if(currentIntensity == 2) {\n wind.setX(randomGenerator(-MODERATE_MAX,MODERATE_MAX));\n wind.setY(randomGenerator(-MODERATE_MAX,MODERATE_MAX));\n wind.setZ(randomGenerator(-MODERATE_MAX,MODERATE_MAX));\n }\n else if(currentIntensity == 3) {\n wind.setX(randomGenerator(-SEVERE_MAX,SEVERE_MAX));\n wind.setY(randomGenerator(-SEVERE_MAX,SEVERE_MAX));\n wind.setZ(randomGenerator(-SEVERE_MAX,SEVERE_MAX));\n }\n else {\n wind.setCoordinates(0.0, 0.0, 0.0);\n }\n return wind;\n }", "public double calculatedConsuption(){\n\tint tressToSow=0;\n\n\tif (kiloWatts >=1 && kiloWatts <= 1000){\n\t\ttressToSow = 8;\n\t}\n\telse if (kiloWatts >=1001 && kiloWatts <=3000){\n\t\ttressToSow = 35;\n\t}\n\telse if (kiloWatts > 3000){\n\t\ttressToSow=500;\n\t}\n\treturn tressToSow;\n\t}", "@Test\n\tpublic void northSWC()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(13, 15);\n\t\td.set(14, 16);\n\t\td.set(15, 3);\n\t\td.set(16, 18);\n\t\td.set(17, 19);\n\t\td.set(1, 4);\n\t\td.set(2, 5);\n\t\td.set(3, 6);\n\t\td.set(4, 7);\n\t\td.set(5, 8);\n\t\td.set(19, 9);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(9);\n\t\tassertTrue(7==test_arr.get(0).getX() && 0==test_arr.get(0).getY()\n\t\t\t&& 6==test_arr.get(1).getX() && 0==test_arr.get(1).getY()\n\t\t\t&& 5==test_arr.get(2).getX() && 0==test_arr.get(2).getY()\n\t\t\t&& 4==test_arr.get(3).getX() && 0==test_arr.get(3).getY()\n\t\t\t&& 3==test_arr.get(4).getX() && 0==test_arr.get(4).getY());\n\t}", "public int mo1980w() throws cf {\r\n return m10275g(m10257E());\r\n }", "@Test\n\tpublic void kingSWC() \n\t{\n\t\tData d = new Data();\n\t\td.set(19, 35);\n\t\td.set(21, 46);\n\t\td.set(23, 89);\n\t\td.set(27, 68);\n\t\td.set(29, 79);\n\t\td.set(0, 34);\n\t\td.set(2, 45);\n\t\td.set(3, 56);\n\t\td.set(4, 67);\n\t\td.set(5, 78);\n\t\td.set(31, 23);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(23);\n\t\tassertTrue(0==test_arr.get(0).getX() && 4==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 5==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 6==test_arr.get(2).getY()\n\t\t\t&& 0==test_arr.get(3).getX() && 7==test_arr.get(3).getY());\n\t}", "public void CountWhiteDisks(){\n int counter =0;\n for (int i=0; i<8; i++){\n for (int j=0; j<8; j++){\n if (gameboard[i][j]==W){\n counter++;\n }\n }\n }\n whitedisks = counter;\n }", "public Point2D.Double getWCSCenter();", "double getEndW();", "int getCoorX();", "public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}", "public static void main(String[] args){\n\t\tScanner keyboard_input = new Scanner(System.in);\n\t\tint choiceUnits;\n\t\tdouble windChill;\n\t\twhile(true){\n\t\t\tSystem.out.println(\"Welcome to the windchill calculator!\");\n\t\t\tSystem.out.println(\"Please choose 0 if you would like to use Celsius for temperature and km/h for wind speed, or 1\"\n\t\t\t\t+ \" if you prefer Fahrenheit and mph:\");\n\t\t\tchoiceUnits = keyboard_input.nextInt();\n\t\t\tif(choiceUnits == 0 || choiceUnits == 1)break;\n\t\t\telse System.out.println(\"An error occured, please limit your answer to 0 or 1\");\n\t\t}\n\t\tSystem.out.println(\"Enter the temperature: \");\n\t\t// Assign valye to temperature variable\n\t\tdouble temp = keyboard_input.nextDouble();\n\t\tSystem.out.println(\"Enter the wind speed: \");\n\t\t//Same with windspeed, but the min windspeed for this formula to work needs to be 1, with 0 errors occur.\n\t\tdouble windSpeed = keyboard_input.nextDouble();\n\t\tif(windSpeed < 1) windSpeed = 1;\n\t\t// Calculation of windchill with Fahrenheit and mph, formula extracted from following youtube video: \n\t\t// https://www.youtube.com/watch?v=M0p4i444wrs\n\t\t// Calculation of windchill with Celsius and km/h, formula extracted from following url: \n\t\t// https://www.freemathhelp.com/wind-chill.html\n\t\tif(choiceUnits == 1){\n\t\t windChill = 35.74+0.6215*temp+Math.pow(windSpeed,0.16)*(0.4275*temp-35.75);\n\t\t}\n\t\telse{\n\t\t windChill = 13.12+0.6125*temp-11.37*Math.pow(windSpeed,0.16)+0.3965*temp*Math.pow(windSpeed,0.16);\n\t\t}\n\t\tSystem.out.println(\"At \"+temp+\" degrees, with a wind speed of \"+windSpeed+\" miles per hour,\"+\n\t\t\" the windchill is:\" + windChill);\n\t}", "private static double ct(double W, double Vr, double V){\n\t\t/*\n\t\t//declaring constants\n\t\tdouble A0 = 0.5766; \n\t\tdouble A1 = 1.9169;\n\t\tdouble A2 = -1.0712;\n\t\tdouble A3 = 1.6898;\n\t\t\n\t\tdouble aW = a/W;\n\t\tdouble Eqn1 = A0 + (A1*aW) + (A2*(aW*aW)) + (A3*(aW*aW*aW));\n\t\t//I don't know if they need to be able to see what the reference voltage is\n\t\tdouble Vr = initialV/Eqn1;\n\t\t*/\n\t\t//declaring constants\n\t\tdouble B0 = -0.5051;\n\t\tdouble B1 = 0.8857; \n\t\tdouble B2 = -0.1398;\n\t\tdouble B3 = 0.0002398;\n\t\t\n\t\tdouble VVr = V/Vr;\n\t\tdouble Eqn2 = B0 + (B1*VVr) + (B2*(VVr*VVr)) + (B3*(VVr*VVr*VVr));\n\t\t//crack size, A calculated for any voltage\n\t\tdouble A = Eqn2 * W;\n\t\treturn A;\n\t\t\n\t}", "private int critterLevel(int wave){\n\t\treturn wave/3 + 1;\n\t}", "private double costOf(int w) {\n\t\treturn getVertex(w).getCost();\n\t}", "public int getWcrws() {\r\n\t\treturn wcrws;\r\n\t}", "private byte[] wwcwCommand(byte ww, byte cw) {\n byte[] command = new byte[8];\n command[0] = (byte) 0x31;\n command[1] = 0;\n command[2] = 0;\n command[3] = 0;\n command[4] = ww;\n command[5] = cw;\n command[6] = (byte) 0x0f;\n command[7] = (byte) 0x0f;\n return Utils.withCheckSum(command);\n }", "int getWifisCount();", "float getW();", "Integer getCurrentWhint();", "private int m27465c(int i) {\n double d = (double) this.f25261H;\n double cos = Math.cos(Math.toRadians((double) i));\n double d2 = (double) this.f25261H;\n Double.isNaN(d2);\n double d3 = cos * d2;\n Double.isNaN(d);\n return (int) (d - d3);\n }", "public void setWcrws(int value) {\r\n\t\tthis.wcrws = value;\r\n\t}", "public int mo23325w() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13732Nc)).intValue();\n }", "private double getWindDirection(int idx) {\n\t\treturn config.getDouble(getConfigKeyPrefix(idx) + \"_direction\", globalWindDirection);\n\t}", "public int getW() {\n\t\treturn this.W;\n\t}", "public int getW() {\n\t\treturn w;\n\t}", "public int get_cWins()\r\n {\r\n return cWins;\r\n }", "private int m681c(int i) {\n return (i >> 31) ^ (i << 1);\n }", "public int getWMC(){\r\n\t\t \r\n\t\treturn mccabe.getWMC();\t\t\r\n\t}", "private final boolean cvc(int i)\n\t { if (i < 2 || !cons(i) || cons(i-1) || !cons(i-2)) return false;\n\t { int ch = b[i];\n\t if (ch == 'w' || ch == 'x' || ch == 'y') return false;\n\t }\n\t return true;\n\t }", "public static Integer getOWins() {\n return humanVsHuman.OWins;\n }", "@Override\r\n\tpublic double getWindcurrentFactor() {\r\n\r\n\t\tPoint2d resultant = estimateCombinedWindCurrentDrift();\r\n\t\tdouble anglediff = Math.abs(Geofunctions.angleDiff(vessel.getCog(), resultant.y));\r\n\r\n\t\tif (resultant.x > 3.0 && ((anglediff > 45 && anglediff < 135) || (anglediff > 225 && anglediff < 315))) {\r\n\t\t\t/*\r\n\t\t\t * current+wind is sideway and strong enough\r\n\t\t\t */\r\n\t\t\treturn Math.exp(0.2 * (resultant.x - 3.0));\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "public Witch(List<Coven> covenList, int w) {\n this.covenList = covenList;\n this.w = w;\n }", "public void mo5335a(int i, C0268jw jwVar) {\n }", "private static void testKWIK() {\n\t\tint turns = 100;\n\t\tdouble[] winRate = {0,0,0,0};\n\t\tfor (int i = 0; i < turns; i++) {\n\t\t\tdouble[] wins = testKWIKOnce();\n\t\t\tfor (int j = 0; j < wins.length; j++) winRate[j] += wins[j];\n\t\t}\n\t\tfor (int j = 0; j < winRate.length; j++) winRate[j] /= turns;\n\t\tSystem.out.println(\"KWIK scores\");\n\t\tSystem.out.println(Utils.stringArray(winRate, 4));\n\t}", "private int getBinI(Location l)\r\n {\r\n return (int)((l.getX()-bl.getX())/di);\r\n }", "private void findWindSpeeds(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minSpeed = hourlyForecast.getHour(0).windSpeed();\n double maxSpeed = minSpeed;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double speed = hourlyForecast.getHour(i).windSpeed();\n if (minSpeed > speed)\n minSpeed = speed;\n if (maxSpeed < speed) {\n maxSpeed = speed;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setWindMin((int) (minSpeed + 0.5));\n day.setWindMax((int) (maxSpeed + 0.5));\n day.setWindMaxTime(maxHour);\n }", "@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatWIT();\n\t\t\t}\n\t\t}", "int getNumCyc();", "public int getChnlWalkway(){\n return this.mFarm.getChnlWalkway();\n }", "Report.LocationOuterClass.Wifi getWifis(int index);", "private final C2168bw m969s(int i) {\n Map<Integer, C2168bw> map = this.f1705f;\n Integer valueOf = Integer.valueOf(i);\n C2168bw bwVar = map.get(valueOf);\n if (bwVar != null) {\n return bwVar;\n }\n throw new C2155bj(String.format(\"Could not find session %d while trying to get it\", new Object[]{valueOf}), i);\n }", "private int windNormalizer(double dWindSpeed) {\n int windSpeed = (int) Math.round(dWindSpeed);\n int major = windSpeed / 5;\n int minor = windSpeed % 5;\n if (minor >= 3) {\n major++;\n }\n return major * 5;\n }", "double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }", "private void reactMain_region_digitalwatch_Display_chrono_countingChrono() {\n\t\tif (timeEvents[4]) {\n\t\t\tnextStateIndex = 2;\n\t\t\tstateVector[2] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 4);\n\n\t\t\ttimer.setTimer(this, 4, 10, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseChronoByOne();\n\n\t\t\tnextStateIndex = 2;\n\t\t\tstateVector[2] = State.main_region_digitalwatch_Display_chrono_countingChrono;\n\t\t} else {\n\t\t\tif (sCIButtons.bottomRightPressed) {\n\t\t\t\tnextStateIndex = 2;\n\t\t\t\tstateVector[2] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 4);\n\n\t\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\t\tnextStateIndex = 2;\n\t\t\t\tstateVector[2] = State.main_region_digitalwatch_Display_chrono_ChoroStart;\n\t\t\t}\n\t\t}\n\t}", "public String getWindDir() {\n float windDire = 0;\n String windDir = \" \";\n if (readings.size() > 0) {\n windDire = readings.get(readings.size() - 1).windDirection;\n\n if (windDire >= 348.75 || windDire <= 11.25) {\n windDir += windDir + \" N \";\n } else if (windDire >= 11.25 && windDire <= 33.75) {\n windDir += windDir + \" NNE \";\n } else if (windDire >= 33.75 && windDire <= 56.25) {\n windDir += windDir + \" NE \";\n } else if (windDire >= 56.25 && windDire <= 78.75) {\n windDir += windDir + \" ENE \";\n } else if (windDire >= 78.75 && windDire <= 101.25) {\n windDir += windDir + \" E \";\n } else if (windDire >= 101.25 && windDire <= 123.75) {\n windDir += windDir + \" ESE \";\n } else if (windDire >= 123.75 && windDire <= 146.25) {\n windDir += windDir + \" SE \";\n } else if (windDire >= 146.25 && windDire <= 168.75) {\n windDir += windDir + \" SSE \";\n } else if (windDire >= 168.75 && windDire <= 191.25) {\n windDir += windDir + \" S \";\n } else if (windDire >= 191.25 && windDire <= 213.75) {\n windDir += windDir + \" SSW \";\n } else if (windDire >= 213.75 && windDire <= 236.25) {\n windDir += windDir + \" SW \";\n } else if (windDire >= 236.25 && windDire <= 258.75) {\n windDir += windDir + \" WSW \";\n } else if (windDire >= 258.75 && windDire <= 281.25) {\n windDir += windDir + \" W \";\n } else if (windDire >= 281.25 && windDire <= 303.75) {\n windDir += windDir + \" WNW \";\n } else if (windDire >= 303.75 && windDire <= 326.25) {\n windDir += windDir + \" NW \";\n } else if (windDire >= 326.25 && windDire <= 348.75) {\n windDir += windDir + \" NNW \";\n } else {\n }\n }\n return windDir;\n }", "public int getActiveChnlWalk(){\n return this.mFarm.getActiveChnlWalk();\n }", "static void computeWihtIdx(List<Integer> slate, int[] input, int index) {\n\n if (input.length == index)\n System.out.println(slate);\n else {\n computeWihtIdx(slate, input, index + 1);\n slate.add(input[index]);\n computeWihtIdx(slate, input, index + 1);\n slate.remove(slate.size() - 1);\n }\n }", "void calcWTable() {\n\twtabf = new double[size];\n\twtabi = new double[size];\n\tint i;\n\tfor (i = 0; i != size; i += 2) {\n\t double pi = 3.1415926535;\n\t double th = pi*i/size;\n\t wtabf[i ] = (double)Math.cos(th);\n\t wtabf[i+1] = (double)Math.sin(th);\n\t wtabi[i ] = wtabf[i];\n\t wtabi[i+1] = -wtabf[i+1];\n\t}\n }", "public Matrix PQW2ECI()\n\t{\n\t\tdouble cw = Math.cos(w);\n\t\tdouble sw = Math.sin(w);\n\t\tdouble craan = Math.cos(raan);\n\t\tdouble sraan = Math.sin(raan);\n\t\tdouble ci = Math.cos(i);\n\t\tdouble si = Math.sin(i);\n\n\t\tMatrix out = new Matrix(3, 3);\n\t\tout.A[0][0] = craan * cw - sraan * sw * ci;\n\t\tout.A[0][1] = -craan * sw - sraan * cw * ci;\n\t\tout.A[0][2] = sraan * si;\n\t\tout.A[1][0] = sraan * cw + craan * sw * ci;\n\t\tout.A[1][1] = -sraan * sw + craan * cw * ci;\n\t\tout.A[1][2] = -craan * si;\n\t\tout.A[2][0] = sw * si;\n\t\tout.A[2][1] = cw * si;\n\t\tout.A[2][2] = ci;\n\t\treturn out;\n\t}", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void southSWC()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(32, 103);\n\t\td.set(33, 104);\n\t\td.set(34, 113);\n\t\td.set(35, 106);\n\t\td.set(36, 107);\n\t\td.set(1, 114);\n\t\td.set(2, 115);\n\t\td.set(3, 116);\n\t\td.set(4, 117);\n\t\td.set(5, 118);\n\t\td.set(19, 119);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(119);\n\t\tassertTrue(7==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 6==test_arr.get(1).getX() && 10==test_arr.get(1).getY()\n\t\t\t&& 5==test_arr.get(2).getX() && 10==test_arr.get(2).getY()\n\t\t\t&& 4==test_arr.get(3).getX() && 10==test_arr.get(3).getY()\n\t\t\t&& 3==test_arr.get(4).getX() && 10==test_arr.get(4).getY());\n\t}", "@Test\n\tpublic void eastSWC()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(20, 43);\n\t\td.set(22, 54);\n\t\td.set(26, 33);\n\t\td.set(28, 76);\n\t\td.set(30, 87);\n\t\td.set(1, 44);\n\t\td.set(2, 55);\n\t\td.set(3, 66);\n\t\td.set(4, 77);\n\t\td.set(5, 88);\n\t\td.set(19, 99);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(99);\n\t\tassertTrue(10==test_arr.get(0).getX() && 7==test_arr.get(0).getY()\n\t\t\t&& 10==test_arr.get(1).getX() && 6==test_arr.get(1).getY()\n\t\t\t&& 10==test_arr.get(2).getX() && 5==test_arr.get(2).getY()\n\t\t\t&& 10==test_arr.get(3).getX() && 4==test_arr.get(3).getY()\n\t\t\t&& 10==test_arr.get(4).getX() && 3==test_arr.get(4).getY());\n\t}", "public double getW() {\n return w;\n }", "public static void main(String[] args) {\r\n\r\n\t\tSystem.out.println(findWaysOfClimbingStairs(3));\r\n\r\n\t}", "private double[] getWheelConstants(SwerveModule module, double fwd, double str, double rcw) {\n /* Calculate the ratio constant */\n final double R = sqrt(pow(baseLength, 2) + pow(baseWidth, 2));\n /* Allocate the array */\n double tmp[] = new double[2];\n /*\n * The exact way these are calculated may seem arbitrary, but reading up on any\n * swerve guide, or looking at any diagram will show you exactly how these are\n * calcuated, it's just a little basic trig.\n */\n switch (module) {\n case FRONT_LEFT:\n tmp[0] = str + rcw * (baseLength / R);\n tmp[1] = fwd - rcw * (baseWidth / R);\n break;\n case FRONT_RIGHT:\n tmp[0] = str + rcw * (baseLength / R);\n tmp[1] = fwd + rcw * (baseWidth / R);\n break;\n case REAR_RIGHT:\n tmp[0] = str - rcw * (baseLength / R);\n tmp[1] = fwd + rcw * (baseWidth / R);\n break;\n case REAR_LEFT:\n tmp[0] = str - rcw * (baseLength / R);\n tmp[1] = fwd - rcw * (baseWidth / R);\n break;\n }\n return tmp;\n }", "protected int calculateWalk() {\n if (isPrimitive()) {\n double rating = getEngine().getRating();\n rating /= 1.2;\n if (rating % 5 != 0) {\n return (int) (rating - rating % 5 + 5) / (int) weight;\n }\n return (int) (rating / (int) weight);\n\n }\n return getEngine().getRating() / (int) weight;\n }", "private int caclSteps(float g, float h, float i) {\n\t\tint steps = 0;\n\t\tfloat currSpeed = i;\n\t\tfloat f = 0;\n\t\twhile(f<g){\n\t\t\tf +=currSpeed;\n\t\t\tcurrSpeed+=h;\n\t\t\tsteps++;\n\t\t\t\n\t\t}\n\t\treturn steps;\n\t}", "float getWetness();", "CObject countThem(short oil, int stop)\r\n {\r\n CObjInfo poil = rhPtr.rhOiList[oil];\t\t// Pointe la liste\r\n CObject pHo;\r\n if (poil.oilEventCount != rh2EventCount)\r\n {\r\n // Si condition OU\r\n if (rh4ConditionsFalse)\r\n {\r\n evtNSelectedObjects = 0;\r\n return null;\r\n }\r\n\r\n // Explore la liste entiere des objets\r\n short num = poil.oilObject;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNumNext;\r\n }\r\n ;\r\n return null;\r\n }\r\n\r\n // Explore la liste des objets selectionnes\r\n short num = poil.oilListSelected;\r\n while (num >= 0)\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n return null;\r\n }\r\n if ((pHo.hoFlags & CObject.HOF_DESTROYED) == 0)\t\t\t// Deja detruit?\r\n {\r\n evtNSelectedObjects++;\r\n if (evtNSelectedObjects == stop)\r\n {\r\n return pHo;\r\n }\r\n }\r\n num = pHo.hoNextSelected;\r\n }\r\n ;\r\n return null;\r\n }", "public final zzchp i(zzdio zzdio) {\n hw hwVar = (hw) zzdio;\n if (((Boolean) zzwg.e().c(zzaav.W3)).booleanValue()) {\n zzchp q = this.f8096c.q();\n zzbrx.zza zza = new zzbrx.zza();\n zza.g(this.f8094a);\n zza.c(hwVar.f3996a);\n zza.k(hwVar.f3997b);\n zza.b(this.f8099f);\n return q.v(zza.d()).u(new zzbxa.zza().n());\n }\n zzdiu f2 = zzdiu.f(this.f8097d);\n zzchp q2 = this.f8096c.q();\n zzbrx.zza zza2 = new zzbrx.zza();\n zza2.g(this.f8094a);\n zza2.c(hwVar.f3996a);\n zza2.k(hwVar.f3997b);\n zza2.b(this.f8099f);\n zzchp v = q2.v(zza2.d());\n zzbxa.zza zza3 = new zzbxa.zza();\n zza3.c(f2, this.f8095b);\n zza3.g(f2, this.f8095b);\n zza3.d(f2, this.f8095b);\n zza3.b(f2, this.f8095b);\n zza3.e(f2, this.f8095b);\n zza3.i(f2, this.f8095b);\n zza3.j(f2);\n return v.u(zza3.n());\n }", "public double getW() {\n\t\treturn w;\n\t}", "public int getCHVNumber()\r\n {\r\n return number_of_CHV;\r\n }", "public int mo23281W() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13874rb)).intValue();\n }", "private int getCharacterIndex(Character c, int index) {\r\n if (c instanceof CommonInfected) {\r\n return (index % cInfectedNum);\r\n\t\t}\r\n else if (c instanceof Tank) {\r\n return (index % tankNum);\r\n\t\t}\r\n else if (c instanceof Child) {\r\n return (index % childNum);\r\n\t\t}\r\n else if (c instanceof Teacher) {\r\n return (index % teacherNum);\r\n\t\t}\r\n else if (c instanceof Soldier) {\r\n return (index % soldierNum);\r\n\t\t}\r\n else {\r\n return -1;\r\n\t\t}\r\n }", "int getCoorY();", "private synchronized void initCircumstances() {\n if (circV == null) {\n\n // Calculate visit circumstances, which includes setup time.\n Function<Long, WorldCoords> coords = getObs()::getCoords;\n int size = Math.max(1, (int) (interval.getLength() / QUANTUM));\n circV = new TreeMap<Circumstance, Double[]>();\n for (Circumstance c: Circumstance.values()) {\n circV.put(c, new Double[size]);\n }\n TimingWindowSolver tws = new TimingWindowSolver(obs);\n ImprovedSkyCalc calc = new ImprovedSkyCalc(variant.getSchedule().getSite());\n for (int i = 0; i < size; i++) {\n long t = interval.getStart() + QUANTUM * i;\n calc.calculate(coords.apply(t), new Date(t), true);\n for (Circumstance c: Circumstance.values()) {\n Double[] vals = circV.get(c);\n switch (c) {\n case AIRMASS: vals[i] = calc.getAirmass(); break;\n case AZIMUTH: vals[i] = calc.getAzimuth(); break;\n case ELEVATION: vals[i] = calc.getAltitude(); break;\n case LUNAR_DISTANCE: vals[i] = calc.getLunarDistance(); break;\n case PARALLACTIC_ANGLE: vals[i] = calc.getParallacticAngle(); break;\n case TOTAL_SKY_BRIGHTNESS: vals[i] = calc.getTotalSkyBrightness(); break;\n case HOUR_ANGLE: vals[i] = calc.getHourAngle(); break;\n case TIMING_WINDOW_OPEN: vals[i] = tws.includes(t) ? 1. : 0.; break;\n default: throw new Error(\"Missing switch case for \" + c);\n }\n }\n }\n\n // Now calculate circumstances for science.\n if (getSetupType() != SetupType.NONE) {\n\n circS = new TreeMap<Circumstance, Double[]>();\n final long setupTime = getSetupTime();\n\n for (Circumstance c: Circumstance.values()) {\n\n Double[] valsV = circV.get(c);\n Double[] valsS = new Double[valsV.length];\n\n // We want to copy the range n ... length where n is the first\n // quantum that's not during setup time, or the last sample, so\n // we guarantee at least one.\n int n = Math.min((int) (setupTime / QUANTUM), valsV.length - 1);\n System.arraycopy(valsV, n, valsS, n, valsV.length - n);\n\n circS.put(c, valsS);\n\n }\n\n } else {\n\n // Science and visit circumstances are the same if there is no setup.\n circS = circV;\n\n }\n\n }\n }", "public static void main(String[] args) {\n\n\t\t\n\t System.out.print(\"Enter number of discs: \");\n\t Scanner scanner = new Scanner(System.in);\n\t int discs = scanner.nextInt();\n\t // solve(discs, \"A\", \"B\", \"C\");\n\t\t\n\t String ans = hanoi(discs, 1, 3);\n\t System.out.println(\"ans \"+ans);\n\t \n\t \n\t int nDisks = 3;\n\t doTowers(nDisks, 'A', 'B', 'C');\n\t}", "public static int[] findWrongWayCow(final char[][] field) {\n \t\n \tint right = 0;\n \tint left = 0;\n \tint down = 0;\n \tint up = 0;\n \t\n \t\n \t\n \tint firstRight[] = {-1, -1};\n \tint firstLeft[] = {-1, -1};\n \tint firstDown[] = {-1, -1};\n \tint firstUp[] = {-1, -1};\n \t\n \t\n \t\n \t\n \t\n \tint result[] = {0, 0};\n \t\n \t\n \t\n \tfor(int j = 0; j<field.length; j++) {\n \t\tfor(int i = 0; i<field[j].length; i++) {\n \t\t\t//System.out.println(field[j][i] + \" x \" + i + \" y \" + j);\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\tif(field[j][i] == 'c') {//test right WORKING\n \t\t\t\t//System.out.println(i + \" needs < \" + (field[i].length-3));\n \t\t\t\tif(i < field[j].length - 2) {\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+1) + \" equals \" + field[j][i + 1] + \" should equal o\");\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+2) + \" equals \" + field[j][i + 2] + \" should equal w\");\n \t\t\t\t\tif(field[j][i + 1] == 'o' && field[j][i + 2] == 'w') {\n \t\t\t\t\t\t//System.out.println(\"found right\");\n \t\t\t\t\t\tright++;\n \t\t\t\t\t\tif(firstRight[0] == -1 && firstRight[1] == -1) {\n \t\t\t\t\t\t\tfirstRight[0] = i;\n \t\t\t\t\t\t\tfirstRight[1] = j;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif(field[j][i] == 'c') {//test left WORKING\n \t\t\t\t//System.out.println(i + \" needs < \" + (field[i].length-3));\n \t\t\t\tif(i >= 2) {\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+1) + \" equals \" + field[j][i + 1] + \" should equal o\");\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+2) + \" equals \" + field[j][i + 2] + \" should equal w\");\n \t\t\t\t\tif(field[j][i - 1] == 'o' && field[j][i - 2] == 'w') {\n \t\t\t\t\t\t//System.out.println(\"found right\");\n \t\t\t\t\t\tleft++;\n \t\t\t\t\t\tif(firstLeft[0] == -1 && firstLeft[1] == -1) {\n \t\t\t\t\t\t\tfirstLeft[0] = i;\n \t\t\t\t\t\t\tfirstLeft[1] = j;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t\n \t\t\tif(field[j][i] == 'c') {//test down WORKING\n \t\t\t\t//System.out.println(i + \" needs < \" + (field[i].length-3));\n \t\t\t\tif(j < field.length - 3) {\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+1) + \" equals \" + field[j][i + 1] + \" should equal o\");\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+2) + \" equals \" + field[j][i + 2] + \" should equal w\");\n \t\t\t\t\tif(field[j + 1][i] == 'o' && field[j + 2][i] == 'w') {\n \t\t\t\t\t\t//System.out.println(\"found right\");\n \t\t\t\t\t\tdown++;\n \t\t\t\t\t\tif(firstDown[0] == -1 && firstDown[1] == -1) {\n \t\t\t\t\t\t\tfirstDown[0] = i;\n \t\t\t\t\t\t\tfirstDown[1] = j;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif(field[j][i] == 'c') {//test up WORKING\n \t\t\t\t//System.out.println(i + \" needs < \" + (field[i].length-3));\n \t\t\t\tif(j >= 2) {\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+1) + \" equals \" + field[j][i + 1] + \" should equal o\");\n \t\t\t\t\t//System.out.println(\"Y:\" + i + \" X: \" + (j+2) + \" equals \" + field[j][i + 2] + \" should equal w\");\n \t\t\t\t\tif(field[j - 1][i] == 'o' && field[j - 2][i] == 'w') {\n \t\t\t\t\t\t//System.out.println(\"found right\");\n \t\t\t\t\t\tup++;\n \t\t\t\t\t\tif(firstUp[0] == -1 && firstUp[1] == -1) {\n \t\t\t\t\t\t\tfirstUp[0] = i;\n \t\t\t\t\t\t\tfirstUp[1] = j;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t}\n \t}\n// \tSystem.out.println(\"Right: \" + right);\n// \tSystem.out.println(\"Left: \" + left);\n// \tSystem.out.println(\"Down: \" + down);\n// \tSystem.out.println(\"Up: \" + up);\n// \t\n// \t\n// \t\n// \tSystem.out.println(\"First Right: X: \" + firstRight[0] + \" Y: \" + firstRight[1]);\n// \tSystem.out.println(\"First Left: X: \" + firstLeft[0] + \" Y: \" + firstLeft[1]);\n// \tSystem.out.println(\"First Down: X: \" + firstDown[0] + \" Y: \" + firstDown[1]);\n// \tSystem.out.println(\"First Up: X: \" + firstUp[0] + \" Y: \" + firstUp[1]);\n \t\n \t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n //System.out.println(\"X: \" + result[0] + \" Y: \" + result[1]);\n \tif(right == 1) {\n \t\tSystem.out.println(\"X: \" + firstRight[0] + \" Y: \" + firstRight[1]);\n \t\treturn firstRight;\n \t}else if(left == 1) {\n \t\tSystem.out.println(\"X: \" + firstLeft[0] + \" Y: \" + firstLeft[1]);\n \t\treturn firstLeft;\n \t}else if(down == 1) {\n \t\tSystem.out.println(\"X: \" + firstDown[0] + \" Y: \" + firstDown[1]);\n \t\treturn firstDown;\n \t}else if(up == 1) {\n \t\tSystem.out.println(\"X: \" + firstUp[0] + \" Y: \" + firstUp[1]);\n \t\treturn firstUp;\n \t}\n \t\n return result;\n }", "public double Ix() {\r\n\t\tdouble ix = 0;\r\n\t\tfor(int i = 0;i < liczbaPunktow;i++) {\r\n\t\t\tix = ix + A[i].getMasa() * (Math.pow((XYZC[1] - A[i].getPozY()),2) + Math.pow((XYZC[2] - A[i].getPozZ()),2));\r\n\t\t}\r\n\t\treturn ix;\r\n\t}", "void mo8280a(int i, int i2, C1207m c1207m);", "@Override\r\n\tpublic Number getWight(int docID, int wordID, CategorizingDataManager CDM) {\n\t\tMap<Integer, Map<Integer, Integer>> cp=CDM.getMap();\r\n\t\treturn cp.get(wordID).containsKey(docID)?cp.get(wordID).get(docID):0;\r\n\t}", "public void towerIndexing()\n {\n m_towerMotor.set(ControlMode.PercentOutput, 0.5);\n m_intakeHopperMotor.set(ControlMode.PercentOutput, HopperConstants.HOPPER_MOTOR_POWER);\n }", "@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}", "public int knightWithJugIn() {\n \n return knightsBefore.car();\n }", "abstract void mo4366a(int i, zzwt zzwt, cu cuVar);", "@Test\n\t//Testing the calcIndex function \n\tpublic void testcalcIndex() {\n\t\tassertEquals(0, board.calcIndex(0, 0));\n\t\tassertEquals(NUM_COLUMNS-1, board.calcIndex(0, NUM_COLUMNS-1));\n\t\tassertEquals(483, board.calcIndex(NUM_ROWS-1, 0));\n\t\tassertEquals(505, board.calcIndex(NUM_ROWS-1, NUM_COLUMNS-1));\n\t\t// Test a couple others\n\t\tassertEquals(24, board.calcIndex(1, 1));\n\t\tassertEquals(66, board.calcIndex(2, 20));\n\t}", "public int xIncriment(){\n\t\tswitch (direction){\n\t\t\tcase NORTH: \n\t\t\t\treturn 0;\n\t\t\tcase NORTHEAST:\n\t\t\t\treturn 1;\n\t\t\tcase EAST:\n\t\t\t\treturn 1;\n\t\t\tcase SOUTHEAST:\n\t\t\t\treturn 1;\n\t\t\tcase SOUTH:\n\t\t\t\treturn 0;\n\t\t\tcase SOUTHWEST:\n\t\t\t\treturn -1;\n\t\t\tcase WEST:\n\t\t\t\treturn -1;\n\t\t\tdefault: //NORTHWEST\n\t\t\t\treturn -1;\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 }", "@Override\n\tpublic int getW() {\n\t\treturn 100;\n\t}", "public static double computeDiameter(int wireGauge)\r\n{ \r\n return 0.127 * Math.pow(92.0, (36.0 - wireGauge) / 39.0); \r\n}", "private double newCost(int v, int w) {\n\t\treturn 0.0;\n\t}", "public double getCelsius(){\n return ((fahrenheit-32)*(5.0/9));\n }", "WorldCoordinates getWCSCenter();", "float getW() {\n return _w;\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\r\n\tdouble tempInfar ,windmph , windChill ;\r\n\t\r\n\tSystem.out.println(\" WindChill Calculator \\n\");\r\n\t\r\n\tSystem.out.println(\"Please enter the temperature in Fahrenheit (must be >= -45 and <= 40):\");\r\n\t\r\n\tScanner imput = new Scanner(System.in);\r\n\t\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\ttempInfar = imput.nextDouble();\r\n\t\t\r\n\t\t\tif (tempInfar < -45 || tempInfar > 40 )\r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Please enter valid temperature in Fahrenheit.(must be >= -45 and <= 40)\\n\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Programmer name: Jamarcus Orr Williams\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\tSystem.out.println(\"Please enter the wind speed (must be >= 5 and <= 60):\");\r\n\t\t\t\t\r\n\t\t\tScanner imput2 = new Scanner(System.in);\r\n\t\t\r\n\t\t\twindmph = imput2.nextDouble();\r\n\t\r\n\t\t\t\tif ( windmph < 5 || windmph > 60 )\r\n\t\t\t\t\t\r\n\t\t\t\t{ \r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"\\nPlease enter valid wind speed.(must be >= 5 and <= 60): \\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Programmer name: Jamarcus Orr Williams\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse \r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\twindChill = 35.74 + 0.6215* tempInfar + (0.4275* tempInfar - 35.75) * Math.pow(windmph , 0.16);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"\\nThe Wind chill temperature is : \"+ windChill + \" degrees Fahrenheit.\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Programmer name: Jamarcus Orr Williams\\n\");\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\t}\r\n\t}", "int getWpaCount();", "public abstract int getPowerbars();", "double[] compute_t_Cl (double[][] t_lift, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_lift, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_lift, -aoa, thickness, camber);\n return result;\n }", "int getCedula();", "public static Integer getXWins() {\n return humanVsHuman.XWins;\n }", "public void setW(int w) {\n\t\tthis.W = w;\n\t}" ]
[ "0.6135505", "0.60259086", "0.5850188", "0.55997974", "0.5587272", "0.55252", "0.55150265", "0.55027723", "0.5499636", "0.5447766", "0.54455215", "0.5405443", "0.5386814", "0.5385485", "0.5383805", "0.53749114", "0.5363942", "0.5363245", "0.5329857", "0.5328931", "0.5298936", "0.5293812", "0.5289262", "0.5271461", "0.5257445", "0.5232566", "0.5218433", "0.5208716", "0.52084273", "0.5207442", "0.519602", "0.5191624", "0.5177347", "0.5169603", "0.51548904", "0.5146827", "0.5144008", "0.51416147", "0.51375", "0.51211077", "0.51110667", "0.5084376", "0.50820684", "0.5079693", "0.5074675", "0.504919", "0.50423163", "0.5037836", "0.5028448", "0.5026015", "0.502166", "0.50169384", "0.500911", "0.50020134", "0.4999777", "0.49975765", "0.49861428", "0.4985651", "0.4976333", "0.49746203", "0.49712002", "0.49711958", "0.49636903", "0.49512023", "0.49431765", "0.4939333", "0.49319398", "0.49312964", "0.4924404", "0.49196061", "0.49149698", "0.49113062", "0.49043918", "0.48986855", "0.48954526", "0.4894925", "0.48858097", "0.48674497", "0.48671392", "0.48634884", "0.486127", "0.48585293", "0.485541", "0.48540482", "0.4850426", "0.48492378", "0.48482242", "0.48448345", "0.48425373", "0.48378912", "0.48338658", "0.4833689", "0.48310548", "0.4830945", "0.4830447", "0.48202312", "0.48089668", "0.48085827", "0.4805689", "0.480369" ]
0.7273704
0
Program that calculates your age in seconds.
public void yourAgeInSeconds() { System.out.print( "Enter your goddamn age in years: " ); long years = scan.nextLong(); long yearDays = 365 * years; System.out.print( "Enter month number: " ); long months = scan.nextLong(); long monthDays = 0; if ( months > 0 ) // 1 month { monthDays = 31; { if ( months > 1 ) // 2 months { monthDays = monthDays + 28; if ( months > 2 ) // 3 months { monthDays = monthDays + 31; if ( months > 3 ) { monthDays = monthDays + 30; if ( months > 4 ) { monthDays = monthDays + 31; if ( months > 5 ) { monthDays = monthDays + 30; if ( months > 6 ) { monthDays = monthDays + 31; if ( months > 7 ) { monthDays = monthDays + 31; if ( months > 8 ) { monthDays = monthDays + 30; if ( months > 9 ) { monthDays = monthDays + 31; if ( months > 10 ) { monthDays = monthDays + 30; if ( months > 11 ) { monthDays = monthDays + 31; } } } } } } } } } } } } } System.out.print( "Enter the day number: " ); long days = scan.nextLong(); long totalDays = yearDays + monthDays + days; long seconds = totalDays * 24 * 60 * 60; System.out.println( "Your are " + seconds + " seconds old." ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void calculateTheAge (int birthYear){\n int age = 2021 - birthYear;\n System.out.println(\"The person is \" + age + \" years old\");\n }", "private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}", "public int age(){\r\n\t\t//1000 ms = 1s, 60s = 1 min, 60 min = 1h, 24h = 1 day\r\n\t\t//1 Day = 1000 * 60 * 60 * 24\r\n\t\tlong divide = 1000 * 60 * 60 * 24;\r\n\t\tDate d = new Date();\r\n\t\tlong timeNow = d.getTime();\r\n\t\tlong pubDate = dateOfPublication.getTime();\r\n\t\t\r\n\t\tlong between = timeNow - pubDate;\r\n\t\t\r\n\t\tlong daysSincePub = between / divide;\r\n\t\treturn (int) daysSincePub;\r\n\t}", "@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}", "public long age() {\n if (startTime == 0) {\n return 0;\n } else {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }\n }", "public int age() {\n int age = 0;\n /*MyDate currentDate = new MyDate(\n (Calendar.getInstance().get(Calendar.DATE)),\n (Calendar.getInstance().get(Calendar.MONTH) + 1),\n (Calendar.getInstance().get(Calendar.YEAR))\n );*/\n \n age = this.birthday.differenceInYears(currentDate);\n \n return age;\n }", "int getAgeInYears(Person p);", "double getAgeDays();", "public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}", "int getFromAge();", "int getToAge();", "protected int askAge(String name) {\n\t\tint age = -1;\t\t\n\t\twhile (age < 0 || age > 120) {\n\t\t\tSystem.out.format(\"Sisesta %s vanus (0-120)\",name);\n\t\t\tage = TextIO.getlnInt();\n\t\t}\n\t\t\n\t\treturn age;\n\t}", "private String getWorldAge(){\r\n\t\tlong worldage = minecraft.world.getTotalWorldTime();\r\n\t\tint sek = (int) (worldage/20);\r\n\t\t\r\n\t\tint basesec = 1;\r\n\t\tint basemin = (60*basesec);\r\n\t\tint basehour = (60*basemin);\r\n\t\tint baseday = (24*basehour);\r\n\t\tint baseyear = (365*baseday);\r\n\t\t\r\n\t\tint years = sek/(baseday)/365;\r\n\t\tint days = (sek%baseyear)/(baseday);\r\n\t\tint hours = (sek%baseday)/(basehour);\r\n\t\tint mins = (sek%basehour)/(basemin);\r\n\t\tint seconds = (sek%basemin*basesec);\r\n\t\t\t\t\r\n\t\tArrayList<String> back = new ArrayList<String>();\r\n\t\t\r\n\t\tif(years > 0){\r\n\t\t\tback.add( years + \" Y\");\r\n\t\t}\r\n\t\tif(days > 0){\r\n\t\t\tback.add(days + \" D\");\r\n\t\t}\r\n\t\tif(hours > 0){\r\n\t\t\tback.add(hours + \" H\");\r\n\t\t}\r\n\t\tif(mins > 0){\r\n\t\t\tback.add(mins + \" M\");\r\n\t\t}\r\n\t\tif(seconds > 0){\r\n\t\t\tback.add(seconds + \" S\");\r\n\t\t}\t\t\t\r\n\t\treturn back.toString().replace(\"[\", \"\").replace(\"]\", \"\");\r\n\t}", "int getAge();", "int getAge();", "int getAge();", "public static void main(String[] args) {\n \n int myAge = 16;\n int myBirthday = 901; // input date as 901 or 1021 putting a 0 infront results in an error.\n int todaysDate = 923;\n\n if (todaysDate == myBirthday) {\n myAge++; // adds 1\n System.out.println(\"I am \" + myAge + \" years old now.\");\n } else {\n System.out.println(\"I am still \" + myAge + \" years old.\");\n }\n }", "public int getAge()\r\n\t{\r\n\t\tint age = calculateAge();\r\n\t\treturn age;\r\n\t}", "int getStudentAge();", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a minutes\");\n\t\t\n\t\tdouble min=scan.nextDouble();\n\t\t\n\t\tlong years=(long) (min/(60*24*365));\n\t\t\n\t\tlong days=(long) (min/60*24)%365;\n\t\t\n\t\tSystem.out.println(min + \" minutes is approximately \" + years + \" years and \" + days + \" days\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "private String getAge(Calendar born){\n Calendar today = Calendar.getInstance();\n\n\n int age = today.get(Calendar.YEAR) - born.get(Calendar.YEAR);\n\n if (today.get(Calendar.DAY_OF_YEAR) < born.get(Calendar.DAY_OF_YEAR)){\n age--;\n }\n\n Integer ageInt = new Integer(age);\n String ageS = ageInt.toString();\n\n return ageS;\n }", "private static String calcYMD(int[] age){\n\t\treturn age[2]+\" years \" + age[1] + \" months \" + age[0] + \" days \";\n\t}", "public static String calcAge(ArrayList<Lap> laptimes, LocalDate date) {\n\t\tint age = -1;\n\t\tLocalDate currentDate = LocalDate.now();\n\t\tage = Period.between(date, currentDate).getYears();\n\t\treturn Integer.toString(age);\n\t}", "@Override\n\tpublic int covidVaccineAge() {\n\t\tSystem.out.println(\"FH---covid vaccine age is 18 years\");\n\t\treturn 30;\n\t}", "public int getDogAge() {\r\n return 5 * getAge();\r\n }", "public static void printAge(int year){\n int age =2021 - year;\n System.out.println(\"Birth year : \" + year + \" Age : \" + age);\n }", "public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }", "public int getAge() {\n Period period = Period.between(this.birthday, LocalDate.now());\n int age = period.getYears();\n int months = period.getMonths();\n int days = period.getDays();\n\n // Compensate for part-thereof of a year\n if (months > 0 || days > 0) {\n age += 1;\n } else if (months < 0 || days < 0) {\n age -= 1;\n }\n return age < 0\n ? 0 // Set age to zero if value is negative\n : age;\n }", "public int setAge(int age){\n \n if (age >= 0 && age < 18){\n \n System.out.println(\"OMG! He was too young to date, still a babe!\");\n }\n \n else if(age == 18){\n \n System.out.println(\"He was about your age!\");\n }\n \n else if (age < 0) {\n \n System.out.println(\"That is impossible. Liar! He doesn't exist!\");\n } \n \n else if(age > 18 && age <= 25){\n \n System.out.println(\"Great! He was marriage material!\");\n }\n \n else if (age >= 26 && age <=34){\n \n System.out.println(\"He was a bit old for you\");\n } \n \n else if (age >= 35 && age <=100){\n \n System.out.println(\"He was a sugar daddy!\");\n }\n \n else {\n \n System.out.println(\"That is unlikely to have happened. Were you dating a mummy?\");\n } \n \n return age;\n }", "public static void main(String[] args) {\n\t\tlong seconds = System.currentTimeMillis() / 1000l;\r\n\t\tSystem.out.println(\"\\nSeconds since 1970: \"+seconds);\r\n\t}", "int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}", "public double getAge()\n\t{\n\t\treturn theAge;\n\n\t}", "public int getAge() {\n\t \t return age; \n\t}", "private static int calculateAge(Calendar birthDate)\n\t{\n\t\t// Get today's date and time\n\t\tCalendar currentDate = Calendar.getInstance();\n\n\t\t// Get the person's final age for the end of this year\n\t\tint endYearAge = currentDate.get(Calendar.YEAR) - birthDate.get(Calendar.YEAR);\n\n\t\t// Clone the birth date calendar and add the person's end year age to it\n\t\t// This results in the person's birth date for this year\n\t\tCalendar currentYearBirthDate = (Calendar)birthDate.clone();\n\t\tcurrentYearBirthDate.add(Calendar.YEAR, endYearAge);\n\n\t\t// If the current date and time is before the person's birthday this\n\t\t// year, subtract one from their calculated age\n\t\tif (currentDate.before(currentYearBirthDate))\n\t\t{\n\t\t\tendYearAge--;\n\t\t}\n\n\t\treturn endYearAge;\n\t}", "private static String calcY_MD(int[] age){\n\t\tdouble y = age[2];\t// Add number of years\n\t\ty += age[1]/12.0;\t// Add months as fraction (divided by 12)\t// as each year has 12 months\n\t\ty += age[0]/365.0;\t// Add days as fraction (divided by 365)\t// as each year has 365 days\n\t\treturn y+\"\";\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public boolean calcAge() {\n int age;\n boolean oldEnough = false;\n Calendar c = Calendar.getInstance();\n \n //getting todays date\n int thisYear = c.get(Calendar.YEAR);\n int thisMonth = c.get(Calendar.MONTH) + 1;\n int thisDay = c.get(Calendar.DAY_OF_MONTH);\n\n age = thisYear - yearDOB;\n if (age == 18 && thisMonth == monthDOB && thisDay < dayDOB) {\n age = 17;\n oldEnough = true;\n } else if (age < 18) {\n oldEnough = false;\n }\n return oldEnough;\n }", "public static String calcAge(String dob)\r\n\t {\r\n\t\t LocalDate bday = LocalDate.of(Integer.parseInt(dob.substring(6,10)),Integer.parseInt(dob.substring(3,5)),Integer.parseInt(dob.substring(1,2)));\r\n\t\t LocalDate today = LocalDate.now(); \r\n\t\t Period age = Period.between(bday, today); \r\n\t\t int years = age.getYears(); \r\n\t\t int months = age.getMonths(); \r\n\t\t return years + \" Years and \" + months + \" Months\";\r\n\t }", "public int getAge();", "public int getAge();", "public static void main(String[] args) {\r\n\t\t\r\n\t\tlong minutes;\r\n\t\tlong days;\r\n\t\tlong years;\r\n\t\t\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"This prigram will approximate how long (in years and days)\" + \r\n\t\t\" a time measured in minutes is. \\nEnter a number of minutes. \");\r\n\t\t\r\n\t\tminutes = scanner.nextLong();\r\n\t\t\r\n\t\tdays = minutes / 1440;\r\n\t\tyears = days / 365;\r\n\t\tdays = days % 365;\r\n\t\t\r\n\t\tSystem.out.println(minutes + \" minutes is approximately \" + years + \" years and \" + days + \" days.\");\r\n\t\t\r\n\r\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int calculatePlayerAge(int player_id) throws Exception;", "public String age(boolean flag)\n\t{\n\t\tif(flag == false)\n\t\t\treturn \"Enter your age: \";\n\t\telse\n\t\t\treturn \"Age: \";\n\t}", "public float eventAgeSeconds() { return neventAgeSeconds(address()); }", "public static int getAge(int yearBorn)\n {\n return 2016-yearBorn;\n }", "@Override\n public void lifeTime() {\n System.out.println(\"Lifetime is around 5 years.\");\n }", "public int getAge() {\r\n return age;\r\n }", "int getAgeYearsRelativeToReferencePoint(Calendar anchorTime, Calendar testTime);", "@Override\n\tpublic void Age(int age) {\n\t\t\n\t}", "public static String getAge(Calendar dob) {\n Calendar today = Calendar.getInstance();\n\n int age = today.get(Calendar.YEAR) - dob.get(Calendar.YEAR);\n\n if (today.get(Calendar.DAY_OF_YEAR) < dob.get(Calendar.DAY_OF_YEAR)) {\n age--;\n }\n\n Integer ageInt = new Integer(age);\n String ageS = ageInt.toString();\n\n return ageS;\n }", "int getMaximumAge();", "public static void main(String[] args) {\n\n\t\tLocalDate current =LocalDate.now();\n\tLocalDate ld =\tLocalDate.of(1989, 11, 30);\n\t\t\n\tPeriod pd =\tPeriod.between(current, ld);\n\tSystem.out.println(pd.getYears());\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Input a dog's age in human years:\");\n int humanAge = sc.nextInt();\n float dogAge =0f;\n\n if (humanAge >=2){\n dogAge = 21+ 4*(humanAge-2);\n }\n else{\n dogAge = 10.5f * humanAge;\n }\n System.out.println(\"The dog's age in dog years is: \"+ dogAge);\n\n// if (dogAge<= 2){\n// dogAge = 10.5f * humanAge;\n// }\n// else{\n// dogAge = 4 * humanAge;\n// }\n }", "public int getAge() {\n\t\treturn _age;\n\t}", "public double runPrice(int age) {\n\t\t// PriceCRUD for calculating price later\n\t\tPriceCRUD<CinemaClassPrice> cinemaClassCRUD = new PriceCRUD<>(CinemaClassPrice.class);\n\t\tPriceCRUD<MovieTypePrice> movieTypeCRUD = new PriceCRUD<>(MovieTypePrice.class);\n\t\tPriceCRUD<DayPrice> dayCRUD = new PriceCRUD<>(DayPrice.class);\n\t\tPriceCRUD<AgePrice> ageCRUD = new PriceCRUD<>(AgePrice.class);\n\t\t\n\t\t// Get cinema class price\n\t\tCinemaCRUD<Cinema> cinemaCRUD = new CinemaCRUD<Cinema>(Cinema.class, Showtimes.getCineplexId());\n\t\tCinemaClass cinemaClass = cinemaCRUD.getCinemaType(this.showtimes.getCinemaId());\n\t\tCinemaClassPrice cinemaClassPrice = cinemaClassCRUD.getElementPrice(cinemaClass);\n\t\t\n\t\t// Get movie type price\n\t\tMovieCRUD<Movie> movieCRUD = new MovieCRUD<>(Movie.class);\n\t\tMovieType movieType = movieCRUD.getMovieById(this.showtimes.getMovieId()).getType();\n\t\tMovieTypePrice movieTypePrice = movieTypeCRUD.getElementPrice(movieType);\n\t\t\n\t\t// Get Day type price\n\t\tDayType dayType = DateTimeHelper.getDayType(this.showtimes.getDate());\n\t\tDayPrice dayTypePrice = dayCRUD.getElementPrice(dayType);\n\t\t\n\t\t// Get Age Range Price\n\t\tAgePrice agePrice = ageCRUD.getElementPrice(age);\n\t\t\n\t\t// Print receipt for 1 ticket\n\t\tSystem.out.println(cinemaClassPrice.toString());\n\t\tSystem.out.println(movieTypePrice.toString());\n\t\tSystem.out.println(dayTypePrice.toString());\n\t\tSystem.out.println(agePrice.toString());\n\t\tdouble ticketPrice = cinemaClassPrice.getPrice()+movieTypePrice.getPrice()+dayTypePrice.getPrice()+agePrice.getPrice();\n\t\tSystem.out.println(\"Ticket price: \"+ticketPrice);\n\t\t\n\t\treturn ticketPrice;\n\t}", "public int getAge()\n {\n return age;\n }", "public int getAge(String dob) {\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n Date date = sdf.parse(dob);\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n return Calendar.getInstance().get(Calendar.YEAR) - cal.get(Calendar.YEAR);\n } catch (ParseException e) {\n return 0;\n }\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public static void main(String[] args) {\n Scanner myage = new Scanner(System.in);\n System.out.print(\"What is your age?\");\n String age = myage.nextLine();\n int numage = Integer.parseInt(age);\n Age age1 = new Age();\n age1.determine(numage);\n }", "public int getAge()\r\n {\r\n return age;\r\n }", "protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }", "public Integer getAge() {\r\n return age;\r\n }", "public int getAge(int i) {\n\t\treturn 0;\r\n\t}", "public void age() {\r\n hp--;\r\n darkerColor();\r\n }", "@Override\n\tpublic int getAge() {\n\t\treturn age;\n\t}", "@Override\n\tpublic String getAge(String name) {\n\t\tSystem.out.println(\"service ±»µ÷ÓÃÁË\");\n\t\treturn \"20\";\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//60 mins 1 h\n\t\t//24 h 1 day\n\t\t//365 days 1 year\n\t\tSystem.out.println(\"Enter minutes: \");\n\t\tdouble minute = scan.nextDouble();\n\t\tint year = (int)(minute/(60*24*365));\n\t\tint day = (int)(minute/60*24)%365;\n\t\tSystem.out.println(minute + \" minutes is \"+year+\" years and \"+day+\" days\");\n\t\tscan.close();\n\t}", "public static void main(String[] args) {\n MinutesToYearsDaysCalculator.printYearsAndDays(561600);\n\n }", "public double getSecs( );", "public String getAge() {\n return age;\n }", "public int getAge() {return age;}", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "private static String waitingForTheAge(String userAnswer)\n {\n try {\n age = Integer.parseInt(userAnswer);\n if ((age < LOW_AGE) || (HIGH_AGE < age)) {\n throw new NumberFormatException();\n }\n }catch(NumberFormatException nfe) {\n return String.format(fWRONG_INTEGER + fNOT_ALLOWED + fONCE_MORE,\n fAGE, LOW_AGE, HIGH_AGE);\n }\n if (age < 18) {\n State.setConversation(false);\n return String.format(fTOO_LOW + fNOT_ALLOWED, drink.getName());\n }\n stateDependentAnswer = Conversation::waitingForTheYear;\n return mBIRTH;\n // \"In which year you were born?\";\n }", "public Byte getUserAge() {\r\n return userAge;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tint myage = 30;\n\t\tint herage=myage; \n\t\tSystem.out.println(herage);\n\t}", "public void display()\n\t{\n\t\tint [] dateDiff=new int[3];\n\t\tSystem.out.println(\"Name: \"+name);\n\t\tSystem.out.println(\"Date of birth: \"+dob);\n\t\tdateDiff=dob.age();\n\t\tSystem.out.println(\"Age: \"+dateDiff[2]+\" Years \"+dateDiff[1]+\" Months \"+dateDiff[0]+\" Days \");\n\t}", "public static void main(String[] args) {\n Scanner scnr = new Scanner(System.in);\r\n int userAge;\r\n \r\n \r\n System.out.print(\"Enter age: \");\r\n userAge = scnr.nextInt();\r\n \r\n if (userAge > 25) { \r\n \tSystem.out.println(\"Adult\");\r\n } else if (userAge >= 19 && userAge <= 25) {\r\n \tSystem.out.println(\"Young adult\");\r\n } else {\r\n \tSystem.out.println (\"Teen\"); \r\n \t\t\t\r\n }\r\n System.out.println(\" The user is a: \");\r\n \r\n\t}" ]
[ "0.71573675", "0.70702815", "0.7062131", "0.70583045", "0.6870772", "0.6590686", "0.65828574", "0.65776986", "0.6567088", "0.6535885", "0.6517296", "0.6468443", "0.6368599", "0.6359714", "0.6359714", "0.6359714", "0.6352977", "0.63497436", "0.6293389", "0.6259122", "0.6231803", "0.6189144", "0.61654675", "0.6162899", "0.61497337", "0.6094479", "0.60853124", "0.60682356", "0.60390383", "0.6025337", "0.6023342", "0.60057753", "0.59985536", "0.59962463", "0.59763193", "0.59552914", "0.59552914", "0.59552914", "0.59519017", "0.59519017", "0.59519017", "0.59512854", "0.59512854", "0.59512854", "0.5939411", "0.59098464", "0.5900316", "0.5900316", "0.58994585", "0.5896322", "0.5896322", "0.5896322", "0.5896322", "0.58959395", "0.5893006", "0.5875465", "0.5871836", "0.58581984", "0.58195126", "0.5819289", "0.58117735", "0.5808287", "0.58000314", "0.57713807", "0.57651764", "0.57605106", "0.575963", "0.5753614", "0.57492137", "0.5747926", "0.5747926", "0.5747926", "0.5747926", "0.5747926", "0.5747926", "0.5747926", "0.5747926", "0.57452685", "0.57451123", "0.57450575", "0.57430065", "0.5740838", "0.57375234", "0.57364213", "0.57360756", "0.57317865", "0.5715181", "0.57094365", "0.5695231", "0.5690446", "0.56892794", "0.56892794", "0.56892794", "0.56892794", "0.56892794", "0.5685019", "0.5684926", "0.5683231", "0.5679457", "0.56773156" ]
0.78036034
0
Program that determines the price of a movie ticket
public void matineeMovieTickets() { System.out.print( "Enter your age: " ); double age = scan.nextDouble(); System.out.print( "Enter the 24-hour clock time: " ); double time = scan.nextDouble(); double price; if ( age <= 13 ) { price = 4.00; if ( time < 1700 ) { price = 2.00; } System.out.println( "The ticket price is $" + price ); } if ( age > 13 ) { price = 8.00; if ( time < 1700 ) { price = 5.00; } System.out.println( "The ticket price is $" + price ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getPrice(Movie movie, double time);", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays, String videoReleaseYear);", "public static void main(String[] args) \n\t{\n\t\tString choiceTheKingsman2;\n\t\tString theKingsman2Info; \n\t\tDouble kingsman2Cost = 3.00;\n\t\tString choiceAmericanAssassin;\n\t\tString americanAssassinInfo;\n\t\tDouble americanAssassinCost = 3.00;\n\t\tString choiceIt;\n\t\tString itInfo;\n\t\tDouble itCost = 3.00;\n\t\tString choiceAmericanMade;\n\t\tString americanMadeInfo;\n\t\tDouble americanMadeCost = 3.00;\n\t\tString myLittlePonyInfo;\n\t\tString choiceMyLittlePony;\n\t\tDouble myLittlePonyCost = 2.00;\n\t\tString bladeRunnerInfo;\n\t\tString choiceBladeRunner;\n\t\tDouble bladeRunnerCost = 3.00;\n\t\tString theMountainBetweenUsInfo;\n\t\tString choiceTheMountainBetweenUs;\n\t\tDouble theMountainBetweenUsCost = 2.00;\n\t\tString happyDeathDayInfo;\n\t\tString choiceHappyDeathDay;\n\t\tDouble happyDeathDayCost = 3.00;\n\t\tString braveInfo;\n\t\tString choiceBrave;\n\t\tDouble braveCost = 3.00;\n\t\tString spidermanHomecomingInfo;\n\t\tString choiceSpidermanHomecoming;\n\t\tDouble spidermanHomecomingCost = 3.00;\n\t\tString movieChoice;\n\t\tString again;\n\t\tScanner input = new Scanner(System.in);\n\t\tDouble total = 0.00;\n\t\t\n\t\t\tSystem.out.println(\"The Kingsman 2\");\n\t\t\tSystem.out.println(\"American Assassin\");\n\t\t\tSystem.out.println(\"It\");\n\t\t\tSystem.out.println(\"My Little Pony\");\n\t\t\tSystem.out.println(\"Blade Runner 2049\");\n\t\t\tSystem.out.println(\"American Made\");\n\t\t\tSystem.out.println(\"The Mountain Between Us\");\n\t\t\tSystem.out.println(\"Happy Death Day\");\n\t\t\tSystem.out.println(\"Brave\");\n\t\t\tSystem.out.println(\"Spiderman Homecoming\");\n\t\t\t\n\tdo {\t\n\t\t\tSystem.out.print(\"what Movie do you want to rent \");\n\t\t\tmovieChoice = input.nextLine();\n\t\t\tif(\"The Kingsman 2\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on The Kingsman 2? Yes or No \");\n\t\t\t\ttheKingsman2Info = input.nextLine();\n\t\t\t\tif(\"Yes\".equalsIgnoreCase(theKingsman2Info))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n With their headquarters destroyed and the world held hostage, \"\n\t\t\t\t\t\t\t+ \"\\n members of Kingsman find new allies when they discover a spy organization\"\n\t\t\t\t\t\t\t+ \"\\n in the United States known as Statesman. In an adventure that tests their\"\n\t\t\t\t\t\t\t+ \"\\n strength and wits, the elite secret agents from both sides of the pond \"\n\t\t\t\t\t\t\t+ \"\\n band together to battle a ruthless enemy and save the day, something \"\n\t\t\t\t\t\t\t+ \"\\n that's becoming a bit of a habit for Eggsy.\");\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceTheKingsman2 = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceTheKingsman2))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + kingsman2Cost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting The Kingsman 2.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"American Assassin\".equalsIgnoreCase(movieChoice))\n\t\t\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on American Assassin? Yes or No \");\n\t\t\t\tamericanAssassinInfo = input.nextLine();\n\t\t\t\tif(\"Yes\".equalsIgnoreCase(americanAssassinInfo))\n\t\t\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n When Cold War veteran Stan Hurley takes CIA black ops recruit Mitch \"\n\t\t\t\t\t\t\t+ \"\\n Rapp under his wing, they receive an assignment to investigate a wave of\"\n\t\t\t\t\t\t\t+ \"\\n random attacks on both military and civilian targets. After discovering \"\t\n\t\t\t\t\t\t\t+ \"\\n a pattern of violence, Hurley and Rapp join forces with a lethal Turkish\"\n\t\t\t\t\t\t\t+ \"\\n agent to stop a mysterious operative who wants to start a global war.\");\t\t\n\t\t\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\t\t\tchoiceAmericanAssassin = input.nextLine();\n\t\t\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceAmericanAssassin))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttotal = (total + americanAssassinCost);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting American Assassin.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\tif(\"It\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on It? Yes or No \");\n\t\t\t\titInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(itInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Seven young outcasts in Derry, Maine, are about to face their worst nightmare \"\n\t\t\t\t\t\t\t+ \"\\n an ancient, shape-shifting evil that emerges from the sewer every 27 years to \"\n\t\t\t\t\t\t\t+ \"\\n prey on the town's children. Banding together over the course of one horrifying\"\n\t\t\t\t\t\t\t+ \"\\n summer, the friends must overcome their own personal fears to battle the \"\n\t\t\t\t\t\t\t+ \"\\n murderous, bloodthirsty clown known as Pennywise.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceIt = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceIt))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + itCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting It.\");\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"My Little Pony\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 2.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on My Little Pony? Yes or No \");\n\t\t\t\tmyLittlePonyInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(myLittlePonyInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Twilight Sparkle, Applejack, Rainbow Dash, Pinkie Pie, Fluttershy and\"\n\t\t\t\t\t\t\t+ \"\\n Rarity embark on an epic journey to save Ponyville from a dark force.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceMyLittlePony = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceMyLittlePony))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + myLittlePonyCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting My Little Pony.\");\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}\n\t\t\tif(\"Blade Runner 2049\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on Blade Runner 2049? Yes or No \");\n\t\t\t\tbladeRunnerInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(bladeRunnerInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Officer K (Ryan Gosling), a new blade runner for the Los Angeles Police\" \n\t\t\t\t\t\t\t+ \"\\n Department, unearths a long-buried secret that has the potential to plunge\"\n\t\t\t\t\t\t\t+ \"\\n what's left of society into chaos. His discovery leads him on a quest to\"\n\t\t\t\t\t\t\t+ \"\\n find Rick Deckard (Harrison Ford), a former blade runner who's been missing\"\n\t\t\t\t\t\t\t+ \"\\n for 30 years.\");\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceBladeRunner = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceBladeRunner))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + bladeRunnerCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting Blade Runner 2049.\");\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}\n\t\t\tif(\"American Made\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on American Made? Yes or No \");\n\t\t\t\tamericanMadeInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(americanMadeInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Barry Seal, a TWA pilot, is recruited by the CIA to provide \"\n\t\t\t\t\t\t\t+ \"\\n reconnaissance on the burgeoning communist threat in Central America\"\n\t\t\t\t\t\t\t+ \"\\n and soon finds himself in charge of one of the biggest covert CIA \"\n\t\t\t\t\t\t\t+ \"\\n operations in the history of the United States. The operation spawns \"\n\t\t\t\t\t\t\t+ \"\\n the birth of the Medellin cartel and almost brings down the Reagan \"\n\t\t\t\t\t\t\t+ \"\\n White House.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceAmericanMade = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceAmericanMade))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + americanMadeCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting American Made.\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"The Mountain Betwween Us\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 2.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on The Mountain Betwween Us? Yes or No \");\n\t\t\t\tchoiceTheMountainBetweenUs = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceTheMountainBetweenUs))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Stranded on a mountain after a tragic plane crash, two strangers must\"\n\t\t\t\t\t\t\t+ \"\\n work together to endure the extreme elements of the remote, snow-covered\"\n\t\t\t\t\t\t\t+ \"\\n terrain. Realizing that help is not on the way, they embark on a perilous\"\n\t\t\t\t\t\t\t+ \"\\n journey across hundreds of miles of wilderness, pushing each other to \"\n\t\t\t\t\t\t\t+ \"\\n survive and discovering their inner strength.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceTheMountainBetweenUs = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceTheMountainBetweenUs))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + theMountainBetweenUsCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting The Mountain Betwween Us.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"Happy Death Day\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on Happy Death Day? Yes or No \");\n\t\t\t\thappyDeathDayInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(happyDeathDayInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Tree Gelbman is a blissfully self-centered collegian who wakes up on her birthday \"\n\t\t\t\t\t\t\t+ \"\\n in the bed of a student named Carter. As the morning goes on, Tree gets the eerie\"\n\t\t\t\t\t\t\t+ \"\\n feeling that she's experienced the events of this day before. When a masked killer\"\n\t\t\t\t\t\t\t+ \"\\n suddenly takes her life in a brutal attack, she once again magically wakes up in\"\n\t\t\t\t\t\t\t+ \"\\n Carter's dorm room unharmed. Now, the frightened young woman must relive the same\"\n\t\t\t\t\t\t\t+ \"\\n day over and over until she figures out who murdered her.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceHappyDeathDay = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceHappyDeathDay))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + happyDeathDayCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting Happy Death Day.\");\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"Brave\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on Brave? Yes or No \");\n\t\t\t\tbraveInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(braveInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Merida (Kelly Macdonald), the impetuous but courageous daughter of Scottish King\"\n\t\t\t\t\t\t\t+ \"\\n Fergus (Billy Connolly) and Queen Elinor (Emma Thompson), is a skilled archer who\"\n\t\t\t\t\t\t\t+ \"\\n wants to carve out her own path in life. Her defiance of an age-old tradition angers\"\n\t\t\t\t\t\t\t+ \"\\n the Highland lords and leads to chaos in the kingdom. Merida seeks help from an\"\n\t\t\t\t\t\t\t+ \"\\n eccentric witch (Julie Walters), who grants her an ill-fated wish. Now, Merida\"\n\t\t\t\t\t\t\t+ \"\\n must discover the true meaning of courage and undo a beastly curse before it's too \"\n\t\t\t\t\t\t\t+ \"\\n late.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceBrave = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceBrave))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + braveCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting Brave.\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(\"Spiderman Homecoming\".equalsIgnoreCase(movieChoice))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You chose \" + movieChoice + \" this movie cost 3.00\");\n\t\t\t\tSystem.out.print(\"Would you like more Information on Spideman Homecoming? Yes or No \");\n\t\t\t\tspidermanHomecomingInfo = input.nextLine();\n\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(spidermanHomecomingInfo))\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t+ \"\\n Thrilled by his experience with the Avengers, young Peter Parker returns home to \"\n\t\t\t\t\t\t\t+ \"\\n live with his Aunt May. Under the watchful eye of mentor Tony Stark, Parker starts\"\n\t\t\t\t\t\t\t+ \"\\n to embrace his newfound identity as Spider-Man. He also tries to return to his\"\n\t\t\t\t\t\t\t+ \"\\n normal daily routine -- distracted by thoughts of proving himself to be more than\"\n\t\t\t\t\t\t\t+ \"\\n just a friendly neighborhood superhero. Peter must soon put his powers to the\"\n\t\t\t\t\t\t\t+ \"\\n test when the evil Vulture emerges to threaten everything that he holds dear.\");\t\t\n\t\t\t\t\tSystem.out.print(\"\"\n\t\t\t\t\t\t\t+ \"\\n Would you like to rent this movie? Yes or No \");\n\t\t\t\t\tchoiceSpidermanHomecoming = input.nextLine();\n\t\t\t\t\t\tif(\"Yes\".equalsIgnoreCase(choiceSpidermanHomecoming))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotal = (total + spidermanHomecomingCost);\n\t\t\t\t\t\t\tSystem.out.println(\"\"\n\t\t\t\t\t\t\t\t\t+\"\\n Thank you for renting Spiderman Homecoming.\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t System.out.println(\"Your total was $\" + total * 1.07);\n\t\t\t System.out.print(\"\"\n\t\t\t\t\t\t+\"\\n Would You like to rent another movie Yes or No?\");\t\n\n\t\t\t\tagain = input.nextLine();\n\t\t\t}while (\"Yes\".equalsIgnoreCase(again));\n\t\t\n\t}", "public double runPrice(int age) {\n\t\t// PriceCRUD for calculating price later\n\t\tPriceCRUD<CinemaClassPrice> cinemaClassCRUD = new PriceCRUD<>(CinemaClassPrice.class);\n\t\tPriceCRUD<MovieTypePrice> movieTypeCRUD = new PriceCRUD<>(MovieTypePrice.class);\n\t\tPriceCRUD<DayPrice> dayCRUD = new PriceCRUD<>(DayPrice.class);\n\t\tPriceCRUD<AgePrice> ageCRUD = new PriceCRUD<>(AgePrice.class);\n\t\t\n\t\t// Get cinema class price\n\t\tCinemaCRUD<Cinema> cinemaCRUD = new CinemaCRUD<Cinema>(Cinema.class, Showtimes.getCineplexId());\n\t\tCinemaClass cinemaClass = cinemaCRUD.getCinemaType(this.showtimes.getCinemaId());\n\t\tCinemaClassPrice cinemaClassPrice = cinemaClassCRUD.getElementPrice(cinemaClass);\n\t\t\n\t\t// Get movie type price\n\t\tMovieCRUD<Movie> movieCRUD = new MovieCRUD<>(Movie.class);\n\t\tMovieType movieType = movieCRUD.getMovieById(this.showtimes.getMovieId()).getType();\n\t\tMovieTypePrice movieTypePrice = movieTypeCRUD.getElementPrice(movieType);\n\t\t\n\t\t// Get Day type price\n\t\tDayType dayType = DateTimeHelper.getDayType(this.showtimes.getDate());\n\t\tDayPrice dayTypePrice = dayCRUD.getElementPrice(dayType);\n\t\t\n\t\t// Get Age Range Price\n\t\tAgePrice agePrice = ageCRUD.getElementPrice(age);\n\t\t\n\t\t// Print receipt for 1 ticket\n\t\tSystem.out.println(cinemaClassPrice.toString());\n\t\tSystem.out.println(movieTypePrice.toString());\n\t\tSystem.out.println(dayTypePrice.toString());\n\t\tSystem.out.println(agePrice.toString());\n\t\tdouble ticketPrice = cinemaClassPrice.getPrice()+movieTypePrice.getPrice()+dayTypePrice.getPrice()+agePrice.getPrice();\n\t\tSystem.out.println(\"Ticket price: \"+ticketPrice);\n\t\t\n\t\treturn ticketPrice;\n\t}", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays);", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays, Integer maxAge);", "public static void main(String[] args) {\n\t\tScanner reader=new Scanner(System.in);\n\t\tSystem.out.println(\"please enter what type of ticket buying? :\");\n\t\tString typeticket=reader.nextLine();\n\t System.out.println(typeticket);\n\t int totPrice=0;\n\t System.out.println(typeticket.toLowerCase());\n if(typeticket.toLowerCase().equals(\"silver\"))\n {\n \ttotPrice=2*150;\n \tSystem.out.println(typeticket +\" Price for 2 is :\"+totPrice);\n }\n else if(typeticket.toLowerCase().equals(\"golden\"))\n {\n \ttotPrice=2*200;\n \tSystem.out.println(typeticket +\" Price for 2 is :\"+totPrice);\n }\n \n \n\t}", "private void updatePriceAndSaving() {\n movieOrder = new MovieOrder(movie, Weekday.weekdayForValue(selectedDay), flagsApplied, numberOfTickets);\n\n tvTotalPriceNewTickets.setText(getResources().getString(\n R.string.total_price_new_tickets,\n movieOrder.getTotalPriceAfterDiscount(),\n movieOrder.getNumberOfTicketsAfterOfferIsApplied())\n );\n\n tvSavingsNewTickets.setText(getResources().getString(\n R.string.today_saving_new_tickets,\n movieOrder.getTotalSaving()\n ));\n }", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "double purchasePrice();", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }", "public static void main (String [] args) {\n Scanner input = new Scanner(System.in);\n \n // Ask the user for their age\n System.err.print(\"How old are you? \");\n int age = input.nextInt();\n \n // Ask the user if they have a coupon\n System.err.print(\"Do you have a coupon? [true/false] \");\n \n boolean coupon = input.nextBoolean();\n \n // Print the cost of a movie ticket\n if (age <= 13 || age >= 65) {\n \tif (coupon == true) { \n \t\tSystem.out.println(\"Your ticket costs $9.5.\"); \t\n \t}\n \telse {\n \t\tSystem.out.println(\"Your ticket costs $11.5.\");\n \t}\n }\n if ((age > 13 && age < 65) && coupon == true) {\n \tSystem.out.println(\"Your ticket costs $12.5.\");\n }\n if ((age > 13 && age < 65) && coupon == false) {\n \tSystem.out.println(\"Your ticket costs $14.5.\");\n }\n }", "double calculatePrice();", "public static void main(String[] args) {\r\n // calculate how much it would cost to purchase different quantities of computer parts\n String name;\n System.out.println(\"Welcome! Enter which computer parts you would like to purchase along with a quantity:\");\n System.out.println(\"How many Chromebook Chargers would you like?:\");\n // Creates a Scanner used for input\n Scanner input = new Scanner(System.in);\n int chromebookCharger = input.nextInt();\n\n\n System.out.println(\"How many Replacement Motherboards would you like?:\"); \n int replacementMotherboard = input.nextInt();\n \n System.out.println(\"How many Computer Mouses would you like?:\");\n int computerMouse = input.nextInt();\n\n double Subtotal = (chromebookCharger*34.99 + replacementMotherboard*127.50 + computerMouse*18.00);\n\n double Tax = (1.13);\n\n // declare and calculate the quotient\n System.out.println(Subtotal*1.13);\n\n\n\n \r\n \r\n }", "private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }", "public void getPrice(){\n System.out.println(\"Price: $\" + price); \n }", "public Double getTotalPrice(List<Movie> movies) {\n\t\tDouble tot = 0d;\n\t\tint count = 1;\n\t\tfor(Movie movie: movies) {\n\t\t\tif ( count == 3) {\n\t\t\t\ttot += movie.getRentalPrice() * 0.75;\n\t\t\t} else if ( count == 4 ){\n\t\t\t\ttot += movie.getRentalPrice() * 0.50;\n\t\t\t} else if ( count == 5) {\n\t\t\t\ttot += movie.getRentalPrice() * 0.25;\n\t\t\t} else if ( count == 6) {\n\t\t\t\ttot += movie.getRentalPrice() * 0;\n\t\t\t} else {\n\t\t\t\ttot += movie.getRentalPrice();\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t\treturn tot;\n\t}", "public int prIce_Per_GUeSt(int NO_OF_PEOPLE){\r\n if (NO_OF_PEOPLE>50){\r\n price_per_guest=lower_price_per_guest;\r\n System.out.println(\"PER_PERSON_PRICE = \"+lower_price_per_guest);\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n return total_price;\r\n }\r\n else\r\n {price_per_guest=Highest_price_per_guest;\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n System.out.println(\"PER_PERSON_PRICE = \"+Highest_price_per_guest);\r\n return total_price;}\r\n }", "public static void main(String[] args){\n double precio_producto = 150;\n double iva = 0.13;\n double total = 0;\n \n total= precio_producto * iva;\n System.out.println(\"El iva del producto: $ \"+total);\n \n \n \n }", "public static void main(String[] args) {\n\t\tScanner a=new Scanner(System.in);\r\n\t\t/*System.out.println(\"Enter the number\");\r\n\t\tSystem.out.println(\"1.Micro\");\r\n\t\tSystem.out.println(\"2.Prime\");\r\n\t\t\r\n\t\tint cab=a.nextInt();\r\n\t\tSystem.out.println(\"Enter the KM\");\r\n\t\tint Km=a.nextInt();\r\n\t\tif(cab==1) {\r\n\t\t\tint price=10;\r\n\t\t\tSystem.out.println(\"Drop Charge =\"+(price*Km));\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(cab==2){\r\n\t\t\tint price=20;\r\n\t\t\tSystem.out.println(\"Drop Charge =\"+(price*Km));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Invalid\");\r\n\t\t}*/\r\n\tSystem.out.println(\"enter your choice\");\r\n\tSystem.out.println(\"bike\");\r\n\tSystem.out.println(\"car\");\r\n\tString vehicle=a.next();\r\n\t\r\n\tif(vehicle.equals(\"bike\")) {\r\n\t\trateforbike(vehicle);\r\n\t}\r\n\telse if(vehicle.equals(\"car\")) {\r\n\t\trateforcar(vehicle);\r\n\t}\r\n\t\r\n\r\n}", "public void printCost() {\r\n double cost;\r\n cost = quantity * price;\r\n System.out.printf(\"Total cost = $%.2f\", cost);\r\n }", "private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}", "public void startBook() {\n\t\tthis.startInfo();\n\t\tSystem.out.println();\n\t\tint maxNoSeat = this.showtimes.getNoSeatAvailable();\n\t\tSystem.out.println(\"How many tickets do you want to purchase? (Max:\"+maxNoSeat+\"):\");\n\t\tint choice = this.getInputChoice(1, maxNoSeat);\n\t\t\n\n\t\t\n\t\t// Array to store age of Movie-goers\n\t\tint[] ageArray = new int[choice];\n\t\tfor (int i=0; i< choice; ++i) {\n\t\t\tSystem.out.println();\n\t\t\tthis.showtimes.viewSeat();\n\t\t\tSystem.out.println(\"Please choose your seat(s) (e.g. A1):\");\n\t\t\tint[] seat = this.getInputSeat();\n\t\t\t\n\t\t\tthis.showtimes.takeSeat(seat[0], seat[1]);\n\t\t\tSystem.out.println(\"Enter movie-goer's age:\");\n\t\t\tint age = this.getInputInteger();\n\t\t\tageArray[i] = age;\n\t\t}\n\t\tthis.runBook(choice, ageArray);\n\t}", "private void calculatePrice() {\r\n int price = 0;\r\n int day = show.getDateTime().getDayOfMonth();\r\n int month = show.getDateTime().getMonthValue();\r\n \r\n for (int i = 0; i < seats.size(); i++) {\r\n String option = seats.get(i);\r\n \r\n if (Arrays.stream(sectionNames).parallel().anyMatch(option::contains)) {\r\n String section = option.replaceAll(\"\\\\d\",\"\");\r\n int number = Integer.parseInt(option.replaceAll(\"\\\\D+\",\"\"));\r\n \r\n if (section.equals(\"m\")) {\r\n if (number <= 100) {\r\n price += mainFloorPrice;\r\n } else {\r\n price += mainFloorPremium;\r\n }\r\n } else if (section.equals(\"sb\")) {\r\n if (number <= 25) {\r\n price += southBalconyPrice;\r\n } else {\r\n price += southBalconyPremium;\r\n }\r\n } else if (section.equals(\"wb\")) {\r\n price += westBalconyPrice;\r\n } else if (section.equals(\"eb\")) {\r\n price += eastBalconyPrice;\r\n }\r\n }\r\n }\r\n \r\n if (seats.size() >= 5 && seats.size() <= 10 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (2 * seats.size());\r\n }\r\n \r\n if (seats.size() >= 11 && seats.size() <= 20 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (5 * seats.size());\r\n }\r\n \r\n if (month == 12 && (day == 26 || day == 27)) {\r\n price = seats.size() * 20;\r\n }\r\n \r\n totalPrice = price;\r\n }", "public static void main(String [] args)\n {\n //create Scanner to obtain input from command window\n Scanner input = new Scanner(System.in);\n \n double item1 = 239.99;// item 1 price \n double item2 = 129.75;// item 2 price\n double item3 = 99.95;// item 3 price\n double item4 = 350.89;// item 4 price\n int a;// number of item1\n int b;// number of item2\n int c;// number of item3\n int d;// number of item4\n double comm = .09;// commision rate\n double total;// total sales\n \n // # of item 1 \n System.out.print(\"Number of item 1 sold: \"); //prompt\n a = input.nextInt(); \n \n // # of item 2 \n System.out.print(\"Number of item 2 sold: \"); //prompt\n b = input.nextInt(); \n \n // # of item 3\n System.out.print(\"Number of item 3 sold: \"); //prompt\n c = input.nextInt(); \n \n // # of item 4 \n System.out.print(\"Number of item 4 sold: \"); //prompt\n d = input.nextInt(); \n \n // total of all items sold\n total = a * item1 + b * item2\n + c * item3 + d * item4;\n \n // displays total of sales done by sales person\n System.out.printf(\" Total Sales: %.2f\" , ( double ) total );\n \n // displays Earnings of Salesperson for the week\n System.out.printf( \"\\n Total weeks pay: %.2f \" , ( double ) total * comm + 200 );\n \n input.close();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"How many libraries you bought?\");\r\n\t\tint sales = in.nextInt();\r\n\t\tswitch(sales){\r\n\t\tcase 6: System.out.println(\"You Won $1000\");\r\n\t\tcase 5: System.out.println(\"You Won A Motorcycle\");\r\n\t\tcase 4: System.out.println(\"You won A Smart Phone\");\r\n\t\tcase 3: System.out.println(\"You Won A Nintendo\");\r\n\t\tcase 2: System.out.println(\"You Won A Car\");\r\n\t\tcase 1: System.out.println(\"You won A watch\");\r\n\t\tbreak;\r\n\t\tdefault: System.out.println(\"no Price\");\r\n\r\n\t}\r\n\t}", "public static void main(String[] args)\n\t {\n\t \n\t Coffee coffee = new Coffee();\n\t Expresso espresso = new Expresso();\n\t Cappuccino cappuccino = new Cappuccino();\n\t \n\t \n\t final double SALES_TAX = 0.06;\n\t \n\t \n\t Scanner s = new Scanner(System.in); // Create a Scanner object\n\t System.out.println(\"How many coffeee drinks woul dyou like ?\");\n\t coffee.setQuantity(s.nextInt());\n\t \n\t s.hasNextLine();\n\t System.out.println(\" Would you like milk ( y or n)?\");\n\t String milkOption = s.nextLine();\n\t if (milkOption.equals(\"y\")) {\n\t \t coffee.setMilk(true);\n\t }\n\t \n\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t String sugarOption = s.nextLine();\n\t if (sugarOption.equals(\"y\")) {\n\t \t coffee.setSugar(true);\n\t }\n\t \n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", coffee.getName(), coffee.getDescription(),\n\t coffee.calculateProductTotal());\n\t \n\t \n\t\t \t \n\t\t \t \n\t System.out.println(\"How many Espresso drinks would you like ?\");\n\t espresso.setQuantity(s.nextInt());\n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", espresso.getName(), espresso.getDescription(),\n\t espresso.calculateProductTotal());\n\t s.hasNextLine();\n\t\t System.out.println(\" Would you like milk ( y or n)?\");\n\t\t String extraShot = s.nextLine();\n\t\t if (extraShot.equals(\"y\")) {\n\t\t \t espresso.setExtraShot(true);\n\t\t }\n\t\t \n\t\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t\t String macchiato = s.nextLine();\n\t\t if (macchiato.equals(\"y\")) {\n\t\t \t espresso.setMacchiato(true);\n\t\t }\n\t \n\t \n\t System.out.println(\"How many cappuccino drinks would you like ?\");\n\t cappuccino.setQuantity(s.nextInt());\n\t System.out.printf(\"Name: %s\\nDescription: %s\\nSubtotal: %2f\\n\\n\", cappuccino.getName(), cappuccino.getDescription(),\n\t cappuccino.calculateProductTotal());\n\t s.hasNextLine();\n\t\t System.out.println(\" Would you like milk ( y or n)?\");\n\t\t String peppermint = s.nextLine();\n\t\t if (peppermint.equals(\"y\")) {\n\t\t \t cappuccino.setPeppermint(true);\n\t\t }\n\t\t \n\t\t System.out.println(\" Would you like sugar ( y or n)?\");\n\t\t String whippedCream = s.nextLine();\n\t\t if (whippedCream.equals(\"y\")) {\n\t\t \t cappuccino.setWhippedCream(true);\n\t\t }\n\t \n\t \n\t double transactionSubtotal = coffee.calculateProductTotal() + espresso.calculateProductTotal() + cappuccino.calculateProductTotal();\n\t System.out.println(transactionSubtotal);\n\t double transactionTax = transactionSubtotal * SALES_TAX;\n\t double total = transactionSubtotal + transactionTax;\n\t System.out.printf(\"Subtotal: %.2f\\nTax: %.2f\\nTotal: %.2f\\n\",transactionSubtotal,transactionTax,total);\n\t s.close();\n\t }", "public int calcMarketPrice() {\r\n player = Context.getInstance().getPlayer();\r\n //Random r = new Random();\r\n int techLevel = player.getCurrentPlanet().getTechLevel();\r\n Event event = player.getCurrentPlanet().getEvent();\r\n Resource resource = player.getCurrentPlanet().getResource();\r\n double price = basePrice;\r\n price += (ipl * (techLevel - mtlb)) + variance;\r\n if (player.getCurrentPlanet().getTechLevel() == this.ttp) {\r\n price *= Context.TECH_PRICE_MULT;\r\n }\r\n if (event.equals(this.ie)) {\r\n price *= event.getUpMult();\r\n } else if (event.equals(this.de)) {\r\n price *= event.getDownMult();\r\n }\r\n if (resource.equals(this.cr)) {\r\n price *= resource.getDownMult();\r\n } else if (resource.equals(this.er)) {\r\n price *= resource.getUpMult();\r\n }\r\n price *= (((double) player.getTrader() / DFIFTY) + 1.0);\r\n int finalPrice = (int) price;\r\n if (player.getTrader() > 0) {\r\n double discountedPrice = price;\r\n double trader = (double) player.getTrader();\r\n discountedPrice -= (price) * (4.0 * trader / PERCENT);\r\n return (int) discountedPrice;\r\n } else {\r\n return finalPrice;\r\n }\r\n }", "public static void main(String[] args) {\n\t\tMovie movie = new Movie(\"Ocean nut\", 0);\n\t\tMovie good = new Movie(\"Justin Zhang\", 5);\n\t\tMovie garbage = new Movie(\"Fortnite\", 4);\n\t\tMovie yeet = new Movie(\"Yeet Yeet\", 3);\n\t\tMovie yes = new Movie(\"garbage movie\", 1);\n\t\t\n\t\tNetflixQueue noob = new NetflixQueue();\n\t\t\n\t\tSystem.out.println(movie.getTicketPrice());\n\t\t\n\t\tnoob.addMovie(movie);\n\t\tnoob.addMovie(yes);\n\t\tnoob.addMovie(yeet);\n\t\tnoob.addMovie(garbage);\n\t\tnoob.addMovie(good);\n\t\tnoob.printMovies();\n\t\t\n\t\tSystem.out.println(\"The best movie is \" + noob.getBestMovie());\n\t\tnoob.sortMoviesByRating();\n\t\tSystem.out.println(\"The second best movie is \"+ noob.getMovie(1));\n\t}", "public static void main(String[] args) {\n \n// scanner\n Scanner myScanner;\n myScanner = new Scanner( System.in );\n \n// user inputs\n System.out.print(\n \"Enter the number of Big Macs(an interger > 0): \"); // asking user for the number of Big Macs\n int nBigMacs = myScanner.nextInt(); // declare that input as an interger nBigMacs\n \n System.out.print(\"Enter the cost per Big Mac as\"+ \n \" a double (in the form xx.xx) :\"); // prompts for the cost of 1 Big Mac\n double bigMac$ = myScanner.nextDouble(); //declaration of the Big Mac cost as a variable\n \n System.out.print(\n \"Enter the percent tax as a whole number (xx): \"); // prompts user for tax percent\n double taxRate = myScanner.nextDouble(); // decleration of tax rate\n taxRate/=100; // converts whole number to a usable proportion\n \n// eeclare variables for output and calculation\n double cost$;\n int dollars,dimes, pennies; // make variables for dollars, dimes, and pennies for storing digits\n cost$=nBigMacs*bigMac$*(1+taxRate); //calculation for the cost of all Big Macs\n dollars=(int)cost$; //gets dollars as a whole interger\n dimes=(int)(cost$*10)%10; //isolates one digit after the decimal place\n pennies=(int)(cost$*100)%10; //isolates the second degit after the decimal place\n \n// print results\n System.out.println(\"The total cost of \"+nBigMacs+\" Big Macs, at $\"+bigMac$+\" per Big Mac, with a sales tax of \"+(int)(taxRate*100) + \"%, is $\"+dollars+'.'+dimes+pennies);\n \n }", "public void getPaintPrice(){\n System.out.println(\"Enter the price per gallon of paint: \");\n this.pricePerGallon = INPUT.nextDouble();\n }", "public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }", "public static void main(String[] args)\r\n {\n List<Film> films = getFilms();\r\n //Gets list of days starting from today\r\n List<String> days = getDays();\r\n //set scanner\r\n Scanner input = new Scanner(System.in);\r\n //gets film selection, end code if they pick (q)uit\r\n int film = whichFilm(input, films);\r\n if (film == -1)\r\n return;\r\n else\r\n System.out.println(\"You selected to watch \" + films.get(film) + \"\\n\");\r\n //gets day selection, end code if they pick (q)uit\r\n int day = whichDay(input, days, films.get(film));\r\n if (day == -1)\r\n return;\r\n else\r\n System.out.println(\"You selected \" + days.get(films.get(film).getShowingDays()[day]) + \"\\n\");\r\n //gets time selection, end code if they pick (q)uit\r\n int showingTime = whichTime(input, films.get(film));\r\n if (showingTime == -1)\r\n return;\r\n else\r\n System.out.println(\"You selected the time \" + films.get(film).getShowingTimes().get(showingTime) + \"\\n\");\r\n //gets number of tickets for each ticket type\r\n int[] numberOfTickets = whichTickets(input);\r\n //gets list of tickets with ticket type, ticket price, film name, showing day, showing time\r\n List<Ticket> order = assignTickets(numberOfTickets, films.get(film).getFilmName(), days.get(day), films.get(film).getShowingTimes().get(showingTime));\r\n\r\n orderSummery(order);\r\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in); \n\t\tint itemNum;\n\t\tint quantity;\n\t\tdouble price;\n\t\tdouble total;\n\t\tSystem.out.println(\"Please enter prod num\");\n\t\titemNum = input.nextInt();\n\t\tSystem.out.println(\"please enter the quantity:\");\n\t\tquantity = input.nextInt();\n\t\t/*if(itemNum == 1){\n\t\t\tprice = 2.98;\n\t\t}\n\t\tif(itemNum == 2){\n\t\t\tprice = 4.5;\n\t\t}*/\n\t\tswitch (itemNum){\n\t\tcase 1:\n\t\t\tprice = 2.98;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tprice = 4.50;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tprice = 9.98;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tprice = 4.49;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tprice = 6.87;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong item # price is 0\");\n\t\t\tprice = 0;\t\t\t\n\t\t}\n\t\t\n\t\ttotal = price*quantity;\n\t\tSystem.out.println(\"The total is:\" + total);\n\n\t}", "public static void main(String[] args) {\n\t\tMovie Movie1 = new Movie(\"Grown Ups 2\", 2);\n\t\tMovie Movie2 = new Movie(\"Jack Jill\", 1);\n\t\tMovie Movie3 = new Movie(\"Battleship\", 1);\n\t\tMovie Movie4 = new Movie(\"Pixels\", 1);\n\t\tMovie Movie5 = new Movie(\"Smosh: The Movie\", 3);\n\t\tSystem.out.println(Movie1.getTicketPrice());\n\t\tSystem.out.println(Movie2.getTicketPrice());\n\t\tSystem.out.println(Movie3.getTicketPrice());\n\t\tSystem.out.println(Movie4.getTicketPrice());\n\t\tSystem.out.println(Movie5.getTicketPrice());\n\t\tNetflixQueue queue = new NetflixQueue();\n\t\tqueue.addMovie(Movie1);\n\t\tqueue.addMovie(Movie2);\n\t\tqueue.addMovie(Movie3);\n\t\tqueue.addMovie(Movie4);\n\t\tqueue.addMovie(Movie5);\n\t\tqueue.printMovies();\n\t\tqueue.sortMoviesByRating();\n\t\tqueue.printMovies();\n\t}", "public double scanAndPay(TicketDetails ticketDetails){\n if(ticketDetails==null)\n return 0.0;\n long endTime = System.currentTimeMillis();\n ticketDetails.getParkingSpot().removeVehicle(ticketDetails.getVehicleDetails());\n int duration = (int) (endTime - ticketDetails.getStartTime());\n return ticketDetails.getParkingSpot().getParkingSpotType().getPrice(duration);\n }", "public static void main(String args[]){\n System.out.println(\"Enter the no. of sales you make\");\n Scanner sc = new Scanner(System.in);\n int sale = sc.nextInt();\n System.out.println(\"Entern the no of experince in current Job\");\n int year = sc.nextInt();\n int pay=1000;\n int requiredSales =10;\n int requiredExp = 2;\n\n if (sale>=requiredSales) {\n if (year>=requiredExp) {\n // Calculate the pay\n pay = pay + 250;\n // Display the pay\n System.out.println(\"Your pay is \" + pay);\n }\n else\n System.out.println(\"Sorry you are not qualified, your experince is less\");\n }\n else\n {\n System.out.println(\"Sorry you are not qualified, fuck your self mc\");\n }\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to the Movie Lister\");\n\t\tSystem.out.println();\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tScanner sd = new Scanner(System.in);\n\t\tString userChoice = \"y\";\n\t\t\n\t\tArrayList<Rental> rentals = new ArrayList<>();\n\t\t\n\t\twhile(userChoice.equalsIgnoreCase(\"y\")) {\n\t\t\tSystem.out.print(\"Rent a movie. What is the genre? \");\n\t\t\tString genre = sc.nextLine();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"What is the title? \");\n\t\t\tString movieTitle = sc.nextLine();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"What is the MPAA Rating? \");\n\t\t\tString mpaa = sc.nextLine();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"What is the Movie ID Number? \");\n\t\t\tint movieNumber = sd.nextInt();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"What is their Customer ID Number? \");\n\t\t\tint customerNumber = sd.nextInt();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"How many days late? \");\n\t\t\tint daysLate = sd.nextInt();\n\t\t\tSystem.out.println();\n\t\n\t\t\tif (genre.equalsIgnoreCase(\"action\")) {\n\t\t\t\tAction newMovie = new Action();\n\t\t\t\tnewMovie.setTitle(movieTitle);\n\t\t\t\tnewMovie.setMpaaRating(mpaa);\n\t\t\t\tnewMovie.setMovieID(movieNumber);\n\t\t\t\tnewMovie.setDaysLate(daysLate);\n\t\t\t\tSystem.out.println(newMovie.getDisplayText());\n\t\t\t\t\n\t\t\t\tRental newRental = new Rental();\n\t\t\t\tnewRental.setRentedMovie(newMovie);\n\t\t\t\tnewRental.setCustomerID(customerNumber);\n\t\t\t\tnewRental.setDaysLate(daysLate);\n\t\t\t\tnewRental.calculatedLateFees();\n\t\t\t\trentals.add(newRental);\n\t\t\t\t\n\t\t\t} else if (genre.equalsIgnoreCase(\"drama\")) {\n\t\t\t\tDrama newMovie = new Drama();\n\t\t\t\tnewMovie.setTitle(movieTitle);\n\t\t\t\tnewMovie.setMpaaRating(mpaa);\n\t\t\t\tnewMovie.setMovieID(movieNumber);\n\t\t\t\tnewMovie.setDaysLate(daysLate);\n\t\t\t\tSystem.out.println(newMovie.getDisplayText());\n\t\t\t\t\n\t\t\t\tRental newRental = new Rental();\n\t\t\t\tnewRental.setRentedMovie(newMovie);\n\t\t\t\tnewRental.setCustomerID(customerNumber);\n\t\t\t\tnewRental.setDaysLate(daysLate);\n\t\t\t\tnewRental.calculatedLateFees();\n\t\t\t\trentals.add(newRental);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tComedy newMovie = new Comedy();\n\t\t\t\tnewMovie.setTitle(movieTitle);\n\t\t\t\tnewMovie.setMpaaRating(mpaa);\n\t\t\t\tnewMovie.setMovieID(movieNumber);\n\t\t\t\tnewMovie.setDaysLate(daysLate);\n\t\t\t\tSystem.out.println(newMovie.getDisplayText());\n\t\t\t\t\n\t\t\t\tRental newRental = new Rental();\n\t\t\t\tnewRental.setRentedMovie(newMovie);\n\t\t\t\tnewRental.setCustomerID(customerNumber);\n\t\t\t\tnewRental.setDaysLate(daysLate);\n\t\t\t\tnewRental.calculatedLateFees();\n\t\t\t\trentals.add(newRental);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"Continue? (y/n): \");\n\t\t\tuserChoice = sc.nextLine();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Customer Owes a total of \" + Double.toString(lateFeesOwed(rentals)) + \" dollars.\");\n\t\tSystem.out.println(\"Ok bye!\");\n\t\tsc.close();\n\t\tsd.close();\n\t}", "public static void main(String[] args) {\n double carMiles;\n double carHalon;\n double carCost;\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Введите пробег автомобиля в американских милях:\");\n carMiles = sc.nextInt();\n\n System.out.println(\"Введите расход топлива автомобиля в галонах на милю:\");\n carHalon = sc.nextInt();\n\n System.out.println(\"Введите стоимость автомобиля $:\");\n carCost = sc.nextInt();\n\n //перевод в европейскую систему\n System.out.println(\"Пробег автомобиля: \" + carMiles * 1.61 + \"км\"); //формул: http://www.for6cl.uznateshe.ru/mili-v-kilometry/\n\n System.out.println(\"Расход топлива автомобиля: \" + ( 378.5 / ( carHalon * 1.609 )) + \" литров на 100 км\" ); // формула: https://planetcalc.ru/4357/\n\n System.out.println(\"Стоимость автомобиля: \" + carCost * 28.3 + \" грн\");\n\n\n\n }", "double getPrice();", "double getPrice();", "double getPrice();", "public static void main(String[] args) {\n //ENTER CODE HERE\n Scanner scan =new Scanner(System.in);\n System.out.println(\"Enter price in cents:\");\n\n int itemPrice = scan.nextInt();\n\n if (itemPrice < 25 || itemPrice > 100 || (itemPrice % 5 != 0) ) {\n System.out.println(\"Invalid entry\");\n }\n else\n {\n int change=(100-itemPrice);\n int quarterCount = change / 25;\n int remainder1 = change % 25;\n int dimeCount = remainder1 / 10;\n int remainder2 = remainder1 % 10;\n int nickelCount = remainder2 / 5;\n\n System.out.println(\"When you give $1 for \" +itemPrice+ \"cents item. You will get back \"+\n quarterCount+ (quarterCount>1 ? \"quarters \" :\"quarter \")+\n dimeCount + (dimeCount > 1 ? \"dimes \" : \"dime \") +\n nickelCount+ (nickelCount > 1 ? \"nickels \" :\"nickel \") );\n\n }\n\n\n\n }", "public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to Product Application\");\n\t\tScanner sc = new Scanner (System.in);\n\t\t\n\t\t//final int Code_Width = 10;\n\t\t//final int Desc_Width = 20;\n\t\t//final int Price_Width = 10;\n\t\t\n\t\t//double value=0 ;\n\t\t\n\t\t//StringBuilder list = new StringBuilder();\n\t\t\n\t\t\n\t\t//list.append(StringUtil.Pad(\"Code\", Code_Width));\n\t\t//list.append(StringUtil.Pad(\"Decscription\", Desc_Width));\n\t\t//list.append(StringUtil.Pad(\"Price\", Price_Width));\n\t\t//list.append(\"\\n\");\n\t\t\n\t\t//list.append(StringUtil.Pad(\"========= \", Code_Width));\n\t\t//list.append(StringUtil.Pad(\"=================== \", Desc_Width));\n\t\t//list.append(StringUtil.Pad(\"========= \", Price_Width));\n\t\t//list.append(\"\\n\");\n\n\n\t\t\n\t\tString choice = \"y\";\n\t\twhile (choice.equalsIgnoreCase(\"y\")){\n\t\t\t\n\n System.out.print(\"Enter product code: \");\n String productCode = sc.nextLine();\n\t\t\t//get the import from the user\n\t\t\t//System.out.print(\"Enter the product code: \");\n\t\t\t//System.out.println();\n\t\t\t//String productCode = sc.nextLine();\n\t\t\t\n\t\t\t//Product product = Console.getString(\"Enter the product code: \");\n\t\t\t//String productCode = Console.getString(\"Enter the product code: \");\n\n\t\t\t\n\t\t\t//get the product object\n\n\t\t\t//Product product = ProductDB.getProduct(productCode);\n\t\t\tProduct product = ProductDB.getProduct(productCode);\n\n\t\t\tSystem.out.println();\n if(product!= null){\n System.out.println(\"Description: \" + product.toString());\n System.out.println(\"Price: \" + product.getPriceFormatted());\n }\n else{\n System.out.println(\"No product matches this product code. \\n\");}\n //new line\n System.out.println(\"Product count: \" + Product.getCount());\n System.out.println();\n\t\t\t\n\t\t\t\n\t\t\t//see if the user wants to continue\n\t\t\tSystem.out.print(\"Another Product? (y/n): \");\n\t\t\tchoice = sc.nextLine();\n\t\t\tSystem.out.println();\t\t\n\t\t}\n\t\t//System.out.println(list);\n\t\t//list.append(Double.toString(value))\n\t\t//System.out.printf(\"         Total: $%.2f \\n\", value);\n\t\tSystem.out.println(\"Application Ends.\");\n\t\t\n\t}", "public void getDiscount(){\n System.out.println(\"10% off, final price: \" + price * 0.9);\n }", "public static void main(String[] arg) {\n\t\t\n\t\tSystem.out.println(\"Welcome. We're interested in how people are watching movies this year.\");\n\t\tSystem.out.println(\"Thanks for your time. - The WRITERS GUILD OF AMERICA.\");\n\t\tSystem.out.println(\"Please tell us about how you've watched movies in the last month.\");\n\t\t\n\t\tSystem.out.println(\"How many movies have you seen at the cinema?\");\n\t\tint cinemaMovies = TextIO.getlnInt();\n\t\t\n\t\tSystem.out.println(\"How many movies have you seen using a DVD or VHS player?\");\n\t\tint cinemaDvdVhsMovies = TextIO.getlnInt();\n\t\t\n\t\tSystem.out.println(\"How many movies have you seen using a Computer?\");\n\t\tint computerMovies = TextIO.getlnInt();\n\t\t\n\t\tint totalNumber = cinemaMovies + cinemaDvdVhsMovies + computerMovies;\n\t\t\n\t\tSystem.out.println(\"Summary: \" + cinemaMovies + \" Cinema movies, \" + cinemaDvdVhsMovies + \" DVD/VHS movies, \" + computerMovies + \" Computer movies\");\n\t\tSystem.out.println(\"Total: \" + totalNumber + \" movies\");\n\t\t//* Summary: 1 Cinema movies, 101 DVD/VHS movies, 98 Computer movies\n\t\t//Total: 200 movies\n\t\t\n\t\t//Fraction of movies seen at a cinema: 0.50%\n\t\t//Fraction of movies seen outside of a cinema: 99.50%\n\t\t\n\t\tdouble percentageCinema = (cinemaMovies * 100.00f) / totalNumber;\n System.out.print(\"Fraction of movies seen at a cinema: \");\n System.out.printf( \"%.2f\", percentageCinema);\n System.out.println(\"%\" );\n \n\t\tdouble percentageDvdVhs = (cinemaDvdVhsMovies * 100.00f) / totalNumber;\t\t\n double percentageComputer = (computerMovies * 100.00f) / totalNumber;\n double percentageOut = percentageDvdVhs + percentageComputer;\n\t\tSystem.out.print(\"Fraction of movies seen outside of a cinema: \");\n\t\tSystem.out.printf( \"%.2f\", percentageOut);\n\t\tSystem.out.println(\"%\");\n\n\t}", "double getPricePerPerson();", "public static void main(String[] args) {\n boolean isStudent = true;\r\n int age = 29;\r\n int ticketPrice = 10;\r\n\r\n if(age <= 16 || age >= 50 || isStudent) {\r\n ticketPrice = ticketPrice - 5;\r\n }\r\n\r\n System.out.println(\"$\" + ticketPrice);\r\n }", "public void getPrice() {\n\t System.out.println(\"Price: $\" + price);\n }", "private void displayPrice(int number) {\n }", "public void buyhouse(int cost){\n\t\n}", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "public static void main(String[] args) {\n double cost;\n double diameter;\n double unitCost;\n\n//----Get data\n System.out.print(\"What size pizza : \");\n diameter = keyboard.nextDouble();\n System.out.print(\"What does it cost : \");\n cost = keyboard.nextDouble();\n\n//----Perform computation\n unitCost = computeUnitCost(diameter,cost);\n\n//----Display the diameter, the total cost, and the unit cost\n System.out.println(\"Diameter is \" + diameter);\n System.out.println(\"Total cost is \" + cost);\n System.out.println(\"Unit cost is \" + unitCost);\n\n }", "public static void main(String[] args) {\n Scanner Keyboard = new Scanner(System.in);\r\n System.out.println(\"how many sof u wnt to purchase\");\r\n int numSoftware =Keyboard.nextInt();\r\n double discount=0;\r\n if(numSoftware >=10 &&numSoftware<=19){\r\n\t discount=0.20;\r\n }\r\n else if (numSoftware>=20 &&numSoftware<=49){\r\n\t discount=0.30;\r\n }\r\n else if (numSoftware>=50 &&numSoftware<=99){\r\n\t discount=0.40;\r\n }\r\n else if (numSoftware>=100){\r\n\t discount=0.50;\r\n }\r\n double subtotal =99*numSoftware;\r\n double discountAmount=subtotal*discount;\r\n double finalAmount=subtotal-discountAmount;\r\n \r\n System.out.println(\"subtotal:$\"+subtotal);\r\n System.out.println(\"discount percent:$\"+discount*100+\"%\");\r\n System.out.println(\"discountAmount:$\"+discountAmount);\r\n \r\n System.out.println(\"finalAmount:$\"+finalAmount);\r\n //System.out.printf(\"finalAmount:$%.2f\",finalAmount);\r\n \r\n \r\n //rounded to 2 decimal points\r\n System.out.printf(\"final price:%.2f\",finalAmount);\r\n \r\n \r\n \r\n \r\n \r\n // string formatting\r\n \r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString produto = \"\";\n\t\tint qtde = 0;\n\t\tdouble valor = 0;\n\t\tdouble desc = 90;\n\t\tdouble total = 0;\n\t\tdouble total_desc = 0;\n\t\t\n\t\tproduto = JOptionPane.showInputDialog(\"Digite o nome do Produto:\");\n\t\tqtde = Integer.parseInt(JOptionPane.showInputDialog(\"Digite a quantidade:\"));\n\t\tvalor = Double.parseDouble(JOptionPane.showInputDialog(\"Digite o Valor:\"));\n\t\t\n\t\ttotal = valor * qtde;\n\t\ttotal_desc = ((valor / qtde ) * desc );\n\t\tSystem.out.println(\"Produto + Total: \" + produto.toUpperCase() + \" \" + total) ;\n\t\tSystem.out.println(\"\\nTotal com desconte de 10%: \" + total_desc) ;\n\n\t}", "public void submitOrder() {\n int price = quantity*5;\n displayPrice(price);\n }", "public static void printOffers() {\r\n\t\tSystem.out.println(\"\\nOffers Available are:\\n\");\r\n\t\tSystem.out.println(\"If Total Price is >= 1000 then discount = 2%\");\r\n\t\tSystem.out.println(\"If Total Price is >= 2000 then discount = 4%\");\r\n\t\tSystem.out.println(\"If Total Price is >= 3000 then discount = 5%\");\r\n\t\tSystem.out.println(\"On every purcahse of 1000rs 10 points will be added to your account \");\r\n\t\tSystem.out.println();\r\n\t}", "public void rateMovie()\n {\n movieRate = UI.askString(\"Movie Title: \");\n movieRate = movieRate.toLowerCase();\n // Loop to check if the entered movie exists\n while (again) \n {\n // Checks if the movie exists\n if (r.movieExists(movieRate) == false)\n {\n UI.println(\"That movie does not exist\");\n movieRate = UI.askString(\"Movie Title: \");\n } \n else \n {\n again = false;\n }\n }\n again = true;\n // Loop to check if the rating is 0-10\n while (again) \n {\n double rating = UI.askDouble(\"Rating: \");\n try\n {\n if (rating < 0 || rating > 10) \n {\n throw new ArithmeticException();\n } \n else \n {\n r.rateMovie(movieRate, rating);\n again = false;\n }\n }\n \n catch (ArithmeticException ae) \n {\n UI.println(\"Please enter a number 0-10\");\n }\n \n catch (Exception e) \n {\n UI.println(\"Please enter a number 0-10\");\n }\n }\n again = true;\n }", "public static void main(String[] args) {\n\t\tdouble iva=0.21;\n\t\tString precio=JOptionPane.showInputDialog(\"Introduce el precio:\");\n\t\tdouble precioFinal=(Double.parseDouble(precio)*iva)+Double.parseDouble(precio);\n\t\t\n\t\tJOptionPane.showMessageDialog(null,\"el iva en este producto es: \" \n\t\t+ Double.parseDouble(precio)*iva);\n\t\t\n\t\tJOptionPane.showMessageDialog(null,\"el precio final con iva es: \" \n\t\t+ precioFinal);\n\n\n\t}", "public void confirmBooking(){\n double ticketPrice = 56.0;\n double mealPrice = 30.0;\n if (student || child )\n ticketPrice = ticketPrice/2;\n else\n ticketPrice = ticketPrice*0.8;\n \n if (child )\n mealPrice = mealPrice/2;\n else\n mealPrice = mealPrice*0.9;\n double totalPrice = ticketPrice + mealPrice;\n System.out.println(getName()+\"\\nTicket price:$\"+ticketPrice+\"\\nMeal Price:$\"+mealPrice+\"\\nTotal price:$\"+totalPrice+\"\\nConfirm booking for \"+getName()+\" (Y/N)\");\n setBooked();\n System.out.println(getBooked()+\"\\n\\n\");\n }", "public Integer getPrice(VideoTypeEnum videoTypeId);", "double calculatePrice(VehicleType vehicleType, Date entryTime, Date exitTime);", "public static void main(String[] args){\n\t\t \n\t\t Receipt.Money price = new Receipt(\"网球拍\",7).new Money(1500000,0.7F);\n\t\t price.print();\n\t }", "int getPrice();", "@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\tdouble investment = Double.parseDouble(txtInv.getText());\r\n\tint year = Integer.parseInt(txtYr.getText());\r\n\tdouble interest = Double.parseDouble(txtRt.getText());\r\n\tif(e.getSource() == btnCal)\r\n\t{\r\n\tdouble res = invest * Math.pow((1 + interest/100), (year));\r\n\tSystem.out.println((10000 *\r\n\tMath.pow((3.25 + 1),36)));\r\n\ttxtRes.setText(String.valueOf(res));\r\n\t}\r\n\t}", "public Ticket(String name, javax.money.MonetaryAmount price, Festival festival){\n this.name = name;\n this.price = price;\n this.festival = festival;\n }", "private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}", "private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble investment = Double.parseDouble(Inv_amount.getText());\r\n\t\t\t\tdouble years = Double.parseDouble(YEARS.getText());\r\n\t\t\t\tdouble annual_interest_rate = Double.parseDouble(RATE.getText());\r\n\t\t\t\tCalculate total = new Calculate();\r\n\t\t\t\tcalc_total = total.get_future(investment, years, annual_interest_rate);\r\n\t\t\t\tFUTURE.setText(\"$\" +calc_total);\t\r\n\t\t\t}", "public static void main(String[] args) {\n \n //variables\n String event, month, day, year, date, hour, min, time, \n section, row, seat, price, discount, cost, prize; \n double priceNum, discountNum, costNum, prizeNum;\n \n //getting input from user\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Enter your event code: \");\n String userInput = scan.nextLine().trim();\n System.out.println();\n \n //if statement\n if (userInput.length() < MIN_LENGTH) {\n \n System.out.println(\"Invalid Event Code.\\n\"\n + \"Event code must have at least 26 characters.\");\n \n } else {\n \n event = userInput.substring(25, userInput.length());\n month = userInput.substring(0, 2);\n day = userInput.substring(2, 4);\n year = userInput.substring(4, 8);\n date = month + \"/\" + day + \"/\" + year;\n hour = userInput.substring(8, 10);\n min = userInput.substring(10, 12);\n time = hour + \":\" + min;\n section = userInput.substring(19, 21);\n row = userInput.substring(21, 23);\n seat = userInput.substring(23, 25);\n \n //setup formatters\n DecimalFormat dfPrice = new DecimalFormat(\"$#,##0.00\");\n DecimalFormat dfDiscount = new DecimalFormat(\"0%\");\n DecimalFormat dfPrize = new DecimalFormat(\"0000\");\n \n //price\n price = userInput.substring(12, 17);\n priceNum = Double.parseDouble(price);\n priceNum = priceNum / 100;\n price = dfPrice.format(priceNum);\n \n //discount\n discount = userInput.substring(17, 19);\n discountNum = Double.parseDouble(discount);\n discountNum = discountNum / 100;\n discount = dfDiscount.format(discountNum);\n \n //cost\n costNum = priceNum - (priceNum * discountNum);\n cost = dfPrice.format(costNum);\n \n //prize number\n prizeNum = (Math.random() * 10000) + 1;\n prize = dfPrize.format(prizeNum);\n \n \n //print statements\n System.out.print(\"Event: \" + event + \" Date: \" \n + date + \" Time: \" + time + \"\\n\"\n + \"Section: \" + section + \" Row: \" \n + row + \" Seat: \" + seat + \"\\n\"\n + \"Price: \" + price + \" Discount: \" \n + discount + \" Cost: \" + cost + \"\\n\"\n + \"Prize Number: \" + prize); \n }\n \n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tProduct item1 = new Product(\"Toaster\", 29.95);\n\t\tSystem.out.print(item1.getName());\n\t\tSystem.out.println(item1.getPrice());\n\t\tProduct item2 = new Product(\"Coffee Maker\", 19.95);\n\t\tSystem.out.print(item2.getName());\n\t\tSystem.out.println(item2.getPrice());\n\t\tSystem.out.println(1+2+3+4);\n\t\t\n\t\tString itemName = JOptionPane.showInputDialog(null, \"Please input the name of the item\");\n\t\tString itemPrice = JOptionPane.showInputDialog(null, \"Please input the price of the item\");\n\t\t\n\t\tdouble item3Price = Double.parseDouble(itemPrice);\n\t\t\n\t\tProduct item3 = new Product(itemName, item3Price);\n\t\titem1.reducePrice(5.00);\n\t\tSystem.out.println(item1.getPrice());\n\t\titem2.reducePrice(5.00);\n\t\tSystem.out.println(item2.getPrice());\n\t\tSystem.out.println(itemName);\n\t\tSystem.out.println(itemPrice);\n\t\titem3.reducePrice(5.00);\n\t\tSystem.out.println(item3.getPrice());\n\t\t\n\n\t}", "public static void main (String [] args)\n {\n DecimalFormat mine = new DecimalFormat(\"$#,##0.00\");\n String name = \"\" ;\n String product = \" \";\n char choice = ' ';\n char prod;\n int qty = 0;\n int count = 0;\n double cost_of_product=0.0;\n double cost_of_shipment = 0.0;\n char deliveryType;\n double total_cost_of_product = 0.0;\n int total_Gizmo = 0;\n int total_Widget = 0;\n double total_Cost = 0;\n double total_Gizmo_Cost = 0;\n double total_Widget_Cost = 0; // list of variables\n\n System.out.print(\"Please enter your name: \");\n name = GetInput.readLine(); //customer enters name\n\n do {\n System.out.print(\"What product would you like to order (W/G): \");\n product =GetInput.readLine();\n prod = Character.toUpperCase(product.charAt(0));\n prod = validateProduct(prod); //validate W or G\n if(prod == 'W')\n {\n System.out.print(\"What quantity of Widgets do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = widgetQty(qty);\n\n }\n else\n {\n System.out.print(\"What quantity of Gizmos do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = gizmoQty(qty);\n } //qty of widgets/gizmos\n\n cost_of_product = Orders.productCost(qty, prod); //connecting TestOrders and Orders\n\n System.out.print(\"What shipping method would you like (F/U)?: \");\n deliveryType = Character.toUpperCase(GetInput.readLineNonwhiteChar());\n deliveryType = validateShipping(deliveryType); //selecting F or U shipping\n\n cost_of_shipment = Orders.shippingCost(qty, prod, deliveryType);\n //connecting TestOrders and Orders\n\n System.out.println(\"\\nCustomer: \" + name );//Detail report\n System.out.println(\"Ordered \" + qty +\" \"\n +(prod == 'W' ? \"Widgets \":\"Gizmos \") + \"costing \" + mine.format(cost_of_product) + \".\");\n System.out.println(\"Shipped via \"+ (deliveryType =='F' ? \"Fred \":\"USPS \")\n + \"costing \" + mine.format(cost_of_shipment) + \".\");\n\n total_cost_of_product = Orders.totalCost(cost_of_product, cost_of_shipment);\n //connecting TestOrders and Orders\n\n System.out.println(\"Total order cost is \" + mine.format(total_cost_of_product));\n\n count = count + 1; // order counter\n\n if(prod =='G')\n {\n total_Gizmo = total_Gizmo + qty;\n total_Gizmo_Cost = total_Gizmo_Cost + total_cost_of_product;\n }\n else\n {\n total_Widget = total_Widget + qty;\n total_Widget_Cost = total_Widget_Cost + total_cost_of_product;\n }\n\n total_Cost = total_Cost + total_cost_of_product;\n\n System.out.println(\"\\nDo you wish to make another order?: \");\n choice = GetInput.readLineNonwhiteChar(); //user enters Y/N to continue\n }while ((choice == 'Y') || (choice == 'y')); // end of do/while loop\n\n System.out.println(\"\\nSummary Report\"); //summary report\n System.out.println(count + \" Total Orders\");\n System.out.print(\"Total quantity of Gizmos ordered: \" + total_Gizmo\n + \" at a cost of \" + mine.format(total_Gizmo_Cost) );\n System.out.print(\"\\nTotal quantity of Widgets ordered: \" + total_Widget\n + \" at a cost of \" + mine.format(total_Widget_Cost));\n System.out.println(\"\\nTotal sales amount: \" + mine.format(total_Cost));\n }", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "double GetTaskPrice(int Catalog_ID);", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan;\n\t\tString sale;\n\t\tdouble price;\n\t\tdouble discount = 50;\n\t\tdouble finalPrice = 500;\n\t\t scan =new Scanner(System.in);\n\t\t \n\t\t System.out.println(\"any sales?\");\n\t\t String sales = scan.nextLine();\n\t\t\n\t\t if(sales.equalsIgnoreCase(\"Yes\")) {\n\t\t System.out.println(\"What is the price?\");\n\t\t price = scan.nextDouble();\n\t\t scan.close();\n\t\t if(price<20) {\n\t\t discount = price*0.1;\n\t\t finalPrice = price-discount;\n\t\t }else if(price>20 && price<100) {\n\t\t discount = price*0.2;\n\t\t finalPrice = price-discount;\n\t\t }else if(price>100 && price<500) {\n\t\t discount = price*0.3;\n\t\t finalPrice = price-discount;\n\t\t }else if(price>500) {\n\t\t discount = price*0.5;\n\t\t finalPrice = price-discount;\n\t\t }\n\t\t System.out.println(\"have discount \" + discount + \". total price is \" + finalPrice);\n\t\t }else{\n\t\t System.out.println(\"We are not going shopping\");\n\t\t }\n\t\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public int calculatingPrice(MovieBean mbean,int seatsAvailable, int seatsNeeded, Date utildate,String classtype) throws SQLException, ClassNotFoundException{\n\t\treturn tImpl.calculatingPrice(mbean,seatsAvailable, seatsNeeded,utildate, classtype);\r\n\t}", "String getPrice();", "public static void main(String[] args) {\n Scanner op=new Scanner(System.in);\r\n byte s=1;\r\n byte c;\r\n double n=0.0, t=0.0;\r\n \r\n System.out.println(\"Bienvenidos\");\r\n System.out.println(\"¿Cauntos productos desea registrar?\");\r\n c=op.nextByte();\r\n \r\n do{\r\n System.out.println(\"Ingrese el precio del producto\" + s);\r\n n=op.nextDouble();\r\n t=t+n;\r\n \r\n s++;\r\n \r\n\t}while(s<=c);\r\n \r\n System.out.println(\"El monto total es: \"+t);\r\n \r\nif(t>=1500){\r\n\tt=t*1.11;\r\n}else{\r\n\tt=t*1.10;\r\n}\r\nSystem.out.println(\"El precio total es: \"+t);\r\n}", "private static BookingFilm filmSelection()\n\t{\n\t\t//prints out the name of the movies\n\t\tSystem.out.println(\"Which film would you like to watch:\");\n\t\tSystem.out.println(\"1 Suicide Squad rating: (M)\");\n\t\tSystem.out.println(\"2 Batman vs Superman rating: (P)\");\n\t\tSystem.out.println(\"3 Zootopia rating: (G)\");\n\t\tSystem.out.println(\"4 Deadpool rating: (M)\");\n\t\t\n\t\t//new scanner\n\t\tScanner input = new Scanner(System.in);\n\t\t//variable to choose the moovie number on the list\n\t\t//-1 because the array starts on 0\n\t\tint movieNumber = input.nextInt() - 1;\n\t\t\n\t\t//constructor with all the information for the movie\n\t\tBookingFilm aMovie = new BookingFilm(films[movieNumber].getTitle(), films[movieNumber].getRating());\n\t\t\n\t\t//returns the correct movie\n\t\treturn\n\t\t\t\taMovie;\n\t}", "public static void main(String[] args){\n\t\tLunchBox economy = new LunchBox();\n\t\teconomy.add(new Rice(200));\n\t\teconomy.add(new Cabbage(100));\n\t\teconomy.add(new PorkRib(250));\n\t\t//設定變數值\n\t\teconomy.setPriceRatio(1.2);\n\t\tSystem.out.println(\"Total calories of an economy lunch box are \" + economy.getCalorie());\n\t\tSystem.out.println(\"The price of an economy lunch box is \" + economy.getPrice());\n\t\t\n\t\tLunchBox valuedChoice = new LunchBox();\n\t\tvaluedChoice.add(new Rice(200));\n\t\tvaluedChoice.add(new Egg(30));\n\t\tvaluedChoice.add(new Carrot(100));\n\t\tvaluedChoice.add(new PorkRib(300));\n\t\tvaluedChoice.setPriceRatio(1.3);\n\t\tSystem.out.println(\"Total calories of a valued-choice lunch box are \" + valuedChoice.getCalorie());\n\t\tSystem.out.println(\"The price of an valued-choice lunch box is \" + valuedChoice.getPrice());\n\t\t\n\t\t//EX4\n\t\tSystem.out.println(\"便當economy比便當valued-choice更便宜嗎?\" + (LunchBox.isCheaperThan(economy, valuedChoice)?\"是\":\"否\"));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter your amount of money\");\n\t\tint money = scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter the price of a wing\");\n\t\tint wing = scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"You can buy \" + money/wing + \" wings\");\n\n\t\t\n\t\t// System.out.println((int)(money/wing)+\" Wing you can buy\");\n\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan;\n\t\tdouble salesAmount;\n\t\tdouble commission;\n\t\t\n\t\tscan= new Scanner(System.in);\n\t\tSystem.out.println(\" please enter your sales amount\");\n\t\tsalesAmount=scan.nextDouble();\n\t\t\n\t\tif(salesAmount>=1 && salesAmount<100) {\n\t\t\t//lets give user 10% commision of a sale\n\t\t\tcommission=salesAmount*0.1;\n\t\t}else if(salesAmount>=100 && salesAmount <200) {\n\t\t\t//lets give user 20% commision of a sale\n\t\t\tcommission=salesAmount*0.2;\n\t\t}else if(salesAmount>=200 && salesAmount<500) {\n\t\t\t// lets give user 30% commision of a sale\n\t\t\tcommission=salesAmount*0.3;\n\t\t}else if(salesAmount>=500) {\n\t\t\t//lets give user 50% commision of a sale\n\t\t\tcommission=salesAmount*0.5;\n\t\t}else {\n\t\t\tcommission=0;\n\t\t}\n\t\tSystem.out.println(\"Based on the sales your commision is \"+commission);\n\t}", "public static void main(String[] args)\n\t\t\t{\n\t\t\t\tScanner enter = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Please enter your condominium selection:\\n1 - Park View\\n2 - Golf \" +\n\t\t\t\t \"Course View\\n3 - Lake View\");\n\t\t\t\tcondoSelection = enter.nextInt();\n\t\t\t\tboolean invalidResponse = (condoSelection > 3 || condoSelection < 0);\n \n \n\t\t\t\tif (condoSelection == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = PARKVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(park + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (condoSelection == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = GOLFVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(golf + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (condoSelection == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = LAKEVIEW_PRICE;\n\t\t\t\t\t\tSystem.out.println(lake + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t\telse if (invalidResponse)\n\t\t\t\t\t{\n\t\t\t\t\t\tsalesPrice = 0;\n\t\t\t\t\t\tSystem.out.println(invalidSelection + String.format( \"%.2f\", salesPrice ));\n\t\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) {\n\t\t// create a Scanner for user input\n\t\tScanner input = new Scanner(System.in);\n\t\t//sets the variables for the labour and energy cost\n\t\tfinal double labour = 0.75;\n\t\tfinal double POWER_COST = 0.99;\n\t\tfinal double SIZE_COST = 0.50;\n\t\t//Prompt the user for what size of pizza they want \n\t\tSystem.out.println(\"What is the size of the pizza (in cm):\");\n\t\t//gets the size of pizza from user \n\t\tint pizzaSize = input.nextInt();\n\t\t//calculates the subtotal of the pizza\n\t\tdouble subtotal = pizzaSize * SIZE_COST + labour + POWER_COST;\n\t\t//outputs the message to the user about their subtotal\n\t\tSystem.out.println(\"Subtotal: $\" + subtotal);\n\t\t//calculates the tax \n\t\tdouble tax = subtotal * 0.13;\n\t\t//outputs the taxes to the user\n\t\tSystem.out.println(\"Taxes: $\" + tax);\n\t\t//calculates the total of the user\n\t\tdouble total = subtotal + tax;\n\t\t//outputs the total to the user\n\t\tSystem.out.println(\"Total: $\" + total);\n\t\t//according to the size of the pizza it outputs a specific message \n\t\tif (pizzaSize <= 20 && pizzaSize >= 1){\n\t\t\t//outputs this message if the pizza size is between 1 and 20cm\n\t\t\tSystem.out.println(\"We are going to make you a cute little pizza!\");\n\t\t\t} else if (pizzaSize <= 40 && pizzaSize > 20) {\n\t\t\t//outputs this message if the pizza size is between 40 and 20cm\n\t\t\tSystem.out.println(\"This will be delicious!\");\n\t\t\t} else if (pizzaSize > 40) {\n\t\t\t//outputs this message if the pizza sice is greater than 40\n\t\t\tSystem.out.println(\"Whoa, big pizza! You might need a truck to get this home!\");\n\t\t\t} else {\n\t\t\t//outputs this message if value is in negative or 0\n\t\t\tSystem.out.println(\"Invalid values entered please try again\");\n\t\t\t\t}\n\t}", "@Test\n\tpublic void priceTest(){\n\t\tMyFoodora myFoodora = new MyFoodora();\n\t\tmyFoodora.load();\n\t\tRestaurant rest = myFoodora.getListRestaurant().get(0);\n\t\ttry{\n\t\tOrder order = new Order(myFoodora.getListCustomer().get(0), rest);\n\t\torder.AddMealToOrder(\"basic\",1); //Basic is the meal of the week\n\t\torder.getCustomer().setFidelityCard(\"lotteryfidelitycard\");\n\t\torder.getBill();\n\t\tmyFoodora.getListCourier().get(0).setAcceptProbability(1); //To be sure that the order is always accepted in the test\n\t\tmyFoodora.setCourierToOrder(order);\n\t\tmyFoodora.closeOrder(order);\n\t\tassertTrue(order.getPrice()== ((double) Math.round(0.95*(2.3+6.7+2.5) * 100))/100 ||order.getPrice()==0);}\n\t\t\n\t\tcatch(NoCourierFoundToDeliver e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(OrderNotCompletException e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(ItemDoesNotExist e){\n\t\t\te.getMessage();\n\t\t}\n\t\tcatch(FidelityCardDoesNotExistException e){\n\t\t\te.getMessage();\n\t\t}\n\t}", "double checkout() {\n\t\tdouble total = 0;\n\t\tfor (Fruit item : fruitList){\n\t\t\ttotal += item.getPrice();\t\n\t\t}\t\n\t\t\n\t\t// Apply offers and calculate total\n\t\tdouble discountGetOneFree = Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Apple() );\n\t\tdiscountGetOneFree += Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Banana() );\n\t\tdouble discountThreeForTwo = Offer.getOfferThreeForTwo(getFruitNameList(), new Orange() );\n\t\tdiscountThreeForTwo += Offer.getOfferThreeForTwo(getFruitNameList(), new Melon() );\t\t\n\t\tdouble discountCheapestForFree = Offer.cheapestFruitForFree(getFruitList());\n\t\ttotal += - discountGetOneFree - discountThreeForTwo - discountCheapestForFree;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#,##0.00\");\n\t\t// Print out the total cost and saving\n\t\tSystem.out.println(String.format(\"£ %s Total cost\", df.format(total)));\n\t\tif (discountGetOneFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Buy One Get One Free ***\", df.format(discountGetOneFree)));\n\t\tif (discountThreeForTwo > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** 3 for the price of 2 ***\", df.format(discountThreeForTwo)));\n\t\tif (discountCheapestForFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Cheapest for free ***\", df.format(discountCheapestForFree)));\n\t\t\t\t\t\n\t\treturn total;\t\t\n\t}", "public static void display(String title, String ticketNumber, int hours, double price, String vehicleType) {\n //Control objects declarations and assignments\n \n Stage customerReceipt = new Stage();\n \n customerReceipt.initModality(Modality.APPLICATION_MODAL);\n customerReceipt.setTitle(title);\n customerReceipt.setMinWidth(500);\n customerReceipt.setMinHeight(500);\n totalPrice = price;\n \n Label labelTicketPurchased = new Label(\"Receipt:\");\n Label labelTicketNumber = new Label(\"Ticket Number: \" + ticketNumber);\n Label labelVehicleType = new Label(\"Vehicle Type: \" + vehicleType);\n Label labelTotalHours = new Label(\"Total Hours: \" + hours);\n Label labelTotalPrice = new Label(\"Total Price: $\" + price);\n Label labelPaidPrice = new Label(\"Paid Price: $\" + totalPrice);\n Label labelPrintTicket = new Label(\"Please take picture \\nif asked by attendant\");\n \n Button buttonExit = new Button(\"Exit\");\n canvasReceipt.setStyle(\"-fx-background-color: white\");\n \n //Button click lambda events\n buttonExit.setOnAction(e -> {\n customerReceipt.close();\n });\n \n //VBox creation and node additions\n VBox vboxReceiptInfo = new VBox(10);\n vboxReceiptInfo.setPadding(new Insets(10, 10, 10, 10));\n \n vboxReceiptInfo.getChildren().addAll(labelTicketPurchased, labelTicketNumber, labelVehicleType, labelTotalHours, labelTotalPrice, labelPaidPrice, buttonExit, labelPrintTicket);\n \n //VBox addition to canvasReceipt\n canvasReceipt.getChildren().addAll(vboxReceiptInfo);\n \n //Scene assignment\n Scene customerReceiptScene = new Scene(canvasReceipt);\n customerReceipt.setScene(customerReceiptScene);\n customerReceipt.show();\n }", "public static void main(String[] args)\r\n {\n pricing(PriceProcessConst.operationName);\r\n }", "public float calculatePrice(Airline flight, String type, int baggage);", "public void discountPrices()\n {\n System.out.print( \"Enter amount of purchases: \" );\n int cost = scan.nextInt();\n int discount = cost - cost / 10;\n if ( cost > 1000 )\n {\n System.out.print( \"Discounted price: \" + discount );\n }\n else\n {\n System.out.print( \"Discounted price: \" + cost );\n }\n\n }", "public static void main(String[] args) {\n var balance = MoneyRound.roundToXPlaces(sayThenGetDouble(\"What is your balance? \"),\n PRECISION_TO_ROUND_TO);\n //Then, do the same with the APR and monthly payment. (Divided APR when first gotten)\n var apr = sayThenGetDouble(\"What is the APR on the card (as a percent)? \") / DOUBLE_TO_PERCENT_DIVISOR;\n var monthlyPayment = MoneyRound.roundToXPlaces(\n sayThenGetDouble(\"What is the monthly payment you can make? \"), PRECISION_TO_ROUND_TO);\n System.out.print(\"\\n\");\n //Newline here for better text formatting.\n //Then, call calculateMonthsUntilPaidOff from the PaymentCalculator class.\n var payCalc = new PaymentCalculator(apr, balance, monthlyPayment);\n var monthsUntilPaidOff = payCalc.calculateMonthsUntilPaidOff();\n //Finally, return the amount of months until the card is paid off.\n System.out.println(\"It will take you \" + monthsUntilPaidOff + \" months to pay off this card.\");\n\n\n }", "public static void main (String[] args) {\n\t\t\n\t\t\n\t\tScanner inp = new Scanner(System.in);\n\t\tSystem.out.println(\"Is there a sale? True or False\");\n\t\tboolean sale = inp.nextBoolean();\n\t\t\n\t\t\n\t double discount;\n\t\tdouble finalPrice;\n\t\tdouble price;\n\t\t\n\t\tif (!sale) {\n\t\t\tSystem.out.println(\"I am not shopping\");\n\t\t}else {\n\t\t\tSystem.out.println(\"What is the actual price?\");\n\t\t\tprice = inp.nextDouble();\n\t\t\t\n\t\tif (price<20) {\n\t\t\tdiscount = price *0.10;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=20 && price<=100) {\n\t\t\tdiscount = price *0.20;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=100 && price<=500) {\n\t\t\tdiscount = price *0.30;\n\t\t\t//finalPrice = price - discount;\n\t\t} else {\n\t\t\tdiscount = price *0.50;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t finalPrice = price - discount;\n\t\t\t\nSystem.out.println(\"After discount \"+discount+\" the price of the item reduce from \"+price+\" to \"+finalPrice);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void printPrice(Menue m){\n System.out.println(m.getPrice());\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int threeD1 = scan.nextInt();\n int luxury1 = scan.nextInt();\n int numSeats = scan.nextInt();\n boolean threeD = false;\n boolean luxury = false;\n if(threeD1 == 1)\n threeD = true;\n if(luxury1 == 1)\n luxury = true;\n Theater t = new Theater(threeD, luxury, numSeats);\n\n String dummy = scan.nextLine(); // throw away new line character\n String title = scan.nextLine();\n t.setTitle(title);\n\n int basePrice = scan.nextInt();\n t.setBasePrice(basePrice);\n\n int N = scan.nextInt();\n for(int i = 0; i < N; ++i) {\n int numberOfSeats = scan.nextInt();\n int seatNumber = scan.nextInt();\n int totalPrice;\n if(numberOfSeats == 1)\n totalPrice = t.reserveOne(seatNumber);\n else\n totalPrice = t.reserveMultiple(numberOfSeats, seatNumber);\n if(totalPrice > 0)\n System.out.println(totalPrice);\n }\n\n t.printInfo();\n }", "public static void main(String[] arg) {\n\t\tint cinema;\n\t\tint player;\n\t\tint computer;\n\t\tint total_i;\n\t\tdouble total_d;\n\t\tdouble inTheater;\n\t\tdouble outTheater;\n\t\t\n\t\tTextIO.putln(\"Welcome. We're interested in how people are watching movies this year.\\nThanks for your time. - The WRITERS GUILD OF AMERICA.\\nPlease tell us about how you've watched movies in the last month.\");\n\t\tTextIO.putln(\"How many movies have you seen at the cinema?\");\n\t\tcinema = TextIO.getlnInt();\n\t\tTextIO.putln(\"How many movies have you seen using a DVD or VHS player?\");\n\t\tplayer = TextIO.getlnInt();\n\t\tTextIO.putln(\"How many movies have you seen using a Computer?\");\n\t\tcomputer = TextIO.getlnInt();\n\t\tTextIO.put (\"Summary: \" + cinema + \" Cinema movies, \" + player + \" DVD/VHS movies, \" + computer + \" Computer movies\\n\");\n\t\ttotal_i = cinema + player + computer;\n\t\ttotal_d = total_i;\n\t\tTextIO.putln(\"Total: \" + total_i + \" movies\");\n\t\tinTheater = (cinema / total_d) * 100;\n\t\toutTheater = ((player + computer) / total_d) * 100;\n\t\tTextIO.put(\"Fraction of movies seen at a cinema: \");\n\t\tTextIO.putf(\"%.2f\", inTheater);\n\t\tTextIO.put(\"%\");\n\t\tTextIO.put(\"\\nFraction of movies seen outside of a cinema: \");\n\t\tTextIO.putf(\"%.2f\", outTheater);\n\t\tTextIO.put(\"%\");\n\t}", "public float calculate(Ticket t) {\n\t}", "public static void main(String[] args) {\n CarPark park = new CarPark () ;\r\n \r\n Scanner input = new Scanner (System.in) ;\r\n \r\n System.out.println(\"how many customers parked in the garage yesterday ???\");\r\n int number = input.nextInt() ;\r\n \r\n System.out.println(\"How many hours did each customer use ?\" ) ;\r\n for (int counter = 1 ; counter < number+1 ; counter ++) {\r\n \r\n double hour = input.nextDouble() ;\r\n park.CalculateCharges(hour) ;\r\n System.out.printf(\"The charge for yesterday's customer\"+counter+\" was : $ %.2f %n\" , park.charges );\r\n park.charge +=park.charges ;\r\n }\r\n System.out.printf(\"The total charge for yesterday was $ %.2f %n %n\", park.charge );\r\n \r\n //end of yesterday's charge calculation\r\n System.out.println(\"how many customers are parking in the Park today ???\");\r\n int num = input.nextInt() ;\r\n System.out.println(\"Enter the hours used so far for today's customer \") ;\r\n for (int count = 1 ; count < num+1 ; count ++) {\r\n \r\n double h = input.nextDouble() ;\r\n park.CalculateCharges(h);\r\n System.out.printf(\"The charges for today's customer \" +count +\" is $ %.2f %n\", park.charges); \r\n }\r\n \r\n \r\n }", "public static void main(String[] args) {\n\n int offerCnt = 3 ;\n\n int corollaMileage ;\n corollaMileage = 5000;\n\n int TVsize = 67;\n System.out.println(TVsize);\n\n\n System.out.println(offerCnt);\n System.out.println( corollaMileage );\n\n\n // name your favorite number\n // name your classmate count\n\n\n int my$FavoriteNumber = 4;\n int myClassmate_Count =270;\n\n System.out.println(my$FavoriteNumber );\n System.out.println(myClassmate_Count );\n\n\n int my$FolderCount = 6;\n my$FolderCount = 10;\n my$FolderCount = 100; // the last value win\n\n System.out.println(my$FolderCount); // poluchitsya 100\n\n\n\n\n }" ]
[ "0.7598939", "0.72347784", "0.67460555", "0.66450036", "0.65566134", "0.6472819", "0.63864243", "0.6234903", "0.6168376", "0.6139632", "0.61069304", "0.6091108", "0.6084928", "0.60696703", "0.6067765", "0.60206467", "0.5979592", "0.5978621", "0.5971704", "0.5959092", "0.5882274", "0.58621645", "0.584915", "0.58370286", "0.58329475", "0.58245283", "0.58232176", "0.58074534", "0.5802352", "0.57951033", "0.5777059", "0.57459915", "0.5739611", "0.57330644", "0.5732578", "0.5720445", "0.5719854", "0.5716708", "0.57085407", "0.5706992", "0.57060975", "0.57060975", "0.57060975", "0.5700304", "0.569396", "0.5652146", "0.5646327", "0.56323975", "0.5626074", "0.5625341", "0.56245935", "0.56169933", "0.56079376", "0.5605595", "0.5604124", "0.5603171", "0.55992407", "0.5588904", "0.55855656", "0.55747974", "0.55680275", "0.5565623", "0.55637515", "0.55418503", "0.5533339", "0.5532961", "0.5525444", "0.55165994", "0.5514485", "0.5491529", "0.5489475", "0.54644144", "0.5461806", "0.54610956", "0.5457829", "0.5446921", "0.5446849", "0.5444787", "0.5434023", "0.54300934", "0.5429791", "0.5428447", "0.54225683", "0.54176086", "0.5417319", "0.5412666", "0.5411677", "0.5408001", "0.54002154", "0.5388247", "0.5387872", "0.5386531", "0.53864044", "0.53806764", "0.53770584", "0.5374123", "0.53739136", "0.5372966", "0.5368486", "0.53641546" ]
0.6576715
4
Testing method: instantiates a Lesson15Exercises object and then invokes each method.
public static void main( String[] args ) { Scanner kbd = new Scanner( System.in ); boolean done = false; Ch12Ex1to9 exercise = new Ch12Ex1to9(); do { System.out.println(); System.out.println(); System.out.println( "Make a selection" ); System.out.println(); System.out.println( " (1) Discount Prices" ); System.out.println( " (2) Order Checker" ); System.out.println( " (3) Last Chance Gas" ); System.out.println( " (4) Ground Beef Value Calculator" ); System.out.println( " (5) Y2K Problem Detector" ); System.out.println( " (6) Wind Chill Index" ); System.out.println( " (7) Your Age in Seconds" ); System.out.println( " (8) Matinee Movie Tickets" ); System.out.println( " (9) Midnight Madness" ); System.out.println( " (Q) Quit" ); System.out.println(); System.out.print( "Enter a choice: " ); String response = kbd.nextLine(); if ( response.length() > 0 ) { System.out.println(); switch ( response.charAt( 0 ) ) { case '1': exercise.discountPrices(); break; case '2': exercise.orderChecker(); break; case '3': exercise.lastChanceGas(); break; case '4': exercise.groundBeefValueCalc(); break; case '5': exercise.y2KProblemDetector(); break; case '6': exercise.windChillIndex(); break; case '7': exercise.yourAgeInSeconds(); break; case '8': exercise.matineeMovieTickets(); break; case '9': exercise.midnightMadness(); break; default: if ( response.toLowerCase().charAt( 0 ) == 'q' ) { done = true; } else { System.out.print( "Invalid Choice" ); } break; } } } while ( !done ); System.out.println( "Goodbye!" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runExercises() throws IOException {\n System.out.println(\"JDK 8 Lambdas and Streams MOOC Lesson 2\");\n System.out.println(\"Running exercise 1 solution...\");\n exercise1();\n System.out.println(\"Running exercise 2 solution...\");\n exercise2();\n System.out.println(\"Running exercise 3 solution...\");\n exercise3();\n System.out.println(\"Running exercise 4 solution...\");\n exercise4();\n System.out.println(\"Running exercise 5 solution...\");\n exercise5();\n System.out.println(\"Running exercise 6 solution...\");\n exercise6();\n System.out.println(\"Running exercise 7 solution...\");\n exercise7();\n }", "public void testExercises() {\n\t\tSystem.out.println(\"Exercise 2:\");\n\t\tSATSolver solver = get2Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exercise 5:\");\n\t\tsolver = get5Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t}", "public static void doExercise1() {\n // TODO: Complete Exercise 1 Below\n\n }", "public static void exercise10() {\n }", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }", "public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }", "public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "@Test\n public void practiceLesson() throws Exception {\n\n }", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "@Test\n public void autocreateLesson() throws Exception{\n\n }", "@Test\n public void testLesson() throws Exception {\n\n }", "public static void main(String[] args) {\n\t\tList<String> femaleFirstNames = CSVReader.getFemaleFirstNames();\r\n\t\tList<String> maleFirstNames = CSVReader.getMaleFirstNames();\r\n\t\tList<String> lastNames = CSVReader.getLastNames();\r\n\r\n\t\t// Instantiating a NameService object\r\n\t\tNameService ns = new NameService(maleFirstNames, femaleFirstNames, lastNames);\r\n\r\n\t\tList<Person> persons = new ArrayList<>();\r\n\t\t// Creating 500 random persons and adding them to a list\r\n\t\tfor (int i = 0; i < 500; i++) {\r\n\t\t\tpersons.add(ns.getNewRandomPerson());\r\n\t\t}\r\n\r\n\t\tLab theLab = new Lab(persons);\r\n\r\n\t\t// Run your exercises here\r\n\t\tboolean running = true;\r\n\t\twhile (running) {\r\n\t\t\tSystem.out.println(\"\\nRun witch one?(1-11)(0-Quit)\");\r\n\t\t\tswitch (getIntFromLimit(11, 0)) {\r\n\t\t\tcase 1:\r\n\t\t\t\ttheLab.exercise1();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\ttheLab.exercise2();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\ttheLab.exercise3();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\ttheLab.exercise4();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\ttheLab.exercise5();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\ttheLab.exercise6();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\ttheLab.exercise7();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\ttheLab.exercise8();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\ttheLab.exercise9();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\ttheLab.exercise10();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\ttheLab.exercise11();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\tdefault:\r\n\t\t\t\trunning = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Goodbye!\");\r\n\t\t\r\n\t}", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "@Test\r\n public void getRandomExercise() {\n ArrayList<String> exerList = new ArrayList<>();\r\n exerList.add(\"Exer 1\");\r\n exerList.add(\"Exer 2\");\r\n exerList.add(\"Exer 3\");\r\n exerList.add(\"Exer 4\");\r\n exerList.add(\"Exer 5\");\r\n\r\n assertEquals(2, getRandomExer.getRandomExercise(exerList,2).size());\r\n }", "private void getAllExercises() {\n getView().disableUI();\n\n // get all exercises\n doGetExercises();\n }", "@Test\n public void solve1() {\n }", "public static void doTestCase1() {\n\tRide millennium = new Ride(\"Millennium\", 6, 4.25f);\n\tRide mcCormick = new Ride(\"McCormick Place\", 5, 3.1f);\n\tRide kensington = new Ride(\"Kensington\", 4, 2.0f);\n\tRide homewood = new Ride(\"Homewood\", 2, 0);\n\tRide roosevelt = new Ride(\"Roosevelt Rd.\", 7, 4.9f);\n\t//Make a place where tickets are sold, specifiying the\n\t//number of available passes\n\tTicketBooth booth1 = new TicketBooth(4);\n\t// Make some people by specifying their height and their\n\t//money amounts\n\tPerson billy = new Person(4.9f, 10.00f);\n\tPerson donna = new Person(3.0f, 5.00f);\n\tPerson fredy = new Person(6.0f, 0.00f);\n\tPerson harry = new Person(4.8f, 78.50f);\n\tPerson jenny = new Person(2.0f, 1.00f);\n\tPerson larry = new Person(4.0f, 50.00f);\n\t//simulate a person's interactions\n\tSystem.out.println(\"Billy is a \" + billy);\n\tif (billy.buyTickets(20, booth1))\n\t\tSystem.out.println(\"Billy just bought 20 tickets.\");\n\telse\n\t\tSystem.out.println(\"Billy did not have enough money to buy 20 tickets.\");\n\tSystem.out.println(\"Billy is going on the Millennium and Roosevelt Rd....\");\n\tbilly.getOn(millennium);\n\tbilly.getOn(roosevelt);\n\tSystem.out.println(\"Billy is now a \" + billy);\n\tSystem.out.println();\n\tSystem.out.println(\"Donna is a \" + donna);\n\tif (donna.buyPass(booth1))\n\t\tSystem.out.println(\"Donna just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy a pass.\");\n\tif (donna.buyTickets(6, booth1))\n\t\tSystem.out.println(\"Donna just bought 6 tickets.\");\n\telse\n\t\tSystem.out.println(\"Donna did not have enough money to buy 6 tickets.\");\n\tSystem.out.println(\"Donna is going on the McCormick Place and Merry Go Round...\");\n\tdonna.getOn(mcCormick);\n\tdonna.getOn(homewood);\n\tSystem.out.println(\"Donna is now a \" + donna);\n\tSystem.out.println();\n\tSystem.out.println(\"Fredy is a \" + fredy);\n\tif (fredy.buyTickets(5, booth1))\n\t\tSystem.out.println(\"Fredy just bought 5 tickets.\");\n\telse\n\t\tSystem.out.println(\"Fredy did not have enough money to buy 5 tickets.\");\n\tSystem.out.println(\"Fredy is going on the Merry Go Round...\");\n\tfredy.getOn(homewood);\n\tSystem.out.println(\"Fredy is now a \" + fredy);\n\tSystem.out.println();\n\tSystem.out.println(\"Harry is a \" + harry);\n\tif (harry.buyTickets(10, booth1))\n\t\tSystem.out.println(\"Harry just bought 10 tickets.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy 10 tickets.\");\n\tif (harry.buyPass(booth1))\n\t\tSystem.out.println(\"Harry just bought a pass.\");\n\telse\n\t\tSystem.out.println(\"Harry did not have enough money to buy a pass.\");\n\tSystem.out.println(\"Harry is going on the Millennium twice and the Roosevelt Rd. Once...\");\n\tharry.getOn(millennium);\n\tharry.getOn(roosevelt);\n\tharry.getOn(millennium);\n\tSystem.out.println(\"Harry is now a \" + harry);\n\tSystem.out.println();\n\tSystem.out.println(\"Larry is a \" + larry);\n\tif (larry.buyTickets(15, booth1))\n\t\tSystem.out.println(\"Larry just bought 15 tickets.\");\n\telse\n\t\tSystem.out.println(\"Larry did not have enough money to buy 15 tickets.\");\n\tSystem.out.println(\"Larry is going on the Roosevelt Rd., Millennium and Merry Go Round...\");\n\tlarry.getOn(roosevelt);\n\tlarry.getOn(millennium);\n\tlarry.getOn(homewood);\n\tSystem.out.println(\"Larry is now a \" + larry);\n\tSystem.out.println();\n\tSystem.out.println(\"Ticket Booth 1 made $\" + booth1.getMoneyMade());\n\tSystem.out.println(\"Ticket Booth 1 has \" + booth1.getAvailablePasses()+\" passes left.\");\n\tSystem.out.println(millennium + \" and had \" + millennium.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(mcCormick + \" and had \" + mcCormick.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(kensington + \" and had \" + kensington.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(homewood + \" and had \" + homewood.getNumberOfRiders() + \" riders.\");\n\tSystem.out.println(roosevelt + \" and had \" + roosevelt.getNumberOfRiders() + \" riders.\");\n\t}", "@Override\n public void run(String... args) throws Exception {\n this.exercise6();\n }", "void actual_test_taker(String name,String rollno){\n File file_of_the_current_student= new File(\"C://Manish//The_Test_Taker//All_Text_files//Student_Record//\"+rollno+\".txt\");\n String subject;\n int chapter;\n\n //This function will read all the values of the instance variable for the quiz.\n get_values(file_of_the_current_student);\n\n //This function will display all the subjects offered to the student based on the semester in which he/she is.\n //and ask the student for the choice of the subject of which he/she wants to take the quiz.\n subject=choose_among_the_subjects_offered();\n\n //This function will display all the chapters offered in a particular subject and ask the student about his/her choice of chapter/s.\n \n chapter=choose_among_the_chapters_of_the_subject(subject,\"SEM_3\");\n if(chapter == -1){\n return;\n }\n \n \n //Now we will open the file of the chapter of the specific subject.\n File quiz_file = new File(\"C://Manish//The_Test_Taker//All_Text_files//Quizes//\"+\"SEM_3\"+\"//\"+subject+\"//\"+subject+\"_CHAPTER0\"+chapter+\".txt\");\n\n //This function will display each question one by one as per the chapter opted for.\n //Also it will store the marks of the student and will keep on calculating the final total marks of that quiz.\n int quiz_marks= taking_test(quiz_file); \n if(quiz_marks==-1){\n return;\n }\n \n //Assigning the corresponding quiz variable it's value after the test.\n switch(subject){\n case \"OOP\":\n OOP[chapter-1]=quiz_marks;\n break;\n case \"DSA\":\n DSA[chapter-1]=quiz_marks;\n break;\n case \"DE\":\n DE[chapter-1]=quiz_marks;\n break;\n }\n total_marks+=quiz_marks;\n average=total_marks/10;\n\n set_values(file_of_the_current_student);\n System.out.println(\"###############################################################################################\");\n System.out.println(\" You completed the test successfully.\");\n System.out.println(\" You got a total score of \"+quiz_marks);\n System.out.println(\"###############################################################################################\");\n //System.out.println(quiz_marks);\n\n \n\n }", "@Test\n public void test() {\n Solution solution = new Solution();\n\n }", "@Test\n public void test() {\n Solution solution = new Solution();\n\n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public void run() throws Exception {\n for (int i = 0; i < testCases.length; ++i) {\n runCase(testCases[i]);\n }\n }", "@Test\r\n\tpublic void createChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 305, null\r\n\t\t\t}, { // Content without year\r\n\t\t\t\t\"producer1\", 305, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create an content \r\n\t\t\t\t\"user3\", 305, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.createChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "@Test\n\tvoid testLectureChoixInt() {\n\t\t\n\t}", "@Test\n public void testRunScoringScenario() throws Exception\n {\n YahtzeeModel y1 = new YahtzeeModel();\n\n //Turn 1\n y1.getDiceCollection().setValues(1, 1, 3, 3, 3);\n assertEquals(2, y1.scoreOnes());\n //Turn 2\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y1.scoreTwos());\n //Turn 3\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(3, y1.scoreThrees());\n //Turn 4\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y1.scoreFours());\n //Turn 5\n y1.getDiceCollection().setValues(2, 1, 2, 2, 5);\n assertEquals(5, y1.scoreFives());\n //Turn 6\n y1.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y1.scoreSixes());\n //3 of a kind\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y1.scoreThreeOfAKind());\n //4 of a kind\n y1.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y1.scoreFourOfAKind());\n //full house\n y1.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y1.scoreFullHouse());\n //small straight\n y1.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y1.scoreSmallStraight());\n //large straight\n y1.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y1.scoreLargeStraight());\n //yahtzee\n y1.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(50, y1.scoreYahtzee());\n //chance\n y1.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y1.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(0, y1.scoreBonus());\n\n //verify that the available scoring types has one entry for YAHTZEE since it was scored\n assertEquals(1, y1.getScoreCard().getAvailableScoreTypes().size());\n assertTrue(y1.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.YAHTZEE));\n\n //verify final score\n assertEquals(151, y1.getScoreCard().getScore());\n\n\n //*** Game 2: 0 Bonus, 2 Yahtzee ***\n YahtzeeModel y2 = new YahtzeeModel();\n\n //Turn 1\n y2.getDiceCollection().setValues(1, 1, 1, 1, 1);\n assertEquals(50, y2.scoreYahtzee());\n //Turn 2\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y2.scoreTwos());\n //Turn 3\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(3, y2.scoreThrees());\n //Turn 4\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y2.scoreFours());\n //Turn 5\n y2.getDiceCollection().setValues(2, 1, 2, 2, 5);\n assertEquals(5, y2.scoreFives());\n //Turn 6\n y2.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y2.scoreSixes());\n //3 of a kind\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y2.scoreThreeOfAKind());\n //4 of a kind\n y2.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y2.scoreFourOfAKind());\n //full house\n y2.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y2.scoreFullHouse());\n //small straight\n y2.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y2.scoreSmallStraight());\n //large straight\n y2.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y2.scoreLargeStraight());\n //yahtzee\n y2.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(100, y2.scoreYahtzee());\n //chance\n y2.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y2.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(0, y2.scoreBonus());\n\n //verify that the available scoring types has two entres...\n // one for YAHTZEE and one for ONES\n assertEquals(2, y2.getScoreCard().getAvailableScoreTypes().size());\n assertTrue(y2.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.ONES));\n assertTrue(y2.getScoreCard().getAvailableScoreTypes().contains(YahtzeeScoreTypes.YAHTZEE));\n\n //verify final score\n assertEquals(249, y2.getScoreCard().getScore());\n\n //*** Game 3: 1 Bonus, 0 Yahtzee ***\n YahtzeeModel y3 = new YahtzeeModel();\n\n //Turn 1\n y3.getDiceCollection().setValues(1, 1, 1, 1, 1);\n assertEquals(5, y3.scoreOnes());\n //Turn 2\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(6, y3.scoreTwos());\n //Turn 3\n y3.getDiceCollection().setValues(3, 3, 2, 2, 3);\n assertEquals(9, y3.scoreThrees());\n //Turn 4\n y3.getDiceCollection().setValues(2, 4, 4, 4, 3);\n assertEquals(12, y3.scoreFours());\n //Turn 5\n y3.getDiceCollection().setValues(2, 5, 2, 2, 5);\n assertEquals(10, y3.scoreFives());\n //Turn 6\n y3.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(30, y3.scoreSixes());\n //3 of a kind\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(10, y3.scoreThreeOfAKind());\n //4 of a kind\n y3.getDiceCollection().setValues(2, 2, 2, 2, 2);\n assertEquals(10, y3.scoreFourOfAKind());\n //full house\n y3.getDiceCollection().setValues(6, 4, 6, 4, 6);\n assertEquals(25, y3.scoreFullHouse());\n //small straight\n y3.getDiceCollection().setValues(6, 6, 6, 6, 6);\n assertEquals(0, y3.scoreSmallStraight());\n //large straight\n y3.getDiceCollection().setValues(2, 1, 2, 2, 3);\n assertEquals(0, y3.scoreLargeStraight());\n //yahtzee\n y3.getDiceCollection().setValues(2, 1, 2, 2, 2);\n assertEquals(0, y3.scoreYahtzee());\n //chance\n y3.getDiceCollection().setValues(6, 1, 1, 1, 1);\n assertEquals(10, y3.scoreChance());\n\n //calculate bonus and verify bonus\n assertEquals(35, y3.scoreBonus());\n\n //verify that no scoring types remain\n assertEquals(0, y3.getScoreCard().getAvailableScoreTypes().size());\n\n //verify final score\n assertEquals(162, y3.getScoreCard().getScore());\n }", "public static void runAllTheTests() {\n\t\ttestConstructorAndGetters();\n\t}", "public static void runAllTheTests() {\n\t\ttestConstructorAndGetters();\n\t}", "@Test\n\tpublic static void runAllTheTests() {\n\t\ttestGetters();\n\t}", "@Test\n public void method01() {\n System.out.println(school);\n }", "public static void main(String[] args) throws IOException {\n Module2Exercises lesson = new Module2Exercises();\n lesson.runExercises();\n }", "public RunResult runTests(Path exercise) throws NoLanguagePluginFoundException {\n System.err.println(\"Path: \" + exercise.toString());\n TaskExecutorImpl taskExecutor = new TaskExecutorImpl();\n return taskExecutor.runTests(exercise);\n }", "@Test\n\tpublic void testAddHomework5() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class2\", 2017, \"HW1\");\n\t\tassertFalse(this.instructor.homeworkExists(\"Class2\", 2017, \"HW1\"));\n\t}", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Before\r\n public void setupTestCases() {\r\n instance = new ShoppingListArray();\r\n }", "@Test\r\n\tpublic void editChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 315, null\r\n\t\t\t}, { // A producer tries to edit a content of another producer\r\n\t\t\t\t\"producer1\", 315, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create a content\r\n\t\t\t\t\"user3\", 315, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.editionChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}", "public static void runTests() {\n\t\tResult result = JUnitCore.runClasses(TestCalculator.class);\n\n\t}", "public static void main(String[] args) {\n\t\tnew SATExerciseSolver().testExercises();\n\t}", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\n Learner[] learners = new Learner[2];\n learners[0] = new Student(0, \"batman\");\n learners[1] = new Student(1, \"spiderman\");\n\n Instructor instructor = new Instructor(500, \"Obama\");\n\n //instructor.lecture(learners, 3);\n instructor.teach(learners[0], 2); //outputs 2 because instructor taught for 2 hours\n System.out.println(learners[1].getTotalStudyTime()); //output 0 because this student hasnt learned anything\n\n\n }", "public synchronized void resetExercises() {\n exercises = null;\n }", "private static void runTests() {\r\n\t\tfor (int i = 0; i < testFiles.length; i++) {\r\n\t\t\tConverter file = new Converter(testFiles[i]);\r\n\t\t\tfile.convert();\r\n\t\t\tSystem.out.println(\"---------\");\r\n\t\t}\r\n\t}", "@Test\n @Disabled\n public void illTest(){\n ExerciseSotrageHandler exerciseSotrageHandler = new ExerciseSotrageHandler();\n Exercise exercise = exerciseSotrageHandler.createExercise();\n }", "@Test\n public void testingTheSixFlatbed2017Order() {\n }", "Testcase createTestcase();", "public void testGetAllTrials() {\n exp = new Experiment(\"10\");\n ArrayList<Trial> toSet = this.createTrials();\n exp.setTrials(toSet);\n assertEquals(\"getAllTrials returns wrong amount\", 15, exp.getAllTrials().size());\n assertEquals(\"getAllTrials returns wrong trial\", \"0\", exp.getAllTrials().get(0).getId());\n assertEquals(\"getAllTrials returns wrong trial\", \"14\", exp.getAllTrials().get(exp.getAllTrials().size()-1).getId());\n\n }", "@Test\n\tpublic void testAddHomework4() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class1\", 2018, \"HW1\");\n\t\tassertFalse(this.instructor.homeworkExists(\"Class1\", 2018, \"HW1\"));\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\n\r\n\t\tut1 = new UpcomingTuition(\"Alice\", \"C1\", \"English Language\", \"25 Aug 2021\");\r\n\t\tut2 = new UpcomingTuition(\"Benny\", \"C2\", \"History\", \"31 Aug 2021\");\r\n\r\n\t\tUTuition = new ArrayList<UpcomingTuition>();\r\n\r\n\t}", "private static List<TestSetup> getTests() {\n PivotPicker middlePiv = Quick::alwaysPickMiddle;\n\n // Pivot Pickers\n PivotPicker leftPiv = Quick::alwaysPickLeftmost;\n PivotPicker rightPiv = Quick::alwaysPickRightmost;\n PivotPicker motPiv = Quick::medianOfThree;\n PivotPicker[] pivots = {leftPiv, middlePiv, rightPiv, motPiv};\n String[] pivotNames = {\"Always Pick Leftmost\", \"Always Pick Middle\", \"Always Pick Rightmost\", \"Median Of Three\"};\n\n // Partitioning methods\n Partitioner jonPart = (array, left, right, pivot) -> partition_Jon(array, left, right, pivot);\n Partitioner lomutoPart = Quick::partition_Lomuto;\n Partitioner hoarePart = Quick::partition_Hoare;\n Partitioner[] partitioners = {lomutoPart, hoarePart};\n String[] partNames = {\"lomuto\", \"hoare\"};\n\n // Subsort methods and sizes\n Subsort insertionSub = Quick::insertionSort;\n Subsort[] subsorts = {insertionSub};\n String[] subsortNames = {\"insertion\"};\n List<Integer> sizes = new ArrayList<>();\n for (int i = 3; i < 128; i = 1 + (int) (i * 1.45)) {\n sizes.add(i);\n }\n Integer[] subsortSizes = sizes.toArray(new Integer[sizes.size()]);\n\n // Data generators\n Generator randomGen = (size) -> {\n return generateArray(100, 999, size);\n };\n Generator sortedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = i;\n }\n return arr;\n };\n Generator reversedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = arr.length - i;\n }\n return arr;\n };\n Generator[] generators = {\n randomGen,\n //sortedGen, reversedGen,\n //(size) -> { return generateArray(10000, 99999, size, 0xDEADBEEF); },\n //(size) -> { return generateArray(10000, 99999, size, 0xCAFEBABE); },\n //(size) -> { return generateArray(10000, 99999, size, 0xBAADF00D); },\n\n };\n String[] generatorNames = {\n \"Random\",\n //\"sorted\", \"reversed\",\n //\"Sequence:0xDEADBEEF\",\n //\"Sequence:0xCAFEBABE\",\n //\"Sequence:0xBAADF00D\",\n };\n\n // Default test data\n TestSetup defaultTest = new TestSetup(\"Default\", null, null, 0, null, null);\n\n List<TestSetup> tests = new ArrayList<>();\n tests.add(defaultTest);\n List<TestSetup> temp = new ArrayList<>();\n { // Block for creating partition method variants\n\n\n // Create variations of the test with different partitioning methods\n for (TestSetup setup : tests) {\n\n for (int i = 0; i < partitioners.length; i++) {\n TestSetup variant = new TestSetup(setup, partNames[i]);\n variant.part = partitioners[i];\n temp.add(variant);\n }\n }\n }\n\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n // Create variations of the test with different pivot picking methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < pivots.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" + \" + pivotNames[i]);\n variant.pivp = pivots[i];\n temp.add(variant);\n }\n }\n\n { // Block for creating generator (dataset) variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different data generation methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < generators.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" on \" + generatorNames[i] + \" data\");\n variant.gen = generators[i];\n temp.add(variant);\n }\n }\n }\n\n\n { // Block for creating subsort variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different subsort methods and thresholds\n for (TestSetup setup : tests) {\n temp.add(setup);\n\n for (int i = 0; i < subsorts.length; i++) {\n // And also one version for each size!\n for (int k = 0; k < subsortSizes.length; k++) {\n TestSetup variant = new TestSetup(setup, setup.name + \"+\" + subsortNames[i] + \" below \" + subsortSizes[k]);\n variant.sst = subsortSizes[k];\n variant.ssort = subsorts[i];\n //temp.add(variant);\n\n TestSetup variant_finalSort = new TestSetup(variant, variant.name + \" once at end\");\n variant_finalSort.sortFinal = true;\n temp.add(variant_finalSort);\n }\n }\n }\n }\n\n\n // Return completed variation list\n return temp;\n }", "public void testLizard(){\n }", "@Test\n\tpublic void listParadeChapterDriver() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"chapter2\", null\n\t\t\t}, {\n\t\t\t\t\"member1\", IllegalArgumentException.class\n\t\t\t}\n\t\t};\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.listParadeChapterTemplate((String) testingData[i][0], (Class<?>) testingData[i][1]);\n\t}", "@Test\n public void testExample0() {\n assertSolution(\"3\", \"example-day01-2018-0.txt\");\n }", "@Test\n public void testExample1() {\n assertSolution(\"3\", \"example-day01-2018-1.txt\");\n }", "public void test25() throws Exception {\n runTestInDirectory(\"regression\");\n }", "@Test\n\tpublic void testAllExampleGenerations() {\n\t\ttry {\n\t\t\tOdfHelper.main(null);\n\t\t} catch (Exception ex) {\n\t\t\tLOG.log(Level.SEVERE, null, ex);\n\t\t\tAssert.fail(ex.toString());\n\t\t}\n\t}", "private test5() {\r\n\t\r\n\t}", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "private void doGetExercises() {\n if (getMobileClientService() == null) {\n Log.w(TAG, \"Service is still not bound\");\n gettingAllExercisesOperationResult(false, \"Not bound to the service\", null);\n return;\n }\n\n try {\n boolean isGetting = getMobileClientService().getAllExercises();\n if (!isGetting) {\n gettingAllExercisesOperationResult(false, \"No Network Connection\", null);\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n gettingAllExercisesOperationResult(false, \"Error sending message\", null);\n }\n }", "public UnitTestData() throws Exception {\n String[] runsData = {\n \"1,1,A,1,No,No,4\", // 0 (a No before first yes Security Violation)\n \"2,1,A,1,No,No,2\", // 0 (a No before first yes Compilation Error)\n \"3,1,A,1,No,No,1\", // 20 (a No before first yes)\n \"4,1,A,3,Yes,No,0\", // 3 (first yes counts Minute points but never Run Penalty points)\n \"5,1,A,5,No,No,1\", // zero -- after Yes\n \"6,1,A,7,Yes,No,0\", // zero -- after Yes\n \"7,1,A,9,No,No,1\", // zero -- after Yes\n \"8,1,B,11,No,No,1\", // zero -- not solved\n \"9,2,A,48,No,No,4\", // 0 (a No before first yes Security Violation)\n \"10,2,A,50,Yes,No,0\", // 50 (minute points; no Run points on first Yes)\n \"11,2,B,35,No,No,1\", // zero -- not solved\n \"12,2,B,40,No,No,1\", // zero -- not solved\n };\n\n // Assign half eams random team member names\n addTeamMembers(contest, getTeamAccounts(contest).length / 2, 5);\n\n assertEquals(\"Expectig team member names\", 5, getFirstAccount(contest, Type.TEAM).getMemberNames().length);\n\n assertEquals(\"team count\", 120, contest.getAccounts(Type.TEAM).size());\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem problem = contest.getProblems()[0];\n Account judge = getFirstAccount(contest, Type.JUDGE);\n generateClarifications(contest, 20, problem, judge.getClientId(), false, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, false);\n generateClarifications(contest, 20, problem, judge.getClientId(), true, true);\n\n sampleContest.assignSampleGroups(contest, \"North Group\", \"South Group\");\n\n assertEquals(\"Runs\", 12, contest.getRuns().length);\n\n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_5()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "@Test\n public void mainFlowTest() {\n type.insert();\n engineer.insert();\n\n Equipment equipment1 = new Equipment(\"equipment1\", type.getId(), model, location, installTime1);\n Equipment equipment2 = new Equipment(\"equipment2\", type.getId(), model, location, installTime2);\n equipment1.insert();\n equipment2.insert();\n\n Plan plan1 = new Plan(\"plan1\", type.getId(), 30, \"large\", \"checking\");\n Plan plan2 = new Plan(\"plan2\", type.getId(), 60, \"small\", \"repairing\");\n plan1.insert();\n plan2.insert();\n\n Record record1 = new Record(\"r1\", plan1.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 1).getTime(), 2, \"换过滤网\");\n Record record2 = new Record(\"r2\", plan2.getId(), equipment1.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 31).getTime(), 1, \"发动机清理\");\n Record record3 = new Record(\"r3\", plan1.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2015, 11, 5).getTime(), 3, \"cleaning\");\n Record record4 = new Record(\"r4\", plan2.getId(), equipment2.getId(), engineer.getId(),\n DateUtils.getCalendar(2016, 0, 4).getTime(), 2, \"tiny repairing\");\n record1.insert();\n record2.insert();\n record3.insert();\n record4.insert();\n\n // test the correctness of 10 days tasks\n List<Task> tenDayTasks = MaintenanceOperation.getTenDaysTask(DateUtils.getCalendar(2015, 11, 30).getTime());\n assertEquals(\"wrong with 10 days' tasks\", 2, tenDayTasks.size());\n\n // test the total maintenance time\n int time1 = MaintenanceOperation.getTotalMaintenanceTime(equipment1.getId());\n assertEquals(\"wrong with total time of equipment 1\", 3, time1);\n int time2 = MaintenanceOperation.getTotalMaintenanceTime(equipment2.getId());\n assertEquals(\"wrong with total time of equipment 2\", 5, time2);\n\n // test the total maintenance time of certain type\n int time3 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time3);\n int time4 = MaintenanceOperation.getTotalMaintenanceTime(equipment1, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 1, time4);\n int time5 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan1.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 3, time5);\n int time6 = MaintenanceOperation.getTotalMaintenanceTime(equipment2, plan2.getId());\n assertEquals(\"wrong with total time of equipment 1 of plan 1\", 2, time6);\n }", "@Test\n public void testGetElections() {\n testSetElections();\n }", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "@Test\n public void testGetQuizzes()\n {\n \n final int numberOfAc31007Quizzes = 5;\n final int numberOfAc31007LiveQuizzes = 2;\n \n LoggedIn staff = new LoggedIn();\n staff.setUsername(\"AGILE MASTER\");\n staff.setUserType(\"Staff\");\n LoggedIn student = new LoggedIn();\n student.setUsername(\"Carsten Cheyne\");\n student.setUserType(\"Student\");\n \n Quiz quizJava = new Quiz();\n quizJava.setId(2);\n quizJava.setName(\"An Agile Approach\");\n quizJava.setDescription(\"A quiz about Agile methods in programming\");\n quizJava.setUserId(\"140001337\");\n quizJava.setModuleId(\"AC31007\");\n quizJava.makeAvailable();\n\n \n try {\n List<Quiz> allQuizzes = QuizModel.getQuizzes(\"AC31007\", staff);\n assertEquals(\"There should be 3 quizzes retrieved for staff.\",\n numberOfAc31007Quizzes, allQuizzes.size());\n Quiz quizDb = allQuizzes.get(0);\n assertEquals(\"Quiz has not been correctly fetched\", quizJava, quizDb);\n \n List<Quiz> liveQuizzes = QuizModel.getQuizzes(\"AC31007\", student);\n assertEquals(\"There should be 2 quizzes retrieved for student.\",\n numberOfAc31007LiveQuizzes, liveQuizzes.size());\n }\n catch (SQLException | ClassNotFoundException | InstantiationException |\n IllegalAccessException exception) {\n fail(exception.getMessage());\n }\n }", "@Before\n public void runBefore() {\n q1 = new TrueFalseQuestion(8, \"You are awesome.\", true);\n q2 = new TrueFalseQuestion(16, \"Donuts are bad for you.\", true);\n q3 = new TrueFalseQuestion(1, \"You suck at programming\", true);\n qList = new QuestionsList();\n qList.addQuestion(q1);\n qList.addQuestion(q2);\n qList.addQuestion(q3);\n\n testQuiz = new DecrementMarksQuiz(qList);\n }", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "@Before\n public void setup() {\n kata4 = new SpinWords();\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n void testPartA_Example1() {\n assertEquals(2, Day01.getFuelNeededForMass(12));\n }", "@Test\n public void testObject()\n throws Exception\n {\n initialize();\n genericTests();\n for (int i = 0; i < 10; i++)\n {\n permutateObjects();\n genericTests();\n } // for\n }", "@Test\n void testPartA_Example3() {\n assertEquals(654, Day01.getFuelNeededForMass(1969));\n }", "public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}", "@Test\n public void testGetAllAssignments() throws Exception {\n TestHarnessBuilder builder = new TestHarnessBuilder();\n\n Map<String, Lease> addedLeases = builder.withLease(\"1\", WORKER_ID)\n .withLease(\"2\", WORKER_ID)\n .withLease(\"3\", WORKER_ID)\n .withLease(\"4\", WORKER_ID)\n .withLease(\"5\", WORKER_ID)\n .build();\n\n // Run the taker\n coordinator.runLeaseTaker();\n\n List<Lease> allLeases = coordinator.allLeases();\n assertThat(allLeases.size(), equalTo(addedLeases.size()));\n assertThat(allLeases.containsAll(addedLeases.values()), equalTo(true));\n }", "public void test5() {\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n// new Homework01();\n new Homework02();\n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_7()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "@Test\n public void testExample() {\n assertSolution(\"16\", \"example-day06-2018.txt\");\n }", "@Test\n public void initializeBasicQuizTest() throws CakeException {\n /*\n QuestionList test = new QuestionList(QuestionType.BASIC);\n\n //check if there are the correct number of test questions\n assertEquals(test.getQuestionList().size(), MAX_QUESTIONS);\n\n // check if there are any duplicate questions\n Set<Question> set = new HashSet<>(test.getQuestionList());\n assertEquals(set.size(), test.getQuestionList().size());\n */\n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_6()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "public static void main(String[] args) {\n\n\n for (int i = 0; i < 3; i++) {\n System.out.println(\"\\n********* TEST \" + (i+1) + \" *********\");\n experimentOne(false);\n experimentOne(true);\n\n experimentTwo(false);\n experimentTwo(true);\n\n experimentThree(false);\n experimentThree(true);\n }\n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_1()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "public static void main(String[] args) {\n Course AbstractAdvancedJavaSuperClass = new AdvancedJavaCourse(\"AdvancedJava\", \"-003\");\r\n Course AbstractJavaSuperClass = new IntroJavaCourse(\"IntroJava\", \"-002\");\r\n Course AbstractProgramClass = new IntroToProgrammingCourse(\"Intro\", \"-001\");\r\n\r\n AbstractAdvancedJavaSuperClass.setCredits(4);\r\n AbstractJavaSuperClass.setCredits(4.0);\r\n AbstractProgramClass.setCredits(4.0);\r\n \r\n //this is a test\r\n \r\n AbstractAdvancedJavaSuperClass.setPrerequisites(AbstractJavaSuperClass.getCourseNumber());\r\n AbstractJavaSuperClass.setPrerequisites(AbstractProgramClass.getCourseNumber());\r\n \r\n System.out.println(AbstractProgramClass.getCapitalizedCourseName()\r\n + \" \" + AbstractProgramClass.getCourseNumber() );\r\n \r\n System.out.println(AbstractJavaSuperClass.getCourseName()\r\n + \" \" + AbstractJavaSuperClass.getCourseNumber() \r\n + \" \" + AbstractJavaSuperClass.getPrerequisites());\r\n \r\n System.out.println(AbstractAdvancedJavaSuperClass.getCourseName()\r\n + \" \" + AbstractAdvancedJavaSuperClass.getCourseNumber() \r\n + AbstractAdvancedJavaSuperClass.getPrerequisites() );\r\n}", "public static void main(String[] args) {\n final int t = SYS_IN.nextInt(); // total test cases\n SYS_IN.nextLine();\n for (int ti = 0; ti < t; ti++) {\n evaluateCase();\n }\n SYS_IN.close();\n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_4()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "protected void runTest() {\n\t\trunTest(getIterations());\n\t}", "public void startTests() {\n if(testSettings.accessibleProperties || testSettings.accessibleInterface)\n testProperties();\n if(testSettings.tabTraversal)\n testTraversal();\n }", "@Test\n public void testExample3() {\n assertSolution(\"-6\", \"example-day01-2018-3.txt\");\n }", "public TestDriverProgram(){\n iTestList = new SortableArray(iSize); // tests if parameterized constructor works\n iTestFileList = new SortableArray(); // tests if default constructor works\n runAllTests(); // run all of the tests\n }", "public static void main(String[] args) {\n long startTime = System.currentTimeMillis();\n// final File folder = new File(\"tests/speedTestExamples\");\n final File folder = new File(\"tests/speedTestExamples/hard\");\n iterateExamples(folder);\n long ms = System.currentTimeMillis() - startTime;\n System.out.println(\"All tests have been finished in \" + ((double) ms) / (1000 * 60 * 60) + \" hours.\");\n }", "@Test\n\tpublic void testHw1_1000000LOC31method13_3()\n\t\tthrows Exception {\n\t\thw1_1000000LOC31 fixture = new hw1_1000000LOC31();\n\t\tString var0 = \"\";\n\t\tdouble var1 = 1.0;\n\t\tString var2 = \"\";\n\t\tfloat var3 = 1.0f;\n\t\tbyte var4 = (byte) 1;\n\t\thw1_1000000LOC25 var5 = new hw1_1000000LOC25();\n\t\tint var6 = 1;\n\t\tfloat var7 = 1.0f;\n\n\t\tint result = fixture.hw1_1000000LOC31method13(var0, var1, var2, var3, var4, var5, var6, var7);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: hw1_1000000LOC31\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\t\t// at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\t\t// at java.security.AccessController.doPrivileged(Native Method)\n\t\t// at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Thread.java:744)\n\t\tassertEquals(0, result);\n\t}", "@Test\n public void test10() throws Exception {\n try {\n tester.testOnNestedClasses(Story10, testClass);\n Assert.fail();\n } catch (StoryTestException e) {\n Assert.assertEquals(\"Then C's y is 2\", e.getSentence());\n Assert.assertEquals(1, e.getNumFail()); // If this fails, it means your back-up is wrong.\n List<String> expected = new LinkedList<>();\n expected.add(\"2\");\n Assert.assertEquals(expected, e.getStoryExpected());\n List<String> actual = new LinkedList<>();\n actual.add(\"3\");\n Assert.assertEquals(actual, e.getTestResult());\n }\n }", "public void runDemo()\n {\n demoAddProduct(); // test we can add items to the list (test printing all the list)\n demoRemoveProduct(); // this will delete the product in the list, the list now has 0 items\n demoRenameProduct(); // this will add a product to the list and rename it, the list now has 1 items\n demoLowStock(); // this test finds a product which is low on stock\n demoFindId(); // this test does not add any products to the list, the \"findProduct\" method will search through all the list of products\n demoGetMatchingName(); // this test does not add any products to the list, the \"getMatchingName\" method will search through all the list of products\n demoDeliver(); // this test does not add any products to the list, its using the product added in the rename test \n demoSellProducts(); // this test does not add any products to the list, its using the product added in the rename test \n demoAddProductWhenTheresAlreadyOne(); // this test attempts to add a product which is already listed\n demoSellProductsWhensStocksTooLow(); // this test is to sell a product when there isn't enough stock\n demoRemoveProductWhichDoesNotExist(); // this test is to remove a product that doesn't exist\n }", "@Test\n void questionAnswered() {\n }", "@Test(priority = 8, retryAnalyzer = Retry.class)\n\tpublic void VPORT_15_TeacherLoginScenarios() {\n\n\t\tString schoolAndCode[];\n\t\tString trackName;\n\t\tString tickeToReadURL;// = \"https://tickettoread.com/\";[https://www.tickettoread.com/choose/index.jsp]\n\t\tif(vportData.vportURL.contains(\"qa.\"))\n\t\t{\n\t\t\t tickeToReadURL = \"https://qa.tickettoread.com/choose/index.jsp\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttickeToReadURL = \"https://www.tickettoread.com/choose/index.jsp\";\n\t\t}\n\t\t// Create Track\n\t\t// Click the Add district button and enter the required details for\n\t\t// track creation\n\t\tvportloginpage.verifyLoginPage();\n\t\tvportloginpage.enterLoginCredentials(vportData.vportUsername, vportData.vportPassword);\n\t\tvporttrackfilterPage = (VportTrackFilterPage) vportloginpage.clickSignInButton(ReturnPage.FILTERPAGE);\n\n\t\taddedittrack = vporttrackfilterPage.clickAddDistrictbutton();\n\t\taddedittrack.verfyDistrictPage();\n\t\ttrackName = addedittrack.fillTrackDetails(vportData.Districtname, vportData.Address, vportData.DistCity,\n\t\t\t\tvportData.Country, vportData.State, vportData.ZipCode, vportData.userType, vportData.productName,\n\t\t\t\tvportData.Status,vportData.Year);\n\t\tvporttrackfilterPage = addedittrack.clickSaveChanges();\n\n\t\t// Filtering the track by providing details\n\t\tvporttrackfilterPage.verifyFilterPage();\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\n\t\t// Create school\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\t\t// String schoolName = config.getProperty(\"VPORT_002_SchoolName\");\n\t\t// To navigate to master page of track\n\t\tmasterDistrictTracksPage = vporttrackfilterPage.clickOnMasterIcon(trackName);\n\t\t// To Verify master page by 'District' tab is loaded\n\t\tmasterDistrictTracksPage.verifyMasterDistrictTracksPage();\n\t\t// To Navigate to School sub tab from District tab\n\t\tmasterDistrictTracksPage.navigateToSchoolsSubtab();\n\t\t// To verify Schools sub tab is loaded\n\t\tmasterDistrictTracksPage.verifySchoolsSubtab();\n\t\t// Creating a school and store the name and Details in App.Properties\n\t\tschoolAndCode = masterDistrictTracksPage.CreateSchool(vportData.schoolName, vportData.Code, vportData.Address1,\n\t\t\t\tvportData.SchoolCity, vportData.zipCode);\n\t\t// verifying school is created correctly with the given data\n\t\t// (data+random)\n\t\tmasterDistrictTracksPage.verifySchoolDetails(schoolAndCode[0], schoolAndCode[1], vportData.SchoolCity);\n\n\t\t// Activating School\n\t\tvporttrackfilterPage = masterDistrictTracksPage.navigateToFiltersPage();\n\t\t// To click on Track name to open track and it returns Contacts page\n\t\tdistrictTrackContactsPage = vporttrackfilterPage.clickonTrackName(trackName);\n\t\t// To verify Contacts page is loaded\n\t\tdistrictTrackContactsPage.verifyDistrictTrackContactsPage(trackName);\n\n\t\t// to click on School Tracks tab to navigate to SchoolTracks page and it\n\t\t// returns school tracks page object\n\t\tdistrictTrackSchoolTracksPage = districtTrackContactsPage.clickSchoolTrackstab();\n\t\t// To verify schoolTracks page is loaded\n\t\tdistrictTrackSchoolTracksPage.verifySchoolTracksTab(trackName);\n\t\t// To find a required school to activate from the list of schools\n\t\tdistrictTrackSchoolTracksPage.findSchool(schoolAndCode[0]);\n\t\t// Verifies Inherit buttons are disabled before activating school\n\t\tdistrictTrackSchoolTracksPage.verifyInheritRadiobuttonsStatus(schoolAndCode[0], false);\n\t\t// To activate the school\n\t\tdistrictTrackSchoolTracksPage.activateSchoolAndSave(schoolAndCode[0]);\n\t\t// Verifies Inherit buttons are enabled after activating school\n\t\tdistrictTrackSchoolTracksPage.verifyInheritRadiobuttonsStatus(schoolAndCode[0], true);\n\n\t\t// Create teacher and Add classes to the teacher\n\t\tdistrictAdminHomepage = districtTrackSchoolTracksPage.clickPIIcon(trackName);\n\t\t// Selects school from school dropdown\n\t\tdistrictAdminHomepage.selectSchoolFromDropdown(schoolAndCode[0]);\n\t\t// Navigate to My school tab after selecting a class from classes\n\t\t// dropdown and verifies it\n\t\tdistrictAdminMySchoolPage = districtAdminHomepage.clickOnMySchoolTab();\n\t\tdistrictAdminMySchoolPage.verifyMySchoolPage(schoolAndCode[0]);\n\t\t// Navigate to Teachers and classes tab and verifies it\n\t\tdistrictAdminMySchoolPage.navigateToTeachersAndClassesSubtab();\n\t\tdistrictAdminMySchoolPage.verifyTeachersAndClassesSubtab();\n\t\t// long strRandom = System.currentTimeMillis();\n\t\t// Adds teacher and edit the user name and password\n\t\tString lastname = districtAdminMySchoolPage.addTeacher(vportData.teacherLastName, vportData.teacherFirstName,\n\t\t\t\tvportData.teacherEmail);\n\t\tString teacherID = districtAdminMySchoolPage.editTeacherandSave(lastname, vportData.teacherUserId, vportData.teacherPassword);\n\n\t\t// Add classes to school and verifies schools in schools drop down and\n\t\t// classes section\n\t\t// Also add the class names to properties file\n\t\tString classes[] = districtAdminMySchoolPage.addClassesandSave(lastname, vportData.class1, vportData.class2,\n\t\t\t\tvportData.class3);\n\t\tdistrictAdminMySchoolPage.verifyAddedClasses(lastname, vportData.class1, vportData.class2, vportData.class3);\n\t\tdistrictAdminMySchoolPage.verifyClassesinClassesDropdown(lastname, vportData.class1, vportData.class2,\n\t\t\t\tvportData.class3);\n\n\t\t//Scenario 1 - TEACHER LOGIN WITHOUT STUDENTS IN THE CLASS & WITHOUT STAFF LICENSES\n\n\t\tgetDriver().get(tickeToReadURL);\n\t\tteacherLoginScenarios = new TeacherLoginScenarios(getDriver());\n\t\tteacherLoginScenarios.loginIntoAppication(teacherID);\n\t\tteacherLoginScenarios.verifyLogin(tickeToReadURL);\n\n\n\t\t//*** Pre condition for second Scenario *****\n\t\t//adding staff Licenses to the track\n\t\tgetDriver().get(vportData.vportURL);\n\t\tvportloginpage.verifyLoginPage();\t\n\t\tvportloginpage.enterLoginCredentials(vportData.vportUsername, vportData.vportPassword);\n\t\tvporttrackfilterPage = (VportTrackFilterPage) vportloginpage.clickSignInButton(ReturnPage.FILTERPAGE);\n\t\tvporttrackfilterPage.trackFilters(vportData.productName, vportData.userType, vportData.alpha, trackName);\n\t\tvporttrackfilterPage.clickUpdateButton();\n\t\tvporttrackfilterPage.verifyTrackCreation(trackName);\n\t\t// To click on Track name to open track and it returns Contacts page\n\t\tdistrictTrackContactsPage = vporttrackfilterPage.clickonTrackName(trackName);\n\t\tdistrictmaterialspage = districtTrackContactsPage.clickMaterialsTab();\n\t\tdistrictmaterialspage.verifyMaterialsPage();\n\t\tdistrictmaterialspage.verifyAvailableLicencesOnMaterialsPage();\n\t\tdistrictmaterialspage.addAndVerifyLicences(vportData.licencegradelevel, vportData.licenceseatcount,\n\t\t\t\tvportData.reasonforaddinglicence, vportData.addLicenceAlertMessage,\n\t\t\t\tvportData.reasonForCreatingLicenceImagePath);\n\t\tdistricttracktechnologypage = districtmaterialspage.clickOnTechnologyTab();\n\t\tdistricttracktechnologypage.verifyTechnologyPage();\n\t\tdistricttracktechnologypage.verifyAssessmentPlansAndEnabledRadioButtons();\n\n\t\t//Scenario 2 - Verify teacher login without students in the class \n\n\t\tgetDriver().get(tickeToReadURL);\n\t\tteacherLoginScenarios = new TeacherLoginScenarios(getDriver());\n\t\tteacherLoginScenarios.loginIntoAppication(teacherID);\n\t\tteacherLoginScenarios.verifyLogin(tickeToReadURL);\n\t}" ]
[ "0.69883573", "0.6810039", "0.67509425", "0.6627556", "0.66080964", "0.6493628", "0.6484517", "0.6478026", "0.6425052", "0.6383311", "0.6365542", "0.6343816", "0.6321825", "0.622515", "0.62187564", "0.6205069", "0.619419", "0.60774", "0.6060614", "0.60601765", "0.59847075", "0.5969061", "0.5969061", "0.5955113", "0.5950465", "0.59258336", "0.58897036", "0.58895206", "0.58872455", "0.5874873", "0.5874873", "0.5858263", "0.5854378", "0.5847781", "0.5846767", "0.5814371", "0.57997406", "0.57955307", "0.57839715", "0.57742393", "0.57593375", "0.57436717", "0.57412326", "0.57404935", "0.5737756", "0.5729255", "0.5724287", "0.5720631", "0.5717513", "0.5716127", "0.57039547", "0.57001626", "0.56987214", "0.5684949", "0.56846493", "0.5683515", "0.5672022", "0.56601596", "0.56587785", "0.5652212", "0.56474227", "0.5639507", "0.56179494", "0.55805176", "0.5576566", "0.55765444", "0.55756557", "0.55738723", "0.55706215", "0.55689394", "0.556742", "0.5564341", "0.55582714", "0.5549547", "0.5540746", "0.5534594", "0.55319697", "0.552915", "0.5528705", "0.55220884", "0.5518413", "0.551734", "0.5516381", "0.5516226", "0.5514459", "0.5512625", "0.55052465", "0.550382", "0.55026364", "0.5490542", "0.54898185", "0.5487925", "0.54874164", "0.5487414", "0.54862744", "0.548515", "0.5482311", "0.54801565", "0.547261", "0.5468685", "0.5468167" ]
0.0
-1
Note: this assumes all data is on Sheet zero
public String toJson() { StringBuilder sb = new StringBuilder(); //With resources try-catch should auto close //TODO: Might be fun to throw garbage at this just to confirm try (FileInputStream fis = new FileInputStream(excelFile)) { XSSFWorkbook workBook = new XSSFWorkbook(fis); XSSFSheet sheet = workBook.getSheetAt(0); Iterator<Row> rowIterator = sheet.iterator(); List<List<String>> sheetDataTable = loadSheetDataTable(sheet); sb.append(exportJSONStringFromSheetData(sheetDataTable)); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }", "private Boolean isSheetEmpty(Sheet sheet){\n Cell name;\n Cell accNumber;\n //Ensure that the row is not null\n\n if(sheet.getRow(1)==null || sheet.getRow(2)==null) return true;\n\n name = sheet.getRow(1).getCell(4);\n accNumber = sheet.getRow(2).getCell(11);\n //Ensure that the cells are not null\n if (name==null||accNumber==null) return true;\n\n //Ensure that the cell types are correct\n //Return false if not empty\n return (name.getCellTypeEnum()!=CellType.STRING | \n accNumber.getCellTypeEnum()!=CellType.FORMULA);\n }", "private static List<List<String>> loadSheetDataTable(XSSFSheet sheet) {\n List<List<String>> ret = new ArrayList<List<String>>();\n // Get the first and last sheet row number.\n int firstRowNum = sheet.getFirstRowNum();\n int lastRowNum = sheet.getLastRowNum();\n if (lastRowNum > 0) {\n // Loop in sheet rows.\n for (int i = firstRowNum; i < lastRowNum + 1; i++) {\n // Get current row object.\n Row row = sheet.getRow(i);\n // Get first and last cell number.\n int firstCellNum = row.getFirstCellNum();\n int lastCellNum = row.getLastCellNum();\n // Create a String list to save column data in a row.\n List<String> rowDataList = new ArrayList<String>();\n // Loop in the row cells.\n for (int j = firstCellNum; j < lastCellNum; j++) {\n // Get current cell.\n Cell cell = row.getCell(j);\n // Get cell type.\n CellType cellType = cell.getCellType();\n if (cellType == CellType.NUMERIC) {\n double numberValue = cell.getNumericCellValue();\n // BigDecimal is used to avoid double value is counted use Scientific counting method.\n // For example the original double variable value is 12345678, but jdk translated the value to 1.2345678E7.\n String stringCellValue = BigDecimal.valueOf(numberValue).toPlainString();\n rowDataList.add(stringCellValue);\n } else if (cellType == CellType.STRING) {\n String cellValue = cell.getStringCellValue();\n rowDataList.add(cellValue);\n } else if (cellType == CellType.BOOLEAN) {\n boolean numberValue = cell.getBooleanCellValue();\n String stringCellValue = String.valueOf(numberValue);\n rowDataList.add(stringCellValue);\n } else if (cellType == CellType.BLANK) {\n rowDataList.add(\"\");\n }\n }\n // Add current row data list in the return list.\n ret.add(rowDataList);\n }\n }\n return ret;\n }", "private void clearSheet() {\n row = null;\n cells = null;\n cellType = null;\n value = null;\n rowIndex = -1;\n }", "public int getSheetIndex(Sheet arg0) {\n\t\treturn 0;\n\t}", "public Sheet getSheetAt(int arg0) {\n\t\treturn null;\n\t}", "public static boolean isSheetEmpty(XSSFSheet xssfSheet){\r\n\t Iterator rows = xssfSheet.rowIterator();\r\n\t while (rows.hasNext()) {\r\n\t Row row = (Row) rows.next();\r\n\t \r\n\t Iterator cells = row.cellIterator();\r\n\t while (cells.hasNext()) {\r\n\t Cell cell = (Cell) cells.next();\r\n\t if(!cell.getStringCellValue().isEmpty()){\r\n\t \r\n\t return true;\r\n\t }\r\n\t }\r\n\t }\r\n\t return false;\r\n\t}", "private Sheet getActualSheet() throws IOException{\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n return spreadSheet.getSheet(spreadSheet.getSheetCount()-1);\r\n }", "public Object[][] getSheetData() {\n\n List<Object[]> rows = new ArrayList<>();\n\n int rowCount = currentSheet.getPhysicalNumberOfRows();\n\n for (int rowIdx = hasHeaderRow ? 1 : 0; rowIdx < rowCount; rowIdx++)\n rows.add(getRowData(rowIdx));\n\n return removeSkippedHeaderColumns( rows );\n\n }", "public void set_AllSpreadIndexToZero(){\r\n\tGRASS=0; \r\n\tTIMBER=0;\r\n}", "private List<Integer> processData(Sheet newSheet) {\n\t\tList<Integer> errorRows = new ArrayList<Integer>();\n\t\t// get data start column index\n\t\tint dataStartColNum = ExcelUtil.getColNumStartsWith(\n\t\t\t\tnewSheet.getRow(0), /* first row */\n\t\t\t\t\"Total\"); // string to search\n\t\t\n\t\tif(dataStartColNum == -1)\n\t\t\ttry {\n\t\t\t\tthrow new InvalidPropertiesFormatException(\"Total not found\");\n\t\t\t} catch (InvalidPropertiesFormatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\t\n\t\tfor(Row row: newSheet) {\n\t\t\t// skip first row with descriptions \n\t\t\tif(row.getRowNum() == 0)\n\t\t\t\tcontinue;\n\t\t\t// parse values from row \n\t\t\tdouble[] values = ExcelUtil.getDoubleValuesFromRow(\n\t\t\t\t\trow,\n\t\t\t\t\tdataStartColNum,\n\t\t\t\t\t(int) row.getLastCellNum());\n\t\t\t// some apache math library magic\n\t\t\tDescriptiveStatistics stats = new DescriptiveStatistics(values);\n\t\t\t// our new value is the last value in row\n\t\t\tdouble newVal = values[values.length - 1];\n\t\t\tdouble max = stats.getMax();\n\t\t\tdouble prevVal = values[values.length - 2];\n\t\t\t\n\n\t\t\t// search criteria\n\t\t\tint crit1 = this.options.getCritPersent();\n\t\t\tdouble crit2 = (double) this.options.getMoreThan();\n\n\t\t\t// if fraud found\n\t\t\tif( newVal > prevVal) { // newVal > (max * crit1 ) && (newVal > (max + crit2)) ) {\n\t\t\t\t// add new cell with fraud \n\t\t\t\tCell cellFraud = row.createCell(row.getLastCellNum());\n\t\t\t\tcellFraud.setCellValue(\"FRAUD\");\n\t\t\t\t\n\t\t\t\t//style manipulation\n\t\t\t\tCellStyle style = newSheet.getWorkbook().createCellStyle();\n\t\t\t style.setFillForegroundColor(IndexedColors.RED.getIndex());\n\t\t\t style.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t\t\tcellFraud.setCellStyle(style);\n\t\t\t\t// store error rows\n\t\t\t\terrorRows.add(row.getRowNum());\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tCell cellFraud = row.createCell(row.getLastCellNum());\n\t\t\t\tcellFraud.setCellValue(\"OK\");\n\t\t\t\t\n\t\t\t\tWorkbook currWb = newSheet.getWorkbook();\n\t\t\t\tCellStyle style = currWb.createCellStyle();\n\t\t\t style.setFillForegroundColor(IndexedColors.GREEN.getIndex());\n\t\t\t style.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t\t Font font = currWb.createFont();\n\t\t\t font.setBoldweight(Font.BOLDWEIGHT_BOLD);\n\t\t\t style.setFont(font);\n\t\t\t\tcellFraud.setCellStyle(style);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\treturn errorRows;\n\t}", "public void updateTotals(XSSFSheet sheet, int index){\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIterator = sheet.iterator();\n\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;//The current cell\n\t\tdouble[] buffer = null; \n\t\twhile(rowIterator.hasNext()){\n\t\t\t//System.out.println(k++);\n\t\t\trow = rowIterator.next();\n\t\t\tint cellID =(int)row.getCell(this.cellKey).getNumericCellValue();\n\t\t\t\n\t\t\tif(this.containsKey(cellID)){\n\t\t\t\tbuffer = this.get(cellID);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbuffer = new double[nbCells];\n\t\t\t\tfor(int i=buffer.length-1;i>=0;i--)\n\t\t\t\t\t\tbuffer[i]=0;\n\t\t\t\tthis.put(cellID, buffer);\n\t\t\t}\n\t\t\tfor(int i=nbCells-1;i>=0;i--){\n\t\t\t\tbuffer[i]+=row.getCell(cellStartCopy+i).getNumericCellValue();\n\t\t\t}\n\t\t}\n\t}", "public void forzerocount() {\r\n val = new BigDecimal[zerocntretobj.getRowCount()];\r\n for (int cnt = 0; cnt < zerocntretobj.getRowCount(); cnt++) {\r\n int zerocountct = 0;\r\n BigDecimal bdcross = null;\r\n int mcnt = Qrycolumns.size();\r\n int n = 0;\r\n for (int i = 0; i < mcnt; i++) {\r\n zerocountct = 0;\r\n\r\n for (int j = n; j < zerocntretobj.getColumnCount(); j = j + mcnt) {\r\n\r\n Object Obj = zerocntretobj.getFieldValue(cnt, j);\r\n\r\n if (zerocntretobj.columnTypes[j] != null) {\r\n if (zerocntretobj.columnTypesInt[j] == Types.BIGINT\r\n || zerocntretobj.columnTypesInt[j] == Types.DECIMAL || zerocntretobj.columnTypesInt[j] == Types.DOUBLE\r\n || zerocntretobj.columnTypesInt[j] == Types.FLOAT || zerocntretobj.columnTypesInt[j] == Types.INTEGER\r\n || zerocntretobj.columnTypesInt[j] == Types.NUMERIC || zerocntretobj.columnTypesInt[j] == Types.REAL\r\n || zerocntretobj.columnTypesInt[j] == Types.SMALLINT || zerocntretobj.columnTypesInt[j] == Types.TINYINT\r\n || zerocntretobj.columnTypes[j].equalsIgnoreCase(\"NUMBER\")) {\r\n\r\n BigDecimal bdecimal = null;\r\n\r\n if (Obj != null) {\r\n bdecimal = zerocntretobj.getFieldValueBigDecimal(cnt, j);\r\n BigDecimal bd = new BigDecimal(\"0\");\r\n if (bdecimal == null || bdecimal.compareTo(bd) == 0) {\r\n zerocountct = zerocountct + 1;\r\n bdcross = new BigDecimal(zerocountct);\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n n = n + 1;\r\n zerocntmsr.add(zerocountct);\r\n }\r\n\r\n }\r\n }", "private boolean initSpreadsheet()\n {\n boolean bOk = true;\n XSpreadsheets aSheets = maSpreadsheetDoc.getSheets();\n try\n {\n XIndexAccess aSheetsIA = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, aSheets );\n maSheet = (XSpreadsheet) UnoRuntime.queryInterface(XSpreadsheet.class, aSheetsIA.getByIndex( 0 ));\n\n // enter some values in B3:B11\n for( int iCounter=1; iCounter < 10; iCounter++ )\n {\n XCell aCell = maSheet.getCellByPosition( 1, 1 + iCounter );\n aCell.setValue( (double) iCounter );\n }\n }\n catch( Exception ex )\n {\n System.err.println( \"Couldn't initialize Spreadsheet Document: \" + ex );\n ex.printStackTrace();\n bOk = false;\n }\n return bOk;\n }", "public static void readInRange() throws IOException, GeneralSecurityException {\n\t\tValueRange valuesInSheet = sheetService.spreadsheets().values().get(spreadSheetID, \"A1:E10\").execute();\n\t\tList<List<Object>> values = valuesInSheet.getValues();\n// System.out.println(\"number of rows: \" + values.size() + \" \\n\" + \"number of columns: \" + values.get(0).size());\n\t\tif (values == null || values.isEmpty()) {\n\t\t\tSystem.out.println(\"no data\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < values.size(); i++) {\n\t\t\t\tfor (int j = 0; j < values.get(i).size(); j++) {\n\t\t\t\t\tif (j < values.get(i).size() - 1) {\n\t\t\t\t\t\tSystem.out.printf(\"%s \\t \", values.get(i).get(j));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.printf(\"%s \\t \\n\", values.get(i).get(j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic Sheet getSheet() {\n\t\treturn null;\n\t}", "public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }", "public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }", "private static List<rowdata> readExcelSheet(Sheet sheet) {\n\n List<rowdata> rowdataList = new ArrayList<>();\n\n if (sheet != null) {\n int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数\n\n for (int i = 1; i <= rowNos; i++) {// 遍历行\n try {\n Row row = sheet.getRow(i);\n if (row != null) {\n Cell cell = row.getCell(0);\n if (cell != null) {\n cell.setCellType(CellType.STRING);\n rowdata rda = new rowdata();\n rda.CodeAll = cell.getStringCellValue();\n rda.no1 = rda.CodeAll.substring(0, 2);\n\n String[] allarr = StringUtils.split(rda.CodeAll, \"-\");\n String dotpart = allarr[1];\n\n String[] arr = StringUtils.split(dotpart, \".\");\n rda.no2 = arr[0];\n rda.no3 = arr[1];\n rda.no4 = arr[2];\n if (arr.length > 3)\n rda.no5 = arr[3];\n\n // System.out.print(cell.getStringCellValue() + \" \");\n rowdataList.add(rda);\n System.out.println(\"当前正在处理的记录是\" + i + \"/\" + rowNos + rda.CodeAll + \"分解后的结果\" + rda.no1 + rda.no2 + rda.no3 + rda.no4 + rda.no5);\n }\n }\n }\n catch (Exception ex)\n {\n System.out.println(\"当前正在处理的记录是\" + i );\n }\n }\n }\n\n\n return rowdataList;\n }", "@Override\n protected void check(Workbook workbook)\n {\n Sheet total = workbook.getSheetAt(0);\n assertEquals(58, TestUtility.getNumericCellValue(total, 1, 1), DELTA);\n assertEquals(17, TestUtility.getNumericCellValue(total, 1, 2), DELTA);\n assertEquals(38070496, TestUtility.getNumericCellValue(total, 2, 1), DELTA);\n assertEquals(1998257, TestUtility.getNumericCellValue(total, 2, 2), DELTA);\n assertEquals(180979, TestUtility.getNumericCellValue(total, 3, 1), DELTA);\n assertEquals(16106, TestUtility.getNumericCellValue(total, 3, 2), DELTA);\n assertEquals(404224, TestUtility.getNumericCellValue(total, 4, 1), DELTA);\n assertEquals(284401, TestUtility.getNumericCellValue(total, 4, 2), DELTA);\n assertEquals(1222, TestUtility.getNumericCellValue(total, 5, 1), DELTA);\n assertEquals(971, TestUtility.getNumericCellValue(total, 5, 2), DELTA);\n assertEquals(51960, TestUtility.getNumericCellValue(total, 6, 1), DELTA);\n assertEquals(47001, TestUtility.getNumericCellValue(total, 6, 2), DELTA);\n }", "private static void showExelData(List sheetData) {\n\t\t// Iterates the data and print it out to the console.\n\t\t//\n\t\tmatriz = new int[sheetData.size()][3];\n\t\tfila = sheetData.size();\n\t\tfor (int i = 1; i < sheetData.size(); i++) {\n\t\t\t// fila\n\t\t\t// System.out.println(sheetData.size());\n\t\t\tList list = (List) sheetData.get(i);\n\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\tCell cell = (Cell) list.get(j);\n\t\t\t\tif (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t// System.out.print(cell.getNumericCellValue());\n\n\t\t\t\t\tmatriz[i][j] = (int) cell.getNumericCellValue();\n\n\t\t\t\t} else if (cell.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t// System.out.print(cell.getRichStringCellValue());\n\t\t\t\t} else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {\n\t\t\t\t\t// System.out.print(cell.getBooleanCellValue());\n\t\t\t\t}\n\t\t\t\tif (j < list.size() - 1) {\n\t\t\t\t\t// System.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getSheetIndex(String arg0) {\n\t\treturn 0;\n\t}", "public int getActiveSheetIndex() {\n\t\treturn 0;\n\t}", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\n}", "private ArrayList<ArrayList<String>> zeroingData(ArrayList<ArrayList<String>> data) {\n\n\t\tdouble firstStrainVal = Double.parseDouble(data.get(1).get(0));\n\t\tdouble firstStressVal = Double.parseDouble(data.get(1).get(1));\n\n\t\t// subtract the first strain value for the entire strain column\n\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\tString newStrain = Double.toString(Double.parseDouble(data.get(i).get(0)) - firstStrainVal);\n\t\t\tBigDecimal bd = new BigDecimal(newStrain).setScale(6, RoundingMode.CEILING);\n\t\t\tdata.get(i).set(0, bd.toString());\n\t\t}\n\n\t\t// subtract the first stress value for the entire stress column\n\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\tString newStress = Double.toString(Double.parseDouble(data.get(i).get(1)) - firstStressVal);\n\t\t\tBigDecimal bd = new BigDecimal(newStress).setScale(6, RoundingMode.CEILING);\n\t\t\tdata.get(i).set(1, bd.toString());\n\t\t}\n\n\t\t// Gage correction\n\t\tif (gageCorrect) {\n\n\t\t\t// divide the entire strain column by (1 + offeststrain)\n\t\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\t\tString newStrain = Double.toString(Double.parseDouble(data.get(i).get(0)) / (1 + firstStrainVal));\n\t\t\t\tBigDecimal bd = new BigDecimal(newStrain).setScale(6, RoundingMode.CEILING);\n\t\t\t\tdata.get(i).set(0, bd.toString());\n\t\t\t}\n\n\t\t\t// multiply the stress column by (1 + offeststrain)\n\t\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\t\tString newStress = Double.toString(Double.parseDouble(data.get(i).get(1)) * (1 + firstStrainVal));\n\t\t\t\tBigDecimal bd = new BigDecimal(newStress).setScale(6, RoundingMode.CEILING);\n\t\t\t\tdata.get(i).set(1, bd.toString());\n\t\t\t}\n\n\t\t}\n\n\t\treturn data;\n\t}", "public Sheet getSheet(String arg0) {\n\t\treturn null;\n\t}", "void clearSheet();", "private void coverExistingValues() \n {\n for(int i = 1; i <= gDim; i++)\n {\n for(int j = 1; j <= gDim; j++)\n {\n //If the board has a value at the current position, cover the satisfied rows and columns\n if(board[i - 1][j - 1] != null)\n {\n int rowIndex = rcvToMatrixRow(i, j, board[i - 1][j - 1]);\n coverSatisfiedColumns(ecmCoveredCols, rowIndex);\n coverSatisfiedRows(ecmCoveredRows, rowIndex);\n }\n }\n }\n }", "private void getExcelData21ZV() throws Exception {\n\t\tlistHeader = new ArrayList<ExcelPromotionHeader>();\n\t\tlistDetail = new ArrayList<ExcelPromotionDetail>();\n\t\tlistUnit = new ArrayList<ExcelPromotionUnit>();\n\t\tmapHeader = new HashMap<String, ExcelPromotionHeader>();\n\t\tmapUnit = new HashMap<String, ExcelPromotionUnit>();\n\t\tmapErrorPromotion = new HashMap<String, String>();\n\t\tmapType = new HashMap<String, String>();\n\t\tmapPromotionMua = new HashMap<String, ListGroupMua>();\n\t\tmapPromotionKM = new HashMap<String, ListGroupKM>();\n\t\tmapMuaKM = new MapMuaKM();\n\t\tmapPromotionTypeCheck = new HashMap<String, String>();\n\t\tlstHeaderError = new ArrayList<CellBean>();\n\t\tlstDetailError = new ArrayList<CellBean>();\n\t\tlistUnitError = new ArrayList<CellBean>();\n\t\tMap<String, Integer> mapCheckHeaderDuplicate = new HashMap<String, Integer>();\n\t\tMap<String, String> mapCheckType = apParamMgr.getMapPromotionType();\n\t\tWorkbook myWorkBook = null;\n\t\tInputStream is = new FileInputStream(excelFile);\n\t\tint MAX_ARRAY = 10000;\n\t\tfinal int NUM_SHEETS = 2;\n\n\t\tif (!is.markSupported()) {\n\t\t\tis = new PushbackInputStream(is, 8);\n\t\t}\n\t\tif (POIFSFileSystem.hasPOIFSHeader(is)) {\n\t\t\tmyWorkBook = new HSSFWorkbook(is);\n\t\t} else if (POIXMLDocument.hasOOXMLHeader(is)) {\n\t\t\tmyWorkBook = new XSSFWorkbook(OPCPackage.open(is));\n\t\t}\n\t\tif (myWorkBook != null) {\n\t\t\tif (myWorkBook.getNumberOfSheets() < NUM_SHEETS) {\n\t\t\t\tthrow new Exception(ERR_NUM_SHEET);\n\t\t\t}\n\t\t\tSheet headerSheet = myWorkBook.getSheetAt(0);\n\t\t\tSheet detailSheet = myWorkBook.getSheetAt(1);\n\t\t\tSheet unitSheet = myWorkBook.getSheetAt(2);\n\t\t\tint iRun = 0;\n\t\t\ttotalItem = 0;\n\t\t\tint maxSizeSheet1 = 12;\n\t\t\tif (headerSheet != null) {\n\t\t\t\tIterator<?> rowIter = headerSheet.rowIterator();\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\t//Kiem tra su hop le cua Row Import\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet1; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null && !StringUtil.isNullOrEmpty(getCellValueToString(myRow.getCell(i)))) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionHeader header = new ExcelPromotionHeader();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\ttotalItem++;\n\t\t\t\t\t//0\tget promotionCode\n\t\t\t\t\tString promotionCode = \"\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = cellPromotionCode.getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = String.valueOf(cellPromotionCode.getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\tpromotionCode = promotionCode != null ? promotionCode.toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\theader.promotionCode = promotionCode;\n\t\t\t\t\t\t\terrRow.setContent1(promotionCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã CTKM\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(promotionCode, \"catalog.promotion.import.column.progcode\", 50, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_CODE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (mapCheckHeaderDuplicate.get(promotionCode) != null) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.product.import.duplicate\", mapCheckHeaderDuplicate.get(promotionCode));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmapCheckHeaderDuplicate.put(promotionCode, myRow.getRowNum());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tPromotionProgram existPromotion = promotionProgramMgr.getPromotionProgramByCode(promotionCode);\n\t\t\t\t\t\t\tif (existPromotion != null && !ActiveType.WAITING.equals(existPromotion.getStatus())) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.program.exists\");\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.get.promotion.error\", promotionCode);\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t//\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ProgCode\");\n\t\t\t\t\t}\n\t\t\t\t\t//1\tget description\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDescription = myRow.getCell(1);\n\t\t\t\t\t\tif (cellDescription != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\theader.description = description;\n\t\t\t\t\t\t\terrRow.setContent2(description);\n\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(description, \"catalog.promotion.import.column.progpescr\", 100, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_NAME);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ProgDescr\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//2\tget release\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (myRow.getCell(2) != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\terrRow.setContent3(getCellValueToString(myRow.getCell(2)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Release\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//3\tget promotion type\n\t\t\t\t\tString type = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionType = myRow.getCell(3);\n\t\t\t\t\t\tif (cellPromotionType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\ttype = getCellValueToString(cellPromotionType);\n\t\t\t\t\t\t\ttype = type != null ? type.toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\theader.type = type;\n\t\t\t\t\t\t\terrRow.setContent4(type);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(type)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (mapCheckType.get(type) == null) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.exists.before\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapType.put(header.promotionCode, type);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"ConditionTypeCode\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//4 get format\n\t\t\t\t\t//try {\n\t\t\t\t\t//\tCell cellFormat = myRow.getCell(4);\n\t\t\t\t\t//\tif (cellFormat != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t//\t\tString format = cellFormat.getStringCellValue();\n\t\t\t\t\t//\t\theader.format = format;\n\t\t\t\t\t//\t\terrRow.setContent5(format);\n\t\t\t\t\t//\t}\n\t\t\t\t\t//} catch (Exception e) {\n\t\t\t\t\t//\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"User1\");\n\t\t\t\t\t//}\n\t\t\t\t\t//4 get fromDate\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDate = myRow.getCell(4);\n\t\t\t\t\t\tif (cellFromDate != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif (cellFromDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDate.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellFromDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __fromDate = DateUtil.toDateString(cellFromDate.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (cellFromDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDate.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellFromDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __fromDate = DateUtil.toDateString(cellFromDate.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\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\tif (!StringUtil.isNullOrEmpty(cellFromDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tString __fromDate = cellFromDate.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(__fromDate)) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tDate fromDate = DateUtil.toDate(__fromDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\theader.fromDate = fromDate;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent5(__fromDate);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\terrRow.setContent5(cellFromDate.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.required\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDate\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//5 get toDate\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDate = myRow.getCell(5);\n\t\t\t\t\t\tif (cellToDate != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif (cellToDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDate.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellToDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __toDate = DateUtil.toDateString(cellToDate.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (cellToDate.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDate.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDate.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\tif (cellToDate.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\tString __toDate = DateUtil.toDateString(cellToDate.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDate.getStringCellValue())) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tString __toDate = cellToDate.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(__toDate)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(__toDate, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toDate = toDate;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent6(__toDate);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\terrRow.setContent6(cellToDate.getStringCellValue());\n\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (header.fromDate != null && header.toDate != null) {\n\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromDate, header.toDate) > 0) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDate\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t//6 Số thông báo CTKM\n\t\t\t\t\t/*\n\t\t\t\t\t * String description =\n\t\t\t\t\t * getCellValueToString(cellDescription); header.description\n\t\t\t\t\t * = description; errRow.setContent2(description);\n\t\t\t\t\t * messageError += ValidateUtil.validateField(description,\n\t\t\t\t\t * \"catalog.promotion.import.column.progpescr\", 100,\n\t\t\t\t\t * ConstantManager.ERR_REQUIRE,\n\t\t\t\t\t * ConstantManager.ERR_MAX_LENGTH,\n\t\t\t\t\t * ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_NAME);\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t/*errMsg = ValidateUtil.validateField(promotionName, \"catalog.promotion.name\", 500, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL, ConstantManager.ERR_MAX_LENGTH);\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(errMsg)) {\n\t\t\t\t\t\terrMsg = ValidateUtil.validateField(description, \"common.description\", null, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t// 6 Số thông báo\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellNoticeCode = myRow.getCell(6);\n\t\t\t\t\t\tif (cellNoticeCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString noticeCode = getCellValueToString(cellNoticeCode);\n\t\t\t\t\t\t\tif(noticeCode != null){\n\t\t\t\t\t\t\t\tnoticeCode = noticeCode.trim();\n\t\t\t\t\t\t\t\tnoticeCode = noticeCode.toUpperCase();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(noticeCode, \"catalog.promotion.noticecode\", 100, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\t/*if(noticeCode.length() > 100){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.over.length\")+\"\\n\";\n\t\t\t\t\t\t\t}else*/ \n\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(noticeCode)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t}else if(noticeCode != null && noticeCode.trim().length() > 100){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.notice.code.incorrect.format\");\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"100\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số thông báo\");\n\t\t\t\t\t\t\t}else if(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\theader.noticeCode = noticeCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent7(noticeCode);\n\t\t\t\t\t\t}else if (cellNoticeCode == null) {\n\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.notice.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t} \n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"NoticeCode\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 7 Nhóm/Tên SP hàng bán\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDesProduct = myRow.getCell(7);\n\t\t\t\t\t\tif (cellDesProduct != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString descProduct = getCellValueToString(cellDesProduct);\n\t\t\t\t\t\t\tif(descProduct != null){\n\t\t\t\t\t\t\t\tdescProduct = descProduct.trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//descProduct = descProduct.trim();\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(descProduct, \"catalog.promotion.descriptionproduct\", 1000, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\t/*if(descProduct.length() > 1000){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.desc.product.over.length\")+\"\\n\";\n\t\t\t\t\t\t\t}else*/ \n\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(descProduct)) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.description.product.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t}else if(descProduct.trim().length() > 1000){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.description.product.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"1000\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Nhóm/Tên SP hàng bán\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\tdescProduct = descProduct.trim();\n\t\t\t\t\t\t\t\theader.decriptionProduct = descProduct;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrRow.setContent8(descProduct);\n\t\t\t\t\t\t}else if(cellDesProduct == null) {\n\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.description.product.obligate\") + \"\\n\";\n\t\t\t\t\t\t} \n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"DescProduct\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t// 8 Mô tả chương trình\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellDescription = myRow.getCell(8);\n\t\t\t\t\t\tif (cellDescription != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\tif(description != null){\n\t\t\t\t\t\t\t\tdescription = description.trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(description != null && description.trim().length() > 1000){\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"catalog.promotion.import.description.program.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t\t//messageError += R.getResource(\"\", iRun, \"Description\");\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"1000\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Mô tả chương trình\");\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdescription = description.trim();\n\t\t\t\t\t\t\t\theader.descriptionProgram = description;\n\t\t\t\t\t\t\t\terrRow.setContent9(description);\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/*else if(cellDescription != null){\n\t\t\t\t\t\t\tString description = getCellValueToString(cellDescription);\n\t\t\t\t\t\t\terrRow.setContent9(description);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.string\", iRun, \"Description\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//9 Bội số\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellMultiple = myRow.getCell(9);\n\t\t\t\t\t\theader.multiple = 0; \n\t\t\t\t\t\tif (cellMultiple != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString multiple = getCellValueToString(cellMultiple);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_PROMO_ALLOW_MULTIPLE\", ApParamType.LIST_PROMO_ALLOW_MULTIPLE);\n\t\t\t\t\t\t\tString strListPromo = apParam != null?apParam.getValue() : \"ZV02,ZV03,ZV05,ZV06,ZV08,ZV09,ZV11,ZV12,ZV13,ZV14,ZV15,ZV16,ZV17,ZV18,ZV20,ZV21,ZV23,ZV24\";\n\t\t\t\t\t\t\tif ((Constant.IS_MULTIPLE.equals(multiple) || Constant.NON_MULTIPLE.equals(multiple)) \n\t\t\t\t\t\t\t\t\t&& strListPromo != null) {\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.replace(\" \", \"\");\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.toUpperCase();\n\t\t\t\t\t\t\t\tString[] ListPromoAllow = strListPromo.split(\",\");\n\t\t\t\t\t\t\t\tif (Constant.IS_MULTIPLE.equals(multiple) \n\t\t\t\t\t\t\t\t\t &&\t!Arrays.asList(ListPromoAllow).contains(header.type.toUpperCase())) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(header.type.toUpperCase());\n\t\t\t\t\t\t\t\t\tSystem.out.println(strListPromo);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.multiple.not.use\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\theader.multiple = Integer.parseInt(multiple.trim());\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\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.multiple.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent10(multiple);\n\t\t\t\t\t\t}/*else if(cellMultiple != null){\n\t\t\t\t\t\t\tString multiple = getCellValueToString(cellMultiple);\n\t\t\t\t\t\t\terrRow.setContent10(multiple);\n\t\t\t\t\t\t}*/\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Multiple\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 10 Tối ưu\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellRecursive = myRow.getCell(10);\n\t\t\t\t\t\theader.recursive = 0;\n\t\t\t\t\t\tif (cellRecursive != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString recursive = getCellValueToString(cellRecursive);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_PROMO_ALLOW_RECURSIVE\", ApParamType.LIST_PROMO_ALLOW_RECURSIVE);\n\t\t\t\t\t\t\tString strListPromo = apParam == null? \"ZV02,ZV03,ZV05,ZV06,ZV08,ZV09,ZV11,ZV12,ZV13,ZV14,ZV15,ZV16,ZV17,ZV18,ZV20,ZV21,ZV23,ZV24\":apParam.getValue();\n\t\t\t\t\t\t\tif ((Constant.IS_RECURSIVE.equals(recursive) || Constant.NON_RECURSIVE.equals(recursive)) \n\t\t\t\t\t\t\t\t\t&& strListPromo != null) {\n\t\t\t\t\t\t\t\tstrListPromo = strListPromo.replace(\" \", \"\");\n\t\t\t\t\t\t\t\tString[] listPromoAllow = strListPromo.split(\",\");\n\t\t\t\t\t\t\t\tif (Constant.IS_RECURSIVE.equals(recursive)\t\t\t\n\t\t\t\t\t\t\t\t\t &&\t!Arrays.asList(listPromoAllow).contains(header.type.toUpperCase())) {\n\t\t\t\t\t\t\t\t/*\tSystem.out.println(header.type.toUpperCase());\n\t\t\t\t\t\t\t\t\tSystem.out.println(strListPromo);*/\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.recursive.not.use\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\theader.recursive = Integer.parseInt(recursive.trim());\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\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.recursive.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent11(recursive);\n\t\t\t\t\t\t}/*else if(cellRecursive != null){\n\t\t\t\t\t\t\tString recursive = getCellValueToString(cellRecursive);\n\t\t\t\t\t\t\terrRow.setContent11(recursive);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Recursive\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 9 Loại trả thưởng\n\t\t\t\t/*\ttry {\n\t\t\t\t\t\tCell cellRewardType = myRow.getCell(9);\n\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_REWARD_TYPE\", ApParamType.LIST_ALLOW_REWARD_TYPE);\n\t\t\t\t\t\tString strListAllowReward = apParam.getApParamName();\n\t\t\t\t\t\tstrListAllowReward = strListAllowReward.replace(\" \", \"\");\n\t\t\t\t\t\tString[] listAllowReward = strListAllowReward.split(\",\");\n\t\t\t\t\t\tif (cellRewardType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\tif (strRewardType != null \n\t\t\t\t\t\t\t\t\t&& (Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t&& Arrays.asList(listAllowReward).contains(header.type)) {\n\t\t\t\t\t\t\t\theader.rewardType = Integer.parseInt(strRewardType.trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent10(strRewardType);\n\t\t\t\t\t\t}else if(cellRewardType != null){\n\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\terrRow.setContent10(strRewardType);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.number\", iRun, \"RewardType\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 10 Từ ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDateReward = myRow.getCell(10);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellFromDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t} else if (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = cellFromDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_fromDateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent11(cellFromDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(header.fromApplyDate != null && header.fromDate != null){\n\t\t\t\t\t\t\t\t\t\tint sub = DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate);\n\t\t\t\t\t\t\t\t\t\tif(DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate) > 0){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.reward.greater.fromdate\")+\"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}else if(cellFromDateReward != null){\n\t\t\t\t\t\t\tString _fromDateReward = getCellValueToString(cellFromDateReward); \n\t\t\t\t\t\t\terrRow.setContent11(_fromDateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\n\t\t\t\t\t// 11 Đến ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDateReward = myRow.getCell(11);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellToDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_toDateReward);\n\t\t\t\t\t\t\t\t\t} else if (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _todateReward = cellToDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_todateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong \"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(_todateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDate;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent12(cellToDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (header.fromApplyDate != null && header.toApplyDate != null) {\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromApplyDate, header.toApplyDate) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate.reward\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellToDateReward != null){\n\t\t\t\t\t\t\tString _todateReward = getCellValueToString(cellToDateReward); \n\t\t\t\t\t\t\terrRow.setContent12(_todateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t// 11 Loại trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\tCell cellRewardType = myRow.getCell(11);\n\t\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_REWARD_TYPE\", ApParamType.LIST_ALLOW_REWARD_TYPE);\n\t\t\t\t\t\t\tString strListAllowReward = apParam.getApParamName();\n\t\t\t\t\t\t\tstrListAllowReward = strListAllowReward.replace(\" \", \"\");\n\t\t\t\t\t\t\tString[] listAllowReward = strListAllowReward.split(\",\");\n\t\t\t\t\t\t\tif (cellRewardType != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\t\tif (strRewardType != null \n\t\t\t\t\t\t\t\t\t&& (Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t&& Arrays.asList(listAllowReward).contains(header.type)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(Constant.DISCOUNT_MONEY.equals(strRewardType) || Constant.VOUCHER.equals(strRewardType)) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\theader.rewardType = Integer.parseInt(strRewardType.trim());\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\terrRow.setContent12(strRewardType);\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\tString strRewardType = getCellValueToString(cellRewardType);\n\t\t\t\t\t\t\t\terrRow.setContent12(strRewardType);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.number\", iRun, \"RewardType\");\n\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 12 Từ ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellFromDateReward = myRow.getCell(12);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellFromDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue()))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (cellFromDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellFromDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellFromDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellFromDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = DateUtil.toDateString(cellFromDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellFromDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _fromDateReward = cellFromDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_fromDateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate fromDateReward = DateUtil.toDate(_fromDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.fromApplyDate = fromDateReward;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.tuNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent13(cellFromDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(header.fromApplyDate != null && header.fromDate != null){\n//\t\t\t\t\t\t\t\t\t\tint sub = DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate);\n\t\t\t\t\t\t\t\t\t\tif(DateUtil.compareDateWithoutTime(header.fromDate,header.fromApplyDate) > 0){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.reward.greater.fromdate\")+\"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellFromDateReward != null){\n\t\t\t\t\t\t\tString _fromDateReward = getCellValueToString(cellFromDateReward); \n\t\t\t\t\t\t\terrRow.setContent13(_fromDateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"FromDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 11 Đến ngày trả thưởng\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellToDateReward = myRow.getCell(13);\n\t\t\t\t\t\tif (Constant.VOUCHER.equals(header.rewardType+\"\")) {\n\t\t\t\t\t\t\tif (cellToDateReward != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t\tif (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.HSSF_DATE_FORMAT_M_D_YY.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || !StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (cellToDateReward.getCellType() == Cell.CELL_TYPE_NUMERIC && cellToDateReward.getCellStyle() != null && DateUtil.DATE_FORMAT_VISIT.equals(cellToDateReward.getCellStyle().getDataFormatString())) {\n\t\t\t\t\t\t\t\t\t\tif (cellToDateReward.getDateCellValue() != null || StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\t\tString _toDateReward = DateUtil.toDateString(cellToDateReward.getDateCellValue(), DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\tDate toDateReward = DateUtil.toDate(_toDateReward, DateUtil.DATE_FORMAT_VISIT);\n\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDateReward;\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_toDateReward);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(cellToDateReward.getStringCellValue())) {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString _todateReward = cellToDateReward.getStringCellValue();\n\t\t\t\t\t\t\t\t\t\t\tif (DateUtil.checkInvalidFormatDate(_todateReward)) {\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong \"));\n\t\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tDate toDate = DateUtil.toDate(_todateReward, DateUtil.DATE_FORMAT_DDMMYYYY);\n\t\t\t\t\t\t\t\t\t\t\t\theader.toApplyDate = toDate;\n\t\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.invalid.format.date\", R.getResource(\"imp.epx.tuyen.clmn.denNgay.traThuong\"));\n\t\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t\t\terrRow.setContent14(cellToDateReward.getStringCellValue());\n\t\t\t\t\t\t\t\t\t\t\tLogUtility.logError(e1, e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (header.fromApplyDate != null && header.toApplyDate != null) {\n\t\t\t\t\t\t\t\t\t\tif (DateUtil.compareDateWithoutTime(header.fromApplyDate, header.toApplyDate) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"common.fromdate.greater.todate.reward\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellToDateReward != null){\n\t\t\t\t\t\t\tString _todateReward = getCellValueToString(cellToDateReward); \n\t\t\t\t\t\t\terrRow.setContent14(_todateReward);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.cant.read.cell.date\", iRun, \"ToDateReward\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistHeader.add(header);\n\t\t\t\t\t\tmapHeader.put(header.promotionCode, header);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrRow.setErrMsg(messageError);\n\t\t\t\t\t\tlstHeaderError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(header.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(header.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sheet Don vi tham gia\n\t\t\tif (unitSheet != null) {\n\t\t\t\tIterator<?> rowIter = unitSheet.rowIterator();\n\t\t\t\tiRun = 0;\n\t\t\t\tint maxSizeSheet3 = 5;\n\t\t\t\tList<Shop> listShopChild;\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet3; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionUnit unitPromo = new ExcelPromotionUnit();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\tBoolean isHasData = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString promotionCode = getCellValueToString(myRow.getCell(0));\n\t\t\t\t\t\tString shopCode = getCellValueToString(myRow.getCell(1));\n\t\t\t\t\t\tString quality = getCellValueToString(myRow.getCell(2));\n\t\t\t\t\t\tString totalAmount = getCellValueToString(myRow.getCell(3));\n\t\t\t\t\t\tString amount = getCellValueToString(myRow.getCell(4));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(promotionCode) || !StringUtil.isNullOrEmpty(shopCode) || !StringUtil.isNullOrEmpty(quality)\n\t\t\t\t\t\t\t\t|| !StringUtil.isNullOrEmpty(totalAmount) || !StringUtil.isNullOrEmpty(amount)) {\n\t\t\t\t\t\t\tisHasData = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 1 Mã CTKM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif(isHasData){\n\t\t\t\t\t\t\t\tString promoCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\t\tPromotionProgram newPromotionProgram;\n\t\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promoCode)) {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.promotion.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewPromotionProgram = promotionProgramMgr.getPromotionProgramByCode(promoCode);\n\t\t\t\t\t\t\t\t\tif(newPromotionProgram == null \n\t\t\t\t\t\t\t\t\t\t\t&& mapHeader.get(promoCode) == null){\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.not.init\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tunitPromo.promotionCode = promoCode;\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\terrRow.setContent1(promoCode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Mã CTKM\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 2 Mã đơn vị\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellUnitCode = myRow.getCell(1);\n\t\t\t\t\t\tif (cellUnitCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tif(isHasData){\n\t\t\t\t\t\t\t\tString unitCode = getCellValueToString(cellUnitCode);\n\t\t\t\t\t\t\t\t// Kiem tra ma don vi empty\n\t\t\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(unitCode)){\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Kiem tra don vi ton tai trong he thong\n\t\t\t\t\t\t\t\t\tif(shopMgr.getShopByCode(unitCode) == null){\n\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.not.permission\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t} else if (currentUser != null && currentUser.getShopRoot() != null){ // kiem tra don vi co thuoc quyen quan ly cua user\n\t\t\t\t\t\t\t\t\t\tlistShopChild = promotionProgramMgr.getListChildByShopId(currentUser.getShopRoot().getShopId());\n\t\t\t\t\t\t\t\t\t\t// Kiem tra shop co thuoc quen quan ly cua user dang nhap\n\t\t\t\t\t\t\t\t\t\tboolean isShopMapWithUser = false;\n\t\t\t\t\t\t\t\t\t\tfor(Shop shop: listShopChild){\n\t\t\t\t\t\t\t\t\t\t\t if(unitCode.toLowerCase().equals(shop.getShopCode().toLowerCase())){\n\t\t\t\t\t\t\t\t\t\t\t\t isShopMapWithUser = true;\n\t\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif(!isShopMapWithUser){\n\t\t\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.unit.code.not.permission.by.current.user\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tunitPromo.unitCode = unitCode;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\terrRow.setContent2(unitCode);\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} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Mã CTKM\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 3 Số suất \n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellQuantityMax = myRow.getCell(2);\n\t\t\t\t\t\tif (cellQuantityMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString quantityMax = getCellValueToString(cellQuantityMax);\n\t\t\t\t\t\t\tif(quantityMax != null){\n\t\t\t\t\t\t\t\tquantityMax = quantityMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (quantityMax != null && quantityMax.trim().length() <= 9 \n\t\t\t\t\t\t\t\t\t&& StringUtil.isFloat(quantityMax) && Double.parseDouble(quantityMax.trim()) > 0\n\t\t\t\t\t\t\t\t\t&& quantityMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.quantityMax = Integer.parseInt(quantityMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(quantityMax != null && quantityMax.length() > 9 ){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số suất\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (StringUtil.isNullOrEmpty(quantityMax) == false) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.quantity.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent3(quantityMax);\n\t\t\t\t\t\t}else if(cellQuantityMax != null){\n\t\t\t\t\t\t\t// String quantityMax = getCellValueToString(cellQuantityMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số suất\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 4 Số tiền amountMax\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellAmountMax = myRow.getCell(3);\n\t\t\t\t\t\tif (cellAmountMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString amountMax = getCellValueToString(cellAmountMax);\n\t\t\t\t\t\t\tif(amountMax != null){\n\t\t\t\t\t\t\t\tamountMax = amountMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (amountMax != null && amountMax.length() <= 9 && StringUtil.isFloat(amountMax) \n\t\t\t\t\t\t\t\t\t&& Double.parseDouble(amountMax.trim()) > 0 && amountMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.amountMax = new BigDecimal(amountMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(amountMax != null && amountMax.length() > 9){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số tiền\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (StringUtil.isNullOrEmpty(amountMax) == false) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.amount.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent4(amountMax);\n\t\t\t\t\t\t}else if(cellAmountMax != null){\n\t\t\t\t\t\t\tString amountMax = getCellValueToString(cellAmountMax);\n\t\t\t\t\t\t\terrRow.setContent4(amountMax);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số tiền\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 5 Số lượng numMax\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellNumMax = myRow.getCell(4);\n\t\t\t\t\t\tif (cellNumMax != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tString numMax = getCellValueToString(cellNumMax);\n\t\t\t\t\t\t\tnumMax = numMax.trim().replace(\",\", \"\");\n\t\t\t\t\t\t\tif (numMax != null && numMax.length() <= 9 \n\t\t\t\t\t\t\t\t\t&& StringUtil.isFloat(numMax) \n\t\t\t\t\t\t\t\t\t&& Double.parseDouble(numMax.trim()) > 0\n\t\t\t\t\t\t\t\t\t&& numMax.contains(\".\") == false) {\n\t\t\t\t\t\t\t\tunitPromo.numMax = new BigDecimal(numMax.trim().replace(\",\", \"\"));\n\t\t\t\t\t\t\t} else if(numMax != null && numMax.length() > 9){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.over.max.length\") + \"\\n\";\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%max%\", \"9\");\n\t\t\t\t\t\t\t\tmessageError = messageError.replaceAll(\"%colName%\", \"Số lượng\");\n\t\t\t\t\t\t\t}else if (StringUtil.isNullOrEmpty(numMax) == false) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.num.max.incorrect.format\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent5(numMax);\n\t\t\t\t\t\t}else if(cellNumMax != null){\n\t\t\t\t\t\t\tString numMax = getCellValueToString(cellNumMax);\n\t\t\t\t\t\t\terrRow.setContent5(numMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\",\n\t\t\t\t\t\t\t\tConfiguration.getResourceString(ConstantManager.VI_LANGUAGE, \"Số lượng\"));\n\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistUnit.add(unitPromo);\n\t\t\t\t\t\tmapUnit.put(unitPromo.promotionCode, unitPromo);\n\t\t\t\t\t}else{\n\t\t\t\t\t\terrRow.setContent6(messageError);\n\t\t\t\t\t\tlistUnitError.add(errRow);\n//\t\t\t\t\t\tif(mapErrorUnit.get(unitPromo.promotionCode) == null){\n//\t\t\t\t\t\t\tmapErrorUnit.put(unitPromo.promotionCode, messageError);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*if (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tlistHeader.add(header);\n\t\t\t\t\t\tmapHeader.put(header.promotionCode, header);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrRow.setContent13(messageError);\n\t\t\t\t\t\tlstHeaderError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(header.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(header.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Sheet Co cau KM\n\t\t\t/////\n\t\t\tif (detailSheet != null) {\t\n\t\t\t\tIterator<?> rowIter = detailSheet.rowIterator();\n\t\t\t\tString previousPromotionCode = null;\n\t\t\t\tint typeKM;\n\t\t\t\tMap<String, Integer> mapPromotionType = new HashMap<String, Integer>();\n\t\t\t\tiRun = 0;\n\t\t\t\tMap<String, String[]> mapArrayProduct = new HashMap<String, String[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArraySaleQuantity = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArraySaleAmount = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArrayDiscountAmount = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, Float[]> mapArrayDiscountPercent = new HashMap<String, Float[]>();\n\t\t\t\tMap<String, Integer[]> mapArrayQuantityUnit = new HashMap<String, Integer[]>();\n\t\t\t\tMap<String, String[]> mapArrayFreeProduct = new HashMap<String, String[]>();\n\t\t\t\tMap<String, BigDecimal[]> mapArrayFreeQuantity = new HashMap<String, BigDecimal[]>();\n\t\t\t\tMap<String, Integer[]> mapArrayFreeQuantityUnit = new HashMap<String, Integer[]>();\n\t\t\t\tMap<String, Boolean[]> mapArrayAndOr = new HashMap<String, Boolean[]>();\n\t\t\t\tMap<String, String[]> mapPromoGroupCode = new HashMap<String, String[]>();\n\t\t\t\tMap<String, String[]> mapPromoGroupName = new HashMap<String, String[]>();\n\t\t\t\tMap<String, String[]> mapPromoLevelCode = new HashMap<String, String[]>();\n//\t\t\t\tMap<String, Integer[]> mapMultiple = new HashMap<String, Integer[]>();\n//\t\t\t\tMap<String, Integer[]> mapRecursive = new HashMap<String, Integer[]>();\n//\t\t\t\tMap<String, Integer[]> mapDkgh = new HashMap<String,Integer[]>();\n\t\t\t\t\n\t\t\t\tLinkedHashMap<String, Integer> lstProductPromo = new LinkedHashMap<String, Integer>();\n\t\t\t\tMap<String, List<Row>> lstRow = new HashMap<String, List<Row>>();\n\t\t\t\tint indexProductPromo = 0;\n\t\t\t\tint maxSizeSheet2 = 12;\n\t\t\t\tPromotionProgram existPromotion = null;\n\t\t\t\twhile (rowIter.hasNext()) {\n\t\t\t\t\tRow myRow = (Row) rowIter.next();\n\t\t\t\t\tif (iRun == 0) {\n\t\t\t\t\t\tiRun++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean isContinue = true;\n\t\t\t\t\t//Kiem tra su hop le cua Row Import\n\t\t\t\t\tfor (int i = 0; i < maxSizeSheet2; i++) {\n\t\t\t\t\t\tif (myRow.getCell(i) != null) {\n\t\t\t\t\t\t\tisContinue = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isContinue) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tExcelPromotionDetail detail = new ExcelPromotionDetail();\n\t\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\tString messageError = \"\";\n\t\t\t\t\t//0 get promotionCode\n\t\t\t\t\tString promotionCode = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellPromotionCode = myRow.getCell(0);\n\t\t\t\t\t\tif (cellPromotionCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = cellPromotionCode.getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tpromotionCode = String.valueOf(cellPromotionCode.getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCode = getCellValueToString(cellPromotionCode);\n\t\t\t\t\t\t\tpromotionCode = promotionCode != null ? promotionCode.trim().toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmessageError += ValidateUtil.validateField(promotionCode, \"catalog.promotion.import.column.progcode\", 50, ConstantManager.ERR_REQUIRE, ConstantManager.ERR_MAX_LENGTH, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_CODE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texistPromotion = promotionProgramMgr.getPromotionProgramByCode(promotionCode);\n\t\t\t\t\t\t\tif (existPromotion == null && mapHeader.get(promotionCode) == null) {\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.not.init\") + \"\\n\";\n\t\t\t\t\t\t\t\t//messageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.program.not.exists\");\n\t\t\t\t\t\t\t\t//messageError += \"\\n\";\n\t\t\t\t\t\t\t\t//else if(existPromotion != null && mapHeader.get(promotionCode) == null){\n\t\t\t\t\t\t\t} else if(existPromotion != null && ActiveType.RUNNING.equals(existPromotion.getStatus())){\n\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.program.exists\") + \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdetail.promotionCode = promotionCode;\n\t\t\t\t\t\t\terrRow.setContent1(promotionCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(promotionCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.required\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.code\"));\n\t\t\t\t\t\t\t\tmessageError += \"\\n\";\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\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã CTKM\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//1 get type\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (myRow.getCell(1) != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tdetail.type = myRow.getCell(1).getStringCellValue();\n\t\t\t\t\t\t\t//\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tdetail.type = String.valueOf(myRow.getCell(1).getNumericCellValue());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t\t\t//\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdetail.type = getCellValueToString(myRow.getCell(1));\n\t\t\t\t\t\t\tdetail.type = detail.type != null ? detail.type.trim().toUpperCase().trim() : \"\";\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(detail.type)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (mapCheckType.get(detail.type) == null) {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.exists.before\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.type\"));\n\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t} else if (mapType.get(promotionCode) == null) {\n\t\t\t\t\t\t\t\t\tif (null != existPromotion && existPromotion.getType().equalsIgnoreCase(detail.type)) {\n\t\t\t\t\t\t\t\t\t\tmapType.put(detail.promotionCode, detail.type);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.type.is.not.same2\") + \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (!mapType.get(promotionCode).equals(detail.type)) {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.type.is.not.same2\") + \"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent2(getCellValueToString(myRow.getCell(1)));\n\t\t\t\t\t\t}else if(myRow.getCell(1) != null){\n\t\t\t\t\t\t\terrRow.setContent2(getCellValueToString(myRow.getCell(1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Loại CTKM\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//2 Mã nhóm\n\t\t\t\t\t/*try {\n\t\t\t\t\t\tCell cellGroupCode = myRow.getCell(2);\n\t\t\t\t\t\tString groupCode = null;\n\t\t\t\t\t\tif (cellGroupCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tgroupCode = getCellValueToString(cellGroupCode);\n\t\t\t\t\t\t\tmessageError = ValidateUtil.validateField(noticeCode, \"catalog.promotion.noticecode\", 100, ConstantManager.ERR_EXIST_SPECIAL_CHAR_IN_SPECIAL);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(groupCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoGroupCode = groupCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent3(groupCode);\n\t\t\t\t\t\t}else if (cellGroupCode != null) {\n\t\t\t\t\t\t\tgroupCode = getCellValueToString(cellGroupCode);\n\t\t\t\t\t\t\terrRow.setContent3(groupCode);\n\t\t\t\t\t\t}else if (cellGroupCode == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 3 Tên nhóm\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellGroupName = myRow.getCell(3);\n\t\t\t\t\t\tString groupName = null;\n\t\t\t\t\t\tif (cellGroupName != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tgroupName = getCellValueToString(cellGroupName);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(groupName)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.name.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoGroupName = groupName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent4(groupName);\n\t\t\t\t\t\t}else if (cellGroupName != null) {\n\t\t\t\t\t\t\tgroupName = getCellValueToString(cellGroupName);\n\t\t\t\t\t\t\terrRow.setContent4(groupName);\n\t\t\t\t\t\t}else if (cellGroupName == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.group.name.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t// 4 Mã mức\n\t\t\t\t\ttry {\n\t\t\t\t\t\tCell cellLevelCode = myRow.getCell(4);\n\t\t\t\t\t\tString levelCode = null;\n\t\t\t\t\t\tif (cellLevelCode != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tlevelCode = getCellValueToString(cellLevelCode);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(levelCode)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoLevelCode = levelCode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent5(levelCode);\n\t\t\t\t\t\t} else if (cellLevelCode != null) {\n\t\t\t\t\t\t\tlevelCode = getCellValueToString(cellLevelCode);\n\t\t\t\t\t\t\terrRow.setContent5(levelCode);\n\t\t\t\t\t\t}else if (cellLevelCode == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.code.obligate\") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t//5 Tên mức\n\t\t\t\t\t/*try {\n\t\t\t\t\t\tCell cellLevelName = myRow.getCell(5);\n\t\t\t\t\t\tString levelName = null;\n\t\t\t\t\t\tif (cellLevelName != null && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tlevelName = getCellValueToString(cellLevelName);\n\t\t\t\t\t\t\tif (StringUtil.isNullOrEmpty(levelName)) {\n\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.name.obligate \") + \"\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdetail.promoLevelName = levelName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terrRow.setContent6(levelName);\n\t\t\t\t\t\t} else if (cellLevelName == null) {\n\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.promotion.level.name.obligate \") + \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Tên nhóm\") + \"\\n\";\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\t//2 get productCode\n\t\t\t\t\tString productCode = \"\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 2) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductCode = myRow.getCell(2);\n\t\t\t\t\t\t\tif (cellProductCode != null) {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tproductCode = cellProductCode.getStringCellValue();\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tproductCode = String.valueOf(cellProductCode.getNumericCellValue());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tLogUtility.logError(ex, ex.getMessage());\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tproductCode = getCellValueToString(cellProductCode);\n\t\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(productCode)) {\n\t\t\t\t\t\t\t\t\tProduct product = productMgr.getProductByCode(productCode.trim());\n\t\t\t\t\t\t\t\t\tif (product == null) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.exist.in.db\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.buyproduct.code\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.productCode = productCode.toUpperCase().trim();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã Sản Phẩm Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã Sản Phẩm Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(2) != null) {\n\t\t\t\t\t\t\terrRow.setContent3(getCellValueToString(myRow.getCell(2)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.get.product.error\", productCode);\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//3 getQuantity\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 3) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellQuantity = myRow.getCell(3);\n\t\t\t\t\t\t\tif (cellQuantity != null && cellQuantity.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellQuantity.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal quantity = new BigDecimal(cellQuantity.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (quantity == null || quantity.compareTo(BigDecimal.ZERO) <= 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.saleQuantity = quantity;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"SL Sản Phẩm Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(3) != null) {\n\t\t\t\t\t\t\terrRow.setContent4(getCellValueToString(myRow.getCell(3)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"SL Sản Phẩm Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//4 get UOM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 4) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductUnit = myRow.getCell(4);\n\t\t\t\t\t\t\tif (cellProductUnit != null && cellProductUnit.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellProductUnit.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t\t\t\t\tString unit = cellProductUnit.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (unit == null || StringUtil.isNullOrEmpty(unit)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (unit.trim().toLowerCase().equals(\"LẺ\".toLowerCase())) {\n\t\t\t\t\t\t\t\t\t\tdetail.productUnit = 1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdetail.productUnit = 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Đơn Vị Tính Cho SP Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(4) != null) {\n\t\t\t\t\t\t\terrRow.setContent5(getCellValueToString(myRow.getCell(4)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Đơn Vị Tính Cho SP Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//5 getAmount\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 5) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellAmount = myRow.getCell(5);\n\t\t\t\t\t\t\tif (cellAmount != null && cellAmount.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellAmount.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal amount = BigDecimal.valueOf(cellAmount.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (amount == null || amount.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Tiền SP Mua\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.saleAmount = amount;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Tiền SP Mua\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Tiền SP Mua\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(5) != null) {\n\t\t\t\t\t\t\terrRow.setContent6(getCellValueToString(myRow.getCell(5)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Tiền SP Mua\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//6 getDiscount Amount\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 6) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellDiscountAmount = myRow.getCell(6);\n\t\t\t\t\t\t\tif (cellDiscountAmount != null && cellDiscountAmount.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellDiscountAmount.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal discountAmount = BigDecimal.valueOf(cellDiscountAmount.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (discountAmount == null || discountAmount.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Tiền SP KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.discountAmount = discountAmount;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Tiền SP KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Tiền SP KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(6) != null) {\n\t\t\t\t\t\t\terrRow.setContent7(getCellValueToString(myRow.getCell(6)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Tiền SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//7 get discount percent\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 7) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellDiscountPercent = myRow.getCell(7);\n\t\t\t\t\t\t\tif (cellDiscountPercent != null && cellDiscountPercent.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellDiscountPercent.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tFloat discountPercent = (float) cellDiscountPercent.getNumericCellValue();\n\t\t\t\t\t\t\t\t\tif (discountPercent == null || discountPercent < 0 || discountPercent > 100) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"% KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.discountPercent = discountPercent;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.column.invalid.format.float\", \"% KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"% KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(7) != null) {\n\t\t\t\t\t\t\terrRow.setContent8(getCellValueToString(myRow.getCell(7)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"DiscPer\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//8 get Free product code\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 8) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellFreeProductCode = myRow.getCell(8);\n\t\t\t\t\t\t\tif (cellFreeProductCode != null) {\n\t\t\t\t\t\t\t\tString freeProductCode = getCellValueToString(cellFreeProductCode);\n\t\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(freeProductCode)) {\n\t\t\t\t\t\t\t\t\tProduct freeProduct = productMgr.getProductByCode(freeProductCode.trim());\n\t\t\t\t\t\t\t\t\tif (freeProduct == null) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.exist.in.db\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.disproduct.code\"));\n\t\t\t\t\t\t\t\t\t\tmessageError += \"\\n\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.freeProductCode = freeProductCode.toUpperCase().trim();\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Mã SP KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(8) != null) {\n\t\t\t\t\t\t\terrRow.setContent9(getCellValueToString(myRow.getCell(8)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Mã SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//9 get free Quantity\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 9) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellFreeQuantity = myRow.getCell(9);\n\t\t\t\t\t\t\tif (cellFreeQuantity != null && cellFreeQuantity.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellFreeQuantity.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tBigDecimal freeQuantity = new BigDecimal(cellFreeQuantity.getNumericCellValue());\n\t\t\t\t\t\t\t\t\tif (freeQuantity == null || freeQuantity.compareTo(BigDecimal.ZERO) < 0) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Số Lượng KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdetail.freeQuantity = freeQuantity;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Số Lượng KM\");\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\tmessageError += R.getResource(\"catalog.promotion.import.column.null\", \"Số Lượng KM\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(9) != null) {\n\t\t\t\t\t\t\terrRow.setContent10(getCellValueToString(myRow.getCell(9)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"Số Lượng KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//10 get Free UOM\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 10) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellProductUnit = myRow.getCell(10);\n\t\t\t\t\t\t\tif (cellProductUnit != null && cellProductUnit.getCellType() != Cell.CELL_TYPE_BLANK) {\n\t\t\t\t\t\t\t\tif (cellProductUnit.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t\t\t\t\tString unit = cellProductUnit.getStringCellValue();\n\t\t\t\t\t\t\t\t\tif (unit == null || StringUtil.isNullOrEmpty(unit)) {\n\t\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"common.not.date\", \"Đơn Vị Tính cho SP KM\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (unit.trim().toLowerCase().equals(\"LẺ\".toLowerCase())) {\n\t\t\t\t\t\t\t\t\t\tdetail.freeProductUnit = 1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdetail.freeProductUnit = 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.column.invalid.format.number\", \"Đơn Vị Tính cho SP KM\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (myRow.getCell(10) != null) {\n\t\t\t\t\t\t\terrRow.setContent11(getCellValueToString(myRow.getCell(10)));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.string\", iRun, \"Đơn Vị Tính cho SP KM\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t//11 get And Or\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (checkColumnNecessary(detail.type, 11) && StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\t\tCell cellAndOrCell = myRow.getCell(11);\n\t\t\t\t\t\t\tif (cellAndOrCell != null) {\n\t\t\t\t\t\t\t\tString value;\n\t\t\t\t\t\t\t\tif (cellAndOrCell.getCellType() != Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t\t\t\t\tvalue = cellAndOrCell.getStringCellValue();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvalue = String.valueOf((float) cellAndOrCell.getNumericCellValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (\"X\".equals(value.trim().toUpperCase())) {\n\t\t\t\t\t\t\t\t\tdetail.andOr = true;\n\t\t\t\t\t\t\t\t\terrRow.setContent12(value);\n\t\t\t\t\t\t\t\t} else if (\"\".equals(value.trim().toUpperCase())) {\n\t\t\t\t\t\t\t\t\tdetail.andOr = false;\n\t\t\t\t\t\t\t\t\terrRow.setContent12(value);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\terrRow.setContent13(value);\n\t\t\t\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.read.cell.format.invalid\", iRun, \"AllFreeItemcode\", \"['','X']\");\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\tdetail.andOr = false;\n\t\t\t\t\t\t\t\terrRow.setContent12(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.read.cell.format.invalid\", iRun, \"AllFreeItemcode\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 12 ĐKGH\n\t\t\t\t\t/*try{\n\t\t\t\t\t\tApParam apParam = apParamMgr.getApParamByCode(\"LIST_ALLOW_DKGH\", ApParamType.LIST_ALLOW_DKGH);\n\t\t\t\t\t\tString strListPromo = apParam.getApParamName();\n\t\t\t\t\t\tCell cellDKGH = myRow.getCell(17);\n\t\t\t\t\t\tString[] ListAllow = strListPromo.split(\",\");\n\t\t\t\t\t\tif(Arrays.asList(ListAllow).contains(detail.type)){\n\t\t\t\t\t\t\tif(cellDKGH != null && StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\t\tString dkgh = getCellValueToString(cellDKGH);\n\t\t\t\t\t\t\t\tif(dkgh != null \n\t\t\t\t\t\t\t\t\t\t&& (Constant.HAVE_CONDITION.equals(dkgh) || (Constant.NON_CONDITION.equals(dkgh)))){\n\t\t\t\t\t\t\t\t\tdetail.dkgh = Integer.parseInt(dkgh.trim());\n\t\t\t\t\t\t\t\t}else if(dkgh != null){\n\t\t\t\t\t\t\t\t\tmessageError += R.getResource(\"catalog.promotion.import.dkgh.incorrect.format\")+\"\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\terrRow.setContent18(dkgh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(cellDKGH != null){\n\t\t\t\t\t\t\tString dkgh = getCellValueToString(cellDKGH);\n\t\t\t\t\t\t\terrRow.setContent18(dkgh);\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\tmessageError += Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.import.cant.read.cell.number\", iRun, \"DKGH\", \"['','X']\");\n\t\t\t\t\t\tLogUtility.logError(e, e.getMessage());\n\t\t\t\t\t}*/\n\t\t\t\t\tif (mapPromotionTypeCheck.get(detail.promotionCode) == null) {\n\t\t\t\t\t\tmapPromotionTypeCheck.put(detail.promotionCode, detail.type);\n\t\t\t\t\t}\n\t\t\t\t\tif (!promotionCode.equals(previousPromotionCode)) {\n\t\t\t\t\t\tif (mapPromotionType.get(detail.promotionCode) != null) {//da ton tai ctkm nay truoc do roi\n\t\t\t\t\t\t\t//typeKM = mapPromotionType.get(detail.promotionCode);//=> lay ra loai cua no thoi\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null\n\t\t\t\t\t\t\t\t\t&& detail.freeQuantity.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 1;//ZV03\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 2;//ZV02\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 3;//ZV01\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null\n\t\t\t\t\t\t\t\t\t&& detail.freeQuantity.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 4;\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 5;\n\t\t\t\t\t\t\t} else if (!StringUtil.isNullOrEmpty(detail.productCode) && detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 6;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null && detail.freeQuantity.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 7;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 8;\n\t\t\t\t\t\t\t} else if (detail.saleAmount != null && detail.saleAmount.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 9;\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && !StringUtil.isNullOrEmpty(detail.freeProductCode) && detail.freeQuantity != null && detail.freeQuantity.compareTo(\n\t\t\t\t\t\t\t\t\tBigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 10;//ZV24\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountAmount != null && detail.discountAmount.compareTo(BigDecimal.ZERO) > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 11;//ZV23\n\t\t\t\t\t\t\t} else if (detail.saleQuantity != null && detail.saleQuantity.compareTo(BigDecimal.ZERO) > 0 && detail.discountPercent != null && detail.discountPercent > 0) {\n\t\t\t\t\t\t\t\ttypeKM = 12;//ZV22\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttypeKM = -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapPromotionType.put(detail.promotionCode, typeKM);\n\t\t\t\t\t\t\tpreviousPromotionCode = detail.promotionCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//typeKM = mapPromotionType.get(detail.promotionCode);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tList<Row> lstR = lstRow.get(detail.promotionCode);\n\t\t\t\t\t\tif (lstR == null) {\n\t\t\t\t\t\t\tlstR = new ArrayList<Row>();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmessageError = checkDuplicate(mapType.get(detail.promotionCode), lstR, myRow);\n\t\t\t\t\t\tif(StringUtil.isNullOrEmpty(messageError)){\n\t\t\t\t\t\t\tlistDetail.add(detail);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlstR.add(myRow);\n\t\t\t\t\t\tlstRow.put(detail.promotionCode, lstR);\n\t\t\t\t\t}\n\t\t\t\t\tif (StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\t\tif (mapArrayProduct.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tString[] arrProduct = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrProduct[iRun] = detail.productCode;\n\t\t\t\t\t\t\tmapArrayProduct.put(detail.promotionCode, arrProduct);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrProduct[iRun] = detail.productCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArraySaleQuantity.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrSaleQuantity[iRun] = detail.saleQuantity;\n\t\t\t\t\t\t\tmapArraySaleQuantity.put(detail.promotionCode, arrSaleQuantity);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrSaleQuantity[iRun] = detail.saleQuantity;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayQuantityUnit.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tInteger[] arrUnit = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.productUnit;\n\t\t\t\t\t\t\tmapArrayQuantityUnit.put(detail.promotionCode, arrUnit);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tInteger[] arrUnit = mapArrayQuantityUnit.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.productUnit;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArraySaleAmount.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleAmount = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrSaleAmount[iRun] = detail.saleAmount;\n\t\t\t\t\t\t\tmapArraySaleAmount.put(detail.promotionCode, arrSaleAmount);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrSaleAmount[iRun] = detail.saleAmount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeProduct.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tString[] arrFreeProduct = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeProductCode;\n\t\t\t\t\t\t\tmapArrayFreeProduct.put(detail.promotionCode, arrFreeProduct);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeProductCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeQuantityUnit.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tInteger[] arrUnit = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.freeProductUnit;\n\t\t\t\t\t\t\tmapArrayFreeQuantityUnit.put(detail.promotionCode, arrUnit);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tInteger[] arrUnit = mapArrayFreeQuantityUnit.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrUnit[iRun] = detail.freeProductUnit;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayFreeQuantity.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrFreeQuantity[iRun] = detail.freeQuantity;\n\t\t\t\t\t\t\tmapArrayFreeQuantity.put(detail.promotionCode, arrFreeQuantity);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrFreeProduct = mapArrayFreeQuantity.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrFreeProduct[iRun] = detail.freeQuantity;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayDiscountAmount.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBigDecimal[] arrDiscountAmount = new BigDecimal[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDiscountAmount[iRun] = detail.discountAmount;\n\t\t\t\t\t\t\tmapArrayDiscountAmount.put(detail.promotionCode, arrDiscountAmount);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBigDecimal[] arrDiscountAmount = mapArrayDiscountAmount.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDiscountAmount[iRun] = detail.discountAmount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayDiscountPercent.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tFloat[] arrDiscountPercent = new Float[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDiscountPercent[iRun] = detail.discountPercent;\n\t\t\t\t\t\t\tmapArrayDiscountPercent.put(detail.promotionCode, arrDiscountPercent);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tFloat[] arrDiscountPercent = mapArrayDiscountPercent.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDiscountPercent[iRun] = detail.discountPercent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mapArrayAndOr.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tBoolean[] arrAndOr = new Boolean[MAX_ARRAY];\n\t\t\t\t\t\t\tarrAndOr[iRun] = detail.andOr;\n\t\t\t\t\t\t\tmapArrayAndOr.put(detail.promotionCode, arrAndOr);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrAndOr[iRun] = detail.andOr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ma nhom\n\t\t\t\t\t\tif(mapPromoGroupCode.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrPromoGroupCode = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrPromoGroupCode[iRun] = detail.promoGroupCode;\n\t\t\t\t\t\t\tmapPromoGroupCode.put(detail.promotionCode, arrPromoGroupCode);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrPromoGroupCode = mapPromoGroupCode.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrPromoGroupCode[iRun] = detail.promoGroupCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ten nhom\n\t\t\t\t\t\tif(mapPromoGroupName.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrPromoGroupName = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrPromoGroupName[iRun] = detail.promoGroupName;\n\t\t\t\t\t\t\tmapPromoGroupName.put(detail.promotionCode, arrPromoGroupName);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrPromoGroupName = mapPromoGroupName.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrPromoGroupName[iRun] = detail.promoGroupName;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Ma muc\n\t\t\t\t\t\tif(mapPromoLevelCode.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tString[] arrayPromoLevelCode = new String[MAX_ARRAY];\n\t\t\t\t\t\t\tarrayPromoLevelCode[iRun] = detail.promoLevelCode;\n\t\t\t\t\t\t\tmapPromoLevelCode.put(detail.promotionCode, arrayPromoLevelCode);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tString[] arrayPromoLevelCode = mapPromoLevelCode.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrayPromoLevelCode[iRun] = detail.promoLevelCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Bội số\n\t\t\t\t\t\t/*if(mapMultiple.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrMultiple = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrMultiple[iRun] = detail.multiple;\n\t\t\t\t\t\t\tmapMultiple.put(detail.promotionCode, arrMultiple);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrMultiple = mapMultiple.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrMultiple[iRun] = detail.multiple;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map Tối ưu\n\t\t\t\t\t\tif(mapRecursive.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrRecursive = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrRecursive[iRun] = detail.recursive;\n\t\t\t\t\t\t\tmapRecursive.put(detail.promotionCode, arrRecursive);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrRecursive = mapRecursive.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrRecursive[iRun] = detail.recursive;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// map ĐKGH\n\t\t\t\t\t\tif(mapDkgh.get(detail.promotionCode) == null){\n\t\t\t\t\t\t\tInteger[] arrDkgh = new Integer[MAX_ARRAY];\n\t\t\t\t\t\t\tarrDkgh[iRun] = detail.dkgh;\n\t\t\t\t\t\t\tmapDkgh.put(detail.promotionCode, arrDkgh);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tInteger[] arrDkgh = mapDkgh.get(detail.promotionCode);\n\t\t\t\t\t\t\tarrDkgh[iRun] = detail.dkgh;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(detail.productCode) && lstProductPromo.get(detail.promotionCode + \"-\" + detail.productCode) == null) {\n\t\t\t\t\t\t\tlstProductPromo.put(detail.promotionCode + \"-\" + detail.productCode, indexProductPromo++);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//error\n\t\t\t\t\t\terrRow.setContent13(messageError);\n\t\t\t\t\t\tlstDetailError.add(errRow);\n\t\t\t\t\t\tif (mapErrorPromotion.get(detail.promotionCode) == null) {\n\t\t\t\t\t\t\tmapErrorPromotion.put(detail.promotionCode, messageError);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// totalItem++;\n\t\t\t\t\tiRun++;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * put vao group level\n\t\t\t\t */\n\t\t\t\tString messageError = \"\";\n\t\t\t\tCellBean errRow = new CellBean();\n\t\t\t\t\n\t\t\t\tfor (String promotionProgramCode : mapPromotionType.keySet()) {\n\t\t\t\t\tInteger unit = -1;\n\t\t\t\t\tString[] arrPromoGroupCode = mapPromoGroupCode.get(promotionProgramCode);\n\t\t\t\t\tString[] arrPromoGroupName = mapPromoGroupName.get(promotionProgramCode);\n\t\t\t\t/*\tString[] arrPromoLevelCode = mapPromoLevelCode.get(promotionProgramCode);\n\t\t\t\t\tInteger[] arrMultiple = mapMultiple.get(promotionProgramCode);\n\t\t\t\t\tInteger[] arrRecursive = mapRecursive.get(promotionProgramCode);\t\t*/\t\t\t\n//\t\t\t\t\tInteger[] arrDkgh = mapDkgh.get(promotionProgramCode);\n\t\t\t\t\t\n\t\t\t\t\tif (mapPromotionType.get(promotionProgramCode) == 1) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 2) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 3) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(1), B(1) dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantityProduct(arrProduct, arrProductUnit, arrSaleQuantity, arrAndOr, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleQuantity[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n//\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], unit, arrSaleQuantity[i], indexMua++, i, arrProduct, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 4) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 5) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 6) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua A(10.000), B(10.000) dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tString[] arrProduct = mapArrayProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortAmountProduct(arrProduct, arrProductUnit, arrSaleAmount, arrAndOr, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrProduct != null && i < arrProduct.length; i++) {\n\t\t\t\t\t\t\tif (!StringUtil.isNullOrEmpty(arrProduct[i]) && arrSaleAmount[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrProduct[i], arrSaleAmount[i], indexMua++, i, arrProduct, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 7) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... C(1), D(1)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 8) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... 10.000\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, null, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.multiple = arrMultiple[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n//\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 9) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * mua 10000 dc km ... 10%\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleAmount = mapArraySaleAmount.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\tsortAmount(arrSaleAmount, null, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrSaleAmount != null && i < arrSaleAmount.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleAmount[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t/*\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(2, arrSaleAmount[i], null, indexMua++, i, arrSaleAmount, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 10) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ZV24\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tString[] arrFreeProduct = mapArrayFreeProduct.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeQuantity = mapArrayFreeQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tBoolean[] arrAndOr = mapArrayAndOr.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrFreeProductUnit = mapArrayFreeQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, arrAndOr, arrFreeProduct, arrFreeProductUnit, arrFreeQuantity, null, null);\n\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && !StringUtil.isNullOrEmpty(arrFreeProduct[i]) && arrFreeQuantity[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t/*\t\t\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupKM.qttUnit = arrFreeProductUnit[i];\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], null, indexMua++, i, arrSaleQuantity, arrFreeProduct, arrFreeQuantity);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(mapPromotionTypeCheck.get(promotionProgramCode), arrFreeProduct[i], unit, arrFreeQuantity[i], arrAndOr[i], indexKM++, i, arrFreeProduct, arrFreeQuantity, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 11) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * ZV23\n\t\t\t\t\t\t */\n\t\t\t\t\t\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tBigDecimal[] arrFreeAmount = mapArrayDiscountAmount.get(promotionProgramCode);\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, null, null, null, null, arrFreeAmount, null);\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && arrFreeAmount[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t/*\tgroupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t/*\t\tgroupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrFreeAmount[i], indexKM++, i, arrFreeAmount, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (mapPromotionType.get(promotionProgramCode) == 12) {\n\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\tBigDecimal[] arrSaleQuantity = mapArraySaleQuantity.get(promotionProgramCode);\n\t\t\t\t\t\tInteger[] arrProductUnit = mapArrayQuantityUnit.get(promotionProgramCode);\n\t\t\t\t\t\tFloat[] arrPercent = mapArrayDiscountPercent.get(promotionProgramCode);\n\t\t\t\t\t\t//Sort theo saleQuantity\n\t\t\t\t\t\tsortQuantity(arrSaleQuantity, null, null, null, null, null, arrPercent);\n\t\t\t\t\t\tfor (int i = 0; arrSaleQuantity != null && i < arrSaleQuantity.length; i++) {\n\t\t\t\t\t\t\tif (arrSaleQuantity[i] != null && arrPercent[i] != null) {\n\t\t\t\t\t\t\t\tGroupMua groupMua;\n\t\t\t\t\t\t\t\tGroupKM groupKM;\n\t\t\t\t\t\t\t\tunit = arrProductUnit[i];\n\t\t\t\t\t\t\t\tif (mapPromotionMua.get(promotionProgramCode) != null && mapPromotionKM.get(promotionProgramCode) != null) {\n\t\t\t\t\t\t\t\t\tgroupMua = mapPromotionMua.get(promotionProgramCode).get(mapPromotionMua.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t\tgroupKM = mapPromotionKM.get(promotionProgramCode).get(mapPromotionKM.get(promotionProgramCode).size() - 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tListGroupMua lstGroupMua = new ListGroupMua();\n\t\t\t\t\t\t\t\t\tListGroupKM lstGroupKM = new ListGroupKM();\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tgroupMua.groupCode = \"N\" + (lstGroupMua.size() + 1);\n\t\t\t\t\t\t\t\t\t//groupMua.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupMua.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupMua.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupMua.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupMua.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.qttUnit = unit;\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\t//groupKM.groupCode = \"N\" + (lstGroupKM.size() + 1);\n\t\t\t\t\t\t\t\t\tgroupKM.groupCode = arrPromoGroupCode[i];\n\t\t\t\t\t\t\t\t\tgroupKM.groupName = arrPromoGroupName[i];\n\t\t\t\t\t\t\t\t\t/*groupKM.multiple = arrMultiple[i];\n\t\t\t\t\t\t\t\t\tgroupKM.recursive = arrRecursive[i];\n\t\t\t\t\t\t\t\t\tgroupKM.dkgh = arrDkgh[i];*/\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tgroupMua.order = lstGroupMua.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupKM.order = lstGroupKM.size() + 1;\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tmapPromotionMua.put(promotionProgramCode, lstGroupMua);\n\t\t\t\t\t\t\t\t\tmapPromotionKM.put(promotionProgramCode, lstGroupKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGroupSP groupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\tif (groupSPMua == null) {\n\t\t\t\t\t\t\t\t\tgroupMua = new GroupMua();\n\t\t\t\t\t\t\t\t\tList<GroupMua> lstGroupMua = mapPromotionMua.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupMua.add(groupMua);\n\t\t\t\t\t\t\t\t\tgroupSPMua = groupMua.add2Level(1, arrSaleQuantity[i], arrProductUnit[i], indexMua++, i, arrSaleQuantity, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tList<Long> lstIndex = mapMuaKM.get(groupSPMua.index);//lay danh sach cac index muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tList<GroupSP> lstLevelKM = groupKM.searchIndex(lstIndex);//lay danh sach cac muc duoc map voi muc sp mua\n\t\t\t\t\t\t\t\tGroupSP groupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\tif (groupSPKM == null) {\n\t\t\t\t\t\t\t\t\tgroupKM = new GroupKM();\n\t\t\t\t\t\t\t\t\tList<GroupKM> lstGroupKM = mapPromotionKM.get(promotionProgramCode);\n\t\t\t\t\t\t\t\t\tlstGroupKM.add(groupKM);\n\t\t\t\t\t\t\t\t\tgroupSPKM = groupKM.add2Level(arrPercent[i], indexKM++, i, arrPercent, lstLevelKM);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmapMuaKM.put(groupSPMua.index, groupSPKM.index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!StringUtil.isNullOrEmpty(messageError)) {\n\t\t\t\t\terrRow.setContent14(messageError);\n\t\t\t\t\tlstDetailError.add(errRow);\n\t\t\t\t}\n\t\t\t\tfor (String promotionProgramCode : mapPromotionType.keySet()) {\n\t\t\t\t\tsplitGroup(mapPromotionMua.get(promotionProgramCode), mapPromotionKM.get(promotionProgramCode), mapMuaKM, promotionProgramCode, lstProductPromo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void browseAllCells() throws IOException, InvalidFormatException {\n Sheet sheet = workbook.getSheetAt(0);\n\n // Create a DataFormatter to format and get each cell's value as String\n DataFormatter dataFormatter = new DataFormatter();\n\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\n Iterator<Row> rowIterator = sheet.rowIterator();\n while (rowIterator.hasNext()) {\n Row row = rowIterator.next();\n\n // Now let's iterate over the columns of the current row\n Iterator<Cell> cellIterator = row.cellIterator();\n\n while (cellIterator.hasNext()) {\n Cell cell = cellIterator.next();\n String cellValue = dataFormatter.formatCellValue(cell);\n System.out.print(cellValue + \"\\t\");\n }\n System.out.println();\n }\n // Closing the workbook\n this.workbook.close();\n\n\n }", "public Sheet cloneSheet(int arg0) {\n\t\treturn null;\n\t}", "public void expandCells() {\n\t\t//For the first pollutant create a new set of files\n\t\tString[] pollutants = factorsTable.keySet().toArray(new String[1]);\n\t\t\n\t\t//Now, for each row, we need to expand the total flow for each \n\t\t//type of day and for each hour of the day.\n\t\tdouble[] factorsRow = null;\n\t\tString key = null;\n\t\tfor(String type:types){\n\t\t\ttotalsTable = new TableTotal(0, 83, 84);\n\t\t\ttotalsTable.setLabels(pollutants);\n\t\t\tfor(int i=0;i<nHours;i++){\t\n\t\t\t\tkey = pollutants[0];\n\t\t\t\tfactorsRow = factorsTable.get(key);\n\t\t\t\t//Open the output file\n\t\t\t\tOutputSheet outputSheet =new OutputSheet(outputModel);\n\t\t\t\toutputSheet.setPost(\"_\"+key+\"_\"+type+\"_\"+(i*100));\n\t\t\t\t\n\t\t\t\t//Get iterator to all the rows in current sheet\n\t\t\t\tIterator<Row> rowIterator = cells.iterator();\n\t\t\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\t\t\tRow row = null;//The current cell\n\t\t\t\t//int k=0;\n\t\t\t\twhile(rowIterator.hasNext()){\n\t\t\t\t\t//System.out.println(k++);\n\t\t\t\t\trow = rowIterator.next();\n\t\t\t\t\tdouble sharedKey = row.getCell(CELLKEY).getNumericCellValue();\n\t\t\t\t\tint fidGrid = (int)row.getCell(CELL_FID_GRID).getNumericCellValue();\n\t\t\t\t\t//double total = row.getCell(CELLQUERY).getNumericCellValue();\n\t\t\t\t\tdouble longitude = row.getCell(CELL_LONGUITUDE).getNumericCellValue();\n\t\t\t\t\t\n\t\t\t\t\tString fullKey = Math.round(sharedKey)+type+i*100;\n\t\t\t\t\tdouble[] values = null;\n\t\t\t\t\tif(tableValues.containsKey(fullKey)){\n\t\t\t\t\t\tvalues = tableValues.get(fullKey);\n\t\t\t\t\t\toutputSheet.push(values, fidGrid, longitude);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputSheet.replaceFactors(factorsRow);\n\t\t\t\toutputSheet.save();\n\t\t\t\t//Update the total\n\t\t\t\ttotalsTable.updateTotals(outputSheet.getSheet(), 0);\n\t\t\t\t\n\t\t\t\t//Now, for each other contaminant a new set of files have to be created\n\t\t\t\tfor(int k=pollutants.length-1;k>0;k--){\n\t\t\t\t\tkey=pollutants[k];\n\t\t\t\t\tfactorsRow = factorsTable.get(key);\n\t\t\t\t\toutputSheet.setPost(\"_\"+key+\"_\"+type+\"_\"+(i*100));\n\t\t\t\t\toutputSheet.replaceFactors(factorsRow);\n\t\t\t\t\toutputSheet.save();\n\t\t\t\t\t\n\t\t\t\t\t//Update the total\n\t\t\t\t\ttotalsTable.updateTotals(outputSheet.getSheet(), k);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\ttotalsTable.save(new File(outputModel.getAbsolutePath().replace(\"output.xlsx\", \"outputTotals_\"+type+\".csv\")));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"The totals file could not be saved\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void inputData(int[][] board) {\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tboard[i][j]=0;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String getDatacolumn(String sheetName){\n\t\t\r\n\t\tfor (int i = 0; i < row.getLastCellNum(); i++) {\r\n\t\t\t//System.out.print(data[i][colNum]);\r\n\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\tString valuString= sheet.getRow(i ).getCell(j).toString();\r\n\t\t\t\tSystem.out.println(\"[\"+i+\"]\"+\"[\"+j+\"]\"+\" =\"+ valuString);\r\n\t\t\t\t//start\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsheet=workbook.getSheet(sheetName);\r\n\t\t\t\t\trow=sheet.getRow(i);\r\n\t\t\t\t\tcell=row.getCell(j);\r\n\t\t\t\t\tif (cell.getCellTypeEnum()==CellType.STRING) {\r\n\t\t\t\t\treturn cell.getStringCellValue();\t\r\n\t\t\t\t\t}else if (cell.getCellTypeEnum()==CellType.NUMERIC || cell.getCellTypeEnum()==CellType.FORMULA) {\r\n\t\t\t\t\tString cellValue =String.valueOf(cell.getNumericCellValue());\r\n\t\t\t\t\tif (HSSFDateUtil.isCellDateFormatted(cell)) {\r\n\t\t\t\t\tDateFormat dt=\tnew SimpleDateFormat(\"dd/MM/yy\");\r\n\t\t\t\t\tDate date =cell.getDateCellValue();\r\n\t\t\t\t\tcellValue =dt.format(date);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn cellValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (cell.getCellTypeEnum()==CellType.BLANK)\r\n\t\t\t\t\t\treturn\" \";\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\treturn String.valueOf(cell.getBooleanCellValue());\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} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn \"No Match Value Found\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//finish\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\treturn sheetName;\r\n\r\n\t\t//return data;\r\n\r\n\t}", "public void addNewIDtoCells() {\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIteratorA = cells.iterator();\n\t\t\n\t\trowIteratorA.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tint previousValue = -1;\n\t\tdouble key = -1;\n\t\t//For each row we will read the info. 12\n\t\twhile(rowIteratorA.hasNext()){\n\t\t\trow = rowIteratorA.next();\n\t\t\tdouble currentValue = Math.round(row.getCell(CELLQUERY).getNumericCellValue()*100)/100;\n\t\t\t//System.out.println(i++);\n\t\t\tif(currentValue!=previousValue){\n\t\t\t\tif(table.containsKey(currentValue))\n\t\t\t\t\tkey=table.get(currentValue);\n\t\t\t\telse\n\t\t\t\t\tkey=-1;\n\t\t\t}\n\t\t\trow.createCell(CELLKEY);\n\t\t\trow.getCell(CELLKEY).setCellValue(key);\n\t\t\tif(key==-1){\n\t\t\t\tSystem.err.println(\"Error: Value \"+currentValue+\" was not found in the matching table\");\n\t\t\t}\n\t\t}\n\t\tFileOutputStream dataFileOut;\n\t\ttry {\n\t\t\tdataFileOut = new FileOutputStream(\n\t\t\t\t\tcellsFile.getAbsolutePath().replace(\".xlsx\", \"out.xlsx\"));\n\t\t\t//System.out.println(dataFileOut+\" \"+cellsWorkbook);\n\t\t\t\n\t\t\tcellsWorkbook.write(dataFileOut);\n\t\t\tdataFileOut.flush();\n\t\t\tdataFileOut.close();\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\t\n\t}", "private static void addHeading(Sheet sheet) throws IOException {\r\n sheet.ensureRowCount(4);\r\n sheet.ensureColumnCount(10);\r\n sheet.getCellAt(\"A1\").setValue(\"income\");\r\n sheet.getCellAt(\"A2\").setValue(\"expense\");\r\n sheet.getCellAt(\"A3\").setValue(\"sum\");\r\n sheet.getCellAt(\"B1\").setValue(0.0);\r\n sheet.getCellAt(\"B2\").setValue(0.0);\r\n sheet.getCellAt(\"B3\").setValue(0.0);\r\n sheet.getCellAt(\"A4\").setValue(\"id\");\r\n sheet.getCellAt(\"B4\").setValue(\"amount\");\r\n sheet.getCellAt(\"C4\").setValue(\"date\");\r\n sheet.getCellAt(\"D4\").setValue(\"info\");\r\n }", "public Object[][] getData(File file, String sheetName, int maxColumn ) throws IOException {\n Object data[][] = null;\n\n // tao ra input tu file\n FileInputStream ExcelFile = new FileInputStream(file);\n // tao 1 workbook moi\n xf = new XSSFWorkbook(ExcelFile);\n // lay ten sheet\n sheet = xf.getSheet(sheetName);\n // lay column\n //mang \n data = new Object[sheet.getLastRowNum()][maxColumn - 1];\n for (int i = 1; i < sheet.getLastRowNum() + 1; i++) { // lap theo hang\n\n for (int j = 1; j < maxColumn; j++) { // lap theo cot\n\n cell = sheet.getRow(i).getCell(j); // lay du lieu\n int dataType = cell.getCellType(); // lay kieu du lieu\n\n if (dataType == 1) {\n cell.setCellType(Cell.CELL_TYPE_STRING);\n data[i - 1][j - 1] = cell.getStringCellValue();\n\n }\n if (dataType == 0) {\n cell.setCellType(Cell.CELL_TYPE_NUMERIC);\n data[i - 1][j - 1] = (int) cell.getNumericCellValue();\n }\n if (dataType == 4) {\n cell.setCellType(Cell.CELL_TYPE_BOOLEAN);\n\n data[i - 1][j - 1] = cell.getBooleanCellValue();\n\n }\n if (dataType == 3) {\n cell.setCellType(Cell.CELL_TYPE_BLANK);\n\n data[i - 1][j - 1] = \"\";\n }\n\n }\n\n }\n\n return data;\n }", "int getSheetCount();", "@Override\n public int getBeats() {\n return this.sheet.size();\n }", "private void handle_merged_cells(Sheet sheet) {\n\t \tfor (int i = 0 ; i < sheet.getNumMergedRegions() ; i++) {\n\t \t//don't merge beyond sheet\n\t \t\tCellRangeAddress merged_region = sheet.getMergedRegion(i);\n\t \t\tint c_f = merged_region.getFirstColumn();\n\t \t\tint c_l = merged_region.getLastColumn()+1;\n\t \t\tc_l = Math.min(c_l, this.vals[0].length -1);\n\t \t\tint r_f = merged_region.getFirstRow();\n\t \t\tint r_l = merged_region.getLastRow()+1;\n\t \t\tObject fill_element = this.vals[r_f][c_f];\n\t \t\tint fill_type = this.types[r_f][c_f];\n\t \t\tfor(int r_ind = r_f; r_ind < r_l; r_ind++) {\n\t \t\t\tfor (int c_ind = c_f; c_ind < c_l; c_ind ++) {\n\t \t\t\t\tthis.vals[r_ind][c_ind] = fill_element;\n\t \t\t\t\tthis.types[r_ind][c_ind] = fill_type;\n\t \t\t\t}\n\t \t\t}\n\t\t \t//self.row_vals[r_r[0]:r_r[1], c_r[0]:c_r[1]] = self.row_vals[r_r[0], c_r[0]]\n\t\t \t//self.xls_types[r_r[0]:r_r[1], c_r[0]:c_r[1]] = self.xls_types[r_r[0], c_r[0]]\n\t \t}\n }", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "public static void main(String[] args) throws IOException, InvalidFormatException {\n Workbook workbook = WorkbookFactory.create(new File(SAMPLE_XLSX_FILE_PATH));\r\n\r\n // Retrieving the number of sheets in the Workbook\r\n System.out.println(\"Workbook has \" + workbook.getNumberOfSheets() + \" Sheets : \");\r\n\r\n /*\r\n =============================================================\r\n Iterating over all the sheets in the workbook (Multiple ways)\r\n =============================================================\r\n */\r\n\r\n // 1. You can obtain a sheetIterator and iterate over it\r\n Iterator<Sheet> sheetIterator = workbook.sheetIterator();\r\n System.out.println(\"Retrieving Sheets using Iterator\");\r\n while (sheetIterator.hasNext()) {\r\n Sheet sheet = sheetIterator.next();\r\n System.out.println(\"=> \" + sheet.getSheetName());\r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n }\r\n\r\n\r\n\r\n /*\r\n ==================================================================\r\n Iterating over all the rows and columns in a Sheet (Multiple ways)\r\n ==================================================================\r\n */\r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet = workbook.getSheetAt(0);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator = sheet.rowIterator();\r\n int noOfColumns=0;\r\n \r\n while (rowIterator.hasNext()) {\r\n Row row =(Row) rowIterator.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet1 = workbook.getSheetAt(1);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet1);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter1 = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator1 = sheet1.rowIterator();\r\n int noOfColumns1=0;\r\n \r\n while (rowIterator1.hasNext()) {\r\n Row row =(Row) rowIterator1.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter1.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns1=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows1 = sheet1.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows1);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns1);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet11 = workbook.getSheetAt(2);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet11);\r\n \r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter11 = new DataFormatter();\r\n\r\n // You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator11 = sheet11.rowIterator();\r\n int noOfColumns11=0;\r\n \r\n while (rowIterator11.hasNext()) {\r\n Row row =(Row) rowIterator11.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter11.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns11=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows11 = sheet11.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows11);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns11);\r\n // Closing the workbook\r\n workbook.close();\r\n }", "public static void readingMultiRange() throws IOException {\n\t\tList<String> ranges = Arrays.asList(\"A1:E3\", \"A4:E6\");\n\t\tBatchGetValuesResponse readResult = sheetService.spreadsheets().values().batchGet(spreadSheetID)\n\t\t\t\t.setRanges(ranges).execute();\n\t\tValueRange JanTotal = readResult.getValueRanges().get(0);\n\t\tValueRange FebTotal = readResult.getValueRanges().get(1);\n\n// System.out.println(\"Jan \\n\" + \"Number of rows: \" + JanTotal.size() + \"\\n\" + \"Number of columns: \" + JanTotal.getValues().get(0).size());\n// System.out.println(\"Feb \\n\" + \"Number of rows: \" + FebTotal.size() + \"\\n\" + \"Number of columns: \" + FebTotal.getValues().get(0).size());\n\t\tfor (int i = 0; i < JanTotal.size(); i++) {\n\t\t\tfor (int j = 0; j < JanTotal.getValues().get(i).size(); j++) {\n\t\t\t\tif (j < JanTotal.getValues().get(i).size() - 1) {\n\t\t\t\t\tSystem.out.printf(\"%s \\t\", JanTotal.getValues().get(i).get(j));\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.printf(\"%s \\t \\n\", JanTotal.getValues().get(i).get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < FebTotal.size(); i++) {\n\t\t\tfor (int j = 0; j < FebTotal.getValues().get(i).size(); j++) {\n\t\t\t\tif (j < FebTotal.getValues().get(i).size() - 1) {\n\t\t\t\t\tSystem.out.printf(\"%s \\t\", FebTotal.getValues().get(i).get(j));\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.printf(\"%s \\t \\n\", FebTotal.getValues().get(i).get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int countEmptyCells()\n\t{\n\t\tint count = 0;\n\t\tfor(int i=0;i<this.numberOfRows;i+=1)\n\t\t{\n\t\t\tfor(int j=0;j<this.numberOfColumns;j+=1)\n\t\t\t{\n\t\t\t\tif(this.board[i][j].value==0)\n\t\t\t\t{\n\t\t\t\t\tcount+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public static void main(String[] args) throws Exception {\n File source= new File(\"C:/Development/DataFiles/LoginData.xlsx\");\r\n FileInputStream fis = new FileInputStream(source);\r\n XSSFWorkbook wb = new XSSFWorkbook(fis);\r\n\tXSSFSheet sh = wb.getSheetAt(0);\r\n//\tString data0= sh.getRow(1).getCell(1).getStringCellValue();\r\n//\tSystem.out.println( data0);\r\n\tint rowcount=sh.getLastRowNum();\r\n\t//string colcount=sh.col\r\n\t//System.out.println( colcount);\r\n/*\tfor (int i=0;i<=rowcount;i++)\r\n\t{\r\n\t\tString data1= sh.getRow(i).getCell(0).getStringCellValue();\r\n\t\tif (data1==\"end\")\r\n\t\t\t{\r\n\t\t\t\t\tsh.getRow(i+1);\r\n\t\t\t}\r\n\t\t\r\n\t\tSystem.out.println(data1);\r\n\t\tSystem.out.println();\r\n\t}*/\r\n\t\r\n\tfor (@SuppressWarnings(\"rawtypes\") org.apache.poi.ss.usermodel.Sheet sh1 : wb ) {\r\n for (Row row : sh) {\r\n for (Cell cell : row) {\r\n // Do something here\r\n }\r\n }\r\n }\r\n\twb.close();\r\n\t}", "for( int i=0;i<=rowcount;i++)\r\n \r\n {\r\n XSSFRow row=sheet.getRow(i);\r\n XSSFCell cell=row.getCell(0);\r\n String s=cell.toString(); // for reading multiple data types from Excel sheet\r\n System.out.println(s);\r\n \r\n }", "private void createContent(WritableSheet sheet) throws WriteException,\n RowsExceededException {\n int row = 2;\n for (int i = 0; i < mExcelObject.getmCheckInUserNews().size(); i++) {\n // First column\n Post data = mExcelObject.getmCheckInUserNews().get(i);\n addNumber(sheet, 0, row, i+1 );\n // Second column\n addLabel(sheet, 1, row, data.author());\n addLabel(sheet, 2, row, data.title);\n addLabel(sheet, 3, row, data.body);\n addLabel(sheet, 4, row, data.downloadeUrl);\n row++;\n }\n\n }", "public void test47889() {\n XSSFWorkbook wb = (XSSFWorkbook)_testDataProvider.openSampleWorkbook(\"47889.xlsx\");\n XSSFSheet sh = wb.getSheetAt(0);\n \n XSSFCell cell;\n \n //try a string cell\n cell = sh.getRow(0).getCell(0);\n assertEquals(XSSFCell.CELL_TYPE_STRING, cell.getCellType());\n assertEquals(\"a\", cell.getStringCellValue());\n assertEquals(\"a\", cell.toString());\n //Gnumeric produces spreadsheets without styles\n //make sure we return null for that instead of throwing OutOfBounds\n assertEquals(null, cell.getCellStyle());\n \n //try a numeric cell\n cell = sh.getRow(1).getCell(0);\n assertEquals(XSSFCell.CELL_TYPE_NUMERIC, cell.getCellType());\n assertEquals(1.0, cell.getNumericCellValue());\n assertEquals(\"1.0\", cell.toString());\n //Gnumeric produces spreadsheets without styles\n //make sure we return null for that instead of throwing OutOfBounds\n assertEquals(null, cell.getCellStyle());\n }", "public void reset() {\r\n\r\n\t\tmySpreadsheet = new SpreadSheet();\r\n\t\tmySpreadsheet.reset();\r\n\t}", "public int updateBoard() {\n clearTemporaryData();\n setUsedValuesbyRow();\n setUsedValuesByColumns();\n setUsedValueInBoxes();\n findUniqueInBoxes();\n updateValues();\n\n return numbers.stream()\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList()).size();\n }", "public void zero() {\n fill(0);\n }", "public String getSheetName(int arg0) {\n\t\treturn null;\n\t}", "public void guess(){\n\t\tfor(int i=0;i<size;i++){\n\t\t\tfor(int j=0;j<size;j++){\n\t\t\t\tif(!boundary[i][j]){\n\t\t\t\t\tvalues[i][j]=100/(.05*i+1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public void printSheet(ArrayList<ArrayList<String>> sheetData)\n\t {\n\t\t Iterator<ArrayList<String>> rowIterator= sheetData.iterator();\n\t\t ArrayList<String> headers = rowIterator.next();\t//First row is header\n\t\t int rowCounter = 1;\n\t\t while(rowIterator.hasNext())\n\t\t {\n\t\t\t ArrayList<String> nextRow = rowIterator.next();\n\t\t\t System.out.println(\"\\n---Record \" + rowCounter + \" ---\");\n\t\t\t printHeadersAndData(headers, nextRow);\n\t\t\t rowCounter++;\n\t\t }\n\t }", "private void fill() {\r\n\t\tmap = new TreeMap<String, String>();\r\n\t\tlist = new ArrayList<String>();\r\n\t\ttry {\r\n\r\n\t\t\tFileInputStream ExcelFileToRead = new FileInputStream(\"V:\\\\Public\\\\Venatorx Employee and Conference Room Phone List.xlsx\");\r\n\r\n\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\tXSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\tXSSFRow row; \r\n\t\t\tXSSFCell cell;\r\n\t\t\t\r\n\t\t\tarr = new String[9];\r\n\t\t\tIterator<Row> rows = sheet.rowIterator();\r\n\t\t\tString temp = \"\";\r\n\t\t\r\n\t\t\twhile (temp.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\trow=(XSSFRow) rows.next();\r\n\t\t\t\tIterator<Cell> cells = row.cellIterator();\r\n\t\t\t\tfor (int i = 0; i < 9; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tcell=(XSSFCell) cells.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (cell.getCellType() == XSSFCell.CELL_TYPE_STRING)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString check = cell.getStringCellValue();\r\n\t\t\t\t\t\tif(check.equals(\"First Name\")) {\r\n\t\t\t\t\t\t\ttemp = \"First\";\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tarr[i] = cell.getStringCellValue();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getStringCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(cell.getCellType() == XSSFCell.CELL_TYPE_NUMERIC)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCell tempCell = cell;\r\n\t\t\t\t\t\tDataFormatter formatter = new DataFormatter();\r\n\t\t\t\t\t\tString strValue = formatter.formatCellValue(tempCell);\r\n\t\t\t\t\t\tarr[i] = strValue;\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getNumericCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if((i == 0) && (cell.getCellType() == XSSFCell.CELL_TYPE_BLANK)) {\r\n\t\t\t\t\t\ttemp = \"Final line\";\r\n\t\t\t\t\t\tbreak;\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 unknown = \"Unknown\";\r\n\t\t\t\t\t\tarr[i] = unknown;\r\n\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\tif(temp.equals(\"Final line\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if(temp.equals(\"First\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString name = arr[0].trim() + \" \" + arr[1].trim();\r\n\t\t\t\t\tString accreditions = arr[2].trim();\r\n\t\t\t\t\tString title = arr[3].trim();\r\n\t\t\t\t\tString extension = arr[4].trim();\r\n\t\t\t\t\tString directNumber = arr[5].trim();\r\n\t\t\t\t\tString cellNumber = arr[6].trim();\r\n\t\t\t\t\tString email = arr[7].trim();\r\n\t\t\t\t\tString location = arr[8].trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tString info = accreditions + \":\" + title + \":\" + extension + \":\" + directNumber + \":\" + cellNumber + \":\" + email + \":\" + location;\r\n\t\t\t\t\t//System.out.println(name + info);\r\n\t\t\t\t\tmap.put(name, info);\r\n\t\t\t\t\t//set.add(name);\r\n\t\t\t\t\tlist.add(name);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr = new String[9];\r\n\t\t\t\t\t//System.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t \r\n\t\t } catch (FileNotFoundException e2) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te2.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public int getNumberOfSheets() {\n\t\treturn 0;\n\t}", "private void readDB(XSSFSheet sheet, ArrayList<ArrayList<String>> sheetdata) {\n\t Iterator<Row> rowIterator = sheet.iterator();\n\t while(rowIterator.hasNext()) {\n\t Row row = rowIterator.next();\n\t ArrayList<String> rowlist = new ArrayList<String>();\n\n\t //For each row, iterate through each columns\n\t Iterator<Cell> cellIterator = row.cellIterator();\n\t while(cellIterator.hasNext()) {\n\t Cell cell = cellIterator.next();\n\t String data=\"\";\n\t switch(cell.getCellType()) {\n\t case Cell.CELL_TYPE_BOOLEAN:\n\t data = Boolean.toString((boolean)(cell.getBooleanCellValue()));\n\t break;\n\t case Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\t\tdata = Integer.toString((int)(cell.getNumericCellValue()));\n\t break;\n\t case Cell.CELL_TYPE_STRING:\n\t\t\t\t\t\tdata = cell.getStringCellValue();\n\t break;\n\t }\n\t\t rowlist.add(data);\n\t }\n\t sheetdata.add(rowlist);\n\t }\n\t \n\n\t}", "public static void main (String [] args) throws IOException{\nFileInputStream fis = new FileInputStream(\"‪‪C://Users//dell//Desktop//data1.xls\");\r\nWorkbook workbook=WorkbookFactory.create(fis);\r\n\r\nSheet sheet1 = workbook.getSheet(\"Sheet2\");\r\n\r\nRow row0 = sheet1.getRow(0);\r\nCell cell00 = row0.getCell(0);\r\nString cellvalue00 = cell00.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue00);\r\nCell cell01 = row0.getCell(1);\r\nString cellvalue01 = cell01.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue01);\r\nRow row1 = sheet1.getRow(1);\r\nCell cell10 = row1.getCell(0);\r\nString cellvalue10 = cell10.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue10);\r\nCell cell11 = row1.getCell(1);\r\nString cellvalue11 = cell11.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue11);\r\n\r\n\r\n}", "private void iterateXlsRow(XSSFSheet sheet) {\n Iterator rowIterator;\n XSSFRow row;\n rowIterator = sheet.rowIterator();\n String time;\n String StudentName;\n String classNumber;\n String reason;\n DataFormatter formatter = new DataFormatter();\n\n while (rowIterator.hasNext()) {\n row = (XSSFRow) rowIterator.next();\n if (isEmptyCell(row.getCell(0))) {\n time = \"NINCS ADAT\";\n } else {\n time = formatter.formatCellValue(row.getCell(0)).trim();\n }\n if (isEmptyCell(row.getCell(1))) {\n StudentName = \"NINCS ADAT\";\n } else {\n StudentName = row.getCell(1).getStringCellValue().trim();\n }\n if (isEmptyCell(row.getCell(2))) {\n classNumber = \"NINCS ADAT\";\n } else {\n classNumber = row.getCell(2).getStringCellValue().trim();\n }\n if (isEmptyCell(row.getCell(3))) {\n reason = \"NINCS ADAT\";\n } else {\n reason = row.getCell(3).getStringCellValue().trim();\n }\n Student student = new Student(time, StudentName, classNumber, reason, classNumber + StudentName);\n xlsxDataList.add(student);\n }\n }", "private final void zacb() {\n ArrayList<Integer> arrayList;\n Throwable th;\n StringBuilder sb;\n synchronized (this) {\n try {\n if (!this.zame) {\n int count = this.mDataHolder.getCount();\n new ArrayList();\n this.zamf = arrayList;\n if (count > 0) {\n boolean add = this.zamf.add(0);\n String primaryDataMarkerColumn = getPrimaryDataMarkerColumn();\n String string = this.mDataHolder.getString(primaryDataMarkerColumn, 0, this.mDataHolder.getWindowIndex(0));\n for (int i = 1; i < count; i++) {\n int windowIndex = this.mDataHolder.getWindowIndex(i);\n String string2 = this.mDataHolder.getString(primaryDataMarkerColumn, i, windowIndex);\n String str = string2;\n if (string2 == null) {\n Throwable th2 = th;\n new StringBuilder(78 + String.valueOf(primaryDataMarkerColumn).length());\n new NullPointerException(sb.append(\"Missing value for markerColumn: \").append(primaryDataMarkerColumn).append(\", at row: \").append(i).append(\", for window: \").append(windowIndex).toString());\n throw th2;\n }\n if (!str.equals(string)) {\n string = str;\n boolean add2 = this.zamf.add(Integer.valueOf(i));\n }\n }\n }\n this.zame = true;\n }\n } catch (Throwable th3) {\n Throwable th4 = th3;\n throw th4;\n }\n }\n }", "public int getSheetNumber(){\n return sheetNumber;\n }", "private void setUsedValuesbyRow() {\n \n //Loop through each row.\n IntStream.rangeClosed(1,9).forEach(i -> {\n //Loop through each position in the row.\n IntStream.rangeClosed(1,9).forEach(j -> {\n //If this value is not set find all the other values in the row and set \n //the possible values of this item to those that are not currently set.\n int row = i;\n Number currentNumber = numbers.stream()\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() == j)\n .findAny().get();\n //If the value is 0 it is not set\n if (currentNumber.getValue() < 1) {\n //Used numbers in this row\n List<Integer> usedNumbers = numbers.stream()\n .filter(n -> n.getValue() > 0)\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() != j)\n .map(Number::getValue)\n .collect(Collectors.toList());\n\n //If position currently doesn't have used values then set them to \n //the ones that were found.\n if (currentNumber.getUsedValues() == null){\n currentNumber.setUsedValues(usedNumbers);\n }\n else {\n //Set the position's used values to the union of what it currently has and the\n //identifed used values.\n currentNumber.setUsedValues(\n CollectionUtils.union(currentNumber.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n });\n }", "public static Object[][] getExcelData1(String fileName, String sheetName) {\n Object[][] data = null;\n XSSFWorkbook wb = null;// creating workbook object\n try {\n wb = new XSSFWorkbook(Constants1.RESOURCES_PATH + \"/tests-data1/\" + fileName);//giving the path.\n XSSFSheet sheet = wb.getSheet(sheetName);//after workbook we are going to get access for sheet.\n int rowsIndex = sheet.getLastRowNum();//here we are going to get how many rows.\n log.info(\"total rows:\" + rowsIndex);\n data = new Object[rowsIndex][];\n for (int i = 1; i <= rowsIndex; i++) {//we start from 1 as index 0 will have headings.\n XSSFRow row = sheet.getRow(i);\n int cols = row.getLastCellNum();//getting number of columns\n log.info(\"total cols:\" + cols);\n Object[] colData = new Object[cols];\n for (int j = 0; j < cols; j++) {\n colData[j] = row.getCell(j).toString();// we are trying to get access to cell Data\n\n }\n data[i - 1] = colData;\n }\n } catch (IOException e) {\n log.error(\"ExcelHelper exception:\"+ e);\n\n } finally {\n try {\n wb.close();\n } catch (IOException e) {\n log.error(e);\n }\n\n }\n return data;\n }", "private List<String> getDataFromApi() throws IOException {\n String spreadsheetId = \"1qtzLH2JKOURnvIrc3Q-mlCfQLHtfNbUmZnAiRGJWHBM\";\n int a = 2;\n idAvailcheck = true;\n String range = \"Class Data!\".concat(\"A\"+ a++ + \":J\");\n\n List<List<Object>> arrData = getData(sId , sPassword ,sFName,sLName,sClass,sSection,sEmail,sPhone,\"d\",sSemester);\n\n ValueRange oRange = new ValueRange();\n oRange.setRange(range); // I NEED THE NUMBER OF THE LAST ROW\n oRange.setValues(arrData);\n\n\n List<ValueRange> oList = new ArrayList<>();\n oList.add(oRange);\n\n\n BatchUpdateValuesRequest oRequest = new BatchUpdateValuesRequest();\n oRequest.setValueInputOption(\"RAW\");\n oRequest.setData(oList);\n\n\n\n\n\n\n\n\n Log.v(\"mode\",mode);\n\n\n if(mode==\"classfeed\") {\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\"; range = \"Class Name!\".concat(\"A\"+ a++ + \":S\");\n }\n if(mode==\"sectionfeed\") {\n\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\"; range = \"Sections!\".concat(\"A\"+ a++ + \":S\");\n\n }else if(mode.equals(\"timestamp\"))\n {\n spreadsheetId = \"1nzKRlq7cQrI_XiJGxJdNax5oB91bR_SypiazWO2JTuU\";\n range = \"Timestamp!\".concat(\"A\"+ 4 + \":A\");\n }\n\n\n List<String> results = new ArrayList<String>();\n\n\n\n ValueRange response = this.mService.spreadsheets().values()\n .get(spreadsheetId, range)\n .execute();\n List<List<Object>> values = response.getValues();\n\n if(mode.equals(\"classfeed\")) {\n\n classResults = response.getValues();\n\n }\n else if(mode.equals(\"sectionfeed\")) {\n\n sectionResults = response.getValues();\n\n\n }\n Log.v(\"responseMode\",mode);\n Log.v(\"response\", String.valueOf(response.getValues()));\n\n if (values != null) {\n\n\n\n\n results.add(\"\");\n\n\n for (List row : values) {\n\n if(initialGetMiscData)\n break;\n\n\n\n if(mode==\"classfeed\")\n {\n\n String dept = String.valueOf(row.get(1));\n\n\n\n\n if (dept.equals(sDepartment)) {\n String retrievedClass = String.valueOf(row.get(0));\n\n\n Log.v(\"retreievedClass\",retrievedClass);\n className.add(String.valueOf(row.get(0)));\n\n\n\n }\n }\n\n if(mode==\"sectionfeed\") {\n String dept = String.valueOf(row.get(1));\n\n Spinner classSpinner = (Spinner) findViewById(R.id.spinner_class);\n sClass = String.valueOf(classSpinner.getSelectedItem());\n if (sClass.equals(dept)) {\n\n\n sectionName.add(String.valueOf(row.get(0)));\n\n\n }\n }\n\n\n if(mode==\"Submit\") {\n\n\n String Str1 = String.valueOf(row.get(0));\n\n if (Str1.equals(\"0\")) {\n\n\n break;\n }\n\n if (Str1.equals(sId)) {\n\n idAvailcheck = false;\n }\n\n\n range = \"Class Data!\".concat(\"A\" + a++ + \":J\");\n\n\n\n }\n\n\n\n }\n\n }\n\n if(mode==\"Submit\") {\n oRange.setRange(range); // I NEED THE NUMBER OF THE LAST ROW\n if (idAvailcheck) { // Check if id is not taken\n BatchUpdateValuesResponse oResp1 = mService.spreadsheets().values().batchUpdate(spreadsheetId, oRequest).execute();\n range = \"Class Data!\".concat(\"A\" + a++ + \":J\");\n arrData = getDataAsZero(\"0\");\n oRange.setValues(arrData);\n oRange.setRange(range);\n oResp1 = mService.spreadsheets().values().batchUpdate(spreadsheetId, oRequest).execute();\n } else {\n\n\n\n }\n }\n\n\n\n return results;\n\n\n\n }", "private void initSpreadSheet()\n {\n if (documentFile != null && (documentFile.getName().endsWith(\".docx\") || documentFile.getName().endsWith(\".odt\")))\n {\n setIsSpreadsheet(false);\n }\n else\n {\n setIsSpreadsheet(true);\n }\n }", "private void reset()\n {\n myCellReferences = new ArrayList<>();\n mySheetName = null;\n myCellReference = null;\n myDefaultValue = null;\n amIInsideSingleQuotes = false;\n amIExpectingADefaultValue = false;\n }", "public SheetVisibility getSheetVisibility(int arg0) {\n\t\treturn null;\n\t}", "private void groupRows(HSSFSheet newSheet) {\n\t\t// TODO Auto-generated method stub\n\t\tint startRowPos = 0, endRowPos = 0;\n\t\t/* colums from excel file */\n\t\tString stationGroup = null, \n\t\tviiteNum = null, \n\t\tclient = null, \n\t\tservice = null;\n\t\t\n\t\tfor(Row row: newSheet) {\n\t\t\t/* skip first row with headers */\n\t\t\tif(row.getRowNum() == 0)\n\t\t\t\tcontinue;\n\t\t\t/* if the first cell of row is NOT blank */\n\t\t\tif(!row.getCell(0, Row.CREATE_NULL_AS_BLANK).\n\t\t\t\t\tgetStringCellValue().isEmpty()) {\n\t\t\t\t/* retrieve data from row */\n\t\t\t\tstationGroup = row.getCell(0, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.getStringCellValue();\n\t\t\t\tviiteNum = row.getCell(1, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.getStringCellValue();\n\t\t\t\tclient = row.getCell(2, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.getStringCellValue();\n\t\t\t\tservice = row.getCell(3, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.getStringCellValue();\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/* fill empty row with retrieved data */ \n\t\t\t\trow.getCell(0, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.setCellValue(stationGroup);\n\t\t\t\trow.getCell(1, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.setCellValue(viiteNum);\n\t\t\t\trow.getCell(2, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.setCellValue(client);\n\t\t\t\trow.getCell(3, Row.CREATE_NULL_AS_BLANK)\n\t\t\t\t.setCellValue(service);\n\t\t\t\t/* empty line counter */\n\t\t\t\tendRowPos++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\tint i = 0;\n\t\tfor(i=0;;i++){\n\t\t\tif(dataAll[i][0]==null)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn i;\n\t}", "void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }", "public Object[][] getSheetData(List<Integer> rows) {\n\n List<Object[]> rowData = new ArrayList<>();\n for (Integer row : rows) {\n rowData.add(getRowData(row));\n }\n\n return removeSkippedHeaderColumns( rowData );\n }", "private List<String> getDataFromApi() throws IOException {\n String spreadsheetId = listener.getSheetId();\n String range = listener.getSheetRange();\n List<String> results = new ArrayList<>();\n ValueRange response = this.mService.spreadsheets().values()\n .get(spreadsheetId, range)\n .execute();\n List<List<Object>> values = response.getValues();\n if (values != null) {\n values.remove(0);\n for (List row : values)\n results.add(listener.processData(row));\n }\n return results;\n }", "public int countEmptyCells() {\n int result = 0;\n for (int[] row : field)\n for (int cell : row)\n if (cell == EMPTY_MARK)\n result++;\n return result;\n }", "public Iterator<Sheet> sheetIterator() {\n\t\treturn null;\n\t}", "public static void main(String[] args) throws NullPointerException, Exception {\nFile f = new File(\"C:\\\\Users\\\\Mohit_Shobhit\\\\Music\\\\Book2xlsx.xlsx\");\r\n\tFileInputStream fi= new FileInputStream(f);\r\nXSSFWorkbook xs= new XSSFWorkbook(fi);\r\nXSSFSheet xt=xs.getSheet(\"Sheet1\");\r\n\tint r=xt.getPhysicalNumberOfRows();\r\n\tfor(int i=0;i<=r;i++)\r\n\t{\r\n\t\tXSSFRow xr=xt.getRow(i);\r\n\t\tfor(int j=0;j<xr.getPhysicalNumberOfCells();j++) \r\n\t\t{\r\n\t\t\tXSSFCell x=xr.getCell(j);\r\n\t\t\tSystem.out.println(x.getStringCellValue());\r\n\t\t}\r\n\t}\r\n\t}", "public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}", "public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }", "private boolean isEmpty(){\n return cellSize == 0;\n }", "private void createRowNoData(HSSFSheet sheet, int i, String rowDesc) {\r\n\r\n\t\tHSSFRow row;\r\n\t\trow = sheet.createRow((short) i);\r\n\t\trow.createCell((short) 0).setCellValue(\"\");\r\n\t\trow.createCell((short) 1).setCellValue(\"\");\r\n\t\trow.createCell((short) 2).setCellValue(\"\");\r\n\t\trow.createCell((short) 3).setCellValue(rowDesc);\r\n\t\trow.createCell((short) 4).setCellValue(0);\r\n\t\trow.createCell((short) 5).setCellValue(0.0);\r\n\t}", "private void createNewSheet(SXSSFSheet sheet, int rowNum, int countColumns, ResultSet result, SXSSFWorkbook workbook) throws SQLException {\n ResultSetMetaData metaDataColumns = result.getMetaData();\n sheet.setAutobreaks(true);\n sheet.setAutoFilter(new CellRangeAddress(0, rowNum, 0, countColumns - 1));\n// sheet.autoSizeColumn(0);\n sheet.setFitToPage(true);\n // Creamos un nuevo ROW para el header\n SXSSFRow header = sheet.createRow(rowNum);\n System.out.println(\"Add Header\");\n for (int colHeader = 1; colHeader <= countColumns; colHeader++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellHeader = header.createCell(colHeader - 1);\n // agregamos el valor de la celda\n cellHeader.setCellValue(metaDataColumns.getColumnName(colHeader).toUpperCase());\n }\n rowNum++;\n // Verificamos si hay datos\n System.out.println(\"Add Row Data\");\n while (result.next()) {\n // Creamos un nuevo ROW para los cada nueva fila del resultSet\n SXSSFRow data = sheet.createRow(rowNum);\n // Recorremos los datos de las columnas\n for (int rowdata = 1; rowdata <= countColumns; rowdata++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellData = data.createCell(rowdata - 1);\n // agregamos el valor de la celda\n Object object = result.getObject(rowdata);\n if (object == null) {\n cellData.setCellValue(\"\");\n } else {\n switch (metaDataColumns.getColumnType(rowdata)) {\n case Types.BOOLEAN:\n cellData.setCellValue((boolean) object);\n break;\n case Types.DATE:\n cellData.setCellValue((Date) object);\n case Types.TIMESTAMP_WITH_TIMEZONE:\n cellData.setCellValue((Date) object);\n break;\n case Types.NUMERIC:\n cellData.setCellValue(((BigDecimal) object).doubleValue());\n break;\n case Types.FLOAT:\n cellData.setCellValue(((Float) object).doubleValue());\n break;\n case Types.INTEGER:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.SMALLINT:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.BIGINT:\n cellData.setCellValue(((Long) object).doubleValue());\n break;\n default:\n cellData.setCellValue(object + \"\");\n break;\n }\n }\n }\n // Incrementamos el contador de registros\n rowNum++;\n // Imprimimos cada 10000 registros procesados\n if ((rowNum % 10000) == 0) {\n System.out.println(\"Procesando \" + rowNum);\n }\n // Validamos el maximo de registros que soporta excel 2007\n // Creamos una nueva hoja para los siguinetes registros\n if ((rowNum % 1048570) == 0) {\n // creamos una nueva hoja\n sheet = workbook.createSheet(name + (workbook.getNumberOfSheets() + 1));\n // enviamos a llenar la hoja\n createNewSheet(sheet, 0, countColumns, result, workbook);\n }\n }\n }", "public static ArrayList<String> getData3() throws Exception {\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tArrayList<String> a = new ArrayList<String>();\n\t\tString name = \"\";\n\t\tint nos = w.getNumberOfSheets();\n\t\tfor (int i = 0; i < nos; i++) {\n\t\t\tif (w.getSheetName(i).equalsIgnoreCase(\"TestData\")) {\n\t\t\t\tSheet sh = w.getSheetAt(i);\n\t\t\t\tIterator<Row> rt1 = sh.rowIterator();\n\t\t\t\tRow r1 = rt1.next();\n\t\t\t\tIterator<Cell> ct1 = r1.cellIterator();\n\t\t\t\tint column = 0, k = 0;\n\t\t\t\twhile (ct1.hasNext()) {\n\t\t\t\t\tCell c1 = ct1.next();\n\t\t\t\t\tif (c1.getStringCellValue().equalsIgnoreCase(\"TestCase\")) {\n\t\t\t\t\t\tcolumn = k;\n\t\t\t\t\t}\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"TestCase Column Index: \" + column);\n\t\t\t\twhile (rt1.hasNext()) {\n\t\t\t\t\tRow r2 = rt1.next();\n\t\t\t\t\tif (r2.getCell(column).getStringCellValue().equalsIgnoreCase(\"TC01\")) {\n\t\t\t\t\t\tIterator<Cell> ct2 = r2.cellIterator();\n\t\t\t\t\t\twhile (ct2.hasNext()) {\n\t\t\t\t\t\t\tCell c3 = ct2.next();\n\t\t\t\t\t\t\tint ct = c3.getCellType();\n\t\t\t\t\t\t\tswitch (ct) {\n\t\t\t\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(c3)) {\n\t\t\t\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\t\t\t\tname = form.format(c3.getDateCellValue());\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdouble d = c3.getNumericCellValue();\n\t\t\t\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\t\t\t\tname = String.valueOf(l);\n\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\tbreak;\n\t\t\t\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\t\t\t\tname = c3.getStringCellValue();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ta.add(name);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\treturn a;\n\t}", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public interface DataSheet\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /** @return the names of the columns in this table or an empty array if no columns have been defined, never null */\n String[] getHeaders();\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Access the given row.\n *\n * @param index the row number, the first row is 0\n * @return the data of the row or an empty array if the row is out of bounds, never null\n */\n Object[] getDataRow(final int index);\n\n /**\n * Access all rows.\n *\n * @return the data of all rows or an empty array no row exist, never null\n */\n Object[][] getDataRows();\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(String column, int row);\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If row or column are out of bounds will simply return <code>null</code> to indicate that no value has been set.\n *\n * @param row the row number in the table starting with 0\n * @param column the column number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(final int row, final int column);\n\n /** @return the number of current rows of this table */\n int size();\n}", "private void getDatastoreUsageValuesFor3XL(Sheet sheet) {\r\n for (int rowNum = sheet.getLastRowNum(); rowNum >= 0; rowNum--) {\r\n Row row = sheet.getRow(rowNum);\r\n if (row != null) {\r\n String firstCell = getCellValue(row.getCell(0));\r\n String usageValue = getCellValue(row.getCell(1));\r\n\r\n if (\"Datastore\".equals(firstCell)) {\r\n break;\r\n }\r\n if (firstCell != null) {\r\n if (firstCell.startsWith(\"DBBackup\")) {\r\n addDatastoreValue(\"Backuptool\", usageValue);\r\n } else if (firstCell.startsWith(\"Customer\")) {\r\n addDatastoreValue(\"Customer\", usageValue);\r\n } else if (firstCell.startsWith(\"NFSGlobal\")) {\r\n addDatastoreValue(\"Global\", usageValue);\r\n } else if (firstCell.startsWith(\"DBArch\")) {\r\n addDatastoreValue(\"Arc\", usageValue);\r\n } else if (firstCell.startsWith(\"DBData\")) {\r\n addDatastoreValue(\"DB\", usageValue);\r\n } else if (firstCell.startsWith(\"DBRedo\")) {\r\n addDatastoreValue(\"Redo\", usageValue);\r\n } else if (firstCell.startsWith(\"PMDatastore\")) {\r\n addDatastoreValue(\"PMDatastore\", usageValue);\r\n } else if (firstCell.startsWith(\"NFSBackup\")) {\r\n addDatastoreValue(\"NFSBackup\", usageValue);\r\n } else if (firstCell.startsWith(\"DB FB\")) {\r\n addDatastoreValue(\"DB Flashback\", usageValue);\r\n }\r\n }\r\n }\r\n }\r\n }", "public void removeSheetAt(int arg0) {\n\n\t}", "private static float computeEmptyCellScore(GameModel model) {\n\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n }\n }\n return 1 << numEmptyCells;\n }", "@Override\n public boolean check() {\n String[][] data = raw();\n // And just check if the first row (the header data)\n // corresponds with the ABSExcel model enum. Iff that\n // is true we will return true.\n for(int i = 0; i < ABSColumn.values().length; i++) {\n String columnName = data[0][i].replaceAll(\"[- ]+\", \"\").toUpperCase();\n // If we have a mismatch somewhere, return false.\n if(!columnName.equals(ABSColumn.values()[i].toString())) {\n return false;\n }\n }\n return true;\n }", "public static boolean allElmtRowIs0(Matriks m, int idx) {\n boolean is0 = true;\n int j=0;\n while (j<m.kolom && is0) {\n is0 = m.ELMT[idx][j] == 0;\n j++;\n }\n return is0;\n }", "@Override\r\n\tpublic int do_excelUp(List<?> list) {\n\t\treturn 0;\r\n\t}", "public ByteArrayInputStream ClassificationDataToExcel(ArrayList<MaterialData> material_datas) throws IOException {\n\n\t\tMaterialData currentData = new MaterialData();\n\t\tMaterialData previousData = new MaterialData();\n\t\tboolean firstRow = true;\n\t\tint rowIdx = 0;\n\n\t\ttry (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {\n\t\t\tSheet sheet = workbook.createSheet(\"Result\");\n\n\t\t\tfor (int i = 0; i < material_datas.size(); i++) {\n\n\t\t\t\tMaterialData materialData = material_datas.get(i);\n\t\t\t\tcurrentData = materialData;\n\n//\t\t\t\tSystem.out.println(\" previous data\" + previousData.getMaterialId());\n//\t\t\t\tSystem.out.println(\" current data\" + currentData.getMaterialId());\n\n\t\t\t\t/**\n\t\t\t\t * 1. Check if currentData is not equal to previousData true -> 1.1.a Check if\n\t\t\t\t * the read row is first ->true --> 1.a.i Build the Header ->false --> 1.a.ii\n\t\t\t\t * Build the Section 3 (previous data)\n\t\t\t\t */\n\n\t\t\t\tif (!(currentData.getMaterialId()).equals(previousData.getMaterialId())) {\n\t\t\t\t\tif (firstRow) {\n\t\t\t\t\t\tfirstRow = false;\n//\t\t\t\t\t\tSystem.out.println(\"Building header\");\n\t\t\t\t\t\tArrayList<String> headerResultRowData = new ArrayList<String>();\n\t\t\t\t\t\theaderResultRowData = buildHeader.header();\n\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\tint colIdx = 0;\n\t\t\t\t\t\tfor (String rowData : headerResultRowData) {\n\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t}\n\t\t\t\t\t\theaderResultRowData.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"Building section 3\");\n\t\t\t\t\t\tArrayList<ArrayList<String>> section3Data = new ArrayList<ArrayList<String>>();\n\t\t\t\t\t\tsection3Data = buildSection3.section3(previousData);\n\t\t\t\t\t\tfor (ArrayList<String> resultRowData : section3Data) {\n\t\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\t\tint colIdx = 0;\n\t\t\t\t\t\t\tfor (String rowData : resultRowData) {\n\t\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsection3Data.clear();\n\t\t\t\t\t\t\n//\t\t\t\t\t\tSystem.out.println(\"Building header\");\n\t\t\t\t\t\tArrayList<String> headerResultRowData = new ArrayList<String>();\n\t\t\t\t\t\theaderResultRowData = buildHeader.header();\n\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\tint colIdx = 0;\n\t\t\t\t\t\tfor (String rowData : headerResultRowData) {\n\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t}\n\t\t\t\t\t\theaderResultRowData.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * 1.1.b Build the Section 1 (current data) \n\t\t\t\t\t * 1.1.c Build the Section 2 (current data)\n\t\t\t\t\t */\n\n//\t\t\t\t\tSystem.out.println(\"Building section 1\");\n\t\t\t\t\tArrayList<ArrayList<String>> section1Data = new ArrayList<ArrayList<String>>();\n\t\t\t\t\tsection1Data = buildSection1.section1(currentData);\n\t\t\t\t\tfor (ArrayList<String> resultRowData : section1Data) {\n\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\tint colIdx = 0;\n\n\t\t\t\t\t\tfor (String rowData : resultRowData) {\n\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsection1Data.clear();\n\n//\t\t\t\t\tSystem.out.println(\"Building section 2\");\n\t\t\t\t\tArrayList<ArrayList<String>> section2Data = new ArrayList<ArrayList<String>>();\n\t\t\t\t\tsection2Data = buildSection2.section2(currentData);\n\t\t\t\t\tfor (ArrayList<String> resultRowData : section2Data) {\n\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\tint colIdx = 0;\n\t\t\t\t\t\tfor (String rowData : resultRowData) {\n\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsection2Data.clear();\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * 1. Check if currentData is not equal to previousData false -> 1.2.a Build\n\t\t\t\t * Section 2(current data)\n\t\t\t\t */\n\n\t\t\t\telse {\n\n//\t\t\t\t\tSystem.out.println(\"Building section 2\");\n\t\t\t\t\tArrayList<ArrayList<String>> section2Data = new ArrayList<ArrayList<String>>();\n\t\t\t\t\tsection2Data = buildSection2.section2(currentData);\n\t\t\t\t\tfor (ArrayList<String> resultRowData : section2Data) {\n\t\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\t\t\tint colIdx = 0;\n\t\t\t\t\t\tfor (String rowData : resultRowData) {\n\t\t\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsection2Data.clear();\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * 2. Set previous data = current data\n\t\t\t\t */\n\t\t\t\tpreviousData = currentData;\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * 3. If EOF -> Build Section 3 (previous data) [last element]\n\t\t\t */\n\n//\t\t\tSystem.out.println(\"Building section 3\");\n\t\t\tArrayList<ArrayList<String>> section3Data = new ArrayList<ArrayList<String>>();\n\t\t\tsection3Data = buildSection3.section3(previousData);\n\t\t\tfor (ArrayList<String> resultRowData : section3Data) {\n\t\t\t\tRow row = sheet.createRow(rowIdx++);\n\t\t\t\tint colIdx = 0;\n\t\t\t\tfor (String rowData : resultRowData) {\n\t\t\t\t\trow.createCell(colIdx++).setCellValue(rowData);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsection3Data.clear();\n\n\t\t\tworkbook.write(out);\n\t\t\treturn new ByteArrayInputStream(out.toByteArray());\n\t\t}\n\t}", "public int getRowCountInSheet() {\n\t\t int rowcount = sheet.getLastRowNum()-sheet.getFirstRowNum();\n\t\t return rowcount;\n\n\t}", "@Test\n public void testFillInDataToTemplate() throws IOException {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n\n List<String> communeStrs = Arrays.asList(\"Aclens\", \"Allaman\", \"Aubonne\", \"Apples\", \"Bière\", \"Bremblens\",\n \"Bougy-Villars\", \"Berolle\", \"Chevilly\");\n List<String> typeStrs = Arrays.asList(\"Résidence Secondaire\", \"Location\", \"Hotel\", \"Chambre\", \"Camping\",\n \"Institut\");\n\n for (int i = 0; i < 25; i++) {\n List<Object> row = new ArrayList<Object>();\n row.add(new Long(900000L + i));\n row.add(i + 1);\n row.add(communeStrs.get(i % communeStrs.size()));\n row.add(typeStrs.get(i % typeStrs.size()));\n row.add(new Long(25000L * i));\n row.add(BooleanUtils.toBoolean(i % 2));\n row.add(new Date());\n row.add(DateUtils.addDays(new Date(), i + 1));\n row.add(String.format(\"%d piéces ou moins\", i + 1));\n row.add(i + 1);\n row.add((i % 7 == 0 ? i : null));\n row.add((i % 7 == 1 ? i : null));\n row.add((i % 7 == 2 ? i : null));\n row.add((i % 7 == 3 ? i : null));\n row.add((i % 7 == 4 ? i : null));\n row.add((i % 7 == 5 ? i : null));\n row.add((i % 7 == 6 ? i : null));\n row.add(10 * i);\n row.add(200 * i);\n row.add(25 * i);\n row.add(i % 5 + 1);\n row.add(i % 6 + 1);\n row.add(BigDecimal.ZERO);\n row.add(1500 * (i + 1));\n row.add(null);\n\n rows.add(row);\n }\n\n SheetDataDto sheet1 = ExcelExportingUtil.convert2DListToSheetDto(rows, false);\n sheet1.setName(\"Data\");\n sheet1.setOverriden(true);\n // re-assign the index of the rows in the sheet to fill in the template: ignore the first two rows\n for (int i = 2; i < 2 + sheet1.getRows().size(); i++) {\n RowDataDto row = sheet1.getRows().get(i - 2);\n row.setRowNum(i);\n for (int j = 0; j < row.getCells().size(); j++) {\n CellDataDto cell = row.getCells().get(j);\n cell.setCellNum(j);\n }\n }\n\n // specify the format for col 7 and 8 (0-based)\n for (int i = 0; i < sheet1.getRows().size(); i++) {\n switch (i) {\n case 7:\n CellFormatter formatter = new CellFormatter(\"dd-MMM-yyyy\");\n formatter.setAlignment(CellStyle.ALIGN_CENTER);\n sheet1.getFormatters().add(formatter);\n break;\n\n case 8:\n CellFormatter formatter1 = new CellFormatter();\n formatter1.setWrapText(false);\n sheet1.getFormatters().add(formatter1);\n break;\n\n default:\n sheet1.getFormatters().add(null);\n break;\n }\n }\n\n InputStream input = getClass().getResourceAsStream(\"/exportData/Statistics_v0.1.xls\");\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n excelExportingService.exportToExcel(input, out, Arrays.asList(sheet1), ExcelFormatTypeEnum.XLS);\n\n FileUtils.writeByteArrayToFile(new File(\"output-template.xls\"), out.toByteArray());\n }", "private int FuncFillColumnList(ArrayList list,int sheetinput) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(filename));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint columns=0;\n\t\tif(type==0){\n\t\t//create wrokbook xls\n\t\tHSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new HSSFWorkbook(fis);\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//create sheet object to retrieve the sheet\n\t\tHSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\t\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\tif(type==1){\n\t\t//create wrokbook xlsx\n\t\tXSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new XSSFWorkbook(fis);\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//create sheet object to retrieve the sheet\n\t\tXSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\treturn columns-1;\n\t}", "private static String[][] nbackByDateSheetInit(String[][] nbackByDate_table) {\n\t\t\t\tnbackByDate_table[0][0] = \"ID\"; //will be many rows with same name\n\t\t\t\tnbackByDate_table[0][1] = \"Date\"; //numerical value; convert this column to numbers for calculations\n\t\t\t\tnbackByDate_table[0][2] = \"Is_Lab_Session?\"; //checks if date matches with a lab date\n\t\t\t\tnbackByDate_table[0][3] = \"Time_Of_Day_Played\"; //Scale 1-4: 1 is 6am-12pm, 2 is 12pm-6pm, 3 is 6pm-12am, 4 is 12am-6am\n\t\t\t\tnbackByDate_table[0][4] = \"AvgHitRate\";\n\t\t\t\tnbackByDate_table[0][5] = \"AvgErrRate\";\n\t\t\t\tnbackByDate_table[0][6] = \"TotalNumGamesPlayed\"; //totalImg+totalLetNum+totalSpatial\n\t\t\t\tnbackByDate_table[0][7] = \"TotalGames_Img\";\n\t\t\t\tnbackByDate_table[0][8] = \"TotalGames_letterNumber\";\n\t\t\t\tnbackByDate_table[0][9] = \"TotalGames_spatial\";\n\t\t\t\tnbackByDate_table[0][10] = \"TotalGames_2back\";\n\t\t\t\tnbackByDate_table[0][11] = \"TotalGames_3back\";\n\t\t\t\tnbackByDate_table[0][12] = \"TotalGames_4back\";\n\t\t\t\tnbackByDate_table[0][13] = \"Total_Time_Spent_Img\";\n\t\t\t\tnbackByDate_table[0][14] = \"Total_Time_Spent_letterNumber\";\n\t\t\t\tnbackByDate_table[0][15] = \"Total_Time_Spent_spatial\";\n\t\t\t\tnbackByDate_table[0][16] = \"Total_Time_Spent_2back\";\n\t\t\t\tnbackByDate_table[0][17] = \"Total_Time_Spent_3back\";\n\t\t\t\tnbackByDate_table[0][18] = \"Total_Time_Spent_4back\";\n\t\t\t\tnbackByDate_table[0][19] = \"Unfinished_Img\";\n\t\t\t\tnbackByDate_table[0][20] = \"Unfinished_letterNumber\";\n\t\t\t\tnbackByDate_table[0][21] = \"Unfinished_spatial\";\n\t\t\t\tnbackByDate_table[0][22] = \"Unfinished_2back\";\n\t\t\t\tnbackByDate_table[0][23] = \"Unfinished_3back\";\n\t\t\t\tnbackByDate_table[0][24] = \"Unfinished_4back\";\n\t\t\t\tnbackByDate_table[0][25] = \"Number_of_Logins\"; //\n\t\t\t\tnbackByDate_table[0][26] = \"SessionNumberReached\"; //Total logins/2; total sessions that have been completed by this date\n\n\t\t\t\treturn nbackByDate_table;\n\t\t\t\t\n\t}", "protected int checkAllCardsAppliedHaveZeroBalance() {\r\n boolean allCardsValuesAreZero = true;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n int numBlankCards = 0;\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n if (!tempGiftCard.getIsBlank() && tempGiftCard.getAmountAvailable() != 0.0d) {\r\n return NO_ERRORS;\r\n }\r\n if (tempGiftCard.getIsBlank()) {\r\n numBlankCards++;\r\n }\r\n }\r\n \r\n if (numBlankCards == getMaxNumGiftCards() || numBlankCards == getGiftCardList().size()) {\r\n return NO_ERRORS;\r\n }\r\n \r\n return ALL_CARDS_ARE_ZERO;\r\n }", "public void resetxlsxDataList() {\n this.xlsxDataList.clear();\n }", "public int getSheetIndex() {\r\n return sheetIndex;\r\n }", "private static String findValueTemp(HSSFSheet sheet, String cellContent){\n\n int colNum = 0; \n String value=\"\";\n for(Row row : sheet) {\n for(Cell cell : row) {\n// boolean bul =cell.getStringCellValue().trim().equalsIgnoreCase(cellContent.trim());\n// System.out.println(bul);\n\n if(cell.getStringCellValue().trim().equalsIgnoreCase(cellContent.trim())){\n\n\n colNum = cell.getColumnIndex();\n HSSFRow nRow= sheet.getRow(1);\n HSSFCell nCell = nRow.getCell(colNum);\n if(nCell.getCellType() == HSSFCell.CELL_TYPE_STRING)\n {\n value = (nCell.getStringCellValue() == null) ? \"\" : nCell.getStringCellValue();\n }\n else if(nCell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC)\n {\n value = (String) (((Double)nCell.getNumericCellValue() == null) ? \"\" : nCell.getNumericCellValue());\n }\n else if(nCell.getCellType() == HSSFCell.CELL_TYPE_BLANK)\n {\n value = \"\";\n }\n// try {\n// \n// value=nCell.getStringCellValue();\n// } catch (NullPointerException e) {\n// // TODO Auto-generated catch block\n// value=\"\";\n// e.printStackTrace();\n// }\n// if(nCell.getStringCellValue()!=null)\n// {\n// System.out.println(value);\n// }\n \n \n }\n \n }\n break;\n } \n return value; \n }", "public void parsingExcel() {\n theresFile = new File(pathTo).exists();\n if (theresFile) {\n try {\n FileInputStream myxls = new FileInputStream(pathTo);\n Workbook workbook = WorkbookFactory.create(myxls);\n //getting the sheet at index zero\n Sheet sheet = workbook.getSheetAt(0);\n int lastRow = sheet.getLastRowNum();\n System.out.println(\"currentID: \" + currentID);\n Row row2 = sheet.createRow(lastRow + 1);\n Data data = new Data(currentID++, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n\n for (int i = 0; i < 7; i++) {\n Cell cell4 = row2.createCell(i);\n switch (i) {\n case 0:\n cell4.setCellValue(data.getID());\n break;\n case 1:\n cell4.setCellValue((String) data.getName());\n break;\n case 2:\n cell4.setCellValue((String) data.getDevice());\n break;\n case 3:\n cell4.setCellValue((String) data.getDeviceModel());\n break;\n case 4:\n cell4.setCellValue((String) data.getSerialNumber());\n break;\n case 5:\n cell4.setCellValue((int) data.getOptional());\n break;\n case 6:\n cell4.setCellValue((String) data.getDecription());\n break;\n }\n\n }\n FileOutputStream outputStream = new FileOutputStream(pathTo);\n workbook.write(outputStream);\n workbook.close();\n } catch (IOException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n } catch (EncryptedDocumentException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n if (jTextFieldComments.getText().equals(\"\") || jTextFieldComments.getText().equals(null)) {\n JOptionPane.showMessageDialog(null, \"Morate uneti količinu\");\n } else {\n try {\n Data data = new Data(1, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n writtingExcelFile(makingExcelWorkbook(data));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n\n// try {\n// FileInputStream myxls = new FileInputStream(pathTo);\n// HSSFWorkbook studentsSheet = new HSSFWorkbook(myxls);\n// HSSFSheet worksheet = studentsSheet.getSheetAt(0);\n// int lastRow = worksheet.getLastRowNum();\n// System.out.println(lastRow);\n// Row row = worksheet.createRow(++lastRow);\n// row.createCell(1).setCellValue(\"Dr.Hola\");\n// myxls.close();\n// FileOutputStream output_file =new FileOutputStream(new File(\"poi-testt.xls\")); \n// //write changes\n// studentsSheet.write(output_file);\n// output_file.close();\n// System.out.println(\" is successfully written\");\n// } catch (Exception e) {\n// }\n }", "public void punishment(){\n\t\tthis.cell = 0;\n\t}" ]
[ "0.6184672", "0.61520064", "0.5995145", "0.5956301", "0.58001125", "0.57573664", "0.5742857", "0.5729039", "0.5711097", "0.56528217", "0.5649965", "0.5616082", "0.55942476", "0.5572859", "0.555776", "0.555755", "0.552094", "0.5519198", "0.54580826", "0.5444745", "0.5437646", "0.53919363", "0.5360102", "0.5342947", "0.5324729", "0.53219783", "0.531837", "0.5298614", "0.5296062", "0.52747035", "0.52651346", "0.52524394", "0.5230159", "0.5218447", "0.5194317", "0.51913595", "0.5190432", "0.51780516", "0.517436", "0.5172093", "0.51670706", "0.51626", "0.51551414", "0.5141686", "0.51301533", "0.50999093", "0.50973445", "0.5097078", "0.5096256", "0.508122", "0.5075698", "0.50693357", "0.50456345", "0.5041004", "0.5032459", "0.50306666", "0.50259507", "0.5003877", "0.5002453", "0.49995655", "0.4997792", "0.49949172", "0.49878472", "0.49851894", "0.498201", "0.49795282", "0.49743167", "0.49721402", "0.49701184", "0.49681455", "0.49660668", "0.49544734", "0.49534422", "0.49481267", "0.49453256", "0.49407414", "0.4938577", "0.4934613", "0.4919642", "0.49177563", "0.4916881", "0.49101514", "0.4906812", "0.49064162", "0.49059123", "0.4900365", "0.4893451", "0.4891338", "0.48864895", "0.488624", "0.4885553", "0.4884919", "0.4883204", "0.48831156", "0.48750943", "0.48741695", "0.48706993", "0.4870394", "0.48684683", "0.48634884", "0.48573497" ]
0.0
-1
/ Return sheet data in a two dimensional list. Each element in the outer list is represent a row, each element in the inner list represent a column. The first row is the column name row.
private static List<List<String>> loadSheetDataTable(XSSFSheet sheet) { List<List<String>> ret = new ArrayList<List<String>>(); // Get the first and last sheet row number. int firstRowNum = sheet.getFirstRowNum(); int lastRowNum = sheet.getLastRowNum(); if (lastRowNum > 0) { // Loop in sheet rows. for (int i = firstRowNum; i < lastRowNum + 1; i++) { // Get current row object. Row row = sheet.getRow(i); // Get first and last cell number. int firstCellNum = row.getFirstCellNum(); int lastCellNum = row.getLastCellNum(); // Create a String list to save column data in a row. List<String> rowDataList = new ArrayList<String>(); // Loop in the row cells. for (int j = firstCellNum; j < lastCellNum; j++) { // Get current cell. Cell cell = row.getCell(j); // Get cell type. CellType cellType = cell.getCellType(); if (cellType == CellType.NUMERIC) { double numberValue = cell.getNumericCellValue(); // BigDecimal is used to avoid double value is counted use Scientific counting method. // For example the original double variable value is 12345678, but jdk translated the value to 1.2345678E7. String stringCellValue = BigDecimal.valueOf(numberValue).toPlainString(); rowDataList.add(stringCellValue); } else if (cellType == CellType.STRING) { String cellValue = cell.getStringCellValue(); rowDataList.add(cellValue); } else if (cellType == CellType.BOOLEAN) { boolean numberValue = cell.getBooleanCellValue(); String stringCellValue = String.valueOf(numberValue); rowDataList.add(stringCellValue); } else if (cellType == CellType.BLANK) { rowDataList.add(""); } } // Add current row data list in the return list. ret.add(rowDataList); } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<ArrayList<String>> readSheet(Sheet sheet)\n\t {\n\t\t if(sheet == null)\n\t\t\t return null;\n\t\t \n\t\t ArrayList<ArrayList<String>> rowValueList = new ArrayList<ArrayList<String>>();\t\n\t\t Iterator<Row> rowIterator = sheet.iterator();\t\t//Get the row iterator for the sheet\n\t\t int columnCount;\n\t\t \n\t\t //First row consists of headings, use it to get column count\n\t\t ArrayList<String> headerValues = getSheetHeaders(sheet);\n\t\t columnCount = headerValues.size();\n\t\t rowValueList.add(headerValues);\t//Append headers to list of rows\n\t\t rowIterator.next();\t//Skip the first header row, it has been handled separately\n\t\t \n\t\t //Now to handle the data rows\n\t\t while(rowIterator.hasNext())\t//Iterate over all rows\n\t\t {\n\t\t\t Row currentRow = rowIterator.next();\t//Get the next row\n\t\t\t ArrayList<String> currentRowValue = readRow(currentRow, columnCount);\t//Process each row\n\t\t\t //Assuming first column is token, stop adding if a blank token is encountered\n\t\t\t if(currentRowValue.get(0).trim().equals(\"\"))\n\t\t\t {\n\t\t\t\t break;\n\t\t\t }\n\t\t\t rowValueList.add(currentRowValue);\t//Append the row value to the list of lists\n\t\t }\n\t\t //Now return the list of lists\n\t\t return rowValueList;\t \n\t }", "public Object[][] getSheetData() {\n\n List<Object[]> rows = new ArrayList<>();\n\n int rowCount = currentSheet.getPhysicalNumberOfRows();\n\n for (int rowIdx = hasHeaderRow ? 1 : 0; rowIdx < rowCount; rowIdx++)\n rows.add(getRowData(rowIdx));\n\n return removeSkippedHeaderColumns( rows );\n\n }", "public static List<List<String>> readXls(HSSFSheet decompteSheet) {\n //remise a zero de la liste data\n List<List<String>> data = new ArrayList<>();\n\n for (Row row : decompteSheet) {\n //saut de la premiere ligne\n if (row.getRowNum() == 0)\n continue;\n\n List<String> dataLine = new ArrayList<>();\n for (Cell cell : row) {\n try {\n switch (cell.getColumnIndex()) {\n //recuperation de la date\n case 0:\n dataLine.add(new SimpleDateFormat(\"dd/MM/yyyy\").format(cell.getDateCellValue()));\n break;\n //recuperation des donnees textes\n case 1:\n dataLine.add(cell.getStringCellValue());\n break;\n //recuparation des donnees numeriques\n default:\n dataLine.add(String.valueOf(cell.getNumericCellValue()));\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n Erreur.creerFichierErreur(e.getMessage()+\"\\n\"\n + decompteSheet.getSheetName() +\" \"+ Column.getLetterFromInt(cell.getColumnIndex()) + (cell.getRowIndex() + 1));\n }\n }\n data.add(dataLine);\n }\n\n return data;\n }", "private static List<rowdata> readExcelSheet(Sheet sheet) {\n\n List<rowdata> rowdataList = new ArrayList<>();\n\n if (sheet != null) {\n int rowNos = sheet.getLastRowNum();// 得到excel的总记录条数\n\n for (int i = 1; i <= rowNos; i++) {// 遍历行\n try {\n Row row = sheet.getRow(i);\n if (row != null) {\n Cell cell = row.getCell(0);\n if (cell != null) {\n cell.setCellType(CellType.STRING);\n rowdata rda = new rowdata();\n rda.CodeAll = cell.getStringCellValue();\n rda.no1 = rda.CodeAll.substring(0, 2);\n\n String[] allarr = StringUtils.split(rda.CodeAll, \"-\");\n String dotpart = allarr[1];\n\n String[] arr = StringUtils.split(dotpart, \".\");\n rda.no2 = arr[0];\n rda.no3 = arr[1];\n rda.no4 = arr[2];\n if (arr.length > 3)\n rda.no5 = arr[3];\n\n // System.out.print(cell.getStringCellValue() + \" \");\n rowdataList.add(rda);\n System.out.println(\"当前正在处理的记录是\" + i + \"/\" + rowNos + rda.CodeAll + \"分解后的结果\" + rda.no1 + rda.no2 + rda.no3 + rda.no4 + rda.no5);\n }\n }\n }\n catch (Exception ex)\n {\n System.out.println(\"当前正在处理的记录是\" + i );\n }\n }\n }\n\n\n return rowdataList;\n }", "public Object[][] getSheetData(List<Integer> rows) {\n\n List<Object[]> rowData = new ArrayList<>();\n for (Integer row : rows) {\n rowData.add(getRowData(row));\n }\n\n return removeSkippedHeaderColumns( rowData );\n }", "public static Object[][] getExcelData1(String fileName, String sheetName) {\n Object[][] data = null;\n XSSFWorkbook wb = null;// creating workbook object\n try {\n wb = new XSSFWorkbook(Constants1.RESOURCES_PATH + \"/tests-data1/\" + fileName);//giving the path.\n XSSFSheet sheet = wb.getSheet(sheetName);//after workbook we are going to get access for sheet.\n int rowsIndex = sheet.getLastRowNum();//here we are going to get how many rows.\n log.info(\"total rows:\" + rowsIndex);\n data = new Object[rowsIndex][];\n for (int i = 1; i <= rowsIndex; i++) {//we start from 1 as index 0 will have headings.\n XSSFRow row = sheet.getRow(i);\n int cols = row.getLastCellNum();//getting number of columns\n log.info(\"total cols:\" + cols);\n Object[] colData = new Object[cols];\n for (int j = 0; j < cols; j++) {\n colData[j] = row.getCell(j).toString();// we are trying to get access to cell Data\n\n }\n data[i - 1] = colData;\n }\n } catch (IOException e) {\n log.error(\"ExcelHelper exception:\"+ e);\n\n } finally {\n try {\n wb.close();\n } catch (IOException e) {\n log.error(e);\n }\n\n }\n return data;\n }", "public List<List<String>> readXlsx(InputStream is) throws IOException {\n\t\tSystem.out.println(\"read excel 2010\");\n\t\tXSSFWorkbook xssfWorkbook = new XSSFWorkbook(is);\n\t\tList<List<String>> list = new ArrayList<List<String>>();\n\t\t// Read the Sheet\n\t\tfor (int numSheet = 0; numSheet < xssfWorkbook.getNumberOfSheets(); numSheet++) {\n\t\t\tXSSFSheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);\n\t\t\tif (xssfSheet == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Read the Row\n\t\t\tfor (int rowNum = 1; rowNum <= xssfSheet.getLastRowNum(); rowNum++) {\n\t\t\t\tXSSFRow xssfRow = xssfSheet.getRow(rowNum);\n\t\t\t\tif (xssfRow != null) {\n\t\t\t\t\tList<String> rowList = new ArrayList<String>();\n\t\t\t\t\tfor(int cellNum=0;cellNum<xssfRow.getLastCellNum();cellNum++){\n\t\t\t\t\t\trowList.add(getValue(xssfRow.getCell(cellNum)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlist.add(rowList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "private void readDB(XSSFSheet sheet, ArrayList<ArrayList<String>> sheetdata) {\n\t Iterator<Row> rowIterator = sheet.iterator();\n\t while(rowIterator.hasNext()) {\n\t Row row = rowIterator.next();\n\t ArrayList<String> rowlist = new ArrayList<String>();\n\n\t //For each row, iterate through each columns\n\t Iterator<Cell> cellIterator = row.cellIterator();\n\t while(cellIterator.hasNext()) {\n\t Cell cell = cellIterator.next();\n\t String data=\"\";\n\t switch(cell.getCellType()) {\n\t case Cell.CELL_TYPE_BOOLEAN:\n\t data = Boolean.toString((boolean)(cell.getBooleanCellValue()));\n\t break;\n\t case Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\t\tdata = Integer.toString((int)(cell.getNumericCellValue()));\n\t break;\n\t case Cell.CELL_TYPE_STRING:\n\t\t\t\t\t\tdata = cell.getStringCellValue();\n\t break;\n\t }\n\t\t rowlist.add(data);\n\t }\n\t sheetdata.add(rowlist);\n\t }\n\t \n\n\t}", "public String[][] getExcelData(String fileName, String sheetName){\n \t\n \tString[][] data = null; \t\n \t \ttry\n \t \t{\n \t \tFileInputStream fis = new FileInputStream(fileName);\n \t \t@SuppressWarnings(\"resource\")\n\t\tXSSFWorkbook wb = new XSSFWorkbook(fis);\n \t \tXSSFSheet sh = wb.getSheet(sheetName);\n \t \tXSSFRow row = sh.getRow(0);\n \t \tint noOfRows = sh.getPhysicalNumberOfRows();\n \t \tint noOfCols = row.getLastCellNum();\n \t \tCell cell;\n \t \tdata = new String[noOfRows-1][noOfCols];\n \t \t\n \t \tfor(int i =1; i<noOfRows;i++){\n \t\t for(int j=0;j<noOfCols;j++){\n \t\t \t row = sh.getRow(i);\n \t\t \t cell= row.getCell(j);\n \t\t \t data[i-1][j] = cell.getStringCellValue();\n \t \t \t }\n \t \t}\n \t \t}\n \t \tcatch (Exception e) {\n \t \t System.out.println(\"The exception is: \" +e.getMessage());\n \t}\n \treturn data;\n \t}", "public static String[][] getAllData(String sExcelFile, String sWorkSheet)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile inputWorkbook = new File(sExcelFile);\n\t\t\tWorkbook w = Workbook.getWorkbook(inputWorkbook);\n\t\t\tSheet sheet = w.getSheet(sWorkSheet);\n\n\t\t\tint rows = sheet.getRows();\n\t\t\tint cols = sheet.getColumns();\n\t\t\tString[][] data = new String[rows][cols];\n\n\t\t\tfor (int i = 0; i < cols; i++)\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < rows; j++)\n\t\t\t\t{\n\t\t\t\t\tCell cell = sheet.getCell(i, j);\n\t\t\t\t\tdata[j][i] = cell.getContents().toString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public List<String> getResults(){\r\n\t\tList<String> results = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < getExcel_file().size(); i++) {\r\n\t\t\tString s = getExcel_file().get(i).toString();\r\n\t\t\tfor(int j = 0; j < columns.size(); j++) {\r\n\t\t\t\ts += \" \" + columns.get(j).getArray().get(i).toString();\r\n\t\t\t}\r\n\t\t\tresults.add(s);\r\n\t\t}\r\n\t\t\r\n\t\treturn results;\r\n\t}", "public List<List<String>> readXlsx(String path) throws IOException {\n\t\tSystem.out.println(\"read excel 2010\");\n\t\tInputStream is = new FileInputStream(path);\n\t\tXSSFWorkbook xssfWorkbook = new XSSFWorkbook(is);\n\t\tList<List<String>> list = new ArrayList<List<String>>();\n\t\t// Read the Sheet\n\t\tfor (int numSheet = 0; numSheet < xssfWorkbook.getNumberOfSheets(); numSheet++) {\n\t\t\tXSSFSheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);\n\t\t\tif (xssfSheet == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Read the Row\n\t\t\tfor (int rowNum = 1; rowNum <= xssfSheet.getLastRowNum(); rowNum++) {\n\t\t\t\tXSSFRow xssfRow = xssfSheet.getRow(rowNum);\n\t\t\t\tif (xssfRow != null) {\n\t\t\t\t\tList<String> rowList = new ArrayList<String>();\n\t\t\t\t\tfor(int cellNum=0;cellNum<xssfRow.getLastCellNum();cellNum++){\n\t\t\t\t\t\trowList.add(getValue(xssfRow.getCell(cellNum)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlist.add(rowList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public static ArrayList<String> getData3() throws Exception {\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tArrayList<String> a = new ArrayList<String>();\n\t\tString name = \"\";\n\t\tint nos = w.getNumberOfSheets();\n\t\tfor (int i = 0; i < nos; i++) {\n\t\t\tif (w.getSheetName(i).equalsIgnoreCase(\"TestData\")) {\n\t\t\t\tSheet sh = w.getSheetAt(i);\n\t\t\t\tIterator<Row> rt1 = sh.rowIterator();\n\t\t\t\tRow r1 = rt1.next();\n\t\t\t\tIterator<Cell> ct1 = r1.cellIterator();\n\t\t\t\tint column = 0, k = 0;\n\t\t\t\twhile (ct1.hasNext()) {\n\t\t\t\t\tCell c1 = ct1.next();\n\t\t\t\t\tif (c1.getStringCellValue().equalsIgnoreCase(\"TestCase\")) {\n\t\t\t\t\t\tcolumn = k;\n\t\t\t\t\t}\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"TestCase Column Index: \" + column);\n\t\t\t\twhile (rt1.hasNext()) {\n\t\t\t\t\tRow r2 = rt1.next();\n\t\t\t\t\tif (r2.getCell(column).getStringCellValue().equalsIgnoreCase(\"TC01\")) {\n\t\t\t\t\t\tIterator<Cell> ct2 = r2.cellIterator();\n\t\t\t\t\t\twhile (ct2.hasNext()) {\n\t\t\t\t\t\t\tCell c3 = ct2.next();\n\t\t\t\t\t\t\tint ct = c3.getCellType();\n\t\t\t\t\t\t\tswitch (ct) {\n\t\t\t\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(c3)) {\n\t\t\t\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\t\t\t\tname = form.format(c3.getDateCellValue());\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdouble d = c3.getNumericCellValue();\n\t\t\t\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\t\t\t\tname = String.valueOf(l);\n\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\tbreak;\n\t\t\t\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\t\t\t\tname = c3.getStringCellValue();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ta.add(name);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\treturn a;\n\t}", "public static String[][] getData(){\n\t\t\tint rowCount, colCount;\n\t\t\trowCount=xlsFile.getRowCount(testName);\n\t\t\tcolCount=xlsFile.getColCount(testName);\n\t\t\t\n\t\t\ttabArray=new String[rowCount-1][colCount];\n\t\t\t\n\t\t\tnewRowIndex=0;\n\t\t\tfor(int cellRow=1;cellRow<rowCount;cellRow++)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tif(xlsFile.readCell(testName,cellRow,0).equals(className))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int cellColoumn=0;cellColoumn<colCount;cellColoumn++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\ttabArray[newRowIndex][cellColoumn]=xlsFile.readCell(testName,cellRow,cellColoumn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewRowIndex+=1;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t//\tlogger.log(LogStatus.INFO, \"Excel Data Read Successfully\");\n\t\t\t\n\t\t\t\n\t\tString[][] newTabArray=new String[newRowIndex][colCount];\n\t\t\n\t\tfor(int cellRow=0;cellRow<newRowIndex;cellRow++){\n\t\t\tfor(int cellColoumn=0;cellColoumn<colCount;cellColoumn++){\n\t\t\t\tnewTabArray[cellRow][cellColoumn]=tabArray[cellRow][cellColoumn];\t\n\t\t\t}\n\t\t}\n\t\t//logger.log(LogStatus.INFO, \"Returing 2 dimentional data for \"+className);\n\t\treturn (newTabArray);\n\t\t}", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "java.util.List<String>\n getRowsList();", "public Object[][] testData(String excelPath, String sheetName)\n\t{\t\n\t\tExcelUtils excel = new ExcelUtils(excelPath,sheetName);\n\t\t\n\t\tint rowCount = excel.getRowCount();\n\t\tint colCount = excel.getColumnCount();\n\t\t\n\t\t//Creating an array object. (rowCount-1) because we do not want header\n\t\tObject arr[][] = new Object[rowCount-1][colCount];\n\t\t\n\t\t//We are using i=1 since we want to skip header row. In case of column we will start from 0.\n\t\tfor(int i=1;i<rowCount;i++)\n\t\t{\n\t\t\tfor(int j=0;j<colCount;j++)\n\t\t\t{\n\t\t\t\tString cellData = excel.getCellDataString(i,j);\n\t\t\t\tarr[i-1][j]= cellData;\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\tprivate List<List<HSSFCell>> getRows(HSSFWorkbook workbook) {\r\n\t\t/**\r\n\t\t * Create a new instance for cellDataList\r\n\t\t */\r\n\t\tList cellDataList = new ArrayList();\r\n\r\n\t\t/*\r\n\t\t * Create a new instance for HSSFWorkBook Class\r\n\t\t */\r\n\t\tHSSFSheet hssfSheet = workbook.getSheetAt(0);\r\n\t\t/**\r\n\t\t * Iterate the rows and cells of the spreadsheet to get all the datas.\r\n\t\t */\r\n\t\tIterator rowIterator = hssfSheet.rowIterator();\r\n\t\twhile (rowIterator.hasNext()) {\r\n\t\t\tHSSFRow hssfRow = (HSSFRow) rowIterator.next();\r\n\t\t\tIterator iterator = hssfRow.cellIterator();\r\n\t\t\tList cellTempList = new ArrayList();\r\n\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\tHSSFCell hssfCell = (HSSFCell) iterator.next();\r\n\t\t\t\tcellTempList.add(hssfCell);\r\n\t\t\t}\r\n\t\t\tcellDataList.add(cellTempList);\r\n\t\t}\r\n\t\treturn cellDataList;\r\n\t}", "public List<List<String>> readXls(String path) throws IOException {\n\t\tSystem.out.println(\"read excel 2003-2007\");\n\t\tInputStream is = new FileInputStream(path);\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(is);\n\t\tList<List<String>> list = new ArrayList<List<String>>();\n\t\t// Read the Sheet\n\t\tfor (int numSheet = 0; numSheet < hssfWorkbook.getNumberOfSheets(); numSheet++) {\n\t\t\tHSSFSheet hssfSheet = hssfWorkbook.getSheetAt(numSheet);\n\t\t\tif (hssfSheet == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Read the Row\n\t\t\tfor (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) {\n\t\t\t\tHSSFRow hssfRow = hssfSheet.getRow(rowNum);\n\t\t\t\tif (hssfRow != null) {\n\t\t\t\t\tList<String> rowList=new ArrayList<String>();\n\t\t\t\t\tfor(int cellNum=0;cellNum<hssfRow.getLastCellNum();cellNum++){\n\t\t\t\t\t\trowList.add(getValue(hssfRow.getCell(cellNum)));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlist.add(rowList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public String[][] excelData(String fileName) throws IOException {\n\t\tXSSFWorkbook wb= new XSSFWorkbook(\"./data/\"+fileName+\".xlsx\");\r\n\t\t\r\n\t\t\r\n\t\t//Step2-Get in to the worksheet\r\n\t\t\r\n\t\tXSSFSheet ws=wb.getSheet(\"Sheet1\");\r\n\t\t\r\n\t\t\r\n\t\tint rowcount=ws.getLastRowNum();//excluding first row\r\n\t\tSystem.out.println(rowcount);\r\n\t\t\r\n\t\t//int incFR=ws.getPhysicalNumberOfRows();//includes first row\r\n\t\t\r\n\t\tshort cellCount = ws.getRow(0).getLastCellNum();\r\n\t\tString[][] data=new String[rowcount][cellCount];\r\n\t\t\r\n\t\tfor(int i=1;i<=rowcount;i++) {//rows\r\n\t\t\tfor(int j=0;j<cellCount;j++) {//column\r\n\t\t\t\t\r\n\t\t\t\tString cellValue = ws.getRow(i).getCell(j).getStringCellValue();\r\n\t\t\t\tdata[i-1][j]=cellValue;\r\n\t\t\t\t//System.out.println(cellValue);\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\twb.close();\r\n\t\treturn data;\r\n\r\n\t}", "List<? extends ISheet> getSheetList();", "public ArrayList<String> getData(String testCaseName) throws IOException {\n\t\tArrayList<String> cellArray = new ArrayList();\n\n\t\t// File input stream argument\t\t\n\t\tFileInputStream fis = new FileInputStream(\"//Users//Oz//Documents//Selenium//SeleniumRepo//ExcelDriven//demoData.xlsx\");\n\n\t\t// instantiating workbook reading object \n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\n\n\t\t// read only sheet1\n\t\tint numOfSheets = workbook.getNumberOfSheets();\n\t\tfor (int i = 0; i < numOfSheets; i++ ) {\n\n\t\t\tif (workbook.getSheetName(i).equals(\"testData\")) { \n\t\t\t\tXSSFSheet sheet = workbook.getSheetAt(i);\n\n\t\t\t\tIterator<Row> rows = sheet.iterator();\n\t\t\t\tRow firstRow = (Row) rows.next();\n\t\t\t\tIterator<Cell> cell = ((Row) firstRow).cellIterator();\n\n\n\t\t\t\t//find column number of \"TestCase\"\n\t\t\t\tint k = 0;\n\t\t\t\tint colIndex = 99; \n\n\t\t\t\twhile(cell.hasNext()) {\t\t\t\t\t\n\t\t\t\t\tCell value = cell.next();\n\t\t\t\t\tif (value.getStringCellValue().equalsIgnoreCase(\"TestCase\")) {\n\t\t\t\t\t\t//desired column\n\t\t\t\t\t\tcolIndex = k;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tk++;\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t// iterating through every row\n\t\t\t\twhile(rows.hasNext()) {\t\t\t\t\t\n\t\t\t\t\tRow value = rows.next();\n\t\t\t\t\tif (value.getCell(colIndex).getStringCellValue().equalsIgnoreCase(testCaseName)) {\n\t\t\t\t\t\tIterator<Cell> cv = value.cellIterator();\n\t\t\t\t\t\twhile(cv.hasNext()) {\n\t\t\t\t\t\t\tCell c = cv.next();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(cv.next().getStringCellValue().getClass().equals(Type.class) ) {\n\t\t\t\t\t\t\t\tcellArray.add(cv.next().getStringCellValue());\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\t cellArray.add(NumberToTextConverter.toText(cv.next().getNumericCellValue()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cellArray;\n\n\n\t}", "public static String[][] readXL(String fPath, String fSheet) throws Exception{\n\t\tString [][] xData;\n\t\t\n\t\tFile myxl = new File(fPath);\n\t\tFileInputStream myStream = new FileInputStream(myxl);\n\t\tHSSFWorkbook myWB = new HSSFWorkbook(myStream);\n\t\tHSSFSheet mySheet = myWB.getSheet(fSheet);\n\t\txRows = mySheet.getLastRowNum()+1;\n\t\txCols = mySheet.getRow(0).getLastCellNum();\n\t\tSystem.out.println(\"Total Rows in Excel are \" + xRows);\n\t\tSystem.out.println(\"Total Cols in Excel are \" + xCols);\n\t\txData = new String [xRows][xCols];\n\t\tfor (int i = 0; i< xRows; i++) {\n\t\t\tHSSFRow row = mySheet.getRow(i);\n\t\t\tfor (int j = 0; j < xCols; j++) {\n\t\t\t\tHSSFCell cell = row.getCell(j);\n\t\t\t\tString value = \"-\";\n\t\t\t\tif (cell!=null) {\n\t\t\t\t\tvalue = cellToString(cell);\n\t\t\t\t}\n\t\t\t\txData[i][j] = value;\n\t\t\t\tSystem.out.print(value);\n\t\t\t\tSystem.out.println(\"------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tmyxl = null;// Memory gets released\n\t\treturn xData;\n\t}", "private String[][] readfromSpreadSheet(String xlFilePath, String sheetName,String tableName) {\n\t\t\t String[][] tabArray=null;\n\t\t\t try{\n\t\t Workbook workbook = Workbook.getWorkbook(new File(xlFilePath));\n\t\t Sheet sheet = workbook.getSheet(sheetName);\n\t\t int startRow,startCol, endRow, endCol,ci,cj;\n\t\t System.out.println(sheet.getName());\n\t\t \n\t\t Cell tableStart=sheet.findCell(tableName);\n\t\t startRow=tableStart.getRow();\n\t\t startCol=tableStart.getColumn();\n\n\t\t Cell tableEnd= sheet.findCell(tableName, startCol+1,startRow+1, 100, 64000, false); \n\n\t\t endRow=tableEnd.getRow();\n\t\t endCol=tableEnd.getColumn();\n\t\t System.out.println(\"startRow=\"+startRow+\", endRow=\"+endRow+\", \" +\n\t\t \"startCol=\"+startCol+\", endCol=\"+endCol);\n\t\t tabArray=new String[endRow-startRow-1][endCol-startCol-1];\n\t\t ci=0;\n\n\t\t for (int i=startRow+1;i<endRow;i++,ci++){\n\t\t cj=0;\n\t\t for (int j=startCol+1;j<endCol;j++,cj++){\n\t\t tabArray[ci][cj]=sheet.getCell(j,i).getContents();\n\t\t }\n\t\t }\n\t\t\t }//end try\n\t\t \n\t\t catch (Exception e) {\n System.out.println(\"error in getTableArray()\");\n e.printStackTrace();\n }\n\n return(tabArray);\n\t\t }", "public ArrayList<String> getSheetHeaders(Sheet sheet)\n\t{\n\t\tif(sheet == null)\n\t\t\treturn null;\n\t\t\n\t\tRow headerRow = sheet.getRow(0);\n\t\tIterator<Cell> headerIterator = headerRow.cellIterator();\n\t\tArrayList<String> headerValues = new ArrayList<String>();\n\t\twhile(headerIterator.hasNext())\t//Add headers to list\n\t\t{\n\t\t\tCell nextHeaderCell = headerIterator.next();\n\t\t\t//headerValues.add(nextHeaderCell.getStringCellValue());\n\t\t\tString cellValue = nextHeaderCell.getStringCellValue();\n\t\t\tif(cellValue.trim().equals(\"\"))\n\t\t\t\tbreak;\n\t\t\t\n\t\t\theaderValues.add(cellValue);\n\t\t}\n\t\treturn headerValues;\n\t}", "public interface DataSheet\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /** @return the names of the columns in this table or an empty array if no columns have been defined, never null */\n String[] getHeaders();\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Access the given row.\n *\n * @param index the row number, the first row is 0\n * @return the data of the row or an empty array if the row is out of bounds, never null\n */\n Object[] getDataRow(final int index);\n\n /**\n * Access all rows.\n *\n * @return the data of all rows or an empty array no row exist, never null\n */\n Object[][] getDataRows();\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(String column, int row);\n\n /**\n * Retrieve the value of the given row and column.\n *\n * If row or column are out of bounds will simply return <code>null</code> to indicate that no value has been set.\n *\n * @param row the row number in the table starting with 0\n * @param column the column number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n Object getDataValue(final int row, final int column);\n\n /** @return the number of current rows of this table */\n int size();\n}", "public static ArrayList<String> getColumValues(String columnWanted, String sheetName) throws Exception {\r\n\t\t\tFileInputStream fileIn = new FileInputStream(new File(\"./DataSheet.xls\"));\r\n\t\t\t// read file\r\n\t\t\tPOIFSFileSystem fs = new POIFSFileSystem(fileIn);\r\n\t\t\tHSSFWorkbook filename = new HSSFWorkbook(fs);\r\n\t\t\t// open sheet 0 which is first sheet of your worksheet\r\n\t\t\tHSSFSheet comscoreSheet = filename.getSheet(sheetName);\r\n\t\t\t// we will search for column index containing string \"Your Column Name\"\r\n\t\t\t// in the row 0 (which is first row of a worksheet\r\n\t\t\tInteger columnNo = null;\r\n\t\t\t// output all not null values to the list\r\n\t\t\tList<Cell> cells = new ArrayList<Cell>();\r\n\t\t\tList<String> excelParametersList = new ArrayList<String>();\r\n\t\t\tRow firstRow = comscoreSheet.getRow(0);\r\n\t\t\tfor (Cell cell : firstRow) {\r\n\t\t\t\tif (cell.getStringCellValue().equals(columnWanted)) {\r\n\t\t\t\t\tcolumnNo = cell.getColumnIndex();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (columnNo != null) {\r\n\t\t\t\tfor (Row row : comscoreSheet) {\r\n\t\t\t\t\tCell c = row.getCell(columnNo);\r\n\t\t\t\t\tif (c == null || c.getCellType() == Cell.CELL_TYPE_BLANK) {\r\n\t\t\t\t\t\t// Nothing in the cell in this row, skip it\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcells.add(c);\r\n\t\t\t\t\t\texcelParametersList.add(c.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"could not find column \" + columnWanted + \" in first row of \" + fileIn.toString());\r\n\t\t\t}\r\n\t\t\treturn (ArrayList<String>) excelParametersList;\r\n\t\t}", "private static void showExelData(List sheetData) {\n\t\t// Iterates the data and print it out to the console.\n\t\t//\n\t\tmatriz = new int[sheetData.size()][3];\n\t\tfila = sheetData.size();\n\t\tfor (int i = 1; i < sheetData.size(); i++) {\n\t\t\t// fila\n\t\t\t// System.out.println(sheetData.size());\n\t\t\tList list = (List) sheetData.get(i);\n\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\tCell cell = (Cell) list.get(j);\n\t\t\t\tif (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {\n\t\t\t\t\t// System.out.print(cell.getNumericCellValue());\n\n\t\t\t\t\tmatriz[i][j] = (int) cell.getNumericCellValue();\n\n\t\t\t\t} else if (cell.getCellType() == Cell.CELL_TYPE_STRING) {\n\t\t\t\t\t// System.out.print(cell.getRichStringCellValue());\n\t\t\t\t} else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {\n\t\t\t\t\t// System.out.print(cell.getBooleanCellValue());\n\t\t\t\t}\n\t\t\t\tif (j < list.size() - 1) {\n\t\t\t\t\t// System.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static List<HashMap<String, String>> getData4() throws Exception {\n\t\tArrayList<HashMap<String, String>> mapDataList = new ArrayList<HashMap<String, String>>();\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tSheet sht = w.getSheet(\"TestData\");\n\t\tRow headerRow = sht.getRow(0);\n\t\tfor (int i = 0; i < sht.getPhysicalNumberOfRows(); i++) {\n\t\t\tRow currentRow = sht.getRow(i);\n\t\t\tHashMap<String, String> mapData = new HashMap<String, String>();\n\t\t\tfor (int j = 0; j < headerRow.getPhysicalNumberOfCells(); j++) {\n\t\t\t\tCell currentCell = currentRow.getCell(j);\n\t\t\t\tint ct = currentCell.getCellType();\n\t\t\t\tString name = \"\";\n\t\t\t\tswitch (ct) {\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(currentCell)) {\n\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\tname = form.format(currentCell.getDateCellValue());\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble d = currentCell.getNumericCellValue();\n\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\tname = String.valueOf(l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmapData.put(headerRow.getCell(j).getStringCellValue(), name);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\tname = currentCell.getStringCellValue();\n\t\t\t\t\t}\n\t\t\t\t\tmapData.put(headerRow.getCell(j).getStringCellValue(), name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmapDataList.add(mapData);\n\t\t}\n\t\treturn mapDataList;\n\t}", "public Object[][] getData(File file, String sheetName, int maxColumn ) throws IOException {\n Object data[][] = null;\n\n // tao ra input tu file\n FileInputStream ExcelFile = new FileInputStream(file);\n // tao 1 workbook moi\n xf = new XSSFWorkbook(ExcelFile);\n // lay ten sheet\n sheet = xf.getSheet(sheetName);\n // lay column\n //mang \n data = new Object[sheet.getLastRowNum()][maxColumn - 1];\n for (int i = 1; i < sheet.getLastRowNum() + 1; i++) { // lap theo hang\n\n for (int j = 1; j < maxColumn; j++) { // lap theo cot\n\n cell = sheet.getRow(i).getCell(j); // lay du lieu\n int dataType = cell.getCellType(); // lay kieu du lieu\n\n if (dataType == 1) {\n cell.setCellType(Cell.CELL_TYPE_STRING);\n data[i - 1][j - 1] = cell.getStringCellValue();\n\n }\n if (dataType == 0) {\n cell.setCellType(Cell.CELL_TYPE_NUMERIC);\n data[i - 1][j - 1] = (int) cell.getNumericCellValue();\n }\n if (dataType == 4) {\n cell.setCellType(Cell.CELL_TYPE_BOOLEAN);\n\n data[i - 1][j - 1] = cell.getBooleanCellValue();\n\n }\n if (dataType == 3) {\n cell.setCellType(Cell.CELL_TYPE_BLANK);\n\n data[i - 1][j - 1] = \"\";\n }\n\n }\n\n }\n\n return data;\n }", "@DataProvider(name=\"empDataProviderExcel\")\n\tString [][]getEmpDataFromExcel() throws IOException{\n\t\tString dataSheetPath = System.getProperty(\"user.dir\")+\"/testDataAndTestCases/API_TestCases.xlsx\";\n\t\tString sheetName = \"EmployeeTestData\";\n\t\t\n\t\tint rowCount = XLUtills.getRowCount(dataSheetPath, sheetName);\n\t\tint colCount = XLUtills.getCellCount(dataSheetPath, sheetName, rowCount);\n\t\t\t\t\n\t\tString [][]empData = new String[rowCount][colCount];\n\t\t\n\t\tfor(int i = 1; i <= rowCount; i++) {\n\t\t\tfor(int j = 0; j < colCount; j++) {\n\t\t\t\tempData[i-1][j] = XLUtills.getCellData(dataSheetPath, sheetName, i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn empData;\n\t}", "private List<String> getDataFromApi() throws IOException {\n String spreadsheetId = listener.getSheetId();\n String range = listener.getSheetRange();\n List<String> results = new ArrayList<>();\n ValueRange response = this.mService.spreadsheets().values()\n .get(spreadsheetId, range)\n .execute();\n List<List<Object>> values = response.getValues();\n if (values != null) {\n values.remove(0);\n for (List row : values)\n results.add(listener.processData(row));\n }\n return results;\n }", "public static String[][] excelRead() throws Exception {\n\t\tFile excel = new File(\"/Users/HEMA/selenium/Data.xlsx\");\n\t\tFileInputStream fis = new FileInputStream(excel);\n\t\tXSSFWorkbook wb = new XSSFWorkbook(fis);\n\t\tXSSFSheet ws = wb.getSheet(\"Sheet1\");\n\t\t\n\t\t//getlastRowNum returns the # of rows starting with 0 as first row. SO to get actual row # in excel, add1\n\t\tint rowNum = ws.getLastRowNum() + 1;\n\t\tint colNum = ws.getRow(0).getLastCellNum();\n\t\tString [][] inputData = new String[rowNum][colNum]; \n\t\t\n\t\tfor (int i=0; i < rowNum; i++) {\n\t\t\tXSSFRow row = ws.getRow(i);\n\t\t\tfor (int j=0; j < colNum; j++) {\n\t\t\t\tXSSFCell cell = row.getCell(j);\n\t\t\t\tString value = cellToString(cell);\n\t\t\t\tinputData[i][j] = value;\n\t\t//\t\tSystem.out.println(\"The value is \" + value);\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\twb.close();\n\t\treturn inputData;\n\n\t}", "public static Object [][] getTestData( String sheetName) throws Exception{\n\t\t\n\t\t\tFileInputStream file = null;\n\t\t\ttry {\n\t\t\t\tfile = new FileInputStream (TESTDATA_PATH);\n\n\t\t\t\tbook = WorkbookFactory.create(file);\n\t\t\t} catch (EncryptedDocumentException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t \n\t\tsheet = book.getSheet(sheetName);\n\t\t\n\t\tObject [][] data = new Object[sheet.getLastRowNum()][sheet.getRow(0).getLastCellNum()];\n\t\t\n\t\tfor (int i=0; i<sheet.getLastRowNum(); i++) {\n\t\t\tfor( int k =0; k<sheet.getRow(0).getLastCellNum(); k++) {\n\t\t\t\t\n\t\t\t\tdata [i][k] = sheet.getRow(i+1).getCell(k).toString();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn data;\n\t\t\n\t}", "public List<List<Object>> rows() {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n for (List<String> rawRow : getRawRows()) {\n List<Object> newRow = new ArrayList<Object>();\n for (int i = 0; i < rawRow.size(); i++) {\n newRow.add(transformCellValue(i, rawRow.get(i)));\n }\n rows.add(newRow);\n }\n return rows;\n }", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "@DataProvider(name = \"dpExcelData\")\n\tpublic static Object[][] getXLData()throws Exception\n\t{\n\t\t\t\t\n\t\tString[][] xlTableArr = null;\n\t\t\n\t\tint totalRowArrSize = 0;\n\t\t\n\t\t//row and colmn indexes....\n\t\tint ri = 0, ci;\n\t\ttry{\n\t\t\t\n\t\t\tlogger.debug(\"set excel file path and sheet\");\n\t\t\t//set file path and sheet name....\n\t\t\tExcelUtils.setExcelFile(Constant.pathTestData+Constant.fileTestData, Constant.fileShName);\n\t\t\tlogger.info(\"done setting up filepath and sheet name successfully\");;\n\t\t\t\n\t\t\tlogger.debug(\"get test case name\");\n\t\t\tString tcsName = ExcelUtils.getTestCaseName(rnTestName);\n\t\t\t\n\t\t\tint tcsNameColmn = 0;\n\t\t\t\n\t\t\tlogger.debug(\"get test case row number\");\n\t\t\tint tcsRowNum = ExcelUtils.getTestCaseRowNums(tcsName,tcsNameColmn);\n\t\t\t\n\t\t\t//int totalRowsUsed = ExcelUtils.getRowUsed();\n\t\t\tlogger.debug(\"get total column used for running test cases\");\n\t\t\tint totalColmnUsed = ExcelUtils.getColmnUsed(tcsRowNum);\n\t\t\t\n\t\t\tlogger.debug(\"get row count for multiple data for tcs\");\n\t\t\tint tcsMatchRows = ExcelUtils.getTestCaseMatchingRows(tcsName, tcsNameColmn);\n\t\t\t\n\t\t\t//number of data per test cases\n\t\t\tlogger.debug(\"check number of rows\");\n\t\t\tif(tcsRowNum == tcsMatchRows)\n\t\t\t{\n\t\t\t\tlogger.info(\"found single data for this tcs\");\n\t\t\t}else\n\t\t\t{\n\t\t\t\tlogger.info(\"found multiple data for this tcs\");\n\t\t\t\ttotalRowArrSize = tcsMatchRows - tcsRowNum;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//set array size....\n\t\t\t\n\t\t\t//row counting based on 0, so set add 1 to set arraysize.....\n\t\t\tint addOneInRowArr = 1;\n\t\t\t//we start reading data from 2nd column.\n\t\t\tint minusFirstColmn = 1;\n\t\t\tlogger.info(\"set array size for array table\");\n\t\t\txlTableArr = new String[totalRowArrSize+addOneInRowArr][totalColmnUsed-minusFirstColmn];\n\t\t\t\n\t\t\tlogger.info(\"Data reading and fetching started...\");\n\t\t\tfor(int rwNum = tcsRowNum; rwNum<=tcsMatchRows; rwNum++,ri++ )\n\t\t\t{\n\t\t\t\tci =0;\n\t\t\t\tfor(int clNum = 1; clNum<totalColmnUsed; clNum++,ci++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\txlTableArr[ri][ci] = ExcelUtils.getCellData(rwNum, clNum);\n\t\t\t\t\tlogger.debug(\"data fecting is : \" + xlTableArr[ri][ci]);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}catch(FileNotFoundException e)\n\t\t{\n\t\t\tlogger.error(\"file not found\", e);\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}catch(IOException e)\n\t\t{\n\t\t\tlogger.error(\"IO exception\", e);\n\t\t\te.printStackTrace();\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tlogger.error(\"exception is occured\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tlogger.info(\"Data feteched and stored successfully in arraytable\" );\n\t\treturn (xlTableArr);\n\t}", "List<IMEInventoryHandler> getCellArray();", "public static Object[][] getTestData(String fpath,String sheetName) throws InvalidFormatException, IOException {\n\t File srcFile=new File(fpath);\n\n\t// load file\n\t FileInputStream fis=new FileInputStream(srcFile);\n\t// Load workbook\n\tXSSFWorkbook wb=new XSSFWorkbook(fis);\n\n\t// Load sheet- Here we are loading first sheetonly\n\tXSSFSheet sh1= wb.getSheet(sheetName);\n\t\t\t//two d array declaration\n\t\tObject[][] data = new Object[sh1.getLastRowNum()][sh1.getRow(0).getLastCellNum()];\n\t\t\t// System.out.println(sheet.getLastRowNum() + \"--------\" +\n\t\t\t// sheet.getRow(0).getLastCellNum());\n\t\t\tfor (int i = 0; i < sh1.getLastRowNum(); i++) {\n\t\t\t\tfor (int k = 0; k < sh1.getRow(0).getLastCellNum(); k++) {\n\t\t\t\t\tdata[i][k] = sh1.getRow(i + 1).getCell(k).toString();\n\t\t\t\t\t// System.out.println(data[i][k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn data;\n\t\t}", "public static ArrayList<String> getRowData(String path,String sheetname,String rowData) throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException\r\n\t\t{\r\n\t\t\tint rownum=0;\r\n\t\t\tWorkbook wb = WorkbookFactory.create(new FileInputStream(path));\r\n\t\t\tfor(int i=0;i<wb.getSheet(sheetname).getRow(0).getLastCellNum();i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=0;j<=wb.getSheet(sheetname).getLastRowNum();j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString rowdata;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\trowdata=wb.getSheet(sheetname).getRow(j).getCell(i).getStringCellValue().toString();\r\n\t\t\t\t\t\tif(rowdata.equals(rowData))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\trownum=j;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tint cellnum=0;;\r\n\t\t\tArrayList<String> li=new ArrayList();\r\n\t\t\tfor(int i=0;i<wb.getSheet(sheetname).getRow(rownum).getLastCellNum();i++)\r\n\t\t\t{\r\n\t\t\t\tli.add(wb.getSheet(sheetname).getRow(rownum).getCell(i).toString());\r\n\t\t\t}\r\n\t\t\twb.close();\r\n\t\t\t\r\n\t\t\treturn li;\r\n\t\t}", "public List<Map> getDataAuto(String filePath, int sheet_id){\t\t\r\n\t\tArrayList list = new ArrayList();\r\n\t\tFileInputStream fis = null;\r\n\t\ttry {\r\n\t\t\tFile file = new File(filePath);\r\n\t\t\tfis = new FileInputStream(file);\r\n\t\t\r\n\t\t\tWorkbook book = Workbook.getWorkbook(fis);\t\t\t\r\n\t\t\tSheet sheet = book.getSheet(sheet_id);\r\n\t\t\t\r\n\t\t\tint columns = sheet.getColumns();\r\n\t\t\tint rows = sheet.getRows();\r\n\t\t\tint realrows = 0;\r\n\t\t\tfor(int i = 1; i < rows; i++){\r\n\t\t\t\tMap<String,String> map = new HashMap<String,String>();\r\n\t\t\t\tint nullColumns = 0;\r\n\t\t\t\tfor(int j = 0; j < columns; j++){\r\n\t\t\t\t\tString val = StringUtils.trimToEmpty(sheet.getCell(j,i).getContents());\r\n\t\t\t\t\tif(StringUtils.isBlank(val)){\r\n\t\t\t\t\t\tnullColumns++;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\tmap.put(String.valueOf(j), sheet.getCell(j,i).getContents());\r\n\t\t\t\t}\r\n\t\t\t\tif(nullColumns < columns){\r\n\t\t\t\t\tlist.add(map);\r\n\t\t\t\t\trealrows++;\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"第\" + realrows + \"行\");\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 (BiffException 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\tif(fis != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public static String[][] readSheet(String dataTablePath, String sheetName) throws IOException{\n\n\t\tString xlData[][] = null;\n\n\t\tFile xlFile = new File(dataTablePath);\n\n\t\t/*step2: Access the Xl File*/\n\t\tFileInputStream xlDoc = new FileInputStream(xlFile);\n\n\t\t/*Step3: Access the work book */\n\t\tHSSFWorkbook wb = new HSSFWorkbook(xlDoc);\n\n\n\t\t/*Step4: Access the Sheet */\n\t\tHSSFSheet sheet = wb.getSheet(sheetName);\n\n\t\tint iRowCount = sheet.getLastRowNum()+1;\n\t\tint iColumnCount = sheet.getRow(0).getLastCellNum();\n\n\t\txlData = new String [iRowCount][iColumnCount];\n\n\t\tfor(int i = 0; i <iRowCount; i++ ){\n\t\t\tfor(int j = 0; j<iColumnCount; j++){\n\t\t\t\tHSSFCell cell = sheet.getRow(i).getCell(j);\n\t\t\t\txlData[i][j] = cell.getStringCellValue();\n\t\t\t}\n\t\t}\n\t\treturn xlData;\n\t}", "java.util.List<Report.LocationOuterClass.MobileCell> \n getCellsList();", "public List<Sheet> getSheets() {\n\n List<Sheet> sheets = new ArrayList<>();\n for (int i=0; i<workbook.getNumberOfSheets(); i++) {\n sheets.add( workbook.getSheetAt(i) );\n }\n return sheets;\n }", "public String getDatacolumn(String sheetName){\n\t\t\r\n\t\tfor (int i = 0; i < row.getLastCellNum(); i++) {\r\n\t\t\t//System.out.print(data[i][colNum]);\r\n\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\tString valuString= sheet.getRow(i ).getCell(j).toString();\r\n\t\t\t\tSystem.out.println(\"[\"+i+\"]\"+\"[\"+j+\"]\"+\" =\"+ valuString);\r\n\t\t\t\t//start\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsheet=workbook.getSheet(sheetName);\r\n\t\t\t\t\trow=sheet.getRow(i);\r\n\t\t\t\t\tcell=row.getCell(j);\r\n\t\t\t\t\tif (cell.getCellTypeEnum()==CellType.STRING) {\r\n\t\t\t\t\treturn cell.getStringCellValue();\t\r\n\t\t\t\t\t}else if (cell.getCellTypeEnum()==CellType.NUMERIC || cell.getCellTypeEnum()==CellType.FORMULA) {\r\n\t\t\t\t\tString cellValue =String.valueOf(cell.getNumericCellValue());\r\n\t\t\t\t\tif (HSSFDateUtil.isCellDateFormatted(cell)) {\r\n\t\t\t\t\tDateFormat dt=\tnew SimpleDateFormat(\"dd/MM/yy\");\r\n\t\t\t\t\tDate date =cell.getDateCellValue();\r\n\t\t\t\t\tcellValue =dt.format(date);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn cellValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (cell.getCellTypeEnum()==CellType.BLANK)\r\n\t\t\t\t\t\treturn\" \";\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\treturn String.valueOf(cell.getBooleanCellValue());\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} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn \"No Match Value Found\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//finish\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\treturn sheetName;\r\n\r\n\t\t//return data;\r\n\r\n\t}", "public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}", "public static ArrayList<String> getColumnFromExcel(final HSSFSheet sheet,\n\t\t\tfinal int columnIndex, final int rowIndex_start, final int rowIndex_end) {\n\n\t\tfinal ArrayList<String> columnData = new ArrayList<String>();\n\t\tfor (int i = rowIndex_start; i <= rowIndex_end; i++) {\n\t\t\tfinal Row row = sheet.getRow(i);\n\t\t\tif (row != null) {\n\t\t\t\tfinal Cell cell = row.getCell(columnIndex);\n\t\t\t\tif (cell != null) {\n\t\t\t\t\tfinal String cellValue = POIUtils.getCellValue(cell);\n\t\t\t\t\tif (!cellValue.equals(\"\")) {\n\t\t\t\t\t\tcolumnData.add(cellValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcolumnData.add(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcolumnData.add(\"\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcolumnData.add(\"\");\n\t\t\t}\n\t\t}\n\n\t\treturn columnData;\n\t}", "public Object[] getRowData(int currentRowIndex) {\n\n int width;\n try {\n width = currentSheet.getRow(0).getLastCellNum();\n }catch(Exception e){\n throw new IllegalStateException(\"The current sheet referenced in \" + currentSheet.getSheetName() + \" is empty and is not usable.\");\n }\n\n List<Object> rows = new ArrayList<>();\n Cell cell;\n\n for (int currentCell = 0; currentCell < width; currentCell++) {\n\n // empty cell catch\n try {\n cell = currentSheet.getRow(currentRowIndex).getCell(currentCell);\n } catch (Exception e) {\n cell = null;\n }\n\n // cell data retrieval\n Object value = getCellData(cell);\n\n // conversion with width catch\n if (parameterTypes != null && currentCell < parameterTypes.length)\n value = convertToType(value, parameterTypes[currentCell]);\n\n // final value added\n rows.add(value);\n }\n\n return rows.toArray();\n }", "@DataProvider\n\tpublic String[][] getData() {\n\t\treturn readExcel.getExcelData(\"Sheet1\");\n\t}", "private void fill() {\r\n\t\tmap = new TreeMap<String, String>();\r\n\t\tlist = new ArrayList<String>();\r\n\t\ttry {\r\n\r\n\t\t\tFileInputStream ExcelFileToRead = new FileInputStream(\"V:\\\\Public\\\\Venatorx Employee and Conference Room Phone List.xlsx\");\r\n\r\n\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\tXSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\tXSSFRow row; \r\n\t\t\tXSSFCell cell;\r\n\t\t\t\r\n\t\t\tarr = new String[9];\r\n\t\t\tIterator<Row> rows = sheet.rowIterator();\r\n\t\t\tString temp = \"\";\r\n\t\t\r\n\t\t\twhile (temp.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\trow=(XSSFRow) rows.next();\r\n\t\t\t\tIterator<Cell> cells = row.cellIterator();\r\n\t\t\t\tfor (int i = 0; i < 9; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tcell=(XSSFCell) cells.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (cell.getCellType() == XSSFCell.CELL_TYPE_STRING)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString check = cell.getStringCellValue();\r\n\t\t\t\t\t\tif(check.equals(\"First Name\")) {\r\n\t\t\t\t\t\t\ttemp = \"First\";\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tarr[i] = cell.getStringCellValue();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getStringCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(cell.getCellType() == XSSFCell.CELL_TYPE_NUMERIC)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCell tempCell = cell;\r\n\t\t\t\t\t\tDataFormatter formatter = new DataFormatter();\r\n\t\t\t\t\t\tString strValue = formatter.formatCellValue(tempCell);\r\n\t\t\t\t\t\tarr[i] = strValue;\r\n\t\t\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t\t\t\t//System.out.print(cell.getNumericCellValue()+\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if((i == 0) && (cell.getCellType() == XSSFCell.CELL_TYPE_BLANK)) {\r\n\t\t\t\t\t\ttemp = \"Final line\";\r\n\t\t\t\t\t\tbreak;\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 unknown = \"Unknown\";\r\n\t\t\t\t\t\tarr[i] = unknown;\r\n\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\tif(temp.equals(\"Final line\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if(temp.equals(\"First\")) {\r\n\t\t\t\t\ttemp = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString name = arr[0].trim() + \" \" + arr[1].trim();\r\n\t\t\t\t\tString accreditions = arr[2].trim();\r\n\t\t\t\t\tString title = arr[3].trim();\r\n\t\t\t\t\tString extension = arr[4].trim();\r\n\t\t\t\t\tString directNumber = arr[5].trim();\r\n\t\t\t\t\tString cellNumber = arr[6].trim();\r\n\t\t\t\t\tString email = arr[7].trim();\r\n\t\t\t\t\tString location = arr[8].trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tString info = accreditions + \":\" + title + \":\" + extension + \":\" + directNumber + \":\" + cellNumber + \":\" + email + \":\" + location;\r\n\t\t\t\t\t//System.out.println(name + info);\r\n\t\t\t\t\tmap.put(name, info);\r\n\t\t\t\t\t//set.add(name);\r\n\t\t\t\t\tlist.add(name);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr = new String[9];\r\n\t\t\t\t\t//System.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t \r\n\t\t } catch (FileNotFoundException e2) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te2.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public List<TimesheetRow> getTimesheetRowList(){\n\t\tif (timesheetRowList == null) {\n\t\t\trefreshList();\n\t\t}\n\t\treturn timesheetRowList;\n\t}", "public List<String> getRows();", "public List<String> GetRowdata(String SheetName,List<String> Rowlist, int ColumnNumber,String value)\n\t{\n\t\tList<String> strlist = new ArrayList<String>();\n\t\t\n\t\t//System.out.println(\" StateCode \"+ SheetName + \" PRIC_ZN \" +Rowlist.size()+\" FuelType \" +ColumnNumber + \" PlanType \"+ value);\n\t\t\t\t\t\t\n\t\tsheet = workbook.getSheet(SheetName);\n\t\tint i=0;\n\t\tif (Rowlist!= null)\n\t\t{\n\t\t\tfor(i=0; i < Rowlist.size();i++ )\n\t\t\t{\n\t\t\t \trow = sheet.getRow(Integer.parseInt(Rowlist.get(i).toString()));\n\t\t\t\tif( row.getCell(ColumnNumber).getStringCellValue().toString().contains(value))\n\t\t\t\t\tstrlist.add(Rowlist.get(i).toString());\t\n\t\t\t}\n\t\t\treturn strlist;\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i=0; i < sheet.getLastRowNum();i++ )\n\t\t\t{\n\t\t\t\trow = sheet.getRow(i);\n\t\t\t\tif( row.getCell(ColumnNumber).getStringCellValue().toString().contains(value))\n\t\t\t\t\tstrlist.add(String.valueOf(i));\t\n\t\t\t}\n\t\t\t\n\t\t\treturn strlist;\n\t\t\t\n\t\t}\n\t}", "public Object[][] getExcelData(String excelLoc) throws EncryptedDocumentException, InvalidFormatException, IOException {\r\n\t\t\r\n\t\tInputStream inputStream = null;\r\n\t\t \r\n\t\tinputStream = new FileInputStream(new File(excelLoc));\r\n\t\tWorkbook wb = WorkbookFactory.create(inputStream);\r\n\t\tSheet sheet = wb.getSheetAt(0);\r\n\t\t int lastRowNum = sheet.getLastRowNum() ;\r\n\t\t int lastCellNum = sheet.getRow(0).getLastCellNum();\r\n\t\t Object[][] obj = new Object[lastRowNum][1];\r\n\r\n\t\t for (int i = 0; i < lastRowNum; i++) {\r\n\t\t Map<Object, Object> datamap = new HashMap<Object, Object>();\r\n\t\t for (int j = 0; j < lastCellNum; j++) {\r\n\t\t datamap.put(sheet.getRow(0).getCell(j).toString(), sheet.getRow(i+1).getCell(j).toString());\r\n\t\t }\r\n\t\t obj[i][0] = datamap;\r\n\r\n\t\t }\r\n\t\t return obj;\r\n\t\t }", "public Map<String, Map<String,Map<String,String>>> getXlsxContent() throws Docx4JException {\n\t\t// List the parts by walking the rels tree\n\t\tRelationshipsPart rp \t= xlsxPkg.getRelationshipsPart();\n\t\tStringBuilder sb \t\t= new StringBuilder();\n\t\ttraverseRelationships(xlsxPkg, rp, sb, \" \");\n\t\tMap<String,Map<String,Map<String,String>>> allSheets\t= new LinkedHashMap<String,Map<String,Map<String,String>>>();\n\t\tMap<String,Map<String,String>> allSheetContent\t\t\t= new LinkedHashMap<String,Map<String,String>>();\n\t\t// Now lets print the cell content\n\t\tint i = 0;\n\t\tfor(WorksheetPart sheet: worksheets) {\n\t\t\ti++;\n\t\t\tWorksheet ws \t= sheet.getJaxbElement();\n\t\t\tSheetData data \t= ws.getSheetData();\n\t\t\tint rowNbr\t\t=0;\n\t\t\tfor (Row r : data.getRow() ) {\n\t\t\t\tMap<String,String> sheetContent\t\t\t\t\t\t\t= new LinkedHashMap<String,String>();\n\t\t\t\tfor (Cell c : r.getC() ) {\n\t\t\t\t\tif (c.getT().equals(STCellType.S)) {\n\t\t\t\t\t\tCTXstringWhitespace lineContent = sharedStrings.getJaxbElement().getSi().get(Integer.parseInt(c.getV())).getT();\n\t\t\t\t\t\tsheetContent.put(c.getR(),lineContent.getValue());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// TODO: handle other cell types\n\t\t\t\t\t\tsheetContent.put(c.getR(),c.getV());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallSheetContent.put(String.valueOf(rowNbr),sheetContent);\n\t\t\t\trowNbr++;\n\t\t\t}\n\t\t\tallSheets.put(\"Sheet_\"+i,allSheetContent);\n\t\t}\n\t\treturn allSheets;\n\t}", "public String[] getRowData(int rowIndex)\n\t{\n\t\tHSSFRow row=sheet.getRow(rowIndex);\n\t\tint cellCount=row.getPhysicalNumberOfCells();\n\t\tString [] rowData=new String[cellCount];\n\t\tfor(int i=0;i<cellCount;i++)\n\t\t{\n\t\t\trowData[i]=getData(row,i);\n\t\t}\n\t\treturn rowData;\n\t}", "private int FuncFillColumnList(ArrayList list,int sheetinput) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(filename));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint columns=0;\n\t\tif(type==0){\n\t\t//create wrokbook xls\n\t\tHSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new HSSFWorkbook(fis);\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//create sheet object to retrieve the sheet\n\t\tHSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\t\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\tif(type==1){\n\t\t//create wrokbook xlsx\n\t\tXSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new XSSFWorkbook(fis);\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//create sheet object to retrieve the sheet\n\t\tXSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\treturn columns-1;\n\t}", "public Object[] list() {\r\n ArrayList<Object> obj = new ArrayList<>();\r\n obj.add(row);\r\n obj.add(table);\r\n obj.add(variable);\r\n obj.add(name);\r\n obj.add(equEquipement);\r\n obj.add(equDesignation);\r\n obj.add(orgOrgane);\r\n obj.add(orgDesignation);\r\n obj.add(unite);\r\n obj.add(comment);\r\n obj.add(datemod);\r\n obj.add(state);\r\n\r\n return obj.toArray();\r\n }", "public static HashMap<String, ArrayList<String>> readExcelData(int index) throws IOException {\r\n\r\n\t\t// Creating hashmap to store data\r\n\t\tHashMap<String, ArrayList<String>> data = new HashMap<>();\r\n\r\n\t\t// Reading the excel sheet\r\n\t\tFile src = new File(System.getProperty(\"user.dir\") + prop.getProperty(\"testData_path\"));\r\n//\t\tSystem.out.println(src.getAbsolutePath());\r\n\t\tread_file = new FileInputStream(src);\r\n\t\t\r\n\t\tworkbook = new XSSFWorkbook(read_file);\r\n\t\t\r\n\t\tSystem.out.println(\"Sheet name :\"+\"\"+workbook.getSheetAt(index));\r\n\t\tSystem.out.println(workbook.getNumberOfSheets());\r\n\t\tworksheet = workbook.getSheetAt(index);\r\n\r\n\t\t\r\n\t\t// Iterating over all cells in the sheet\r\n\t\tIterator<Row> rowIterator;\r\n\t\tArrayList<String> rowData = new ArrayList<>();\r\n\t\trowIterator = worksheet.iterator();\r\n\t\tint rowNum = 1;// \"1\": {..}\r\n\t\tif (rowIterator.hasNext())\r\n\t\t\trow = rowIterator.next();\r\n\t\twhile (rowIterator.hasNext()) {\r\n\t\t\trow = rowIterator.next();\r\n\t\t\tIterator<Cell> cellIterator = row.iterator();\r\n\t\t\tif (row.getCell(0) == null) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Writing cell data to hashmap based on cell data type\r\n\t\t\trowData = new ArrayList<>();\r\n\t\t\twhile (cellIterator.hasNext()) {\r\n\t\t\t\tCell cell = cellIterator.next();\r\n\t\t\t\tCellType type = cell.getCellTypeEnum();\r\n\t\t\t\tif (type.equals(CellType.STRING))\r\n\t\t\t\t\trowData.add(cell.getStringCellValue());\r\n\t\t\t\telse if (type.equals(CellType.NUMERIC))\r\n\t\t\t\t\trowData.add(\"\" + (int) cell.getNumericCellValue());\r\n\t\t\t}\r\n\t\t\tdata.put(\"\" + (rowNum), rowData);\r\n\t\t\trowNum++;\r\n\t\t}\r\n\r\n\t\t// Closing FileInputStream and XSSFWorkbook\r\n\t\tworkbook.close();\r\n\t\tread_file.close();\r\n\t\treturn data;\r\n\t}", "private List<List<String>> getAllRows() {\n List<List<String>> rowLst = new ArrayList<List<String>>();\n int rowIndex = 1;\n String xpathRow = xpathTableRow.replace(\"*row*\", String.valueOf(rowIndex));\n while (isElementPresent(xpathRow) && isElementVisible(xpathRow)) {\n List<String> row = new ArrayList<String>();\n for (int i = 1; i <= 3; i++) {\n String xpathCell = xpathTableCell.replace(\"*row*\", String.valueOf(rowIndex))\n .replace(\"*col*\",\n String.valueOf(i));\n waitForElementVisibility(xpathCell);\n row.add(assertAndGetText(xpathCell));\n }\n logger.info(\"# Row \" + rowIndex + \": \" + row);\n rowLst.add(row);\n xpathRow = xpathTableRow.replace(\"*row*\", String.valueOf(++rowIndex));\n }\n logger.info(\"# List of rows: \" + rowLst);\n return rowLst;\n }", "java.util.List<Column>\n getColumnsList();", "public void printSheet(ArrayList<ArrayList<String>> sheetData)\n\t {\n\t\t Iterator<ArrayList<String>> rowIterator= sheetData.iterator();\n\t\t ArrayList<String> headers = rowIterator.next();\t//First row is header\n\t\t int rowCounter = 1;\n\t\t while(rowIterator.hasNext())\n\t\t {\n\t\t\t ArrayList<String> nextRow = rowIterator.next();\n\t\t\t System.out.println(\"\\n---Record \" + rowCounter + \" ---\");\n\t\t\t printHeadersAndData(headers, nextRow);\n\t\t\t rowCounter++;\n\t\t }\n\t }", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "@SuppressWarnings(\"resource\")\n public static String[][] getExcelData(MultipartFile file, int rowStart, int columnNumber) throws IOException {\n String[][] data = null;\n Workbook wb = null;\n try {\n wb = new HSSFWorkbook(file.getInputStream());\n } catch (Exception e) {\n wb = new XSSFWorkbook(file.getInputStream());\n }\n int sheetNum = wb.getNumberOfSheets();\n for (int i = 0; i < sheetNum; i++) {\n Sheet sheet = wb.getSheetAt(i);\n int rowNum = sheet.getPhysicalNumberOfRows();\n for (int j = rowStart, rowCursor = 0; j < rowNum; j++, rowCursor++) {\n Row row = sheet.getRow(j);\n if (j == rowStart) {\n data = new String[rowNum][columnNumber];\n }\n for (int k = 0; k < columnNumber; k++) {\n if (null == row) {\n data[rowCursor][k] = \"\";\n } else {\n Cell cell = row.getCell(k);\n data[rowCursor][k] = parseExcel(cell);\n }\n }\n }\n }\n return data;\n }", "List<String> getColumns();", "public static Object[][] getArray(String sheet,String Environment){\n\tfinal String dir = System.getProperty(\"user.dir\");\n\tif(Environment.equalsIgnoreCase(\"stage\"))\n\t\treturn UtilWrapper.getTableArray(dir + \"/src/test/resources/testdata/LINKS.xls\", sheet, \"StagePid\");\n\telse\n\t\treturn UtilWrapper.getTableArray(dir + \"/src/test/resources/testdata/LINKS.xls\", sheet, \"EnvPid\");\n}", "public ArrayList<MaterialData> parseExcelFile(InputStream is) {\n\t\ttry {\n\t\t\tWorkbook workbook = new XSSFWorkbook(is);\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\tSheet sheet = workbook.getSheet(\"RAWDATA\");\n\t\t\tIterator<Row> rows = sheet.iterator();\n\n\t\t\tArrayList<MaterialData> values = new ArrayList<MaterialData>();\n\n\t\t\tint rowNumber = 0;\n\t\t\twhile (rows.hasNext()) {\n\t\t\t\tRow currentRow = rows.next();\n\n\t\t\t\t// skip header and next two column (totally ignored first 3 rows)\n\t\t\t\tif (rowNumber < 3) {\n\t\t\t\t\trowNumber++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tMaterialData material = new MaterialData();\n\t\t\t\tIterator<Cell> cellsInRow = currentRow.iterator();\n\t\t\t\tint columnNumber = 0;\n\t\t\t\twhile (cellsInRow.hasNext()) {\n\t\t\t\t\tCell currentCell = cellsInRow.next();\n\t\t\t\t\tif (columnNumber == 0)\n\t\t\t\t\t\tmaterial.setMaterialId((long) currentCell.getNumericCellValue());\n\t\t\t\t\telse if (columnNumber == 1)\n\t\t\t\t\t\tmaterial.setClassName(formatter.formatCellValue(currentCell));\n\t\t\t\t\telse if (columnNumber == 2)\n\t\t\t\t\t\tmaterial.setCharacter(formatter.formatCellValue(currentCell));\n\t\t\t\t\telse if (columnNumber == 3)\n\t\t\t\t\t\tmaterial.setValue(formatter.formatCellValue(currentCell));\n\t\t\t\t\tcolumnNumber++;\n\t\t\t\t}\n\n\t\t\t\tif (material.getMaterialId() != 0) {\n//\t\t\t\t\tSystem.out.println(material);\n\t\t\t\t\tvalues.add(material);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Close WorkBook\n\t\t\tworkbook.close();\n\t\t\tSystem.out.println(\"Total Count \" + values.size());\n\t\t\tSystem.out.println(\"First Element \" + values.get(0));\n\t\t\tSystem.out.println(\"Last Element \" + values.get(values.size() - 1));\n\t\t\treturn values;\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"FAIL! -> message = \" + e.getMessage());\n\t\t}\n\t}", "public String[][] excelRead(String xlFilePath) throws Exception{\n\t\tSystem.out.println(\"xlFilePaht = \" + xlFilePath);\n\t\tFile fileHandle = new File(xlFilePath);\n\t\tFileInputStream testDataStream = new FileInputStream(fileHandle);\n\t\tHSSFWorkbook xlWorkbook = new HSSFWorkbook(testDataStream);\n\t\tHSSFSheet xlSheet = xlWorkbook.getSheetAt(0);\n\t\txlNumOfRows = \txlSheet.getLastRowNum()+1;\n\t\txlNumOfCols = xlSheet.getRow(0).getLastCellNum();\n\t\txlLocalArray = new String[xlNumOfRows][xlNumOfCols];\n\t\t\n\t\tfor (int row = 0; row<xlNumOfRows; row++){\n\t\t\tHSSFRow rowData = xlSheet.getRow(row);\n\t\t\tfor (int col = 0; col < xlNumOfCols; col++){\n\t\t\t\tHSSFCell cell = rowData.getCell(col);//read data from every cell\n\t\t\t\tString cellvalue = cellToString(cell);\n\t\t\t\txlLocalArray[row][col] = cellvalue;\n\t\t\t\t\n\t\t\t}//end of column loop\t\t\t\n\t\t}//end of row loop\n\t\t\n\t\treturn xlLocalArray;\n\t}", "public static Map<String, List<List<String>>> get_excel_data(\r\n\t\t\tString excel_file\r\n\t\t\t) {\r\n\t\tMap<String, List<List<String>>> ExcelData = new HashMap<String, List<List<String>>>();\r\n\t\txls_parser excel_obj = new xls_parser();\r\n\t\tExcelData = excel_obj.GetExcelData(excel_file);\r\n\t\treturn ExcelData;\r\n\t}", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "@DataProvider\n\tpublic String[][] getExcelData() throws InvalidFormatException, IOException {\n\t\tReadExcel read = new ReadExcel();\n\t\treturn read.getCellData(\"Testdata/FOE.xlsx\", \"sheet1\");\n\t }", "@NonNull\n Collection<TObj> getRowItems(int row) {\n Collection<TObj> result = new LinkedList<>();\n SparseArrayCompat<TObj> array = mData.get(row);\n for (int count = array.size(), i = 0; i < count; i++) {\n int key = array.keyAt(i);\n TObj columnObj = array.get(key);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }", "public List<String> getColumns();", "public List<byte[]> getColumns(){\n List<byte[]> list = new ArrayList<byte[]>();\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n if(iter.hasNext()){\n byte[] col = iter.next().getSecond();\n if(null != col)\n list.add(col);\n }\n return list;\n }", "List<List<Object>> getTableValues();", "public static void readInRange() throws IOException, GeneralSecurityException {\n\t\tValueRange valuesInSheet = sheetService.spreadsheets().values().get(spreadSheetID, \"A1:E10\").execute();\n\t\tList<List<Object>> values = valuesInSheet.getValues();\n// System.out.println(\"number of rows: \" + values.size() + \" \\n\" + \"number of columns: \" + values.get(0).size());\n\t\tif (values == null || values.isEmpty()) {\n\t\t\tSystem.out.println(\"no data\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < values.size(); i++) {\n\t\t\t\tfor (int j = 0; j < values.get(i).size(); j++) {\n\t\t\t\t\tif (j < values.get(i).size() - 1) {\n\t\t\t\t\t\tSystem.out.printf(\"%s \\t \", values.get(i).get(j));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.printf(\"%s \\t \\n\", values.get(i).get(j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private List<Map<Player, Integer>> collectBoardData() {\n List<Map<Player, Integer>> list = new ArrayList<>();\n\n for (int i = 0; i < board.length; i++) {\n list.add(collectLine(getRow(i)));\n list.add(collectLine(getColumn(i)));\n }\n\n list.add(collectLine(getMainDiagonal()));\n list.add(collectLine(getSecondDiagonal()));\n\n return list;\n }", "public static void main(String[] args) throws IOException, InvalidFormatException {\n Workbook workbook = WorkbookFactory.create(new File(SAMPLE_XLSX_FILE_PATH));\r\n\r\n // Retrieving the number of sheets in the Workbook\r\n System.out.println(\"Workbook has \" + workbook.getNumberOfSheets() + \" Sheets : \");\r\n\r\n /*\r\n =============================================================\r\n Iterating over all the sheets in the workbook (Multiple ways)\r\n =============================================================\r\n */\r\n\r\n // 1. You can obtain a sheetIterator and iterate over it\r\n Iterator<Sheet> sheetIterator = workbook.sheetIterator();\r\n System.out.println(\"Retrieving Sheets using Iterator\");\r\n while (sheetIterator.hasNext()) {\r\n Sheet sheet = sheetIterator.next();\r\n System.out.println(\"=> \" + sheet.getSheetName());\r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n }\r\n\r\n\r\n\r\n /*\r\n ==================================================================\r\n Iterating over all the rows and columns in a Sheet (Multiple ways)\r\n ==================================================================\r\n */\r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet = workbook.getSheetAt(0);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator = sheet.rowIterator();\r\n int noOfColumns=0;\r\n \r\n while (rowIterator.hasNext()) {\r\n Row row =(Row) rowIterator.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet1 = workbook.getSheetAt(1);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet1);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter1 = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator1 = sheet1.rowIterator();\r\n int noOfColumns1=0;\r\n \r\n while (rowIterator1.hasNext()) {\r\n Row row =(Row) rowIterator1.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter1.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns1=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows1 = sheet1.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows1);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns1);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet11 = workbook.getSheetAt(2);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet11);\r\n \r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter11 = new DataFormatter();\r\n\r\n // You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator11 = sheet11.rowIterator();\r\n int noOfColumns11=0;\r\n \r\n while (rowIterator11.hasNext()) {\r\n Row row =(Row) rowIterator11.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter11.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns11=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows11 = sheet11.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows11);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns11);\r\n // Closing the workbook\r\n workbook.close();\r\n }", "ISheet getSheet(int index);", "@DataProvider(name = \"xls-inputs\")\n\tpublic Object[][] getXLSData() {\n\t\treturn new ReadExcel().getExcelData(\"C:\\\\project-framework\\\\Testing.xlsx\", \"Sheet1\");\n\t}", "private static String exportJSONStringFromSheetData(List<List<String>> dataTable)\n {\n String ret = \"\";\n if(dataTable != null)\n {\n int rowCount = dataTable.size();\n if(rowCount > 1)\n {\n // Create a JSONObject to store table data.\n JSONObject tableJsonObject = new JSONObject();\n // The first row is the header row, store each column name.\n List<String> headerRow = dataTable.get(0);\n int columnCount = headerRow.size();\n // Loop in the row data list.\n for(int i=1; i<rowCount; i++)\n {\n // Get current row data.\n List<String> dataRow = dataTable.get(i);\n // Create a JSONObject object to store row data.\n JSONObject rowJsonObject = new JSONObject();\n for(int j=0;j<columnCount;j++)\n {\n String columnName = headerRow.get(j);\n String columnValue = dataRow.get(j);\n rowJsonObject.put(columnName, columnValue);\n }\n tableJsonObject.put(\"Row \" + i, rowJsonObject);\n }\n // Return string format data of JSONObject object.\n ret = tableJsonObject.toString();\n }\n }\n return ret;\n }", "private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }", "List<C> getRow() throws Exception;", "public Sheet getSheet()\n {\n return ( cells != null & cells.length >= 1\n & cells[0] != null & cells[0].length >= 1\n & cells[0][0] != null\n ? cells[0][0].getSheet() : null );\n }", "protected Element[] getCells(int row, int col, int days) {\r\n\r\n\t\tElement[] elems = new Element[days];\r\n\r\n\t\tfor (int i = 0; i < days; i++) {\r\n\t\t\tif (col > daysPerWeek - 1) {\r\n\t\t\t\tcol = 0;\r\n\t\t\t\trow++;\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * Cheap code here. If the row / cell throw an out of index exception we just\r\n\t\t\t * break. This kind of sucks because we have to now account for null items in\r\n\t\t\t * the Element[] array.\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\telems[i] = monthGrid.getFlexCellFormatter().getElement(row, col);\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcol++;\r\n\t\t}\r\n\r\n\t\treturn elems;\r\n\t}", "java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> \n getRowList();", "public List<?> getList(int columnIndex) {\n ListVector vector = (ListVector) table.getVector(columnIndex);\n return vector.getObject(rowNumber);\n }", "public List<Element> getElementFromExcel(String inputFilePath);", "public List<List<String>> readExcel(String path) throws IOException {\n\n\t\tString postfix = getPostfix(path);\n\t\tif (OFFICE_EXCEL_2003_POSTFIX.equals(postfix)) {\n\t\t\treturn readXls(path);\n\t\t} else if (OFFICE_EXCEL_2010_POSTFIX.equals(postfix)) {\n\t\t\treturn readXlsx(path);\n\t\t}\n\t\treturn null;\n\n\t}", "public List<Getable> data() {\n assertVisible();\n String[] headings = headings();\n List<List<String>> rowsWithTdStrings = get().findElements(By.tagName(\"tr\")).stream()\n // Ignore rows without TD elements\n .filter(e -> !e.findElements(By.tagName(\"td\")).isEmpty())\n // Then turn each row of TDs into a list of their string-contents\n .map(row -> row.findElements(By.tagName(\"td\")).stream().map(e -> e.getText()).collect(toList()))\n .collect(toList());\n\n List<Getable> result = new ArrayList<>();\n for (List<String> rowWithTdStrings : rowsWithTdStrings) {\n GetableMap aResult = new GetableMap();\n assertEquals(\"Different number of headings and columns\",\n headings.length, rowWithTdStrings.size());\n for (int i = 0; i < headings.length; i++) {\n aResult.put(headings[i], rowWithTdStrings.get(i));\n }\n result.add(aResult);\n }\n return result;\n }", "public ArrayList<CharacterSheet> readCharacterSheet(User user) {\n\t\tArrayList<CharacterSheet> sheets = new ArrayList<CharacterSheet>();\n\t\tint userId = user.getIdUser();\n\t\tString sql = \"SELECT \"\n\t\t+ \"idcharactersheet, player_name, character_name, character_class, race, alignment, \"\n\t\t+ \"background, proficience_bonus, inspiration, xp_points, life_points, level, armor_class, \"\n\t\t+ \"hit_dice, speed, initiative, passive_perception \"\n\t\t+ \"FROM charactersheet \"\n\t\t+ \"WHERE user_iduser=?\";\n\t\t\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttry {\n\t\t\tstmt = getConnection().prepareStatement(sql);\n\t\t\tstmt.setInt(1, userId);\n\t\t\t\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tCharacterSheet sheet = new CharacterSheet();\n\t\t\t\tsheet.setIdCharacterSheet(rs.getInt(\"idcharactersheet\"));\n\t\t\t\tsheet.setPlayerName(rs.getString(\"player_name\"));\n\t\t\t\tsheet.setCharacterName(rs.getString(\"character_name\"));\n\t\t\t\tsheet.setCharacterClass(rs.getString(\"character_class\"));\n\t\t\t\tsheet.setRace(rs.getString(\"race\"));\n\t\t\t\tsheet.setAlignment(rs.getString(\"alignment\"));\n\t\t\t\tsheet.setBackground(rs.getString(\"background\"));\n\t\t\t\tsheet.setProficienceBonus(rs.getInt(\"proficience_bonus\"));\n\t\t\t\tsheet.setInspiration(rs.getBoolean(\"inspiration\"));\n\t\t\t\tsheet.setXpPoints(rs.getDouble(\"xp_points\"));\n\t\t\t\tsheet.setLifePoints(rs.getInt(\"life_points\"));\n\t\t\t\tsheet.setLevel(rs.getInt(\"level\"));\n\t\t\t\tsheet.setArmorClass(rs.getInt(\"armor_class\"));\n\t\t\t\tsheet.setHitDice(rs.getString(\"hit_dice\"));\n\t\t\t\tsheet.setSpeed(rs.getString(\"speed\"));\n\t\t\t\tsheet.setInitiative(rs.getString(\"initiative\"));\n\t\t\t\tsheet.setPassivePerception(rs.getInt(\"passive_perception\"));\n\t\t\t\tsheets.add(sheet);\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\trs.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn sheets;\n\t}", "public String getCellData(String sheetname, String colName, int rowNum) {\r\n\t\ttry {\r\n\t\t\tint col_Num = -1;\r\n\t\t\tsheet = workbook.getSheet(sheetname);\r\n\t\t\trow = sheet.getRow(0); \t\r\n\t\t\tfor(int i=0; i<row.getLastCellNum(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tif(row.getCell(i).getStringCellValue().trim().equalsIgnoreCase(colName)) \r\n\t\t\t\t\tcol_Num = i;\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t row = sheet.getRow(rowNum-1);\r\n\t\t cell = row.getCell(col_Num);\r\n\t\t\t\r\n\t\t \r\n\t\t if(cell.getCellType() == CellType.STRING) \r\n\t\t\t \r\n\t\treturn cell.getStringCellValue();\r\n\t\t \r\n\t\telse if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA) {\r\n\t\t\t\r\n\t\t\tString cellValue =String.valueOf(cell.getNumericCellValue());\r\n\t\t\tif (HSSFDateUtil.isCellDateFormatted(cell)) {\r\n\t\t\t\tDateFormat df = new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\t\t\tDate date = cell.getDateCellValue();\r\n\t\t\t\tcellValue = df.format(date);\r\n\t\t\t}\r\n\t\t\treturn cellValue;\r\n\t\t}else if (cell.getCellTypeEnum() == CellType.BLANK)\r\n\t\t\treturn \"\";\r\n\t\telse \r\n\t\t\t\r\n\t\t // return cell.getStringCellValue();\r\n\t\t return String.valueOf(cell.getBooleanCellValue());\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"row \"+rowNum+\" or columnName \"+colName +\" does not exist in Excel\";\r\n\t\t\t \r\n\t }\r\n\t}", "@Test\n public void readExcelFile(){\n\n ExcelUtil qa3short =new ExcelUtil(\"src/test/resources/Vytracktestdata.xlsx\", \"QA3-short\");\n\n //how many row in the sheet\n System.out.println(\"qa3short.rowCount() = \" + qa3short.rowCount());\n //qa3short.rowCount() = 14\n\n //how many columns in the sheet\n System.out.println(\"qa3short.columnCount() = \" + qa3short.columnCount());\n //qa3short.columnCount() = 4\n\n //get all column names\n System.out.println(\"qa3short.getColumnsNames() = \" + qa3short.getColumnsNames());\n //qa3short.getColumnsNames() = [username, password, firstname, lastname]\n\n //get all data in List of maps\n\n //qa3short.getDataList(); right click create variable\n List<Map<String, String>> dataList = qa3short.getDataList();\n\n //iter --- onerow\n\n for (Map<String, String> onerow : dataList) {\n System.out.println( onerow);\n //{password=UserUser123, firstname=John, username=user1, lastname=Doe}\n //{password=UserUser123, firstname=Kyleigh, username=user4, lastname=Reichert}\n //{password=UserUser123, firstname=Nona, username=user5, lastname=Carroll}\n //{password=UserUser123, firstname=Geovany, username=storemanager51, lastname=Jenkins}\n //{password=UserUser123, firstname=Roma, username=storemanager52, lastname=Medhurst}\n //{password=UserUser123, firstname=Aditya, username=storemanager53, lastname=Rempel}\n //{password=UserUser123, firstname=Turner, username=storemanager54, lastname=Considine}\n //{password=UserUser123, firstname=Rachel, username=storemanager55, lastname=Oberbrunner}\n //{password=UserUser123, firstname=Peyton, username=salesmanager101, lastname=Harber}\n //{password=UserUser123, firstname=Patricia, username=salesmanager102, lastname=Doyle}\n //{password=UserUser123, firstname=Nellie, username=salesmanager103, lastname=Corwin}\n //{password=UserUser123, firstname=Nikita, username=salesmanager104, lastname=Wintheiser}\n //{password=UserUser123, firstname=Geraldine, username=salesmanager105, lastname=Parisian}\n\n }\n\n //get Nona as a value\n System.out.println(\"dataList.get(2) = \" + dataList.get(2));\n //dataList.get(2) = {password=UserUser123, firstname=Nona, username=user5, lastname=Carroll}\n System.out.println(\"dataList.get(2) = \" + dataList.get(2).get(\"firstname\"));\n //dataList.get(2) = Nona\n\n\n //get all data in 2d array\n\n String [][] dataArray =qa3short.getDataArray();\n\n System.out.println(Arrays.deepToString(dataArray));\n //[[username, password, firstname, lastname], [user1, UserUser123, John, Doe], [user4, UserUser123, Kyleigh, Reichert], [user5, UserUser123, Nona, Carroll], [storemanager51, UserUser123, Geovany, Jenkins], [storemanager52, UserUser123, Roma, Medhurst], [storemanager53, UserUser123, Aditya, Rempel], [storemanager54, UserUser123, Turner, Considine], [storemanager55, UserUser123, Rachel, Oberbrunner], [salesmanager101, UserUser123, Peyton, Harber], [salesmanager102, UserUser123, Patricia, Doyle], [salesmanager103, UserUser123, Nellie, Corwin], [salesmanager104, UserUser123, Nikita, Wintheiser], [salesmanager105, UserUser123, Geraldine, Parisian]]\n\n\n\n }", "protected Object[][] getScheduleData() {\r\n\t\tScheduleItem[] arrScheduleItems = scheduleWindow.getSubmitSchedule().getScheduleItems();\r\n\t\tObject[][] arr = new Object[arrScheduleItems.length][];\r\n\t\tfor (int i = 0; i < arrScheduleItems.length; i++) {\r\n\t\t\tarr[i] = new Object[] { arrScheduleItems[i].toString(true) };\r\n\t\t\t// \r\n\t\t}\r\n\t\treturn arr;\r\n\t}", "public Object [][] getRubrosPresupuesto2(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT idrubro,nombre,saldo,tipo_pago FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][4]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "public String[][] getContent() {\n\t\tString[][] result = new String[input.size()][getColumnCount()];\n\t\tfor (int i = 0; i < input.size(); i++) {\n\t\t\tfor (int j = 0; j < getColumnCount(); j++) {\n\t\t\t\tresult[i][j] = input.get(i).get(j);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private Object[][] getTableData() {\n Object[][] lclArray = null;\n\n if (articles.size() == 0) {\n lclArray = new Object[1][NUM_COLS];\n lclArray[0][0] = \"\";\n lclArray[0][1] = \"\";\n lclArray[0][2] = \"\";\n return lclArray;\n } // no articles yet !!!!\n if (articles != null) {\n lclArray = new Object[articles.size()][NUM_COLS];\n }\n for (int i = 0; i < articles.size(); i++) {\n NewsArticle article = (NewsArticle) articles.elementAt(i);\n\n lclArray[i][0] = article.getSubject();\n lclArray[i][1] = String.valueOf(article.getScore(filterType));\n lclArray[i][2] = article.getUserRating();\n }\n return lclArray;\n }", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Row> \n getRowList();", "private ArrayList<Integer> columns() {\r\n ArrayList<Integer> header = new ArrayList<>();\r\n for (int ii = 0; ii < totalBeats; ii += 4) {\r\n header.add(ii);\r\n }\r\n return header;\r\n }", "private List<LinkedHashMap<String, String>> resultSetToArrayList(ResultSet rs) throws SQLException {\r\n ResultSetMetaData md = rs.getMetaData();\r\n int columns = md.getColumnCount();\r\n ArrayList list = new ArrayList(50);\r\n while (rs.next()) {\r\n LinkedHashMap row = new LinkedHashMap(columns);\r\n for (int i = 1; i <= columns; ++i) {\r\n row.put(md.getColumnName(i), rs.getObject(i));\r\n }\r\n list.add(row);\r\n }\r\n return list;\r\n }" ]
[ "0.74647546", "0.7164251", "0.6543909", "0.64829576", "0.6411747", "0.62937266", "0.6256172", "0.6192858", "0.61852986", "0.61836195", "0.6167401", "0.6127401", "0.6063377", "0.60577166", "0.60122913", "0.5979309", "0.5973548", "0.59646696", "0.59597415", "0.59572643", "0.5948411", "0.59467334", "0.59436774", "0.5940196", "0.5934893", "0.5934419", "0.5918401", "0.59106696", "0.5908537", "0.5907447", "0.5892982", "0.5880493", "0.5846268", "0.5836418", "0.5820877", "0.5793773", "0.57858473", "0.57827514", "0.57673335", "0.57559055", "0.5755098", "0.5731434", "0.57285297", "0.57213306", "0.5702727", "0.5682586", "0.5678392", "0.5668294", "0.5623431", "0.5622892", "0.5615704", "0.5612698", "0.55989", "0.55415916", "0.5483947", "0.5479596", "0.5477594", "0.54680383", "0.54654455", "0.54527503", "0.54359025", "0.542792", "0.541903", "0.5418266", "0.5397158", "0.5374806", "0.53422505", "0.53352576", "0.5333802", "0.5323177", "0.53213453", "0.53151566", "0.53068995", "0.5284463", "0.5281627", "0.5276525", "0.52763766", "0.5247444", "0.52319276", "0.522007", "0.5211378", "0.5210067", "0.5196463", "0.5187912", "0.51780015", "0.5167683", "0.5161184", "0.51534075", "0.5151371", "0.5134764", "0.51305574", "0.5129411", "0.5117171", "0.5112617", "0.50979173", "0.5096049", "0.50933117", "0.5091498", "0.5088566", "0.50851244" ]
0.7564362
0
/ Return a JSON string from the string list.
private static String exportJSONStringFromSheetData(List<List<String>> dataTable) { String ret = ""; if(dataTable != null) { int rowCount = dataTable.size(); if(rowCount > 1) { // Create a JSONObject to store table data. JSONObject tableJsonObject = new JSONObject(); // The first row is the header row, store each column name. List<String> headerRow = dataTable.get(0); int columnCount = headerRow.size(); // Loop in the row data list. for(int i=1; i<rowCount; i++) { // Get current row data. List<String> dataRow = dataTable.get(i); // Create a JSONObject object to store row data. JSONObject rowJsonObject = new JSONObject(); for(int j=0;j<columnCount;j++) { String columnName = headerRow.get(j); String columnValue = dataRow.get(j); rowJsonObject.put(columnName, columnValue); } tableJsonObject.put("Row " + i, rowJsonObject); } // Return string format data of JSONObject object. ret = tableJsonObject.toString(); } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJSONfromList(List<?> list) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(list);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn json;\n\t}", "public static String listToJson(List<String> list) {\n Gson gson = new Gson();\n String json = gson.toJson(list);\n return json;\n }", "public String getJSONfromNamedList(NamedList<?> namedList) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(namedList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn json;\n\t}", "public static String serializeListString(List<String> s) {\r\n System.out.println(\"EncodeJSON - method serializeListString\" + s);\r\n return gson.toJson(s);\r\n }", "private static void writeJSONString(Iterable<?> list, Appendable out) throws IOException {\n @Var boolean first = true;\n\n out.append('[');\n for (Object value : list) {\n if (first) {\n first = false;\n } else {\n out.append(',');\n }\n\n JSON.writeJSONString(value, out);\n }\n out.append(']');\n }", "@Test\n public void testListOfStrings() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(4, jtc.stringArray.size());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"abc\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"def\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"123\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"456\\\"\"));\n }", "public static <T> String list2JSONArrayString(List<T> sourceList) {\n\t\tString json_arr = \"[]\";\n\t\tif (null == sourceList || sourceList.size() == 0) {\n\t\t\treturn json_arr;\n\t\t}\n\t\tjson_arr = JSON.toJSONString(sourceList, false); // set false to no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// formatted\n\t\tlogger.debug(\"result:\");\n\t\tlogger.debug(json_arr);\n\t\treturn json_arr;\n\t}", "public String pasarAjson(ArrayList<Cliente> miLista){\n String textoenjson;\n Gson gson = new Gson();\n textoenjson = gson.toJson(miLista);\n\n\n return textoenjson;\n }", "public static String convertListToJSON(List<?> objectsList) {\n\t\tString listAsJSON = \"\";\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\ttry {\n\t\t\tlistAsJSON = objectMapper.writeValueAsString(objectsList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listAsJSON;\n\t}", "private String toJson(PredictionsList plist) {\n\tString json = \"If you see this, there's a problem.\";\n\ttry {\n\t json = new ObjectMapper().writeValueAsString(plist);\n\t}\n\tcatch(Exception e) { }\n\treturn json;\n }", "public static JsonArray convertStringList(Collection<String> strings)\r\n \t{\r\n \t\tJsonArray ret = new JsonArray();\r\n \t\tfor (String string : strings)\r\n \t\t{\r\n \t\t\tret.add(new JsonPrimitive(string));\r\n \t\t}\r\n \t\treturn ret;\r\n \t}", "public static Value makeJSONStr() {\n return theJSONStr;\n }", "String getJSON();", "protected static String createJsonArray(List<String> originalList) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[\");\n for (int i = 0; i < originalList.size(); i++) {\n sb.append(originalList.get(i));\n if (i < (originalList.size() - 1)) {\n sb.append(\", \");\n }\n }\n sb.append(\"]\");\n return sb.toString();\n }", "String getJson();", "String getJson();", "String getJson();", "public static List<List<Response>> stringListToJSONList(List<String> jsonStrings){\n List<List<Response>> jsonObjects = new ArrayList<>();\n\n for(int i = 0; i < jsonStrings.size(); i ++){\n Example ex = stringToJSON(jsonStrings.get(i));\n List<Response> resp = ex.getResponse();\n jsonObjects.add(resp);\n\n }\n\n return jsonObjects;\n }", "String toJson() throws IOException;", "public abstract String toJsonString();", "String getStringList();", "public String getJson();", "String toJSON();", "public static String getJson() {\n\t\treturn jsonString;\n\t}", "static String getStringJsonEscaped(String str) {\n JsonStringEncoder e = JsonStringEncoder.getInstance();\n StringBuilder sb = new StringBuilder();\n e.quoteAsString(str, sb);\n return sb.toString();\n }", "public static String toJSONContainingAnything(List<Object> list) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"[\");\n for (Iterator<Object> it = list.iterator(); it.hasNext();) {\n sb.append(\"\\n\");\n Object value = it.next();\n\n appendObject(sb, value);\n if (it.hasNext()) {\n sb.append(\",\\n\");\n }\n }\n sb.append(\"]\\n\");\n return sb.toString();\n }", "ListString createListString();", "private String convertListToJson(List<Contacts> contactlist) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contactlist); \n\t}", "protected String convertToJSON(List<NewsItem> newsItems) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().create();\n return gson.toJson(newsItems);\n }", "protected String generateJSONString(ArrayList<Review> set)\n\t{\n\t\tStringBuffer sb = new StringBuffer();\n\t\tif (set.size() == 0)\n\t\t\treturn \"{\\\"reviews\\\":[]}\";\n\t\tsb.append(\"{\\\"reviews\\\":[\");\n\t\tIterator<Review> it = set.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tReview review = it.next();\n\t\t\tsb.append(\"{\\\"author\\\":\\\"\" + review.getReviewUsername() + \"\\\",\");\n\t\t\tsb.append(\"\\\"hotel\\\":\\\"\" + review.getHotelId() + \"\\\",\");\n\t\t\tsb.append(\"\\\"rating\\\":\\\"\" + review.getRating() + \"\\\",\");\n\t\t\tsb.append(\"\\\"id\\\":\\\"\" + review.getReviewId() + \"\\\",\");\n\t\t\tsb.append(\"\\\"title\\\":\\\"\" + review.getReviewTitle() + \"\\\",\");\n\t\t\t//sb.append(\"\\\"city\\\":\\\"\" + hotel.getHotel().getHotelAddress().getCity() + \"\\\",\");\n\t\t\tsb.append(\"\\\"text\\\":\\\"\" + review.getReviewText() + \"\\\"},\" );\n\t\t}\n\t\tsb.deleteCharAt(sb.length() - 1);\n\t\tsb.append(\"]\" + \"}\");\n\t\treturn sb.toString();\n\t}", "public String toJson(final String object) {\n if (object != null && (object.startsWith(\"[\") || object.startsWith(\"{\")\n || (object.startsWith(\"\\\"[\") || object.startsWith(\"\\\"{\")))) {\n return object;\n } else\n return \"{\\\"\" + \"{\\\"success\\\" : 1}\" + \"\\\":\\\"\" + object + \"\\\"}\";\n }", "private String processandFormReponse(Set<String> lcsSet) throws JSONException{\n\t\tList<String> finalList = new ArrayList<>(lcsSet);\n\t\tCollections.sort(finalList);\n\t\tJSONObject finaljson = new JSONObject();\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tfor(String str : finalList) {\n\t\t\tJSONObject row = new JSONObject();\n\t\t\trow.put(VALUE, str);\n\t\t\tjsonArray.put(row);\n\t\t}\n\t\tfinaljson.put(LCS, jsonArray);\n\t\tString values = finaljson.toString();\n\t\treturn values;\n\t\t\n\t}", "private String getListData() {\n String jsonStr = \"{ \\\"users\\\" :[\" +\n \"{\\\"name\\\":\\\"Ritesh Kumar\\\",\\\"designation\\\":\\\"Team Leader\\\",\\\"department\\\":\\\"Main office\\\",\\\"location\\\":\\\"Brampton\\\"}\" +\n \",{\\\"name\\\":\\\"Frank Lee\\\",\\\"designation\\\":\\\"Developer\\\",\\\"department\\\":\\\"Developer's office\\\",\\\"location\\\":\\\"Markham\\\"}\" +\n \",{\\\"name\\\":\\\"Arthur Young\\\",\\\"designation\\\":\\\"Charted Accountant\\\",\\\"department\\\":\\\"Account office\\\",\\\"location\\\":\\\"Toronto\\\"}] }\";\n return jsonStr;\n }", "public abstract String toJson();", "public static Example stringToJSON(String s){\n Gson gson = new Gson();\n JsonReader reader = new JsonReader(new StringReader(s));\n reader.setLenient(true);\n\n Example ex = gson.fromJson(reader, Example.class);\n\n return ex;\n }", "public static JSONObject strToJson(String jsonstring) {\n JSONParser parser = new JSONParser();\n JSONObject json = null;\n try {\n json = (JSONObject) parser.parse(jsonstring);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return json;\n }", "public synchronized String getJSONString() {\n\n return getJSONObject().toString();\n }", "public JSONString(String stringIn)\n {\n this.string = stringIn;\n }", "public String toJSON() throws JSONException;", "private static String getList(String responseString) throws JSONException {\n\t\tJSONObject array = new JSONObject(responseString);\n\t\treturn array.getString(\"url\");\n\t}", "public static List<String> filesToListOfStrings(List<String> fileNames) throws FileNotFoundException {\n List<String> jsonStrings = new ArrayList<>();\n\n for(int i = 0; i < fileNames.size(); i ++){\n String s = fileToString(fileNames.get(i));\n jsonStrings.add(s);\n }\n\n return jsonStrings;\n }", "public static String listToJson(List list, int depth) {\r\n\t\tif (list == null)\r\n\t\t\treturn \"null\";\r\n\r\n\t\tboolean first = true;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tIterator iter = list.iterator();\r\n\r\n\t\tsb.append('[');\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tif (first)\r\n\t\t\t\tfirst = false;\r\n\t\t\telse\r\n\t\t\t\tsb.append(',');\r\n\r\n\t\t\tObject value = iter.next();\r\n\t\t\tif (value == null) {\r\n\t\t\t\tsb.append(\"null\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tsb.append(toJson(value, depth));\r\n\t\t}\r\n\t\tsb.append(']');\r\n\t\treturn sb.toString();\r\n\t}", "public static void main(String[] str) {\n String str1 = \"[{\\\"随机欢迎语\\\":[\\\"aaa\\\",\\\"bbbbb\\\",\\\"ccccc\\\"],\\\"no\\\":\\\"1\\\"},{\\\"商品标题\\\":\\\"商品标题\\\",\\\"no\\\":\\\"2\\\"},{\\\"商品卖点\\\":\\\"商品卖点\\\",\\\"no\\\":\\\"3\\\"},{\\\"商品描述\\\":\\\"商品描述\\\",\\\"no\\\":\\\"2\\\"},{\\\"包装清单\\\":\\\"包装清单\\\",\\\"no\\\":\\\"2\\\"},{\\\"随机结束语\\\":[\\\"1111\\\",\\\"2222\\\",\\\"33333\\\"],\\\"no\\\":\\\"2\\\"}]\";\n //System.out.println(JSONObject.);\n JSONArray objects = JSONObject.parseArray(str1);\n List<JSONObject> jsonObjects = JSONObject.parseArray(str1, JSONObject.class);\n for (JSONObject object : jsonObjects) {\n for (Map.Entry<String, Object> en : object.entrySet()) {\n System.out.println(en.getValue());\n }\n }\n\n }", "private JSONArray createJSONWeaponList(List<Weapon> weapons) {\n\t\tJSONArray jArray = new JSONArray();\n\t\tweapons.forEach(s -> jArray.add(s.getName()));\n\t\treturn jArray;\n\t}", "public static String GetJSONString(String resourceString) {\n String retVal = \"\";\n resourceString = resourceString.replaceAll(\"<API_.*?>\", \"\").replaceAll(\"</API_.*?>\", \"\");\n try {\n String json = XML.toJSONObject(resourceString).toString();\n json = \"{\" + json.substring(1, json.length() - 1).replaceAll(\"\\\\{\", \"\\\\[{\").replaceAll(\"\\\\}\", \"\\\\]}\") + \"}\";\n retVal = json;\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "@Override\n public String toString() {\n return jsonString;\n }", "public static JSONObjectList createJSONObjectList(List<RequirementForm> reqList)\r\n{\r\n\tJSONObjectList jsonlist = new JSONObjectList();\r\n int length = reqList.size();\r\n for (int i = 0; i < length; i++) {\r\n JSONObject uc =createJSONObject(reqList.get(i));\r\n\r\n jsonlist.getListobject().add(uc);\r\n\r\n }\r\n \r\n return jsonlist;\r\n}", "static public Json wrapString(String string, QName type) {\n JsonObject json = new JsonObject();\n json.put(Manager.XP_VALUE.toString(), string);\n json.put(Manager.XP_TYPE.toString(), type.toString());\n return json;\n }", "private static JsonLista toBasicJson(Lista lista) {\r\n\t\tJsonLista jsonLista = new JsonLista();\r\n\t\tapplyBasicJsonValues(jsonLista, lista);\r\n\t\treturn jsonLista;\r\n\t}", "public String toJsonString() {\n String str;\n String str2;\n try {\n if (this.lifetime == null) {\n str = \"null\";\n } else {\n str = \"\\\"\" + this.lifetime.toString() + \"\\\"\";\n }\n if (this.frequency == null) {\n str2 = \"\";\n } else {\n str2 = \",\\\"frequency\\\":\" + this.frequency;\n }\n return \"{\\\"enabled\\\":\" + this.enabled + str2 + \",\\\"lifetime\\\":\" + str + \"}\";\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n return \"\";\n }\n }", "public static String writeItemsToJson(List<EntityRef> items) {\r\n\t\tif(items == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn EntityFactory.writeToJSONArrayString(items);\r\n\t\t} catch (JSONObjectAdapterException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t}", "protected JSONArray individualsToJson(List<Individual> individuals) throws ServletException {\n try{\n \tJSONArray ja = new JSONArray();\n \tfor (Individual ent: individuals) {\n JSONObject entJ = new JSONObject();\n entJ.put(\"name\", ent.getName());\n entJ.put(\"URI\", ent.getURI());\n ja.put( entJ );\n }\n \treturn ja;\n }catch(JSONException ex){\n throw new ServletException(\"could not convert list of Individuals into JSON: \" + ex);\n }\n }", "public String toString() {\n\t String resultJson=\"\";\t \n\t ObjectToJson jsonObj = new ObjectToJson(this.paperAuthorsList);\n\t try {\n\t\t resultJson = jsonObj.convertToJson(); \n\t }\n\t catch(Exception ex) {\n\t\t System.out.println(\"problem in conversion \"+ex.getMessage());\t\t \n\t }\n\t return resultJson;\n }", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "@Test\n public void testListOfJsonables() {\n JsonableTestClassWithList jtc = Jsonable.loadFromFile(\"testFiles/listTest.json\", JsonableTestClassWithList.class);\n assertEquals(3, jtc.JsonableList.size());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"Detail Name\\\",\\\"data\\\":\\\"Value Name\\\"}\"));\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"\\\",\\\"data\\\":\\\"Value Name\\\"}\"));\n assertThat(jsonString, Matchers.containsString(\"{\\\"detail\\\":\\\"Detail Name\\\",\\\"data\\\":\\\"\\\"}\"));\n }", "public int processingContract(String json,List<Object[]> list);", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "public static String getDateFormatJson(String dateStr)\r\n\t{\r\n\t\tHashMap dateHashMap = new HashMap();\r\n\t\tStringBuffer one = new StringBuffer();\r\n\t\tStringBuffer two = new StringBuffer();\r\n\t\tStringBuffer three = new StringBuffer();\r\n\t\tStringBuffer separators = new StringBuffer();\r\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tint firstSepIndex = 0;\r\n\t\tfor (int i = 0; i < dateStr.length(); i++)\r\n\t\t{\r\n\t\t\tchar dateChar = dateStr.charAt(i);\r\n\t\t\tindex = dateStr.indexOf(dateChar);\r\n\t\t\tif ((firstSepIndex != index)\r\n\t\t\t\t\t&& ((dateChar >= 'a' && dateChar <= 'z') || (dateChar >= 'A' && dateChar <= 'Z')))\r\n\t\t\t{\r\n\t\t\t\tseparators.append(\"N\");\r\n\t\t\t\tfirstSepIndex = index;\r\n\t\t\t}\r\n\t\t\tif ((dateChar >= 'a' && dateChar <= 'z') || (dateChar >= 'A' && dateChar <= 'Z'))\r\n\t\t\t{\r\n\t\t\t\tif (index == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tone.append(dateChar);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t} else if (index > 0 && count == index)\r\n\t\t\t\t{\r\n\t\t\t\t\ttwo.append(dateChar);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tthree.append(dateChar);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tif (dateChar == ' ')\r\n\t\t\t\t\tdateChar = 'S';\r\n\t\t\t\tseparators.append(dateChar);\r\n\t\t\t\tcount++;\r\n\t\t\t\tfirstSepIndex = index + 1;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdateHashMap.put(\"datePositionOne\", one.toString());\r\n\t\tdateHashMap.put(\"datePositionTwo\", two.toString());\r\n\t\tdateHashMap.put(\"datePositionThree\", three.toString());\r\n\r\n\t\tif (separators.length() >= 2)\r\n\t\t{\r\n\t\t\tdateHashMap.put(\"dateSeparatorOne\", separators.substring(0, 1));\r\n\t\t\tdateHashMap.put(\"dateSeparatorTwo\", separators.substring(1, 2));\r\n\t\t} else\r\n\t\t{\r\n\t\t\tdateHashMap.put(\"dateSeparatorOne\", separators.toString());\r\n\t\t}\r\n\t\tString jsonString = HashMapToJSONConverter.convertHashMapToJSONFormat(dateHashMap);\r\n\t\treturn jsonString;\r\n\t}", "public static String serializeClients(List<Client> c) {\r\n System.out.println(\"EncodeJSON - method serializeClients\" + c);\r\n return gson.toJson(c);\r\n }", "private void saveJSON(String myList, String saveFile, ArrayList<JSONObject> arr) {\n SharedPreferences sharedPreferences = getSharedPreferences(saveFile, MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n Gson gson = new Gson();\n String typeList = gson.toJson(arr);\n prefEditor.putString( myList, typeList );\n System.out.println(\"saveJSON myList = \" + myList);\n prefEditor.apply();\n }", "public void gsonData() {\n Gson gson = new Gson();\n gson.toJson(list);\n System.out.println(\"gson string is :----->\" + list);\n }", "private static Object m7292a(String str) throws JSONException {\n Object obj = null;\n String trim = str.trim();\n if (trim.startsWith(\"{\") || trim.startsWith(\"[\")) {\n obj = new JSONTokener(trim).nextValue();\n }\n return obj == null ? trim : obj;\n }", "public void addSavedFragment(ArrayList<JSONObject> myList) throws JSONException {\n\n jArr = new JSONArray();\n for(int i = 0; i < myList.size(); i++) {\n JSONObject x = myList.get(i);\n System.out.println(\"the string is = \" + x.toString());\n jArr.put(x);\n }\n addFragments(jArr, false);\n\n }", "public String readJson() {\n\t\t\tif (lastReadChar == ']') {\n\t\t\t\tSystem.out.println(\"Nunca deberia llegar a aca si usa hasNext()\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Si fue una coma, busco el siguiente '{'\n\t\t\twhile (read()!= '{');\n\t\t\t\n\t\t\tStringBuilder jsonText = new StringBuilder();\n\t\t\tjsonText.append((char) '{');\n\t\t\tlastReadChar = read();\n\t\t\t\n\t\t\twhile (lastReadChar != '}') { \n\t\t\t\tjsonText.append((char) lastReadChar);\n\t\t\t\tlastReadChar = read();\n\t\t\t} jsonText.append('}');\n\t\t\t\n\t\t\t// To satisfy Invariant: find the next ']' or ','\n\t\t\twhile (lastReadChar != ']' && lastReadChar != ',') lastReadChar = read(); \n\t\t\t\n\t\t\t//System.out.println(\"Analizando : \" + jsonText.toString());\n\t\t\treturn jsonText.toString();\n\t\t}", "public String toJson() {\n\n final StringBuilder jsonRepresentation = new StringBuilder();\n\n jsonRepresentation.append(\"[\");\n\n final Iterator<TrackingDataEntry> entriesIter = getEntries().iterator();\n while (entriesIter.hasNext()) {\n\n final TrackingDataEntry entry = entriesIter.next();\n\n serializeTrackingDataVariables(jsonRepresentation, entry.getVars());\n\n if (null != entry.getName()) {\n jsonRepresentation.append(\",\\\"name\\\":\\\"\").append(entry.getName()).append(\"\\\"\");\n }\n if (null != entry.getId()) {\n jsonRepresentation.append(\",\\\"id\\\":\\\"\").append(entry.getId()).append(\"\\\"\");\n }\n if (null != entry.getType()) {\n jsonRepresentation.append(\",\\\"type\\\":\\\"\").append(entry.getType()).append(\"\\\"\");\n }\n if (null != entry.getUrl()) {\n jsonRepresentation.append(\",\\\"url\\\":\\\"\").append(entry.getUrl()).append(\"\\\"\");\n }\n jsonRepresentation.append(\"}\");\n if (entriesIter.hasNext()) {\n jsonRepresentation.append(\",\");\n }\n }\n\n jsonRepresentation.append(\"]\");\n\n return jsonRepresentation.toString();\n }", "void mo59932a(String str, JSONObject jSONObject);", "public static String debugString(List<String> stringList) {\n StringBuilder result = new StringBuilder(\"[\");\n Iterator<String> listIter = stringList.iterator();\n if (listIter.hasNext()) {\n result.append('\"'); // Opening quote for the first string\n result.append(listIter.next());\n while (listIter.hasNext()) {\n result.append(\"\\\", \\\"\");\n result.append(listIter.next());\n }\n result.append('\"'); // Closing quote for the last string\n }\n result.append(']');\n return result.toString();\n }", "public String renderJsonString(Object model) {\r\n \r\n StringBuffer buffer = new StringBuffer();\r\n jsonSerializer.deepSerialize(model, buffer);\r\n StringBuilder jsonResponse = new StringBuilder();\r\n jsonResponse.append(buffer);\r\n \r\n //Pattern.compile(regex).matcher(str).replaceAll(repl)\r\n String s = pattrenEscapedBackquote.matcher(jsonResponse.toString()).replaceAll(\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\r\n //String s = jsonResponse.toString().replaceAll(\"\\\\\\\\\\\\\\\\\", \"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\r\n s = pattrenEscapedQuoubleQuotePrefixedwithBackquote.matcher(s).replaceAll(\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\");\r\n //s = s.replaceAll(\"\\\\\\\\\\\\\\\"\", \"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\");\r\n s = pattrenForDoubleQuote.matcher(s).replaceAll(\"$1\\\\\\\\\\\"\");\r\n s = pattrenEscapedQuoubleQuoteNotPrefixedwithBackquote.matcher(s).replaceAll(\"$1\\\\\\\\\\\"\");\r\n //s = s.replaceAll(\"([^\\\\\\\\])\\\"\", \"$1\\\\\\\\\\\"\");\r\n \r\n return (\"\\\"\" + s + \"\\\"\");\r\n }", "public JSONArray transforme(ArrayList<String> liste){\n\n JSONArray jliste = new JSONArray();\n for (int i = 0; i < liste.size(); i++) {\n Log.i(\"QUESTION \"+i,liste.get(i));\n jliste.put(liste.get(i));\n }\n Log.i(\"JLISTE\",jliste.toString());\n return jliste;\n }", "private String dtListToJson(Trip theTrip) {\n Gson gsonObj = new Gson(); // Create Gson object\n String jsonString = gsonObj.toJson(theTrip.getDt_list(), dtListType);\n\n return jsonString;\n }", "@GET\n\t@Path(\"/helloJSONList\")\n\t/**\n\t * Here is an example of a simple REST get request that returns a String.\n\t * We also illustrate here how we can convert Java objects to JSON strings.\n\t * @return - List of words as JSON\n\t * @throws IOException\n\t */\n\tpublic String helloJSONList() throws IOException {\n\n\t\tList<String> listOfWords = new ArrayList<String>();\n\t\tlistOfWords.add(\"Hello\");\n\t\tlistOfWords.add(\"World!\");\n\n\t\t// We can turn arbatory Java objects directly into JSON strings using\n\t\t// Jackson seralization, assuming that the Java objects are not too complex.\n\t\tString listAsJSONString = oWriter.writeValueAsString(listOfWords);\n\n\t\treturn listAsJSONString;\n\t}", "void mo16412a(String str, JSONObject jSONObject);", "public String toJsonString() {\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"from\", from);\n jsonObject.put(\"domain\", domain);\n jsonObject.put(\"provider\", provider);\n jsonObject.put(\"action\", action);\n\n try {\n JSONObject jsonData = new JSONObject();\n for (Map.Entry<String, String> entry : data.entrySet()) {\n jsonData.put(entry.getKey(), entry.getValue());\n }\n jsonObject.put(\"data\", jsonData);\n } catch (Exception e) {\n e.printStackTrace();\n jsonObject.put(\"data\", \"{}\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return jsonObject.toString();\n }", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public static String reParseJson(String old){\n int start = old.indexOf(\"{\");\n int end = old.lastIndexOf(\"}\");\n return old.substring(start,end+1);\n\n }", "private ArrayList<ListItems> getListDataFromJson(String listJsonStr)\n throws JSONException {\n\n String name;\n String email;\n String body;\n\n JSONArray jsonArray = new JSONArray(listJsonStr);\n for (int i = 0; i < jsonArray.length(); i++) {\n\n\n JSONObject listItems = jsonArray.getJSONObject(i);\n name = listItems.getString(Constants.NAME);\n email = listItems.getString(Constants.EMAIL);\n body = listItems.getString(Constants.BODY);\n\n\n ListItems items = new ListItems();\n items.setName(name);\n items.setEmail(email);\n items.setBody(body);\n listItemArray.add(items);\n }\n return listItemArray;\n\n\n }", "void mo26099a(String str, JSONObject jSONObject);", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "String toJSONString(Object data);", "@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}", "private StringBuilder getJSONHelper()\n\t{\n\t\tStringBuilder json = new StringBuilder();\n\t\tint n = 0;\n\t\tfor(String key : values.keySet())\n\t\t\tappendValue(json, key, n++);\n\t\treturn json;\n\t}", "public static String serialize( List<String> selectedValues )\n {\n return serialize( selectedValues, DEFAULT_DELIMITER );\n }", "private static ArrayList<String> convertToStringList(JSONArray arr)\n throws JSONException {\n ArrayList<String> list = new ArrayList<String>();\n if (arr != null) {\n for (int i = 0; i < arr.length(); i++) {\n list.add(arr.getString(i));\n }\n }\n return list;\n }", "public String getJson() {\n Object ref = json_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n json_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getJson() {\n Object ref = json_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n json_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getJson() {\n Object ref = json_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n json_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;", "String getStringFromDictionary(JSONObject json, String str);", "public static JsonElement stringToJSON2(String json) {\n try {\n JsonElement parser = new JsonPrimitive(json);\n System.out.println(parser.getAsString());\n //JsonObject Jso = new JsonObject();\n //Jso = (JsonObject) parser.p(json);\n return parser;\n } catch (Exception e) {\n return new JsonObject();\n }\n }", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "private String getJson(InputStream inputStream){\n try {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, \"UTF-8\");\n Scanner scanner = new Scanner(inputStreamReader);\n StringBuffer stringBuffer = new StringBuffer();\n while (scanner.hasNext()) {\n stringBuffer.append(scanner.nextLine());\n }\n System.out.println(\"STRING BUFFER >>>>>>>\" +stringBuffer);\n return stringBuffer.toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "static <T extends JSONSerializable> String arrayListSerialize(ArrayList<T> serializableArrayList) throws Exception {\n JSONArray array = new JSONArray();\n for(JSONSerializable serializable : serializableArrayList) array.put(serializable.jsonSerialize());\n\n return array.toString();\n }", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "public String composeJSONfromSQLite()\n {\n ArrayList<User> wordList;\n wordList = new ArrayList<User>();\n String selectQuery = \"SELECT * FROM UsersTable where udpateStatus = '\"+\"no\"+\"'\";\n SQLiteDatabase database = this.getWritableDatabase();\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) \n\t\t{\n do {\n \tUser data=new User(cursor.getString(0),cursor.getString(1),cursor.getString(2), cursor.getString(3),cursor.getString(4),cursor.getString(6));\n wordList.add(data);\n } \n while (cursor.moveToNext());\n }\n database.close();\n Gson gson = new GsonBuilder().create();\n //Use GSON to serialize Array List to JSON \n return gson.toJson(wordList);\n }", "JSONObject toJson();", "JSONObject toJson();", "public String encode(List<String> strs) {\n StringBuilder sb = new StringBuilder();\n for(String str : strs){\n \tsb.append(str.length());\n \t sb.append(\"[\");\n sb.append(str);\n sb.append(\"]\");\n }\n return sb.toString();\n }", "static List<String> getSafeStringArray(String name, JSONObject json)\n {\n try\n {\n if (json.has(name))\n {\n JSONArray array = json.getJSONArray(name);\n List<String> ret = new ArrayList<String>();\n for (int x = 0; x < array.length(); x++)\n ret.add(array.getString(x));\n return Collections.unmodifiableList(ret);\n }\n }\n catch (Exception e)\n {\n\n }\n return new ArrayList<String>();\n }", "public JSONObject toJson() {\r\n JSONObject json = new JSONObject();\r\n return json.put(\"personList\", this.toJsonArray());\r\n }", "public String getJson() {\n Object ref = json_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n json_ = s;\n return s;\n }\n }" ]
[ "0.7421839", "0.7175394", "0.7136243", "0.7003975", "0.6748781", "0.6671043", "0.6602737", "0.64697933", "0.6462017", "0.63983196", "0.6374796", "0.633828", "0.6336301", "0.625969", "0.6241169", "0.6241169", "0.6241169", "0.6085714", "0.6054422", "0.60498023", "0.60298693", "0.60077274", "0.59635836", "0.59573036", "0.5876254", "0.58675027", "0.58616984", "0.58415425", "0.5837806", "0.5803787", "0.5798502", "0.579577", "0.5741038", "0.573872", "0.57271075", "0.5725571", "0.5720189", "0.567754", "0.5671395", "0.56612486", "0.5622182", "0.5602801", "0.5600619", "0.5595229", "0.5585342", "0.5574934", "0.5569879", "0.55495083", "0.55483025", "0.55460227", "0.554014", "0.5537937", "0.553214", "0.55142134", "0.5509057", "0.55013037", "0.54789656", "0.54568976", "0.5456779", "0.5430006", "0.5424434", "0.5406984", "0.53940064", "0.5389937", "0.5385424", "0.53828543", "0.536306", "0.53425044", "0.5337993", "0.5332471", "0.5325497", "0.53179765", "0.5317676", "0.5307304", "0.52775836", "0.52728945", "0.5266299", "0.52576184", "0.5254131", "0.5246816", "0.5242869", "0.524009", "0.52228045", "0.5204914", "0.5204914", "0.5204914", "0.5196888", "0.51919764", "0.51862484", "0.518619", "0.5184916", "0.51789945", "0.51756865", "0.5173064", "0.5164506", "0.5160852", "0.5160852", "0.51598966", "0.5159465", "0.5158925", "0.5149435" ]
0.0
-1
Created by Poltavets on 13.05.2016.
public interface UprazneniaAllListView { int getChoosenListPosition(); void setAdapter(Cursor cursor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\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 entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo4359a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() \n {\n \n }", "Petunia() {\r\n\t\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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\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 protected void getExras() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private Rekenhulp()\n\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 }", "@Override\n public void memoria() {\n \n }", "private void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n public void init() {}", "@Override\n\tpublic void jugar() {\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}", "public void mo6081a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void init() {}", "@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}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\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}", "private void m50366E() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "protected void mo6255a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}" ]
[ "0.60620165", "0.59320146", "0.57976496", "0.5714324", "0.5699367", "0.56983346", "0.5685863", "0.5685863", "0.55857986", "0.5584045", "0.55793995", "0.55632675", "0.5557114", "0.5533964", "0.55311555", "0.55238557", "0.5516587", "0.55091524", "0.5489404", "0.5484093", "0.5483073", "0.54805416", "0.5457808", "0.5457808", "0.5457808", "0.5457808", "0.5457808", "0.5457808", "0.54440767", "0.54354966", "0.5428611", "0.542389", "0.54195213", "0.54113245", "0.54093343", "0.54093343", "0.5402174", "0.540181", "0.540181", "0.53998244", "0.53998244", "0.53998244", "0.53998244", "0.53998244", "0.53940606", "0.5390379", "0.5387981", "0.5387409", "0.5385944", "0.5385888", "0.5380975", "0.5373763", "0.5368304", "0.5368304", "0.5368304", "0.5368304", "0.5368304", "0.5368304", "0.5368304", "0.53675646", "0.5353711", "0.53463966", "0.53332996", "0.53255993", "0.53211397", "0.5306809", "0.5306809", "0.5306809", "0.53065234", "0.53057104", "0.5302186", "0.5300942", "0.5296114", "0.5293764", "0.5293764", "0.52929014", "0.52918065", "0.5274677", "0.5274677", "0.5274677", "0.5273102", "0.5269787", "0.52566487", "0.5255061", "0.52439696", "0.52434254", "0.52434254", "0.52434254", "0.5239752", "0.5230983", "0.5230834", "0.5220671", "0.52152795", "0.521392", "0.52137184", "0.52137184", "0.52137184", "0.5210028", "0.52098185", "0.52098185", "0.5206374" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_scrolling, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
Creates a new basket
public Basket(String n, float ca, boolean a) { this.name = n; this.conversionAmount = ca; this.active = a; this.dateCreated = new Date(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCreate() {\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { Basket_in });\n assertNoError(Baskets_create_out[0].getError());\n\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n BasketPath = Baskets_create_out[0].getPath();\n }", "@Override\n\tpublic Basket addBasket(Basket basket) {\n\t\treturn br.save(basket);\n\t}", "public void testCreateWithDefaults() {\n TCreate_Input basket_in = new TCreate_Input();\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { basket_in });\n assertNoError(Baskets_create_out[0].getError());\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n }", "protected Basket makeBasket() {\n\t\treturn new Basket();\n\t}", "@GetMapping(\"/createBasket\")\n\tpublic ResponseEntity createBasket(@RequestParam String email, @RequestParam Integer basketId) {\n\n\t\ttry {\n\t\t\treturn ResponseEntity.ok(userservice.createBasketFromuser(basketId, email));\n\t\t} catch (final DaoException e) {\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(e.toString());\n\t\t}\n\t}", "public Basket(){\r\n\r\n basket = new Hashtable();\r\n keys = new Vector();\r\n }", "public BasketItemBuilder() {\n generateRandomId();\n }", "@Test \n\tpublic void testAddItemToBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN);\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "ShipmentItem createShipmentItem();", "@Then(\"^click on add to basket$\")\r\n\tpublic void click_on_add_to_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.addbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public Basket(Inventory inventory){\n myBasket = new HashMap<>();\n totalCost = 0;\n isPaid = false;\n Random randomGenerator = new Random();\n invoiceNumber = randomGenerator.nextInt(30000) + 1;\n this.inventory = inventory;\n }", "void createItem (String name, String description, double price);", "@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 ShoppingCart createCart() {\n\t\treturn save(new ShoppingCart());\n\t}", "public Basket(double price, String name, int quantityForSold, double priceOfProvider, Quantity quantity) {\n super(price, name, quantityForSold, priceOfProvider, quantity);\n }", "void create(Order order);", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "Shipment createShipment();", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "Cart addToCart(String productCode, Long quantity, String userId);", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public void create(Pizza pizza){\n pizza.setID(counter++);\n pizzas.add(pizza);\n }", "public void createStockItem(long storeID, ProductWithStockItemTO stockItemTO)\r\n\t\t\tthrows NotInDatabaseException, CreateException;", "public void doShopping(IBasket basket,IArchiveBasket archiveBasket);", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public int addToBasket (Hotel h, String n, int i, boolean b) {\n\t\tif(b==true) {\n\t\tBnBReservation r2b = new BnBReservation(name,h,n,i);\n\t\tcustomerResos.add(r2b);\n\t\t}else {\n\t\tHotelReservation r2 = new HotelReservation(name,h, n, i);\n\t\tcustomerResos.add(r2);\n\t\t}\n\t\treturn customerResos.getNumOfReservations();\n\t}", "public ArrayList<PurchaseHistory> CreateShoppingTrip() {\n //TODO: implement this method\n return null;\n }", "void create(Cart cart, User user) throws FlowerValidationException;", "private void createNewStore(String storeName, Item item) {\n Store storeObj = new Store(storeName, null);\n item.setItemStoreId(storeObj.getStoreId());\n List<Item> itemList = new ArrayList<>();\n itemList.add(item);\n storeObj.setItems(itemList);\n storeList.add(storeObj);\n }", "@Test\n public void addToCart() throws Exception {\n\n ReadableProducts product = super.readyToWorkProduct(\"addToCart\");\n assertNotNull(product);\n\n PersistableShoppingCartItem cartItem = new PersistableShoppingCartItem();\n cartItem.setProduct(product.getId());\n cartItem.setQuantity(1);\n\n final HttpEntity<PersistableShoppingCartItem> cartEntity =\n new HttpEntity<>(cartItem, getHeader());\n final ResponseEntity<ReadableShoppingCart> response =\n testRestTemplate.postForEntity(\n String.format(\"/api/v1/cart/\"), cartEntity, ReadableShoppingCart.class);\n\n // assertNotNull(response);\n // assertThat(response.getStatusCode(), is(CREATED));\n\n }", "Quantity createQuantity();", "private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }", "public Basket(Customer customerIn) {\n loggedInCustomer = customerIn;\n Order order = loggedInCustomer.findLatestOrder();\n orderId = order.getOrderIdIn();\n initComponents();\n \n //loads the orders into the table\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n for(Map.Entry<Integer, OrderLine> entry : order.getOrderLines().entrySet())\n {\n Product orderedProduct = entry.getValue().getProduct();\n \n model.addRow(new Object[] \n {orderedProduct.getProductId(), orderedProduct.toString(), \n \"£\" + String.format(\"%.02f\", orderedProduct.getPrice()), entry.getValue().getQuantity()});\n }\n \n lblTotalCost.setText(\"£\" + String.format(\"%.02f\", order.getOrderTotal()));\n }", "QuoteItem createQuoteItem();", "@Test\n public void createBasket(){\n BasketRepositoryImpl basketRepository=new BasketRepositoryImpl(basketCrudRepository);\n // basketRepository.save(basket);\n var response= basketRepository.findByProductId(\"11\");\n System.out.println(response.toString());\n }", "public void setItemShopBasketId(long itemShopBasketId);", "@PostMapping()\n public ResponseEntity<JsonResponse<OrderDTO>> getBasketById(@RequestBody OrderDTO orderDTO) throws Exception {\n //TODO need order Validator here\n log.info(\"REST request to create order: {}\", orderDTO);\n OrderDTO result = this.orderService.createOrder(orderDTO);\n return ResponseEntity.created(new URI(\"/order/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(new JsonResponse<>(result));\n }", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "@Override\r\n\tpublic int createMarket(MarketDto dto) {\n\t\treturn session.insert(\"kdc.market.createMarket\", dto);\r\n\t}", "ShipmentItemBilling createShipmentItemBilling();", "public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }", "public static void main(String[] args) {\n Apple appleRp = new Apple(new BigDecimal(150.5), \"red\", Ripeness.RIPE, false);\n Banana bananaRp = new Banana(new BigDecimal(175.4), \"yellow\", Ripeness.RIPE, false);\n Orange orangeVerd = new Orange(new BigDecimal(200.0), \"yellow\", Ripeness.VERDANT, false);\n Orange orangeRp = new Orange(new BigDecimal(210.2), \"orange\", Ripeness.RIPE, false);\n Pear pearVerd = new Pear(new BigDecimal(180.9), \"green\", Ripeness.VERDANT, false);\n\n Carrot carrotRp = new Carrot(new BigDecimal(100.9), \"orange\", Ripeness.RIPE, false);\n Celery celeryVerd = new Celery(new BigDecimal(200.0), \"green\", Ripeness.VERDANT, false);\n Onion onionRp = new Onion(new BigDecimal(90.9), \"white\", Ripeness.RIPE, true);\n Potato potatoRp = new Potato(new BigDecimal(105.8), \"brown\", Ripeness.RIPE, false);\n\n // Main array of plants creation\n Plant[] basketContent = {carrotRp, orangeVerd, bananaRp, celeryVerd};\n\n // Extra array of plants creation\n Plant[] additionalBasketContent = {onionRp, appleRp, orangeRp, pearVerd, potatoRp};\n\n // Food processor creation\n FoodProcessor foodProcessor = new FoodProcessor();\n\n System.out.println(\" FRUITS&VEGETABLES\\n\\n\");\n\n // Total basket creation\n Basket basket = new Basket();\n\n // Filling the total basket by the main array of plants\n basket.put(basketContent);\n\n System.out.println(\"Basket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\");\n\n // Extra basket creation\n Basket additionalBasket = new Basket();\n\n // Filling the extra basket by the extra array of plants\n additionalBasket.put(additionalBasketContent);\n\n // Combining total and extra baskets\n basket.put(additionalBasket);\n\n System.out.println(\"\\nBasket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\");\n\n System.out.println(\"\\n\\n PEELING FRUITS:\\n\");\n\n // Weight of total basket\n BigDecimal oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before fruits peeling: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight of all fruits in total basket\n BigDecimal oldFruitsWeight = basket.getFruitsWeight();\n System.out.println(\"Fruits weight before peeling: \" + oldFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all fruits from total basket\n Fruit[] fruitsToProcess = basket.extractAllFruits();\n\n // Weight of fruits after peeling\n BigDecimal newFruitsWeight = foodProcessor.peelItems(fruitsToProcess);\n System.out.println(\"Fruits weight after peeling: \" + newFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of peeled fruits back to total basket\n basket.put(fruitsToProcess);\n BigDecimal newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after fruits peeling: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n PEELING VEGETABLES:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before vegetables peeling: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight of all vegetables in total basket\n BigDecimal oldVegetablesWeight = basket.getVegetablesWeight();\n System.out.println(\"Vegetables weight before peeling: \" + oldVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all vegetables from total basket\n Vegetable[] vegetablesToProcess = basket.extractAllVegetables();\n\n // Weight of vegetables after peeling\n BigDecimal newVegetablesWeight = new BigDecimal(0.0);\n\n try {\n newVegetablesWeight = foodProcessor.peelItems(vegetablesToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Vegetables weight after peeling: \" + newVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of peeled vegetables back to total basket\n basket.put(vegetablesToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after vegetables peeling: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n CUTTING VEGETABLES:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before vegetables cutting: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Current weight of vegetables in total basket\n oldVegetablesWeight = basket.getVegetablesWeight();\n System.out.println(\"Vegetables weight before cutting: \" + oldVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all vegetables from total basket\n vegetablesToProcess = basket.extractAllVegetables();\n\n try {\n // Weight of vegetables after cutting\n newVegetablesWeight = foodProcessor.cutAll(vegetablesToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Vegetables weight after cutting: \" + newVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of cuted vegetables back to total basket\n basket.put(vegetablesToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after vegetables cutting: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n SLICING FRUITS:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before fruits slicing: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Current weight of fruits in total basket\n oldFruitsWeight = basket.getFruitsWeight();\n System.out.println(\"Fruits weight before slicing: \" + oldFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all fruits from total basket\n fruitsToProcess = basket.extractAllFruits();\n\n try {\n // Weight of fruits after slicing\n newFruitsWeight = foodProcessor.sliceAll(fruitsToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Fruits weight after slicing: \" + newFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of sliced fruits back to total basket\n basket.put(fruitsToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after fruits slicing: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n NEW PLANT SLICING\\n\");\n\n // New plant creation\n Potato potatoRpPink = new Potato(new BigDecimal(120.9), \"pink\", Ripeness.RIPE, false);\n\n // Insertion to the end of total basket\n basket.put(potatoRpPink);\n System.out.println(\"Basket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n\n // Extraction element from the end of total basket\n Plant lastInBasket = basket.extract(basket.getBasketContent().length - 1);\n\n // Weight of plant before slicing\n BigDecimal oldlastInBasketWeight = lastInBasket.getWeight();\n BigDecimal newLastInBasketWeight = new BigDecimal(0.0);\n\n System.out.println(lastInBasket);\n\n try {\n // Weight of plant after slicing\n newLastInBasketWeight = foodProcessor.slice(lastInBasket);\n } catch (IllegalArgumentException e) {\n newLastInBasketWeight = lastInBasket.getWeight();\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Plant weight after slicing: \" + newLastInBasketWeight + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldlastInBasketWeight.subtract(newLastInBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of sliced plant back to total basket\n basket.put(lastInBasket);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after last element slicing: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n\n }", "@NonNull\n public BasketItemBuilder withId(String id) {\n this.id = id;\n return this;\n }", "public void setShopBasketId(long shopBasketId);", "public synchronized void pdp_AddToBag() throws Exception {\n\n\t\t// Code to remove focus from zoomed image on page load\n\t\tif (!Utils.isDeviceMobile()) {\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(productPrice()).build().perform();\n\t\t}\n\n\t\tutils.scrollToViewElement(driver, pdp_btn_AddToBag());\n\n\t\t// Handling Pop-Up that sometimes over shadows the ADD TO BAG button in mobile\n\t\tif (Utils.isDeviceMobile())\n\t\t\thandleBounceXOnPDP();\n\n\t\tpdp_btn_AddToBag().click();\n\t\t// Thread.sleep(3000);\n\n\t\tif (!utils.brand.equals(\"LGFP\"))\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDP_continueShopping\"),\n\t\t\t\t\t\"Item Added To Bag modal not displayed in mobile\");\n\t}", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public TransactionItem addTransactionItem(int transactionId, int productId, int quantity)\n\t{\n\t\tConnect con=Connect.getConnection();\n\t\tcon.executeQuery(\"USE sudutmeong\");\n\t\tTransactionItem x=new TransactionItem();\n\t\tx.setTransactionId(transactionId);\n\t\tx.setProductId(productId);\n\t\tx.setQuantity(quantity);\n\t\tString query = \"INSERT INTO transactionitem VALUES (\"+transactionId+\",\" + productId + \",\"+ quantity +\")\";\n\t\tcon.executeUpdate(query);\n\t\treturn x;\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public int createPurchaseOrder(PurchaseOrder purchaseOrder){\n try {\n session.save(purchaseOrder);\n tx.commit();\n } catch (Exception e) {\n e.printStackTrace();\n tx.rollback();\n return 0 ;\n }\n return 0;\n }", "void addProduct(Product product);", "public void addCart(String shopName, String productName, String Price,String user_ID) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_SHOPNAME,shopName ); // Name\n values.put(KEY_PRODUCTNAME, productName); // Email\n values.put(KEY_PRICE, Price); // Email\n values.put(KEY_USERID, user_ID);\n\n\n // Inserting Row\n long id = db.insert(TABLE_CART, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New cart inserted into sqlite: \" + id);\n }", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public BasketItemBuilder(BasketItem copyFrom) {\n this.id = copyFrom.getId();\n this.quantity = copyFrom.getQuantity();\n this.label = copyFrom.getLabel();\n this.category = copyFrom.getCategory();\n this.amount = copyFrom.getIndividualAmount();\n this.baseAmount = copyFrom.getIndividualBaseAmount();\n this.measurement = copyFrom.getMeasurement();\n if (copyFrom.hasReferences()) {\n this.references = copyFrom.getReferences();\n }\n if (copyFrom.hasItemData()) {\n this.itemData = copyFrom.getItemData();\n }\n if (copyFrom.hasModifiers()) {\n this.modifiers = copyFrom.getModifiers();\n }\n }", "public void create(String title, String numPages, String quantity, String category, String price, String publicationYear, String[] authorsId, String publisherId) {\n System.out.println(\"creating book \" + title + \" by \"+ authorsId[0] + \" published by \" + publisherId);\n dbmanager.open();\n \n JSONObject item = new JSONObject();\n item.put(\"idBOOK\", dbmanager.getNextId());\n item.put(\"title\", title);\n item.put(\"numPages\", numPages);\n item.put(\"quantity\", quantity);\n item.put(\"category\", category);\n item.put(\"price\", price);\n item.put(\"publicationYear\", publicationYear);\n item.put(\"authors\", authorsId); \n item.put(\"publisher\", publisherId);\n\n dbmanager.createCommit(getNextBookId(),item);\n \n dbmanager.close();\n }", "void createSportItem (String name, String description, double price, String sportType);", "@RequestMapping(\"/order/{cartId}\")\r\n public String createOrder(@PathVariable(\"cartId\") int cartId) {\r\n \tSystem.out.println(\"in order\");\r\n \tUserOrder userOrder = new UserOrder();\r\n Cart cart=cartService.getCartById(cartId);\r\n userOrder.setCart(cart);\r\n\r\n UsersDetail usersDetail = cart.getUsersDetail();\r\n userOrder.setUsersDetail(usersDetail);\r\n userOrder.setBillingAddress(usersDetail.getBillingAddress());\r\n //userOrder.setShippingAddress(usersDetail.getShippingAddress());\r\n\r\n orderService.addOrder(userOrder);\r\n\r\n return \"redirect:/checkout?cartId=\"+cartId;\r\n }", "public addproduct() {\n\t\tsuper();\n\t}", "@WebMethod public Bet createBet(String bet, float money, Question q) throws BetAlreadyExist;", "void delete(ShoppingBasket shoppingBasket);", "private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }", "Purchase create(Purchase purchase) throws SQLException, DAOException;", "public void addProduct(Product product);", "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 void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "Product addNewProductInStore(Product newProduct);", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "public StockItem(T product, Integer quantity) {\n this.product = product;\n this.quantity = quantity;\n }", "void create(Product product) throws IllegalArgumentException;", "public void basketWeave() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Basket Weave\");\n win.setLocation(10, 10);\n for(int y = -5; y < HEIGHT; y += 80) {\n for(int x = -5; x < WIDTH; x += 80) {\n basketDraw(x, y, g);\n }\n for(int x = -45; x < WIDTH; x += 80) {\n basketDraw(x, y+40, g);\n }\n }\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "@Before\n public void setUp() {\n Basket_in = new TCreate_Input();\n Basket_up = new TUpdate_Input();\n BasketAttr_in = new TAttribute(\"IsAddressOK\", \"1\", null, null);\n BasketAttr_up = new TAttribute(\"IsAddressOK\", \"0\", null, null);\n Address_in = new TAddressNamed();\n\n // init input address data\n Address_in.setEMail(\"[email protected]\");\n Address_in.setFirstName(\"Klaus\");\n Address_in.setLastName(\"Klaussen\");\n Address_in.setCity(\"Klausdorf\");\n Address_in.setZipcode(\"08151\");\n Address_in.setCountryID(BigInteger.valueOf(276));\n Address_in.setStreet(\"Musterstraße 2\");\n Address_in.setStreet2(\"Ortsteil Niederfingeln\");\n Address_in.setAttributes(new TAttribute[] { new TAttribute(\"JobTitle\", \"best Job\", null, null),\n new TAttribute(\"Salutation\", \"Dr.\", null, null), });\n\n Address_up = Address_in;\n // just update some fields\n Address_up.setFirstName(\"Hans\");\n Address_up.setLastName(\"Hanssen\");\n Address_up.setStreet(\"Musterstraße 2b\");\n Address_up.setStreet2(\"Ortsteil Oberfingeln\");\n\n Basket_in.setBillingAddress(Address_in);\n\n Basket_in.setAttributes(new TAttribute[] { BasketAttr_in });\n TLineItemContainerIn lineItemContainer = new TLineItemContainerIn();\n lineItemContainer.setCurrencyID(\"EUR\");\n lineItemContainer.setPaymentMethod(\"PaymentMethods/Invoice\");\n lineItemContainer.setShippingMethod(\"ShippingMethods/Express\");\n lineItemContainer.setTaxArea(\"/TaxMatrixGermany/\\\"non EU\\\"\");\n lineItemContainer.setTaxModel(\"gross\");\n String productGuid = productService.getInfo(new String[]{\"Products/ho_1112105010\"}, new String[]{\"GUID\"})[0].getAttributes()[0].getValue();\n assertNotNull(productGuid);\n lineItemContainer.setProductLineItems(new TProductLineItemIn[] { new TProductLineItemIn(productGuid, (float) 10) });\n Basket_in.setLineItemContainer(lineItemContainer);\n\n // init order update data\n Basket_up.setBillingAddress(Address_up);\n Basket_up.setAttributes(new TAttribute[] { BasketAttr_up });\n\n // delete the test order if it exists\n TExists_Return[] Baskets_exists_out = basketService.exists(new String[] { BasketPath });\n if (Baskets_exists_out[0].getExists()) {\n TDelete_Return[] Baskets_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Baskets_delete_out[0].getError());\n }\n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "ShipmentPackage createShipmentPackage();", "public Shop(String uname, String pass)\n {\n super(uname, pass);\n stock = new AllItems();\n bills = new ArrayList<>();\n id = Utilities.SHOP_CTR;\n Utilities.SHOP_CTR++;\n }", "public void addProductToBuyBasket(int productId, int count) {\n if (buyBasket.containsKey(productId))\n buyBasket.replace(productId, buyBasket.get(productId + count));\n else\n buyBasket.put(productId, count);\n }", "public int createPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n if(dbObj.packExists(name)!=-1)\n return -1;\n else\n {\n //no such pack exists ..creates a new pack and returns its packid\n return dbObj.addPack(name);\n \n }\n \n }", "public void createOrderItem() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tRestaurantApp.globalMenuManager.printMenu(); //create a globalmenuManager so that other classes can access the menu\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Which item would you like to order?\");\r\n\t\t\tint menuIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (menuIndex <= 0 || menuIndex > RestaurantApp.globalMenuManager.getSizeOfMenu()){\r\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Please input a valid index from 1 to \"+RestaurantApp.globalMenuManager.getSizeOfMenu());\r\n\t\t\t}\r\n\t\t\tthis.menuItem = RestaurantApp.globalMenuManager.getMenuItem(menuIndex-1);\r\n\t\t\tSystem.out.println(\"How many of this are you ordering?\");\r\n\t\t\tthis.quantity = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tSystem.out.println(\"Order item added. printing details...\");\r\n\t\t\tthis.printOrderItem();\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(e.getMessage()); \r\n\t\t\tSystem.out.println(\"program exiting ...\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }", "public void addStoreStock(String name, int amount);", "@Override\n public void onClick(View v) {\n\n new DrinkDatabase(getBaseContext()).DrinkaddToCart(new DrinkOrder(\n// new Database(getBaseContext()).addToCart(new Order(\n drinkId,\n currentDrink.getDrinkName(),\n drink_numberButton.getNumber(), //null,//use null to check or to run the program\n currentDrink.getDrinkPrice(),\n currentDrink.getDrinkDiscount()\n\n\n ));\n\n Toast.makeText(DrinkDetail.this, \"Added to chart\", Toast.LENGTH_SHORT).show();\n }", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "public void createOrderInSession(HttpServletRequest request, HttpServletResponse response) {\n\t\tOrder order = new Order();\n\t\tSet<CartItem> orderLines = new HashSet<>();\n\t\tShoppingCart cart = new ShoppingCart();\n\t\tcart.setOrder(order);\n\t\tcart.setOrderLines(orderLines);\n\t\trequest.getSession().setAttribute(\"shoppingCart\", cart);\n\t}", "@NonNull\n public BasketItemBuilder withLabel(String label) {\n this.label = label;\n return this;\n }", "public CartItem() {\n }", "public void sendToCheckout(){\n\n String price = String.valueOf(new_price);\n quantity = String.valueOf(count);\n String status = String.valueOf(R.string.red);\n model = new CheckoutModel();\n model.setImage(food.getImage());\n model.setName(food.getFood_name());\n model.setPrice(price);\n model.setQuantity(quantity);\n model.setStatus(status);\n\n modelList = new ArrayList<>();\n modelList.add(model);\n\n\n }", "ResponseEntity<Price> createPrice(String cartId);", "@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}", "protected void prepareBasket(final Basket basket) throws CommunicationException\r\n\t{\r\n\r\n\t\tsapLogger.entering(\"setUpBasket()\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (basket.isUpdateMissing())\r\n\t\t\t{\r\n\t\t\t\tbasket.update();\r\n\t\t\t}\r\n\t\t\t// if necessary, read items and shiptos from backend to\r\n\t\t\t// ensure consistent data for the order\r\n\t\t\tbasket.read();\r\n\r\n\t\t}\r\n\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tsapLogger.exiting();\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "public void validateBasket(String basketID) {\n Basket b = query.getBasket(basketID);\n // rep.save(b); //write\n // b.validateBasket();\n Command c = new ValidateBasket(b,rep);\n gateway.pushCommand(c);\n }", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "@Test \n\tpublic void testGetBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketRequest();\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketHandler.receivedResponse(response);\n\t}", "protected abstract Transaction createAndAdd();", "public static WebElement lnk_clickAddToBasketPdtListing() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[contains(@class, 'mt5')]\"\r\n \t\t\t\t+ \"//a[contains(text(),'Add to Basket')][position()=1]\"));\r\n \t\tAdd_Log.info(\"Add to Basket button is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Add to Basket button is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }" ]
[ "0.74361396", "0.68775624", "0.6818581", "0.6734103", "0.6518597", "0.63371104", "0.61925656", "0.6187069", "0.6160961", "0.6160469", "0.6020492", "0.6019461", "0.60085016", "0.5917342", "0.59093255", "0.57660943", "0.5733264", "0.5681251", "0.56763834", "0.56261647", "0.5619913", "0.55982405", "0.55980563", "0.55768824", "0.5573017", "0.55553275", "0.5549828", "0.5533156", "0.54997283", "0.5489303", "0.5476045", "0.5458579", "0.5458362", "0.54564255", "0.5433629", "0.5421218", "0.5412197", "0.54085654", "0.53968793", "0.5374785", "0.53704417", "0.536253", "0.5361451", "0.5356721", "0.5354749", "0.53530097", "0.53525484", "0.53518164", "0.5349875", "0.53418696", "0.53404063", "0.5333382", "0.53305155", "0.53153044", "0.53102475", "0.5304983", "0.5300417", "0.5300014", "0.5296658", "0.5290814", "0.5276061", "0.5270917", "0.52476025", "0.52450615", "0.524369", "0.52368563", "0.5223783", "0.52064365", "0.52037", "0.5197873", "0.5196963", "0.51966244", "0.51917696", "0.5190586", "0.5186214", "0.51733726", "0.51698697", "0.51613474", "0.515906", "0.51546276", "0.5152197", "0.5151882", "0.5150588", "0.5150403", "0.5145471", "0.5140254", "0.5132984", "0.5132295", "0.51220864", "0.51210696", "0.511895", "0.5112459", "0.5112058", "0.51099896", "0.51090264", "0.5108983", "0.5107377", "0.51055604", "0.50970817", "0.5088245" ]
0.5722003
17
Method called when plugin starts.
public void startPlugin() { // add a new ResourceChangeListener Cheops.getInstance().addResourceChangeListener(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void pluginInitialize() {}", "@Override\n protected void pluginInitialize() {\n // init();\n }", "public void onEnable()\n\t{\n\t\t//Tells the user that the plugin is starting up.\n\t\tlog.info(\"Started up.\");\n\t}", "public void onStart() {\n\t\t\n\t}", "@Override\n public void startup() {\n }", "public void onStart() {\n }", "public void onStart() {\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "public void onPluginStart()\n\t{\n\t\tfor (Integer event : this.getNetworkCommands())\n\t\t\tCalicoEventHandler.getInstance().addListener(event.intValue(), this, CalicoEventHandler.ACTION_PERFORMER_LISTENER);\n\t\t\n\t\tCanvasStatusBar.addMenuButtonRightAligned(CreateCustomScrapButton.class);\n\t\t\n\t\t//Add an additional voice to the bubble menu\n\t\t//CGroup.registerPieMenuButton(SaveToPaletteButton.class);\n\t\t\n\t\t//Register to the events I am interested in from Calico's core events\n\t\t//Example: CalicoEventHandler.getInstance().addListener(NetworkCommand.VIEWING_SINGLE_CANVAS, this, CalicoEventHandler.PASSIVE_LISTENER);\n\n\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "public synchronized void start()\n {\n pluginMonitor.start();\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "@Override\n\tprotected void onStart() {\n\t\tSystem.out.println(\"onStart\");\n\t}", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}", "protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"onStart...\");\n\t}", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tXSDK.getInstance().onStart();\r\n\t\tsuper.onStart();\r\n\t}", "public void onStart() {\n super.onStart();\n }", "@Override\n protected void startUp() {\n }", "@Override\n public void onStart() {\n System.out.println(\"ONstart\");\n super.onStart();\n\n }", "void onStart() {\n\n }", "@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}", "@Override\r\n public void onStart() {\n super.onStart();\r\n }", "@Override\n public void onStart()\n {\n }", "public void onStartImpl() {\n }", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "void onStarted();", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"Método onStart\");\n\t}", "@Override\n\tpublic void onStart() {\n\n\t}", "@Override\n\tpublic void onStart() {\n\n\t}", "public void onLoad() {\n // store jar path for plugin loader\n thisJar = this.getFile();\n }", "protected abstract void onPluginEnable();", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.i(TAG, module + \" Entra por onStart\");\n\n\t}", "@Override\n public void onStart() {\n\n }", "protected void start() {\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "public void startup(){}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n\tprotected void onStart()\n\t{\n\t\tsuper.onStart();\n\t}", "@Override\r\n public void start() {\r\n }", "public void initialize() {\n\n getStartUp();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}", "@Override\n public void onStart() {\n GuiMain gui = new GuiMain(this);\n gui.setVisible(true);\n log(\"Script is starting!\");\n\n }", "@Override\n public void onStart() {\n super.onStart();\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n Log.d(TAG, \"now running: onStart\");\n }", "public void onStart() {\n /* do nothing - stub */\n }", "@Override public void start() {\n }", "@Override\n public void onStart() {\n super.onStart();\n\t\t\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tLog.i(TAG, \"onStart\");\n\t}", "@Override\n public void beforeStart() {\n \n }", "@Override\n public void start() { }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}" ]
[ "0.78057086", "0.7693754", "0.7490136", "0.7357339", "0.73470795", "0.72514427", "0.7245425", "0.7201924", "0.7175036", "0.7118052", "0.70897824", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7087701", "0.7085926", "0.7085926", "0.7078701", "0.7070851", "0.7058787", "0.705629", "0.7055", "0.7052709", "0.7050083", "0.7050083", "0.70457613", "0.70457613", "0.70309603", "0.70123464", "0.69906664", "0.6986065", "0.69724756", "0.6969074", "0.6966332", "0.6966169", "0.69593966", "0.6956984", "0.6953255", "0.6953255", "0.6953255", "0.6953255", "0.6953255", "0.6947783", "0.69411397", "0.69262606", "0.69262606", "0.6924052", "0.69215906", "0.69089055", "0.6907625", "0.6896823", "0.68962765", "0.68962765", "0.68962765", "0.68962765", "0.68962765", "0.68839914", "0.6882994", "0.6882994", "0.6882994", "0.6882994", "0.6882994", "0.6882994", "0.68652964", "0.68652964", "0.68652964", "0.68622136", "0.6857408", "0.6855454", "0.68463194", "0.6845617", "0.6839405", "0.68367004", "0.6833277", "0.68243116", "0.6818675", "0.67995286", "0.67995286", "0.67995286", "0.67995286", "0.67995286", "0.67995286", "0.67995286", "0.67928326", "0.6786329", "0.67852986", "0.6784228", "0.6784228", "0.6784228", "0.6784228", "0.6784228", "0.6784228", "0.6784228", "0.6784228", "0.6784228" ]
0.7681256
2
Adds the ResourceChangeListener to capture changes for each new build
public void addResourceChangeListener() { if (elementChange == null) { elementChange = new JavaElementChange(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resourceChanged(IResourceChangeEvent event) {\n\n\t\tint eventType = event.getType();\n\t\tIResourceDelta delta = event.getDelta();\n\t\tswitch (eventType) {\n\t\tcase IResourceChangeEvent.POST_CHANGE:\n\t\t\tcheckProjectsAndDescriptorChanges(delta);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void resourceChanged(IResourceChangeEvent arg0) {\n\t\t\n\t}", "public void resourceChanged(IResourceChangeEvent event)\r\n\t\t{\n\t\t\tupdateErrors();\r\n\t\t}", "@Override\n public void addListener(ResourceListener listener) {\n }", "public void resourceChanged(final IResourceChangeEvent event) {\n\t\tif (event.getType() == IResourceChangeEvent.POST_CHANGE) {\n\t\t\tif (event.getDelta() != null) {\n\t\t\t\tif (event.getDelta().getKind() == IResourceDelta.CHANGED || event.getDelta().getKind() == IResourceDelta.REMOVED) {\n\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tpageMainEditor.refreshLstClasses();\n\t\t\t\t\t\t\tpageMainEditor.updateBuildPathStatus(getEditor(1));\n\t\t\t\t\t\t\tpageMainEditor.checkCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (event.getType() == IResourceChangeEvent.PRE_CLOSE) {\n\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();\n\t\t\t\t\tfor (int i = 0; i < pages.length; i++) {\n\t\t\t\t\t\tif (((FileEditorInput) editor.getEditorInput()).getFile().getProject().equals(event.getResource())) {\n\t\t\t\t\t\t\tIEditorPart editorPart = pages[i].findEditor(editor.getEditorInput());\n\t\t\t\t\t\t\tpages[i].closeEditor(editorPart, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tbarrier[0] = TestBarrier.STATUS_START;\n \t\t\t\ttry {\n \t\t\t\t\tTestBarrier.waitForStatus(barrier, TestBarrier.STATUS_DONE);\n \t\t\t\t} catch (Throwable e) {\n \t\t\t\t\terror[0] = e;\n \t\t\t\t}\n \t\t\t}", "void addChangeListener( RegistryListener listener );", "void resourceChanged(IPath workspacePath);", "public interface ResourceListener {\n\n\tpublic void update(ResourceList resource);\n}", "@Override\n public void addChangeListener(ChangeListener l) {}", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "void addChangeListener(ChangeListener cl);", "void addChangeListener(Consumer<ConfigurationSourceChangeEvent> changeListener);", "public void onResourceAdded(final ResourceEvent resourceEvent);", "void addChangeListener(ChangeListener listener);", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n repositoryStep.addChangeListener(l);\n }", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "private void recordChangedResources(IResourceDelta delta) throws CoreException {\n \t\tchangedResources.clear();\n \t\tif (delta == null)\n \t\t\treturn;\n \t\tdelta.accept(new IResourceDeltaVisitor() {\n \t\t\t/*\n \t\t\t * @see IResourceDeltaVisitor#visit(IResourceDelta)\n \t\t\t */\n \t\t\tpublic boolean visit(IResourceDelta delta) throws CoreException {\n \t\t\t\tchangedResources.add(delta.getResource());\n \t\t\t\treturn true;\n \t\t\t}\n \t\t});\n \t}", "public abstract void addListener(RegistryChangeListener listener);", "@Override\n public void onResourcesChanged(int resources) {\n }", "@Override\n public void addedResource( ResourceEvent event )\n {\n }", "protected void addListenerTo(BioResource BioResource) {\n\t\t\tBioResource.addListener(this);\n\t\t}", "public static void addResourceListener(ReloadableResourceManager manager) {\n for (FoliageType type : FoliageType.values()) {\n manager.registerReloader(new SlimeColorReloadListener(type));\n }\n }", "public abstract void onContainerResourceUpdated(\n ContainerId containerId, Resource resource);", "public void addChangeListener(ChangeListener stackEngineListener);", "void addChangeListener(PropertyChangeListener<? super R> listener);", "public interface RegisteredResourceListener {\n\n\t/**\n\t * Gets the resource that the listener is connected to.\n\t * @return a resource object that represents the resource at is seen by the\n\t * application returned by {@link #getApplication()}. That is, calling \n\t * {@link Resource#getAccessMode()} returns the application's access mode.\n\t */\n\tResource getResource();\n\n\t/**\n\t * Application that connected the listener to the resource.\n\t */\n\tAdminApplication getApplication();\n\n\t/**\n\t * Gets the methods that is informed about changes in the resource's value.\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\torg.ogema.core.resourcemanager.ResourceListener getListener();\n}", "public interface ResourceListener extends EventListener {\n\n\t/**\n\t * Called when a resource is added. The URI of the added resource will be in <code>getResoureURI()</code>. The resource description may be in\n\t * <code>getResource()</code>, and information about the parent resource may be in <code>getParentResourceURI()</code> and <code>getParentResource()</code>,\n\t * depending on the implementing class.\n\t * @param resourceEvent The event identifying the added resource.\n\t * @see ResourceEvent#getResourceURI\n\t * @see ResourceEvent#getResource\n\t */\n\tpublic void onResourceAdded(final ResourceEvent resourceEvent);\n\n\t/**\n\t * Called when a resource is removed. The URI of the removed resource will be in <code>getResoureURI()</code>. The resource description may be in\n\t * <code>getResource()</code>, and information about the parent resource may be in <code>getParentResourceURI()</code> and <code>getParentResource()</code>,\n\t * depending on the implementing class.\n\t * @param resourceEvent The event identifying the removed resource.\n\t * @see ResourceEvent#getResourceURI\n\t * @see ResourceEvent#getResource\n\t */\n\tpublic void onResourceRemoved(final ResourceEvent resourceEvent);\n\n\t/**\n\t * Called when a resource is renamed to a different referenceURI. The new URI of the renamed resource will be in <code>getResoureURI()</code>, and its\n\t * resource description may be in <code>getResource()</code>, depending on the implementing class. The old URI of the renamed resource will be in\n\t * <code>getOldResourceURI</code>, and its old resource description may be in <code>getOldResource()</code>, depending on the implementing class. Information\n\t * about the new parent resource may be in <code>getParentResourceURI()</code> and <code>getParentResource()</code>, and information about the old parent\n\t * resource may be in <code>getOldParentResourceURI()</code> and <code>getOldParentResource()</code>, depending on the implementing class.\n\t * @param resourceEvent The event identifying the removed resource.\n\t * @see ResourceEvent#getOldParentResourceURI\n\t * @see ResourceEvent#getOldParentResource\n\t * @see ResourceEvent#getOldResourceURI\n\t * @see ResourceEvent#getOldResource\n\t * @see ResourceEvent#getParentResourceURI\n\t * @see ResourceEvent#getParentResource\n\t * @see ResourceEvent#getResourceURI\n\t * @see ResourceEvent#getResource\n\t */\n\tpublic void onResourceMoved(final ResourceEvent resourceEvent);\n\n}", "public void addChangeListener(ChangeListener<BufferedImage> listener) {\n observer.add(listener);\n }", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n if (changes == null)\n {\n changes = new PropertyChangeSupport(this);\n }\n changes.addPropertyChangeListener(listener);\n }", "private PropertyChangeListener createListener() {\n return new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n String propertyName = evt.getPropertyName();\n if (Filter.PROPERTY_PATTERN.equals(propertyName)) {\n DocumentViewPanel.RP.post(new Runnable() {\n @Override\n public void run() {\n refreshKeys();\n }\n });\n }\n }\n };\n }", "public void addChangeListener(ChangeListener listener) {\n\t\tchangeListeners.add(listener);\n\t}", "public void addChangeListener (ChangeListener listener)\n {\n listenerList.add(ChangeListener.class, listener);\n }", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().addPropertyChangeListener(listener);\r\n}", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "public synchronized void addBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.addElement(listener);\n listeners = newListeners;\n }", "protected void addChangeListeners() {\n\t\tif (this.getChangeListenersAdded()) {\n\t\t\t// TODO don\\u00b4t throw an exception yet. CR has to fix another problem. then the exception is the right thing.\n\t\t\t// But what problem?! Should we just try this? UA\n\t\t\treturn;//throw new IllegalStateException();\n\t\t}\n\t\tthis.addCollectableComponentModelListeners();\n\t\tthis.addAdditionalChangeListeners();\n\t\tthis.bChangeListenersAdded = true;\n\n\t\tassert this.getChangeListenersAdded();\n\t}", "public void addChangeListener(ChangeListener listener)\r\n {\r\n listeners.add(listener);\r\n }", "public void setChangeListener();", "private static void registerEventListener() {\r\n\r\n log.info(\"Registering event listener for Listeners\"); //$NON-NLS-1$\r\n\r\n try {\r\n ObservationManager observationManager = ContentRepository\r\n .getHierarchyManager(ContentRepository.CONFIG)\r\n .getWorkspace()\r\n .getObservationManager();\r\n\r\n observationManager.addEventListener(new EventListener() {\r\n\r\n public void onEvent(EventIterator iterator) {\r\n // reload everything\r\n reload();\r\n }\r\n }, Event.NODE_ADDED\r\n | Event.NODE_REMOVED\r\n | Event.PROPERTY_ADDED\r\n | Event.PROPERTY_CHANGED\r\n | Event.PROPERTY_REMOVED, \"/\" + CONFIG_PAGE + \"/\" + \"IPConfig\", true, null, null, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n }\r\n catch (RepositoryException e) {\r\n log.error(\"Unable to add event listeners for Listeners\", e); //$NON-NLS-1$\r\n }\r\n }", "@Override\r\n\tpublic void updateResourceInformation() {\n\t}", "public interface IResourceRegistrationProvider {\n\n public void addResourceRegisteredListener(\n IResourceRegisteredListener listener);\n\n public void removeResourceRegisteredListener(\n IResourceRegisteredListener listener);\n\n public List<IResourceRegisteredListener> getResourceRegisteredListeners();\n}", "private void fireRebuildPerformedEvent() {\r\n final Vector listeners = getProjectChangedListeners();\r\n final Enumeration enumer = listeners.elements();\r\n while (enumer.hasMoreElements()) {\r\n final ProjectChangedListener listener = (ProjectChangedListener) enumer.\r\n nextElement();\r\n listener.rebuildPerformed(getProject());\r\n }\r\n }", "@Override\r\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.addListener(notifyChangedListener);\r\n\t}", "@Override\n\tpublic void updateResourceInformation() {\n\t}", "protected void handleChangedResources() {\r\n\t\tif (!changedResources.isEmpty()\r\n\t\t\t\t&& (!isDirty() || handleDirtyConflict())) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (isDirty()) {\r\n\t\t\t\tchangedResources.addAll(editingDomain.getResourceSet()\r\n\t\t\t\t\t\t.getResources());\r\n\t\t\t}\r\n\t\t\teditingDomain.getCommandStack().flush();\r\n\r\n\t\t\tupdateProblemIndication = false;\r\n\t\t\tfor (Resource resource : changedResources) {\r\n\t\t\t\tif (resource.isLoaded()) {\r\n\t\t\t\t\tresource.unload();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tresource.load(Collections.EMPTY_MAP);\r\n\t\t\t\t\t} catch (IOException exception) {\r\n\t\t\t\t\t\tif (!resourceToDiagnosticMap.containsKey(resource)) {\r\n\t\t\t\t\t\t\tresourceToDiagnosticMap\r\n\t\t\t\t\t\t\t\t\t.put(resource, analyzeResourceProblems(\r\n\t\t\t\t\t\t\t\t\t\t\tresource, exception));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (AdapterFactoryEditingDomain.isStale(editorSelection)) {\r\n\t\t\t\tsetSelection(StructuredSelection.EMPTY);\r\n\t\t\t}\r\n\r\n//\t\t\tupdateProblemIndication = true;\r\n//\t\t\tupdateProblemIndication();\r\n\t\t}\r\n\t}", "public void resourceChanged(Resource item, Subject subject)\n {\n event(\"ResourceChange\",\n item.getId(),\n subject != null ? subject.getId() : -1,\n -1,\n false);\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "private void OnInflated() \r\n { \r\n if (_inflatedList != null)\r\n { \r\n for/*each*/ (ResourceReferenceExpression listener : _inflatedList)\r\n {\r\n listener.OnDeferredResourceInflated(this);\r\n } \r\n }\r\n }", "@Override\n protected void update(List<Event> result, Ec2LaunchConfiguration oldResource, Ec2LaunchConfiguration newResource) {\n \n }", "protected void installListeners() {\n spinner.addPropertyChangeListener(propertyChangeListener); }", "@Override\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.addListener(notifyChangedListener);\n\t}", "@Override\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.addListener(notifyChangedListener);\n\t}", "@Override\n public void addChangeListener(ChangeListener listener, Event[] events) {\n boolean addEvent[] = selectEventsToModify(events);\n if (addEvent[Event.LOAD.ordinal()]) {\n loadListeners.addChangeListener(listener);\n }\n if (addEvent[Event.STORE.ordinal()]) {\n storeListeners.addChangeListener(listener);\n }\n if (addEvent[Event.REMOVE.ordinal()]) {\n removeListeners.addChangeListener(listener);\n }\n }", "@Override\n\t\tpublic void publishResource(FlexoResource<?> resource, FlexoVersion newVersion) throws Exception {\n\t\t}", "public void addStatusChangeListener(StatusChangeListener listener){\n\n\t\tstatusChangeListeners.add(StatusChangeListener.class, listener);\n\t}", "@Override\n public void addListener(ChangeListener<? super String> listener) {\n }", "public void startPlugin() {\n\t\t// add a new ResourceChangeListener\n\t\tCheops.getInstance().addResourceChangeListener();\n\t}", "public void registryChange() {\n registryEvent(1);\n }", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n }", "public final void addChangeListener(ChangeListener l) {\n\t\tsynchronized (listeners) {\n\t\t\tlisteners.add(l);\n\t\t}\n\t}", "public static void start() {\n assert sListener == null;\n sListener = new ResourceListener();\n ResourceManager.getInstance().addListener(sListener);\n }", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().addPropertyChangeListener(listener);\n\t}", "public void projectRunnableChanged() { }", "public void projectRunnableChanged() { }", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "public void addChangeListener(ChangeListener listener) {\n listenerList.add(ChangeListener.class, listener);\n }", "void addPropertyChangeListener(PropertyChangeListener listener);", "void addListener(RiakFutureListener<V,T> listener);", "@Override\n public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n listeners = new PropertyChangeSupport(this);\n }\n listeners.addPropertyChangeListener(listener);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\tmPcs.addPropertyChangeListener(listener);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener( l );\n }", "@Override\n public void refreshResources() {\n\n }", "@Override\n protected void registerCustomListeners(@NotNull MessageBusConnection connection) {\n connection.subscribe(EncodingManagerListener.ENCODING_MANAGER_CHANGES, (document, propertyName, oldValue, newValue) -> {\n if (propertyName.equals(EncodingManagerImpl.PROP_CACHED_ENCODING_CHANGED)) {\n updateForDocument(document);\n }\n });\n\n connection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkVirtualFileListenerAdapter(new VirtualFileListener() {\n @Override\n public void propertyChanged(@NotNull VirtualFilePropertyEvent event) {\n if (VirtualFile.PROP_ENCODING.equals(event.getPropertyName())) {\n updateForFile(event.getFile());\n }\n }\n }));\n }", "private void addListener(RestStateChangeListener... listener) {\n\t\tfor (RestStateChangeListener l : listener) {\n\t\t\tthis.listener.add(l);\n\t\t}\n\t}", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\r\n propertyChangeSupport.addPropertyChangeListener(l);\r\n }", "public void addProjectChangedListener(final ProjectChangedListener listener) {\r\n if (listener != null) {\r\n final Vector listeners = getProjectChangedListeners();\r\n if (!listeners.contains(listener)) {\r\n listeners.add(listener);\r\n }\r\n }\r\n }", "@Deprecated\n public abstract void onContainerResourceIncreased(\n ContainerId containerId, Resource resource);", "public abstract void addPropertyChangeListener(IPropertyChangeListener listener);", "void handleNewResource() {\n System.out.println(\"Here at VMLeaseProcessor#handleNewResource\");\n callForBackup();\n resourceManager.createRedundant();\n }", "void addListener(ChangeListener<? super T> listener);", "public void addChangeListener(ChangeListener listener) {\n changeListeners.add(ChangeListener.class, listener);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(ActionListener<PropertyChangeEvent> l) {\n if (root != null) {\n Property prop = property;\n if (prop == null && tags != null) {\n prop = root.getEntity().findProperty(tags);\n }\n if (prop != null) {\n root.getEntity().addPropertyChangeListener(prop, pcl());\n }\n } else {\n Entity leafEntity = getLeafEntity();\n Property leafProperty = getLeafProperty();\n if (leafEntity != null && leafProperty != null) {\n leafEntity.getEntity().addPropertyChangeListener(leafProperty, pcl());\n }\n parent.addVetoablePropertyChangeListener(vpcl());\n parent.addListChangeListener(listChangeListener());\n }\n if (listeners == null) {\n listeners = new EventDispatcher();\n }\n listeners.addListener(l);\n \n }", "public ASListener(){\n \t\treload();\n \t}", "public void addChangeListener(ChangeListener cl)\n {\n if (!fdl.listeners.add(cl)) throw new RuntimeException(\"Error whilst adding change listener.\");\n }", "public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n }", "public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }", "public void addPropertyChangeListener(PropertyChangeListener l);", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}", "protected void initModifiedListeners()\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tpath.addModifiedListener(this);\n\t\t}\n\t}", "public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }", "protected void addListenerForProperty(MapChangeListener<Object, Object> aMapChangeListener, String aProperty) {\n\n // Create a wrapper, which will only trigger the given Listener when the given property has changed.\n MapChangeListener<Object, Object> tmpListenerWrapper = (aChange -> {\n\n // Current document changed?\n if (aChange.getKey().equals(aProperty)) {\n\n aMapChangeListener.onChanged(aChange);\n }\n });\n\n // Add the wrapper listener to our List of added Listeners\n stagePropertiesListenersList.add(tmpListenerWrapper);\n\n // Add it to the stage properties.\n stage.getProperties().addListener(tmpListenerWrapper);\n }" ]
[ "0.6961628", "0.68122494", "0.654916", "0.6498046", "0.64934325", "0.64719796", "0.6460088", "0.6429672", "0.6383223", "0.62616867", "0.61398333", "0.61398333", "0.6121783", "0.61112314", "0.61078113", "0.6086283", "0.59864074", "0.59864074", "0.5978555", "0.5965746", "0.58927536", "0.5887138", "0.58816606", "0.583617", "0.579068", "0.5760301", "0.5752518", "0.5590148", "0.55809647", "0.557549", "0.5567793", "0.5546148", "0.55069566", "0.549638", "0.5493111", "0.5493049", "0.5493004", "0.54921764", "0.5481696", "0.5481593", "0.546216", "0.54353607", "0.540656", "0.5385457", "0.5384748", "0.5378697", "0.5372215", "0.53683144", "0.53493965", "0.53358305", "0.53254545", "0.53254545", "0.5310979", "0.5299291", "0.5292806", "0.5275767", "0.5275767", "0.5271008", "0.52406174", "0.52401316", "0.5234042", "0.5222303", "0.5212313", "0.5199957", "0.5192914", "0.5183454", "0.51799", "0.51680017", "0.51680017", "0.51526123", "0.514526", "0.51413214", "0.51392776", "0.5134832", "0.51239145", "0.5122171", "0.51105964", "0.5107467", "0.5102108", "0.510167", "0.510109", "0.5100765", "0.5099158", "0.50973994", "0.5090724", "0.5088669", "0.5086118", "0.5086118", "0.5086118", "0.50852364", "0.5084763", "0.5083643", "0.5082097", "0.50808", "0.5065318", "0.5061771", "0.5042623", "0.5039651", "0.50291514", "0.501838" ]
0.7405134
0
TODO: Implement CameraX operations Create configuration object for the viewfinder use case
private void startCamera() { PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build(); Preview preview = new Preview(previewConfig); preview.setOnPreviewOutputUpdateListener(output -> { ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent(); parent.removeView(dataBinding.viewFinder); parent.addView(dataBinding.viewFinder, 0); dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture()); updateTransform(); }); // Create configuration object for the image capture use case // We don't set a resolution for image capture; instead, we // select a capture mode which will infer the appropriate // resolution based on aspect ration and requested mode ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build(); // Build the image capture use case and attach button click listener ImageCapture imageCapture = new ImageCapture(imageCaptureConfig); dataBinding.captureButton.setOnClickListener(v -> { File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + ".jpg"); imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() { @Override public void onImageSaved(@NonNull File file) { String msg = "Photo capture succeeded: " + file.getAbsolutePath(); Log.d("CameraXApp", msg); dataBinding.viewFinder.post( () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show() ); } @Override public void onError(@NonNull ImageCapture.ImageCaptureError imageCaptureError, @NonNull String message, @Nullable Throwable cause) { String msg = "Photo capture failed: " + message; Log.e("CameraXApp", msg, cause); dataBinding.viewFinder.post( () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show() ); } }); }); // Setup image analysis pipeline that computes average pixel luminance ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode( ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build(); // Build the image analysis use case and instantiate our analyzer ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig); analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer()); CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "private void configureCamera(int width, int height)\n {\n mCameraId = CAMERA_FACE_BACK;\n ///Configure camera output surfaces\n setupCameraOutputs(mWidth, mHeight);\n }", "void cameraSetup();", "private void setUpAndConfigureCamera() {\n\t\t// Open and configure the camera\n\t\tmCamera = selectAndOpenCamera();\n\n\t\tCamera.Parameters param = mCamera.getParameters();\n\n\t\t// Smaller images are recommended because some computer vision operations are very expensive\n\t\tList<Camera.Size> sizes = param.getSupportedPreviewSizes();\n\t\tCamera.Size s = sizes.get(closest(sizes,640,360));\n\t\tparam.setPreviewSize(s.width,s.height);\n\t\tmCamera.setParameters(param);\n\n\t\t// start image processing thread\n\n\t\t// Start the video feed by passing it to mPreview\n\t\tmPreview.setCamera(mCamera);\n\t}", "public static ViewConfig createViewConfig(ConfigLink<ExposureFunctions> exposureConfig, ConfigLink<CurrencyMatrix> currencyMatrixLink) {\n return\n configureView(\n \"FX Forward Remote view\",\n config(\n arguments(\n function(\n MarketExposureSelector.class,\n argument(\"exposureFunctions\", exposureConfig)),\n function(\n DefaultHistoricalMarketDataFn.class,\n argument(\"currencyMatrix\", currencyMatrixLink))),\n implementations(\n CurveSelector.class, MarketExposureSelector.class,\n DiscountingMulticurveCombinerFn.class, CurveSelectorMulticurveBundleFn.class,\n FXForwardPVFn.class, DiscountingFXForwardPVFn.class)),\n column(OutputNames.FX_PRESENT_VALUE));\n }", "@Override\r\n public void setConfig(ConnectorConfig config) {\n cameraIndex = config.getIntegerParam(\"cameraIndex\", cameraIndex);\r\n\r\n }", "private void updateCameraParametersPreference() {\n\n int camOri = CameraHolder.instance().getCameraInfo()[mCameraId].orientation;\n // Set the preview frame aspect ratio according to the picture size.\n Camera.Size size = mParameters.getPictureSize();\n double aspectWtoH = 0.0;\n if ((camOri == 0 || camOri == 180) && size.height > size.width) {\n aspectWtoH = (double) size.height / size.width;\n } else {\n aspectWtoH = (double) size.width / size.height;\n }\n\n if (LOGV)\n Log.e(TAG, \"picture width=\" + size.width + \", height=\" + size.height);\n\n // Set a preview size that is closest to the viewfinder height and has the right aspect ratio.\n List<Camera.Size> sizes = mParameters.getSupportedPreviewSizes();\n Camera.Size optimalSize;\n //if (mode == SettingsActivity.CAPTURE_MODE)\n //\toptimalSize = Util.getOptimalPreviewSize(this, sizes, aspectWtoH);\n //else\n {\n int requiredArea = mPreviewWidth * mPreviewHeight;\n\n //optimalSize = Util.getOptimalPreviewSize(this, sizes, aspectWtoH);\n optimalSize = Util.getOptimalPreviewSizeByArea(this, sizes, requiredArea);\n }\n\n // Camera.Size optimalSize = Util.getMaxPreviewSize(sizes, camOri);\n Camera.Size original = mParameters.getPreviewSize();\n\n Log.i(TAG, \" Sensor[\" + mCameraId + \"]'s orientation is \" + camOri);\n if (!original.equals(optimalSize)) {\n if (camOri == 0 || camOri == 180) {\n mParameters.setPreviewSize(optimalSize.height, optimalSize.width);\n } else {\n mParameters.setPreviewSize(optimalSize.width, optimalSize.height);\n }\n\n // Zoom related settings will be changed for different preview\n // sizes, so set and read the parameters to get lastest values\n\n if (mCameraDevice != null) {\n mCameraDevice.setParameters(mParameters);\n mParameters = mCameraDevice.getParameters();\n }\n }\n if (LOGV)\n Log.e(TAG, \"Preview size is \" + optimalSize.width + \"x\"\n + optimalSize.height);\n\n String previewSize = \"\";\n previewSize = \"[\" + optimalSize.width + \"x\" + optimalSize.height + \"]\";\n// mPreviewSizeView.setText(previewSize);\n\n // Set JPEG quality.\n int jpegQuality = CameraProfile.getJpegEncodingQualityParameter(\n mCameraId, CameraProfile.QUALITY_HIGH);\n mParameters.setJpegQuality(jpegQuality);\n\n // For the following settings, we need to check if the settings are\n // still supported by latest driver, if not, ignore the settings.\n\n //if (Parameters.SCENE_MODE_AUTO.equals(mSceneMode))\n {\n if (mParameters != null) {\n // Set white balance parameter.\n String whiteBalance = \"auto\";\n if (isSupported(whiteBalance,\n mParameters.getSupportedWhiteBalance())) {\n mParameters.setWhiteBalance(whiteBalance);\n }\n\n String focusMode = mFocusManager.getFocusMode();\n mParameters.setFocusMode(focusMode);\n\n // Set exposure compensation\n int value = 0;\n int max = mParameters.getMaxExposureCompensation();\n int min = mParameters.getMinExposureCompensation();\n if (value >= min && value <= max) {\n mParameters.setExposureCompensation(value);\n } else {\n Log.w(TAG, \"invalid exposure range: \" + value);\n }\n }\n }\n\n\n if (mParameters != null) {\n // Set flash mode.\n String flashMode = \"off\";\n List<String> supportedFlash = mParameters.getSupportedFlashModes();\n if (isSupported(flashMode, supportedFlash)) {\n mParameters.setFlashMode(flashMode);\n }\n\n Log.e(TAG, \"focusMode=\" + mParameters.getFocusMode());\n }\n\n }", "public static VideoSource startCamera(CameraConfig config) {\n System.out.println(\"Starting camera '\" + config.name + \"' on \" + config.path);\n CameraServer inst = CameraServer.getInstance();\n UsbCamera camera = new UsbCamera(config.name, config.path);\n MjpegServer server = inst.startAutomaticCapture(camera);\n\n Gson gson = new GsonBuilder().create();\n\n camera.setConfigJson(gson.toJson(config.config));\n camera.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n\n if (config.streamConfig != null) {\n server.setConfigJson(gson.toJson(config.streamConfig));\n }\n\n return camera;\n }", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "private void setupCamera(final int camera) {\n try {\n // mPreview = new CamPreview(this, camera, CamPreview.LayoutMode.NoBlank);// .FitToParent);\n } catch (Exception e) {\n Toast.makeText(this, R.string.cannot_connect_to_camera, Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n RelativeLayout.LayoutParams previewLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n Display display = getWindowManager().getDefaultDisplay();\n DisplayMetrics outMetrics = new DisplayMetrics();\n display.getMetrics(outMetrics);\n\n int width = outMetrics.widthPixels;\n int height = outMetrics.heightPixels;\n\n previewLayoutParams.height = width;\n previewLayoutParams.width = width;\n\n // Un-comment below line to specify the position.\n // mPreview.setCenterPosition(width / 2, height / 2);\n\n // previewParent.addView(mPreview, 0, previewLayoutParams);\n\n\n }", "@Override\n public void onCameraViewStarted(int width, int height){\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mGray = new Mat(height, width, CvType.CV_8UC1);\n mDrawingLayer = new Mat(height,width,CvType.CV_8UC4);\n mMixed = new Mat(height,width,CvType.CV_8UC4);\n mOutput = new Mat(width,height,CvType.CV_8UC4);\n mGaussianMask = new Mat();\n\n Mat horizontal = Imgproc.getGaussianKernel(width * 2, staticConfig.vignetteLevel,CvType.CV_32F);\n Mat vertical = Imgproc.getGaussianKernel(height * 2, staticConfig.vignetteLevel, CvType.CV_32F);\n Mat matrix = new Mat();\n Core.gemm(vertical,horizontal,1,new Mat(),0,matrix,Core.GEMM_2_T);\n Core.MinMaxLocResult mmr = Core.minMaxLoc(matrix);\n Core.divide(matrix,new Scalar(mmr.maxVal),mGaussianMask);\n\n /* initialising mats that are necessary for frame processing */\n mEdges = new Mat(height, width, CvType.CV_8UC1);\n mTemplateTargetPoints = new MatOfPoint2f(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0));\n mFrameBox = new MatOfPoint2f();\n /* mTemplateTargetPoints.fromArray(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0)); */\n\n /* loading template */\n /* the template is a 200 x 50 png image */\n /* containing the template in 4 different orientations */\n\n mTemplate = new Mat();\n InputStream stream = null;\n Uri uri = Uri.parse(\"android.resource://au.com.pandamakes.www.pureblacktea/drawable/templatelg7\");\n try{\n stream = getContentResolver().openInputStream(uri);\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();\n bmpFactoryOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap bmp = BitmapFactory.decodeStream(stream,null,bmpFactoryOptions);\n Utils.bitmapToMat(bmp, mTemplate);\n mTemplateGray = new Mat();\n Imgproc.cvtColor(mTemplate, mTemplateGray, Imgproc.COLOR_RGB2GRAY);\n\n /* setting up feature detectors */\n mDetector = FeatureDetector.create(FeatureDetector.ORB);\n mExtractor = DescriptorExtractor.create(DescriptorExtractor.ORB);\n mMatcher = DescriptorMatcher.create(DescriptorExtractor.ORB);\n\n /* detect key points */\n mKeyPoints = new MatOfKeyPoint();\n mDescriptor = new Mat();\n mDetector.detect(mTemplateGray, mKeyPoints);\n mExtractor.compute(mTemplateGray, mKeyPoints, mDescriptor);\n List<KeyPoint> listKeyPoint = mKeyPoints.toList();\n mArrayListTemplateKP = new ArrayList<>();\n for(int i = 0; i<listKeyPoint.size(); i++){\n mArrayListTemplateKP.add(listKeyPoint.get(i).pt);\n }\n mFrameKP = new MatOfPoint2f();\n mKpMat = new MatOfKeyPoint();\n\n /* setting up templates */\n Imgproc.resize(mTemplateGray, mTemplateGray, new Size(staticConfig.templateSize, staticConfig.templateSize));\n\n mTemplate90 = new Mat();\n Core.transpose(mTemplateGray, mTemplate90);\n Core.flip(mTemplate90, mTemplate90, 0);\n\n mTemplate180 = new Mat();\n Core.flip(mTemplateGray,mTemplate180,-1);\n\n mTemplate270 = new Mat();\n Core.flip(mTemplate90,mTemplate270,-1);\n\n /* options associated with rendering */\n mCameraCaliberation = new Mat(3,3,CvType.CV_32F);\n float data[] = {3284,0,(float) width/2,0,3284,(float) height/2,0,0,1};\n mCameraCaliberation.put(0,0,data);\n mRefCoord = new MatOfPoint3f();\n mRefBox = new MatOfPoint3f(new Point3(-50,-50,0),new Point3(-50,50,0),new Point3(50,50,0),new Point3(50,-50,0));\n mRVec = new Mat();\n mTVec = new Mat();\n mCaptureAreaAdjusted = new MatOfPoint2f();\n\n /* helper class */\n mXAxis = new visualisation();\n mXAxis.start = new Point3(0,0,0);\n mXAxis.end = new Point3(30,0,0);\n mXAxis.width = 3;\n mXAxis.color = new Scalar(155,55,55);\n\n mYAxis = new visualisation();\n mYAxis.start = new Point3(0,0,0);\n mYAxis.end = new Point3(0,30,0);\n mYAxis.width = 3;\n mYAxis.color = new Scalar(55,155,55);\n\n mZAxis = new visualisation();\n mZAxis.start = new Point3(0,0,0);\n mZAxis.end = new Point3(0,0,-30);\n mZAxis.width = 3;\n mZAxis.color = new Scalar(55,55,155);\n\n /* other misc settings */\n mScanCenter = new Point(width/2,height/2);\n mBoxCenter = new Point(width/2,height/2);\n mScanWidth = staticConfig.scanWidth;\n mRectBorder = new Scalar(200,200,50);\n mLostTrackCounter = 0;\n\n mMostRight = width;\n mMostBottom = height;\n\n adjustROI(mScanCenter,mDetectionBoxSize);\n\n /* init visualisation parameters */\n if(staticConfig.showMolecule){\n mMolecule = new ArrayList<>();\n Boolean flag1 = false,\n flag2 = false;\n File molFile = new File(getFilesDir()+\"/mol.mol\");\n try{\n BufferedReader reader = new BufferedReader(new FileReader(molFile));\n String line;\n while((line=reader.readLine())!=null){\n if(line.contains(\"END\")){\n break;\n }else if(flag2){\n\n }else if(flag1){\n if(line.replace(\" \",\"\").contains(\"000000000000\")) {\n visualisation newAtom = new visualisation();\n try{\n newAtom.initAtom(line);\n }catch (NumberFormatException e){\n /* if a double parsing error occurred */\n mMolecule = new ArrayList<>();\n boolean deleted = molFile.delete();\n if(deleted){\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. For the healthiness of the app, the mol file was deleted.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. The file was not able to be deleted somehow.\",Toast.LENGTH_LONG).show();\n }\n break;\n }\n mMolecule.add(newAtom);\n }else{\n flag2 = true;\n }\n }else if(line.contains(\"V2000\")){\n flag1 = true;\n }\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "public PanoramaConfig() {\n }", "public interface IViewConfiguration {\r\n\r\n\t/** Get the filter defining how to handle conditional directives */\r\n\tIViewFilter getViewFilter();\r\n\t\r\n\t/** Get the fixed macros (macro name or name=value).\r\n\t * This array should not change after creation since this\r\n\t * configuration is stored in a view.\r\n\t */\r\n\tCollection<IDefine> getMacros();\r\n\r\n\t/**\r\n\t * Get the configuration for the parser. This may differ based\r\n\t * on SDK (i.e. different include paths or different keywords, etc.)\r\n\t */\r\n\tIViewParserConfiguration getViewParserConfiguration();\r\n}", "private void setupCamera(int width, int height) {\n CameraManager cameraManager = (CameraManager) getSystemService(CAMERA_SERVICE);\n try {\n if (cameraManager == null) return;\n for (String cameraId : cameraManager.getCameraIdList()) {\n CameraCharacteristics cc = cameraManager.getCameraCharacteristics(cameraId);\n if (cc.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_BACK) {\n continue;\n }\n mCameraId = cameraId;\n\n int deviceOrientation = getWindowManager().getDefaultDisplay().getRotation();\n mTotalRotation = CameraUtils.calculateTotalRotation(cc, deviceOrientation);\n StreamConfigurationMap map = cc.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n\n int finalWidth = width;\n int finalHeight = height;\n boolean swapDimensions = mTotalRotation == 90 || mTotalRotation == 270;\n if (swapDimensions) {\n finalHeight = width;\n finalWidth = height;\n }\n mPreviewSize = CameraUtils.chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class), finalWidth, finalHeight);\n mVideoSize = CameraUtils.chooseOptimalSize(map.getOutputSizes(MediaRecorder.class), finalWidth, finalHeight);\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void createCameraSource() {\n Context ctx = getApplicationContext();\n Point displaySize = new Point();\n getWindowManager().getDefaultDisplay().getRealSize(displaySize);\n\n // dummy detector saving the last frame in order to send it to Microsoft in case of face detection\n ImageFetchingDetector imageFetchingDetector = new ImageFetchingDetector();\n\n // We need to provide at least one detector to the camera :x\n FaceDetector faceDetector = new FaceDetector.Builder(ctx).build();\n faceDetector.setProcessor(\n new LargestFaceFocusingProcessor.Builder(faceDetector, new FaceTracker(imageFetchingDetector))\n .build());\n\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(ctx).build();\n //barcodeDetector.setProcessor(new BarcodeDetectionProcessor());\n barcodeDetector.setProcessor(\n new FirstFocusingProcessor<Barcode>(barcodeDetector, new BarcodeTracker())\n );\n\n TextRecognizer textRecognizer = new TextRecognizer.Builder(ctx).build();\n textRecognizer.setProcessor(new OcrDetectionProcessor());\n // TODO: Check if the TextRecognizer is operational.\n\n MultiDetector multiDetector = new MultiDetector.Builder()\n .add(imageFetchingDetector)\n .add(faceDetector)\n .add(barcodeDetector)\n .add(textRecognizer)\n .build();\n\n mCameraSource = new CameraSource.Builder(ctx, multiDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setAutoFocusEnabled(true)\n .setRequestedFps(5.0f)\n .setRequestedPreviewSize(displaySize.y, displaySize.x)\n .build();\n }", "private void viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "private void onCameraModeChangedTo(int n) {\n Camera.Parameters parameters = this.mStateMachine.getCurrentCameraParameters(false);\n if (!(parameters != null && this.isHeadUpDesplayReady())) {\n return;\n }\n int n2 = parameters.getPreviewSize().width;\n int n3 = parameters.getPreviewSize().height;\n Rect rect = LayoutDependencyResolver.getSurfaceRect((Activity)this.mActivity, (float)n2 / (float)n3);\n PositionConverter.getInstance().setSurfaceSize(rect.width(), rect.height());\n PositionConverter.getInstance().setPreviewSize(n2, n3);\n this.mFocusRectangles.updateDevicePreviewSize(n2, n3);\n this.mFocusRectangles.clearExceptTouchFocus();\n switch (n) {\n default: {\n throw new IllegalArgumentException(\"ViewFinder.onCameraModeChangedTo():[INVALID]\");\n }\n case 1: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n break;\n }\n case 2: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_RECORDING);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n }\n }\n this.setOrientation(this.getOrientation());\n }", "public void prepareCamera() {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n autoFocusHandler = new Handler();\n mCamera = getCameraInstance();\n\n /* Instance barcode scanner */\n scanner = new ImageScanner();\n scanner.setConfig(0, Config.X_DENSITY, 3);\n scanner.setConfig(0, Config.Y_DENSITY, 3);\n\n mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);\n\n cameraPreview.addView(mPreview);\n\n }", "@Override\n\tpublic EngineOptions onCreateEngineOptions() {\n\t\t\n\t\t// Device properties & dimensions\n\t\tDisplay display = getWindowManager().getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tint width = size.x;\n\t\tint height = size.y;\n\t\t\n\t\tCAMERA_WIDTH = width;\n\t\tCAMERA_HEIGHT = height;\n\t\t\n\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\n\t\treturn new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t}", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "@Override\n public void onConfigured(CameraCaptureSession session) {\n mPreviewSession = session;\n updatePreview();\n }", "private void setupVideoConfig() {\n // In simple use cases, we only need to enable video capturing\n // and rendering once at the initialization step.\n // Note: audio recording and playing is enabled by default.\n mRtcEngine.enableVideo();\n\n // Please go to this page for detailed explanation\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af5f4de754e2c1f493096641c5c5c1d8f\n mRtcEngine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(\n VideoEncoderConfiguration.VD_640x360,\n VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_15,\n VideoEncoderConfiguration.STANDARD_BITRATE,\n VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT));\n }", "public VoxConfig getVoxConfig();", "@Override\n public Camera setupCamera() {\n mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);\n try {\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setPreviewSize(mWidth, mHeight);\n parameters.setPreviewFormat(mFormat);\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : parameters.getSupportedPreviewSizes()) {\n Log.d(TAG, \"SIZE:\" + size.width + \"x\" + size.height);\n }\n for (Integer format : parameters.getSupportedPreviewFormats()) {\n Log.d(TAG, \"FORMAT:\" + format);\n }\n\n List<int[]> fps = parameters.getSupportedPreviewFpsRange();\n for (int[] count : fps) {\n Log.d(TAG, \"T:\");\n for (int data : count) {\n Log.d(TAG, \"V=\" + data);\n }\n }\n mCamera.setParameters(parameters);\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (mCamera != null) {\n mWidth = mCamera.getParameters().getPreviewSize().width;\n mHeight = mCamera.getParameters().getPreviewSize().height;\n }\n return mCamera;\n }", "protected void createCameraPreview() {\n try {\n SurfaceTexture texture = mCameraTextureView.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(mImageDimension.getWidth(), mImageDimension.getHeight());\n Surface surface = new Surface(texture);\n mCaptureRequestBuilder = mCameraDevice.\n createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n mCaptureRequestBuilder.addTarget(surface);\n mCameraDevice.createCaptureSession(Collections.singletonList(surface),\n new CameraCaptureSession.StateCallback() {\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n //The camera is already closed\n if (null == mCameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n mCameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n Toast.makeText(CameraActivity.this, \"Configuration change\",\n Toast.LENGTH_SHORT).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public interface CameraSetting {\n}", "private void initCaptureSetting(GLSurfaceView preview, FrameLayout window, GLSurfaceView remote) {\n RTCMediaStreamingManager.init(getApplicationContext());\n\n /**\n * Step 2: find & init views\n */\n\n /**\n * Step 3: config camera settings\n */\n CameraStreamingSetting.CAMERA_FACING_ID facingId = chooseCameraFacingId();\n if (mCameraStreamingSetting == null) {\n mCameraStreamingSetting = new CameraStreamingSetting();\n }\n mCameraStreamingSetting.setCameraFacingId(facingId)\n .setContinuousFocusModeEnabled(true)\n .setRecordingHint(false)\n .setResetTouchFocusDelayInMs(3000)\n .setFocusMode(CameraStreamingSetting.FOCUS_MODE_CONTINUOUS_PICTURE)\n .setCameraPrvSizeLevel(CameraStreamingSetting.PREVIEW_SIZE_LEVEL.MEDIUM)\n .setCameraPrvSizeRatio(CameraStreamingSetting.PREVIEW_SIZE_RATIO.RATIO_16_9)\n .setBuiltInFaceBeautyEnabled(true) // Using sdk built in face beauty algorithm\n .setFaceBeautySetting(new CameraStreamingSetting.FaceBeautySetting(0.8f, 0.8f, 0.6f)) // sdk built in face beauty settings\n .setVideoFilter(CameraStreamingSetting.VIDEO_FILTER_TYPE.VIDEO_FILTER_BEAUTY); // set the beauty on/off\n mCurrentCamFacingIndex = facingId.ordinal();\n\n /**\n * Step 4: create streaming manager and set listeners\n */\n if (mRTCStreamingManager == null) {\n mRTCStreamingManager = new RTCMediaStreamingManager(getApplicationContext(),\n preview, AVCodecType.SW_VIDEO_WITH_SW_AUDIO_CODEC);\n mRTCStreamingManager.prepare(mCameraStreamingSetting, null);\n }\n mRTCStreamingManager.setConferenceStateListener(mRTCStreamingStateChangedListener);\n mRTCStreamingManager.setRemoteWindowEventListener(mRTCRemoteWindowEventListener);\n mRTCStreamingManager.setUserEventListener(mRTCUserEventListener);\n mRTCStreamingManager.setDebugLoggingEnabled(false);\n mRTCStreamingManager.mute(true);\n\n /**\n * Step 5: set conference options\n */\n RTCConferenceOptions confOptions = new RTCConferenceOptions();\n // vice anchor can use a smaller size\n // RATIO_4_3 & VIDEO_ENCODING_SIZE_HEIGHT_240 means the output size is 320 x 240\n // 4:3 looks better in the mix frame\n confOptions.setVideoEncodingSizeRatio(RTCConferenceOptions.VIDEO_ENCODING_SIZE_RATIO.RATIO_4_3);\n confOptions.setVideoEncodingSizeLevel(RTCConferenceOptions.VIDEO_ENCODING_SIZE_HEIGHT_240);\n // vice anchor can use a higher conference bitrate for better image quality\n confOptions.setVideoBitrateRange(300 * 1000, 800 * 1000);\n // 20 fps is enough\n confOptions.setVideoEncodingFps(20);\n confOptions.setHWCodecEnabled(false);\n mRTCStreamingManager.setConferenceOptions(confOptions);\n\n /**\n * Step 6: create the remote windows\n */\n if (mRTCVideoWindow == null) {\n mRTCVideoWindow = new RTCVideoWindow(window, remote);\n\n /**\n * Step 8: add the remote windows\n */\n mRTCStreamingManager.addRemoteWindow(mRTCVideoWindow);\n }\n\n /**\n * Step 9: do prepare, anchor should config streaming profile first\n */\n StreamingProfile mStreamingProfile = new StreamingProfile();\n mStreamingProfile.setEncodingOrientation(\n isLandscape() ? StreamingProfile.ENCODING_ORIENTATION.LAND : StreamingProfile.ENCODING_ORIENTATION.PORT);\n mRTCStreamingManager.setStreamingProfile(mStreamingProfile);\n }", "private void setupCameraOutputs(int width, int height) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" width: \" + width +\n \" height: \" + height);\n\n Activity activity = getActivity();\n CameraManager manager =\n (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE);\n Point displaySize = new Point();\n activity.getWindowManager().getDefaultDisplay().getSize(displaySize);\n int rotatedPreviewWidth = width;\n int rotatedPreviewHeight = height;\n int screenWidth = displaySize.x;\n int screenHeight = displaySize.y;\n // screenWidth: 720 screenHeight: 1280\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" screenWidth: \" + screenWidth +\n \" screenHeight: \" + screenHeight);\n\n try {\n for (String cameraId : manager.getCameraIdList()) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" cameraId: \" + cameraId);\n if (TextUtils.isEmpty(cameraId)) {\n continue;\n }\n\n mCameraId = cameraId;\n\n //获取某个相机(摄像头特性)\n CameraCharacteristics characteristics\n = manager.getCameraCharacteristics(cameraId);\n\n // 检查支持\n int deviceLevel = characteristics.get(\n CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);\n if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) {\n\n }\n\n // We don't use a front facing camera in this sample.\n Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);\n if (facing != null && facing == CameraCharacteristics.LENS_FACING_FRONT) {\n continue;\n }\n\n // 获取StreamConfigurationMap,它是管理摄像头支持的所有输出格式和尺寸\n StreamConfigurationMap map = characteristics.get(\n CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n if (map == null) {\n continue;\n }\n\n // 拍照时使用最大的宽高\n // For still image captures, we use the largest available size.\n Size largest = Collections.max(\n Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)),\n //Arrays.asList(map.getOutputSizes(TextureView.class)),// 不能这样使用\n new CompareSizesByArea());\n // ImageFormat.JPEG largest.getWidth(): 3264 largest.getHeight(): 2448\n // ImageFormat.YV12 largest.getWidth(): 960 largest.getHeight(): 720\n // ImageFormat.YUV_420_888 largest.getWidth(): 960 largest.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" largest.getWidth(): \" + largest.getWidth() +\n \" largest.getHeight(): \" + largest.getHeight());\n\n /***\n * 实时帧数据获取类\n * 由于获取实时帧所以选用YV12或者YUV_420_888两个格式,暂时不采用JPEG格式\n * 在真机显示的过程中,不同的数据格式所设置的width和height需要注意,否侧视频会很卡顿\n * YV12:width 720, height 960\n * YUV_420_888:width 720, height 960\n * JPEG:获取帧数据不能用 ImageFormat.JPEG 格式,否则你会发现预览非常卡的,\n * 因为渲染 JPEG 数据量过大,导致掉帧,所以预览帧请使用其他编码格式\n *\n * 输入相机的尺寸必须是相机支持的尺寸,这样画面才能不失真,TextureView输入相机的尺寸也是这个\n */\n /*mImageReader = ImageReader.newInstance(\n largest.getWidth(),\n largest.getHeight(),\n ImageFormat.YUV_420_888,\n *//*maxImages*//*5);// ImageFormat.JPEG, 2\n mImageReader.setOnImageAvailableListener(\n mOnImageAvailableListener,\n mBackgroundHandler);*/\n\n // Find out if we need to swap dimension to get the preview size relative to sensor\n // coordinate.\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n // noinspection ConstantConditions\n mSensorOrientation = characteristics.get(\n CameraCharacteristics.SENSOR_ORIENTATION);\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" displayRotation: \" + displayRotation +\n \" mSensorOrientation: \" + mSensorOrientation);\n boolean swappedDimensions = false;\n switch (displayRotation) {\n // 竖屏\n case Surface.ROTATION_0:\n case Surface.ROTATION_180:\n if (mSensorOrientation == 90 || mSensorOrientation == 270) {\n swappedDimensions = true;\n }\n break;\n // 横屏\n case Surface.ROTATION_90:\n case Surface.ROTATION_270:\n if (mSensorOrientation == 0 || mSensorOrientation == 180) {\n swappedDimensions = true;\n }\n break;\n default:\n Log.e(TAG, \"Display rotation is invalid: \" + displayRotation);\n break;\n }\n\n if (swappedDimensions) {\n rotatedPreviewWidth = height;\n rotatedPreviewHeight = width;\n screenWidth = displaySize.y;\n screenHeight = displaySize.x;\n }\n\n if (screenWidth > MAX_PREVIEW_WIDTH) {\n screenWidth = MAX_PREVIEW_WIDTH;\n }\n\n if (screenHeight > MAX_PREVIEW_HEIGHT) {\n screenHeight = MAX_PREVIEW_HEIGHT;\n }\n\n // Danger, W.R.! Attempting to use too large a preview size could exceed the camera\n // bus' bandwidth limitation, resulting in gorgeous previews but the storage of\n // garbage capture data.\n mPreviewSize = chooseOptimalSize(\n map.getOutputSizes(SurfaceTexture.class),\n rotatedPreviewWidth,\n rotatedPreviewHeight,\n screenWidth,\n screenHeight,\n largest);\n // mPreviewSize.getWidth(): 960 mPreviewSize.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" mPreviewSize.getWidth(): \" + mPreviewSize.getWidth() +\n \" mPreviewSize.getHeight(): \" + mPreviewSize.getHeight());\n\n // We fit the aspect ratio of TextureView to the size of preview we picked.\n int orientation = getResources().getConfiguration().orientation;\n // 横屏\n if (orientation == Configuration.ORIENTATION_LANDSCAPE) {\n mTextureView.setAspectRatio(\n mPreviewSize.getWidth(), mPreviewSize.getHeight());\n } else {\n mTextureView.setAspectRatio(\n mPreviewSize.getHeight(), mPreviewSize.getWidth());\n }\n\n // Check if the flash is supported.\n Boolean available = characteristics.get(\n CameraCharacteristics.FLASH_INFO_AVAILABLE);\n mFlashSupported = available == null ? false : available;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n // Currently an NPE is thrown when the Camera2API is used but not supported on the\n // device this code runs.\n Camera2Fragment.ErrorDialog.newInstance(getString(R.string.camera_error))\n .show(getChildFragmentManager(), FRAGMENT_DIALOG);\n }\n }", "public static boolean readCameraConfig(JsonObject config) {\n CameraConfig cam = new CameraConfig();\n\n // name\n JsonElement nameElement = config.get(\"name\");\n if (nameElement == null) {\n parseError(\"could not read camera name\");\n return false;\n }\n cam.name = nameElement.getAsString();\n\n // path\n JsonElement pathElement = config.get(\"path\");\n if (pathElement == null) {\n parseError(\"camera '\" + cam.name + \"': could not read path\");\n return false;\n }\n cam.path = pathElement.getAsString();\n\n // stream properties\n cam.streamConfig = config.get(\"stream\");\n\n cam.config = config;\n\n cameraConfigs.add(cam);\n return true;\n }", "public void onCameraViewStarted(int width, int height) {\n m_lastOutput = new Mat(height, width, CvType.CV_8UC4);\n\n m_draw = new Mat(height, width, CvType.CV_8UC4);\n\n m_gray = new Mat(height, width, CvType.CV_8UC1);\n\n\n // area detection size mat\n calculateDetectArea(width, height);\n m_sub_draw = new Mat(m_draw, r_detectArea);\n m_sub_gray = new Mat(m_gray, r_detectArea);\n\n m_gui_area = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n createGuiSdk();\n\n m_AT_finished = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_AT_pending = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_sdk = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n\n at_findSdk = new AT_findSdk();\n\n\n sdkFound = false;\n outputChoice = false;\n }", "static JPanel createConfigPanel(Viewer viewer,\r\n SelectionModel<Point2D> selectionModel,\r\n SelectionHandler<Point2D> lassoSelectionHandler,\r\n SelectionHandler<Point2D> rectangleSelectionHandler)\r\n {\r\n JPanel configPanel = new JPanel(new BorderLayout());\r\n \r\n JPanel controlPanel = new JPanel(new GridLayout(0,1));\r\n \r\n JCheckBox lassoCheckBox = \r\n new JCheckBox(\"Lasso\", true);\r\n lassoCheckBox.addActionListener(e -> \r\n {\r\n lassoSelectionHandler.disconnect();\r\n rectangleSelectionHandler.disconnect();\r\n if (lassoCheckBox.isSelected())\r\n {\r\n lassoSelectionHandler.connect(viewer, selectionModel);\r\n }\r\n else\r\n {\r\n rectangleSelectionHandler.connect(viewer, selectionModel);\r\n }\r\n });\r\n controlPanel.add(lassoCheckBox);\r\n \r\n JButton setDisplayedWorldAreaButton = \r\n new JButton(\"Reset displayed world area\");\r\n setDisplayedWorldAreaButton.addActionListener(\r\n e -> viewer.setDisplayedWorldArea(\r\n new Rectangle2D.Double(-0.1, -0.1, 1.2, 1.2)));\r\n controlPanel.add(setDisplayedWorldAreaButton);\r\n \r\n JButton resetTransformButton = \r\n new JButton(\"Reset transform\");\r\n resetTransformButton.addActionListener(\r\n e -> viewer.resetTransform());\r\n controlPanel.add(resetTransformButton);\r\n \r\n configPanel.add(controlPanel, BorderLayout.NORTH);\r\n \r\n return configPanel;\r\n }", "private void setCameraParameters() {\n mParameters = mCameraDevice.getParameters();\n\n// Camera.Size previewSize = getDefaultPreviewSize(mParameters);\n//\n// //获取计算过的摄像头分辨率\n// if(previewSize != null ){\n// mPreviewWidth = previewSize.width;\n// mPreviewHeight = previewSize.height;\n// } else {\n// mPreviewWidth = 480;\n// mPreviewHeight = 480;\n// }\n// mParameters.setPreviewSize(mPreviewWidth, mPreviewHeight);\n// //将获得的Preview Size中的最小边作为视频的大小\n// mVideoWidth = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// mVideoHeight = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// if(mFFmpegFrameRecorder != null) {\n// mFFmpegFrameRecorder.setImageWidth(mVideoWidth);\n// mFFmpegFrameRecorder.setImageHeight(mVideoHeight);\n// }\n//\n// mParameters.setPreviewFrameRate(mPreviewFrameRate);\n\n List<String> supportedFocusMode = mParameters.getSupportedFocusModes();\n if(isSupported(Camera.Parameters.FOCUS_MODE_AUTO, supportedFocusMode)) {\n mParameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n }\n\n\n mCameraDevice.setParameters(mParameters);\n\n // 设置闪光灯,默认关闭\n setVideoFlash(false);\n\n //是否支持打开/关闭闪光灯\n mSettingWindow.setFlashEnabled(isSupportedVideoFlash());\n\n mTBtnFocus.setEnabled(isSupportedFocus());\n\n layoutPreView();\n }", "private void setupCamera(int width, int height) {\n CameraManager cameraManager = (CameraManager) mActivity.getSystemService(Context.CAMERA_SERVICE);\n\n if (cameraManager == null) {\n return;\n }\n\n try {\n for (String cameraId : cameraManager.getCameraIdList()) {\n // get camera characteristics\n CameraCharacteristics cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId);\n\n Integer currentCameraId = cameraCharacteristics.get(CameraCharacteristics.LENS_FACING);\n if (currentCameraId == null) {\n // The return value of that key could be null if the field is not set.\n return;\n }\n if (currentCameraId != mRokidCameraParamCameraId.getParam()) {\n // if not desired Camera ID, skip\n continue;\n }\n int deviceOrientation = mActivity.getWindowManager().getDefaultDisplay().getRotation();\n mTotalRotation = CameraDeviceUtils.sensorToDeviceRotation(cameraCharacteristics, deviceOrientation, ORIENTATIONS);\n\n mImageReader = ImageReader.newInstance(mSizeImageReader.getSize().getWidth(), mSizeImageReader.getSize().getHeight(), mImageFormat, mMaxImages);\n mImageReader.setOnImageAvailableListener(mOnImageAvailableListener, mBackgroundHandler);\n\n // Check if auto focus is supported\n int[] afAvailableModes = cameraCharacteristics.get(\n CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);\n if (afAvailableModes.length == 0 ||\n (afAvailableModes.length == 1\n && afAvailableModes[0] == CameraMetadata.CONTROL_AF_MODE_OFF)) {\n mAutoFocusSupported = false;\n } else {\n mAutoFocusSupported = true;\n }\n\n mCameraId = cameraId;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "protected void createCameraPreview() {\n try {\n SurfaceTexture texture = textureView.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(imageDimension.getWidth(), imageDimension.getHeight());\n Surface surface = new Surface(texture);\n captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n captureRequestBuilder.addTarget(surface);\n cameraDevice.createCaptureSession(Collections.singletonList(surface), new CameraCaptureSession.StateCallback(){\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n Toast.makeText(MainActivity.this, \"Configuration change\", Toast.LENGTH_SHORT).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n Toast.makeText(MainActivity.this, \"Camera Surface failed to load.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }", "private @Nonnull Map<String, Configuration> generateVxlanConfigs() {\n NetworkFactory nf = new NetworkFactory();\n Configuration.Builder cb =\n nf.configurationBuilder().setConfigurationFormat(ConfigurationFormat.CISCO_IOS);\n _s1 = cb.setHostname(S1_NAME).build();\n _s2 = cb.setHostname(S2_NAME).build();\n _h1 = cb.setHostname(H1_NAME).build();\n _h2 = cb.setHostname(H2_NAME).build();\n Vrf.Builder vb = nf.vrfBuilder().setName(Configuration.DEFAULT_VRF_NAME);\n Vrf h1Vrf = vb.setOwner(_h1).build();\n Vrf h2Vrf = vb.setOwner(_h2).build();\n Vrf s1Vrf = vb.setOwner(_s1).build();\n Vrf s2Vrf = vb.setOwner(_s2).build();\n Interface.Builder l3Builder =\n Interface.builder().setType(InterfaceType.PHYSICAL).setActive(true);\n l3Builder.setName(E1_NAME).setAddresses(H1_ADDRESS).setOwner(_h1).setVrf(h1Vrf).build();\n l3Builder.setName(E2_NAME).setAddresses(H2_ADDRESS).setOwner(_h2).setVrf(h2Vrf).build();\n l3Builder.setName(E12_NAME).setAddresses(S1_ADDRESS).setOwner(_s1).setVrf(s1Vrf).build();\n l3Builder.setName(E21_NAME).setAddresses(S2_ADDRESS).setOwner(_s2).setVrf(s2Vrf).build();\n Interface.Builder l2Builder =\n Interface.builder()\n .setType(InterfaceType.PHYSICAL)\n .setActive(true)\n .setAccessVlan(VLAN)\n .setSwitchport(true)\n .setSwitchportMode(SwitchportMode.ACCESS);\n l2Builder.setName(SWP1_NAME).setOwner(_s1).setVrf(s1Vrf).build();\n l2Builder.setName(SWP2_NAME).setOwner(_s2).setVrf(s2Vrf).build();\n\n VniSettings.Builder vsb =\n VniSettings.builder()\n .setBumTransportMethod(BumTransportMethod.UNICAST_FLOOD_GROUP)\n .setUdpPort(UDP_PORT)\n .setVlan(VLAN)\n .setVni(VNI);\n s1Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S2_ADDRESS.getIp()))\n .setSourceAddress(S1_ADDRESS.getIp())\n .build());\n s2Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S1_ADDRESS.getIp()))\n .setSourceAddress(S2_ADDRESS.getIp())\n .build());\n return ImmutableMap.of(H1_NAME, _h1, H2_NAME, _h2, S1_NAME, _s1, S2_NAME, _s2);\n }", "@Override\n public void onConfigured(\n CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n\n // When the session is ready, we start displaying the preview.\n mCaptureSession = cameraCaptureSession;\n\n try {\n // 自动对焦\n // Auto focus should be continuous for camera preview.\n mPreviewRequestBuilder.set(\n CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n\n // Flash is automatically enabled when necessary.\n setAutoFlash(mPreviewRequestBuilder);\n\n // Finally, we start displaying the camera preview.\n mPreviewRequest = mPreviewRequestBuilder.build();\n mCaptureSession.setRepeatingRequest(\n mPreviewRequest,\n // 如果想要拍照,那么绝不能设置为null\n // 如果单纯预览,那么可以设置为null\n mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public interface CamAPI {\n\n\n public String getPath();\n\n public String up();\n\n public String left();\n\n public String right();\n\n public String down();\n\n public String center();\n\n public String img();\n\n\n}", "private void createCameraSource(String model) {\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay, graphicOverlay2);\n }\n\n try {\n switch (model) {\n case POSE_DETECTION:\n PoseDetectorOptionsBase poseDetectorOptions =\n PreferenceUtils.getPoseDetectorOptionsForLivePreview(this);\n Log.i(TAG, \"Using Pose Detector with options \" + poseDetectorOptions);\n boolean shouldShowInFrameLikelihood =\n PreferenceUtils.shouldShowPoseDetectionInFrameLikelihoodLivePreview(this);\n boolean visualizeZ = PreferenceUtils.shouldPoseDetectionVisualizeZ(this);\n boolean rescaleZ = PreferenceUtils.shouldPoseDetectionRescaleZForVisualization(this);\n boolean runClassification = PreferenceUtils.shouldPoseDetectionRunClassification(this);\n\n\n PoseDetectorProcessor poseDetectorProcessor = new PoseDetectorProcessor(\n this, poseDetectorOptions, shouldShowInFrameLikelihood, visualizeZ, rescaleZ,\n runClassification, /* isStreamMode = */true);\n\n cameraSource.setMachineLearningFrameProcessor(poseDetectorProcessor);\n poseDetectorProcessor.cameraSource = cameraSource;\n\n break;\n default:\n Log.e(TAG, \"Unknown model: \" + model);\n }\n } catch (RuntimeException e) {\n Log.e(TAG, \"Can not create image processor: \" + model, e);\n Toast.makeText(\n getApplicationContext(),\n \"Can not create image processor: \" + e.getMessage(),\n Toast.LENGTH_LONG)\n .show();\n }\n }", "private static Configuration getConfig() {\n Configuration vgConfig = new Configuration();\n vgConfig.addBrowser(1200, 800, BrowserType.CHROME);\n vgConfig.addBrowser(1200, 800, BrowserType.FIREFOX);\n vgConfig.addBrowser(1200, 800, BrowserType.EDGE);\n vgConfig.addBrowser(1200, 800, BrowserType.SAFARI);\n vgConfig.addDeviceEmulation(DeviceName.iPhone_X, ScreenOrientation.PORTRAIT);\n return vgConfig;\n }", "public void configure(T aView) { aView.setPrefSize(110,20); }", "@Override\n public void configViews() {\n\n ImageView view = findViewById(R.id.iv);\n GlideUrl cookie = new GlideUrl(\"http://images.dmzj.com/tuijian/320_170/170623yinglingtj2.jpg\", new LazyHeaders.Builder()\n .addHeader(\"Referer\", Constant.IMG_BASE_URL)\n .addHeader(\"Accept-Encoding\",\"gzip\").build());\n// Glide.with(this).load(cookie)\n// .placeholder(R.mipmap.ic_launcher)\n// .error(R.drawable.a)\n// .transform(new GlideRoundTransform(this,6))\n// .into(view);\n\n// MultiTransformation multi = new MultiTransformation(\n// new RoundedCornersTransformation(20, 0));\n float density = getResources().getDisplayMetrics().density;\n Log.e(\"density\",\"density\"+density);\n RoundedCornersTransformation roundedCornersTransformation =\n new RoundedCornersTransformation((int) (density*20), 0);\n// Glide.with(this).loadOptions.bitmapTransform(roundedCornersTransformation))\n// .into(view);(cookie)\n// .apply(Request\n//\n DeviceUtils.printDisplayInfo(this);\n\n Glide.with(this).load(cookie)\n .apply((RequestOptions.bitmapTransform(roundedCornersTransformation)))\n .into(image01);\n Glide.with(this).load(cookie)\n .into(image02);\n }", "IViewParserConfiguration getViewParserConfiguration();", "public interface CameraPreview {\n\n /**\n * Set the camera system this will act as the preview for.\n * <p/>\n * The preview will update the camera system as necessary for certain events, such as\n * setting the surface holder, or pausing/restarting the preview when reconfiguring the surface.\n *\n * @param cameraSystem the camera system to connect to\n */\n void connectToCameraSystem(@NonNull CameraSystem cameraSystem);\n\n}", "@Override\n public void onCameraViewStarted(int width, int height) {\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mRgbaF = new Mat(width, height, CvType.CV_8UC4);\n mRgbaT = new Mat(width, height, CvType.CV_8UC4);\n Log.i(TAG, \"height : \" + height);\n Log.i(TAG, \"width : \" + width);\n //Log.i(TAG, \"mOpenCvCameraView size (w,h):\" + mOpenCvCameraView.getWidth() + \" - \" + mOpenCvCameraView.getHeight());\n }", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n // Auto focus should be continuous for camera preview.\n mCaptureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n\n // Finally, we start displaying the camera preview.\n mPreviewRequest = mCaptureRequestBuilder.build();\n mPreviewCaptureSession = cameraCaptureSession;\n\n // preview is a video, so we set a repeating request\n try {\n mPreviewCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), mPreviewCaptureCallback, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void updateViewConfig() {\n boolean newView = false;\n\n // Check if our view is right for the current mode\n int mode = getMode();\n boolean isCurrentViewShortcut = mCurrentView instanceof ShortcutView;\n Set<SliceItem> loadingActions = mCurrentView.getLoadingActions();\n if (mode == MODE_SHORTCUT && !isCurrentViewShortcut) {\n removeView(mCurrentView);\n mCurrentView = new ShortcutView(getContext());\n addView(mCurrentView, getChildLp(mCurrentView));\n newView = true;\n } else if (mode != MODE_SHORTCUT && isCurrentViewShortcut) {\n removeView(mCurrentView);\n mCurrentView = new TemplateView(getContext());\n addView(mCurrentView, getChildLp(mCurrentView));\n newView = true;\n }\n\n // If the view changes we should apply any configurations to it\n if (newView) {\n mCurrentView.setPolicy(mViewPolicy);\n applyConfigurations();\n if (mListContent != null && mListContent.isValid()) {\n mCurrentView.setSliceContent(mListContent);\n }\n mCurrentView.setLoadingActions(loadingActions);\n }\n updateActions();\n }", "@FXML\n /**\n * use initialize method to get the metadata of the image file and set the metadata properties on the UI display\n */\n public void initialize() {\n messaging.onMessage(MessageObject.SubjectEnum.ImageIdToShow, (file) -> {\n\n if (this.imageViewContainer == null) {\n return;\n }\n\n //get image and restrict the maximum width to 400\n Image image = ImageUtil.getImageFromFile((File) file);\n //get imageView and set its width and height\n ImageView imageView = ImageUtil.getImageViewByImage(image, \"\", 400, 400);\n //clear the HBox imageViewContainer\n this.imageViewContainer.getChildren().clear();\n //add imageView to the HBox imageViewContainer\n this.imageViewContainer.getChildren().add(\n imageView\n );\n //set an hgrow constraint on the imageView\n this.imageViewContainer.setHgrow(imageView, Priority.NEVER);\n //get metadata from the image file\n Metadata metadata = null;\n try {\n metadata = ImageMetadataReader.readMetadata((File) file);\n } catch (ImageProcessingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //get the width and height of the image\n int width = (int)image.getWidth();\n int height = (int)image.getHeight();\n //set text of Label width and height on the UI display\n this.width.setText(\"\" + width);\n this.height.setText(\"\" + height);\n //get ExifIFD0Directory from metadata\n ExifIFD0Directory exifIFD0Directory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class);\n //initialize make and model of camera\n String NA = MsIsConstant.NAPlaceholder;\n String make = NA;\n String model = NA;\n if (exifIFD0Directory != null) {\n //get the value of make and model properties\n make = exifIFD0Directory.getString(ExifIFD0Directory.TAG_MAKE);\n model = exifIFD0Directory.getString(ExifIFD0Directory.TAG_MODEL);\n if (make == null || model == null) {\n make = NA;\n model = NA;\n }\n }\n //set text of Label make and model of camera on the UI display\n this.cameraMakeAndModel.setText(String.format(\"%s, %s\", make, model));\n\n GpsDirectory gpsDirectory = metadata.getFirstDirectoryOfType(GpsDirectory.class);\n showGeo(gpsDirectory);\n\n });\n }", "public void configure(T aView) { }", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "void setConfiguration();", "protected void setupCameraAndPreview() {\n\n //\n // always release\n //\n releaseImageObjects();\n releaseVideoCapturebjects(true);\n\n // now setup...\n if (isImageButtonSelected) {\n\n //\n // Image Camera can be fetched here\n //\n if (!isBackCameraSelected) {\n mCamera = getCameraInstance(frontCamera);\n } else {\n mCamera = getCameraInstance(backCamera);\n }\n\n if (mImageCapture == null) {\n // Initiate MImageCapture\n mImageCapture = new MImageCapture(MCameraActivity.this);\n }\n\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mImageCapture.mCameraPreview == null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n mImageCapture.setCameraPreview(this, mCamera);\n previewView.addView(mImageCapture.mCameraPreview);\n }\n } else {\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n /** handle video here... */\n if (mVideoCapture == null) {\n // now start over\n mVideoCapture = new MVideoCapture(this);\n }\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mVideoCapture.mTextureView != null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n previewView.addView(mVideoCapture.mTextureView);\n }\n }\n\n }", "public void init(ViewConfigData config) {\n\r\n this.viewConfig = config;\r\n\r\n /* fill the ontologyMap\r\n String ontologyMapFile = viewConfig.getOntologyMap(); */\r\n\r\n /* try {\r\n ontologyMapStore.parse(ontologyMapFile, false);\r\n } catch (FileNotFoundException e) {\r\n throw new ConfigurationException(\r\n \"FileNotFoundException for the ontology map file: \"\r\n + ontologyMapFile, e);\r\n } catch (IOException e) {\r\n throw new ConfigurationException(\r\n \"IOException while trying to parse the ontology map file: \"\r\n + ontologyMapFile, e);\r\n } */\r\n\r\n //fill the schemaMap\r\n String schemaMapFile = viewConfig.getSchemaMap();\r\n try {\r\n schemaMapStore.parse(schemaMapFile, false);\r\n } catch (FileNotFoundException e) {\r\n throw new ConfigurationException(\r\n \"FileNotFoundException for the schema map file: \"\r\n + schemaMapFile, e);\r\n } catch (IOException e) {\r\n throw new ConfigurationException(\r\n \"ConfigurationException for the schema map file: \"\r\n + schemaMapFile, e);\r\n }\r\n\r\n //build the DTree. It also fills the ontologyStore\r\n dTree = buildDTree();\r\n \r\n //build the hash table for ont map properites\r\n String ontMappropertiesFilePath = viewConfig.getOntMapProperties();\r\n ReadPropFile.loadToHashTableFromOntmapPropertiesFile(ontMappropertiesFilePath); \r\n \r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n setContentView(R.layout.main);\n cameraframe = (FrameLayout) findViewById(R.id.preview);\n overlayview = new ImageView(getApplicationContext());\n\t overlayview.setScaleType(ImageView.ScaleType.FIT_XY);\n\n previewing=false;\n freestyle=false;\n \n\t// set up camera, start button\n cameraView = new Preview(this); // <3>\n\n\t cameraframe.addView(cameraView,0); // <4>\n\n\t \n\t\n\t\n\t setupButtons();\n initCamera();\n \n \n\t\n\t\n\t\n \n\tloadFrames();\n\t initFileSystem();\n\t \n //retakeButton.setEnabled(false);\n\t toggleMode();\n \n Log.d(TAG, \"Fully initialized\");\n }", "private void newConfiguration() {\n checkSave();\n config = new Configuration();\n\n // create a ConfigurationDialog\n ConfigurationDialog cdialog = new ConfigurationDialog(frame, NEW, config, getConfigurations());\n cdialog.pack();\n cdialog.setLocationRelativeTo(frame);\n cdialog.setVisible(true);\n\n // if the data is valid, create an ImageDialog to allow registration of the image\n if (cdialog.isDataValid()) {\n System.out.println(\"config name: \"+config.getName());\n if (config.useBlankImage()) {\n System.out.println(\"blank image: \"+config.getImageHeight()+\" x \"+config.getImageWidth());\n }\n else {\n System.out.println(\"image name: \"+addSlashes(config.getImageName()));\n config.setImageName(addSlashes(config.getImageName()));\n }\n\n ImageDialog idialog = new ImageDialog(frame, NEW, config);\n idialog.pack();\n idialog.setLocationRelativeTo(frame);\n idialog.setVisible(true); \n\n // if the ImageDialog data is valid, create a blank motes object and calls viewConfiguration\n if (idialog.isDataValid()) {\n System.out.println(\"minPixelX: \"+config.getMinimumPixelX());\n System.out.println(\"minPixelY: \"+config.getMinimumPixelY());\n System.out.println(\"maxPixelX: \"+config.getMaximumPixelX());\n System.out.println(\"maxPixelY: \"+config.getMaximumPixelY());\n System.out.println(\"minRealX: \"+config.getMinimumRealX());\n System.out.println(\"minRealY: \"+config.getMinimumRealY());\n System.out.println(\"maxRealX: \"+config.getMaximumRealX());\n System.out.println(\"maxRealY: \"+config.getMaximumRealY());\n config.notSaved();\n configSave.setEnabled(true);\n configClose.setEnabled(true);\n motes = new Motes();\n viewConfiguration(DEFAULT_DB_CONFIG_TABLE);\n }\n else {\n config = new Configuration();\n }\n }\n }", "public ViewConfiguration invoke() {\n return ViewConfiguration.get(this.f64333a);\n }", "public CameraPanel() {\n initComponents();\n jLabel1.setText(\"<html>Select Camera one<br>by one & press<br>Capture Button.\");\n System.loadLibrary(\"opencv_java330\"); \n facedetector = new CascadeClassifier(\"haarcascade_frontalface_alt.xml\");\n facedetections = new MatOfRect();\n \n }", "Camera getCamera();", "private void configureScene() {\n uiController.setTitle(resources.getString(\"Launch\"));\n BorderPane sp = new BorderPane();\n this.fileLoadButton = new Button();\n sp.setCenter(fileLoadButton);\n sp.setTop(createSettings());\n fileLoadButton.setText(resources.getString(\"LoadSimulationXML\"));\n fileLoadButton.setOnAction(event -> uiController.loadNewSimulation());\n sp.setPrefWidth(width);\n sp.setPrefHeight(height);\n renderNode(sp);\n }", "void initializeCamera() {\n camera_linear = (LinearLayout) findViewById(R.id.camera_linear);\n //The preview frame is overlayed on the layout which shows the camera view.\n preview = (FrameLayout) findViewById(R.id.camera_preview);\n //Get an instance of the phone's camera.\n mCamera = cameraRecorder.getCameraInstance();\n //Find content fort the camera preview frame using the instance of the camera initialized.\n mPreview = new CameraPreview(getApplicationContext(), mCamera);\n //Apply the camera previes content from the camera to the preview frame itself.\n preview.addView(mPreview);\n }", "private void createCameraSource() {\n\n int facing = CameraSource.CAMERA_FACING_FRONT;\n\n // If there's no existing cameraSource, create one.\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay);\n }\n\n CameraSource.setFacing(facing);\n cameraSource.setMachineLearningFrameProcessor(\n new FaceDetectorProcessor(this, defaultOptions));\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera getCamera(int index);", "Viewpoint createViewpoint();", "public CameraSet(Controls controls, String devpath1, String devpath2) {\n this.controls = controls;\n this.cam1 = CameraServer.getInstance().startAutomaticCapture(\"Back\", devpath2);\n this.cam2 = CameraServer.getInstance().startAutomaticCapture(\"Front\", devpath1);\n\n// cam1.setResolution((int) (this.multiplier * 160), (int) (this.multiplier * 120));\n// cam2.setResolution((int) (this.multiplier * 160), (int) (this.multiplier * 120));\n\n outputStream = CameraServer.getInstance().putVideo(\"camera_set\", (int) (multiplier * 160), (int) (multiplier * 120));\n source = new Mat();\n\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n CameraServer.getInstance().startAutomaticCapture().setResolution(320, 240);\n }", "private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }", "private void openCamera(int desiredWidth, int desiredHeight) {\n if (mCamera != null) {\n throw new RuntimeException(\"camera already initialized\");\n }\n\n android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();\n\n // Try to find a front-facing camera (e.g. for videoconferencing).\n int numCameras = android.hardware.Camera.getNumberOfCameras();\n for (int i = 0; i < numCameras; i++) {\n android.hardware.Camera.getCameraInfo(i, info);\n if (info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK) {\n mCamera = android.hardware.Camera.open(i);\n break;\n }\n }\n if (mCamera == null) {\n// Log.d(TAG, \"No front-facing camera found; opening default\");\n mCamera = android.hardware.Camera.open(); // opens first back-facing camera\n }\n if (mCamera == null) {\n throw new RuntimeException(\"Unable to open camera\");\n }\n\n android.hardware.Camera.Parameters parms = mCamera.getParameters();\n\n CameraUtils.choosePreviewSize(parms, desiredWidth, desiredHeight);\n\n // Give the camera a hint that we're recording video. This can have a big\n // impact on frame rate.\n parms.setRecordingHint(true);\n\n // leave the frame rate set to default\n mCamera.setParameters(parms);\n\n int[] fpsRange = new int[2];\n android.hardware.Camera.Size mCameraPreviewSize = parms.getPreviewSize();\n parms.getPreviewFpsRange(fpsRange);\n String previewFacts = mCameraPreviewSize.width + \"x\" + mCameraPreviewSize.height;\n if (fpsRange[0] == fpsRange[1]) {\n previewFacts += \" @\" + (fpsRange[0] / 1000.0) + \"fps\";\n } else {\n previewFacts += \" @[\" + (fpsRange[0] / 1000.0) +\n \" - \" + (fpsRange[1] / 1000.0) + \"] fps\";\n }\n// TextView text = (TextView) findViewById(R.id.cameraParams_text);\n// text.setText(previewFacts);\n\n mCameraPreviewWidth = mCameraPreviewSize.width;\n mCameraPreviewHeight = mCameraPreviewSize.height;\n\n\n// AspectFrameLayout layout = (AspectFrameLayout) findViewById(R.id.cameraPreview_afl);\n\n Display display = ((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay();\n\n if(display.getRotation() == Surface.ROTATION_0) {\n mCamera.setDisplayOrientation(90);\n// layout.setAspectRatio((double) mCameraPreviewHeight / mCameraPreviewWidth);\n } else if(display.getRotation() == Surface.ROTATION_270) {\n// layout.setAspectRatio((double) mCameraPreviewHeight/ mCameraPreviewWidth);\n mCamera.setDisplayOrientation(180);\n } else {\n // Set the preview aspect ratio.\n// layout.setAspectRatio((double) mCameraPreviewWidth / mCameraPreviewHeight);\n }\n }", "public void adjustCameraParameters() {\n SortedSet<Size> sizes = this.mPreviewSizes.sizes(this.mAspectRatio);\n if (sizes == null) {\n this.mAspectRatio = chooseAspectRatio();\n sizes = this.mPreviewSizes.sizes(this.mAspectRatio);\n }\n Size chooseOptimalSize = chooseOptimalSize(sizes);\n Size last = this.mPictureSizes.sizes(this.mAspectRatio).last();\n if (this.mShowingPreview) {\n this.mCamera.stopPreview();\n }\n this.mCameraParameters.setPreviewSize(chooseOptimalSize.getWidth(), chooseOptimalSize.getHeight());\n this.mCameraParameters.setPictureSize(last.getWidth(), last.getHeight());\n this.mCameraParameters.setRotation(calcCameraRotation(this.mDisplayOrientation));\n setAutoFocusInternal(this.mAutoFocus);\n setFlashInternal(this.mFlash);\n this.mCamera.setParameters(this.mCameraParameters);\n if (this.mShowingPreview) {\n this.mCamera.startPreview();\n }\n }", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n mCameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }", "public void getCameraInstance() {\n newOpenCamera();\n }", "public void updateParametersPictureSize() {\n if (this.mCameraDevice == null) {\n Log.w(TAG, \"attempting to set picture size without camera device\");\n return;\n }\n String pictureSizeKey;\n this.mCameraSettings.setSizesLocked(false);\n SettingsManager settingsManager = this.mActivity.getSettingsManager();\n if (isCameraFrontFacing()) {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_FRONT;\n } else {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_BACK;\n }\n String pictureSize = settingsManager.getString(SettingsManager.SCOPE_GLOBAL, pictureSizeKey, SettingsUtil.getDefaultPictureSize(isCameraFrontFacing()));\n Size size = new Size(960, MotionPictureHelper.FRAME_HEIGHT_9);\n if (isDepthEnabled()) {\n size = SettingsUtil.getBokehPhotoSize(this.mActivity, pictureSize);\n } else {\n size = SettingsUtil.sizeFromString(pictureSize);\n }\n this.mCameraSettings.setPhotoSize(size);\n if (ApiHelper.IS_NEXUS_5) {\n if (ResolutionUtil.NEXUS_5_LARGE_16_BY_9.equals(pictureSize)) {\n this.mShouldResizeTo16x9 = true;\n } else {\n this.mShouldResizeTo16x9 = false;\n }\n }\n if (size != null) {\n Size optimalSize;\n Tag tag;\n Size optimalSize2 = CameraUtil.getOptimalPreviewSize(this.mActivity, this.mCameraCapabilities.getSupportedPreviewSizes(), ((double) size.width()) / ((double) size.height()));\n Size original = this.mCameraSettings.getCurrentPreviewSize();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Photo module Set preview size \");\n stringBuilder.append(size);\n stringBuilder.append(\" calculate size \");\n stringBuilder.append(optimalSize2);\n stringBuilder.append(\" original size \");\n stringBuilder.append(original);\n android.util.Log.e(\"===++++++=====\", stringBuilder.toString());\n if (isDepthEnabled()) {\n optimalSize = SettingsUtil.getBokehPreviewSize(pictureSize, false);\n } else {\n if ((size.width() == 4160 && size.height() == 1970) || (size.width() == 3264 && size.height() == 1546)) {\n optimalSize2 = new Size(1440, MotionPictureHelper.FRAME_HEIGHT_9);\n }\n optimalSize = optimalSize2;\n this.mActivity.getCameraAppUI().setSurfaceHeight(optimalSize.height());\n this.mActivity.getCameraAppUI().setSurfaceWidth(optimalSize.width());\n }\n this.mUI.setCaptureSize(optimalSize);\n Log.w(TAG, String.format(\"KPI original size is %s, optimal size is %s\", new Object[]{original.toString(), optimalSize.toString()}));\n if (!optimalSize.equals(original)) {\n tag = TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"setting preview size. optimal: \");\n stringBuilder2.append(optimalSize);\n stringBuilder2.append(\"original: \");\n stringBuilder2.append(original);\n Log.v(tag, stringBuilder2.toString());\n this.mCameraSettings.setPreviewSize(optimalSize);\n this.mCameraDevice.applySettings(this.mCameraSettings);\n this.mCameraSettings = this.mCameraDevice.getSettings();\n if (this.mCameraSettings == null) {\n Log.e(TAG, \"camera setting is null ?\");\n }\n }\n if (!(optimalSize.width() == 0 || optimalSize.height() == 0)) {\n Log.v(TAG, \"updating aspect ratio\");\n this.mUI.updatePreviewAspectRatio(((float) optimalSize.width()) / ((float) optimalSize.height()));\n }\n this.mCameraSettings.setSizesLocked(true);\n tag = TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"Preview size is \");\n stringBuilder3.append(optimalSize);\n Log.d(tag, stringBuilder3.toString());\n }\n }", "@Override\n protected Camera getCamera() {\n return Camera.createForPositionAndAngles(new ThreeDoubleVector(31.0, 7.0, 5.5), 0.0, 0.7);\n\n // Camera for orientation curve interpolation presentation\n// return Camera.createForPositionAndAngles(new ThreeDoubleVector(54.5, 10.0, 2.5), -0.5, 0.3);\n }", "public ImageConfigThree(){\n\t\tsetup();\n\t\tsetMinPos(100);\n\t}", "public ViewfinderView(Context context, AttributeSet attrs) {\n super(context, attrs);\n this.context = context;\n density = context.getResources().getDisplayMetrics().density;//2.0->4.4, 3.0 ->7.0\n \t//������ת����dp\n// \tScreenRate = (int)(20 * density);\n ScreenRate = dip2px(context,20);\n // Initialize these once for performance rather than calling them every time in onDraw().\n paint = new Paint();\n Resources resources = getResources();\n maskColor = resources.getColor(R.color.transparent);//\n resultColor = resources.getColor(R.color.result_view);\n frameColor = resources.getColor(R.color.viewfinder_frame);\n laserColor = resources.getColor(R.color.viewfinder_laser);\n resultPointColor = resources.getColor(R.color.possible_result_points);\n scannerAlpha = 0;\n possibleResultPoints = new HashSet<ResultPoint>(5);\n //扫描线的渐变drawable,二维码扫描线\n mRect = new Rect();\n laserColor_left = resources.getColor(R.color.viewfinder_laser_left);// 设置 扫描线的 的颜色\n laserColor_center = resources.getColor(R.color.green);// 设置 扫描线的 的颜色\n laserColor_right = resources.getColor(R.color.viewfinder_laser_right);// 设置 扫描线的 的颜色\n// mDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[] { laserColor_left,\n// laserColor_center, laserColor_right });\n //加载进度小圆点\n mDrawable = getResources().getDrawable(R.drawable.icon_saomiaoxian);// 圆点图片\n initview();\n }", "public static void main(String[] args) {\n// Vector v1 = new Vector(new double[]{0, 0, 1});\n// Vector v2 = new Vector(new double[]{1, 0, 0});\n// System.out.println(v1.dot(v2));\n System.setProperty(\"sun.java2d.opengl\", \"true\");\n \n // Make World\n //WorldSpace world = new StreetWorldSpace();\n WorldSpace world = new TestWorldSpace();\n //WorldSpace world = new BigAssPolygonSpace();\n \n // Make Frame\n JFrame frame = new JFrame();\n \n // Get effective screen size\n Dimension screenSize = getScreenDimension(frame);\n\n // Set Camera View dimensions\n int width = 730;\n int height = width;\n \n // Make Camera\n Polygon[] polygons = world.getPolygons();\n Camera camera = new Camera(polygons, width, height, frame.getGraphicsConfiguration());\n image = camera.observe();\n \n // Make Camera Control Panel\n// int controlPanelHeight = 100;\n// CameraControlPanel cameraControlPanel = new CameraControlPanel(camera);\n// cameraControlPanel.setPreferredSize(new Dimension(width, controlPanelHeight));\n// cameraControlPanel.setBorder(BorderFactory.createCompoundBorder(new LineBorder(Color.BLACK, 2, false), new EmptyBorder(10, 10, 10, 10)));\n \n // Make Camera View Component\n CameraViewComponent cameraViewComponent = new CameraViewComponent(camera);\n cameraViewComponent.updateImage(image);\n cameraViewComponent.updateData(camera.getData());\n cameraViewComponent.setPreferredSize(new Dimension(width, height));\n\n // Make Camera Panel\n JPanel cameraPanel = new JPanel();\n cameraPanel.setLayout(new BoxLayout(cameraPanel, BoxLayout.Y_AXIS));\n cameraPanel.setPreferredSize(new Dimension(width, height));// + controlPanelHeight));\n cameraPanel.add(cameraViewComponent);\n //cameraPanel.add(cameraControlPanel);\n\n // Make Camera Data Panel\n //CameraDataPanel cameraDataPanel = new CameraDataPanel(camera);\n \n // Make Master Panel\n JPanel masterPanel = new JPanel();\n masterPanel.add(cameraPanel);\n //masterPanel.add(cameraDataPanel);\n \n frame.add(masterPanel);\n frame.pack();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n\n // Make keyboard listener\n KeyListener kl = new KeyListener();\n \n // Time\n int lastTenthOfASecond = 0;\n double lastMilliSecond = 0;\n double currentMilliSecond = System.currentTimeMillis();\n double averageFrameRate = 0;\n double currentFrameRate = 0;\n long totalTime = 0;\n long totalFrames = 0;\n \n // Redraw camera view upon keyboard input\n while(true) { \n int currentTenthOfASecond = (int)((currentMilliSecond%1000)/100);\n if (currentMilliSecond/100 > lastMilliSecond/100) {\n boolean cameraMoved = false;\n if (kl.isWPressed()) {\n camera.move(FORWARD); \n cameraMoved = true;\n }\n if (kl.isSPressed()) {\n camera.move(BACKWARD); \n cameraMoved = true;\n }\n if (kl.isAPressed()) {\n camera.move(LEFT); \n cameraMoved = true;\n }\n if (kl.isDPressed()) {\n camera.move(RIGHT); \n cameraMoved = true;\n }\n if (kl.isSpacePressed()) {\n camera.move(UP); \n cameraMoved = true;\n }\n if (kl.isShiftPressed()) {\n camera.move(DOWN); \n cameraMoved = true;\n }\n if (cameraViewComponent.wasUpdated()) {\n cameraMoved = true;\n }\n// if (cameraControlPanel.getWasCameraChanged() || cameraViewComponent.wasUpdated()) {\n// cameraMoved = true;\n// }\n if (cameraMoved) {\n image = camera.observe();\n cameraViewComponent.updateImage(image);\n //cameraDataPanel.update();\n //cameraControlPanel.update(); \n totalFrames++;\n totalTime += currentMilliSecond-lastMilliSecond + 1;\n averageFrameRate = (totalFrames)/(totalTime/1000.0); \n currentFrameRate = (1000.0/(currentMilliSecond-lastMilliSecond));\n \n }\n }\n if (currentTenthOfASecond > lastTenthOfASecond) {\n \n String[] cameraData = camera.getData();\n String[] frameData = {\n \"Average Framerate: \" + String.format(\"%.2f\", averageFrameRate), \n \"Current Framerate: \" + String.format(\"%.2f\",currentFrameRate)\n };\n String[] data = new String[cameraData.length + frameData.length ];\n System.arraycopy(cameraData, 0, data, 0, cameraData.length);\n System.arraycopy(frameData, 0, data, cameraData.length, frameData.length);\n cameraViewComponent.updateData(data);\n } \n lastTenthOfASecond = currentTenthOfASecond;\n lastMilliSecond = currentMilliSecond;\n currentMilliSecond = System.currentTimeMillis(); \n }\n }", "public void onCameraViewStarted(int width, int height) {\n //https://docs.opencv.org/2.4/modules/core/doc/basic_structures.html\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n\n String pathCascadeNoseFile=initAssetFile(fileName);\n File file =new File(pathCascadeNoseFile);\n if(file.exists()) {\n System.out.println(\"File Exist\");\n cascadeClassifier = new CascadeClassifier(pathCascadeNoseFile);\n }else{\n System.out.println(\"File Don't Exist\");\n }\n\n //I have problem with memory use, create this ones outside the OnCamera frame function\n //But still having some problem with memory use\n //https://answers.opencv.org/question/61516/android-app-force-closed-by-memory-leak/\n matOfRect= new MatOfRect();\n gray= new Mat();\n result = new Mat();\n }", "private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String cameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n imageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CAMERA_PERMISSION);\n return;\n }\n manager.openCamera(cameraId, stateCallback, null);\n } catch (CameraAccessException e) {\n Toast.makeText(this, \"Camera failed to open.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }", "private void updateCameraParametersInitialize() {\n List<Integer> frameRates = mParameters.getSupportedPreviewFrameRates();\n if (frameRates != null) {\n Integer max = Collections.max(frameRates);\n mParameters.setPreviewFrameRate(max);\n }\n\n //mParameters.setRecordingHint(false);\n\n // Disable video stabilization. Convenience methods not available in API\n // level <= 14\n String vstabSupported = mParameters\n .get(\"video-stabilization-supported\");\n if (\"true\".equals(vstabSupported)) {\n mParameters.set(\"video-stabilization\", \"false\");\n }\n }", "public void configure(T aView)\n {\n aView.setMinSize(120,60);\n aView.addTab(\"One\", new BoxView());\n }", "@Override\r\n\tpublic EngineOptions onCreateEngineOptions() {\r\n\t\tmCamera = new Camera(0, 0, WIDTH, HEIGHT);\r\n\t\t\r\n\t\tEngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), mCamera);\r\n\t\t\r\n\t\tengineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);\r\n\t\t\r\n\t\tmEngine = new FixedStepEngine(engineOptions, 60);\r\n\t\t\r\n\t\treturn engineOptions;\r\n\t}", "public PixxPanel(PixxConfiguration config)\n {\n _pixxConfiguration=config;\n }", "@Override\n\tpublic EngineOptions onCreateEngineOptions() {\n\t\tToast.makeText(this, \"Touch and hold the scene and the camera will smoothly zoom in.\\nRelease the scene it to zoom out again.\", Toast.LENGTH_LONG).show();\n\n\t\tthis.mSmoothCamera = new SmoothCamera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT, 10, 10, 1.0f);\n\n\t\treturn new EngineOptions(true, ScreenOrientation.LANDSCAPE_SENSOR, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mSmoothCamera);\n\t}", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement.getDescription());\n view.setDate(advertisement.getDatePublished());\n view.setTags(advertisement.getTags());\n setCondition();\n if (advertisement.getImageUrl() != null) { //the url here is null right after upload\n view.setImageUrl(advertisement.getImageUrl());\n }\n }", "public void configureGallery(T aView)\n {\n aView.setPadding(8,30,8,30); aView.setBorder(Color.LIGHTGRAY, 1);\n Label label = new Label(\"ColView\"); label.setTextFill(Color.GRAY); label.setFont(Font.Arial11);\n aView.addChild(label);\n }", "public void init(Camera cam);", "public interface CardboardViewApi\n{\n\n public abstract void setRenderer(GvrView.Renderer renderer);\n\n public abstract void setRenderer(GvrView.StereoRenderer stereorenderer);\n\n public abstract void getCurrentEyeParams(HeadTransform headtransform, Eye eye, Eye eye1, Eye eye2, Eye eye3, Eye eye4);\n\n public abstract void setStereoModeEnabled(boolean flag);\n\n public abstract boolean getStereoModeEnabled();\n\n public abstract boolean setAsyncReprojectionEnabled(boolean flag);\n\n public abstract boolean getAsyncReprojectionEnabled();\n\n public abstract void setOnCloseButtonListener(Runnable runnable);\n\n public abstract HeadMountedDisplay getHeadMountedDisplay();\n\n public abstract void setNeckModelEnabled(boolean flag);\n\n public abstract float getNeckModelFactor();\n\n public abstract void setNeckModelFactor(float f);\n\n public abstract void resetHeadTracker();\n\n public abstract void recenterHeadTracker();\n\n public abstract void updateGvrViewerParams(GvrViewerParams gvrviewerparams);\n\n public abstract GvrViewerParams getGvrViewerParams();\n\n public abstract void updateScreenParams(ScreenParams screenparams);\n\n public abstract ScreenParams getScreenParams();\n\n public abstract float getInterpupillaryDistance();\n\n public abstract void setDistortionCorrectionEnabled(boolean flag);\n\n public abstract boolean getDistortionCorrectionEnabled();\n\n public abstract void undistortTexture(int i);\n\n public abstract void setDistortionCorrectionScale(float f);\n\n public abstract void setMultisampling(int i);\n\n public abstract void setDepthStencilFormat(int i);\n\n public abstract void onResume();\n\n public abstract void onPause();\n\n public abstract void shutdown();\n\n public abstract boolean onTouchEvent(MotionEvent motionevent);\n\n public abstract void setOnCardboardBackListener(Runnable runnable);\n\n public abstract void setOnCardboardTriggerListener(Runnable runnable);\n\n public abstract void enableCardboardTriggerEmulation();\n\n public abstract void setTransitionViewEnabled(boolean flag);\n\n public abstract void setOnTransitionViewDoneListener(Runnable runnable);\n\n public abstract View getRootView();\n\n public abstract GvrSurfaceView getGvrSurfaceView();\n}", "public Vision() {\n\n visionCam = CameraServer.getInstance().startAutomaticCapture(\"HatchCam\", 0);\n visionCam.setVideoMode(PixelFormat.kMJPEG, 320, 240, 115200);\n \n int retry = 0;\n while(cam == null && retry < 10) {\n try {\n System.out.println(\"Connecting to jevois serial port ...\");\n cam = new SerialPort(115200, SerialPort.Port.kUSB1);\n System.out.println(\"Success!!!\");\n } catch (Exception e) {\n System.out.println(\"We all shook out\");\n e.printStackTrace();\n sleep(500);\n System.out.println(\"Retry\" + Integer.toString(retry));\n retry++;\n }\n }\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public void setPreviewVideoDefinition(VideoDefinition vdef);", "@Override\n public void onConfigured(@NonNull CameraCaptureSession session) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"onConfigured: \" + session);\n Log.d(TAG, \"captureSession was: \" + captureSession);\n }\n if (camera == null) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"camera is closed\");\n }\n synchronized (background_camera_lock) {\n callback_done = true;\n background_camera_lock.notifyAll();\n }\n return;\n }\n synchronized (background_camera_lock) {\n captureSession = session;\n Surface surface = getPreviewSurface();\n previewBuilder.addTarget(surface);\n if (video_recorder != null)\n previewBuilder.addTarget(video_recorder_surface);\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to start preview\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n // we indicate that we failed to start the preview by setting captureSession back to null\n // this will cause a CameraControllerException to be thrown below\n captureSession = null;\n }\n }\n synchronized (background_camera_lock) {\n callback_done = true;\n background_camera_lock.notifyAll();\n }\n }", "private void initPreview(int width, int height) {\n if (camera!=null && previewHolder.getSurface()!=null) {\n try {\n camera.setPreviewDisplay(previewHolder);\n }\n catch (Throwable t) {\n Log.e(\"PreviewDemo-surfaceCallback\",\n \"ExceptionsetPreviewDisplay()\", t);\n // Toast.makeText(PreviewDemo.this, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n if (!cameraConfigured) {\n Camera.Parameters parameters=camera.getParameters();\n Camera.Size size=getBestPreviewSize(width, height,\n parameters);\n\n if (size!=null) {\n parameters.setPreviewSize(size.width, size.height);\n camera.setParameters(parameters);\n cameraConfigured=true;\n }\n }\n }\n }", "public void openCamera() {\n \n\n }", "private void showCameraConfigurationDialog() {\n\n\t\tLayoutInflater factory = LayoutInflater.from(context);\n\t\tView textEntryView = factory.inflate(R.layout.camera_name_password_set,\n\t\t\t\tnull);\n\t\tfinal EditText cameraName = (EditText) textEntryView\n\t\t\t\t.findViewById(R.id.camera_name);\n\t\tfinal String name = cameraProperties.getCameraSsid();\n\t\tcameraName.setText(name);\n\t\tfinal EditText cameraPassword = (EditText) textEntryView\n\t\t\t\t.findViewById(R.id.wifi_password);\n\t\tfinal String password = cameraProperties.getCameraPassword();\n\t\tcameraPassword.setText(password);\n\t\tAlertDialog.Builder ad1 = new AlertDialog.Builder(context);\n\t\tad1.setTitle(R.string.camera_wifi_configuration);\n\t\tad1.setIcon(android.R.drawable.ic_dialog_info);\n\t\tad1.setView(textEntryView);\n\t\tad1.setCancelable(true);\n\t\tad1.setPositiveButton(R.string.camera_configuration_set,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int arg1) {\n\n\t\t\t\t\t\tString temp1 = cameraName.getText().toString();\n\t\t\t\t\t\tif (temp1.length() > 20) {\n\t\t\t\t\t\t\tToast.makeText(context, R.string.camera_name_limit,\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t// do not allow dialog close\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\t\tfield.set(dialog, false);\n\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString temp = cameraPassword.getText().toString();\n\t\t\t\t\t\tif (temp.length() > 10 || temp.length() < 8) {\n\t\t\t\t\t\t\tToast.makeText(context, R.string.password_limit,\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t// do not allow dialog close\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\t\tfield.set(dialog, false);\n\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// allow dialog close\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\tfield.set(dialog, true);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (name.equals(cameraName.getText().toString()) == false) {\n\t\t\t\t\t\t\tcameraProperties.setCameraSsid(cameraName.getText()\n\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (password.equals(temp) == false) {\n\t\t\t\t\t\t\tcameraProperties.setCameraPassword(cameraPassword\n\t\t\t\t\t\t\t\t\t.getText().toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tad1.show();\n\t}", "@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview(cameraCaptureSessionListener);\n }", "public void fromConfig (VoxConfig conf);", "public void onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline r20) {\n /*\n r19 = this;\n r0 = r19\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"onCreateCameraPipeline\"\n r1.d(r2)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r2 = r20\n r1.f73l = r2\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.FileType r1 = r1.getFileType()\n com.arashivision.insta360.basemedia.model.FileType r2 = com.arashivision.insta360.basemedia.model.FileType.FISH_EYE\n r3 = 1\n r4 = 0\n if (r1 != r2) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.viewconstraint.Constraint r1 = r1.getConstraint()\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r2 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r2 = r2.IL1Iii\n int[] r2 = r2.getConstraintRatio()\n if (r1 == 0) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r5 = r0.f577a\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r6 = r5.I11L\n float r5 = r1.getDefaultDistance()\n double r9 = (double) r5\n float r5 = r1.getDefaultFov()\n double r11 = (double) r5\n r5 = r2[r3]\n float r5 = (float) r5\n r2 = r2[r4]\n float r2 = (float) r2\n float r5 = r5 / r2\n double r13 = (double) r5\n float r2 = r1.getXScale()\n double r7 = (double) r2\n float r1 = r1.getYScale()\n double r1 = (double) r1\n r15 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n r17 = r7\n r7 = r15\n r15 = r17\n r17 = r1\n r6.setGyroStabilizerFovDistance2(r7, r9, r11, r13, r15, r17)\n L_0x0059:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r1.setLoading(r4)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n if (r1 == 0) goto L_0x00cf\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r2 = r1.ILil\n if (r2 == 0) goto L_0x006d\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r2 = r2.getCameraRenderSurfaceInfo()\n if (r2 == 0) goto L_0x006d\n r4 = r3\n L_0x006d:\n if (r4 != 0) goto L_0x0077\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Custom surface is null\"\n L_0x0073:\n r1.e(r2)\n goto L_0x00c5\n L_0x0077:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r2 = r1.I11L\n if (r2 != 0) goto L_0x0080\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Render is null\"\n goto L_0x0073\n L_0x0080:\n boolean r2 = r1.llliI\n if (r2 == 0) goto L_0x0089\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Already render surface\"\n goto L_0x0073\n L_0x0089:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo r2 = new com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo\n r2.<init>()\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderWidth\n r2.renderWidth = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderHeight\n r2.renderHeight = r4\n a.a.a.a.e.a.e.l r4 = r1.f60IL\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r5 = r1.ILil\n int r5 = r5.getRenderModelType()\n com.arashivision.graphicpath.render.rendermodel.RenderModelType r4 = r4.a(r5)\n int r4 = r4.getType()\n r2.renderModeType = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n android.view.Surface r4 = r4.mSurface\n r2.mSurface = r4\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r4 = r1.I11L\n r4.startCameraRenderSurface(r2)\n r1.llliI = r3\n L_0x00c5:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.listener.IBasePlayerViewListener r1 = r1.f741\n if (r1 == 0) goto L_0x00ce\n r1.onLoadingFinish()\n L_0x00ce:\n return\n L_0x00cf:\n r1 = 0\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.e.a.f.h.onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline):void\");\n }" ]
[ "0.66443", "0.6283906", "0.6099979", "0.598686", "0.59624153", "0.5930007", "0.58558327", "0.5790684", "0.57382786", "0.5709228", "0.56576014", "0.5635371", "0.5601029", "0.5591299", "0.5579194", "0.556878", "0.5553082", "0.5552504", "0.5552109", "0.5525337", "0.5512704", "0.5504666", "0.545649", "0.5439074", "0.5431469", "0.54272205", "0.53803074", "0.5374984", "0.5356415", "0.53531003", "0.5352531", "0.535077", "0.5343335", "0.5338821", "0.53367716", "0.5323222", "0.53165966", "0.5312262", "0.53069794", "0.53016967", "0.52778", "0.52348375", "0.5231142", "0.5229005", "0.52200925", "0.5217732", "0.5216391", "0.5195558", "0.5166489", "0.516119", "0.51551825", "0.51549864", "0.5153704", "0.5148992", "0.5143399", "0.5124206", "0.51208776", "0.5115867", "0.5115192", "0.51053137", "0.5104831", "0.50979656", "0.5057318", "0.5056559", "0.5045001", "0.50306237", "0.5030575", "0.5029453", "0.5029453", "0.5029453", "0.5029453", "0.50239974", "0.5018596", "0.5010588", "0.5002813", "0.49972025", "0.49930868", "0.49905208", "0.4985027", "0.498446", "0.4977289", "0.49732935", "0.49657738", "0.49534616", "0.49523503", "0.49440607", "0.49427804", "0.49389485", "0.4937689", "0.49309355", "0.49294809", "0.49282017", "0.49162483", "0.49155626", "0.49087682", "0.49078676", "0.4902494", "0.48944336", "0.4894108", "0.4892938" ]
0.53832453
26
TODO: Implement camera viewfinder transformations
private void updateTransform() { Matrix matrix = new Matrix(); float centerX = dataBinding.viewFinder.getWidth() / 2f; float centerY = dataBinding.viewFinder.getHeight() / 2f; int rotation = dataBinding.viewFinder.getDisplay().getRotation(); int rotationDegrees = 0; switch (rotation) { case Surface.ROTATION_0: rotationDegrees = 0; break; case Surface.ROTATION_90: rotationDegrees = 90; break; case Surface.ROTATION_180: rotationDegrees = 180; break; case Surface.ROTATION_270: rotationDegrees = 270; break; default: } matrix.postRotate(-rotationDegrees, centerX, centerY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mat4x4 getMatView() {\n Mat4x4 matCameraRotX = MatrixMath.matrixMakeRotationX(cameraRot.getX());\n Mat4x4 matCameraRotY = MatrixMath.matrixMakeRotationY(cameraRot.getY());\n Mat4x4 matCameraRotZ = MatrixMath.matrixMakeRotationZ(cameraRot.getZ());\n Mat4x4 matCameraRotXY = MatrixMath.matrixMultiplyMatrix(matCameraRotX, matCameraRotY);\n Mat4x4 matCameraRot = MatrixMath.matrixMultiplyMatrix(matCameraRotXY, matCameraRotZ);\n matCamera = calculateMatCamera(up, target, matCameraRot);\n matView = MatrixMath.matrixQuickInverse(matCamera);\n return matView;\n }", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "@Override\n public void onCameraViewStarted(int width, int height){\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mGray = new Mat(height, width, CvType.CV_8UC1);\n mDrawingLayer = new Mat(height,width,CvType.CV_8UC4);\n mMixed = new Mat(height,width,CvType.CV_8UC4);\n mOutput = new Mat(width,height,CvType.CV_8UC4);\n mGaussianMask = new Mat();\n\n Mat horizontal = Imgproc.getGaussianKernel(width * 2, staticConfig.vignetteLevel,CvType.CV_32F);\n Mat vertical = Imgproc.getGaussianKernel(height * 2, staticConfig.vignetteLevel, CvType.CV_32F);\n Mat matrix = new Mat();\n Core.gemm(vertical,horizontal,1,new Mat(),0,matrix,Core.GEMM_2_T);\n Core.MinMaxLocResult mmr = Core.minMaxLoc(matrix);\n Core.divide(matrix,new Scalar(mmr.maxVal),mGaussianMask);\n\n /* initialising mats that are necessary for frame processing */\n mEdges = new Mat(height, width, CvType.CV_8UC1);\n mTemplateTargetPoints = new MatOfPoint2f(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0));\n mFrameBox = new MatOfPoint2f();\n /* mTemplateTargetPoints.fromArray(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0)); */\n\n /* loading template */\n /* the template is a 200 x 50 png image */\n /* containing the template in 4 different orientations */\n\n mTemplate = new Mat();\n InputStream stream = null;\n Uri uri = Uri.parse(\"android.resource://au.com.pandamakes.www.pureblacktea/drawable/templatelg7\");\n try{\n stream = getContentResolver().openInputStream(uri);\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();\n bmpFactoryOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap bmp = BitmapFactory.decodeStream(stream,null,bmpFactoryOptions);\n Utils.bitmapToMat(bmp, mTemplate);\n mTemplateGray = new Mat();\n Imgproc.cvtColor(mTemplate, mTemplateGray, Imgproc.COLOR_RGB2GRAY);\n\n /* setting up feature detectors */\n mDetector = FeatureDetector.create(FeatureDetector.ORB);\n mExtractor = DescriptorExtractor.create(DescriptorExtractor.ORB);\n mMatcher = DescriptorMatcher.create(DescriptorExtractor.ORB);\n\n /* detect key points */\n mKeyPoints = new MatOfKeyPoint();\n mDescriptor = new Mat();\n mDetector.detect(mTemplateGray, mKeyPoints);\n mExtractor.compute(mTemplateGray, mKeyPoints, mDescriptor);\n List<KeyPoint> listKeyPoint = mKeyPoints.toList();\n mArrayListTemplateKP = new ArrayList<>();\n for(int i = 0; i<listKeyPoint.size(); i++){\n mArrayListTemplateKP.add(listKeyPoint.get(i).pt);\n }\n mFrameKP = new MatOfPoint2f();\n mKpMat = new MatOfKeyPoint();\n\n /* setting up templates */\n Imgproc.resize(mTemplateGray, mTemplateGray, new Size(staticConfig.templateSize, staticConfig.templateSize));\n\n mTemplate90 = new Mat();\n Core.transpose(mTemplateGray, mTemplate90);\n Core.flip(mTemplate90, mTemplate90, 0);\n\n mTemplate180 = new Mat();\n Core.flip(mTemplateGray,mTemplate180,-1);\n\n mTemplate270 = new Mat();\n Core.flip(mTemplate90,mTemplate270,-1);\n\n /* options associated with rendering */\n mCameraCaliberation = new Mat(3,3,CvType.CV_32F);\n float data[] = {3284,0,(float) width/2,0,3284,(float) height/2,0,0,1};\n mCameraCaliberation.put(0,0,data);\n mRefCoord = new MatOfPoint3f();\n mRefBox = new MatOfPoint3f(new Point3(-50,-50,0),new Point3(-50,50,0),new Point3(50,50,0),new Point3(50,-50,0));\n mRVec = new Mat();\n mTVec = new Mat();\n mCaptureAreaAdjusted = new MatOfPoint2f();\n\n /* helper class */\n mXAxis = new visualisation();\n mXAxis.start = new Point3(0,0,0);\n mXAxis.end = new Point3(30,0,0);\n mXAxis.width = 3;\n mXAxis.color = new Scalar(155,55,55);\n\n mYAxis = new visualisation();\n mYAxis.start = new Point3(0,0,0);\n mYAxis.end = new Point3(0,30,0);\n mYAxis.width = 3;\n mYAxis.color = new Scalar(55,155,55);\n\n mZAxis = new visualisation();\n mZAxis.start = new Point3(0,0,0);\n mZAxis.end = new Point3(0,0,-30);\n mZAxis.width = 3;\n mZAxis.color = new Scalar(55,55,155);\n\n /* other misc settings */\n mScanCenter = new Point(width/2,height/2);\n mBoxCenter = new Point(width/2,height/2);\n mScanWidth = staticConfig.scanWidth;\n mRectBorder = new Scalar(200,200,50);\n mLostTrackCounter = 0;\n\n mMostRight = width;\n mMostBottom = height;\n\n adjustROI(mScanCenter,mDetectionBoxSize);\n\n /* init visualisation parameters */\n if(staticConfig.showMolecule){\n mMolecule = new ArrayList<>();\n Boolean flag1 = false,\n flag2 = false;\n File molFile = new File(getFilesDir()+\"/mol.mol\");\n try{\n BufferedReader reader = new BufferedReader(new FileReader(molFile));\n String line;\n while((line=reader.readLine())!=null){\n if(line.contains(\"END\")){\n break;\n }else if(flag2){\n\n }else if(flag1){\n if(line.replace(\" \",\"\").contains(\"000000000000\")) {\n visualisation newAtom = new visualisation();\n try{\n newAtom.initAtom(line);\n }catch (NumberFormatException e){\n /* if a double parsing error occurred */\n mMolecule = new ArrayList<>();\n boolean deleted = molFile.delete();\n if(deleted){\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. For the healthiness of the app, the mol file was deleted.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. The file was not able to be deleted somehow.\",Toast.LENGTH_LONG).show();\n }\n break;\n }\n mMolecule.add(newAtom);\n }else{\n flag2 = true;\n }\n }else if(line.contains(\"V2000\")){\n flag1 = true;\n }\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "private void updateView(){\n \n camera.updateView();\n }", "private Mat4x4 calculateMatCamera(Vec4df up, Vec4df target, Mat4x4 transform) {\n lookDirection = MatrixMath.matrixMultiplyVector(transform, target);\n target = MatrixMath.vectorAdd(origin, lookDirection);\n return MatrixMath.matrixPointAt(origin, target, up);\n }", "public void transform(View view) {\n DrawRect.getCoord(1);\n\n // block to get coord os ROI\n ArrayList<Integer> full_x_ROIcoord = new ArrayList<>();\n ArrayList<Integer> full_y_ROIcoord = new ArrayList<>();\n\n if (xRed < 0 || xRed > 750 || yRed < 0 || yRed > 1000 ||\n xOrg < 0 || xOrg > 750 || yOrg < 0 || yOrg > 1000 ||\n xYell < 0 || xYell > 750 || yYell < 0 || yYell > 1000 ||\n xGreen < 0 || xGreen > 750 || yGreen < 0 || yGreen > 1000) {\n return;\n } else {\n // clear situation with x<= xYell\n for (int x = xRed; x < xYell; x++) {\n for (int y = yRed; y < yYell; y++) {\n full_x_ROIcoord.add(x);\n full_y_ROIcoord.add(y);\n }\n }\n }\n // end block\n\n // block get contour via CannyFilter\n Mat sMat = oImage.submat(yRed, yGreen, xRed, xOrg);\n Imgproc.Canny(sMat, sMat, 25, 100 * 2);\n ArrayList<Double> subMatValue = new ArrayList<>();\n\n for (int x = 0; x < sMat.cols(); x++) {\n for (int y = 0; y < sMat.rows(); y++) {\n double[] ft2 = sMat.get(y, x);\n subMatValue.add(ft2[0]);\n }\n }\n int count = 0;\n for (int x = xRed; x < xYell; x++) {\n for (int y = yRed; y < yYell; y++) {\n oImage.put(y, x, subMatValue.get(count));\n count++;\n }\n }\n // end block\n\n displayImage(oImage);\n }", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "@Override\r\n protected Matrix4f genViewMatrix() {\r\n\r\n // refreshes the position\r\n position = calcPosition();\r\n\r\n // calculate the camera's coordinate system\r\n Vector3f[] coordSys = genCoordSystem(position.subtract(center));\r\n Vector3f right, up, forward;\r\n forward = coordSys[0];\r\n right = coordSys[1];\r\n up = coordSys[2];\r\n\r\n // we move the world, not the camera\r\n Vector3f position = this.position.negate();\r\n\r\n return genViewMatrix(forward, right, up, position);\r\n }", "@Override\n public void onCameraViewStarted(int width, int height) {\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mRgbaF = new Mat(width, height, CvType.CV_8UC4);\n mRgbaT = new Mat(width, height, CvType.CV_8UC4);\n Log.i(TAG, \"height : \" + height);\n Log.i(TAG, \"width : \" + width);\n //Log.i(TAG, \"mOpenCvCameraView size (w,h):\" + mOpenCvCameraView.getWidth() + \" - \" + mOpenCvCameraView.getHeight());\n }", "Camera getCamera();", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "@Override\n\tpublic void onCameraViewStarted(int width, int height) {\n\n\n\n\t\tmRgbaT = new Mat(width, height, CvType.CV_8UC4); // NOTE width,width is NOT a typo\n\n\t}", "@Override\n\tpublic void moveCamera() {\n\n\t}", "@Override\n protected Camera getCamera() {\n return Camera.createForPositionAndAngles(new ThreeDoubleVector(31.0, 7.0, 5.5), 0.0, 0.7);\n\n // Camera for orientation curve interpolation presentation\n// return Camera.createForPositionAndAngles(new ThreeDoubleVector(54.5, 10.0, 2.5), -0.5, 0.3);\n }", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n// steering = (TextView) findViewById(R.id.steering_angle);\n\n\n Mat frame = inputFrame.rgba();\n steering_angle_ = get_steering_prediction(frame.clone());\n Mat displayMat = null;\n// if(counterFrme % 10 == 0 || counterFrme %10 ==1 || counterFrme %10 ==2 || counterFrme %10 ==3 || counterFrme %10 ==4 ) {\n displayMat = draw_LaneLines(frame.clone());\n// displayMat = CarDetect(displayMat);\n// displayMat = PedestrainDet(frame.clone());\n\n// }else{\n// displayMat = frame;\n// }\n\n counterFrme ++;\n if(steering_angle_< 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn left \" + steering_angle_ * -1 + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n if(steering_angle_ > 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn right \" + steering_angle_ + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n\n return displayMat;\n\n }", "public void updateCamera() {\n\t}", "void cameraSetup();", "public void updateTransform() {\n \t\tif (viewBox != null) {\n \t\t\tOMSVGRect bbox = ((SVGRectElement)viewBox.getElement()).getBBox();\n //\t\t\tGWT.log(\"bbox = \" + bbox.getDescription());\n \t\t\tfloat d = (float)Math.sqrt((bbox.getWidth() * bbox.getWidth() + bbox.getHeight() * bbox.getHeight()) * 0.25) * scale * 2;\n //\t\t\tGWT.log(\"d = \" + d);\n \t\t\n \t\t\t// Compute the actual canvas size. It is the max of the window rect\n \t\t\t// and the transformed bbox.\n \t\t\tfloat width = Math.max(d, windowRect.getWidth());\n \t\t\tfloat height = Math.max(d, windowRect.getHeight());\n //\t\t\tGWT.log(\"width = \" + width);\n //\t\t\tGWT.log(\"height = \" + height);\n \n \t\t\t// Compute the display transform to center the image in the\n \t\t\t// canvas\n \t\t\tOMSVGMatrix m = svg.createSVGMatrix();\n \t\t\tfloat cx = bbox.getCenterX();\n \t\t\tfloat cy = bbox.getCenterY();\n \t\t\tm = m.translate(0.5f * (width - bbox.getWidth()) -bbox.getX(), 0.5f * (height - bbox.getHeight()) -bbox.getY())\n \t\t\t.translate(cx, cy)\n \t\t\t.rotate(angle)\n \t\t\t.scale(scale)\n \t\t\t.translate(-cx, -cy);\n \t\t\t((ISVGTransformable)xformGroup).getTransform().getBaseVal().getItem(0).setMatrix(m);\n \t\t\t((ISVGTransformable)modelGroup.getTwinWrapper()).getTransform().getBaseVal().getItem(0).setMatrix(m);\n //\t\t\tGWT.log(\"m=\" + m.getDescription());\n \t\t\tsvg.getStyle().setWidth(width, Unit.PX);\n \t\t\tsvg.getStyle().setHeight(height, Unit.PX);\n \t\t}\n \t}", "private void rotateAround() {\n if (camPathAngle < Constants.FULL_ROTATION) {\n camPathAngle++;\n } else {\n swapCount++;\n camPathAngle = 0;\n }\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n if (swapCount % 2 == 0) {\n mPerspectiveCamera.rotate(Vector3.Y, camPathAngle);\n } else {\n mPerspectiveCamera.rotate(Vector3.X, camPathAngle);\n }\n mPerspectiveCamera.lookAt(new Vector3(0, 0, 0));\n mPerspectiveCamera.update();\n }", "public void onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline r20) {\n /*\n r19 = this;\n r0 = r19\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"onCreateCameraPipeline\"\n r1.d(r2)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r2 = r20\n r1.f73l = r2\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.FileType r1 = r1.getFileType()\n com.arashivision.insta360.basemedia.model.FileType r2 = com.arashivision.insta360.basemedia.model.FileType.FISH_EYE\n r3 = 1\n r4 = 0\n if (r1 != r2) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.viewconstraint.Constraint r1 = r1.getConstraint()\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r2 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r2 = r2.IL1Iii\n int[] r2 = r2.getConstraintRatio()\n if (r1 == 0) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r5 = r0.f577a\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r6 = r5.I11L\n float r5 = r1.getDefaultDistance()\n double r9 = (double) r5\n float r5 = r1.getDefaultFov()\n double r11 = (double) r5\n r5 = r2[r3]\n float r5 = (float) r5\n r2 = r2[r4]\n float r2 = (float) r2\n float r5 = r5 / r2\n double r13 = (double) r5\n float r2 = r1.getXScale()\n double r7 = (double) r2\n float r1 = r1.getYScale()\n double r1 = (double) r1\n r15 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n r17 = r7\n r7 = r15\n r15 = r17\n r17 = r1\n r6.setGyroStabilizerFovDistance2(r7, r9, r11, r13, r15, r17)\n L_0x0059:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r1.setLoading(r4)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n if (r1 == 0) goto L_0x00cf\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r2 = r1.ILil\n if (r2 == 0) goto L_0x006d\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r2 = r2.getCameraRenderSurfaceInfo()\n if (r2 == 0) goto L_0x006d\n r4 = r3\n L_0x006d:\n if (r4 != 0) goto L_0x0077\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Custom surface is null\"\n L_0x0073:\n r1.e(r2)\n goto L_0x00c5\n L_0x0077:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r2 = r1.I11L\n if (r2 != 0) goto L_0x0080\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Render is null\"\n goto L_0x0073\n L_0x0080:\n boolean r2 = r1.llliI\n if (r2 == 0) goto L_0x0089\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Already render surface\"\n goto L_0x0073\n L_0x0089:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo r2 = new com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo\n r2.<init>()\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderWidth\n r2.renderWidth = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderHeight\n r2.renderHeight = r4\n a.a.a.a.e.a.e.l r4 = r1.f60IL\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r5 = r1.ILil\n int r5 = r5.getRenderModelType()\n com.arashivision.graphicpath.render.rendermodel.RenderModelType r4 = r4.a(r5)\n int r4 = r4.getType()\n r2.renderModeType = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n android.view.Surface r4 = r4.mSurface\n r2.mSurface = r4\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r4 = r1.I11L\n r4.startCameraRenderSurface(r2)\n r1.llliI = r3\n L_0x00c5:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.listener.IBasePlayerViewListener r1 = r1.f741\n if (r1 == 0) goto L_0x00ce\n r1.onLoadingFinish()\n L_0x00ce:\n return\n L_0x00cf:\n r1 = 0\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.e.a.f.h.onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline):void\");\n }", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "public abstract Matrix4f getCameraMatrix();", "public void updateRenderCameraPose(TangoPoseData cameraPose) {\n float[] rotation = cameraPose.getRotationAsFloats();\n float[] translation = cameraPose.getTranslationAsFloats();\n Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);\n // Conjugating the Quaternion is need because Rajawali uses left handed convention for\n // quaternions.\n getCurrentCamera().setRotation(quaternion.conjugate());\n getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);\n }", "@Override\r\n\tprotected void userDefinedViewUpdate() {\r\n\t\tvideoUtil.captureVideoImage();\r\n\t\tgetModel()._readFromViewAfterUpdate();\r\n\t}", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "public void restoreCamera() {\r\n float mod=1f/10f;\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n p.frustum(-(width/2)*mod, (width/2)*mod,\r\n -(height/2)*mod, (height/2)*mod,\r\n cameraZ*mod, 10000);\r\n }", "public void onCameraViewStarted(int width, int height) {\n //https://docs.opencv.org/2.4/modules/core/doc/basic_structures.html\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n\n String pathCascadeNoseFile=initAssetFile(fileName);\n File file =new File(pathCascadeNoseFile);\n if(file.exists()) {\n System.out.println(\"File Exist\");\n cascadeClassifier = new CascadeClassifier(pathCascadeNoseFile);\n }else{\n System.out.println(\"File Don't Exist\");\n }\n\n //I have problem with memory use, create this ones outside the OnCamera frame function\n //But still having some problem with memory use\n //https://answers.opencv.org/question/61516/android-app-force-closed-by-memory-leak/\n matOfRect= new MatOfRect();\n gray= new Mat();\n result = new Mat();\n }", "public void updateMvpMatrix()\n\t\t{\n\t\t\t// Set the matrix, specifying the edges of the visible canvas and the near and far clipping planes.\n\t\t\tMatrix.orthoM(mvpMatrix, 0,\n\t\t\t\t\t-viewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\tviewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\t-viewportHeight / (2f * zoom) + cameraY,\n\t\t\t\t\tviewportHeight / (2f * zoom) + cameraY, -1, 1);\n\t\t}", "@Override\n \t\t\t\tpublic void doModelPerspective() {\n \n \t\t\t\t}", "public void camera360() {\n\n }", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }", "public void cameraTransform(Vector3f targ, Vector3f up) {\r\n\t\t// First normalize the target\r\n\t\tVector3f n = targ;\r\n\t\tn.normalize();\r\n\t\t// Then normalize the up vector\r\n\t\tVector3f u = up;\r\n\t\tu.normalize();\r\n\t\t// Then cross the two together to get the right vector\r\n\t\tu = u.cross(n);\r\n\t\tVector3f v = n.cross(u);\r\n\r\n\t\t// Finally build a matrix from the result\r\n\t\tm[0][0] = u.x; m[0][1] = u.y; m[0][2] = u.z; m[0][3] = 0.0f;\r\n\t\tm[1][0] = v.x; m[1][1] = v.y; m[1][2] = v.z; m[1][3] = 0.0f;\r\n\t\tm[2][0] = n.x; m[2][1] = n.y; m[2][2] = n.z; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\r\n\t}", "private void setupCamera(final int camera) {\n try {\n // mPreview = new CamPreview(this, camera, CamPreview.LayoutMode.NoBlank);// .FitToParent);\n } catch (Exception e) {\n Toast.makeText(this, R.string.cannot_connect_to_camera, Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n RelativeLayout.LayoutParams previewLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n Display display = getWindowManager().getDefaultDisplay();\n DisplayMetrics outMetrics = new DisplayMetrics();\n display.getMetrics(outMetrics);\n\n int width = outMetrics.widthPixels;\n int height = outMetrics.heightPixels;\n\n previewLayoutParams.height = width;\n previewLayoutParams.width = width;\n\n // Un-comment below line to specify the position.\n // mPreview.setCenterPosition(width / 2, height / 2);\n\n // previewParent.addView(mPreview, 0, previewLayoutParams);\n\n\n }", "@Override\n\tpublic void shiftCamera() {\n\t\t\n\t}", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera getCamera(int index);", "float[] getViewMatrix();", "private void initCamera(SubScene scene, Group root){\n //Create a perspective camera for 3D use and add it to the scene.\n PerspectiveCamera camera = new PerspectiveCamera(true);\n scene.setCamera(camera);\n\n //Set the camera's field of view, near and far pane, and starting zoom.\n camera.setFieldOfView(80);\n camera.setNearClip(1);\n camera.setFarClip(5000);\n camera.setTranslateZ(-1000);\n\n //Initiate the rotation objects used for rotating the camera about the world.\n Rotate xRotate = new Rotate(0, Rotate.X_AXIS);\n Rotate yRotate = new Rotate(0, Rotate.Y_AXIS);\n root.getTransforms().addAll(xRotate, yRotate);\n\n //Bind the property so it automatically updates.\n xRotate.angleProperty().bind(angleX);\n yRotate.angleProperty().bind(angleY);\n\n //Add an event listener to track the start of a mouse drag when the mouse is clicked.\n scene.setOnMousePressed(event -> {\n dragStartX = event.getSceneX();\n dragStartY = event.getSceneY();\n anchorAngleX = angleX.get();\n anchorAngleY = angleY.get();\n });\n\n //Add an event listener to update the rotation objects based on the distance dragged.\n scene.setOnMouseDragged(event -> {\n //A modifier (0.2 in this case) is used to control the sensitivity.\n Double newAngleX = anchorAngleX - (dragStartY - event.getSceneY())*0.2;\n //Restrict the rotation to angles less than 90.\n if(newAngleX > 90){\n angleX.set(90);\n //Restrict the rotation to angles greater than 5.\n } else if (newAngleX < 5){\n angleX.set(5);\n } else {\n angleX.set(newAngleX);\n }\n angleY.set(anchorAngleY + (dragStartX - event.getSceneX())*0.2);\n });\n\n //Add an event listener to move the camera away or towards the scene using the mouse wheel.\n scene.setOnScroll(event -> {\n Double delta = event.getDeltaY();\n //If the mouse scrolls in, and the camera is not too close, then move the camera closer.\n if(delta > 0 && camera.getTranslateZ() <= -100){\n camera.setTranslateZ(camera.getTranslateZ()*0.975);\n //Else, if the mouse scrolls out and it's not too far away, then move the camera away.\n } else if(delta <0 && camera.getTranslateZ() >= -3000){\n camera.setTranslateZ(camera.getTranslateZ()* 1/0.975);\n }\n });\n }", "public Camera() {\n\t\tMatrix.setIdentityM(viewMatrix, 0);\n\t\tMatrix.setIdentityM(projectionMatrix, 0);\n\t\tcomputeReverseMatrix();\n\t}", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "public void cropMoleculeRecognition(){\n mOpenCameraView.disableView();\n\n Mat transformMat = Imgproc.getPerspectiveTransform(mCaptureAreaAdjusted,new MatOfPoint2f(new Point(0,0),new Point(0,400),new Point(400,400), new Point(400,0)));\n Mat croppedImage = new Mat();\n Imgproc.warpPerspective(mGray, croppedImage, transformMat, new Size(400, 400));\n\n /* cleanup the AR marker */\n int cropout = 240;\n\n croppedImage.submat(0,cropout,0,cropout).setTo(new Scalar(0));\n Core.MinMaxLocResult mmr;\n\n for(int i = 0; i<cropout; i++){\n mmr = Core.minMaxLoc(croppedImage.row(i).colRange(cropout,400));\n Core.add(croppedImage.row(i).colRange(0,cropout),new Scalar(mmr.maxVal/2),croppedImage.row(i).colRange(0,cropout));\n\n mmr = Core.minMaxLoc(croppedImage.col(i).rowRange(cropout, 400));\n Core.add(croppedImage.col(i).rowRange(0, cropout),new Scalar(mmr.maxVal/2),croppedImage.col(i).rowRange(0, cropout));\n }\n\n /*for now, just save the cropedImage*/\n /* in the live version, will need to sort out the ar marker on the top left */\n Imgcodecs.imwrite(getFilesDir().toString().concat(\"/croppedImg.png\"),croppedImage);\n Intent intent = new Intent(this,viewCapture.class);\n intent.putExtra(\"flagCaptureImage\",true);\n startActivity(intent);\n }", "private void pointCameraAt(Point3D target,Group root){\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()-xOffset);\n node.setTranslateY(node.getTranslateY()-yOffset);\n node.setTranslateZ(node.getTranslateZ()-zOffset);\n }\n\n xOffset = -target.getX(); yOffset = -target.getY(); zOffset = -target.getZ();\n\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()+xOffset);\n node.setTranslateY(node.getTranslateY()+yOffset);\n node.setTranslateZ(node.getTranslateZ()+zOffset);\n }\n }", "private Pose cameraTouchingImage(Frame frame) {\n getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n float y_pos = displaymetrics.heightPixels / 2.0f;\n float x_pos = displaymetrics.widthPixels / 2.0f;\n\n for (HitResult hit : frame.hitTest(x_pos, y_pos)) {\n Trackable trackable = hit.getTrackable();\n if (trackable instanceof AugmentedImage) {\n Pose poseHit = hit.getHitPose();\n Pose cameraPose = frame.getCamera().getPose(); // need to check if camera is decently close\n float dx = poseHit.tx() - cameraPose.tx();\n float dy = poseHit.ty() - cameraPose.ty();\n float dz = poseHit.tz() - cameraPose.tz();\n float distanceMeters = (float) Math.sqrt(dx * dx + dy * dy + dz * dz);\n\n if (distanceMeters <= .15f) {\n return poseHit;\n }\n }\n }\n return null;\n }", "public static void main(String[] args) {\n// Vector v1 = new Vector(new double[]{0, 0, 1});\n// Vector v2 = new Vector(new double[]{1, 0, 0});\n// System.out.println(v1.dot(v2));\n System.setProperty(\"sun.java2d.opengl\", \"true\");\n \n // Make World\n //WorldSpace world = new StreetWorldSpace();\n WorldSpace world = new TestWorldSpace();\n //WorldSpace world = new BigAssPolygonSpace();\n \n // Make Frame\n JFrame frame = new JFrame();\n \n // Get effective screen size\n Dimension screenSize = getScreenDimension(frame);\n\n // Set Camera View dimensions\n int width = 730;\n int height = width;\n \n // Make Camera\n Polygon[] polygons = world.getPolygons();\n Camera camera = new Camera(polygons, width, height, frame.getGraphicsConfiguration());\n image = camera.observe();\n \n // Make Camera Control Panel\n// int controlPanelHeight = 100;\n// CameraControlPanel cameraControlPanel = new CameraControlPanel(camera);\n// cameraControlPanel.setPreferredSize(new Dimension(width, controlPanelHeight));\n// cameraControlPanel.setBorder(BorderFactory.createCompoundBorder(new LineBorder(Color.BLACK, 2, false), new EmptyBorder(10, 10, 10, 10)));\n \n // Make Camera View Component\n CameraViewComponent cameraViewComponent = new CameraViewComponent(camera);\n cameraViewComponent.updateImage(image);\n cameraViewComponent.updateData(camera.getData());\n cameraViewComponent.setPreferredSize(new Dimension(width, height));\n\n // Make Camera Panel\n JPanel cameraPanel = new JPanel();\n cameraPanel.setLayout(new BoxLayout(cameraPanel, BoxLayout.Y_AXIS));\n cameraPanel.setPreferredSize(new Dimension(width, height));// + controlPanelHeight));\n cameraPanel.add(cameraViewComponent);\n //cameraPanel.add(cameraControlPanel);\n\n // Make Camera Data Panel\n //CameraDataPanel cameraDataPanel = new CameraDataPanel(camera);\n \n // Make Master Panel\n JPanel masterPanel = new JPanel();\n masterPanel.add(cameraPanel);\n //masterPanel.add(cameraDataPanel);\n \n frame.add(masterPanel);\n frame.pack();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n\n // Make keyboard listener\n KeyListener kl = new KeyListener();\n \n // Time\n int lastTenthOfASecond = 0;\n double lastMilliSecond = 0;\n double currentMilliSecond = System.currentTimeMillis();\n double averageFrameRate = 0;\n double currentFrameRate = 0;\n long totalTime = 0;\n long totalFrames = 0;\n \n // Redraw camera view upon keyboard input\n while(true) { \n int currentTenthOfASecond = (int)((currentMilliSecond%1000)/100);\n if (currentMilliSecond/100 > lastMilliSecond/100) {\n boolean cameraMoved = false;\n if (kl.isWPressed()) {\n camera.move(FORWARD); \n cameraMoved = true;\n }\n if (kl.isSPressed()) {\n camera.move(BACKWARD); \n cameraMoved = true;\n }\n if (kl.isAPressed()) {\n camera.move(LEFT); \n cameraMoved = true;\n }\n if (kl.isDPressed()) {\n camera.move(RIGHT); \n cameraMoved = true;\n }\n if (kl.isSpacePressed()) {\n camera.move(UP); \n cameraMoved = true;\n }\n if (kl.isShiftPressed()) {\n camera.move(DOWN); \n cameraMoved = true;\n }\n if (cameraViewComponent.wasUpdated()) {\n cameraMoved = true;\n }\n// if (cameraControlPanel.getWasCameraChanged() || cameraViewComponent.wasUpdated()) {\n// cameraMoved = true;\n// }\n if (cameraMoved) {\n image = camera.observe();\n cameraViewComponent.updateImage(image);\n //cameraDataPanel.update();\n //cameraControlPanel.update(); \n totalFrames++;\n totalTime += currentMilliSecond-lastMilliSecond + 1;\n averageFrameRate = (totalFrames)/(totalTime/1000.0); \n currentFrameRate = (1000.0/(currentMilliSecond-lastMilliSecond));\n \n }\n }\n if (currentTenthOfASecond > lastTenthOfASecond) {\n \n String[] cameraData = camera.getData();\n String[] frameData = {\n \"Average Framerate: \" + String.format(\"%.2f\", averageFrameRate), \n \"Current Framerate: \" + String.format(\"%.2f\",currentFrameRate)\n };\n String[] data = new String[cameraData.length + frameData.length ];\n System.arraycopy(cameraData, 0, data, 0, cameraData.length);\n System.arraycopy(frameData, 0, data, cameraData.length, frameData.length);\n cameraViewComponent.updateData(data);\n } \n lastTenthOfASecond = currentTenthOfASecond;\n lastMilliSecond = currentMilliSecond;\n currentMilliSecond = System.currentTimeMillis(); \n }\n }", "protected synchronized void resetModelViewMatrix()\n {\n Matrix4d transform = new Matrix4d();\n // translate so that the viewer is at the origin\n Matrix4d translation = new Matrix4d();\n translation.setTranslation(myPosition.getLocation().multiply(-1.));\n // rotate to put the viewer pointing in the -z direction with the up\n // vector along the +y axis.\n Quaternion quat = Quaternion.lookAt(myPosition.getDir().multiply(-1.), myPosition.getUp());\n Matrix4d rotation = new Matrix4d();\n rotation.setRotationQuaternion(quat);\n // set the transform.\n transform.multLocal(rotation);\n transform.multLocal(translation);\n myModelViewMatrix = transform.toFloatArray();\n setInverseModelViewMatrix(transform.invert());\n clearModelToWindowTransform();\n }", "public void onCameraViewStarted(int width, int height) {\n m_lastOutput = new Mat(height, width, CvType.CV_8UC4);\n\n m_draw = new Mat(height, width, CvType.CV_8UC4);\n\n m_gray = new Mat(height, width, CvType.CV_8UC1);\n\n\n // area detection size mat\n calculateDetectArea(width, height);\n m_sub_draw = new Mat(m_draw, r_detectArea);\n m_sub_gray = new Mat(m_gray, r_detectArea);\n\n m_gui_area = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n createGuiSdk();\n\n m_AT_finished = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_AT_pending = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_sdk = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n\n at_findSdk = new AT_findSdk();\n\n\n sdkFound = false;\n outputChoice = false;\n }", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "private void onCameraModeChangedTo(int n) {\n Camera.Parameters parameters = this.mStateMachine.getCurrentCameraParameters(false);\n if (!(parameters != null && this.isHeadUpDesplayReady())) {\n return;\n }\n int n2 = parameters.getPreviewSize().width;\n int n3 = parameters.getPreviewSize().height;\n Rect rect = LayoutDependencyResolver.getSurfaceRect((Activity)this.mActivity, (float)n2 / (float)n3);\n PositionConverter.getInstance().setSurfaceSize(rect.width(), rect.height());\n PositionConverter.getInstance().setPreviewSize(n2, n3);\n this.mFocusRectangles.updateDevicePreviewSize(n2, n3);\n this.mFocusRectangles.clearExceptTouchFocus();\n switch (n) {\n default: {\n throw new IllegalArgumentException(\"ViewFinder.onCameraModeChangedTo():[INVALID]\");\n }\n case 1: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n break;\n }\n case 2: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_RECORDING);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n }\n }\n this.setOrientation(this.getOrientation());\n }", "private void transformation(GL gl)\n {\n\t\t// Make X axis face forward, Y right, Z up\n\t\t// (map ZXY to XYZ)\n\t\tgl.glRotated(-90, 1, 0, 0);\n\t\tgl.glRotated(-90, 0, 0, 1);\n\t \n\t\tif (drawBugView.value) {\n\t\t // ---- \"Bug cam\" transformation (for mainBug)\n\t\t\t// this is the inverse of the M transformation that places the bug in the scene (based on mainbug pos and vel)\n double angle = Math.atan2(mainBug.vel.y, mainBug.vel.x);\n \t\tgl.glRotated(Math.toDegrees(Math.PI - angle), 0, 0, 1);\n \t\t\n \t\t//drawing a bit above the z axis so we can see the ground\n\t\t\tgl.glTranslated(-mainBug.pos.x, -mainBug.pos.y, -mainBug.pos.z-0.2);\n\t\t} else {\n\t\t // ---- Ordinary scene transformation\n\t\n\t\t // Move camera back so that scene is visible\n\t\t gl.glTranslated(-20, 0, 0);\n\t\t \n\t\t // Translate by Zoom/Horiz/Vert\n\t\t gl.glTranslated(tZ.value, tH.value, tV.value);\n\t\t \n\t\t // Rotate by Alt/Azim\n\t\t gl.glRotated(rAlt.value, 0, 1, 0);\n\t\t gl.glRotated(rAzim.value, 0, 0, 1);\n\t\t}\n }", "private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(previewConfig);\n preview.setOnPreviewOutputUpdateListener(output -> {\n ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent();\n parent.removeView(dataBinding.viewFinder);\n parent.addView(dataBinding.viewFinder, 0);\n dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n });\n\n\n // Create configuration object for the image capture use case\n // We don't set a resolution for image capture; instead, we\n // select a capture mode which will infer the appropriate\n // resolution based on aspect ration and requested mode\n ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build();\n\n // Build the image capture use case and attach button click listener\n ImageCapture imageCapture = new ImageCapture(imageCaptureConfig);\n dataBinding.captureButton.setOnClickListener(v -> {\n File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + \".jpg\");\n imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() {\n @Override\n public void onImageSaved(@NonNull File file) {\n String msg = \"Photo capture succeeded: \" + file.getAbsolutePath();\n Log.d(\"CameraXApp\", msg);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n\n @Override\n public void onError(@NonNull ImageCapture.ImageCaptureError\n imageCaptureError, @NonNull String message, @Nullable Throwable cause) {\n String msg = \"Photo capture failed: \" + message;\n Log.e(\"CameraXApp\", msg, cause);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n });\n });\n\n\n // Setup image analysis pipeline that computes average pixel luminance\n ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(\n ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build();\n // Build the image analysis use case and instantiate our analyzer\n ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig);\n analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer());\n\n CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase);\n }", "protected void updatePreviewDisplayRotation(Size previewSize, TextureView textureView) {\n int rotationDegrees = 0;\n MCameraActivity activity = mCameraActivity;\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n Configuration config = activity.getResources().getConfiguration();\n // Get UI display rotation\n switch (displayRotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n }\n // Get device natural orientation\n int deviceOrientation = Configuration.ORIENTATION_PORTRAIT;\n if ((rotationDegrees % 180 == 0 &&\n config.orientation == Configuration.ORIENTATION_LANDSCAPE) ||\n ((rotationDegrees % 180 != 0 &&\n config.orientation == Configuration.ORIENTATION_PORTRAIT))) {\n deviceOrientation = Configuration.ORIENTATION_LANDSCAPE;\n }\n // Rotate the buffer dimensions if device orientation is portrait.\n int effectiveWidth = previewSize.getWidth();\n int effectiveHeight = previewSize.getHeight();\n if (deviceOrientation == Configuration.ORIENTATION_PORTRAIT) {\n effectiveWidth = previewSize.getHeight();\n effectiveHeight = previewSize.getWidth();\n }\n // Find and center view rect and buffer rect\n Matrix transformMatrix = textureView.getTransform(null);\n int viewWidth = textureView.getWidth();\n int viewHeight = textureView.getHeight();\n RectF viewRect = new RectF(0, 0, viewWidth, viewHeight);\n RectF bufRect = new RectF(0, 0, effectiveWidth, effectiveHeight);\n float centerX = viewRect.centerX();\n float centerY = viewRect.centerY();\n bufRect.offset(centerX - bufRect.centerX(), centerY - bufRect.centerY());\n // Undo ScaleToFit.FILL done by the surface\n transformMatrix.setRectToRect(viewRect, bufRect, Matrix.ScaleToFit.FILL);\n // Rotate buffer contents to proper orientation\n transformMatrix.postRotate((360 - rotationDegrees) % 360, centerX, centerY);\n if ((rotationDegrees % 180) == 90) {\n int temp = effectiveWidth;\n effectiveWidth = effectiveHeight;\n effectiveHeight = temp;\n }\n // Scale to fit view, cropping the longest dimension\n float scale =\n Math.max(viewWidth / (float) effectiveWidth, viewHeight / (float) effectiveHeight);\n transformMatrix.postScale(scale, scale, centerX, centerY);\n Handler handler = new Handler(Looper.getMainLooper());\n class TransformUpdater implements Runnable {\n TextureView mView;\n Matrix mTransformMatrix;\n\n TransformUpdater(TextureView view, Matrix matrix) {\n mView = view;\n mTransformMatrix = matrix;\n }\n\n @Override\n public void run() {\n mView.setTransform(mTransformMatrix);\n }\n }\n handler.post(new TransformUpdater(textureView, transformMatrix));\n }", "public void vreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= cols-1;\n //invariant: columns 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap column h with column k\n // invariant: pixels 0..c-1 of columns h and k have been swapped\n for (int c= 0; c != rows; c= c+1) {\n currentIm.swapPixels(c, h, c, k);\n }\n \n h= h+1; k= k-1;\n }\n \n }", "public SVector3d getPositionCam() {\n\t\treturn transCamera;\n\t}", "private void setupCamera(GL gl) {\r\n\t\tgl.glMatrixMode(GL.GL_MODELVIEW);\r\n\t\t// If there's a rotation to make, do it before everything else\r\n\t\tgl.glLoadIdentity();\r\n if (rotationMatrix == null) {\r\n\t\t\trotationMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t}\r\n\t\tif (nextRotationAxis != null) {\r\n\t\t\tgl.glRotated(nextRotationAngle, nextRotationAxis.x, nextRotationAxis.y, nextRotationAxis.z);\r\n\t\t\tnextRotationAngle = 0;\r\n\t\t\tnextRotationAxis = null;\r\n\t\t}\r\n\t\tgl.glMultMatrixd(rotationMatrix, 0);\r\n\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t// Move the objects according to the camera (instead of moving the camera)\r\n\t\tif (zoom != 0) {\r\n\t\t\tdouble[] oldMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, oldMatrix, 0);\r\n\t\t\tgl.glLoadIdentity();\r\n\t\t\tgl.glTranslated(0, 0, zoom);\r\n\t\t\tgl.glMultMatrixd(oldMatrix, 0);\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View view) {\n\n Bitmap bit = bitmap.copy(Bitmap.Config.ARGB_8888, false);\n Mat src = new Mat(bit.getHeight(), bit.getWidth(), CvType.CV_8UC(3));\n Utils.bitmapToMat(bit, src);\n Imgproc.cvtColor(src, src, Imgproc.COLOR_BGR2GRAY);\n Mat dst = new Mat(bit.getHeight(), bit.getWidth(), CvType.CV_8UC1);\n Mat kernel = new Mat(new Size(3, 3), CvType.CV_32FC1, new Scalar(0));\n kernel.put(0, 0, -1, 0, -1);\n kernel.put(1, 0, 0, 5, 0);\n kernel.put(2, 0, -1, 0, -1);\n Imgproc.filter2D(src, dst, src.depth(), kernel);\n Utils.matToBitmap(dst, bitmap);\n img.setImageBitmap(bitmap);\n }", "public void updateTransformMatrix(float[] fArr) {\n boolean z;\n float f;\n float f2;\n boolean z2 = true;\n if (!this.mVideoStabilizationCropped || !ModuleManager.isVideoModule()) {\n f2 = 1.0f;\n f = 1.0f;\n z = false;\n } else {\n f2 = MOVIE_SOLID_CROPPED_X * 1.0f;\n f = MOVIE_SOLID_CROPPED_Y * 1.0f;\n z = true;\n }\n if (this.mNeedCropped) {\n f2 *= this.mScaleX;\n f *= this.mScaleY;\n z = true;\n }\n if (this.mDisplayOrientation == 0) {\n z2 = z;\n }\n if (z2) {\n Matrix.translateM(fArr, 0, 0.5f, 0.5f, 0.0f);\n Matrix.rotateM(fArr, 0, (float) this.mDisplayOrientation, 0.0f, 0.0f, 1.0f);\n Matrix.scaleM(fArr, 0, f2, f, 1.0f);\n Matrix.translateM(fArr, 0, -0.5f, -0.5f, 0.0f);\n }\n }", "@Override\n\tpublic void onCameraViewStopped() {\n\n\t}", "public void onCamera();", "public void openCamera() {\n \n\n }", "public int getCameraSensorRotation();", "private void rotateSeaperch(ImageView imageView, float x, float y, float z){\n\t\timageView.setRotationX(x);\n\t\timageView.setRotation(y);\n\t\timageView.setRotationY(z);\n\t}", "@Override\n public Camera setupCamera() {\n mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);\n try {\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setPreviewSize(mWidth, mHeight);\n parameters.setPreviewFormat(mFormat);\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : parameters.getSupportedPreviewSizes()) {\n Log.d(TAG, \"SIZE:\" + size.width + \"x\" + size.height);\n }\n for (Integer format : parameters.getSupportedPreviewFormats()) {\n Log.d(TAG, \"FORMAT:\" + format);\n }\n\n List<int[]> fps = parameters.getSupportedPreviewFpsRange();\n for (int[] count : fps) {\n Log.d(TAG, \"T:\");\n for (int data : count) {\n Log.d(TAG, \"V=\" + data);\n }\n }\n mCamera.setParameters(parameters);\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (mCamera != null) {\n mWidth = mCamera.getParameters().getPreviewSize().width;\n mHeight = mCamera.getParameters().getPreviewSize().height;\n }\n return mCamera;\n }", "private static float[] projectionMatrixFromCameraIntrinsics(TangoCameraIntrinsics intrinsics) {\n // Uses frustumM to create a projection matrix taking into account calibrated camera\n // intrinsic parameter.\n // Reference: http://ksimek.github.io/2013/06/03/calibrated_cameras_in_opengl/\n float near = 0.1f;\n float far = 100;\n\n float xScale = near / (float) intrinsics.fx;\n float yScale = near / (float) intrinsics.fy;\n float xOffset = (float) (intrinsics.cx - (intrinsics.width / 2.0)) * xScale;\n // Color camera's coordinates has y pointing downwards so we negate this term.\n float yOffset = (float) -(intrinsics.cy - (intrinsics.height / 2.0)) * yScale;\n\n float m[] = new float[16];\n Matrix.frustumM(m, 0,\n xScale * (float) -intrinsics.width / 2.0f - xOffset,\n xScale * (float) intrinsics.width / 2.0f - xOffset,\n yScale * (float) -intrinsics.height / 2.0f - yOffset,\n yScale * (float) intrinsics.height / 2.0f - yOffset,\n near, far);\n return m;\n }", "public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n mRgba = inputFrame.rgba();\n Imgproc.resize(mRgba, mRgba, new Size(100,100));\n // Rotate mRgba 90 degrees\n Core.transpose(mRgba, mRgbaT);\n Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);\n Core.flip(mRgbaF, mRgba, 1 );\n //Blurs for smoother edgges\n Imgproc.blur(mRgba, mRgba, new Size(8,8));\n\n //Adds the counter to the instantiation of each object as it counts the frame number\n Object blue = new Object(\"blue\", counter);\n Object green = new Object(\"green\", counter);\n Object red = new Object(\"red\", counter);\n\n Mat threshold = new Mat();\n Mat HSV = new Mat();\n //Changes from BGR to HSV as HSV allow much easier colour ranges for creating a binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_RGB2HSV);\n //Creates blue binary mat\n Core.inRange(HSV, blue.HSVMin, blue.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(blue,threshold,HSV,mRgba, blue.type, counter);\n\n //TODO disabled the green markers for now\n /*\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, green.HSVMin, green.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(green,threshold,HSV,mRgba, green.type, counter);\n */\n //creates red binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, red.HSVMin, red.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(red,threshold,HSV,mRgba, red.type, counter);\n\n //Colours the line that registers if a step has occured accordingly\n if(redGreenLine || blueGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(0, 255, 0), 2);\n }\n else if(!redGreenLine && !redGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(255, 0, 0), 2);\n }\n //Will write each frame to storage once the reoord button is pressed. This is used for setting ground truth data\n if(enableVideo) {\n Mat output = new Mat();\n Imgproc.cvtColor(mRgba, output, Imgproc.COLOR_RGB2BGR);\n Imgproc.resize(output, output, new Size(100,100));\n Imgcodecs.imwrite(fileName + BUILDING_NAME + FLOOR_NUMBER + \"(\" + startLat + \",\" + startLong + \")\" + \"to\" + \"(\" + endLat + \",\" + endLong + \")\" + Integer.toString(counter) + \".bmp\", output);\n }\n\n counter++;\n\n return mRgba; // This function must return\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.searchfragment_pic, container, false);\n cameraView = (CameraView) v.findViewById(R.id.cameraView);\n textViewResult = (TextView) v.findViewById(R.id.textViewResult);\n textViewResult.setMovementMethod(new ScrollingMovementMethod());\n\n btnDetectObject = (Button) v.findViewById(R.id.btnDetectObject);\n btnSearchObject = (Button) v.findViewById(R.id.btnSearchObject);\n\n cameraView.setCameraListener(new CameraListener() {\n @Override\n public void onPictureTaken(byte[] picture) {\n super.onPictureTaken(picture);\n\n Bitmap bitmap = BitmapFactory.decodeByteArray(picture, 0, picture.length);\n\n bitmap = Bitmap.createScaledBitmap(bitmap, INPUT_SIZE, INPUT_SIZE, false);\n\n final List<Classifier.Recognition> results = classifier.recognizeImage(bitmap);\n\n textViewResult.setText(results.toString());\n best = results.get(0).getChineseTitle();\n }\n });\n\n btnSearchObject.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), PicSearchResult.class);\n intent.putExtra(\"SEARCH_ITEMS\", best);\n getContext().startActivity(intent);\n }\n });\n\n btnDetectObject.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n cameraView.captureImage();\n }\n });\n\n initTensorFlowAndLoadModel();\n return v;\n }", "private void setView( boolean reset_zoom )\n {\n float azimuth = getAzimuthAngle();\n float altitude = getAltitudeAngle();\n float distance = getDistance();\n\n float r = (float)(distance * Math.cos( altitude * Math.PI/180.0 ));\n\n float x = (float)(r * Math.cos( azimuth * Math.PI/180.0 ));\n float y = (float)(r * Math.sin( azimuth * Math.PI/180.0 ));\n float z = (float)(distance * Math.sin( altitude * Math.PI/180.0 ));\n\n float vrp[] = getVRP().get();\n \n setCOP( new Vector3D( x + vrp[0], y + vrp[1], z + vrp[2] ) );\n\n apply( reset_zoom );\n }", "public Point convertImageToView(Point img) {\n\t\treturn null;\n\t}", "public void openCamera(View view){\n if (isInspecting) {\n Context context = App.getContext();\n Intent intent = new Intent(Inspector.this, PhotoManager.class);\n intent.putExtra(\"blueprint\", blueprint);\n intent.putExtra(\"isInspecting\", isInspecting);\n intent.putExtra(\"filename\", filename);\n View parent = (View) view.getParent();\n String tag = parent.getTag().toString();\n intent.putExtra(\"cameraID\", tag);\n LogManager.reportStatus(context, \"INSPECTOR\", \"parent tag = \" + tag);\n startActivity(intent);\n }\n }", "ArrayList<Point3D> CameraRotate(ArrayList<Point3D>three_list){\r\n\t\tdouble theta=((double)pCanvas.iterations/1000)*2*Math.PI; //updates theta\r\n\t\tif(rotateCamera==1){\r\n\t\t\tthree_list=utils.rotateAllPointsAroundX(three_list, -theta);\r\n\r\n\t\t}\r\n\t\tif(rotateCamera==2){\r\n\t\tthree_list=utils.rotateAllPointsAroundY(three_list, -theta);\r\n\t\t}\r\n\t\tif(rotateCamera==3){\r\n\t\t\tthree_list=utils.rotateAllPointsAroundZ(three_list, -theta);\r\n\r\n\t\t}\r\n\t\treturn three_list;\r\n\t}", "private void calculateCameraPosition(float hDistance, float vDistance)\n\t{\n\t\tfloat theta=player.getRotY()+angleAroundPlayer;\n\t\tfloat offsetX=hDistance*(float)Math.sin(Math.toRadians(theta));\n\t\tfloat offsetZ=hDistance*(float)Math.cos(Math.toRadians(theta));\n\t\t\n\t\t//calculate camera position\n\t\tposition.x=player.getPosition().x-offsetX;\n\t\tposition.z=player.getPosition().z-offsetZ;\n\t\tposition.y=player.getPosition().y+vDistance;\n\t}", "void applyRotationMatrix() {\n for (int i = 0; i < coors.length; i++) {\n for (int j = 0; j < coors[i].length; j++) {\n newCoors[i][j] = coors[i][0] * R[j][0] + coors[i][1] * R[j][1] + coors[i][2] * R[j][2];\n }\n // add perspective\n float scale = map(Math.abs(newCoors[i][2]), 0, (float) (halfSize * Math.sqrt(3)), 1, 1.5f);\n if (newCoors[i][2] < 0) {\n scale = 2f - scale;\n }\n for (int j = 0; j < 2; j++) {\n newCoors[i][j] *= scale;\n }\n }\n // to R2\n // just dont use Z\n setPathAndAlpha();\n }", "private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "private /* varargs */ void onViewFinderStateChanged(StateMachine.CaptureState captureState, Object ... arrobject) {\n switch (.$SwitchMap$com$sonyericsson$android$camera$fastcapturing$StateMachine$CaptureState[captureState.ordinal()]) {\n default: {\n return;\n }\n case 3: {\n super.resumeView();\n this.mSurfaceView.setVisibility(0);\n return;\n }\n case 4: {\n this.mCurrentDisplayingUiComponent = null;\n super.changeToPhotoIdleView(false);\n if (arrobject != null && arrobject.length != 0) {\n if ((BaseFastViewFinder.UiComponentKind)arrobject[0] == BaseFastViewFinder.UiComponentKind.ZOOM_BAR) return;\n this.requestToDimSystemUi();\n return;\n }\n this.requestToDimSystemUi();\n return;\n }\n case 5: {\n super.changeToPhotoSelftimerView();\n return;\n }\n case 6: \n case 7: {\n super.changeToPhotoZoomingView();\n return;\n }\n case 8: {\n this.mCurrentDisplayingUiComponent = (BaseFastViewFinder.UiComponentKind)arrobject[0];\n super.changeToPhotoDialogView(this.mCurrentDisplayingUiComponent);\n this.requestToRecoverSystemUi();\n return;\n }\n case 9: \n case 10: {\n this.requestToRemoveSystemUi();\n super.changeToPhotoFocusSearchView();\n return;\n }\n case 11: {\n super.changeToPhotoFocusSearchView();\n return;\n }\n case 12: \n case 13: {\n super.changeToPhotoFocusDoneView((Boolean)arrobject[0]);\n return;\n }\n case 14: {\n super.changeToPhotoCaptureWaitForAfDoneView();\n return;\n }\n case 15: {\n super.changeToPhotoCaptureView();\n return;\n }\n case 16: \n case 17: {\n super.changeToPhotoBurstView((Boolean)arrobject[0]);\n return;\n }\n case 18: {\n if (this.mFocusRectangles != null) {\n this.mFocusRectangles.clearExceptTouchFocus();\n }\n this.getBaseLayout().showContentsViewController();\n return;\n }\n case 19: {\n super.changeToVideoRecordingView();\n this.requestToDimSystemUi();\n return;\n }\n case 20: {\n super.changeToVideoRecordingView();\n if (arrobject != null && arrobject.length != 0) {\n if ((BaseFastViewFinder.UiComponentKind)arrobject[0] == BaseFastViewFinder.UiComponentKind.ZOOM_BAR) return;\n this.requestToDimSystemUi();\n return;\n }\n this.requestToDimSystemUi();\n return;\n }\n case 24: \n case 25: {\n super.changeToVideoZoomingWhileRecordingView();\n return;\n }\n case 26: {\n super.hideTakePictureFeedbackView();\n this.mSurfaceView.setVisibility(8);\n super.pauseView();\n super.changeToPauseView();\n return;\n }\n case 27: {\n if (this.mFocusRectangles != null) {\n this.mFocusRectangles.clearAllFocus();\n }\n super.changeToPhotoIdleView(false);\n this.requestToDimSystemUi();\n return;\n }\n case 28: {\n this.mSurfaceView.getHolder().removeCallback((SurfaceHolder.Callback)this);\n this.mSurfaceView = null;\n super.hideTakePictureFeedbackView();\n this.mSurfaceBlinderView = null;\n this.mKeyEventTranslator = null;\n this.release();\n super.getDownHeadUpDisplay();\n return;\n }\n case 29: {\n super.changeToVideoRecordingPauseView();\n return;\n }\n case 30: {\n this.mVideoAutoReviewSetting = null;\n return;\n }\n case 31: \n }\n this.requestToRemoveSystemUi();\n super.changeToReadyForRecordView();\n }", "public void prepareCamera() {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n autoFocusHandler = new Handler();\n mCamera = getCameraInstance();\n\n /* Instance barcode scanner */\n scanner = new ImageScanner();\n scanner.setConfig(0, Config.X_DENSITY, 3);\n scanner.setConfig(0, Config.Y_DENSITY, 3);\n\n mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);\n\n cameraPreview.addView(mPreview);\n\n }", "@Override\n public void onDrawShadow(Canvas canvas) {\n\n // scale the image relating to a pivot point (reference point)\n canvas.scale(view.getScaleX(), view.getScaleY(), width / 2, height / 2);\n\n // rotate the image relating to a pivot point (reference point)\n canvas.rotate(view.getRotation(), width / 2, height / 2);\n\n // Calculate the canvas matrix with the specified translation with given\n // distances to x and y\n canvas.translate((width - view.getWidth()) / 2,\n (height - view.getHeight()) / 2);\n\n // call parent onDrawShadow function\n super.onDrawShadow(canvas);\n }", "@Override\n public void onDrawShadow(Canvas canvas) {\n\n // scale the image relating to a pivot point (reference point)\n canvas.scale(view.getScaleX(), view.getScaleY(), width / 2, height / 2);\n\n // rotate the image relating to a pivot point (reference point)\n canvas.rotate(view.getRotation(), width / 2, height / 2);\n\n // Calculate the canvas matrix with the specified translation with given\n // distances to x and y\n canvas.translate((width - view.getWidth()) / 2,\n (height - view.getHeight()) / 2);\n\n // call parent onDrawShadow function\n super.onDrawShadow(canvas);\n }", "public void chooseCamera() {\n if (cameraFront) {\n int cameraId = findBackFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n } else {\n int cameraId = findFrontFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n }\n }", "private void adjustEViewPosition() {\n double aVec[] = theRocket.getCoordSys().getPositionVec();\n CoordSys eViewSys = new CoordSys();\n eViewSys.setZAxis(VMath.normalize(aVec));\n\n aVec = VMath.vecMultByScalar(aVec, 2.5);\n eViewSys.setPositionAsVec(aVec);\n\n double[] zAxis = VMath.normalize(eViewSys.zAxis().getVectorForm());\n double[] yAxis = VMath.normalize(theRocket.getCoordSys().yAxis().getVectorForm());\n double[] xAxis = VMath.normalize(VMath.crossprd(yAxis, zAxis));\n yAxis = VMath.crossprd(zAxis, xAxis);\n eViewSys.setXAxis(xAxis);\n eViewSys.setYAxis(yAxis);\n eViewSys.setZAxis(zAxis);\n\n eViewSys.xRotate(180);\n eViewSys.zRotate(-90);\n eView.setViewingCoordSys(eViewSys);\n }", "@Override\n public void onCameraMoveStarted(int i) {\n\n }", "private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tBitmap bmp=BitmapFactory.decodeFile(Common.PATH);\n\t\tsetContentView(R.layout.pic_take_preview);\n\t\tiv=(ImageView)findViewById(R.id.preview_imageview);\n\t\tiv.setImageBitmap(bmp);\n\t\tmatrix=new Matrix();\n\t\tmatrix.set(iv.getImageMatrix());\n\t\tmatrix.setRotate(90);\t\n\t\tmid=new PointF();\n\t\tsetMid();\n\t\tDisplayMetrics dm=new DisplayMetrics();\n\t\tthis.getWindowManager().getDefaultDisplay().getMetrics(dm); \n\t\tint displayWidth=dm.heightPixels;\n\t\tmatrix.postTranslate(mid.x+displayWidth,mid.y);\n\t\tiv.setImageMatrix(matrix);\n\t\tiv.setOnTouchListener(new MulitPointTouchListener());\n\t\tiv.invalidate();\n\t\t\n\t\tcamera=new StartCamera(this);\n\t}", "private void setCamera(GL2 gl, GLU glu)\n {\n Boundary bc = simulation.getBoundary();\n int w = (int) (bc.getMaxSize(0)-bc.getMinSize(0));\n int h = (int) (bc.getMaxSize(1)-bc.getMinSize(1));\n\n gl.glViewport(0, 0, w, h);\n\n\n gl.glMatrixMode(GL2.GL_PROJECTION);\n gl.glLoadIdentity();\n //opening angle, ratio of height and width, near and far\n glu.gluPerspective(80.0, 1,0.1,3*( bc.getMaxSize(2)-bc.getMinSize(2)));\n\n gl.glTranslatef(0.5f*(float) bc.getMinSize(0),-0.5f*(float) bc.getMinSize(1),1.5f*(float) bc.getMinSize(2));\n // gl.glTranslatef(0.5f*(float) (bc.getMaxSize(0)+bc.getMinSize(0)),0.5f*(float)(bc.getMaxSize(1)+ bc.getMinSize(1)),(float) -(bc.getMaxSize(2)-bc.getMinSize(2)));\n\n }", "public void vignette() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n int middleRow = rows/2; //Height of the right angle\n int middleCol = cols/2; //Width of the right angle\n double hfD = (Math.sqrt(Math.pow(rows,2)+Math.pow(cols,2)))/2;\n \n //Outer: Rows, Inner: Columns\n for(int rr = 0; rr < rows; rr++){\n \n for(int cc = 0; cc < cols; cc++){\n \n int rgb= currentIm.getPixel(rr,cc);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double currentDistance = Math.sqrt(Math.pow(Math.abs(middleRow-rr),2)+\n Math.pow(Math.abs(middleCol-cc),2));\n \n double vigValue = 1-Math.pow((currentDistance/hfD),2);\n \n red = red * vigValue;\n green = green * vigValue;\n blue = blue * vigValue;\n \n currentIm.setPixel(rr, cc,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n }\n \n }", "void initFromCameraParameters(OpenCamera camera) {\n Camera.Parameters parameters = camera.getCamera().getParameters();\n WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = manager.getDefaultDisplay();\n\n int displayRotation = display.getRotation();\n int cwRotationFromNaturalToDisplay;\n switch (displayRotation) {\n case Surface.ROTATION_0:\n cwRotationFromNaturalToDisplay = 0;\n break;\n case Surface.ROTATION_90:\n cwRotationFromNaturalToDisplay = 90;\n break;\n case Surface.ROTATION_180:\n cwRotationFromNaturalToDisplay = 180;\n break;\n case Surface.ROTATION_270:\n cwRotationFromNaturalToDisplay = 270;\n break;\n default:\n // Have seen this return incorrect values like -90\n if (displayRotation % 90 == 0) {\n cwRotationFromNaturalToDisplay = (360 + displayRotation) % 360;\n } else {\n throw new IllegalArgumentException(\"Bad rotation: \" + displayRotation);\n }\n }\n Log.i(TAG, \"Display at: \" + cwRotationFromNaturalToDisplay);\n\n int cwRotationFromNaturalToCamera = camera.getOrientation();\n Log.i(TAG, \"Camera at: \" + cwRotationFromNaturalToCamera);\n\n // Still not 100% sure about this. But acts like we need to flip this:\n if (camera.getFacing() == CameraFacing.FRONT) {\n cwRotationFromNaturalToCamera = (360 - cwRotationFromNaturalToCamera) % 360;\n Log.i(TAG, \"Front camera overriden to: \" + cwRotationFromNaturalToCamera);\n }\n\n /*\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n String overrideRotationString;\n if (camera.getFacing() == CameraFacing.FRONT) {\n overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION_FRONT, null);\n } else {\n overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION, null);\n }\n if (overrideRotationString != null && !\"-\".equals(overrideRotationString)) {\n Log.i(TAG, \"Overriding camera manually to \" + overrideRotationString);\n cwRotationFromNaturalToCamera = Integer.parseInt(overrideRotationString);\n }\n */\n\n cwRotationFromDisplayToCamera =\n (360 + cwRotationFromNaturalToCamera - cwRotationFromNaturalToDisplay) % 360;\n Log.i(TAG, \"Final display orientation: \" + cwRotationFromDisplayToCamera);\n if (camera.getFacing() == CameraFacing.FRONT) {\n Log.i(TAG, \"Compensating rotation for front camera\");\n cwNeededRotation = (360 - cwRotationFromDisplayToCamera) % 360;\n } else {\n cwNeededRotation = cwRotationFromDisplayToCamera;\n }\n Log.i(TAG, \"Clockwise rotation from display to camera: \" + cwNeededRotation);\n\n Point theScreenResolution = new Point();\n display.getSize(theScreenResolution);\n screenResolution = theScreenResolution;\n Log.i(TAG, \"Screen resolution in current orientation: \" + screenResolution);\n cameraResolution = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);\n Log.i(TAG, \"Camera resolution: \" + cameraResolution);\n bestPreviewSize = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);\n Log.i(TAG, \"Best available preview size: \" + bestPreviewSize);\n\n boolean isScreenPortrait = screenResolution.x < screenResolution.y;\n boolean isPreviewSizePortrait = bestPreviewSize.x < bestPreviewSize.y;\n\n if (isScreenPortrait == isPreviewSizePortrait) {\n previewSizeOnScreen = bestPreviewSize;\n } else {\n previewSizeOnScreen = new Point(bestPreviewSize.y, bestPreviewSize.x);\n }\n Log.i(TAG, \"Preview size on screen: \" + previewSizeOnScreen);\n }", "@Override\n \t\t\t\tpublic void doWorldPerspective() {\n \n \t\t\t\t}", "private void fixView(final float newX, final float newY) {\n final float x = this.worldView.getX();\n final float y = this.worldView.getY();\n final float scale = this.worldView.getScale();\n final int width = this.worldView.getMasterImage().getWidth();\n final int height = this.worldView.getMasterImage().getHeight();\n\n float updatedX = Math.max(0, newX);\n float updatedY = Math.max(0, newY);\n\n\n if (width * scale + x > width) {\n updatedX = width - (width * scale);\n }\n if (height * scale + y > height) {\n updatedY = height - (height * scale);\n }\n\n this.worldView.setX(updatedX);\n this.worldView.setY(updatedY);\n\n }", "public void rotate(double deg) {\n deg = deg % 360;\n// System.out.println(\"Stopni:\" + deg);\n double e = 0;\n double f = 0;\n\n// for(int i = 0; i < pixels.length; i++) {\n// for(int j = 0; j < pixels[i].length; j++) {\n// e += pixels[i][j].getX();\n// f += pixels[i][j].getY();\n// }\n// }\n //e = e / (pixels.length * 2);\n //f = f / (pixels[0].length * 2);\n e = pixels.length / 2;\n f = pixels[0].length / 2;\n System.out.println(e);\n System.out.println(f);\n\n// System.out.println(e + \":\" + f);\n Matrix affineTransform;\n Matrix translateMinus = Matrix.translateRotate(-e, -f);\n Matrix translatePlus = Matrix.translateRotate(e, f);\n Matrix movedTransform = Matrix.multiply(translateMinus, Matrix.rotate(deg));\n //movedTransform.display();\n affineTransform = Matrix.multiply(movedTransform, translatePlus);\n //affineTransform.display();\n\n for(int i = 0; i < pixels.length; i++) {\n for(int j = 0; j < pixels[i].length; j++) {\n double[][] posMatrix1 = {{pixels[i][j].getX()}, {pixels[i][j].getY()}, {1}};\n Matrix m1 = new Matrix(posMatrix1);\n Matrix result1;\n result1 = Matrix.multiply(Matrix.transpose(affineTransform.v), m1);\n\n pixels[i][j].setX(Math.round(result1.v[0][0]));\n pixels[i][j].setY(Math.round(result1.v[1][0]));\n }\n }\n\n\n }", "private void setCameraView() {\n double bottomBoundary = mUserPosition.getLatitude() - .1;\n double leftBoundary = mUserPosition.getLongitude() - .1;\n double topBoundary = mUserPosition.getLatitude() + .1;\n double rightBoundary = mUserPosition.getLongitude() + .1;\n\n mMapBoundary = new LatLngBounds(\n new LatLng(bottomBoundary, leftBoundary),\n new LatLng(topBoundary, rightBoundary)\n );\n\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(mMapBoundary, 500,500,1));\n }", "private void changeCalculatePreviewOrientation() {\n\n if (mHolder.getSurface() == null) {\n // preview surface does not exist\n Log.d(TAG, \"Preview surface does not exist\");\n return;\n }\n\n // stop preview before making changes\n stopCamera();\n\n int orientation = calculatePreviewOrientation(mCameraInfo, mDisplayOrientation);\n mCamera.setDisplayOrientation(orientation);\n\n startCamera();\n }", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "void initializeCamera() {\n camera_linear = (LinearLayout) findViewById(R.id.camera_linear);\n //The preview frame is overlayed on the layout which shows the camera view.\n preview = (FrameLayout) findViewById(R.id.camera_preview);\n //Get an instance of the phone's camera.\n mCamera = cameraRecorder.getCameraInstance();\n //Find content fort the camera preview frame using the instance of the camera initialized.\n mPreview = new CameraPreview(getApplicationContext(), mCamera);\n //Apply the camera previes content from the camera to the preview frame itself.\n preview.addView(mPreview);\n }", "private void setupCameraOutputs(int width, int height) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" width: \" + width +\n \" height: \" + height);\n\n Activity activity = getActivity();\n CameraManager manager =\n (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE);\n Point displaySize = new Point();\n activity.getWindowManager().getDefaultDisplay().getSize(displaySize);\n int rotatedPreviewWidth = width;\n int rotatedPreviewHeight = height;\n int screenWidth = displaySize.x;\n int screenHeight = displaySize.y;\n // screenWidth: 720 screenHeight: 1280\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" screenWidth: \" + screenWidth +\n \" screenHeight: \" + screenHeight);\n\n try {\n for (String cameraId : manager.getCameraIdList()) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" cameraId: \" + cameraId);\n if (TextUtils.isEmpty(cameraId)) {\n continue;\n }\n\n mCameraId = cameraId;\n\n //获取某个相机(摄像头特性)\n CameraCharacteristics characteristics\n = manager.getCameraCharacteristics(cameraId);\n\n // 检查支持\n int deviceLevel = characteristics.get(\n CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);\n if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) {\n\n }\n\n // We don't use a front facing camera in this sample.\n Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);\n if (facing != null && facing == CameraCharacteristics.LENS_FACING_FRONT) {\n continue;\n }\n\n // 获取StreamConfigurationMap,它是管理摄像头支持的所有输出格式和尺寸\n StreamConfigurationMap map = characteristics.get(\n CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n if (map == null) {\n continue;\n }\n\n // 拍照时使用最大的宽高\n // For still image captures, we use the largest available size.\n Size largest = Collections.max(\n Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)),\n //Arrays.asList(map.getOutputSizes(TextureView.class)),// 不能这样使用\n new CompareSizesByArea());\n // ImageFormat.JPEG largest.getWidth(): 3264 largest.getHeight(): 2448\n // ImageFormat.YV12 largest.getWidth(): 960 largest.getHeight(): 720\n // ImageFormat.YUV_420_888 largest.getWidth(): 960 largest.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" largest.getWidth(): \" + largest.getWidth() +\n \" largest.getHeight(): \" + largest.getHeight());\n\n /***\n * 实时帧数据获取类\n * 由于获取实时帧所以选用YV12或者YUV_420_888两个格式,暂时不采用JPEG格式\n * 在真机显示的过程中,不同的数据格式所设置的width和height需要注意,否侧视频会很卡顿\n * YV12:width 720, height 960\n * YUV_420_888:width 720, height 960\n * JPEG:获取帧数据不能用 ImageFormat.JPEG 格式,否则你会发现预览非常卡的,\n * 因为渲染 JPEG 数据量过大,导致掉帧,所以预览帧请使用其他编码格式\n *\n * 输入相机的尺寸必须是相机支持的尺寸,这样画面才能不失真,TextureView输入相机的尺寸也是这个\n */\n /*mImageReader = ImageReader.newInstance(\n largest.getWidth(),\n largest.getHeight(),\n ImageFormat.YUV_420_888,\n *//*maxImages*//*5);// ImageFormat.JPEG, 2\n mImageReader.setOnImageAvailableListener(\n mOnImageAvailableListener,\n mBackgroundHandler);*/\n\n // Find out if we need to swap dimension to get the preview size relative to sensor\n // coordinate.\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n // noinspection ConstantConditions\n mSensorOrientation = characteristics.get(\n CameraCharacteristics.SENSOR_ORIENTATION);\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" displayRotation: \" + displayRotation +\n \" mSensorOrientation: \" + mSensorOrientation);\n boolean swappedDimensions = false;\n switch (displayRotation) {\n // 竖屏\n case Surface.ROTATION_0:\n case Surface.ROTATION_180:\n if (mSensorOrientation == 90 || mSensorOrientation == 270) {\n swappedDimensions = true;\n }\n break;\n // 横屏\n case Surface.ROTATION_90:\n case Surface.ROTATION_270:\n if (mSensorOrientation == 0 || mSensorOrientation == 180) {\n swappedDimensions = true;\n }\n break;\n default:\n Log.e(TAG, \"Display rotation is invalid: \" + displayRotation);\n break;\n }\n\n if (swappedDimensions) {\n rotatedPreviewWidth = height;\n rotatedPreviewHeight = width;\n screenWidth = displaySize.y;\n screenHeight = displaySize.x;\n }\n\n if (screenWidth > MAX_PREVIEW_WIDTH) {\n screenWidth = MAX_PREVIEW_WIDTH;\n }\n\n if (screenHeight > MAX_PREVIEW_HEIGHT) {\n screenHeight = MAX_PREVIEW_HEIGHT;\n }\n\n // Danger, W.R.! Attempting to use too large a preview size could exceed the camera\n // bus' bandwidth limitation, resulting in gorgeous previews but the storage of\n // garbage capture data.\n mPreviewSize = chooseOptimalSize(\n map.getOutputSizes(SurfaceTexture.class),\n rotatedPreviewWidth,\n rotatedPreviewHeight,\n screenWidth,\n screenHeight,\n largest);\n // mPreviewSize.getWidth(): 960 mPreviewSize.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" mPreviewSize.getWidth(): \" + mPreviewSize.getWidth() +\n \" mPreviewSize.getHeight(): \" + mPreviewSize.getHeight());\n\n // We fit the aspect ratio of TextureView to the size of preview we picked.\n int orientation = getResources().getConfiguration().orientation;\n // 横屏\n if (orientation == Configuration.ORIENTATION_LANDSCAPE) {\n mTextureView.setAspectRatio(\n mPreviewSize.getWidth(), mPreviewSize.getHeight());\n } else {\n mTextureView.setAspectRatio(\n mPreviewSize.getHeight(), mPreviewSize.getWidth());\n }\n\n // Check if the flash is supported.\n Boolean available = characteristics.get(\n CameraCharacteristics.FLASH_INFO_AVAILABLE);\n mFlashSupported = available == null ? false : available;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n // Currently an NPE is thrown when the Camera2API is used but not supported on the\n // device this code runs.\n Camera2Fragment.ErrorDialog.newInstance(getString(R.string.camera_error))\n .show(getChildFragmentManager(), FRAGMENT_DIALOG);\n }\n }", "@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}", "private void updateView(GL2 gl) {\r\n gl.glLoadIdentity();\r\n final float eyeX = (float) camera.getEye().get(0);\r\n final float eyeY = (float) camera.getEye().get(1);\r\n final float eyeZ = (float) camera.getEye().get(2);\r\n final float refX = (float) camera.getRef().get(0);\r\n final float refY = (float) camera.getRef().get(1);\r\n final float refZ = (float) camera.getRef().get(2);\r\n final float upX = (float) camera.getUp().get(0);\r\n final float upY = (float) camera.getUp().get(1);\r\n final float upZ = (float) camera.getUp().get(2);\r\n glu.gluLookAt(eyeX, eyeY, eyeZ, refX, refY, refZ, upX, upY, upZ);\r\n }", "private void calculateMatrices() {\n viewMatrix = new Matrix();\n clipRect = null;\n\n float actualWidth = gameModel.actualWidth = getWidth();\n float actualHeight = gameModel.actualHeight = getHeight();\n float virtualWidth = gameModel.getWidth();\n float virtualHeight = gameModel.getHeight();\n\n float scale = Math.max(virtualWidth / actualWidth, virtualHeight / actualHeight);\n if (scale < 0.99 || scale > 1.01) {\n viewMatrix.postScale(1f / scale, 1f / scale);\n\n float extraW = actualWidth * scale - virtualWidth;\n float extraH = actualHeight * scale - virtualHeight;\n\n if (extraW > 1f || extraH > 1f) {\n viewMatrix.postTranslate(extraW / scale / 2f, extraH / scale / 2f);\n clipRect = new RectF(0, 0, virtualWidth, virtualHeight);\n }\n }\n\n // Invert the view matrix, to obtain a matrix that can be used for translating\n // touch events back to virtual coordinates.\n touchMatrix = new Matrix(viewMatrix);\n touchMatrix.invert(touchMatrix);\n }", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }", "public void rotateImage(View view) {\n\n View img = findViewById(ID_PlacementMode_BrickPreview_ImageView);\n\n float rotation;\n\n if (view.getId() == R.id.ID_PlacementMode_RotateLeft_Button) {\n rotation = img.getRotation() - (float) 90.0;\n }\n else { // rotate right\n rotation = img.getRotation() + (float) 90.0;\n }\n\n // set rotation in positive range in order to use map_angle_to_blockrotation correctly (Bugfix #414)\n if (rotation < 0) {\n rotation = rotation + 360f;\n }\n\n // set rotation of visualized brick preview\n img.setRotation(rotation);\n\n BlockRotation block_rotation = map_angle_to_blockrotation.get(((int)rotation)%360);\n\n // set rotation in block object\n objBrickPreview.setRotation(block_rotation);\n\n }", "private void setCameraDisplayOrientation(Activity activity, int cameraId, Camera camera){\n Camera.CameraInfo info = new Camera.CameraInfo();\n Camera.getCameraInfo(cameraId, info);\n int degrees = getDisplayRotation(activity);\n Log.i(\"Test\", \"rotation:-->\" + degrees);\n int result;\n if(info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT){\n result = (info.orientation + degrees) % 360;\n result = (360 - result) % 360; //compensate the mirror\n }else{\n result = (info.orientation - degrees + 360) % 360;\n }\n camera.setDisplayOrientation(result);\n }", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n \n float ratio = (float) width / height;\n /*\n mWidth = width;\n mHeight = height;\n */\n \n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n /*\n Near / far clipping planes, in terms of units away from the camera\n Cannot be negative or 0, should not be close to 0\n */\n //Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 0.5f, 21);\n \n }", "public RMTransform getTransform()\n{\n return new RMTransform(getX(), getY(), getRoll(), getWidth()/2, getHeight()/2,\n getScaleX(), getScaleY(), getSkewX(), getSkewY());\n}" ]
[ "0.6910589", "0.6719031", "0.6526996", "0.64978427", "0.64531475", "0.63670796", "0.62315804", "0.62314045", "0.62227136", "0.6181718", "0.6156203", "0.6096678", "0.6087292", "0.6086693", "0.6071094", "0.60559696", "0.6022353", "0.5994078", "0.5986943", "0.5974838", "0.5969246", "0.5966815", "0.5891293", "0.5887116", "0.58827794", "0.5873209", "0.58411974", "0.58299464", "0.5827231", "0.58199894", "0.58107966", "0.5806101", "0.57956153", "0.5788704", "0.57647395", "0.57596225", "0.57576036", "0.5733752", "0.57277715", "0.5715468", "0.57085985", "0.56950366", "0.5686733", "0.5671343", "0.56649524", "0.5661456", "0.56564236", "0.5639777", "0.5638881", "0.5628872", "0.56216514", "0.5615353", "0.56122494", "0.56049025", "0.55903804", "0.5589095", "0.5584778", "0.5572586", "0.5567165", "0.5566337", "0.55539984", "0.55506253", "0.5549674", "0.5548551", "0.5548061", "0.5545272", "0.55446124", "0.5544471", "0.55409944", "0.55334264", "0.5505342", "0.5504663", "0.5491208", "0.5486409", "0.5475689", "0.5475689", "0.5470594", "0.54614663", "0.5460975", "0.54546446", "0.54531866", "0.54516953", "0.5443102", "0.5434464", "0.5432271", "0.5425119", "0.5418749", "0.541415", "0.54107344", "0.5399963", "0.53870547", "0.5381946", "0.53786504", "0.53736526", "0.5370861", "0.5369361", "0.53664625", "0.53636813", "0.53613913", "0.53590405" ]
0.7046188
0
If passed a baseUrl, context use that. If not, use the hardcoded one. This is to enable sending requests to localhost, in order to mock a stub http host that sends "fake" replies for testing.
public MovebankRequest(String baseUrl, Context context) { this.context = context; this.baseUrl = baseUrl; this.password = context.getResources().getString(R.string.movebank_password); this.username = context.getResources().getString(R.string.movebank_user); statusMap = new HashMap<Integer, Integer>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestState baseUrl(String baseUrl) {\n this.baseUrl = baseUrl;\n return this;\n }", "public void setBaseUrl(String baseUrl) {\n this.baseUrl = baseUrl;\n }", "public void setBaseUrl(final String baseUrl) {\n this.baseUrl = baseUrl;\n }", "private String baseUrl() {\n return \"http://\" + xosServerAddress + \":\" +\n Integer.toString(xosServerPort) + XOSLIB + baseUri;\n }", "public CloudModule(String baseUrl, Context context) {\n this.mBaseUrl = baseUrl;\n this.context = context;\n }", "IParser setServerBaseUrl(String theUrl);", "public String getBaseUrl() {\r\n return baseUrl;\r\n }", "public String baseUrl() {\n return baseUrl;\n }", "public String getBaseUrl()\n {\n return baseUrl;\n }", "public static String getBaseUrl() {\r\n if (baseUrl == null) {\r\n baseUrl = Constants.HTTP_PROTOCOL + \"://\" + getBaseHost() + \":\" + getBasePort();\r\n }\r\n return baseUrl;\r\n }", "public static String getBaseUrl() {\n return baseUrl;\n }", "public String getBaseUrl() {\n return baseUrl;\n }", "public String getBaseUrl() {\n return baseUrl;\n }", "static DefaultUrlBuilder from(URL baseUrl) {\n if (!baseUrl.getProtocol().equals(\"http\") && !baseUrl.getProtocol().equals(\"https\")) {\n throw new SafeIllegalArgumentException(\n \"unsupported protocol\", SafeArg.of(\"protocol\", baseUrl.getProtocol()));\n }\n if (Strings.emptyToNull(baseUrl.getQuery()) != null) {\n throw new SafeIllegalArgumentException(\n \"baseUrl query must be empty\", UnsafeArg.of(\"query\", baseUrl.getQuery()));\n }\n if (Strings.emptyToNull(baseUrl.getRef()) != null) {\n throw new SafeIllegalArgumentException(\n \"baseUrl ref must be empty\", UnsafeArg.of(\"ref\", baseUrl.getRef()));\n }\n if (Strings.emptyToNull(baseUrl.getUserInfo()) != null) {\n // the value of baseUrl.getUserInfo() may contain credential information and mustn't be logged\n throw new SafeIllegalArgumentException(\"baseUrl user info must be empty\");\n }\n return new DefaultUrlBuilder(baseUrl);\n }", "public void setBaseUrl(java.lang.String mBaseUrl) {\n bugQuery.setBaseUrl(mBaseUrl);\n }", "protected String getBaseUrl() {\n return requestBaseUrl;\n }", "public String getBaseUrl()\n\t{\n\t\treturn baseUrl;\n\t}", "@Test\n\tpublic void testGetBaseUrl() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/index.html\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}", "private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}", "@Before\n public void setBaseUri () {\n RestAssured.port = 8080;\n RestAssured.baseURI = \"http://localhost\";\n RestAssured.basePath = \"/v1\";\n }", "public void determineBaseUrl() {\n if (Environment.isLatest()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isStage()) {\n baseUrl = \"api-stage.wdpro.starwave.com\";\n } else if (Environment.isENV4()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isENV2()) {\n // baseUrl = \"api-qa.wdpro.disney.go.com:8088\";\n baseUrl = \"api-env2.wdpro.starwave.com\";\n } else if (Environment.isSoftLaunch()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else if (Environment.isShadow()) {\n baseUrl = \"api-shadow.wdpro.starwave.com\";\n } else if (Environment.isProduction()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else {\n baseUrl = \"api.wdpro.disney.go.com\";\n }\n }", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "@Test\n public void whenEnvironmentIsWeb_thenUrlsShouldStartWithHttp() {\n String address = \"https://www.geeksforgeeks.org/run-levels-linux/\";\n assumingThat(!\"WEB\".equals(System.getenv(\"ENV\")),\n () -> {\n assertTrue(address.startsWith(\"http\"));\n });\n\n\n }", "public void makeRequest(String baseUrl) throws URISyntaxException {\r\n\r\n RequestSpecBuilder builder = new RequestSpecBuilder();\r\n builder.setBaseUri(baseUrl);\r\n builder.setContentType(ContentType.JSON);\r\n RequestSpecification requestSpec = builder.build();\r\n RequestSpecification request = RestAssured.given().spec(requestSpec);\r\n response = request.get(new URI(baseUrl));\r\n String response_content = response.getBody().asString();\r\n Operations.setContent(response_content);\r\n\r\n }", "public String getBaseUrl() {\n StringBuffer buf = new StringBuffer();\n buf.append(getScheme());\n buf.append(\"://\");\n buf.append(getServerName());\n if ((isSecure() && getServerPort() != 443) ||\n getServerPort() != 80) {\n buf.append(\":\");\n buf.append(getServerPort());\n }\n return buf.toString();\n }", "@Test\n\tpublic void testGetBaseUrlDomain() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com\");\n\t\tassertEquals(\"http://www.bobbylough.com\", result);\n\t}", "String getRootServerBaseUrl();", "private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}", "@Override\n\tprotected String getHttpBaseUrl() {\n\t\treturn this.properties.getHttpUrlBase();\n\t}", "public DefaultHref(String baseUrl)\r\n {\r\n this.parameters = new HashMap();\r\n setFullUrl(baseUrl);\r\n }", "protected CoreHttpClientBase(final Object jaxrsClient, final URI baseUrl) {\r\n super(jaxrsClient, baseUrl);\r\n }", "@Test\n\tpublic void testGetBaseUrlDir() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}", "public String getBaseUrl()\r\n {\r\n return this.url;\r\n }", "public String getHandleServiceBaseUrl();", "public String getBaseUrl() {\n return builder.getBaseUrl();\n }", "private static String getBaseUrl()\r\n {\r\n return \"https://rapidapi.io/connect\";\r\n }", "public java.lang.String getBaseUrl() {\n return bugQuery.getBaseUrl();\n }", "public static void setBaseURL() {\n\n\t\tRestAssured.baseURI = DataReader.dataReader(\"baseURL\");\n\t}", "public static String getServerUrl(Context context) {\n if (mServerUrl == null) {\n ApplicationInfo appInfo = null;\n try {\n appInfo = context.getPackageManager()\n .getApplicationInfo(context.getPackageName(),\n PackageManager.GET_META_DATA);\n mServerUrl = appInfo.metaData.getString(\"WHISPER_SERVER_ADDRESS\");\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n }\n return mServerUrl;\n }", "@Override\r\n\tpublic void setAPIBaseUrl(String apiBaseUrl) {\n\t\tthis.apiBaseUrl = apiBaseUrl;\r\n\t}", "public abstract String getBaseURL();", "private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }", "public void setProxyBaseUrl(String baseURL) {\n this.proxyBaseUrl = baseURL;\n }", "public static String UrlToHit(){\n\t\treturn BaseURL;\n\t}", "public static String getdevBaseUrl(){\n\n return DEV_BASE_URL;\n }", "@Before\r\n\tpublic void setUp() {\r\n\t\tthis.httpURLBuilder = new HttpURLBuilder();\r\n\t\tthis.httpURLBuilder.setHost(\"localhost\");\r\n\t\tthis.httpURLBuilder.setParam(\"name\", \"value\");\r\n\t\tthis.httpURLBuilder.setPath(\"/xampp\");\r\n\t\tthis.httpURLBuilder.setPort(80);\r\n\t\tthis.httpURLBuilder.setSecure(false);\r\n\t\tthis.map = new ListMap<>();\r\n\t\tthis.map.putValue(\"key\", \"value\");\r\n\t}", "private String buildUrlPrefix(String hostName, int port, String context, boolean https) {\r\n StringBuilder urlBuilder = new StringBuilder(https ? \"https://\" : \"http://\");\r\n int standardPort = https ? 443 : 80;\r\n urlBuilder.append(hostName);\r\n if (port != standardPort) {\r\n urlBuilder.append(\":\");\r\n urlBuilder.append(port);\r\n }\r\n urlBuilder.append(context);\r\n return urlBuilder.toString();\r\n }", "@BeforeClass\n public static void beforeClass() throws Exception {\n server = createServer();\n server.startServer();\n\n // this is the base url with the random port\n url = server.getUrl();\n }", "public void setBaseURL(String val) {\n\n\t\tbaseURL = val;\n\n\t}", "@Test\n public void doRequestURL() throws IOException, NoSuchAlgorithmException, KeyManagementException {\n doRequest(\"https://login.cloud.huawei.com/oauth2/v2/token\");\n\n\n //doRequestWithOutHttps(\"https://124.74.46.118:7012/business/service\");\n //doRequestWithOutHttpsPool(\"https://124.74.46.118:7012/business/service\");\n }", "@Override\n public String getBaseUrl() {\n return MobileiaTrivia.getBaseUrl();\n }", "public static String getBaseUrl(HttpServletRequest request) {\n\t\tif ((request.getServerPort() == 80) || (request.getServerPort() == 443))\n\t\t{\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName();\t\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName() + \":\" + request.getServerPort();\n\t\t}\n\t}", "default HttpUrl getNodeUrl() {\n return HttpUrl.parse(getHost()).newBuilder().port(getPort()).build();\n }", "@Test\n public void gatewayUrlTest() {\n // TODO: test gatewayUrl\n }", "String getServerBaseURL();", "@BeforeAll\n public static void setUp(){\n baseURI = ConfigurationReader.getProperty(\"spartan.base_url\");\n basePath = \"/api\" ;\n }", "public String getBaseUrl() {\n return (String) get(\"base_url\");\n }", "protected AbstractService(String baseUrl) {\n mApi = createApi(baseUrl);\n }", "public void testSetHost() {\n }", "public static String getModuleBaseUrl(HttpServletRequest request) {\n\t String requestedUri = request.getRequestURI();\n\t int contextEnd = request.getContextPath().length();\n\t int folderEnd = requestedUri.lastIndexOf('/') + 1;\n\t return requestedUri.substring(contextEnd, folderEnd);\n\t }", "public static Retrofit setRetrofit(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n //.client(client)\n .addConverterFactory(LoganSquareConverterFactory.create())\n .addConverterFactory(GsonConverterFactory.create()).client(getClient())\n .build();\n return retrofit;\n }", "@Nonnull\n\tprivate URI getPossiblyInsecureBaseUri() {\n\t\tUriInfo ui = getUriInfo();\n\t\tif (ui != null && ui.getBaseUri() != null)\n\t\t\treturn ui.getBaseUri();\n\t\t// See if JAX-WS *cannot* supply the info\n\t\tif (jaxws == null || jaxws.getMessageContext() == null)\n\t\t\t// Hack to make the test suite work\n\t\t\treturn URI.create(\"http://\" + DEFAULT_HOST\n\t\t\t\t\t+ \"/taverna-server/rest/\");\n\t\tString pathInfo = (String) jaxws.getMessageContext().get(PATH_INFO);\n\t\tpathInfo = pathInfo.replaceFirst(\"/soap$\", \"/rest/\");\n\t\tpathInfo = pathInfo.replaceFirst(\"/rest/.+$\", \"/rest/\");\n\t\treturn URI.create(\"http://\" + getHostLocation() + pathInfo);\n\t}", "@Before\n public void setUp() {\n RestAssured.baseURI = \"https://fakerestapi.azurewebsites.net\";\n }", "public String getBaseUrl() {\n return preferences.getString(PREFERENCES_BACKEND_BASE_URL, \"http://naamataulu-backend.herokuapp.com/api/v1/\");\n }", "public static String adjustVantiqTarget(String baseUrl, boolean noSsl) throws CamelException {\n String correctedUrl = null;\n String protocol = \"https\";\n if (noSsl) {\n // This is used in development or edge servers.\n protocol = \"http\";\n }\n try {\n URI vtqUri = new URI(baseUrl);\n if (vtqUri.getScheme().equalsIgnoreCase(\"vantiq\")) {\n vtqUri = new URI(protocol, null, vtqUri.getHost(), vtqUri.getPort(), vtqUri.getPath(), null,\n null);\n correctedUrl = vtqUri.toASCIIString();\n } else {\n correctedUrl = baseUrl;\n }\n log.trace(\"Adjusted Vantiq URL: {} (from {})\", correctedUrl, baseUrl);\n } catch (URISyntaxException uriSE) {\n throw new CamelException(\"Unable to connect to provided URI: \" + baseUrl +\n \" (adjusted: \" + correctedUrl + \")\", uriSE);\n }\n return correctedUrl;\n }", "public String getApiBaseUrl() {\n return this.apiBaseUrl;\n }", "public String appBaseUrl() {\n int amtToTrim = request.getServletPath().length() + request.getPathInfo().length();\n String appBase = requestURL.substring(0, requestURL.length()-amtToTrim);\n return appBase;\n }", "@BeforeClass\n public static void init() throws Exception {\n System.setProperty(\"instanceUri\", STANDALONE.getClass().getMethod(\"getBaseURI\").invoke(STANDALONE).toString());\n }", "static Retrofit getClient(String baseUrl) {\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }\n return retrofit;\n }", "private String resolveAbsoluteURL(String defaultUrlContext, String urlFromConfig, String tenantDomain) throws IdentityProviderManagementServerException {\n\n if (!IdentityTenantUtil.isTenantQualifiedUrlsEnabled() && StringUtils.isNotBlank(urlFromConfig)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Resolved URL:\" + urlFromConfig + \" from file configuration for default url context: \" +\n defaultUrlContext);\n }\n return urlFromConfig;\n }\n\n try {\n ServiceURLBuilder serviceURLBuilder = ServiceURLBuilder.create().setTenant(tenantDomain);\n return serviceURLBuilder.addPath(defaultUrlContext).build().getAbsolutePublicURL();\n } catch (URLBuilderException e) {\n throw IdentityProviderManagementException.error(IdentityProviderManagementServerException.class,\n \"Error while building URL: \" + defaultUrlContext, e);\n }\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "default String getHost() {\n return \"localhost\";\n }", "protected String getBaseUrl(HttpServletRequest request) {\n\t\tString retVal = \"\";\n\t\tif (request != null && request.getRequestURL() != null) {\n\t\t\tStringBuffer url = request.getRequestURL();\n\t\t\tString uri = request.getRequestURI();\n\t\t\t\n\t\t\tretVal = url.substring(0, url.length() - uri.length());\n\t\t}\n\t\t\n\t\treturn retVal;\n\t}", "@BeforeEach\n\tpublic void setup() {\n\t\tif (!initialized) {\n\t\t\tbaseURI = String.format(uri, port);\n\t\t\tinitialized = true;\n\t\t}\n\t}", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "public MockServerClient(String host, int port, String contextPath) {\n this.clientClass = MockServerClient.class;\n if (isEmpty(host)) {\n throw new IllegalArgumentException(\"Host can not be null or empty\");\n }\n if (contextPath == null) {\n throw new IllegalArgumentException(\"ContextPath can not be null\");\n }\n this.host = host;\n this.port = port;\n this.contextPath = contextPath;\n this.configuration = clientConfiguration();\n this.eventLoopGroup = eventLoopGroup();\n LocalCallbackRegistry.setMaxWebSocketExpectations(configuration.maxWebSocketExpectations());\n }", "public String getServerUrl()\n {\n return null;\n }", "String getServerUrl();", "@BeforeClass\n public static void setUp(){\n RestAssured.baseURI = \"https://api.got.show/api/\";\n }", "IMember getServerStub();", "java.lang.String getApiUrl();", "public String getHttpProxyHost();", "public UrlBuilder compileBaseUrl(HttpServletRequest request, String repositoryId) {\n String baseUrl = (String) request.getAttribute(Dispatcher.BASE_URL_ATTRIBUTE);\n if (baseUrl != null) {\n int repIdPos = baseUrl.indexOf(REPOSITORY_PLACEHOLDER);\n if (repIdPos < 0) {\n return new UrlBuilder(baseUrl);\n } else {\n return new UrlBuilder(baseUrl.substring(0, repIdPos) + repositoryId\n + baseUrl.substring(repIdPos + REPOSITORY_PLACEHOLDER.length()));\n }\n }\n\n UrlBuilder url = new UrlBuilder(request.getScheme(), request.getServerName(), request.getServerPort(), null);\n\n url.addPath(request.getContextPath());\n url.addPath(request.getServletPath());\n\n if (repositoryId != null) {\n url.addPathSegment(repositoryId);\n }\n\n return url;\n }", "protected void configureBrowserWithSelenIde(String baseUrl, String proxyHost, String proxyPort) \n {\n Configuration.timeout = 10000;\n Configuration.baseUrl = baseUrl;\n Configuration.startMaximized = false;\n Configuration.browser = WEB_DRIVER_PROVIDER;\n Configuration.browserPosition = \"200x20\";\n Configuration.browserSize = \"1440x1024\";\n Configuration.reportsFolder = \"target/reports/\";\n Configuration.reportsUrl = \"file:///root/dhbwtest_selenide/target/reports/\";\n Configuration.proxyEnabled = (proxyHost != null && proxyPort != null);\n if (proxyHost != null && proxyPort != null)\n {\n Configuration.proxyHost = proxyHost;\n Configuration.proxyPort = Integer.parseInt(proxyPort);\n Configuration.fileDownload = FileDownloadMode.PROXY;\n }\n else\n {\n Configuration.fileDownload = FileDownloadMode.FOLDER;\n }\n addListener(new Highlighter());\n }", "@Test\n public void shouldAllowSubdomainsWhenLinkingFromInside() {\n assertTrue(sutHttp.shouldCrawl(BASE_HTTP, create(\"http://sub.host\")));\n }", "@Test\n public void chefServerUrlTest() {\n // TODO: test chefServerUrl\n }", "public static void init(URL banksapiBaseUrl) {\n if (BANKSapi.banksapiBaseUrl == null) {\n BANKSapi.banksapiBaseUrl = banksapiBaseUrl;\n } else {\n throw new IllegalStateException(\"init(URL) called but base URL is already initialized\");\n }\n }", "public Saml2AuthHelper(String baseOAuthUrl)\n {\n if (baseOAuthUrl != null && !baseOAuthUrl.isEmpty())\n {\n this.baseUrl = Uri.parse(baseOAuthUrl);\n }\n }", "private String getRootUrl(String path){\n return \"http://localhost:\" + port + \"/api/v1\" + path;\n }", "public void setApiBaseUrl(final String apiBaseUrl) {\n this.apiBaseUrl = Objects.requireNonNull(apiBaseUrl);\n this.getNetspeakCache().clear();\n }", "public io.confluent.developer.InterceptTest.Builder setReqUri(java.lang.String value) {\n validate(fields()[4], value);\n this.req_uri = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "@Test\n public void testWithNotConfiguredPath() throws Exception {\n final Http2Client client = Http2Client.getInstance();\n final CountDownLatch latch = new CountDownLatch(1);\n final ClientConnection connection;\n try {\n connection = client.connect(new URI(\"http://localhost:17352\"), Http2Client.WORKER, Http2Client.SSL, Http2Client.BUFFER_POOL, OptionMap.EMPTY).get();\n } catch (Exception e) {\n throw new ClientException(e);\n }\n final AtomicReference<ClientResponse> reference = new AtomicReference<>();\n try {\n ClientRequest request = new ClientRequest().setPath(\"/test3\").setMethod(Methods.GET);\n request.getRequestHeaders().put(Headers.HOST, \"localhost\");\n connection.sendRequest(request, client.createClientCallback(reference, latch));\n latch.await();\n } catch (Exception e) {\n logger.error(\"Exception: \", e);\n throw new ClientException(e);\n } finally {\n IoUtils.safeClose(connection);\n }\n int statusCode = reference.get().getResponseCode();\n String responseBody = reference.get().getAttachment(Http2Client.RESPONSE_BODY);\n Assert.assertEquals(200, statusCode);\n Assert.assertEquals(\"OK\", responseBody);\n }", "@Test\n public void simpleGet(){\n when()\n .get(\"http:://34.223.219.142:1212/ords/hr/employees\")\n .then().statusCode(200);\n\n }", "String getHttpProxyHost();", "@Before\r\n public void setUp() { \r\n ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());\r\n //ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(\".\")){});\r\n \t\r\n //helper.setUp();\r\n }", "public static String getServerBaseUrl() {\n if (isProductionMode()) {\n return getConfiguration().productionModeServerBaseUrl();\n }\n return getConfiguration().developmentModeServerBaseUrl();\n }", "@Test\n void simpleBddTest(){\n given()\n .baseUri(\"https://reqres.in/api\")\n .basePath(\"/users?page=2\")\n\n //когда система\n .when().get()\n\n .then().statusCode(200)\n .and().header(\"Content-Type\", \"application/json; charset=utf-8\");\n }", "protected abstract Context getMockContext(Context context);", "public static String getRequestUrl(HttpRequest argHttpRequest) {\r\n\t\tif (argHttpRequest != null) {\r\n\t\t\tString originHostName = getHostName(argHttpRequest);\r\n\t\t\tString originRequestUri = argHttpRequest.getRequestLine().getUri();\r\n\t\t\treturn \"https://\" + originHostName + \"/\" + originRequestUri;\r\n\t\t}\r\n\t\treturn null;\r\n\t}" ]
[ "0.6787251", "0.6738273", "0.6707891", "0.645689", "0.63640046", "0.62803966", "0.62342083", "0.62046915", "0.6201835", "0.61740345", "0.6163903", "0.6146672", "0.6146672", "0.6065373", "0.60028195", "0.6000466", "0.59982616", "0.59972537", "0.5985404", "0.59216624", "0.58669907", "0.5839905", "0.5790237", "0.57854664", "0.57772225", "0.57651514", "0.57409775", "0.57397115", "0.57061064", "0.56316483", "0.5621923", "0.5608927", "0.5579763", "0.5513398", "0.55044955", "0.53961617", "0.53747565", "0.5369355", "0.53615904", "0.53524625", "0.5346096", "0.5338279", "0.5329955", "0.5291823", "0.5279149", "0.527146", "0.52395207", "0.5231466", "0.52189904", "0.5189474", "0.51840204", "0.5180063", "0.5167377", "0.5159079", "0.51575553", "0.5147808", "0.5131169", "0.5119439", "0.5104836", "0.50959486", "0.5092539", "0.50461537", "0.5040242", "0.50316423", "0.5007534", "0.49988282", "0.499815", "0.49962023", "0.4974506", "0.4973726", "0.4964804", "0.4954066", "0.49523926", "0.49522308", "0.49436197", "0.49436197", "0.49410394", "0.49345782", "0.49330828", "0.49325883", "0.49306124", "0.49298143", "0.4923037", "0.49228102", "0.49218866", "0.49163574", "0.49157047", "0.49111232", "0.48964542", "0.48947856", "0.48924777", "0.48914176", "0.4887961", "0.48832732", "0.48811004", "0.4873333", "0.48591846", "0.48585865", "0.48422015", "0.48416758" ]
0.54715836
35
Sends a request to the Movebank API for the specified attributes
public void requestDataAsync( String attributes, RequestHandler requestHandler){ RequestQueue queue = Volley.newRequestQueue(context); String url = baseUrl+attributes; // Request a string response from the provided URL. Log.i("MovebankRequest", "sending string request to " + url); project.software.uni.positionprediction.datatypes.Request request = new project.software.uni.positionprediction.datatypes.Request(getNextRequestCode()); requestHandler.setRequest(request); StringRequest stringRequest = createStringRequest(request, url, requestHandler, requestHandler); // Add the request to the RequestQueue. queue.add(stringRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public project.software.uni.positionprediction.datatypes.Request requestDataSync(String attributes){\r\n\r\n RequestQueue queue = Volley.newRequestQueue(context);\r\n\r\n RequestFuture<String> requestFuture = RequestFuture.newFuture();\r\n\r\n String url = baseUrl+attributes;\r\n\r\n // Request a string response from the provided URL.\r\n Log.i(\"MovebankRequest\", \"sending string request to \" + url);\r\n\r\n project.software.uni.positionprediction.datatypes.Request request =\r\n new project.software.uni.positionprediction.datatypes.Request(getNextRequestCode());\r\n\r\n StringRequest stringRequest = createStringRequest(request, url, requestFuture, requestFuture);\r\n\r\n // Add the request to the RequestQueue.\r\n requestFuture.setRequest(queue.add(stringRequest));\r\n\r\n try{\r\n String response = requestFuture.get(10, TimeUnit.SECONDS);\r\n request.setResponseStatus(statusMap.remove(new Integer(request.getId())));\r\n request.setResponse(response);\r\n return request;\r\n\r\n } catch (InterruptedException | TimeoutException | ExecutionException e) {\r\n System.out.println(e.toString());\r\n\r\n if(e.getCause() instanceof VolleyError) {\r\n\r\n VolleyError err = (VolleyError) e.getCause();\r\n if(err.networkResponse != null) request.setResponseStatus(err.networkResponse.statusCode);\r\n else request.setResponseStatus(-1);\r\n\r\n } else {\r\n request.setResponseStatus(-1);\r\n }\r\n\r\n return request;\r\n }\r\n }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "@GET(\"/attractions\")\n Call<List<Attraction>> getAttractions(\n @Query(\"latitude\") double latitude,\n @Query(\"longitude\") double longitude,\n @Query(\"radius\") double radius\n );", "private void sendRequest(Action action) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n request.setLanguage(new SLCodec().getName());\n request.setOntology(MobilityOntology.getInstance().getName());\n try {\n getContentManager().fillContent(request, action);\n request.addReceiver(action.getActor());\n send(request);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@GET(\"/attractions\")\n Call<List<Attraction>> getAttractionsWithAuth(\n @Query(\"latitude\") double latitude,\n @Query(\"longitude\") double longitude,\n @Query(\"radius\") double radius,\n @Header(\"Authorization\") String bearer\n );", "private void sendRequest() {\n String origin = latitudewisata+\",\"+longitudewisata;\n Log.e(\"orininya\",origin);\n String destination = latitudewisata+\",\"+longitudewisata;\n Log.e(\"Dest\",destination);\n if (origin.isEmpty()) {\n Toast.makeText(this, \"Please enter origin address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destination.isEmpty()) {\n Toast.makeText(this, \"Please enter destination address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "private void doRequest() {\n\n try {\n JsonObject request = new JsonObject()\n .put(\"action\", Math.random() < 0.5 ? \"w\" : \"r\")\n .put(\"timeOfRequest\", System.currentTimeMillis());\n\n if (request.getString(\"action\") == \"w\") {\n request.put(\"data\", new JsonObject()\n .put(\"key\", \"value\")\n );\n logger.debug(\"requesting write: \" + request.toString());\n eb.send(\"storage-write-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n } else {\n Random random = new Random();\n List<String> keys = new ArrayList<String>(map.keySet());\n String randomKey = keys.get(random.nextInt(keys.size()));\n request.put(\"id\", randomKey);\n logger.debug(\"waiting for read: \" + request.toString());\n eb.send(\"storage-read-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n }\n } catch (Exception e) {\n logger.warn(\"Error\");\n makeRequest();\n }\n\n }", "public MovebankRequest(String baseUrl, Context context) {\r\n\r\n this.context = context;\r\n\r\n this.baseUrl = baseUrl;\r\n this.password = context.getResources().getString(R.string.movebank_password);\r\n this.username = context.getResources().getString(R.string.movebank_user);\r\n\r\n statusMap = new HashMap<Integer, Integer>();\r\n }", "public void sendHttp() {\n String url = \"https://openwhisk.ng.bluemix.net/api/v1/namespaces/1tamir198_tamirSpace/actions/testing_trigger\";\n //api key that i got from blumix EndPoins\n String apiKey = \"530f095a-675e-4e1c-afe0-4b421201e894:0HriiSRoYWohJ4LGOjc5sGAhHvAka1gwASMlhRN8kA5eHgNu8ouogt8BbmXtX21N\";\n try {\n //JSONObject jsonObject = new JSONObject().put(\"openwhisk.ng.bluemix.net\" ,\"c1165fd1-f4cf-4a62-8c64-67bf20733413:hdVl64YRzbHBK0n2SkBB928cy2DUO5XB3yDbuXhQ1uHq8Ir0dOEwT0L0bqMeWTTX\");\n String res = (new HttpRequest(url)).prepare(HttpRequest.Method.POST).withData(apiKey).sendAndReadString();\n //String res = new HttpRequest(url).prepare(HttpRequest.Method.POST).withData(jsonObject.toString()).sendAndReadString();\n System.out.println( res + \"***********\");\n\n } catch ( IOException exception) {\n exception.printStackTrace();\n System.out.println(exception + \" some some some\");\n System.out.println(\"catched error from response ***********\");\n }\n }", "public void postRequest() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request body parameters are :-\");\n SamplePOJO samplePOJO = new SamplePOJO();\n samplePOJO.setFirstName(scenarioContext.getContext(\"firstName\"));\n samplePOJO.setLastName(scenarioContext.getContext(\"lastName\"));\n\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n apiUtil.setRequestBody(objectMapper.writeValueAsString(samplePOJO));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n }", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getRequestOrBuilder();", "public void dmaRequest(DmaRequestMaster master) throws SIMException;", "pb4server.RandomPointMoveCityAskReq getRandomPointMoveCityAskReq();", "void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }", "pb4server.MoveCityAskReq getMoveCityAskReq();", "static void apiSample() {\n ApiClient client = new ApiClient(API_KEY, API_SECRET);\n // get symbol list:\n print(client.getSymbols());\n // get accounts:\n List<Account> accounts = client.getAccounts();\n print(accounts);\n if (!accounts.isEmpty()) {\n // find account id:\n Account account = accounts.get(0);\n long accountId = account.id;\n // create order:\n CreateOrderRequest createOrderReq = new CreateOrderRequest();\n createOrderReq.accountId = String.valueOf(accountId);\n createOrderReq.amount = \"0.02\";\n createOrderReq.price = \"1100.99\";\n createOrderReq.symbol = \"ethcny\";\n createOrderReq.type = CreateOrderRequest.OrderType.BUY_LIMIT;\n Long orderId = client.createOrder(createOrderReq);\n print(orderId);\n // place order:\n String r = client.placeOrder(orderId);\n print(r);\n }\n }", "public interface GPAdimWS {\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.provincia\")\n Call<List<Provincia>> listProvincia();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.especialidad\")\n Call<List<Especialidad>> listEspecialidad();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.cobertura\")\n Call<List<Cobertura>> listCobertura();\n @Headers({\"Accept: application/json\"})\n @GET(\"webresources/com.gylgroup.gp.medico/byCoberturaProvinciaEspecialidad/{cobertura}/{provincia}/{especialidad}\")\n Call<List<Medico>> listMedico(@Path(\"cobertura\") String cobertura, @Path(\"provincia\") Long provincia, @Path(\"especialidad\") Long especialidad);\n @POST(\"webresources/com.gylgroup.gp.turno\")\n Call<Turno> createTurno(@Body Turno turno);\n}", "org.naru.park.ParkModel.UIParkRequest getRequest();", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "@Test(enabled = false)\n public void testPutAttributes() throws SecurityException, NoSuchMethodException, IOException {\n Method method = SimpleDBAsyncClient.class.getMethod(\"putAttributes\", String.class, String.class, Map.class);\n HttpRequest request = processor.createRequest(method, null, \"domainName\");\n\n assertRequestLineEquals(request, \"POST https://sdb.amazonaws.com/ HTTP/1.1\");\n assertNonPayloadHeadersEqual(request, \"Host: sdb.amazonaws.com\\n\");\n assertPayloadEquals(request, \"Version=2009-04-15&Action=PutAttributes&DomainName=domainName&ItemName=itemName\"\n + \"&Attribute.1.Name=name\" + \"&Attribute.1.Value=fuzzy\" + \"&Attribute.1.Replace=true\",\n \"application/x-www-form-urlencoded\", false);\n\n assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);\n assertSaxResponseParserClassEquals(method, null);\n assertExceptionParserClassEquals(method, null);\n\n checkFilters(request);\n }", "protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }", "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException 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\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\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}", "MovilizerRequest getRequestFromString(String requestString);", "public static List<APIAttribute> GetAttributes(String serviceUrl, String queryString, String attributeId) {\n APIResult api_Result = null;\n String apiReturnResult = \"\";\n HttpURLConnection httpConn = null;\n JAXBContext jaxbContextResult = null;\n Unmarshaller unmarshaller = null;\n String path = \"/attributes/\";\n if (!\"\".equals(attributeId)) {\n path += attributeId;\n }\n\n String requestMethod = \"GET\";\n String xmlJson = API_Constants.WebRequestContentTypeXml;\n List<APIAttribute> lstApiAttributes = null;\n\n try {\n if (!\"\".equalsIgnoreCase(queryString)) { //Proceed if querystring is not empty.\n httpConn = API_Helper.GetHttpURLConnection(serviceUrl, queryString, path, xmlJson, requestMethod); //Create HttpURLConnection with passed values\n\n ApiLog.One.WriteText(\"HttpRequest ::\" + httpConn.getURL().toString()); //Also log the request\n\n BufferedReader in = new BufferedReader( //Get inputstream of http connection \n new InputStreamReader( //This will return stream for all GET/PUT/POST/DELETE operations. \n httpConn.getInputStream()));\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) { //Read and store in apiReturnResult \n apiReturnResult += inputLine;\n }\n\n ApiLog.One.WriteText(\"XmlJsonOut ::\" + apiReturnResult);\n\n httpConn.disconnect(); //Disconnect connection \n Integer respsponseCode = httpConn.getResponseCode();\n\n //if (respCode.equals(new Integer(200)) || respCode.equals(new Integer(400))) \n //Check for 200 -OK response\n\n try {\n\n jaxbContextResult = JAXBContext.newInstance(APIResult.class);\n unmarshaller = jaxbContextResult.createUnmarshaller();\n JAXBElement<APIResult> elemApi_Result = null;\n\n InputStream is = new ByteArrayInputStream(apiReturnResult.getBytes());\n elemApi_Result = (JAXBElement<APIResult>) unmarshaller.unmarshal(is);\n api_Result = elemApi_Result.getValue();\n if (api_Result != null) { //Check is the retured result from api call is null\n if (api_Result.getAPIAttributes() != null) { //If not - get the retured actions \n lstApiAttributes = api_Result.getAPIAttributes().getValue().getAPIAttribute();\n }\n }\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n String receivedResponse = \"Server returned HTTP_RESPONSE_CODE ::\" + respsponseCode;\n ApiLog.One.WriteText(receivedResponse);\n }\n }\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return lstApiAttributes;\n }", "public static void main(String[] args) {\n FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV);\n\n try {\n\n BankResponse response = transfer.fetchBanks(); // makes network call\n\n Bank[] bank = response.getBanks(); // a bank array of all banks\n\n if (bank instanceof Object) {\n\n // successful\n Bank testBank = bank[0]; // bank at index 0\n\n String cbnCode = testBank.getCbnCode(); // Central bank code\n String bankName = testBank.getBankName(); // bank name: \n String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN\n\n } else {\n\n // error occured\n }\n\n } catch (\n\n Exception ex) {\n // request was not completed\n }\n }", "TransmissionProtocol.Request getRequest(int index);", "private void sendRequest() {\n double origLat = currLatLng.latitude;\n double origLong = currLatLng.longitude;\n double destLat = destLatLng.latitude;\n double destLong = destLatLng.longitude;\n String origin = origLat + \",\" + origLong;\n String destination = destLat + \",\" + destLong;\n Log.d(TAG, \"sendRequest: origin LatLong- \" + \" destination LaatLng- \" + destLatLng);\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }", "com.google.openrtb.OpenRtb.BidRequest getBidrequest();", "MovilizerRequest getRequestFromFile(Path filePath);", "public void findPlayersWithAttributes(long rangeDelta, long numMatches, String jsonAttributes, IServerCallback callback) {\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.rangeDelta.name(), rangeDelta);\n data.put(Parameter.numMatches.name(), numMatches);\n\n if (StringUtil.IsOptionalParameterValid(jsonAttributes)) {\n JSONObject jsonData = new JSONObject(jsonAttributes);\n data.put(Parameter.attributes.name(), jsonData);\n }\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.FIND_PLAYERS, data, callback);\n _client.sendRequest(sc);\n } catch (JSONException je) {\n je.printStackTrace();\n }\n }", "private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}", "com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();", "public LocateRequest(String dburl, String username, String password, String furniture, String type, int amount) {\n\t\tconnection = new Connect(dburl, username, password);\n\t\tsetFurniture(furniture.toLowerCase()); // convert to lowercase to prevent errors\n\t\tsetType(type.toLowerCase()); // convert to lowercase to prevent errors\n\t\tsetAmount(amount);\n\t}", "@Test\r\n\tpublic void testGeoInBidRequest() throws Exception {\r\n\t\tInputStream is = Configuration.getInputStream(\"SampleBids/smaato.json\");\r\n\t\tBidRequest br = new BidRequest(is);\r\n\t\tassertEquals(br.getId(),\"K6t8sXXYdM\");\r\n\t\t\r\n\t\tMap m = new HashMap();\r\n\t\tm.put(\"lat\", 34.05);\r\n\t\tm.put(\"lon\",-118.25);\r\n\t\tm.put(\"range\",600000.0);\r\n\t\tList list = new ArrayList();\r\n\t\tlist.add(m);\r\n\t\t\r\n\t\tNode node = new Node(\"LATLON\",\"device.geo\", Node.INRANGE, list);\r\n \tnode.test(br);\r\n\t\tObjectNode map = (ObjectNode)node.getBRvalue();\r\n\t\tassertTrue((Double)map.get(\"lat\").doubleValue()==37.62);\r\n\t\tassertTrue((Double)map.get(\"lon\").doubleValue()==-122.38);\r\n\t\tassertTrue((Double)map.get(\"type\").doubleValue()==3);\r\n\t\t\r\n\t\tList<Map>test = new ArrayList();\r\n\t\ttest.add(m);\r\n\t\tnode = new Node(\"LATLON\",\"device.geo\", Node.INRANGE, test);\r\n\t\tnode.test(br);\r\n\r\n\t}", "private Map<String, ?> query(String target, String body) throws IOException {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"X-Amz-Target\", target);\n headers.put(\"Content-Type\", \"application/x-amz-json-1.1\");\n return client.post(\"/\", body, headers);\n }", "public RewardsAction(SMTDBConnection dbConnection, Map<String, Object> attributes) {\n\t\tthis();\n\t\tsetDBConnection(dbConnection);\n\t\tsetAttributes(attributes);\n\t}", "@Override\n\t\tpublic void action() {\n\t\t\tMessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.REQUEST); \n\t\t\tACLMessage msg = receive(mt);\n\t\t\tif(msg != null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tContentElement ce = null;\n\t\t\t\t\tSystem.out.println(msg.getContent()); //print out the message content in SL\n\n\t\t\t\t\t// Let JADE convert from String to Java objects\n\t\t\t\t\t// Output will be a ContentElement\n\t\t\t\t\tce = getContentManager().extractContent(msg);\n\t\t\t\t\tSystem.out.println(ce);\n\t\t\t\t\tif(ce instanceof Action) {\n\t\t\t\t\t\tConcept action = ((Action)ce).getAction();\n\t\t\t\t\t\tif (action instanceof SupplierOrder) {\n\t\t\t\t\t\t\tSupplierOrder order = (SupplierOrder)action;\n\t\t\t\t\t\t\t//CustomerOrder cust = order.getItem();\n\t\t\t\t\t\t\t//OrderQuantity = order.getQuantity();\n\t\t\t\t\t\t\tif(!order.isFinishOrder()) {\n\t\t\t\t\t\t\tSystem.out.println(\"exp test: \" + order.getQuantity());\n\t\t\t\t\t\t\trecievedOrders.add(order);}\n\t\t\t\t\t\t\telse {orderReciever = true;}\n\t\t\t\t\t\t\t//Item it = order.getItem();\n\t\t\t\t\t\t\t// Extract the CD name and print it to demonstrate use of the ontology\n\t\t\t\t\t\t\t//if(it instanceof CD){\n\t\t\t\t\t\t\t\t//CD cd = (CD)it;\n\t\t\t\t\t\t\t\t//check if seller has it in stock\n\t\t\t\t\t\t\t\t//if(itemsForSale.containsKey(cd.getSerialNumber())) {\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Selling CD \" + cd.getName());\n\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\t//else {\n\t\t\t\t\t\t\t\t\t//System.out.println(\"You tried to order something out of stock!!!! Check first!\");\n\t\t\t\t\t\t\t\t//}\n\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\n\n\t\t\t\t\t}\n\t\t\t\t\t//deal with bool set here\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcatch (CodecException ce) {\n\t\t\t\t\tce.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcatch (OntologyException oe) {\n\t\t\t\t\toe.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tblock();\n\t\t\t}\n\t\t}", "public void getRequest_withHeader_QueryParms() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request query parameters are :-\");\n String[] queryParameters = {\"grant_type\"};\n setQueryParameters(queryParameters);\n String[] headerParameters = {\"content-type\"};\n setHeaderParameters(headerParameters);\n }", "private void generalRequest(LocalRequestType type) {\n\n\t\tPosition carPosition = null;\n\n\t\tif (Storage.getInstance().getCarPosition().isPresent()) {\n\t\t\tcarPosition = Storage.getInstance().getCarPosition().get();\n\t\t}\n\n\t\tLocalRequest request = new LocalRequest(\"id\" + this.requestIndex, type, Storage.getInstance().getUserPosition(),\n\t\t\t\tcarPosition, this.privateReplyChannel);\n\t\tthis.requestIndex++;\n\t\tGson gson = new GsonBuilder().create();\n\t\tString json = gson.toJson(request);\n\t\ttry {\n\t\t\tchannel.basicPublish(R.LOCAL_INTERACTIONS_CHANNEL, \"\", null, json.getBytes());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();", "public static String GetRequestDemoMethod(String entityType, String itemId) {\n try {\n HashMap<String, String> awsCreds = getApiResponse();\n\n //Create client\n URL url = new URL(BaseConnectionString + entityType + \"/\" + itemId);\n AWS4SignerForAuthorizationHeader auth = new AWS4SignerForAuthorizationHeader(url, \"GET\", \"execute-api\", \"us-east-1\");\n Map<String, String> headers = new HashMap<>();\n headers.put(\"content-type\", \"application/json\");\n headers.put(\"x-amz-security-token\", awsCreds.get(\"sessionToken\"));\n headers.put(\"x-api-key\", ConfigSetup.getCredentials().get(\"xApiKey\"));\n\n\n String authorization = auth.computeSignature(headers, new HashMap<>(), AWS4SignerBase.EMPTY_BODY_SHA256, awsCreds.get(\"accessKey\"), awsCreds.get(\"secretKey\"));\n client = (HttpURLConnection) url.openConnection();\n\n headers.put(\"Authorization\", authorization);\n client.setRequestMethod(\"GET\");\n\n client.connect();\n String response = HttpUtils.invokeHttpRequest(url, \"GET\", headers, null);\n return response;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (client != null) {\n client.disconnect();\n }\n }\n }", "public void generateVehicleReq(final Location point, int radius, Response.Listener<JSONObject> onRes) throws JSONException {\n\n String url = \"https://api.bird.co/bird/nearby?\";\n\n url+=\"latitude=\"+point.getLatitude();\n url+=\"&longitude=\"+point.getLongitude();\n url+=\"&radius=\"+radius;\n\n JSONObject obj = new JSONObject();\n\n\n Response.ErrorListener onErr = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"error \" +\n \"on GET request from bird\");\n System.out.println(error.toString());\n //bad request or something\n\n }\n };\n //set vehicle request\n vehicleReq = new JsonObjectRequest(Request.Method.GET,url,obj,onRes,onErr) {\n /**\n * add headers\n */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap headers = new HashMap();\n headers.put(\"Authorization\", token);\n headers.put(\"Device-id:\", \"801087ee-88a2-4ff7-9067-2e090007ffb6\");\n headers.put(\"App-Version\",\"3.0.5\");\n\n String locH = \"{\";\n locH+= \"\\\"latitude\\\":\"+point.getLatitude()+\",\";\n locH+= \"\\\"longitude\\\":\"+point.getLongitude()+\",\";\n locH+= \"\\\"altitude\\\":\"+ 0 + \",\";\n locH+= \"\\\"accuracy\\\":\"+ 100 + \",\";\n locH+= \"\\\"speed\\\":\"+ -1 + \",\";\n locH+= \"\\\"heading\\\":\"+ -1;\n locH+= \"}\";\n\n headers.put(\"Location\",locH);\n return headers;\n }\n };\n }", "public interface WarsawApiInterface {\n\n @GET(\"/api/action/wfsstore_get\")\n Call<WarsawResult> getPlacesByType(@Query(\"id\") String id, @Query(\"circle\") String circle, @Query(\"apikey\") String apikey);\n}", "public void getRequest_withBasicAuth() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n }", "public String request(ViaRequestPacketEntity packet);", "private void doAgentRequest(final String amount) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_AGENT);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n mProgressBar.setVisibility(View.INVISIBLE);\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_AGENT);\n\n Fragment showQRFragment = new ShowQR();\n Bundle qrContent = new Bundle();\n qrContent.putString(\"qrData\", bankRequestObject.toString());\n showQRFragment.setArguments(qrContent);\n mFormWrap.setVisibility(View.GONE);\n getSupportFragmentManager().beginTransaction().replace(mContainer.getId(), showQRFragment).commit();\n showDone();\n\n }", "@Given(\"I send a GET request to REST API end point {string}\")\n public void i_send_a_GET_request_to_REST_API_end_point(String string) {\n string = \"https://www.gmibank.com/api/tp-states/\" + id;\n\n responseBeforeDelete = given().\n accept(ContentType.JSON).\n auth().oauth2(ConfigurationReader.getProperty(\"token\")).\n when().\n get(string);\n// responseBeforeDelete.prettyPrint();\n\n// System.out.println(responseBeforeDelete.getBody().asString());\n\n json = responseBeforeDelete.jsonPath();\n\n }", "public IOgcResponse executeRequest(Map<String, String> params);", "void doSend(Map<String, Object> parameters);", "@Test\n public void testGetCoinTypeDetail() throws Exception {\n WebApiBaseReq req = new WebApiBaseReq();\n req.setId(2l);\n String token = CacheHelper.buildTestToken(\"1\");\n req.setToken(token);\n LOG.d(this,req);\n String str = JsonHelper.obj2JsonStr(req);\n WebApiResponse response = virtualCoinCtrl.getCoinTypeDetail(str);\n LOG.d(this, response);\n }", "public void makeRequest(int floor) {\n }", "public void executeRequest() throws CloneNotSupportedException {\n\t\t\n\t\tfor (BookingRequest bookingRequest : bookingRequestList) {\n\t\t\tCab assignedCab = null;\n\t\t\tdouble bestProfitMargin = 0;\n\t\t\tfor (Cab cabDetail : cabDetailList) {\n\t\t\t\t//check the business logic for booking cabs\n\t\t\t\tboolean checkCabReachability = checkCabReachability(bookingRequest, cabDetail);\n\t\t\t\tdouble cabProfitMargin = checkCabProfitMargin(bookingRequest, cabDetail);\n\t\t\t\t\n\t\t\t\tif (checkCabReachability && (cabProfitMargin > bestProfitMargin)) {\n\t\t\t\t\t assignedCab = cabDetail;\n\t\t\t\t\t bestProfitMargin = cabProfitMargin;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (assignedCab != null) {\n\t\t\t\tbookingRequest.setAssignedCab(assignedCab.clone());\n\t\t\t\t//adding o calculate profit\n\t\t\t\tbookingRequest.setProfit(bestProfitMargin);\n\t\t\t\tCalendar newCabTime = bookingRequest.getPickUpTime();\n\t\t\t\tInteger tripDistance = Utils.calculateDistance(bookingRequest.getPickUpArea(), bookingRequest.getDropArea());\n\t\t\t\tnewCabTime.add(Calendar.MINUTE, tripDistance * Constants.DISTANCE_BETWEEN_AREA);\n\t\t\t\tassignedCab.setCurrentLocationTime(newCabTime);\n\t\t\t\tassignedCab.setInitialLocation((Area)bookingRequest.getDropArea().clone());\n\t\t\t}\n\t\t}\n\t\t//finally displaying the response from the application\n\t\tdisplayMappingOfCabs(bookingRequestList);\n\t}", "private void sendMoveRequestToAgent(AID agentAID, Location destinationContainer){\n MobileAgentDescription mobileAgentDescription = new MobileAgentDescription();\n mobileAgentDescription.setName(agentAID);\n mobileAgentDescription.setDestination(destinationContainer);\n MoveAction moveAction = new MoveAction();\n moveAction.setMobileAgentDescription(mobileAgentDescription);\n sendRequest(new Action(agentAID, moveAction));\n }", "@Test\n\tpublic void testGetVehicleModels() throws UnirestException {\n\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/api/service/vehicleModels\")\n\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t .header(\"Postman-Token\", \"5d15aea4-c5ba-4e67-b979-42bd52ae1ccf\")\n\t\t\t .asString();\n}", "@SuppressWarnings(\"static-access\")\r\n\tpublic Map<String,String> getAttribute(String object, String attribute, String attributeKey, String [] samples, boolean recursive, boolean runtime) throws IOException, InterruptedException {\r\n\t\tfinal ModelNode request = new ModelNode();\r\n\t\tMap<String,String> eapAttr = new HashMap<String,String>();\r\n\t\tModelNode response = null;\r\n\t\tModelNode attr = null;\r\n\t\tObject value = null;\r\n\t\trequest.get(ClientConstants.OP).set(\"read-resource\");\r\n\t\tAttributes = object.split(\"/\");\r\n\t\tif (Attributes != null && Attributes.length > 0){\r\n\t\t\tfor(int i=0; i<Attributes.length; i++){\r\n\t\t\t\tif (Attributes[i].split(\"=\").length == 2) {\r\n\t\t\t\t\t//System.out.println(\"object: \"+Attributes[i]);\r\n\t\t\t\t\tString [] op_addr = Attributes[i].split(\"=\");\r\n\t\t\t\t\t//System.out.println(\"op_addr: \"+op_addr[0]+\" = \"+op_addr[1]);\r\n\t\t\t\t\trequest.get(ClientConstants.OP_ADDR).add(op_addr[0],op_addr[1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\trequest.get(\"recursive\").set(recursive);\r\n\t\trequest.get(\"include-runtime\").set(runtime);\r\n try {\r\n \tif (samples != null && samples.length == 3){\r\n \t\ttotalTime = (long) 0;\r\n \t\tint sample = Integer.parseInt(samples[0]);\r\n \t\tint delay = Integer.parseInt(samples[1]);\r\n \t\tString algorithm = samples[2];\r\n \t\tList<Long> values = new ArrayList();\r\n \t\tfor(int i=0; i<sample; i++){\r\n\t \t\tLong startTime = System.nanoTime();\r\n\t \t\tresponse = client.execute(new OperationBuilder(request).build());\r\n\t \t\tvalue = response.get(ClientConstants.RESULT).get(attribute).asLong();\r\n\t Thread.currentThread().sleep(delay);\r\n\t Long endTime = System.nanoTime();\r\n\t totalTime = endTime - startTime + totalTime;\r\n\t values.add((Long) value);\r\n \t\t}\r\n \t\tif(algorithm.matches(\"getDiffOverTime\")){\r\n \t\t\tvalue = getDiffOverTime(values, totalTime);\r\n \t\t}\r\n \t} else {\r\n\r\n \t\t\tresponse = client.execute(new OperationBuilder(request).build());\r\n \t\t\tif (attributeKey != null)\r\n \t\t\t\tvalue = response.get(ClientConstants.RESULT).get(attribute).get(attributeKey).toString().replaceAll(\"^\\\"|\\\"$|L$\", \"\"); \r\n \t\t\telse\r\n \t\t\t\tvalue = response.get(ClientConstants.RESULT).get(attribute).toString().replaceAll(\"^\\\"|\\\"$|L$\", \"\"); \r\n \t\t\tif (value.toString().matches(\"undefined\")){\r\n \t\t\t\tvalue = 0;\r\n \t\t\t}\r\n \t\t\t\r\n \t}\r\n } catch (IOException e) {\r\n \t\te.printStackTrace();\r\n \t} catch (InterruptedException e) {\r\n \t\te.printStackTrace();\r\n \t} catch (NullPointerException e) {\r\n \t\tvalue = \"0\";\r\n \t\t//e.printStackTrace();\r\n \t}\r\n\t\teapAttr.put(\"Attribute\", attribute);\r\n\t\teapAttr.put(\"Value\", value.toString());\r\n return eapAttr;\r\n\t}", "TransmissionProtocol.RequestOrBuilder getRequestOrBuilder(\n int index);", "void request(RequestParams params);", "public interface WayMapAPI {\n @GET(\"maps/api/directions/json?\")\n Call<WayPoints> getWayFromCoordinate(@Query(\"origin\")String from, @Query(\"destination\") String to, @Query(\"key\") String api_key);\n\n\n}", "public void requestToPutMyListItem(String bravoID, final IRequestListener iRequestListener, FragmentBasic fragmentBasic) {\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"Bravo_ID\", bravoID);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_MYLIST.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putMyListItem = new AsyncHttpPut(mContext, new AsyncHttpResponseProcess(mContext, fragmentBasic) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putFollow :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n Gson gson = new GsonBuilder().serializeNulls().create();\r\n ObPutMyList obPutMyList;\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n obPutMyList = gson.fromJson(response.toString(), ObPutMyList.class);\r\n iRequestListener.onErrorResponse(obPutMyList.error);\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot save this item\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putMyListItem.execute(url);\r\n }", "public void makeRequest() {\n Request newRequest = new Request();\n\n if (mProduct == null) {\n Toast.makeText(getContext(), \"BAD\", Toast.LENGTH_LONG).show();\n return;\n }\n\n newRequest.setClient(ParseUser.getCurrentUser());\n newRequest.setProduct(mProduct);\n newRequest.setBeaut(mBeaut);\n\n Date dateTime = new Date(selectedAppointmet.appDate.getTimeInMillis());\n newRequest.setDateTime(dateTime);\n // TODO: uncomment below line when dataset is clean and products have lengths\n// newRequest.setLength(mProduct.getLength());\n newRequest.setLength(1);\n newRequest.setSeat(selectedAppointmet.seatId);\n newRequest.setDescription(rComments.getText().toString());\n\n sendRequest(newRequest);\n }", "public HashMap<String, Object> sendChangeRequest(String confirmationID, short offset){\n\t\tHashMap<String, Object> request = new HashMap<String, Object>();\n\t\trequest.put(\"service_type\", Constants.CHANGE_BOOKING);\n\t\trequest.put(\"confirm_id\", confirmationID);\n\t\trequest.put(\"offset\", offset);\n\t\treturn this.sendRequest(request);\n\t\t\n\t}", "ServiceResponse execute(RequestParameters request);", "public static APIRequestTask requestDirections(String from, String to) {\n\t\tURLParameter _from = new URLParameter(\"origin\", from);\n\t\tURLParameter _to = new URLParameter(\"destination\", to);\n\t\tURLParameter _sensor = new URLParameter(\"sensor\", \"false\");\n\n\t\tAPIRequestTask task = new APIRequestTask(directions_url);\n\t\ttask.execute(_from, _to, _sensor);\n\t\treturn task;\n\t}", "public void FindHttpPost(){\n\t\t\n\t\tFindBean findBean = new FindBean();\n\t\tfindBean.setLocat(\"113.383108,23.141269\");\n//\t\tfindBean.setLocat(result);\n\t\tfindBean.setType(choice);\n\t\tString jsonstr = JsonHelper.toJsonString(findBean);\n\t\t\n\t\ttry {\n\t\t\tencodesstr = AesUtils.Encrypt(jsonstr, CommonConstants.AES_KEY);\n\t\t\t//System.out.println(encodesstr);\n\t\t\tLogger.d(\"encodesstr\", encodesstr);\n\t\t\t\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\t\n\t\tSharedPreferences sp = getActivity().getSharedPreferences(\"idcard\",0);\n\t\tfinal String oauth_token = sp.getString(\"oauth_token\", null);\n\t\tfinal String oauth_token_secret = sp.getString(\"oauth_token_secret\", null);\n\t\t\n\t\tma.task = new TaskUtil(ma);\n\t\tma.params = new AjaxParams();\n\t\tma.params.put(\"oauth_token\", oauth_token);\n\t\tma.params.put(\"oauth_token_secret\", oauth_token_secret);\n\t\tma.params.put(\"page\",\"\"+page);\n\t\tma.params.put(\"cont\", encodesstr);\n\n\t\tma.task.post(ma.params, Constans.looking_user);\n\t\tma.task.setType(Constans.REQ_Looking_User);\n\t\t\n\t}", "private static RequestSpecification placeOrderRequest(long id, long petId, int quantity, String shipDate, String status, boolean completed) {\n RestAssured.baseURI = MicroservicesEnvConfig.BASEURL;\n RestAssured.config = RestAssured.config().logConfig(LogConfig.logConfig().defaultStream(RSLOGGER.getPrintStream()));\n\n APILogger.logInfo(LOGGER,\"Place Store Order service Request...\");\n return RestAssured.given().header(\"Content-Type\", \"application/json\").body(placeOrderPayload(id, petId, quantity, shipDate, status, completed)).log().all();\n }", "private static void sendRequestPokerDistribution(PrintWriter pw, String method, Boolean requestFileFlag, Boolean bodyFlag) {\n pw.print(method + \" /\");\n if (requestFileFlag) {\n pw.print(\"PokerDistribution/\");\n }\n pw.print(\" HTTP/1.1\\r\\n\");\n //request headers formation.\n pw.print(\"Host: localhost\\r\\n\\r\\n\");\n //request body formation.\n if (bodyFlag) {\n pw.print(\"username = playerA\\r\\n\");\n }\n pw.flush();\n }", "MovilizerRequest prepareDownloadRequest(Long systemId, String password, Integer numResponses,\n MovilizerRequest request);", "@Test\n\tpublic void testGetYards() throws UnirestException {\n\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/api/service/getYards\")\n\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t .header(\"Postman-Token\", \"0e777d04-8184-440d-a59e-1e9df67d7543\")\n\t\t\t .asString();\n\t}", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest.listaInventarioCompromiso = this.listaInventarioCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPosicionCompromiso = this.listaPosicionCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPresentacionCompromiso = this.listaPresentacionCompromiso;\r\n\t\tactualizarCompromisoRequest.updateInformacionAdicionalTO = this.updateInformacionAdicionalTO;\r\n\t\tactualizarCompromisoRequest.codigoCabecera = this.codigoCabecera;\r\n\t\tString request = JSONHelper.serializar(actualizarCompromisoRequest);\r\n\t\treturn request;\r\n\t}", "public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }", "private void doBankRequest(final String amount) {\n ParseObject bankRequest = new ParseObject(Constants.CLASS_TRANSACTIONS);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n bankRequest.put(Constants.CLASS_TRANSACTIONS_RESOLUTION, false);\n bankRequest.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n mProgressBar.setVisibility(View.INVISIBLE);\n if (e == null) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mUserId);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException el) {\n el.printStackTrace();\n }\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n\n Logger.s(getApplicationContext(), getString(R.string.request_sent_message_txt));\n IntentUtils.startActivity(RequestFundsActivity.this, HomeActivity.class);\n finish();\n } else if (e.getCode() == ParseException.CONNECTION_FAILED || e.getCode() == ParseException.TIMEOUT) {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.network_timeout_message_txt));\n } else {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.general_error_message_txt));\n }\n }\n });\n }", "public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}", "private String gatewayRequestCmd(String url) {\n final ProgressDialog pDialog = new ProgressDialog(mCtx);\n pDialog.setMessage(\"Sending...\");\n pDialog.show();\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response\");\n Log.d(TAG, response.toString());\n pDialog.hide();\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error: \" + error.getMessage());\n // hide the progress dialog\n pDialog.hide();\n }\n });\n HttpHandler.getInstance(mCtx).addToRequestQueue(jsonObjReq);\n return \"\";\n\n }", "public static HttpResponse<JsonNode> sendRequest(String path, Map params) {\n String apiUrl = ConfigReader.getPropValues().getProperty(\"transit.url\");\n String apiKey = ConfigReader.getPropValues().getProperty(\"transit.key\");\n String jsonExtension = \".json\";\n HttpResponse<JsonNode> response = null;\n\n try {\n String fullPath = apiUrl + path;\n response = Unirest.get(fullPath + jsonExtension)\n .queryString(params)\n .queryString(\"api-key\", apiKey).asJson();\n BotLogger.info(LOG, \"Sent request: \" + fullPath);\n BotLogger.info(LOG, \"Params: \" + params);\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n return response;\n\n }", "pb4server.WalkSpeedAskReq getWalkSpeedAskReq();", "public interface CryptoInterface {\n @GET(\"pricemulti?fsyms=\"+FROM_SYSM+\"&tsyms=\"+TO_SYSM)\n Observable<Crytocoin> getCompareRates();\n}", "public static void main(String[] args) {\n\t\tMap<String, Object> testMap = new HashMap<>();\n\t\ttestMap.put(\"userAccount\", \"10000\");\n\t\ttestMap.put(\"where\", \"1=1 and Mobile='15507599162'\");\n\t\ttestMap.put(\"pageIndex\", 0);\n\t\ttestMap.put(\"pageSize\", 10);\n\t\ttestMap.put(\"orderBy\", \"\");\n\t\ttestMap.put(\"cardId\", \"desc\");\n\t\tOpenApiClient apiClient = new OpenApiClient(\"C2549D33134942FB94E936205AA57AA8\", \"I0AAQY\");\n\t\tJsonObject jsonObject = apiClient.CallHttpPost(\"Get_MembersPagedV2\", testMap);\n\n\n\t\tint status = jsonObject.get(\"status\").getAsInt();\n\t\tJsonArray array = jsonObject.get(\"data\").getAsJsonArray();\n\t\tfor(int i=0; i<array.size(); i++){\n\t\t\tSystem.out.println(\" i = \" + i + \" value = \" + array.get(i));\n\t\t\tJsonObject object = array.get(i).getAsJsonObject();\n\t\t\tSystem.out.println(\" ---------->> guid = \" + object.get(\"Guid\").getAsString());\n\t\t}\n\n\t\t BigInteger b = new BigInteger(\"-1888832\");\n b = b.abs();\n System.out.println(b.toString());\n BigInteger bs = new BigInteger(\"1888832\");\n bs = bs.abs();\n System.out.println(bs.toString());\n\t\t//System.out.println(getOrderNo());\n\t\tSystem.out.println(getCommonOrderNumber(Const.System_Module_Enum.LogisticsWebSystem,1));\n\t}", "public abstract VKRequest mo118416a(JSONObject jSONObject);", "protected void callCarryAgent(ISpaceObject target)\r\n\t{\r\n\t\tAGRSpace agrs = (AGRSpace)((IApplicationExternalAccess)getScope().getParent()).getSpace(\"myagrspace\");\r\n\t\tGroup group = agrs.getGroup(\"mymarsteam\");\r\n\t\tIComponentIdentifier[]\tcarriers\t= group.getAgentsForRole(\"carrier\");\r\n\t\t\r\n\t\tif(carriers!=null && carriers.length>0)\r\n\t\t{\r\n\t\t\t//System.out.println(\"Carry Agent: Found Carry Agents: \"+carriers.length);\r\n\r\n\t\t\tRequestCarry rc = new RequestCarry();\r\n\t\t\trc.setTarget(target);\r\n\t\t\t//Action action = new Action();\r\n\t\t\t//action.setAction(rc);\r\n\t\t\t//action.setActor(new AID(\"dummy\", true)); // Hack!! What to do with more than one receiver?\r\n\t\t\tIMessageEvent mevent = createMessageEvent(\"request_carries\");\r\n\t\t\tmevent.getParameterSet(SFipa.RECEIVERS).addValues(carriers);\r\n\t\t\tmevent.getParameter(SFipa.CONTENT).setValue(rc);\r\n\t\t\tsendMessage(mevent);\r\n\t\t\t//System.out.println(\"Production Agent sent target to: \"+carriers.length);\r\n\t\t}\r\n\t}", "public interface APIInterface {\n @GET(\"/data/price\")\n Call<Object> compareCurrency(@Query(\"fsym\")String fsym, @Query(\"tsyms\") String tsyms);\n @GET(\"/api/data/coinlist/\")\n Call<CurrencyResource> CoinsList();\n}", "@Override\n\tpublic void retrieve(ActionRequest req) throws ActionException {\n\t\tString schema = getCustomSchema();\n\t\tStringBuilder sql = new StringBuilder(200);\n\t\tsql.append(\"select a.*, b.reward_type_cd, b.reward_nm, c.type_nm\");\n\t\tsql.append(DBUtil.FROM_CLAUSE).append(schema).append(\"REZDOX_MEMBER_REWARD a \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(schema).append(\"REZDOX_REWARD b on a.reward_id=b.reward_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(schema).append(\"REZDOX_REWARD_TYPE c on b.reward_type_cd=c.reward_type_cd \");\n\t\tsql.append(\"where a.member_id=? \");\n\t\tsql.append(\"order by coalesce(a.update_dt, a.create_dt, CURRENT_TIMESTAMP) desc, c.type_nm, b.order_no, b.reward_nm\");\n\t\tlog.debug(sql);\n\n\t\tString memberId = StringUtil.checkVal(req.getAttribute(\"member_id\"), null);\n\t\tif (memberId == null)\n\t\t\tmemberId = RezDoxUtils.getMemberId(req);\n\n\t\tList<Object> params = new ArrayList<>();\n\t\tparams.add(memberId);\n\n\t\tDBProcessor db = new DBProcessor(getDBConnection(), schema);\n\t\tList<Object> myRewards = db.executeSelect(sql.toString(), params, new MemberRewardVO());\n\t\tputModuleData(myRewards);\n\t}", "Object getAll(WebRequest webRequest, HttpServletResponse response, Model model) throws Exception;", "public void sendYo (String username){\n try {\n URL obj = new URL(\"http://api.justyo.co/yo/\");\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestMethod(\"POST\");\n String urlParameters = \"api_token=9831429c-5e02-4175-b0d1-c5cbe958e09a&username=\" + username;\n con.setDoOutput(true);\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(urlParameters);\n wr.flush();\n wr.close();\n int responseCode = con.getResponseCode();\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n }\n catch(Exception e){\n System.out.println(\"Error\");\n }\n }", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) {\n ObjectNode req = makeRequest(api);\n req.set(\"objref\", objRef.toJson());\n return req;\n }", "public void XMLstartElement(String element, HashMap attributes) {\r\n /**\r\n * Ex: <remotecontrol button=\"NUMERIC4\" state=\"DOWN\" />\r\n * This is a notification from the remote control module\r\n * about one of our requested remote control buttons have\r\n * been pressed.\r\n */\r\n if (element.equals(\"remotecontrol\") && attributes.containsKey(\"button\") && attributes.containsKey(\"state\")) {\r\n String state = (String)attributes.get(\"state\");\r\n String button = (String)attributes.get(\"button\");\r\n\r\n //find all room objects that are associated with this remote button\r\n Iterator it = roomObjects.values().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)it.next();\r\n if (o.remoteButton.equals(button)) {\r\n //toggle all such room objects\r\n sendRoomObject(o.address, o.byteValue, state);\r\n }\r\n }\r\n }\r\n }", "@Test\npublic void testSaveMovement() throws UnirestException {\n\tHttpResponse<String> response = Unirest.post(\"http://localhost:8080/TrackingVehicle/api/movements\")\n\t\t\t.header(\"Content-Type\", \"application/json\")\n\t\t\t.header(\"Cache-Control\", \"no-cache\")\n\t\t\t.header(\"Postman-Token\", \"00792100-1211-4d0b-bcfc-096823e236bd\")\n\t\t\t.body(\"{\\r\\n\\t\\\"id\\\":\\\"1\\\",\\r\\n\\t\\\"tipoMovimento\\\":\\\"ING\\\",\\r\\n\\t\\\"codPiazzale\\\":\\\"00001\\\",\\r\\n\\t\\\"tipoTrasporto\\\":\\\"STR\\\",\\r\\n\\t\\\"vin\\\":\\\"1234ERTYUIOP4RTGF\\\",\\r\\n\\t\\\"codModello\\\":\\\"199\\\",\\r\\n\\t\\\"codTelaio\\\":\\\"12345678\\\",\\r\\n\\t\\\"versione\\\":\\\"123\\\",\\r\\n\\t\\\"serie\\\":\\\"1\\\",\\r\\n\\t\\\"parkingSpot\\\":\\\"123\\\",\\r\\n\\t\\\"numberPlate\\\":\\\"345\\\"\\r\\n\\t}\")\n\t\t\t.asString();\n}", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "pb4server.MassSpeedAskReq getMassSpeedAskReq();", "public void beginExecute(WebRequest request) throws Exception {\r\n request.addParameter(\"aid\", \"123\");\r\n }", "public void dmaRequest(DmaRequestRead read) throws SIMException;", "@GetMapping(\"/DepAcctBalRq/{rqUID}/{accountId}/{acctType}/{bankIdType}/{bankId}/{bankName}/{branchId}/{branchName}\")\n public DepAcctBalInqRs DepAcctBalanceRequest(@PathVariable(\"accountId\") String accountId,\n @PathVariable(\"rqUID\") String rqUID,\n @PathVariable(\"acctType\") String acctType,\n @PathVariable(\"bankIdType\") String bankIdType,\n @PathVariable(\"bankId\") String bankId,\n @PathVariable(\"bankName\") String bankName,\n @PathVariable(\"branchId\") String branchId,\n @PathVariable(\"branchName\") String branchName\n ) {\n //Objects required to build the IFX compliant response\n RestTemplate restTemplate = new RestTemplate();\n DepAcctIdFrom depAcctIdFrom = new DepAcctIdFrom();\n BankInfo bankInfo = new BankInfo();\n AcctBal acctBal = new AcctBal();\n CurAmt curAmt = new CurAmt();\n DepAcctBalInqRs depAcctBalInqRs = new DepAcctBalInqRs();\n\n //Code to access the PNC API Exchange to retrieve details based on Deposit Account Number\n String accounturl = \"http://apimanager.pncapix.com:8280/smartbank-account/1.0.0/account/{accountId}\";\n\n //Map to store the Parameters that are to be passed\n Map<String, Object> accountparamMap = new HashMap<>();\n accountparamMap.put(\"accountId\", accountId);\n\n //Map to store the headers required for the API Access\n MultiValueMap<String, Object> accountheaders = new LinkedMultiValueMap<>();\n accountheaders.add(\"Accept\", \"application/json\");\n accountheaders.add(\"Authorization\", \"Bearer 4efe4573-3ed8-3c18-847a-b043869f1a45\");\n HttpEntity accounthttpEntity = new HttpEntity(accountheaders);\n\n // Sending the request to the PNC API Exchange\n ResponseEntity<Account> accountResponseEntity =\n restTemplate.exchange(accounturl, HttpMethod.GET, accounthttpEntity, Account.class, accountparamMap);\n\n // Response stored in an object built as per the PNC API Response body JSON Structure\n Account account = accountResponseEntity.getBody();\n\n // Building the target response structure which is IFX Compliant\n bankInfo.setBankId(bankId);\n bankInfo.setBankIdType(bankIdType);\n bankInfo.setBranchId(branchId);\n bankInfo.setBranchName(branchName);\n bankInfo.setName(bankName);\n depAcctIdFrom.setAcctType(acctType);\n depAcctIdFrom.setBankInfo(bankInfo);\n depAcctIdFrom.setAcctId(accountId);\n depAcctIdFrom.setAcctCur(\"USD\");\n curAmt.setAmt(account.getBalance());\n curAmt.setCurCode(\"USD\");\n acctBal.setCurAmt(curAmt);\n acctBal.setBalType(\"Ledger\");\n depAcctBalInqRs.setAcctBal(acctBal);\n depAcctBalInqRs.setDepAcctIdFrom(depAcctIdFrom);\n depAcctBalInqRs.setRqUID(rqUID);\n\n //Return the JSON response\n return depAcctBalInqRs;\n }", "private static String sendPUT(final Wine wine) {\n return \"\";\r\n }", "public interface IScadaApiSend {\n \n /**\n * API Method to fetch all Production Blocks\n * @return List of Production Block objects\n */\n public ProductionBlock[] getAllProductionBlocks();\n \n /**\n * API Method to get a specific production block based on id\n * @param id ID of production block to fetch \n * @return Production Block object matching given ID\n */\n public ProductionBlock getSpecificProductionBlock(int id);\n \n /**\n * API Method to save a Production Block object\n * @param pb Production Block object to save \n * @return True on succesful save, false otherwise\n */\n public String saveProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to update a Production Block object\n * @param pb Production Block object to update\n * @return True on succesful update, false otherwise\n */\n public String updateProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to delete a Production Block object\n * @param pb Production block object to delete\n * @return True on succesful deletion, false otherwise\n */\n public String deleteProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to get a specific GrowthProfile object\n * @param id ID of the GrowthProfile object wished to fetch from DB\n * @return GrowthProfile object based on id\n */\n public GrowthProfile getSpecificGrowthProfile(int id);\n \n /**\n * API Ping method used to test if connection is still alive.\n * @return True or false if there is connection. \n */\n public boolean ping();\n}", "private OrderRequest buildRequestBody(OriginalOrder originalOrder) {\n String currency = \"MXN\";\n\n OrderRequest orderRequest = new OrderRequest();\n orderRequest.intent(originalOrder.getIntent());\n\n ApplicationContext applicationContext = new ApplicationContext()\n .brandName(originalOrder.getBrandName())\n .landingPage(originalOrder.getLandingPage())\n .shippingPreference(originalOrder.getShippingPreference());\n orderRequest.applicationContext(applicationContext);\n System.out.println(\"item Category: \"+ originalOrder.getItems().get(0).getCategory());\n List<PurchaseUnitRequest> purchaseUnitRequests = new ArrayList<PurchaseUnitRequest>();\n PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest()\n .referenceId(originalOrder.getReferenceId())\n .description(originalOrder.getDescription())\n .customId(originalOrder.getCustomId())\n .softDescriptor(originalOrder.getSoftDescriptor())\n .amount(new AmountWithBreakdown().currencyCode(currency).value(originalOrder.getTotal())\n .breakdown(\n new AmountBreakdown().itemTotal(new Money().currencyCode(currency).value(originalOrder.getTotal()))\n .shipping(new Money().currencyCode(currency).value(originalOrder.getShipping()))\n .handling(new Money().currencyCode(currency).value(originalOrder.getHandling()))\n .taxTotal(new Money().currencyCode(currency).value(originalOrder.getTaxTotal()))\n .shippingDiscount(new Money().currencyCode(currency).value(originalOrder.getShippingDiscount()))))\n .items(new ArrayList<Item>() {\n {\n add(new Item()\n .name(originalOrder.getItems().get(0).getName())\n .description(originalOrder.getItems().get(0).getDescription())\n .sku(originalOrder.getItems().get(0).getSku())\n .unitAmount(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getUnitAmount()))\n .tax(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getTax()))\n .quantity(originalOrder.getItems().get(0).getQuantity())\n .category(originalOrder.getItems().get(0).getCategory()));\n }\n })\n .shipping(new ShippingDetails().name(new Name().fullName(originalOrder.getAddress().getName()))\n .addressPortable(new AddressPortable()\n .addressLine1(originalOrder.getAddress().getAddressLine1())\n .addressLine2(originalOrder.getAddress().getAddressLine2())\n .adminArea2(originalOrder.getAddress().getAdminArea2())\n .adminArea1(originalOrder.getAddress().getAdminArea1())\n .postalCode(originalOrder.getAddress().getPostalCode())\n .countryCode(originalOrder.getAddress().getCountryCode())));\n System.out.println(\"purchaseUnitRequest: \\n\" +\n \"\\ndescription \"+ purchaseUnitRequest.description() +\n \"\\nreferenceId \"+ purchaseUnitRequest.referenceId() +\n \"\\nsoftDescriptor \"+ purchaseUnitRequest.softDescriptor() +\n \"\\namount currencyCode \"+ purchaseUnitRequest.amount().currencyCode() +\n \"\\namount value\"+ purchaseUnitRequest.amount().value() +\n \"\\namount taxTotal \"+ purchaseUnitRequest.amount().breakdown().taxTotal().value() +\n \"\\namount handling \"+ purchaseUnitRequest.amount().breakdown().handling().value() +\n \"\\namount shipping \"+ purchaseUnitRequest.amount().breakdown().shipping().value() +\n \"\\namount shippingDiscount \"+ purchaseUnitRequest.amount().breakdown().shippingDiscount().value() +\n \"\\namount itemTotal \"+ purchaseUnitRequest.amount().breakdown().itemTotal().value()\n );\n purchaseUnitRequests.add(purchaseUnitRequest);\n orderRequest.purchaseUnits(purchaseUnitRequests);\n System.out.println(\"Request: \" + orderRequest.toString());\n return orderRequest;\n }", "public static void sendGameMove(int sender_id, int receiver_id, String game, String move) {\n\n\n Socket clientSocket;\n\n ResponseObject object = new ResponseObject();\n\n try {\n clientSocket = new Socket(hostname, port);\n\n //Care about order\n ObjectInputStream datain = new ObjectInputStream(clientSocket.getInputStream());\n ObjectOutputStream dataout = new ObjectOutputStream(clientSocket.getOutputStream());\n\n String request = \"REQUEST \" + Integer.toString(sender_id) + \" \" + Integer.toString(receiver_id) + \" \" + game + \" \" + move;\n\n dataout.writeObject(request);\n// String response = (String) datain.readObject();\n clientSocket.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public interface IRegWeight {\r\n\r\n @POST(\"diabetes/patientUsers/registerWeight\")\r\n Call<RegWeight> setSendregisterWeightFrom(@Body rowPeso rPeso);\r\n\r\n @POST(\"diabetes/patientUsers/updateWeight\")\r\n Call<RegWeight> setSendWeightUpdateFrom(@Body rowPesoUpdate rPeso);\r\n\r\n public class RegWeight{\r\n @Getter\r\n @Setter\r\n private int idCodResult;\r\n @Getter\r\n @Setter\r\n private String resultDescription;\r\n @Getter\r\n @Setter\r\n private int idRegisterDB;\r\n\r\n }\r\n\r\n\r\n}", "@Override\n\tprotected Void doInBackground(Void... params) {\n\t\ttry {\n\t\t\tInteger sequenceNum = Integer.valueOf((int) (Math.random() * (MBDefinition.MDT_MAX_SEQUENCE_NUM + 1)));\n\n\t\t\tpbtReq = new PayByTokenRequest(this, this);\n\t\t\tpbtReq.setSysPassword(MBDefinition.SYSTEM_PASSWORD);\n\t\t\tpbtReq.setSysID(dbBook.getSysId());\n\t\t\tpbtReq.setDestID(dbBook.getDestID());\n\t\t\tpbtReq.setDeviceID(Utils.getHardWareId(_context));\n\t\t\tpbtReq.setSeqenceNum(sequenceNum.toString());\n\t\t\tpbtReq.setReqType(\"1\");\n\t\t\tpbtReq.setToken(cCard.getToken());\n\t\t\tpbtReq.setAmount(totalAmount);\n\t\t\tpbtReq.setJobID(dbBook.getTaxi_ride_id()+\"\");\n\t\t\tpbtReq.setCardNum(cCard.getLast4CardNum());\n\t\t\tpbtReq.setCardBrand(cCard.getCardBrand());\n\n\t\t\tif (!finalTipAmount.equalsIgnoreCase(\"\")) {\n\t\t\t\tpbtReq.setTip(finalTipAmount);\n\t\t\t}\n\n\t\t\tpbtReq.sendRequest(_context.getString(R.string.name_space), _context.getString(R.string.url));\n\t\t} catch (Exception e) {\n\t\t\tLogger.e(TAG, e.toString());\n\t\t}\n\n\t\treturn null;\n\t}", "private void getSettledBatchListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_SETTLED_BATCH_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchListOptions(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}" ]
[ "0.57246053", "0.5291319", "0.5285834", "0.5103011", "0.4942584", "0.48639303", "0.48052785", "0.47371045", "0.47244662", "0.47196054", "0.46977538", "0.46806034", "0.46140215", "0.46090582", "0.4595431", "0.45894545", "0.45819038", "0.45723704", "0.4552742", "0.45254815", "0.45235735", "0.45136073", "0.44669825", "0.44600016", "0.44380632", "0.4437578", "0.4428873", "0.44228032", "0.44135144", "0.4384941", "0.43842167", "0.43831247", "0.43684912", "0.43649274", "0.43602052", "0.43586403", "0.43554056", "0.4352603", "0.43323368", "0.43315846", "0.43301263", "0.4329904", "0.4316894", "0.43161336", "0.43157318", "0.4315187", "0.43063316", "0.4301578", "0.4298685", "0.42946428", "0.4293724", "0.429083", "0.42888013", "0.42851347", "0.42847937", "0.42846107", "0.42814213", "0.42724216", "0.42723203", "0.42668563", "0.42642045", "0.42556146", "0.4252247", "0.42485774", "0.42423272", "0.4236632", "0.42281482", "0.42266092", "0.42259058", "0.42191932", "0.4218798", "0.42138183", "0.42107514", "0.42106327", "0.4207612", "0.4201499", "0.41996497", "0.41966292", "0.4196267", "0.4193203", "0.41910404", "0.41852826", "0.41851154", "0.41721743", "0.41702142", "0.4167775", "0.41582412", "0.41551787", "0.4155076", "0.41512305", "0.41503796", "0.41389126", "0.4138505", "0.41367432", "0.4136356", "0.41320053", "0.4129861", "0.41265848", "0.41256383", "0.41250944" ]
0.48040417
7
Sends a request to the Movebank API and waits for the response This Method must never be called from the main thread.
public project.software.uni.positionprediction.datatypes.Request requestDataSync(String attributes){ RequestQueue queue = Volley.newRequestQueue(context); RequestFuture<String> requestFuture = RequestFuture.newFuture(); String url = baseUrl+attributes; // Request a string response from the provided URL. Log.i("MovebankRequest", "sending string request to " + url); project.software.uni.positionprediction.datatypes.Request request = new project.software.uni.positionprediction.datatypes.Request(getNextRequestCode()); StringRequest stringRequest = createStringRequest(request, url, requestFuture, requestFuture); // Add the request to the RequestQueue. requestFuture.setRequest(queue.add(stringRequest)); try{ String response = requestFuture.get(10, TimeUnit.SECONDS); request.setResponseStatus(statusMap.remove(new Integer(request.getId()))); request.setResponse(response); return request; } catch (InterruptedException | TimeoutException | ExecutionException e) { System.out.println(e.toString()); if(e.getCause() instanceof VolleyError) { VolleyError err = (VolleyError) e.getCause(); if(err.networkResponse != null) request.setResponseStatus(err.networkResponse.statusCode); else request.setResponseStatus(-1); } else { request.setResponseStatus(-1); } return request; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendRequest() throws IOException {\n\t\tHttpURLConnection urlConnection = getHttpURLConnection2(request.getServerUrl());\n\t\t\n\t\ttry {\n\t\t\tInputStream responseStream = null;\n\t final int serverResponseCode = urlConnection.getResponseCode();\n\t if (serverResponseCode / 100 == 2) {\n\t \tresponseStream = urlConnection.getInputStream();\n\t } else { // getErrorStream if the response code is not 2xx\n\t \tresponseStream = urlConnection.getErrorStream();\n\t }\n\t \n\t uploadLstener.onCompleted(uploadId, serverResponseCode, getResponseBodyAsString(responseStream));\n\t responseStream.close();\n\t\t} finally {\n\t\t\turlConnection.disconnect();\n\t\t}\n\t}", "private void sendRequest() {\n String origin = latitudewisata+\",\"+longitudewisata;\n Log.e(\"orininya\",origin);\n String destination = latitudewisata+\",\"+longitudewisata;\n Log.e(\"Dest\",destination);\n if (origin.isEmpty()) {\n Toast.makeText(this, \"Please enter origin address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destination.isEmpty()) {\n Toast.makeText(this, \"Please enter destination address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override \n public void run() {\n\t\tString path = Urls.URL_32;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"login-name-or-mobile\", username);\n\t\tmap.put(\"pwd\", password);\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\t \t\n\t\tMap<String, String> map2 = new HashMap<String, String>();\n\t \tmap2.put(\"Accept-Encoding\", \"gzip, deflate\");\n\t \tmap2.put(\"Accept\", \"application/json\");\n\n\t \tMap<String,String> info = new HashMap<String,String>();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tjsonStr = RequestService.getInstance().getRequest(params, path, map2);\n\t\t\t\n\t\t\tif(jsonStr==null || \"null\".equals(jsonStr) || \"\".equals(jsonStr)){\n\t\t\t\tinfo.put(\"available\", \"0\");\n\t\t\t}else{\n\t\t\t\tHttpUtils.parseJson(jsonStr, info, null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message(); \n\t msg.what = Constants.NETWORK_ERROR;\n\t handler.sendMessage(msg); \n\t return;\n\t\t}\n\t\t\n Message msg = new Message(); \n msg.obj = info;\n msg.what = Constants.GET_BALANCE_SUCCESS;\n handler.sendMessage(msg); \n }", "private String gatewayRequestCmd(String url) {\n final ProgressDialog pDialog = new ProgressDialog(mCtx);\n pDialog.setMessage(\"Sending...\");\n pDialog.show();\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response\");\n Log.d(TAG, response.toString());\n pDialog.hide();\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error: \" + error.getMessage());\n // hide the progress dialog\n pDialog.hide();\n }\n });\n HttpHandler.getInstance(mCtx).addToRequestQueue(jsonObjReq);\n return \"\";\n\n }", "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "private void submitRequest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tchangeControlState(false);\n\t\t\tlblStatus.setText(\"Sending Request...\");\n\t\t\tnew Thread(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tMPSWebRequest mpswr = new MPSWebRequest(mWSURL);\n\t\t\t\t\t\tmpswr.addParameter(\"tran\", taDSIXML.getText()); //Set WebServices 'tran' parameter to the XML transaction request\n\t\t\t\t\t\tmpswr.addParameter(\"pw\", \"XYZ\"); //Set merchant's WebServices password\n\t\t\t\t\t\tmpswr.setWebMethodName((String)cmbWebMethod.getSelectedItem()); //Set WebServices webmethod to selected type\n\t\t\t\t\t\tmpswr.setTimeout(10); //Set request timeout to 10 seconds\n\t\t\t\t\t\t\n\t\t\t\t\t\tString mpsResponse = mpswr.sendRequest();\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tshowPopup(\"Response XML String\",mpsResponse.replace(\">\\t\", \">\\n\\t\"));\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tshowPopup(\"Exception\", e.toString());\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tchangeControlState(true);\n\t\t\t\t\t\t@SuppressWarnings(\"unused\") // Properly disposing of current thread\n\t\t\t\t\t\tThread curthread = Thread.currentThread();\n\t\t\t\t\t\tcurthread = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tshowPopup(\"Exception\", e.toString());\n\t\t}\n\t}", "private void sendRequest() {\n double origLat = currLatLng.latitude;\n double origLong = currLatLng.longitude;\n double destLat = destLatLng.latitude;\n double destLong = destLatLng.longitude;\n String origin = origLat + \",\" + origLong;\n String destination = destLat + \",\" + destLong;\n Log.d(TAG, \"sendRequest: origin LatLong- \" + \" destination LaatLng- \" + destLatLng);\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }", "@SuppressWarnings(\"WeakerAccess\")\n protected void makeRequest() {\n if (mCallback == null) {\n CoreLogger.logError(addLoaderInfo(\"mCallback == null\"));\n return;\n }\n\n synchronized (mWaitLock) {\n mWaitForResponse.set(true);\n }\n\n doProgressSafe(true);\n\n Utils.runInBackground(true, new Runnable() {\n @Override\n public void run() {\n try {\n CoreLogger.log(addLoaderInfo(\"makeRequest\"));\n makeRequest(mCallback);\n }\n catch (Exception exception) {\n CoreLogger.log(addLoaderInfo(\"makeRequest failed\"), exception);\n callbackHelper(false, wrapException(exception));\n }\n }\n });\n }", "public void requestBoard(){\r\n try {\r\n clientThreads.get(0).getOOS().writeObject(\r\n new DataWrapper(DataWrapper.CTCODE, new ControlToken(ControlToken.BOARDREQUEST)));\r\n } catch(IOException ioe){\r\n ioe.printStackTrace();\r\n }\r\n }", "public Response send() {\n setupAndConnect();\n setRequestMethod();\n setRequestBody();\n setRequestHeaders();\n writeRequestBody();\n getResponse();\n connection.disconnect();\n return response;\n }", "private void doRequest() {\n\n try {\n JsonObject request = new JsonObject()\n .put(\"action\", Math.random() < 0.5 ? \"w\" : \"r\")\n .put(\"timeOfRequest\", System.currentTimeMillis());\n\n if (request.getString(\"action\") == \"w\") {\n request.put(\"data\", new JsonObject()\n .put(\"key\", \"value\")\n );\n logger.debug(\"requesting write: \" + request.toString());\n eb.send(\"storage-write-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n } else {\n Random random = new Random();\n List<String> keys = new ArrayList<String>(map.keySet());\n String randomKey = keys.get(random.nextInt(keys.size()));\n request.put(\"id\", randomKey);\n logger.debug(\"waiting for read: \" + request.toString());\n eb.send(\"storage-read-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n }\n } catch (Exception e) {\n logger.warn(\"Error\");\n makeRequest();\n }\n\n }", "public void run() {\n\t\t\n\t\ttry {\n\t\tString reqS = \"\";\n\t\t\n\t\twhile(br.ready() || reqS.length() == 0) //reading the request from the client.\n\t\t\treqS += (char) br.read();\n\t\t\n\t\tSystem.out.println(reqS); //to see what the request message looks like (testing if the input is read in correctly)\n\t\trequest req = new request(reqS);\n\t\t\n\t\tresponse res = new response(req);\n\t\t\n\t\tpw.write(res.response.toCharArray());\n\t\t\n\t\tpw.close();\n\t\tbr.close();\n\t\ts.close();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}", "public Object call() throws Exception {\n\t\t\t\t\t\tProducerSimpleNettyResponseFuture future;\n\t\t\t\t\t\tProducerSimpleNettyResponse responseFuture;\n\t\t\t\t\t\tfuture = clientProxy.request(message);\n\t\t\t\t\t\tresponseFuture = future\n\t\t\t\t\t\t\t\t.get(3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\t\treturn responseFuture.getResponse();\n\t\t\t\t\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}", "private String gatewayRequest(String url) {\n final ProgressDialog pDialog = new ProgressDialog(mCtx);\n pDialog.setMessage(\"Loading...\");\n pDialog.show();\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n manageResponse(response);\n //manageResponse(getDevicesMoke());\n\n pDialog.hide();\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error: \" + error.getMessage());\n // hide the progress dialog\n pDialog.hide();\n }\n });\n HttpHandler.getInstance(mCtx).addToRequestQueue(jsonObjReq);\n return \"\";\n\n }", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\t\t\t\tStringBuilder response = new StringBuilder();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\r\n\t\t\t\t\tconnection.setConnectTimeout(8000);\r\n\t\t\t\t\tconnection.setReadTimeout(8000);\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\t//connection.setDoOutput(true);\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tLog.d(\"HttpUtil\", String.valueOf(responseCode));\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tInputStream in = connection.getInputStream();\r\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile((line = reader.readLine()) != null){\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Success\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "private static void RequestBillboardScheduling() throws IOException, ClassNotFoundException {\n\n Socket client = ConnectionToServer();\n\n // connects to the server with information and attempts to get the auth token for the user after successful Login\n if (client.isConnected()) {\n OutputStream outputStream = client.getOutputStream();\n InputStream inputStream = client.getInputStream();\n\n ObjectOutputStream send = new ObjectOutputStream(outputStream);\n ObjectInputStream receiver = new ObjectInputStream(inputStream);\n\n send.writeUTF(\"RequestScheduleBillboards\");\n\n send.writeUTF(loggedInUser);\n send.writeUTF(token);\n send.flush();\n\n // Store the current schedule listings\n schedules = (ArrayList<String[]>) receiver.readObject();\n\n if (schedules != null) {\n int scheduleCounter = 1;\n for(String[] schedule : schedules){\n// System.out.println(\"\\nScheduled billboard \" + scheduleCounter + \":\");\n// System.out.println(\"Day: \" + schedule[1]);\n// System.out.println(\"Duration: \" + schedule[2]);\n// System.out.println(\"Start Time: \" + schedule[3]);\n\n scheduleCounter++;\n }\n } else {\n DialogWindow.ShowInformationPane(\"There is currently no scheduled billboards\", \"No billboard scheduled\");\n// System.out.println(\"There is currently no scheduled billboards\");\n }\n\n// End connections\n send.close();\n receiver.close();\n client.close();\n }\n }", "private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }", "private boolean sendRequest() {\n\t\tclSyncNTPMessage _mess = new clSyncNTPMessage();\n\t\t_mess.setOriginateDate(new Date().getTime());\n\t\t\n\t\treturn sendToServer(_mess);\n\t}", "@Override\n\tpublic void run() {\n\t\tString request;\n\t\ttry {\n\t\t\tSocketBuilder socketBuilder = new SocketBuilder(this.IP);\n\n\t\t\tSocket clientSocketStrings = socketBuilder.createStringSocket();\n\t\t\tSocket clientSocketBytes = socketBuilder.createByteSocket();\n\n\t\t\tDataOutputStream outToServer = new DataOutputStream(clientSocketStrings.getOutputStream());\n\n\t\t\tDataInputStream bytesStream = new DataInputStream(clientSocketBytes.getInputStream());\n\n\t\t\tBufferedReader inFromServer = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(clientSocketStrings.getInputStream(), StandardCharsets.UTF_8));\n\t\t\t\n\t\t\tMessage requestMessage = new Message();\n\t\t\trequestMessage.createDownloadMessage(path);\n\n\t\t\trequest = JsonParser.messageToJson(requestMessage);\n\n\t\t\toutToServer.write(request.getBytes(\"UTF-8\"));\n\t\t\toutToServer.writeByte('\\n');\n\n\t\t\tMessage responseMessage = JsonParser.jsonToMessage(inFromServer.readLine());\n\n\t\t\t// check if operation is possible\n\t\t\tif (responseMessage.isERRORMessage()) {\n\t\t\t\t/*\n\t\t\t\t * Handle Error Here\n\t\t\t\t */\n\t\t\t} else {\n\n\t\t\t\tFileTransfer fileTransfer = new FileTransfer();\n\n\t\t\t\tlong size = Long.parseLong(inFromServer.readLine());\n\n\t\t\t\tEstimationViewManagementThread manage = new EstimationViewManagementThread(size, \n\t\t\t\t\t\tfileTransfer, clientSocketStrings, clientSocketBytes);\n\t\t\t\tmanage.start();\n\t\t\t\tfileTransfer.receiveFiles(bytesStream, inFromServer, locationToSave);\n\t\t\t}\n\t\t\t\n\t\t\toutToServer.close();\n\t\t\tbytesStream.close();\n\t\t\tinFromServer.close();\n\t\t\tclientSocketBytes.close();\n\t\t\tclientSocketStrings.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RequestResponse run() {\n try (Socket client = new Socket(ip, port)) {\n System.out.println(\"Connected to server.\");\n OutputStream out = client.getOutputStream();\n ObjectOutputStream writer = new ObjectOutputStream(out);\n writer.writeObject(request);\n System.out.println(\"REQUEST Sent . \");\n InputStream in = client.getInputStream();\n ObjectInputStream reader = new ObjectInputStream(in);\n Thread.sleep(2000);\n requestResponse=(RequestResponse) reader.readObject();\n System.out.println(\"RESPONSE RECEIVED .\");\n client.close();\n } catch (IOException | ClassNotFoundException | InterruptedException ex) {\n ex.printStackTrace();\n }\n System.out.println(\"CLIENT \" + \" has done its job .\");\n return requestResponse;\n }", "@Override\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\n\n\t\t\tMap<String, String> param = new HashMap<String, String>();// 组装请求参数\n\t\t\tparam.put(\"idCardName\", \"卢波\");\n\t\t\tparam.put(\"IDNumber\", \"37142519930502763X\");\n\t\t\tparam.put(\"bankNumber\", \"6227002271530099694\");\n\t\t\tparam.put(\"companyName\", \"山东题开店收银台\");\n\t\t\tparam.put(\"mobilePhone\", \"18315913992\");\n\t\t\tparam.put(\"accounttype\", \"1\");\n\t\t\tparam.put(\"bankcardtype\", \"1\");\n\t\t\tparam.put(\"storeAddress\", \"山东省济南市天桥区时代总部基地4期H3楼201\");\n\t\t\tparam.put(\"uid\", \"3617\");\n\n\t\t\tHttp_PushTask HP = new Http_PushTask();\n\t\t\ttry {\n\t\t\t\tString result = HP.execute(CryptTool.transMapToString(param),\n\t\t\t\t\t\t\"http://cnyssj.com/dfweb_test/rbkjsame.do\").get();\n\t\t\t\tif (!TextUtils.isEmpty(result)) {\n\t\t\t\t\tJSONObject js = new JSONObject(result);\n\t\t\t\t\tif (js.getBoolean(\"result\")) {\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString message = js.getString(\"message\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@Test\n public void withdrawTest() {\n\n WithdrawRequest withdrawRequest = WithdrawRequest.newBuilder()\n .setAccountNumber(7)\n .setAmount(40)\n .build();\n\n // this call waits for the response from the server\n this.blockingStub.withdraw(withdrawRequest)\n .forEachRemaining(money -> System.out.println(\"\\n\\tReceived : $\" + money.getValue()));\n }", "private void startSendHttpRequestThread(final String word)\n {\n\n Thread sendHttpRequestThread = new Thread()\n {\n @Override\n public void run() {\n // using Panel 7.2.21 as a model- The Movie API\n\n //make empty URL and connection\n URL url;\n HttpURLConnection ur1Connection = null; //HttpsURLConnection aiso avaitab1e\n try {\n\n //String service = reqUrl; // call rhymebrain\n String service = \"https://rhymebrain.com/talk?\"; // call rhymebrain\n //String parm = \"getRhymes&word=\" + word;\n //String queryString = URLEncoder.encode(parm, \"UTF-8\");\n String queryString = \"getRhymes&word=\" + word + \"&maxResults=\" + String.valueOf(MAX_RESULTS);\n //try to process url and connect to it\n url = new URL( service + \"function=\" + queryString);\n Log.d(\"which URL: \", String.valueOf(url));\n ur1Connection = (HttpURLConnection)url.openConnection();\n ur1Connection.setRequestMethod(\"GET\");\n\n // Set connection timeout and read timeout value.\n ur1Connection.setConnectTimeout(70000);\n ur1Connection.setReadTimeout(70000);\n\n //create an input stream and stream reader from the connection\n InputStream inputStream = ur1Connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n\n //get some data from the stream\n int data = inputStreamReader.read();\n //string for collecting all output\n output = \"\";\n //if the stream is not empty\n while(data != -1) {\n //turn what we read into a char and print it\n char current = (char) data;\n output += current;\n data = inputStreamReader.read();\n\n //Log.d(\"Network\", output);\n }\n Log.d(\"Network\", output);\n parseJSON(output);\n int i =0;\n }catch (Exception e) {\n Log.d( \"Network\", e.toString());\n }finally {\n if (ur1Connection != null) {\n ur1Connection.disconnect();\n ur1Connection = null;\n }\n }\n }\n\n };\n // Start the child thread to request web page.\n sendHttpRequestThread.start();\n }", "void responseReady(String response);", "public void sendRequest() {\n\t\tURL obj;\n\t\ttry {\n\t\t\t// Instantiating HttpURLConnection object for making GET request.\n\t\t\tobj = new URL(REQUEST_URL);\n\t\t HttpURLConnection connection = (HttpURLConnection) obj.openConnection();\n\t\t connection.setRequestMethod(REQUEST_METHOD);\n\t\t connection.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t connection.setInstanceFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\tHttpURLConnection.setFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\n\t\t\t// Checking response code for successful request.\n\t\t\t// If responseCode==200, read the response,\n\t\t\t// if responseCode==3xx, i.e., a redirect, then make the request to \n\t\t\t// new redirected link, specified by 'Location' field. \n\t\t\t// NOTE: Only one level of redirection is supported for now. \n\t\t\t// Can be modified to support multiple levels of Redirections.\n\t\t\tint responseCode = connection.getResponseCode();\n\t\t\tif(responseCode == HttpURLConnection.HTTP_MOVED_PERM ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_MOVED_TEMP ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_SEE_OTHER) {\n\t\t\t\tlogger.info(\"Redirect received in responseCode\");\n\t\t\t\tString newUrl = connection.getHeaderField(\"Location\");\n\t\t\t\tconnection = (HttpURLConnection) new URL(newUrl).openConnection();\n\t\t\t}\n\t\t\tresponseCode = connection.getResponseCode();\n\t\t\t\n\t\t\t// process response message if responseCode==200 i.e., success.\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tconnection.getInputStream()));\n\t\t\t\tString inputLine;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t}\n\t\t\t\tin.close();\n\t\t\t\t//Uncomment following line to log response data.\n\t\t\t\t//logger.info(response.toString());\n\t\t\t} else {\n\t\t\t\tlogger.warning(\"Http GET request was unsuccessful!\");\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.severe(\"MalformedURLException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.severe(\"IOException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void waitForTransfer() {\n\t\tWebDriverUtil.waitForElementVisible(driver, redirectTimer, 10);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\tLOG.info(\"waiting to be transferred to merchant site...\");\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"transfer-success\")));\n\t\tLOG.info(\"done waiting\"); \n\t}", "private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}", "CompletableFuture<Void> sendRequestOneWay(HttpRequest request);", "CompletableFuture<HttpResponse> sendRequest(HttpRequest request);", "void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }", "private void sendRequest() {\n\t\tloading = ProgressDialog.show(this, \"Loading\", \"Please wait...\");\n\n\t\tUri.Builder uri = new Uri.Builder();\n\t\turi.authority(DatabaseContract.PROVIDER_NAME);\n\t\turi.path(Integer.toString(Constants.LOADREQUESTSCMD));\n\t\turi.scheme(\"content\");\n\n\t\tIntent intent = new Intent(this, MyService.class);\n\t\tintent.putExtra(\"ACTION\", \"QUERY\");\n\t\tintent.setData(uri.build());\n\n\t\trequestid = new Date().getTime();\n\t\tintent.putExtra(\"requestid\", requestid);\n\t\tstartService(intent);\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "public static void RequestUpdate() {\n try {\n if (AttemptConnect()) {\n // receive current billboard\n billboard = (Billboard) objectStreamer.Receive();\n // closing resources\n Disconnect();\n } else {\n billboard = new Billboard(\"Unable to Connect to Server\",\n \"Error Billboard\",\n \"Please Check Connection\",\n null,\n billboard.ConvertImageToData(\n ProjectPath.RootString() + \"\\\\Resources\\\\Images\\\\Oops.jpg\"),\n Color.red,\n Color.white,\n Color.red,\n null,\n null);\n }\n // Display billboard\n billboard.showBillboard();\n } catch (Exception e) {\n //e.printStackTrace();\n }\n }", "public void sendRequestWithHttpURLConnectionTwo() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n BufferedReader mReader = null;\n HttpURLConnection urlConnection = null;\n try {\n // URL AND HEADER WITH KEY\n //URL url = new URL(\"https://api.goingelectric.de/chargepoints/chargecardlist\");\n\n // Mannheim Radius 10 km\n // URL url = new URL(\"https://api.goingelectric.de/chargepoints?lat=49.486&lng=8.467&radius=10\");\n\n // Mannheim only Germany Radious 200km\n URL url = new URL(\"https://api.goingelectric.de/chargepoints/?countries=DE&lat=49,007294&lng=8,343797&radius=200\");\n\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Content-Type\",\"application/json\");\n urlConnection.addRequestProperty(\"x-Api-Key\",\"b1589c7c1140728fedf2649d5f4e82a2\");\n\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setConnectTimeout(8000);\n urlConnection.setReadTimeout(8000);\n InputStream in = urlConnection.getInputStream();\n\n // read the input stream\n mReader = new BufferedReader(new InputStreamReader(in));\n StringBuffer response = new StringBuffer();\n String line;\n while ((line = mReader.readLine()) != null) {\n response.append(line);\n }\n showResponse(response.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (mReader != null) {\n try {\n mReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (urlConnection != null) {\n urlConnection.disconnect();\n\n }\n }\n\n\n }\n }).start();\n\n\n }", "public void sendRRequests() {\n\n }", "public synchronized void sendResponseIfReady() throws IOException {\n getConnection().channel.write(response).addListener(new CallWriteListener(this));\n }", "public void sendResponse(ResponseNetObject response){\r\n\r\n sendObject(response);\r\n\r\n }", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\r\n\t\t\t\tPrintWriter printWriter = null;\r\n\t\t\t\tBufferedReader bufferedReader = null;\r\n\r\n\t\t\t\tStringBuffer response = new StringBuffer();\r\n\t\t\t\tStringBuffer request = new StringBuffer();\r\n\r\n\t\t\t\t// 组织请求参数\r\n\t\t\t\tif (null != params && !params.isEmpty()){\r\n\t\t\t\t\tfor (Map.Entry<String, String> entry : params.entrySet()){\r\n\t\t\t\t\t\trequest.append(entry.getKey()).append(\"=\").append(entry.getValue()).append(\"&\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//< 删除多余的&\r\n\t\t\t\t\trequest.deleteCharAt(request.length() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tLog.d(\"HttpUtil\", request.toString());\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"POST\");\r\n\t\t\t\t\tconnection.setRequestProperty(\"Content-Length\", String.valueOf(request.length()));\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\tconnection.setDoOutput(true);\r\n\t\t\t\t\tprintWriter = new PrintWriter(connection.getOutputStream());\r\n\t\t\t\t\tprintWriter.write(request.toString());\r\n\t\t\t\t\tprintWriter.flush();\r\n\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Success\");\r\n\t\t\t\t\t\tbufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (printWriter != null) {\r\n\t\t\t\t\t\t\tprintWriter.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (bufferedReader != null) {\r\n\t\t\t\t\t\t\tbufferedReader.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Test\n void executeMoneyTransfer() throws ParseException, JsonProcessingException {\n\n String idAccount = \"14537780\";\n String receiverName = \"Receiver Name\";\n String description = \"description text\";\n String currency = \"EUR\";\n String amount = \"100\";\n String executionDate = \"2020-12-12\";\n MoneyTransfer moneyTransfer = Utils.fillMoneyTransfer(idAccount, receiverName, description, currency, amount, executionDate);\n\n Response response = greetingWebClient.executeMoneyTransfer(moneyTransfer, idAccount);\n assertTrue(response.getStatus().equals(\"KO\"));\n\n\n }", "@Override\n public void run() {\n\n new Thread() {\n\n @Override\n public void run() {\n HttpGet requestForTest = new HttpGet(\"http://m.google.com\");\n try {\n new DefaultHttpClient().execute(requestForTest); // can last...\n responded = true;\n } catch (Exception e) {}\n }\n\n }.start();\n\n try {\n int waited = 0;\n while(!responded && (waited < timeout)) {\n sleep(100);\n if(!responded ) { \n waited += 100;\n }\n }\n } \n catch(InterruptedException e) {} // do nothing \n finally { \n if (!responded) { handler.sendEmptyMessage(0); } \n else { handler.sendEmptyMessage(1); }\n }\n\n }", "private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}", "@Api(1.1)\n public Response execute() throws HaloNetException {\n return mBuilder.mClient.request(mRequest);\n }", "@Override\n protected String doInBackground(Void... params) {\n Connector con = new Connector();\n return con.send(urlAddress, data);\n }", "public void request() {\n }", "public Status waitUntilFinished();", "CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request);", "public UsbRequest asyncRequestWait() {\n return mUsbConnection.requestWait();\n }", "public void requestBot(String s) {\n\t\tLEDManager.requestConnection(s);\n\t}", "private void sendRequest(String orign,String destin) {\n stopTask();\n\n if (orign.isEmpty()) {\n Toast.makeText(this, \"Por favor ingrese la dirección de origen!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destin.isEmpty()) {\n Toast.makeText(this, \"Por favor ingrese la dirección de destino!\", Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n new DirectionFinder(this, orign, destin).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "private void doBankRequest(final String amount) {\n ParseObject bankRequest = new ParseObject(Constants.CLASS_TRANSACTIONS);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n bankRequest.put(Constants.CLASS_TRANSACTIONS_RESOLUTION, false);\n bankRequest.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n mProgressBar.setVisibility(View.INVISIBLE);\n if (e == null) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mUserId);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException el) {\n el.printStackTrace();\n }\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n\n Logger.s(getApplicationContext(), getString(R.string.request_sent_message_txt));\n IntentUtils.startActivity(RequestFundsActivity.this, HomeActivity.class);\n finish();\n } else if (e.getCode() == ParseException.CONNECTION_FAILED || e.getCode() == ParseException.TIMEOUT) {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.network_timeout_message_txt));\n } else {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.general_error_message_txt));\n }\n }\n });\n }", "MovilizerResponse getReplyFromCloudSync(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);", "void sendResponseMessage(HttpResponse response) throws IOException;", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "public void run() {\n if (!connectFuture.isDone()) {\n connectFuture.cancel(true);\n return;\n }\n try {\n // send a message to the server\n ByteBuffer message = ByteBuffer.wrap(\"ping\".getBytes());\n // wait for the response\n System.out.println(\"Sending message to the server...\");\n int numberBytes = client.write(message).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "@Override\n\tpublic Response call() throws Exception {\n\t\tClientResponse response = callWebService(this.spaceEntry);\n\t\tthis.transId = (int) response.getEntity(Integer.class);\n\t\tresponse.close();\n\t\t/*wait for web service to provide tuple Object result*/\n\t\tawaitResult();\n\t\t\n\t\t/*return result*/\n\t\treturn result;\n\t}", "@Override\n public void run() {\n new ConnectBT().execute();\n }", "public void controlLoop() throws Exception {\n \n TransferData send = localState();\n if (send == null)\n throw new Exception(\"Unable to compute local state\");\n \n TransferData receive = new TransferData();\n \n for (int AUV = 0; AUV < AUVS; AUV++) {\n showText(nameTable.get(AUV)+\" is at \"+send.Location[AUV][0]+\", \"+send.Location[AUV][1]+\", \"+send.Location[AUV][2]);\n }\n \n Gson gson = new Gson();\n String json = gson.toJson(send);\n \n PrintWriter writer = null;\n writer = new PrintWriter(SessionID + \"_Data.txt\", \"UTF-8\");\n writer.write(json);\n writer.close();\n \n NeptusLog.pub().info(\"uploading to convcao...\"+json.toString());\n Upload(\"www.convcao.com\",\"NEPTUS\",\"\",jTextField1.getText(),new String(jPasswordField1.getPassword()),SessionID + \"_Data.txt\");\n \n showText(\"Upload complete, downloading new AUV destinations\");\n \n int receivedTimestep = 0;\n while (!cancel && receivedTimestep < timestep) { \n Thread.sleep(100);\n \n try {\n URL url = new URL(\"http://www.convcao.com/caoagile/FilesFromAgent/NEPTUS/\" + SessionID + \"_NewActions.txt\");\n URLConnection conn = url.openConnection();\n conn.setUseCaches(false);\n conn.connect();\n //BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));\n BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n String jsonClient = in.readLine();\n receive = new Gson().fromJson(jsonClient,TransferData.class); \n receivedTimestep = receive.timeStep;\n }\n catch(IOException ex) {\n NeptusLog.pub().error(ex);\n }\n }\n \n showText(\"Received updated positions from convcao\");\n \n timestep++;\n \n for (int AUV = 0; AUV < receive.Location.length; AUV++) {\n String name = nameTable.get(AUV);\n LocationType loc = coords.convert(receive.Location[AUV][0], receive.Location[AUV][1]);\n loc.setDepth(1+AUV*1.5);//coords.convertNoptilusDepthToWgsDepth(receive.Location[AUV][2]));\n destinations.put(name, loc);\n showText(name+\" is being sent to \"+receive.Location[AUV][0]+\", \"+receive.Location[AUV][1]);\n }\n \n myDeleteFile(SessionID + \"_Data.txt\");\n }", "private static HttpResponse sendGet() throws Exception {\n // Create the Call using the URL\n HttpGet http = new HttpGet(url);\n // Set the credentials set earlier into the headers\n Header header = new BasicScheme(StandardCharsets.UTF_8).authenticate(creds, http, null);\n // Set the header into the HTTP request\n http.addHeader(header);\n // Print the response\n return httpClient.execute(http);\n }", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "@Override\n public void run() {\n\n queryForRoutingManager();\n File f = IMbuffer.fetchFromIMInputBuffer();\n if (f.getName().startsWith(\"Responseto\")) {\n transfertopurge(f);\n }\n }", "public static void sendElectionRequest()\n {\n System.out.println(\"INFO : Election initiated\");\n int numberOfFailedRequests = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if( key > ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n try {\n MessageTransfer.sendServer(\n ServerMessage.getElection( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent election request to s\"+destServer.getServerID());\n }\n catch(Exception e){\n System.out.println(\"WARN : Server s\"+destServer.getServerID() +\n \" has failed, cannot send election request\");\n numberOfFailedRequests++;\n }\n }\n\n }\n if (numberOfFailedRequests == ServerState.getInstance().getNumberOfServersWithHigherIds()) {\n if(!electionInProgress){\n //startTime=System.currentTimeMillis();\n electionInProgress = true;\n receivedOk = false;\n Runnable timer = new BullyAlgorithm(\"Timer\");\n new Thread(timer).start();\n }\n }\n }", "CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);", "private void sendPollAction() {\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) {}\n\t\t\t\t\telse showErrorMessage(this.getClass().getName() + \"-sendPollAction() ERROR: \" + caught.toString());\n\t\t\t\t}\n\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (result.hasErrors())\n\t\t\t\t\t\tshowSystemMessage(\"Error al Enviar Encuesta: \" + result.errorsToString());\n\t\t\t\t\telse {\n\t\t\t\t\t\tshowSystemMessage(\"Encuesta Enviada. \"+\n\t\t\t\t\t\t\t\t\"<a href=\\\"\" + GWT.getHostPageBaseURL() + \n\t\t\t\t\t\t\t\t\"/frm/flex_customerpoll.jsp?h=\" + new Date().getTime() + \"proj&w=EXT&z=\" + \n\t\t\t\t\t\t\t\tGwtUtil.encryptId(bmoProject.getId()) + \"&r=interv\" + (new Date().getTime() * 456) +\"\\\" target='_blank'><br>Ver Encuesta</a>\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().action(bmoProject.getPmClass(), bmoProject, BmoProject.ACTION_SENDPOLL, \"\" + bmoProject.getId(), callback);\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-sendPollAction() ERROR: \" + e.toString());\n\t\t\t}\n\t\t}", "private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}", "private static HttpResponse sendPost() throws Exception {\n // Create the Call using the URL\n HttpPost http = new HttpPost(url);\n // Set the credentials set earlier into the headers\n Header header = new BasicScheme(StandardCharsets.UTF_8).authenticate(creds, http, null);\n // Set the header into the HTTP request\n http.addHeader(header);\n // Print the response\n return httpClient.execute(http);\n }", "public void sendHttp() {\n String url = \"https://openwhisk.ng.bluemix.net/api/v1/namespaces/1tamir198_tamirSpace/actions/testing_trigger\";\n //api key that i got from blumix EndPoins\n String apiKey = \"530f095a-675e-4e1c-afe0-4b421201e894:0HriiSRoYWohJ4LGOjc5sGAhHvAka1gwASMlhRN8kA5eHgNu8ouogt8BbmXtX21N\";\n try {\n //JSONObject jsonObject = new JSONObject().put(\"openwhisk.ng.bluemix.net\" ,\"c1165fd1-f4cf-4a62-8c64-67bf20733413:hdVl64YRzbHBK0n2SkBB928cy2DUO5XB3yDbuXhQ1uHq8Ir0dOEwT0L0bqMeWTTX\");\n String res = (new HttpRequest(url)).prepare(HttpRequest.Method.POST).withData(apiKey).sendAndReadString();\n //String res = new HttpRequest(url).prepare(HttpRequest.Method.POST).withData(jsonObject.toString()).sendAndReadString();\n System.out.println( res + \"***********\");\n\n } catch ( IOException exception) {\n exception.printStackTrace();\n System.out.println(exception + \" some some some\");\n System.out.println(\"catched error from response ***********\");\n }\n }", "private void waitForSuccessfulConnectionToZap() throws Exception {\n int timeoutInMs = CONNECTION_TIMEOUT;\n int connectionTimeoutInMs = timeoutInMs;\n int pollingIntervalInMs = 1000;\n boolean connectionSuccessful = false;\n long startTime = System.currentTimeMillis();\n Socket socket = null;\n do {\n try {\n LogManager.suitLogger.info(\"Attempting to connect to ZAP API on: \" + ZAP_HOSTNAME + \" port: \" +PORT);\n socket = new Socket();\n socket.connect(new InetSocketAddress(ZAP_HOSTNAME, PORT), connectionTimeoutInMs);\n connectionSuccessful = true;\n LogManager.suitLogger.info(\"Connected to ZAP successfully\");\n } catch (SocketTimeoutException ignore) {\n throw new UnicornZapException(\"Unable to connect to ZAP's proxy after \" + timeoutInMs + \" milliseconds.\");\n } catch (IOException ignore) {\n // and keep trying but wait some time first...\n try {\n Thread.sleep(pollingIntervalInMs);\n } catch (InterruptedException e) {\n throw new UnicornZapException(\"The task was interrupted while sleeping between connection polling.\", e);\n }\n\n long ellapsedTime = System.currentTimeMillis() - startTime;\n if (ellapsedTime >= timeoutInMs) {\n throw new UnicornZapException(\"Unable to connect to ZAP's proxy after \" + timeoutInMs + \" milliseconds.\");\n }\n connectionTimeoutInMs = (int) (timeoutInMs - ellapsedTime);\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n } while (!connectionSuccessful);\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tProxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(\n\t\t\t\t\t\t\"proxy.iiit.ac.in\", 8080));\n\t\t\t\tURL url = new URL(url1);\n\t\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection(proxy);\n\t\t\t\tconnection.setRequestMethod(\"POST\");\n\t\t\t\t// connection.setRequestProperty(\"Content-Type\",\n\t\t\t\t// \"application/x-www-form-urlencoded\");\n\n\t\t\t\tconnection.setRequestProperty(\"Content-Length\",\n\t\t\t\t\t\t\"\" + Integer.toString(parameters.getBytes().length));\n\t\t\t\tconnection.setRequestProperty(\"Content-Language\", \"en-US\");\n\n\t\t\t\tconnection.setUseCaches(false);\n\t\t\t\tconnection.setDoInput(true);\n\t\t\t\tconnection.setDoOutput(true);\n\n\t\t\t\t// Send request\n\t\t\t\tDataOutputStream wr = new DataOutputStream(\n\t\t\t\t\t\tconnection.getOutputStream());\n\t\t\t\twr.writeBytes(parameters);\n\t\t\t\twr.flush();\n\t\t\t\twr.close();\n\n\t\t\t\t// Get Response\n\t\t\t\tInputStream is = connection.getInputStream();\n\t\t\t\tBufferedReader rd = new BufferedReader(\n\t\t\t\t\t\tnew InputStreamReader(is));\n\t\t\t\tString line;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t\tresponse.append(line);\n\t\t\t\t\tresponse.append('\\r');\n\t\t\t\t}\n\t\t\t\trd.close();\n\t\t\t\t// return response.toString();\n\t\t\t\tlong tID = Thread.currentThread().getId();\n\t\t\t\tlong time = ManagementFactory.getThreadMXBean()\n\t\t\t\t\t\t.getThreadCpuTime(tID);\n\t\t\t\tSystem.out.println(\"My thread \" + tID + \" execution time: \"\n\t\t\t\t\t\t+ time + \" ns.\");\n\t\t\t\tsumTimes=sumTimes+time;\n\t\t\t\tconnection.disconnect();\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\t// return null;\n\n\t\t\t} finally {\n\n\t\t\t}\n\t\t}", "private void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n\n Toast.makeText(getApplicationContext(), \"No Network Connection\",\n Toast.LENGTH_SHORT).show();\n mOutputText.setText(\"No network connection available.\");\n } else {\n new MakeRequestTask(mCredential).execute();\n }\n }", "private Response makeRequest(String url) throws IOException, IllegalStateException {\n // Make the request\n Request req = new Request.Builder()\n .url(url)\n .addHeader(\"token\", NOAA.KEY)\n .build();\n Response res = client.newCall(req).execute();\n return res;\n }", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "public void expect() throws IOException\n\t{\n\t\tString response = mClient.rx();\n\t\t\n\t\tif(mListener != null)\n\t\t\tmListener.onResponse(this, response);\n\t}", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "MovilizerResponse getReplyFromCloudSync(MovilizerRequest request);", "public static void request(int gasForResponse) {\n OracleContract.request(\"https://www.axlabs.com\", \"$.info\", \"callback\", \"\", gasForResponse);\n }", "@Override\n\tprotected Void doInBackground(Void... params) {\n\t\ttry {\n\t\t\tInteger sequenceNum = Integer.valueOf((int) (Math.random() * (MBDefinition.MDT_MAX_SEQUENCE_NUM + 1)));\n\n\t\t\tpbtReq = new PayByTokenRequest(this, this);\n\t\t\tpbtReq.setSysPassword(MBDefinition.SYSTEM_PASSWORD);\n\t\t\tpbtReq.setSysID(dbBook.getSysId());\n\t\t\tpbtReq.setDestID(dbBook.getDestID());\n\t\t\tpbtReq.setDeviceID(Utils.getHardWareId(_context));\n\t\t\tpbtReq.setSeqenceNum(sequenceNum.toString());\n\t\t\tpbtReq.setReqType(\"1\");\n\t\t\tpbtReq.setToken(cCard.getToken());\n\t\t\tpbtReq.setAmount(totalAmount);\n\t\t\tpbtReq.setJobID(dbBook.getTaxi_ride_id()+\"\");\n\t\t\tpbtReq.setCardNum(cCard.getLast4CardNum());\n\t\t\tpbtReq.setCardBrand(cCard.getCardBrand());\n\n\t\t\tif (!finalTipAmount.equalsIgnoreCase(\"\")) {\n\t\t\t\tpbtReq.setTip(finalTipAmount);\n\t\t\t}\n\n\t\t\tpbtReq.sendRequest(_context.getString(R.string.name_space), _context.getString(R.string.url));\n\t\t} catch (Exception e) {\n\t\t\tLogger.e(TAG, e.toString());\n\t\t}\n\n\t\treturn null;\n\t}", "public Future<ApiResponse<MoveManagementUnitResponse>> postWorkforcemanagementManagementunitMoveAsync(ApiRequest<MoveManagementUnitRequest> request, final AsyncApiCallback<ApiResponse<MoveManagementUnitResponse>> callback) {\n try {\n final SettableFuture<ApiResponse<MoveManagementUnitResponse>> future = SettableFuture.create();\n final boolean shouldThrowErrors = pcapiClient.getShouldThrowErrors();\n pcapiClient.invokeAsync(request, new TypeReference<MoveManagementUnitResponse>() {}, new AsyncApiCallback<ApiResponse<MoveManagementUnitResponse>>() {\n @Override\n public void onCompleted(ApiResponse<MoveManagementUnitResponse> response) {\n notifySuccess(future, callback, response);\n }\n\n @Override\n public void onFailed(Throwable exception) {\n if (exception instanceof ApiException) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<MoveManagementUnitResponse> response = (ApiResponse<MoveManagementUnitResponse>)(ApiResponse<?>)exception;\n notifySuccess(future, callback, response);\n }\n if (shouldThrowErrors) {\n notifyFailure(future, callback, exception);\n }\n else {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<MoveManagementUnitResponse> response = (ApiResponse<MoveManagementUnitResponse>)(ApiResponse<?>)(new ApiException(exception));\n notifySuccess(future, callback, response);\n }\n }\n });\n return future;\n }\n catch (Throwable exception) {\n return Futures.immediateFailedFuture(exception);\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tMap<String, String> param = new HashMap<String, String>();\n\t\t\t\t\tparam.put(\"ordernumber\", outTradeNo);\n\t\t\t\t\tparam.put(\"payType\", \"2\");\n\t\t\t\t\tString result = postRequest(Config.UNION_SUCESS_URL, param);\n\t\t\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = result;\n\t\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t\t\tLog.e(\"支付成功后请求==\", \"==result==\" + result);\n\t\t\t\t}", "public void run() {\n String naverHtml = httpConnection(\"https://api.openweathermap.org/data/2.5/onecall?lat=\"+lat+\"&lon=\"+lon+\"&exclude=alerts&appid=e9e3ed325461bd506285bdb140285195&lang=kr&units=metric\");\n\n Bundle bun = new Bundle();\n bun.putString(\"HTML_DATA\", naverHtml);\n\n Message msg = handler.obtainMessage();\n msg.setData(bun);\n handler.sendMessage(msg);\n }", "public void requestLeaderboard() {\r\n connection.requestLeaderboard();\r\n }", "private void sendSupportRequest()\n {\n if (HelperHttp.isNetworkAvailable(getActivity()))\n {\n //Add parameters to request in arraylist\n ArrayList<Parameter> parameterList = new ArrayList<Parameter>();\n parameterList.add(new Parameter(\"userHash\", DataManager.getInstance().user.getUserHash(), String.class));\n parameterList.add(new Parameter(\"ticketType\", selectedRequestId, Integer.class));\n parameterList.add(new Parameter(\"ticketTitle\", edTitle.getText().toString(), String.class));\n parameterList.add(new Parameter(\"ticketDetails\", edDescription.getText().toString(), String.class));\n\n //create web service inputs\n DataInObject inObj = new DataInObject();\n inObj.setMethodname(\"LogNewSupportRequest\");\n inObj.setNamespace(Constants.TEMP_URI_NAMESPACE);\n inObj.setSoapAction(Constants.TEMP_URI_NAMESPACE + \"IPlannerService/LogNewSupportRequest\");\n inObj.setUrl(Constants.PLANNER_WEBSERVICE_URL);\n inObj.setParameterList(parameterList);\n\n //Network call\n showProgressDialog();\n new WebServiceTask(getActivity(), inObj, true, new TaskListener()\n {\n @Override\n public void onTaskComplete(Object response)\n {\n //Added by Asmita on 24th Jan 2017 as client asked to temporary hide the functionality due to server side error\n try\n {\n SoapObject outer = (SoapObject) response;\n SoapObject inner = (SoapObject) outer.getPropertySafely(\"Success\");\n successMessage = inner.getPropertySafelyAsString(\"Message\", \"0\");\n planTaskId = Integer.parseInt(inner.getPropertySafelyAsString(\"PlanTaskID\", \"0\"));\n\n if (imageDragableGridView.getUpdatedImageListWithoutPlus().size() >= 1)\n {\n for (int i = 0; i < imageDragableGridView.getUpdatedImageListWithoutPlus().size(); i++)\n {\n uploadDocFiles();\n }\n\n } else\n {\n hideProgressDialog();\n CustomDialogManager.showOkDialog(getActivity(), successMessage, new DialogListener()\n {\n @Override\n public void onButtonClicked(int type)\n {\n hideProgressDialog();\n if (getFragmentManager().getBackStackEntryCount() != 0)\n {\n getFragmentManager().popBackStack();\n } else\n {\n getActivity().finish();\n }\n }\n });\n }\n\n } catch (Exception e)\n {\n hideProgressDialog();\n e.printStackTrace();\n }\n\n }\n }).execute();\n } else\n {\n CustomDialogManager.showOkDialog(getActivity(), getString(R.string.no_internet_connection));\n }\n }", "public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}", "private synchronized void startProcessing() throws IOException {\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n boolean more = true;\n\n if (isGet) {\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n } else {\n\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n\n }\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x82, null, replyHeaders, privateInput);\n }\n\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tURL url;\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t\turl = new URL(strUrl);\n\t\t\t\tURLConnection con = url.openConnection();\n\t\t\t\tcon.connect();\n\t\t\t\tInputStream input = con.getInputStream();\n\t\t\t\tList<Map<String,Object>> temp = json.getListItems(input);\n\t\t\t\tif(temp != null){\n\t\t\t\t\tif(merger.mergeTwoList(list, temp, direction))\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmyHandler.sendEmptyMessage(5);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}", "public void run() {\n\t\ttry{\r\n\t\t\tconnect(\"COM4\"); // name of the COM-port\r\n\t\t\tprotocol.simplePoll();\r\n\t\t\tprotocol.acceptCoins();\r\n\t\t\tprotocol.getLastAccepted();\r\n\t\t\twhile(true){\r\n\t\t\t\tint coin = protocol.getLastAccepted();\r\n\t\t\t\tif(coin != -1) currentMoneyAccepted += coin;\r\n\t\t\t}\r\n\t\t} catch(InterruptedException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n\n String order = sendOrder(parcelCart);\n\n String orderPost = \"http://project-order-food.appspot.com/send_order\";\n final PostTask sendOrderTask = new PostTask(); // need to make a new httptask for each request\n try {\n // try the getTask with actual location from gps\n sendOrderTask.execute(orderPost, order).get(30, TimeUnit.SECONDS);\n Log.d(\"httppost\", order);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n Log.d(\"Button\", \"clicked\");\n Log.d(\"sendorder\", sendOrder(parcelCart));\n Toast toast = Toast.makeText(getApplication().getBaseContext(), \"Order Placed!\", Toast.LENGTH_LONG);\n toast.show();\n }", "private void doAgentRequest(final String amount) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_AGENT);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n mProgressBar.setVisibility(View.INVISIBLE);\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_AGENT);\n\n Fragment showQRFragment = new ShowQR();\n Bundle qrContent = new Bundle();\n qrContent.putString(\"qrData\", bankRequestObject.toString());\n showQRFragment.setArguments(qrContent);\n mFormWrap.setVisibility(View.GONE);\n getSupportFragmentManager().beginTransaction().replace(mContainer.getId(), showQRFragment).commit();\n showDone();\n\n }", "public void test0() {\r\n\t\t// step 1. create a dialog with empty leaderDrawStatus\r\n\t\tString urlString = \"http://localhost:8082/Slot/createdialog?userId=dialogpostest\";\r\n\t\tString dialogId = null;\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(urlString)).openConnection();\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tJsonObject obj = Json.createObjectBuilder()\r\n\t\t\t\t\t.add(\"weekdayLine\", \"0101010\")\r\n\t\t\t\t\t.add(\"startTime\", 8)\r\n\t\t\t\t\t.add(\"endTime\", 20)\r\n\t\t\t\t\t.add(\"numOfMembers\", 2)\r\n\t\t\t\t\t.add(\"leaderDrawStatus\", \"000\").build();\r\n\t\t\tPrintWriter writer = new PrintWriter(conn.getOutputStream());\r\n\t\t\twriter.write(obj.toString()); writer.flush();\r\n\t\t\tdialogId = Networks.getResponseFromHttpConnection(conn);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tif (dialogId == null) fail(\"fail to get dialogId\");\r\n\t\t\r\n\t\t// step 2. publish your availability as memeber1 (your userId)\r\n\t\tStringBuffer postUrl = new StringBuffer();\r\n\t\tpostUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tpostUrl.append(dialogId);\r\n\t\tString myAvailability = \"011\";\r\n\t\tpostUrl.append(\"&userId=member1&drawStatus=\");\r\n\t\tpostUrl.append(myAvailability);\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(postUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString response = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tSystem.out.println(\"Response from /dialog post request is: \" + response);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\t\r\n\t\t// step 3. refresh the page, assert that drawStatus is your availability\r\n\t\tStringBuffer getUrl = new StringBuffer();\r\n\t\tgetUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tgetUrl.append(dialogId);\r\n\t\tgetUrl.append(\"&userId=member1\");\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(getUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString jsonString = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tJSONObject jsonObj = (JSONObject) (new JSONParser()).parse(jsonString);\r\n\t\t\tassertTrue(((String) jsonObj.get(\"drawStatus\")).startsWith(myAvailability));\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "@Override\r\n\tpublic String execute(HttpServletRequest request, HttpServletResponse response, ActionType requestMethodType) {\r\n\t\t\r\n\t\tLOG.info(\"availableCars:\" + request.getAttribute(\"availableCars\"));\r\n\t\treturn Path.PAGE_FORWARD_CLIENT_AVAILABLE_CARS_ASYNC;\r\n\t\t\r\n\t}", "@Override\n public void run(){\n\n boolean gotReady = false;\n\n try {\n player.sendCommandToPlayer(new Command(CommandTypes.waitingForClientToGetReady , null));\n } catch (IOException e) {\n God.removeOfflinePlayerNotifyOthers(player);\n }\n\n while (! gotReady){\n try {\n Command command = player.receivePlayerRespond();\n\n if(command.getType() == CommandTypes.imReady){\n gotReady = true;\n }\n\n else {\n God.doTheCommand(command);\n }\n\n } catch (IOException e) {\n God.removeOfflinePlayerNotifyOthers(player);\n break;\n }\n }\n }", "public void readyToReceive()\n { ua.printLog(\"WAITING FOR INCOMING CALL\");\n if (!ua.ua_profile.audio && !ua.ua_profile.video) ua.printLog(\"ONLY SIGNALING, NO MEDIA\"); \n //ua.listen();\n changeStatus(UA_IDLE);\n printOut(\"digit the callee's URL to make a call or press 'enter' to exit\");\n }", "org.naru.park.ParkModel.UIParkResponse getResponse();", "public void callTheWaiter(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(7, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "public void waitingForPartner();", "public void run() {\n //Request the HTML\n try {\n HttpClient Client = new DefaultHttpClient();\n //String URL = \"http://10.0.2.2:8888/url\";\n String URL = \"http://\" + ipAddress + \":8888/hello\";\n String responseJsonString = \"\";\n\n // Create Request to server and get response\n HttpGet httpget = new HttpGet(URL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n responseJsonString = Client.execute(httpget, responseHandler);\n\n JSONObject responseJSON = new JSONObject(responseJsonString);\n // Show response on activity\n speakOut(responseJSON.getString(\"speechText\"));\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "public boolean request() {\n if (connection == null) {\n return false;\n }\n String json = new JsonBuilder(getRequestMessage()).getJson();\n if (UtilHelper.isEmptyStr(json)) {\n return false;\n }\n return connection.sendMessage(json);\n }", "void sendRequest(String message);" ]
[ "0.5964188", "0.579815", "0.57201976", "0.56928253", "0.5675147", "0.56408125", "0.5609481", "0.5589509", "0.5578995", "0.5574842", "0.5405687", "0.5397854", "0.53545886", "0.53305167", "0.5328641", "0.53279805", "0.53221315", "0.5321741", "0.5309671", "0.5305198", "0.5300578", "0.52587414", "0.52455705", "0.52428705", "0.5237032", "0.52261806", "0.5211104", "0.5180913", "0.51650536", "0.5154915", "0.5146138", "0.5137664", "0.5135372", "0.5118667", "0.5113833", "0.511346", "0.5112592", "0.50930166", "0.5083133", "0.5075651", "0.50649047", "0.506293", "0.5051332", "0.5047835", "0.5042551", "0.5036773", "0.5033176", "0.5015559", "0.5011416", "0.5011123", "0.5001582", "0.49928656", "0.49855247", "0.49690667", "0.49681148", "0.49664438", "0.49603045", "0.49587268", "0.4951788", "0.49497023", "0.49433225", "0.4942654", "0.49298537", "0.49282503", "0.49156156", "0.49155903", "0.48884887", "0.48858678", "0.48802793", "0.48802593", "0.4868864", "0.48653954", "0.48652208", "0.48647848", "0.48644447", "0.48553842", "0.48552233", "0.48429346", "0.4836996", "0.48352054", "0.4834464", "0.48327217", "0.48282012", "0.48269913", "0.48260257", "0.48241064", "0.48175973", "0.48175058", "0.48143688", "0.48134094", "0.4812121", "0.48073193", "0.4804187", "0.47898942", "0.47892776", "0.4788819", "0.4773053", "0.47726396", "0.47685805", "0.47682315", "0.4768124" ]
0.0
-1
This Method return the status Code for the given Request
public static int getStatusForRequest(project.software.uni.positionprediction.datatypes.Request request){ return statusMap.remove(request.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getStatusCode();", "int getStatusCode();", "HttpStatusCode getStatusCode();", "int getStatusCode( );", "RequestStatus getStatus();", "public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return res.then().extract().statusCode();\n //return SerenityRest.then().extract().statusCode();\n }", "public int statusCode(){\n return code;\n }", "public static int getStatusCode() {\r\n\r\n\r\n\r\n\t\tCloseableHttpResponse response= postSoapRequest(\"getDealList_Request\",baseURI);\r\n\r\n\r\n\r\n\t\tint statuseCode=response.getStatusLine().getStatusCode();\r\n\r\n\t\tSystem.out.println(\"statuseCode= \"+statuseCode);\r\n\r\n\t\t//Assert.assertEquals(200,statuseCode);\r\n\r\n\t\treturn statuseCode;\r\n\r\n\t}", "abstract Integer getStatusCode();", "public abstract int statusCode();", "public int getStatusCode() {\n return statusLine.getStatusCode();\n }", "public int toStatusCode(){\n\t\t\treturn _code;\n\t\t}", "public static int getStatusCode(String statusValue) {\r\n\t\tif (statusValue.equals(STATUS_OK)) {\r\n\t\t\treturn OK;\r\n\t\t} else if (statusValue.equals(STATUS_ZERO_RESULTS)) {\r\n\t\t\treturn ZERO_RESULTS;\r\n\t\t} else if (statusValue.equals(STATUS_OVER_QUERY_LIMIT)) {\r\n\t\t\treturn OVER_QUERY_LIMIT;\r\n\t\t} else if (statusValue.equals(STATUS_REQUEST_DENIED)) {\r\n\t\t\treturn REQUEST_DENIED;\r\n\t\t} else if (statusValue.equals(STATUS_INVALID_REQUEST)) {\r\n\t\t\treturn INVALID_REQUEST;\r\n\t\t} else if (statusValue.equals(STATUS_UNKNOWN_ERROR)) {\r\n\t\t\treturn UNKNOWN_ERROR;\r\n\t\t} else if (statusValue.equals(STATUS_NOT_FOUND)) {\r\n\t\t\treturn NOT_FOUND;\r\n\t\t} else {\r\n\t\t\treturn ERROR;\r\n\t\t}\r\n\t}", "public int getStatusCode() {\n return code;\n }", "Http.Status status();", "public StatusCode GetStatus();", "public int getStatusCode() {\r\n\t\treturn mStatus;\r\n\t}", "@java.lang.Override\n public int getRequestStatusValue() {\n return requestStatus_;\n }", "@java.lang.Override\n public int getRequestStatusValue() {\n return requestStatus_;\n }", "public int getStatusCode() {\n\t\treturn response.getStatusLine().getStatusCode();\n\t}", "public int getHttpStatusCode() {\n return httpStatusCode;\n }", "public int getStatusCode() {\n return statusCode;\n }", "public int getStatusCode() {\n return statusCode;\n }", "public int getStatusCode() {\n return statusCode;\n }", "public int getStatusCode() {\n return statusCode;\n }", "public int getHttpStatusCode() {\n return httpStatusCode;\n }", "public short getRequestStatus() {\n return requestStatus;\n }", "public int getStatusCode()\n {\n return Integer.parseInt(startLine.split(\" \")[1]);\n }", "public int getRequestCode() {\n return requestCode;\n }", "Response.StatusType getStatus(Exception exception);", "public int get_http_status_code () {\n\t\treturn http_status_code;\n\t}", "public Integer getStatusCode() {\n return statusCode;\n }", "public int getHttpStatusCode() {\n return JsoHelper.getAttributeAsInt(jsObj, \"http_status\");\n }", "public StatusCode getStatusCode() {\n return statusCode;\n }", "public String getRequestStatus() {\n return RequestStatus;\n }", "public int status() {\n\t\treturn code;\n\t}", "public int getStatusCode() {\n\t\treturn getStatusCode(iReason);\n\t}", "public abstract int getHttpStatusErrorCode();", "public String getHttpStatusCode() {\n return this.httpStatusCode;\n }", "@Override\n public RestStatus status() {\n return response.status();\n }", "@Override\n\tpublic int getStatusCodeValue() {\n\t\treturn this.statusCode.value();\n\t}", "public StatusCode getStatusCode() {\r\n\t\treturn statusCode;\r\n\t}", "public HttpStatus getStatusCode() {\n return statusCode;\n }", "@java.lang.Override\n public im.turms.server.common.access.client.dto.constant.RequestStatus getRequestStatus() {\n im.turms.server.common.access.client.dto.constant.RequestStatus result =\n im.turms.server.common.access.client.dto.constant.RequestStatus\n .forNumber(requestStatus_);\n return result == null\n ? im.turms.server.common.access.client.dto.constant.RequestStatus.UNRECOGNIZED\n : result;\n }", "private int getSuccessCode(String method) {\n if (\"POST\".equals(method)) {\n return 201;\n } else {\n return 200;\n }\n }", "trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus();", "com.google.container.v1.StatusCondition.Code getCode();", "private int getStatusCode(String sHTTPMethod, String sHTTPRequest) {\n // default is internal server error\n int iStatusCode = 500;\n\n // update based on method and request\n if (!isSupportedMethod(sHTTPMethod)) {\n iStatusCode = 403;\n } else if (isRedirect(sHTTPRequest)) {\n iStatusCode = 301;\n } else if (!isValidFile(sHTTPRequest)) {\n iStatusCode = 404;\n } else if (!isValidContentType(sHTTPRequest)) {\n iStatusCode = 415;\n } else if (isSupportedMethod(sHTTPMethod) && !isRedirect(sHTTPRequest)\n && isValidFile(sHTTPRequest) && isValidContentType(sHTTPRequest)) {\n iStatusCode = 200;\n }\n\n // return final status code\n return iStatusCode;\n }", "long getInnerStatusCode();", "public StatusCodes getStatusCode() {\n\t\treturn statusCode;\n\t}", "protected abstract boolean isExpectedResponseCode(int httpStatus);", "@java.lang.Override\n public im.turms.server.common.access.client.dto.constant.RequestStatus getRequestStatus() {\n im.turms.server.common.access.client.dto.constant.RequestStatus result =\n im.turms.server.common.access.client.dto.constant.RequestStatus\n .forNumber(requestStatus_);\n return result == null\n ? im.turms.server.common.access.client.dto.constant.RequestStatus.UNRECOGNIZED\n : result;\n }", "private Integer getStatus(Map<String, Object> info) {\n return 200;\n }", "@Override\n\tpublic HttpStatus getStatusCode() {\n\t\treturn this.statusCode;\n\t}", "public static int executeHttpRequest(HttpRequest request) {\n try {\n HttpResponse<String> response = client.send(request, HttpResponse.BodyHandler.asString());\n System.out.println(\"Status code: \" + response.statusCode());\n System.out.println(response.body());\n return response.statusCode();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n return -1;\n }", "public synchronized int getResponseCode() throws IOException {\n //avoid dup validateConnection\n if ((replyHeaders.responseCode == -1)\n || (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n validateConnection();\n }\n\n return replyHeaders.responseCode;\n }", "@Test(priority=1)\n\tpublic void teststatuscode() {\n\t\t\n\t\twhen()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/1\")\n\t\t.then()\n\t\t\t.statusCode(200);\n\t\t\t//.log().all();\n\t}", "public int getStatus();", "public int getStatus();", "public int getStatus();", "@Test(priority=1)\r\n\tpublic void validateStatusCode()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.statusCode(200);\r\n\t\t\r\n\t}", "@Test\n public void teststatusCode() {\n\t \n\t given().\n\t \tget(\"https://reqres.in/api/unknown\").\n\t then().\t\t\n\t \tstatusCode(200);\n\t \n }", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "Integer getStatus();", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic int getStatus();", "public String getStatusCode() {\r\n\t\treturn statusCode;\r\n\t}", "public CompletableFuture<StatusResponse> status(StatusRequest request) throws IOException {\n\t\treturn this.transport.performRequestAsync(request, StatusRequest.ENDPOINT, this.requestOptions);\n\t}", "public int getResponseCode()\r\n {\r\n return this.responseCode;\r\n }", "public String getStatusCode() {\n\t\treturn statusCode;\n\t}", "public String getStatusCode() {\n\t\treturn statusCode;\n\t}", "public int getStatus(int mCode)\r\n\t {\r\n\t\t return MRs[mCode].getStatus();\r\n\t }", "@Override\n public int getStatus() {\n return this.SUCCESS;\n }", "public SearchResponse getStatus();", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }", "public int getStatus() {\n return status_;\n }" ]
[ "0.75293905", "0.75293905", "0.74580276", "0.73976517", "0.73903954", "0.7187087", "0.71467674", "0.71031314", "0.7047012", "0.6978991", "0.68825495", "0.6850796", "0.6831498", "0.68126094", "0.67963785", "0.6737244", "0.6736035", "0.6735341", "0.67334014", "0.6728745", "0.669457", "0.6672779", "0.6672779", "0.6672779", "0.6672779", "0.6668897", "0.6668225", "0.6661308", "0.6655307", "0.6620308", "0.65736556", "0.65707475", "0.6559844", "0.6545481", "0.65036404", "0.64682055", "0.6449057", "0.6412299", "0.63785374", "0.6373248", "0.6365848", "0.6343704", "0.6268868", "0.6259247", "0.62591475", "0.62568754", "0.62476176", "0.62426084", "0.6227678", "0.62107706", "0.6204633", "0.6182613", "0.61814123", "0.61706114", "0.6148864", "0.6106238", "0.6083478", "0.60816264", "0.60816264", "0.60816264", "0.60623527", "0.6040678", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60405624", "0.60353273", "0.6019984", "0.6019984", "0.60137045", "0.59900767", "0.59767914", "0.59610176", "0.59610176", "0.59580994", "0.5950389", "0.5943943", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.59368145", "0.5930449", "0.5930449", "0.5930449", "0.5930449", "0.5930449", "0.5930449", "0.5930449" ]
0.6711153
20
This Method returns ThreadSave a unique Code for the next Request
private synchronized int getNextRequestCode(){ return currentRequestCode++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getRequestCode() {\n return Thread.currentThread().hashCode();\n }", "private static long newId() {\n return REQUEST_ID.getAndIncrement();\n }", "public long threadId();", "private static synchronized String getNextRequestId()\n {\n if (++nextRequestId < 0)\n {\n nextRequestId = 0;\n }\n String id = Integer.toString(nextRequestId);\n return id;\n }", "public long getNextThreadID() {\n return (Long) getProperty(\"nextThreadID\");\n }", "public String save() {\n return code;\n }", "Instruction getLastExecutedInstruction(int thread);", "private static int th() {\n return (int) Thread.currentThread().getId();\n }", "public String getThreadKey() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "public synchronized long getNextTransactionID(){\n\t\treturn this.id++;\n\t}", "public int getNext(){\n synchronized (ThreadSave.class){\n if(value > 0){\n return 1;\n }\n else if (value < 0){\n return -1;\n }\n else\n return value ++;\n }\n\n }", "public int getR_Request_ID();", "public abstract int getThreadNumber();", "public int getThreadId() {\n\n return threadId.get();\n\n }", "long getThreadId();", "@WorkerThread\n protected abstract void saveCallResult(@NonNull RequestType item);", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "private String getNextQueueIdentifier() {\n String qid = PropertyUtils.genGUID(25);\n updateCachedCounts();\n return qid;\n }", "public String getCurrentRequestId()\n\t{\n\t\tString reqID = (String) MDC.get(REQUEST_ID);\n\t\tif (reqID == null || \"\".equals(reqID))\n\t\t{\n\t\t\treqID = \"RID_\" + UUID.randomUUID().toString();\n\t\t\tMDC.put(REQUEST_ID, reqID);\n\t\t}\n\t\treturn reqID;\n\t}", "private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}", "public long getThreadId() {\n return threadId;\n }", "public static int getRequestNum(){\n return requestNum;\n }", "public int getCode() {\r\n\t\tcode=code+1;\r\n\t\treturn code;\r\n\t}", "public long getThreadId() {\n return threadId_;\n }", "public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }", "public long getCode() {\n return code;\n }", "public Integer getThreadId() {\n\t\treturn threadId;\n\t}", "public int getR_RequestType_ID();", "long getCodeId();", "long getCodeId();", "long getCodeId();", "public long getThreadId() {\n return threadId_;\n }", "static synchronized int nextID() {\n\t\treturn g_nID++;\n\t}", "String getThreadId();", "public int nextSerialNumber(){\n serialNumber++;\n return serialNumber;\n }", "@Override\n public String toString()\n {\n return String.format(\"request in Thread %d(%s): \", reqID, masterThread); \n }", "public static synchronized SingletonThreadSave getInstance(){\n if(uniqueThreadSaveInstance == null){\n uniqueThreadSaveInstance = new SingletonThreadSave();\n }\n return uniqueThreadSaveInstance;\n }", "protected abstract int getLastTokenId();", "public int getTID();", "public Long getThreadId() {\n return threadId;\n }", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "private static int threadId(long x) {\n return (int) ((x>>>48) & 0x7FFFL); // 1\n }", "long requestId();", "long requestId();", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "public int getRequestCode() {\n return requestCode;\n }", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "private static long getGlobalId() {\n return globalId++;\n }", "public static int getCurrentStepNumber() {\n return threadStepNumber.get();\n }", "private int nextValidID() {\n return nextId++;\n }", "protected String createRequestId(HttpServletRequest ignored) {\n return idGenerator.next();\n }", "public int make() { return this.atomicId.incrementAndGet(); }", "@RequestMapping(\n path = \"task\",\n method = RequestMethod.POST,\n consumes = MediaType.ALL_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public ResponseEntity<String> guid() throws InterruptedException{\n UUID uuid = UUID.randomUUID();\n String randomUUIDString = uuid.toString();\n GUID newGuid = new GUID().setId(randomUUIDString).setStatus(\"created\");\n guidDao.insert(newGuid);\n guidDao.UpDate(newGuid.setStatus(\"running\"));\n Thread.sleep(120000);\n\n guidDao.UpDate(newGuid.setStatus(\"finished\"));\n log.info(\"[\" + randomUUIDString + \"] \");\n return ResponseEntity.status(202).body(newGuid.getGuid());\n\n\n\n }", "SdkHttpRequest getLastRequest();", "public Long getMainCode() {\n return mainCode;\n }", "private synchronized long nextId() {\n\t\treturn ++curID;\n\t}", "private static void saveThreadLastRunTime() {\n\t\tif (mContext != null) {\n\t\t\tEditor edit = mContext.getSharedPreferences(Defines.SHARED_PREF_NAME, Context.MODE_PRIVATE).edit();\n\t\t\tedit.putLong(Defines.SHARED_PREF_THREAD_LAST_RUN_TIME, DataStore.mThreadLastRunSystemTime);\n\n\t\t\tedit.commit();\n\t\t}\n\t}", "public String getThread()\n\t{\n\t\treturn this.thread;\n\t}", "protected long getRecordNumber() {\n\t\treturn _nextRecordNumber.getAndIncrement();\n\t}", "public Long getWorkRequestId() {\n return this.workRequestId;\n }", "private static int nextID() {\r\n\t\treturn ID++;\r\n\t}", "private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}", "private static int nextHashCode() {\n return nextHashCode.getAndAdd(HASH_INCREMENT);\n }", "public Long getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public String save() {\n try {\n requestService.saveRequest(signingRequest, errors);\n return CreateCredentialRequestBean.SUCCESS_OUTCOME_ID;\n }\n catch (GroupAccessException ex) {\n return DETAILS_OUTCOME_ID;\n }\n }", "public Integer getSafeNextId() {\n return safeNextId;\n }", "public byte getSyncID() {\n synchronized (this.syncID) {\n return this.syncID[0];\n }\n }", "public int getNetWorkId() {\n\t\treturn (mWifiInfo == null) ? 0 : mWifiInfo.getNetworkId();\n\t}", "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "@Override\n public void run() {\n long[] saved = AppDatabase.getInstance().modelByName(name).insertAll((List) response);\n updateProgressDownload(1, name);\n }", "private int generateSessionId(){\n int id;\n do{\n id = smIdGenerator.nextInt(50000);\n }while(mSessionMap.containsKey(id));\n\n Log.i(TAG, \"generating session id:\" + id);\n return id;\n }", "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "private long getSeqNum() throws Exception {\n\t\tSystem.out.println(\"seq: \" + seq);\n\t\tif (seq == 256) {\n\t\t\tseq = 0;\n\t\t}\n\t\treturn seq++;\n\t}", "@Override\n\t\tprotected Integer doInBackground(Void... arg0) {\n\t\t\ttry {\n\t\t\t\treturn HttpHelperUtils.SaveToken(loginName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private int _randomCode () {\n Random random = new Random();\n code = random.nextInt(999999);\n return code;\n }", "@Override\n\tpublic synchronized long assignNewId(RepositoryModel repository) {\n\t\tJedis jedis = pool.getResource();\n\t\ttry {\n\t\t\tString key = key(repository, KeyType.counter, null);\n\t\t\tString val = jedis.get(key);\n\t\t\tif (isNull(val)) {\n\t\t\t\tlong lastId = 0;\n\t\t\t\tSet<Long> ids = getIds(repository);\n\t\t\t\tfor (long id : ids) {\n\t\t\t\t\tif (id > lastId) {\n\t\t\t\t\t\tlastId = id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjedis.set(key, \"\" + lastId);\n\t\t\t}\n\t\t\tlong ticketNumber = jedis.incr(key);\n\t\t\treturn ticketNumber;\n\t\t} catch (JedisException e) {\n\t\t\tlog.error(\"failed to assign new ticket id in Redis @ \" + getUrl(), e);\n\t\t\tpool.returnBrokenResource(jedis);\n\t\t\tjedis = null;\n\t\t} finally {\n\t\t\tif (jedis != null) {\n\t\t\t\tpool.returnResource(jedis);\n\t\t\t}\n\t\t}\n\t\treturn 0L;\n\t}", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "public static short getSession(){\n\t\treturn (short)++sessao;\n\t}", "public int getTid();", "private static int generateMarkerId(){\n return snextMarkerId.incrementAndGet();\n\n }", "public long nextUniqueID() {\n final Lock lock = sequenceBlocks.getLock(type);\n lock.lock();\n try {\n Data data = sequenceBlocks.get(type);\n if (data == null || !(data.getCurrentID() < data.getMaxID())) {\n data = getNextBlock();\n }\n\n final long id = data.getCurrentID();\n data.setCurrentID(id + 1);\n sequenceBlocks.put(type, data);\n return id;\n } finally {\n lock.unlock();\n }\n }", "public boolean saveRequest(Context context, RequestToken requestToken, Twitter t) \n {\n\n \ttwitter = t;\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n\n rtoken = requestToken.getToken();\n rtokensecret =requestToken.getTokenSecret();\n editor.putString(R_TOKEN,rtoken);\n editor.putString(R_TOKENSECRET, rtokensecret);\n\n if (editor.commit()) \n {\n singleton = this;\n return true;\n }\n return false;\n }", "SessionTask(long scheduleNext) {\n delayBeforeNext = scheduleNext;\n taskid = taskcount++;\n }", "public int code() {\n return code;\n }", "protected ThreadState pickNextThread() {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (threadStates.isEmpty())\n return null;\n\n return threadStates.last();\n }", "public int getRequestId(boolean bl) {\n int n = -1;\n if (this.getBaseLayout().getContentsViewController() != null) {\n super.preparationForInstantViewer();\n n = bl ? this.getBaseLayout().getContentsViewController().createContentFrame() : this.getBaseLayout().getContentsViewController().createClearContentFrame();\n this.getBaseLayout().getContentsViewController().show();\n }\n return n;\n }", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "public int getCode () {\n return code;\n }", "java.lang.String getRequestID();", "public synchronized long nextTf(){\n\t\treturn tf++;\n\t}", "@Override\n public String generateRackID() {\n String newRackID = generateRandomCharacter() +\"\"+\n generateRandomCharacter() +\".\"+\n rackCounter +\".\"+ getCopyrightYear();\n this.rackCounter++;\n return newRackID;\n }", "public void saveSelfInfo()\n\t{\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\thelper.addSelfInfo(uid, myApp.getSelfInfoList());\n\t\t\t}\n\t\t}).start();\n\t}", "public ThreadTraitementSC(IReseau nStub, int mId)\r\n {\r\n this.stub = nStub;\r\n this.masterId = mId;\r\n this.demandesAccesSC = new LinkedList<Integer>();\r\n this.accesScEnCours = false;\r\n }", "public int getCode()\n {\n return code;\n }" ]
[ "0.67684907", "0.58737516", "0.5769333", "0.5758146", "0.5706582", "0.5558166", "0.54345226", "0.5395166", "0.5390577", "0.53893965", "0.5361815", "0.53356063", "0.53335166", "0.52660525", "0.5162677", "0.51126343", "0.51044273", "0.5103375", "0.5103375", "0.5103375", "0.5079767", "0.5077727", "0.5075965", "0.50627136", "0.504519", "0.50084704", "0.5004554", "0.50026184", "0.49990886", "0.49967736", "0.49742663", "0.4966865", "0.4966865", "0.4966865", "0.49575898", "0.4947133", "0.49299172", "0.49203858", "0.49187776", "0.4907527", "0.4905366", "0.4899181", "0.4897425", "0.48921263", "0.4883602", "0.48811668", "0.48811668", "0.48767734", "0.4860098", "0.48535788", "0.484946", "0.48439315", "0.48335612", "0.48250952", "0.48228428", "0.4806054", "0.4804478", "0.48039943", "0.4790546", "0.47895667", "0.4789192", "0.4774379", "0.4767356", "0.47622058", "0.47616455", "0.47598007", "0.47565284", "0.47565284", "0.47268602", "0.47262144", "0.47208488", "0.47205672", "0.47160292", "0.470295", "0.47024193", "0.4680601", "0.46786153", "0.46777353", "0.46767005", "0.46720073", "0.46699226", "0.46664578", "0.46622333", "0.46610707", "0.4658654", "0.46441993", "0.46412608", "0.46335894", "0.46333134", "0.462824", "0.46262774", "0.4625878", "0.46235114", "0.4621043", "0.46190837", "0.46171492", "0.46133253", "0.46101594", "0.45854342", "0.45844665" ]
0.664567
1
This Method creates a StringRequest with the required headers
private StringRequest createStringRequest(final project.software.uni.positionprediction.datatypes.Request request, String url, Response.Listener<String> responseListener, Response.ErrorListener errorListener){ return new StringRequest(Request.Method.GET, url, responseListener, errorListener ) { @Override public Map <String, String> getHeaders() { HashMap< String, String > headers = new HashMap <> (); String creds = String.format("%s:%s",username,password); String encodedCredentials = Base64.encodeToString(creds.getBytes(), Base64.DEFAULT); headers.put("Authorization", "Basic " + encodedCredentials); return headers; } @Override protected Response<String> parseNetworkResponse(NetworkResponse response) { statusMap.put(new Integer(request.getId()), new Integer(response.statusCode)); return super.parseNetworkResponse(response); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RequestHeaders headers();", "protected HttpEntity createEntity(final String requestDocAsString) {\n return new StringEntity(requestDocAsString, ContentType.create(\"application/soap+xml\", \"UTF-8\"));\n }", "HttpClientRequest header(CharSequence name, CharSequence value);", "@Test\n public void testBuildHeaderString_1()\n throws Exception {\n Transaction fixture = new Transaction();\n fixture.setResponse(new Response());\n fixture.setRequest(new Request());\n String prefix = \"\";\n List<Header> headers = new LinkedList();\n\n String result = fixture.buildHeaderString(prefix, headers);\n\n assertEquals(\"\", result);\n }", "public io.confluent.developer.InterceptTest.Builder setReqHeaders(java.lang.String value) {\n validate(fields()[5], value);\n this.req_headers = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "MovilizerRequest getRequestFromString(String requestString);", "public void setReqHeaders(java.lang.String value) {\n this.req_headers = value;\n }", "@Test\n public void testBuildHeaderString_2()\n throws Exception {\n Transaction fixture = new Transaction();\n fixture.setResponse(new Response());\n fixture.setRequest(new Request());\n String prefix = \"\";\n List<Header> headers = new LinkedList();\n\n String result = fixture.buildHeaderString(prefix, headers);\n\n assertEquals(\"\", result);\n }", "private void StringRequest_POST() {\n\t\tString POST = \"http://api.juheapi.com/japi/toh?\";\n\t\trequest = new StringRequest(Method.POST, POST, new Listener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}, new ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}){@Override\n\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\tHashMap< String , String> map = new HashMap<String,String>();\n\t\t\tmap.put(\"key\", \"7bc8ff86168092de65576a6166bfc47b\");\n\t\t\tmap.put(\"v\", \"1.0\");\n\t\t\tmap.put(\"month\", \"11\");\n\t\t\tmap.put(\"day\", \"1\");\n\t\t\treturn map;\n\t\t}};\n\t\trequest.addMarker(\"StringRequest_GET\");\n\t\tMyApplication.getHttpRequestQueue().add(request);\n\t}", "private static byte[] createRequest(String name, String requestType) {\n\n // Creates the header for the request\n byte[] header = createHeader();\n\n // Creates the query for the request\n byte[] query = createQuery(name, requestType);\n\n // Final Packet.\n byte[] request = new byte[header.length + query.length];\n\n // Byte Buffers provide useful utilities.\n ByteBuffer rqBuf = ByteBuffer.wrap(request);\n\n // Combine header and query\n rqBuf.put(header);\n rqBuf.put(query);\n\n return request;\n }", "public static RequestBody createBody(String str) {\n RequestBody fBody = RequestBody.create(MediaType.parse(\"text/plain\"), str);\n return fBody;\n }", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public static HashMap<String, String> generateRequest (String request){\n LOGGER.info(\"Request generator got line => \" + request);\n /**\n * we split on spaces as that is the http convention\n */\n String[] brokenDownRequest = request.split(\" \");\n\n /**\n * creating anf then filling up the request hashmap\n */\n HashMap<String, String> parsedRequest = new HashMap<>();\n parsedRequest.put(\"Type\", brokenDownRequest[0]);\n parsedRequest.put(\"Path\", brokenDownRequest[1]);\n parsedRequest.put(\"HttpVersion\", brokenDownRequest[2]);\n\n /**\n * returning the request hashmap\n */\n return parsedRequest;\n }", "Build inboundHeaders(InboundHeaders inboundHeaders);", "public Map<String, String> createHeadersFromString(String headersAndValues) {\n\n if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();\n\n final StringTokenizer token = new StringTokenizer(headersAndValues, \"@\");\n\n final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());\n\n while (token.hasMoreTokens()) {\n final String headerAndValue = token.nextToken();\n if (!headerAndValue.contains(\":\"))\n throw new IllegalArgumentException(\n \"Request headers wrongly configured, missing separator :\" + headersAndValues);\n\n final String header = headerAndValue.substring(0, headerAndValue.indexOf(\":\"));\n final String value =\n headerAndValue.substring(headerAndValue.indexOf(\":\") + 1, headerAndValue.length());\n theHeaders.put(header, value);\n }\n\n return theHeaders;\n\n }", "public String prepareRequestStr(OpenAccessCardRequest request) {\n if (request == null || StringUtil.isEmpty(request.getSrcTransactionID(), true) || StringUtil.isEmpty(request.getMerchantID(), true) || StringUtil.isEmpty(request.getIssuerid(), true) || StringUtil.isEmpty(request.getCplc(), true) || StringUtil.isEmpty(request.getDeviceModel(), true)) {\n LogX.e(\"OpenAccessCardTask prepareRequestStr, invalid param\");\n return null;\n }\n return JSONHelper.createRequestStr(request.getMerchantID(), request.getRsaKeyIndex(), request.createRequestData(JSONHelper.createHeaderStr(request.getSrcTransactionID(), HEAD_COMMANDER, request.getIsNeedServiceTokenAuth())), this.mContext);\n }", "Map<String, String> getRequestHeaders();", "HttpClientRequest addHeader(CharSequence name, CharSequence value);", "private CartReceiptRequest buildRequestFromParameters(String[] requestParameters) throws ParseException {\n CartReceiptRequest receiptRequest = new CartReceiptRequest();\n LOGGER.debug(\"localeParam =\" + requestParameters[2] + \" \\t applicationId =\" + requestParameters[1]);\n /* Building request for the Reprint API */\n receiptRequest.setUserId(Long.valueOf(requestParameters[0]));\n receiptRequest.setApplicationId(Long.valueOf(requestParameters[1]));\n receiptRequest.setLocale(requestParameters[2]);\n receiptRequest.setCartId(Long.valueOf(requestParameters[3]));\n Long milliSeconds = Long.parseLong(requestParameters[4]);\n Date date = new Date(milliSeconds);\n receiptRequest.setCartDate(date);\n /* Returning constructed API request*/\n return receiptRequest;\n }", "RequestBuilder setHeaderParameters(Map<String, List<String>> headerParams);", "public void setRequestHeaders(Header[] requestHeaders);", "Header createHeader();", "@Test\n public void testSendSetupRequest() {\n String expected = \"SETUP rtsp://172.10.20.30:554/d3abaaa7-65f2-42b4-\" + (((((\"8d6b-379f492fcf0f RTSP/1.0\\r\\n\" + \"transport: MP2T/DVBC/UDP;unicast;client=01234567;\") + \"source=172.10.20.30;\") + \"destination=1.1.1.1;client_port=6922\\r\\n\") + \"cseq: 1\\r\\n\") + \"\\r\\n\");\n HttpRequest request = new io.netty.handler.codec.http.DefaultHttpRequest(RTSP_1_0, SETUP, \"rtsp://172.10.20.30:554/d3abaaa7-65f2-42b4-8d6b-379f492fcf0f\");\n request.headers().add(TRANSPORT, (\"MP2T/DVBC/UDP;unicast;client=01234567;source=172.10.20.30;\" + \"destination=1.1.1.1;client_port=6922\"));\n request.headers().add(CSEQ, \"1\");\n EmbeddedChannel ch = new EmbeddedChannel(new RtspEncoder());\n ch.writeOutbound(request);\n ByteBuf buf = ch.readOutbound();\n String actual = buf.toString(UTF_8);\n buf.release();\n Assert.assertEquals(expected, actual);\n }", "public CurlRequest newRequest(final String action, final String body) {\n\t\tfinal var builder = AWS4SignatureQuery.builder().service(\"cognito-idp\").body(\"&Version=2016-04-18\");\n\t\tfinal var headers = new HashMap<String, String>();\n\t\theaders.put(\"x-amz-target\", \"AWSCognitoIdentityProviderService.\" + action);\n\t\theaders.put(\"Content-Type\", \"application/x-amz-json-1.1\");\n\t\tfinal var query = builder.accessKey(accessKey).secretKey(secretKey).region(region).path(\"/\").headers(headers)\n\t\t\t\t.body(body).host(URI.create(url).getHost()).build();\n\t\tfinal var authorization = signer.computeSignature(query);\n\t\tfinal var request = new CurlRequest(query.getMethod(), url, query.getBody());\n\t\trequest.getHeaders().putAll(query.getHeaders());\n\t\trequest.getHeaders().put(\"Authorization\", authorization);\n\t\trequest.setSaveResponse(true);\n\t\treturn request;\n\t}", "public abstract Builder headers(String... paramVarArgs);", "public HttpRequest a(String str, String str2, String str3) throws IOException {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"form-data; name=\\\"\");\n stringBuilder.append(str);\n if (str2 != null) {\n stringBuilder.append(\"\\\"; filename=\\\"\");\n stringBuilder.append(str2);\n }\n stringBuilder.append('\\\"');\n f(\"Content-Disposition\", stringBuilder.toString());\n if (str3 != null) {\n f(\"Content-Type\", str3);\n }\n return f((CharSequence) \"\\r\\n\");\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);", "public BuildHeaderSearchString() { }", "public final void setRequestCreateTimeString(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String requestcreatetimestring)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.RequestCreateTimeString.toString(), requestcreatetimestring);\r\n\t}", "public String generateHeader(String httpMethod, String url, Map<String, String> requestParams) {\n StringBuilder base = new StringBuilder();\n String nonce = getNonce();\n String timestamp = getTimestamp();\n String baseSignatureString = generateSignatureBaseString(httpMethod, url, requestParams, nonce, timestamp);\n String signature = encryptUsingHmacSHA1(baseSignatureString);\n base.append(\"OAuth \");\n append(base, oauth_consumer_key, consumerKey);\n append(base, oauth_token, token);\n append(base, oauth_signature_method, signatureMethod);\n append(base, oauth_timestamp, timestamp);\n append(base, oauth_nonce, nonce);\n append(base, oauth_version, version);\n append(base, oauth_signature, signature);\n base.deleteCharAt(base.length() - 1);\n log.debug(\"header : \" + base.toString());\n return base.toString();\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "private void createRequest() {\n // Configure Google Sign In\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "private String processGetRequestHeader(String rq){\n String ret = \"\";\n int i = 4;\n if(rq.length() < i){\n return null;\n }\n while(rq.charAt(i) != ' '){\n ret += rq.charAt(i);\n i++;\n }\n return ret;\n }", "String getRequest();", "public HttpRequest (final InputStream inputStream)\n {\n in = new HttpInputStream (new BufferedInputStream (inputStream));\n headers = new HashMap <String, String> ();\n }", "public String constructAuthorizationHeader(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(\"OAuth\");\n appendParameter(sb, \"oauth_callback\", this.callback);\n appendParameter(sb, \"oauth_consumer_key\", this.authConfig.getConsumerKey());\n appendParameter(sb, \"oauth_nonce\", str);\n appendParameter(sb, \"oauth_signature\", str3);\n appendParameter(sb, \"oauth_signature_method\", \"HMAC-SHA1\");\n appendParameter(sb, \"oauth_timestamp\", str2);\n TwitterAuthToken twitterAuthToken = this.authToken;\n appendParameter(sb, \"oauth_token\", twitterAuthToken != null ? twitterAuthToken.token : null);\n appendParameter(sb, \"oauth_version\", \"1.0\");\n return sb.substring(0, sb.length() - 1);\n }", "private void appendCanonicalizedHeaders(HttpRequest request, StringBuilder toSign) {\n Set<String> headers = new TreeSet<String>(request.getHeaders().keySet());\n for (String header : headers) {\n if (header.startsWith(\"x-emc-\")) {\n // Convert all header names to lowercase.\n toSign.append(header.toLowerCase()).append(\":\");\n // For headers with values that span multiple lines, convert them into one line by\n // replacing any\n // newline characters and extra embedded white spaces in the value.\n for (String value : request.getHeaders().get(header)) {\n value = Utils.replaceAll(value, TWO_SPACE_PATTERN, \" \");\n value = Utils.replaceAll(value, NEWLINE_PATTERN, \"\");\n toSign.append(value).append(' ');\n }\n toSign.deleteCharAt(toSign.lastIndexOf(\" \"));\n // Concatenate all headers together, using newlines (\\n) separating each header from the\n // next one.\n toSign.append(\"\\n\");\n }\n }\n // There should be no terminating newline character at the end of the last header.\n if (toSign.charAt(toSign.length() - 1) == '\\n')\n toSign.deleteCharAt(toSign.length() - 1);\n }", "public void getRequest_withHeader_QueryParms() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request query parameters are :-\");\n String[] queryParameters = {\"grant_type\"};\n setQueryParameters(queryParameters);\n String[] headerParameters = {\"content-type\"};\n setHeaderParameters(headerParameters);\n }", "StringContent createStringContent();", "@Test\n public void testRequestToString() {\n assertEquals(\"InfoRequest: GET /\", InfoRequest._INSTANCE.toString());\n\n // Complex path, parameters, no body\n assertEquals(\n \"ExistsRequest: HEAD /idx/_doc/id1?preference=foo&refresh=true\",\n ExistsRequest.of(b -> b.index(\"idx\").id(\"id1\").preference(\"foo\").refresh(true)).toString()\n );\n\n assertEquals(\n \"SearchRequest: POST /idx/_search?typed_keys=true {\\\"size\\\":10}\",\n SearchRequest.of(s -> s.index(\"idx\").size(10)).toString()\n );\n }", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n //params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\")+\" \"+appUtil.getPrefrence(\"access_token\"));\n return params;\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);", "public HttpRequest(String urlString) throws IOException {\r\n this(new URL(urlString));\r\n }", "@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}", "public RequestMessage convertReqMsg(String reqMsgStr) throws Throwable {\n \tRequestMessage reqMsg = new RequestMessage();\n Assert.notNull(reqMsgStr, \"reqMsg must not be null\");\n if (this.enableLog) {\n String logUUID = logUUIDThreadLocal.get();\n LOGGER.info(logUUID + \" send req message to bank:\" + reqMsgStr);\n }\n ByteArrayInputStream baips = new ByteArrayInputStream(reqMsgStr.getBytes(charset));\n\n reqMsg.setNetHeader(new NetMsgHeader());\n reqMsg.setBizzHeader(new BizzMsgHeader());\n MessageObjInput in = new MessageObjInput(baips, reqMsg);\n\n reqMsg.getNetHeader().readExternal(in);\n \n reqMsg.getBizzHeader().readExternal(in);\n \n Assert.isTrue(reqMsg.getTranFunc() != null, \"tran func id should not be null!\");\n String reqFuncId = reqMsg.getTranFunc();\n if (reqFuncId!=null) {\n reqBodyFac.setFuncId(reqFuncId);\n BaseMessageBody reqBody = (BaseMessageBody) context\n .getBean(ReqBodyFactoryBean.beanName);\n Assert.notNull(reqBody, \"request body must not be null\");\n reqMsg.setBody(reqBody);\n reqBody.readExternal(in);\n\n if (enableRecValidator) {\n reqMsg.setValidator(validator);\n reqMsg.validateDto();\n }\n if (this.enableLog) {\n String logUUID = logUUIDThreadLocal.get();\n LOGGER.info(logUUID + \" send req message to bank json format:\" + reqMsg.toJSONString());\n }\n in.close();\n }\n return reqMsg;\n }", "public CalculationRequest(String rawRequest_)\n\t{\n\t\trawRequest = rawRequest_;\n\t}", "public SveaRequest<SveaCloseOrder> prepareRequest() {\n String errors = validateRequest();\n \n if (!errors.equals(\"\")) {\n throw new SveaWebPayException(\"Validation failed\", new ValidationException(errors));\n }\n \n // build inspectable request object and insert into order builder\n SveaCloseOrder sveaCloseOrder = new SveaCloseOrder();\n sveaCloseOrder.Auth = getStoreAuthorization();\n SveaCloseOrderInformation orderInfo = new SveaCloseOrderInformation();\n orderInfo.SveaOrderId = order.getOrderId();\n sveaCloseOrder.CloseOrderInformation = orderInfo;\n \n SveaRequest<SveaCloseOrder> object = new SveaRequest<SveaCloseOrder>();\n object.request = sveaCloseOrder;\n \n return object;\n }", "public Builder setRequest(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n request_ = value;\n onChanged();\n return this;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\") + \" \" + appUtil.getPrefrence(\"access_token\"));\n return params;\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "@VisibleForTesting\n void appendHttpHeaders(HttpRequest request, StringBuilder toSign) {\n for (String header : new String[] { \"Range\" })\n toSign.append(utils.valueOrEmpty(request.getHeaders().get(header)).toLowerCase()).append(\"\\n\");\n // Standard HTTP header, in UTC format. Only the date value is used, not the header name.\n toSign.append(request.getHeaders().get(HttpHeaders.DATE).iterator().next()).append(\"\\n\");\n }", "private String getSignString(HttpServletRequest request) throws IOException {\n\t\tString date = ((HttpServletRequest) request).getHeader(HttpHeaders.DATE);\n\t\tString body = ((RequestWrapper) request).getPayload();\n\t\tString base64Body = Base64.encodeBase64String(body.getBytes());\n\n\t\tStringBuilder sb = new StringBuilder(request.getScheme());\n\t\tsb.append(\"://\");\n\t\tsb.append(request.getServerName());\n\t\tsb.append((\"http\".equals(request.getScheme()) && request.getServerPort() == 80) || (\"https\".equals(request.getScheme()) && request.getServerPort() == 443) ? \"\" : \":\" + request.getServerPort() );\n\t\tsb.append(request.getRequestURI());\n\t\tsb.append(request.getQueryString() != null ? \"?\" + request.getQueryString() : \"\");\n\t\tsb.append(\" \");\n\t\tsb.append(date);\n\t\tsb.append(\" \");\n\t\tsb.append(base64Body);\n\n\t\treturn sb.toString();\n\t}", "RequestBuilder addHeaderParameter(String key, List<String> values);", "public RequestContext write(String text) throws IOException {\r\n\t\tif (! headerGenerated) {\r\n\t\t\tgenerateHeader();\r\n\t\t}\r\n\t\t\r\n\t\tbyte[] data = text.getBytes(charset);\r\n\t\twrite(data);\r\n\t\treturn this;\r\n\t}", "protected TTL_SystemRequest( String s )\n {\n name = s;\n nameHash.put( s, this );\n intValue = index;\n intHash.put( new Integer( intValue ), this );\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "public final void setRequestCreateTimeString(java.lang.String requestcreatetimestring)\r\n\t{\r\n\t\tsetRequestCreateTimeString(getContext(), requestcreatetimestring);\r\n\t}", "public static EvaluableRequest buildEvaluableRequest(String requestBody, String requestResourcePath, HttpServletRequest request) {\n // Create and fill an evaluable request object.\n EvaluableRequest evaluableRequest = new EvaluableRequest(requestBody,\n requestResourcePath != null ? requestResourcePath.split(\"/\") : null);\n // Adding query parameters...\n Map<String, String> evaluableParams = new HashMap<>();\n List<String> parameterNames = Collections.list(request.getParameterNames());\n for (String parameter : parameterNames) {\n evaluableParams.put(parameter, request.getParameter(parameter));\n }\n evaluableRequest.setParams(evaluableParams);\n // Adding headers...\n Map<String, String> evaluableHeaders = new HashMap<>();\n List<String> headerNames = Collections.list(request.getHeaderNames());\n for (String header : headerNames) {\n evaluableHeaders.put(header, request.getHeader(header));\n }\n evaluableRequest.setHeaders(evaluableHeaders);\n\n return evaluableRequest;\n }", "public project.software.uni.positionprediction.datatypes.Request requestDataSync(String attributes){\r\n\r\n RequestQueue queue = Volley.newRequestQueue(context);\r\n\r\n RequestFuture<String> requestFuture = RequestFuture.newFuture();\r\n\r\n String url = baseUrl+attributes;\r\n\r\n // Request a string response from the provided URL.\r\n Log.i(\"MovebankRequest\", \"sending string request to \" + url);\r\n\r\n project.software.uni.positionprediction.datatypes.Request request =\r\n new project.software.uni.positionprediction.datatypes.Request(getNextRequestCode());\r\n\r\n StringRequest stringRequest = createStringRequest(request, url, requestFuture, requestFuture);\r\n\r\n // Add the request to the RequestQueue.\r\n requestFuture.setRequest(queue.add(stringRequest));\r\n\r\n try{\r\n String response = requestFuture.get(10, TimeUnit.SECONDS);\r\n request.setResponseStatus(statusMap.remove(new Integer(request.getId())));\r\n request.setResponse(response);\r\n return request;\r\n\r\n } catch (InterruptedException | TimeoutException | ExecutionException e) {\r\n System.out.println(e.toString());\r\n\r\n if(e.getCause() instanceof VolleyError) {\r\n\r\n VolleyError err = (VolleyError) e.getCause();\r\n if(err.networkResponse != null) request.setResponseStatus(err.networkResponse.statusCode);\r\n else request.setResponseStatus(-1);\r\n\r\n } else {\r\n request.setResponseStatus(-1);\r\n }\r\n\r\n return request;\r\n }\r\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String,String> params = new HashMap<String, String>();\n\n params.put(\"Content-Type\", \"multipart/form-data; boundary=\" + BOUNDARY+\"; charset=utf-8\");\n return params;\n }", "public Request(String typeString, String path, String portString, String versionString) throws UnknownRequestException, UnknownHTTPVersionException, URISyntaxException{\n\t\t\tpath = new URI(Parser.convertToReadableURL(path)).getPath();\n\t\t\tif (path.length() == 0){\n\t\t\t\tpath = \"/\";\n\t\t\t}\n\t\t\t\n\t\t\tthis.path = path;\n\t\t\tthis.version = Parser.extractVersion(versionString);\n\t\t\tthis.type = Parser.extractType(typeString);\n\t\t\tList<String> content = new ArrayList<String>();\n\t\t\tsetContent(content);\n\t\t}", "public static HttpHeaders createHeaders(final String username, final String password ){\n HttpHeaders headers = new HttpHeaders(){\n {\n String auth = username + \":\" + password;\n byte[] encodedAuth = Base64.encodeBase64(\n auth.getBytes(Charset.forName(\"US-ASCII\")) );\n String authHeader = \"Basic \" + new String( encodedAuth );\n set( \"Authorization\", authHeader );\n }\n };\n headers.add(\"Content-Type\", \"application/xml\");\n headers.add(\"Accept\", \"application/xml\");\n\n return headers;\n }", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "RequestBuilder addHeaderParameter(String key, String value);", "public static String post(String url, String s,Map<String, String> headers) {\n AsyncHttpClient.BoundRequestBuilder builder = asyncHttpClient.preparePost(url);\n builder.setBodyEncoding(DEFAULT_CHARSET);\n builder.setBody(s);\n useCookie(builder);\n builder.setHeader(\"Content-Type\", DEFAULT_CONTENT_TYPE);\n if (headers != null && !headers.isEmpty()) {\n Set<String> keys = headers.keySet();\n for (String key : keys) {\n builder.addHeader(key, headers.get(key));\n }\n }\n Future<Response> f = builder.execute();\n String body = null;\n try {\n body = f.get().getResponseBody(DEFAULT_CHARSET);\n addCookie(f.get().getCookies());\n } catch (Exception e) {\n logger.error(LogUtil.builder().method(\"Post Request(the result is String,the param is a string in request body)\").msg(\"error,url={}\").build(), url, e);\n }\n return body;\n }", "protected InternetHeaders createInternetHeaders(InputStream is) throws MessagingException {\n/* 1184 */ return new InternetHeaders(is);\n/* */ }", "TypedRequest createTypedRequest();", "private HttpEntity<String> getHttpEntityForTestRequest(String requestBody) {\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_JSON);\n return new HttpEntity<>(requestBody, headers);\n }", "public void addRequestHeader(String name, String value);", "@Override\n public String build() {\n StringBuilder stringBuilder = new StringBuilder();\n\n // Builds the section headers.\n ArrayList<Header> headers = new ArrayList<Header>();\n headers.add(new Header(\"Content-Type\", m_ContentType.getTypeString()));\n headers.add(new Header(\"Content-Transfer-Encoding\", m_TransferEncoding.getKeyWord()));\n stringBuilder.append(Header.buildHeaders(headers)).append(\"\\r\\n\");\n\n // Encodes the body, and appends it\n switch (m_TransferEncoding) {\n case BASE64 -> stringBuilder.append(Base64.getEncoder().encodeToString(m_RawBody.getBytes()));\n case QUOTED_PRINTABLE -> stringBuilder.append(QuotedPrintable.encode(m_RawBody));\n }\n stringBuilder.append(\"\\r\\n\");\n\n // Returns the built body\n return stringBuilder.toString();\n }", "private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }", "String createUserRequest(String username, UserRequestType type);", "public void requestString(final String requestName,\n final String webserviceUrl,\n final byte[] requestParams, final int webMethod,\n final boolean getCache) {\n StringRequest stringRequest = new StringRequest(webMethod,\n webserviceUrl, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n\n\n mRequestCompletedListener.onRequestCompleted(\n requestName, true, response, null);\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n String errorResponse = \"\";\n if (getCache) {\n final Cache cache = getRequestQueue().getCache();\n final Cache.Entry entry = cache.get(webserviceUrl);\n if (entry != null) {\n try {\n errorResponse = new String(entry.data, \"UTF-8\");\n mRequestCompletedListener\n .onRequestCompleted(requestName,\n true, errorResponse, null);\n return;\n } catch (UnsupportedEncodingException e) {\n LoggerUtils.e(TAG, e);\n }\n } else {\n LoggerUtils.e(TAG, requestName\n + \" Cache does not exist\");\n }\n }\n try {\n VolleyError responseError = new VolleyError(\n new String(error.networkResponse.data));\n try {\n final JSONObject responseJson = new JSONObject(responseError.getMessage());\n // Show Alert Information\n errorResponse = responseJson.getString(AppConstants.API_MESSAGE);\n } catch (Exception e) {\n errorResponse = \"Unknown\";\n }\n } catch (Exception e) {\n LoggerUtils.e(TAG, e);\n }\n mRequestCompletedListener.onRequestCompleted(\n requestName, false, null,\n errorResponse);\n }\n }) {\n\n @Override\n public String getBodyContentType() {\n return AppConstants.APPLICATION_JSON;\n }\n\n\n @Override\n public byte[] getBody() throws AuthFailureError {\n final byte[] body = requestParams;\n if (body != null) {\n return body;\n }\n return super.getBody();\n }\n };\n // Adding String request to request queue\n addToRequestQueue(stringRequest, requestName);\n }", "HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }", "public DocumentLifecycleWorkflowRequest setRequestString(String requestString) {\n\t\tthis.requestString = requestString;\n\t\treturn this;\n\t}", "public static void main(String[] args) {\n\t\tHttpClient client = new HttpClient();\n\t\tPostMethod myPost = new PostMethod(string );\n\t\ttry{\n\t\t\t//��������ͷ������ \n\t\t\tmyPost.setRequestHeader(\"Content-Type\", \"text/xml\");\n\t\t\tmyPost.setRequestHeader(\"charset\", \"utf-8\");\n\t\t\tmyPost.setRequestHeader(\"x-app-key\", \"c85d54f1\");\n\t\t\tmyPost.setRequestHeader(\"x-sdk-version\", \"3.1\");\n\n\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n\t\t\tmyPost.setRequestHeader(\"x-request-date\", date);\n\t\t\tString x_task_config = \"capkey=hwr.cloud.letter\";\n\t\t\tmyPost.setRequestHeader(\"x-task-config\", x_task_config);\n//\t\t\tString b = new String(g_sShortData);\n\t\t\tString str = \"712ddd892cf9163e6383aa169e0454e3\" + date + x_task_config ;\n//\t\t\tSystem.out.println(str);\n\t\t\tmyPost.setRequestHeader(\"x-auth\", MD5.getMD5((str + g_sShortData.toString()).getBytes()));\n//\t\t\tmyPost.setRequestHeader(\"x-udid\", \"101:123456789\");\n\t\t\tSystem.out.println(g_sShortData.length);\n\t\t\tbyte[] b = new byte[g_sShortData.length];\n\t\t\tfor(int i=0; i<g_sShortData.length; i++){\n\t\t\t\tb[i] = (byte) g_sShortData[i];\n\t\t\t}\n\t\t\t\n\t\t\tRequestEntity entity = new StringRequestEntity(new String(b, \"iso-8859-1\"), \"application/octet-stream\", \"iso-8859-1\");\n\t\t\tmyPost.setRequestEntity(entity);\n\t\t\tint statusCode = client.executeMethod(myPost);\n\t\t\tString.format(\"%d\", statusCode);\n\t\t\tSystem.out.println(statusCode);\n\t\t\t\n\t\t\tif (statusCode == HttpStatus.SC_OK) {\n\t\t\t\tInputStream txtis = myPost.getResponseBodyAsStream(); \n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(txtis, \"utf-8\"));\n\t\t\t\t\n\t\t\t\tString tempbf;\n\t\t\t\tStringBuffer html = new StringBuffer(256);\n\t\t\t\twhile((tempbf = br.readLine()) != null){\n\t\t\t\t\thtml.append(tempbf);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(html.toString());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Builder addRequestHeadersToRemove(String requestHeadersToRemove) {\n if (this.requestHeadersToRemove == null) {\n this.requestHeadersToRemove = new LinkedList<>();\n }\n this.requestHeadersToRemove.add(requestHeadersToRemove);\n return this;\n }", "private void getString(RequestQueue queue) {\n stringRequest = new StringRequest(Request.Method.GET, url,\n response -> {\n // display the content of our url\n Log.d(\"Main\",\"onCreate: \" + response.substring(0, 700));\n }, error -> {\n Log.d(\"Main\", \"Failed to get info \" + error.toString());\n });\n stringRequest.setRetryPolicy(new RetryPolicy() {\n @Override\n public int getCurrentTimeout() {\n return 500;\n }\n\n @Override\n public int getCurrentRetryCount() {\n return 500;\n }\n\n @Override\n public void retry(VolleyError error) throws VolleyError {\n\n }\n });\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n }", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n // params.put(\"Content-Type\", \"application/json; charset=UTF-8\");\n params.put(\"authorization\", token);\n return params;\n }", "private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }", "HttpHeaderType createHttpHeaderType();", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }", "private static SOAPMessage createSOAPRequest(String soapAction, int type, String orderId, JSONObject orderInfo)\n\t\t\tthrows Exception {\n\t\tSystem.out.println(\"createSOAPRequest\");\n\t\tMessageFactory messageFactory = MessageFactory.newInstance();\n\t\tSOAPMessage soapMessage = messageFactory.createMessage();\n\t\tsoapMessage.getSOAPHeader().detachNode();\n\t\tsoapMessage.getSOAPPart().getEnvelope().setPrefix(\"s\");\n\t\tsoapMessage.getSOAPPart().getEnvelope().removeNamespaceDeclaration(\"SOAP-ENV\");\n\t\t// soapMessage.getSOAPHeader().setPrefix(\"s\");\n\t\tsoapMessage.getSOAPBody().setPrefix(\"s\");\n\n\t\t// String authorization = new\n\t\t// sun.misc.BASE64Encoder().encode((userName+\":\"+password).getBytes());\n\n\t\tcreateSoapEnvelope(soapMessage, type, orderId, orderInfo);\n\n\t\tMimeHeaders headers = soapMessage.getMimeHeaders();\n\t\t// headers.addHeader(\"Authorization\", \"Basic \" + authorization);\n\t\theaders.addHeader(\"SOAPAction\", soapAction);\n\n\t\tsoapMessage.saveChanges();\n\n\t\t/* Print the request message, just for debugging purposes */\n\t\tSystem.out.println(\"Request SOAP Message:\");\n\t\tsoapMessage.writeTo(System.out);\n\t\tSystem.out.println(\"\\n\");\n\n\t\treturn soapMessage;\n\t}", "@Test\n public void testCantSerializeHeaders() throws Exception {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"key\", null);\n ThriftRequest.Builder<ExampleWithRequiredField> requestBuilder =\n new ThriftRequest.Builder<ExampleWithRequiredField>(\n \"keyvalue-service\",\n \"KeyValue::setValue\"\n )\n .setBody(new ExampleWithRequiredField())\n .setHeaders(headers);\n\n try {\n requestBuilder.validate();\n fail(\"Expected exception\");\n } catch (Exception e) {\n StringWriter sw = new StringWriter();\n e.printStackTrace(new PrintWriter(sw));\n String exceptionAsString = sw.toString();\n assertTrue(exceptionAsString.contains(\"validateHeader\"));\n }\n assertNotNull(\"Service endpoint initialized before validation stage\", requestBuilder.getArg1());\n assertFalse(\"Arg1 should utilize Heap to avoid mem-leaks in validate\", requestBuilder.getArg1().isDirect());\n assertFalse(\n \"Arg1 should utilize Heap to avoid mem-leaks in validate\",\n requestBuilder.getArg1().hasMemoryAddress()\n );\n assertTrue(\"Arg1 should utilize Heap to avoid mem-leaks in validate\", requestBuilder.getArg1().hasArray());\n\n assertNull(requestBuilder.arg2);\n assertNull(requestBuilder.arg3);\n }", "public static TemplatePushRequest newRequest() {\n return new TemplatePushRequest();\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "public abstract void setString(String paramString) throws InvalidHeaderException;" ]
[ "0.6079711", "0.5735902", "0.5723969", "0.56879723", "0.56703115", "0.56583333", "0.56504196", "0.56183153", "0.5595468", "0.55556947", "0.55098736", "0.5411957", "0.53864026", "0.5349512", "0.53193736", "0.52892745", "0.5278133", "0.5263384", "0.5232067", "0.5211936", "0.5207282", "0.51933", "0.5173554", "0.516503", "0.5162957", "0.51116467", "0.5097616", "0.50941795", "0.50821084", "0.50806004", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.50755996", "0.5042494", "0.5035913", "0.50339824", "0.5033857", "0.5031369", "0.50307757", "0.50168943", "0.5011566", "0.5006513", "0.49881005", "0.49868", "0.49708393", "0.495836", "0.49563074", "0.49455327", "0.49399582", "0.492191", "0.49203452", "0.49109837", "0.49093193", "0.49087787", "0.49068388", "0.48845935", "0.485853", "0.48559302", "0.48512527", "0.48455325", "0.48430696", "0.48294696", "0.48254672", "0.48154724", "0.48126435", "0.48055124", "0.48044407", "0.4790936", "0.47891903", "0.478775", "0.47811455", "0.47672057", "0.47657397", "0.47626656", "0.4755151", "0.47493136", "0.47440144", "0.47418645", "0.47416785", "0.47409102", "0.47372353", "0.47263244", "0.4717856", "0.47131157", "0.47129598", "0.4704183", "0.47036034", "0.4696936", "0.46903127", "0.46800965", "0.46792176", "0.46791884" ]
0.6527094
0
return brain.getPlayer().isLeftSide() == brain.getFullstateInfo().LeftGotBall();
@Override public boolean CheckConditions() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "private boolean leftCollision(InteractiveObject obj){\n\t\treturn leftUpCollision(obj) || leftDownCollision(obj);\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public boolean checkBallOutLeftRight() {\n //if ball is out of left and right\n if (x <= -radius || x >= GameView.width + radius) {\n out = true;\n return true;\n }\n return false;\n }", "void hasLeft();", "public void playerMissedBall(){ active = false;}", "public boolean canBeLeft();", "private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }", "public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}", "boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}", "public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }", "boolean hasSide();", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "private boolean checkStatus() {\r\n //\tSystem.out.println(\"Left \" + Left.getX() + \",\" + Left.getY());\r\n \t//System.out.println(\"Head \" + head.getX() + \",\" + head.getY());\r\n \tboolean result = false;\r\n \tif(Left.getX() >= -4 && Left.getX() <= -3.5f) {\r\n \t\t\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= -2 && Left.getX() <= -0.5f) {\r\n \t\tthis.die = 1;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 0 && Left.getX() <= 1.5f) {\r\n \t\tthis.die = 2;\r\n \t\tresult = true;\r\n \t}\r\n \tif(Left.getX() >= 2 && Left.getX() <= 3.5f) {\r\n \t\tthis.die = 3;\r\n \t\tresult = true;\r\n \t}\r\n \treturn result;\r\n }", "private boolean isBallCollideRightWall(GOval ball) {\n return ball.getX() + 2 * BALL_RADIUS >= getWidth();\n }", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "public Boolean getWinner(){\n return spil.erSpilletVundet();\n }", "public Boolean getMovingState()\r\n\t{\r\n\t\tObject[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON);\r\n\t\tif (result[0] == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (result[0].equals(\"False\"))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean isShootLeft() {\n return shootLeft;\n }", "public void turnLeft();", "private boolean isBricksLeft(int bricksOnStage) {\n return bricksOnStage == 0;\n }", "public boolean fireLeftJet()\r\n\t{\r\n\t\treturn fireJet(new Point(0.3, 0));\r\n\t}", "public boolean isWall();", "boolean isMoving();", "public abstract boolean facingRight();", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public boolean isCurrentPlayerHungry() {\r\n\tboolean isHungry = true;\r\n\tint length = this.territory[this.currentSide].length;\r\n\tfor (short i = 0; i < length && isHungry; i++) {\r\n\t isHungry = (this.territory[this.currentSide][i] == 0);\r\n\t}\r\n\r\n\treturn isHungry;\r\n }", "private boolean rightCollision(InteractiveObject obj){\n\t\treturn rightUpCollision(obj) || rightDownCollision(obj);\n\t}", "public boolean isLeftKnown() {\n return left != BeaconColor.UNKNOWN;\n }", "boolean isGameSpedUp();", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean isFire() {\n return side;\n }", "boolean getStraight();", "@Override\n public boolean isFinished() {\n// return false;\n return LightningMath.epsilonEqual(shooter.getFlywheelMotor1Velocity(), shooter.motor1setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor2Velocity(), shooter.motor2setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor3Velocity(), shooter.motor3setpoint, Constants.FLYWHEEL_EPSILON);\n }", "public boolean gameWon(){\n return false;\n }", "boolean canFall();", "public boolean isFacingLeft(){\r\n\t\tif(facingLeft == true){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean topPlayerWon() {\n return winner == 2;\n }", "private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}", "public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}", "public boolean isTurned(){\n\treturn IS_TURNED;\n }", "boolean isPlayableInGame();", "public boolean isMoveLeft() {\n return moveLeft;\n }", "public boolean isGliding ( ) {\n\t\treturn extract ( handle -> handle.isGliding ( ) );\n\t}", "boolean isPlayerTurn();", "public boolean ballDetected()\n\t{\n\t\tusSampleProvider.fetchSample(usData, 0);\n\t\tusDistance = (double)(usData[0]*100.0);\n\t\t\n\t\t//while the robot isn't seeing an object\n\t\twhile (usDistance>100)\n\t\t{\n\t\t\tmainMotorSetSpeeds(normalSpeed,normalSpeed);\n\t\t\tmainLeftMotor.forward();\n\t\t\tmainRightMotor.forward();\n\t\t}\n\t\tmainLeftMotor.stop();\n\t\tmainRightMotor.stop();\n\t\t\n\t\treturn true;\n\t}", "public abstract boolean isPlayer();", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "public abstract void turnLeft();", "public boolean isDrooping() {\n return ((((this.leftTheta % 360) + 360) % 360) > 180)\n || ((((this.rightTheta % 360) + 360) % 360) > 180) \n || this.left.isDrooping()\n || this.right.isDrooping(); \n }", "public Boolean isHeld() { return held; }", "public boolean isKing(){return this.king;}", "boolean isLeftCollision(Actor actor) {\n return this.getX() - 1 == actor.getX() && this.getY() == actor.getY();\n }", "public int side() {\n //YOUR CODE HERE\n\t return teamSide;\n }", "@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }", "private boolean playerWonGameWithHorizontalLine(Player player) {\n char playerSymbol = player.getType();\n for (int i = 0; i < 3; i++) {\n if (boardState[i][0] == playerSymbol && boardState[i][1] == playerSymbol \n && boardState[i][2] == playerSymbol) {\n return true; \n }\n \n }\n return false; \n }", "@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public boolean isGateFull(){return GateFull;}", "boolean isStraight();", "public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}", "public boolean isSidePlayerOpen() {\n return this.sidePlayer;\n }", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "public void sideCheck() {\n /*Be careful when creating tiles, especially ones that allow Sonic's bottom and middle sensors to intersect \n the same tile*/\n mLCollide = false;\n mRCollide = false;\n if(grounded) {\n if(groundSpeed > 0) {\n sideCollision(middleRight);\n }\n else if(groundSpeed < 0) {\n sideCollision(middleLeft);\n } \n }\n else if(!grounded) {\n if(xSpeed < 0) {\n sideCollision(middleLeft);\n }\n else if(xSpeed > 0) {\n sideCollision(middleRight);\n }\n }\n }", "boolean isMyTurn();", "private boolean playerWonGameWithVerticalLine(Player player) {\n char playerSymbol = player.getType(); \n for (int i = 0; i < 3; i++) {\n if (boardState[0][i] == playerSymbol && boardState[1][i] == playerSymbol \n && boardState[2][i] == playerSymbol) {\n return true; \n }\n \n }\n return false; \n }", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "public boolean isHalfCarry() {\n\t\treturn ((get() >> 5) & 1) == 1;\n\t}", "public abstract boolean gameIsOver();", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "private boolean isBallCollideCelling(GOval ball) {\n return ball.getY() <= 0;\n }", "public boolean isHere(){ return this.piece.isAffected();}", "public boolean checkWallCollision(){\r\n\t\tint x;\r\n\t\tint y;\r\n\t\t\r\n\t\tif(pacman.direction.equals(\"up\")){\r\n\t\t\tx = (int) Math.ceil((pacman.xpos-interval)/(interval+0.00));\r\n\t\t\ty = (int) Math.ceil((pacman.ypos-interval)/(interval+0.00));\r\n\t\t\t//System.out.println(\"x:\"+x+\" y:\"+y);\r\n\t\t\tif(y > 0){\r\n\t\t\t\tif(colours[x][y-1].equals(\"0,255,0\")){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(pacman.direction.equals(\"down\")){\r\n\t\t\tx = (pacman.xpos-interval)/interval;\r\n\t\t\ty = (pacman.ypos-interval)/interval;\r\n\t\t\t//System.out.println(\"x:\"+x+\" y:\"+y);\r\n\t\t\tif(y < colours[0].length-1){\r\n\t\t\t\tif(colours[x][y+1].equals(\"0,255,0\")){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(pacman.direction.equals(\"left\")){\r\n\t\t\tx = (int) Math.ceil((pacman.xpos-interval)/(interval+0.00));\r\n\t\t\ty = (int) Math.ceil((pacman.ypos-interval)/(interval+0.00));\r\n\t\t\t//System.out.println(\"x:\"+x+\" y:\"+y);\r\n\t\t\tif(x > 0){\r\n\t\t\t\tif(colours[x-1][y].equals(\"0,255,0\")){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(pacman.direction.equals(\"right\")){\r\n\t\t\tx = (pacman.xpos-interval)/interval;\r\n\t\t\ty = (pacman.ypos-interval)/interval;\r\n\t\t\t//System.out.println(\"x:\"+x+\" y:\"+y);\r\n\t\t\tif(x < colours.length-1){\r\n\t\t\t\tif(colours[x+1][y].equals(\"0,255,0\")){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }", "boolean isGameOver();", "boolean isGameOver();", "public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }", "@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}", "public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isPressed() {\r\n List<Entity> entities = dungeon.getEntities();\r\n for (Entity e: entities) {\r\n if (e != null && e.getY() == getY() && e.getX() == getX()) {\r\n if (\"Boulder\".equals(e.getClass().getSimpleName()))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}", "public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}", "public boolean isBright() {\n return isBright;\n }", "public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }", "public boolean checkRapelState () { return noOfRapels > 0; }", "boolean hasPlayerBag();", "public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }", "private boolean amIleader() {\n \t\treturn vs.getRank(myEndpt) == 0;\n \t}", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public boolean hitPaddle(boolean is_right_dir){\n\t\tif(is_right_dir){\n\t\t\tif(b.getX() >= p1.getX() && b.getX() < (p1.getX() + p1.getWidth()) && b.getY() >= p1.getY() && b.getY() <= p1.getY() + p1.getHeight()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(b.getX() <= p2.getX() && b.getX() > (p2.getX() - p2.getWidth()) && b.getY() >= p2.getY() && b.getY() <= p2.getY() + p2.getHeight()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public boolean GetMove();", "public Bearing getLeftNeighbour() {\n return this == N || this == S ? W : N;\n }", "public boolean canSpawnLightningBolt()\n {\n return this.func_150559_j() ? false : this.enableRain;\n }", "public boolean fireRightJet()\r\n\t{\r\n\t\treturn fireJet(new Point(-0.3, 0));\r\n\t}", "public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "boolean isDrooping();", "private boolean nextIsWall()\n {\n return this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].isHasWall();\n }", "boolean canSnowFallOn();", "public boolean isShivering();", "public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}" ]
[ "0.6990788", "0.68046147", "0.6726903", "0.66499037", "0.6644608", "0.6637829", "0.6613889", "0.6550252", "0.65353715", "0.65167826", "0.6511688", "0.64760697", "0.64749116", "0.64411616", "0.6396573", "0.6374991", "0.63543785", "0.6339984", "0.63342994", "0.63254035", "0.6319808", "0.63048166", "0.6302584", "0.6273937", "0.6268529", "0.6261783", "0.6260765", "0.6241877", "0.6216215", "0.6209675", "0.61931574", "0.6191487", "0.6176169", "0.61737657", "0.6148671", "0.6147564", "0.6144541", "0.61409986", "0.612201", "0.6120797", "0.6120094", "0.6119976", "0.6109591", "0.61021674", "0.60949004", "0.6074522", "0.6074458", "0.6072733", "0.60652566", "0.6064475", "0.6064176", "0.60637146", "0.6059691", "0.6059514", "0.60533625", "0.6051704", "0.6047715", "0.6038891", "0.60282356", "0.60176665", "0.6012622", "0.60103464", "0.6007969", "0.5995641", "0.599089", "0.5988955", "0.5982866", "0.59826356", "0.59816486", "0.5981466", "0.59805214", "0.5979131", "0.5977261", "0.597494", "0.5972249", "0.5972249", "0.5967152", "0.5966676", "0.5956204", "0.5953811", "0.5943857", "0.5941267", "0.59411407", "0.59406465", "0.5937397", "0.5936109", "0.5934058", "0.59306526", "0.59292895", "0.59223306", "0.59201413", "0.59193724", "0.59174913", "0.59153664", "0.5914021", "0.59124094", "0.5910725", "0.59094876", "0.5895145", "0.5889523", "0.5884179" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { String dir = "C:\\Projects\\packages\\jdk\\src\\"; String file = "java\\util\\ArrayList.java"; collector = new CommentCollector(new JavaFile(dir, file)); collector.parse(); for (Method method: collector.getCodeLists().methods) { if (method.getRetType() != "") { System.out.print(method.getRetType() + " "); } System.out.println(method.getId() + ":"); for (Parameter param: method.getParams()) { System.out.println( " PARAM: " + param.getType() + " " + param.getId()); } for (Variable var: method.getVariables()) { System.out.println( " VAR: " + var.getType() + " " + var.getId()); } for (Comment cmt: method.getAllComments()) { if (cmt.getTag() != null) { System.out.print(" (" + cmt.getTag() + ") "); } else { System.out.print(" "); } System.out.println(cmt.getOrigText()); } } }
{ "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
Create an instance of ManagePreferences by database row id.
public ManagePreferences(Context context, long rowId) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JobPreference(Integer id) {\n super.id=id;\n }", "public ManagePreferences(Context context, String contactId, String contactLookupKey) {\n }", "@Override\n\tpublic UserPreferences newInstance() {\n\t\treturn new UserPreferences();\n\t}", "PrimaryKey createPrimaryKey();", "MrpConfigSettingsEntity selectByPrimaryKey(Integer id);", "public CsclAppointeeMaster create(long id_);", "public UserPreferencesRecord() {\n\t\tsuper(us.fok.lenzenslijper.models.jooq.tables.UserPreferences.USER_PREFERENCES);\n\t}", "@Override\n\tpublic AssetManageReqHandle create(long handleId) {\n\t\tAssetManageReqHandle assetManageReqHandle = new AssetManageReqHandleImpl();\n\n\t\tassetManageReqHandle.setNew(true);\n\t\tassetManageReqHandle.setPrimaryKey(handleId);\n\n\t\treturn assetManageReqHandle;\n\t}", "@Override\n\tpublic LocalRichInfo create(long id) {\n\t\tLocalRichInfo localRichInfo = new LocalRichInfoImpl();\n\n\t\tlocalRichInfo.setNew(true);\n\t\tlocalRichInfo.setPrimaryKey(id);\n\n\t\treturn localRichInfo;\n\t}", "public static void createNewUserPreference(Context context) {\r\n\t\tString newUserId = generateNewUserId();\r\n\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\tString userConfigFileName = getUserConfigFileName(context, newUserId);\r\n\t\tString userDbFileName = getUserDatabaseFileName(context, newUserId);\r\n\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "int insert(MrpConfigSettingsEntity record);", "public PreferenceBean loadByPrimaryKey(Integer preferenceid) throws SQLException\n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM preference WHERE preference.preferenceid=?\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n Manager.setInteger(ps, 1, preferenceid);\n PreferenceBean pReturn[] = loadByPreparedStatement(ps);\n if (pReturn.length < 1)\n return null;\n else\n return pReturn[0];\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "ConfigData selectByPrimaryKey(Integer id);", "UserSettings getOrCreateByUser();", "public void setPrimaryKey(int primaryKey);", "public Object create() {\n executeCallbacks(CallbackType.BEFORE_CREATE);\n\n executeCallbacks(CallbackType.BEFORE_VALIDATION);\n executeValidations();\n executeValidationsOnCreate();\n executeCallbacks(CallbackType.AFTER_VALIDATION);\n\n if (errors.size() > 0) return this;\n\n Adapter adapter = getAdapter();\n if (getId() == null && adapter.shouldPrefetchPrimaryKey(getTableName())) {\n this.id = adapter.getNextSequenceValue(getSequenceName());\n }\n\n StringBuilder sql = new StringBuilder();\n sql.append(\"INSERT INTO \").append(getTableName()).append(\" (\");\n sql.append(quotedColumnNames(includePrimaryKey));\n sql.append(\") VALUES (\").append(quotedAttributeValues(includePrimaryKey)).append(\")\");\n\n id = adapter.insert(sql.toString(), getClass().getName() + \" Create\");\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n\n executeCallbacks(CallbackType.AFTER_CREATE);\n\n return id;\n }", "public long insertRowSettings(int value, int id) {\n ContentValues values = new ContentValues();\n values.put(KEY_SETTINGS_VALUE, value);\n String where = KEY_SETTINGS_ROWID + \"=\" + id;\n\n return db.insert(SETTINGS_TABLE_NAME, where, values);\n }", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public User(int ID, Preferences preferences) {\n\t\tthis.ID = ID;\n\t\tthis.preferences = preferences;\n\t}", "TrackerPrefs loadTrackerPrefs(final Integer id);", "Optional<Preferences> findOne(Long id);", "public PreferenceBean save(PreferenceBean pObject) throws SQLException\n {\n Connection c = null;\n PreparedStatement ps = null;\n StringBuffer _sql = null;\n\n try\n {\n c = getConnection();\n if (pObject.isNew())\n { // SAVE \n if (!pObject.isPreferenceidModified())\n {\n ps = c.prepareStatement(\"SELECT nextval('preferenceid_seq')\");\n ResultSet rs = null;\n try\n {\n rs = ps.executeQuery();\n if(rs.next())\n pObject.setPreferenceid(Manager.getInteger(rs, 1));\n else\n getManager().log(\"ATTENTION: Could not retrieve generated key!\");\n }\n finally\n {\n getManager().close(ps, rs);\n ps=null;\n }\n }\n beforeInsert(pObject); // listener callback\n int _dirtyCount = 0;\n _sql = new StringBuffer(\"INSERT into preference (\");\n \n if (pObject.isPreferenceidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"preferenceid\");\n _dirtyCount++;\n }\n\n if (pObject.isNameModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"name\");\n _dirtyCount++;\n }\n\n if (pObject.isPreferencetypeidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"preferencetypeid\");\n _dirtyCount++;\n }\n\n if (pObject.isRegbyidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"regbyid\");\n _dirtyCount++;\n }\n\n if (pObject.isRegdateModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"regdate\");\n _dirtyCount++;\n }\n\n if (pObject.isActiveModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"active\");\n _dirtyCount++;\n }\n\n if (pObject.isDeletedModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"deleted\");\n _dirtyCount++;\n }\n\n if (pObject.isReservationidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"reservationid\");\n _dirtyCount++;\n }\n\n if (pObject.isIsstandartModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"isstandart\");\n _dirtyCount++;\n }\n\n _sql.append(\") values (\");\n if(_dirtyCount > 0) {\n _sql.append(\"?\");\n for(int i = 1; i < _dirtyCount; i++) {\n _sql.append(\",?\");\n }\n }\n _sql.append(\")\");\n\n ps = c.prepareStatement(_sql.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n _dirtyCount = 0;\n\n if (pObject.isPreferenceidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getPreferenceid());\n }\n \n if (pObject.isNameModified()) {\n ps.setString(++_dirtyCount, pObject.getName());\n }\n \n if (pObject.isPreferencetypeidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getPreferencetypeid());\n }\n \n if (pObject.isRegbyidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getRegbyid());\n }\n \n if (pObject.isRegdateModified()) {\n ps.setTimestamp(++_dirtyCount, pObject.getRegdate());\n }\n \n if (pObject.isActiveModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getActive());\n }\n \n if (pObject.isDeletedModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getDeleted());\n }\n \n if (pObject.isReservationidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getReservationid());\n }\n \n if (pObject.isIsstandartModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getIsstandart());\n }\n \n ps.executeUpdate();\n \n pObject.isNew(false);\n pObject.resetIsModified();\n afterInsert(pObject); // listener callback\n }\n else \n { // UPDATE \n beforeUpdate(pObject); // listener callback\n _sql = new StringBuffer(\"UPDATE preference SET \");\n boolean useComma=false;\n\n if (pObject.isPreferenceidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"preferenceid\").append(\"=?\");\n }\n\n if (pObject.isNameModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"name\").append(\"=?\");\n }\n\n if (pObject.isPreferencetypeidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"preferencetypeid\").append(\"=?\");\n }\n\n if (pObject.isRegbyidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"regbyid\").append(\"=?\");\n }\n\n if (pObject.isRegdateModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"regdate\").append(\"=?\");\n }\n\n if (pObject.isActiveModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"active\").append(\"=?\");\n }\n\n if (pObject.isDeletedModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"deleted\").append(\"=?\");\n }\n\n if (pObject.isReservationidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"reservationid\").append(\"=?\");\n }\n\n if (pObject.isIsstandartModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"isstandart\").append(\"=?\");\n }\n _sql.append(\" WHERE \");\n _sql.append(\"preference.preferenceid=?\");\n ps = c.prepareStatement(_sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n int _dirtyCount = 0;\n\n if (pObject.isPreferenceidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getPreferenceid());\n }\n\n if (pObject.isNameModified()) {\n ps.setString(++_dirtyCount, pObject.getName());\n }\n\n if (pObject.isPreferencetypeidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getPreferencetypeid());\n }\n\n if (pObject.isRegbyidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getRegbyid());\n }\n\n if (pObject.isRegdateModified()) {\n ps.setTimestamp(++_dirtyCount, pObject.getRegdate());\n }\n\n if (pObject.isActiveModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getActive());\n }\n\n if (pObject.isDeletedModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getDeleted());\n }\n\n if (pObject.isReservationidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getReservationid());\n }\n\n if (pObject.isIsstandartModified()) {\n Manager.setBoolean(ps, ++_dirtyCount, pObject.getIsstandart());\n }\n \n if (_dirtyCount == 0) {\n return pObject;\n }\n \n Manager.setInteger(ps, ++_dirtyCount, pObject.getPreferenceid());\n ps.executeUpdate();\n pObject.resetIsModified();\n afterUpdate(pObject); // listener callback\n }\n \n return pObject;\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n\tpublic Legacydb create(long legacydbid) {\n\t\tLegacydb legacydb = new LegacydbImpl();\n\n\t\tlegacydb.setNew(true);\n\t\tlegacydb.setPrimaryKey(legacydbid);\n\n\t\treturn legacydb;\n\t}", "@Override\n\tpublic JobPreferences findById(int id) {\n\t\treturn null;\n\t}", "public void assignId(int id);", "public static Item create(long itemId) {\n\t\treturn getPersistence().create(itemId);\n\t}", "int updateByPrimaryKey(MrpConfigSettingsEntity record);", "PK create(T newInstance);", "AdminTab selectByPrimaryKey(String id);", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "WithCreate withIdProvider(String idProvider);", "public FORCE_UNLOCK_PROPOSAL(String id) { super(id); }", "public TrabajadorEmpresa create(String idPersona) {\n\t\tTrabajadorEmpresa trabajadorEmpresa = new TrabajadorEmpresaImpl();\n\n\t\ttrabajadorEmpresa.setNew(true);\n\t\ttrabajadorEmpresa.setPrimaryKey(idPersona);\n\n\t\treturn trabajadorEmpresa;\n\t}", "Factory selectByPrimaryKey(Long id);", "public static void createActiveUserRelatedPreferencesIfNeeds(Context context) {\r\n\t\tif (hasActiveUserId(context) == false) {\r\n\t\t\tString newUserId = generateNewUserId();\r\n\t\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\t\tString userConfigFileName = getUserConfigFileName(context,\r\n\t\t\t\t\tnewUserId);\r\n\t\t\tString userDbFileName = DatabaseHelper.databaseName; // Use old db\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// file\r\n\r\n\t\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\t\tif (prefs != null) {\r\n\t\t\t\tEditor editor = prefs.edit();\r\n\t\t\t\tif (editor != null) {\r\n\t\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t\t\teditor.putString(PreferenceKeys.ActiveUserId, newUserId);\r\n\t\t\t\t}\r\n\r\n\t\t\t\teditor.commit();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public BaseMTeachinstorItemTab(long _id)\r\n {\r\n this.setId(_id);\r\n initialize();\r\n }", "public PreferenceBean createPreferenceBean()\n {\n return new PreferenceBean();\n }", "int insert(PensionRoleMenu record);", "int updateByPrimaryKey(PrefecturesMt record);", "public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}", "public static Project Create(String id)\n\t{\n\t\t// Need to use an ancestor query to do this inside a transaction.\n\t\t// But the ancestor of project is project.\n\t\t// So we just create a normal key with only the type and id\n\t\tproject = ofy().load().key(Key.create(Project.class, id)).now();\n\n\t\treturn project;\n\t}", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "private void setId(Integer id) { this.id = id; }", "UserSettings getOrCreateByUser(HawkularUser user);", "Register selectByPrimaryKey(Integer id);", "private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}", "protected boolean instantiateEJBByPrimaryKey() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.naming.NamingException {\n boolean result = false;\n\n if ( ejbRef() != null )\n return true;\n\n try {\n com.hps.july.persistence.StoragePlaceKey pKey = (com.hps.july.persistence.StoragePlaceKey) this.__getKey();\n if ( pKey != null ) {\n ejbRef = ejbHome().findByPrimaryKey(pKey);\n result = true;\n }\n }\n catch ( javax.ejb.FinderException e ) {\n }\n return result;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "int insertSelective(MrpConfigSettingsEntity record);", "public final com.francetelecom.admindm.model.Parameter createPID()\n\t\t\tthrows Fault {\n\t\tcom.francetelecom.admindm.model.Parameter param;\n\t\tparam = data.createOrRetrieveParameter(basePath + \"PID\");\n\t\tparam.setNotification(0);\n\t\tparam.setStorageMode(StorageMode.DM_ONLY);\n\t\tparam.setType(ParameterType.UINT);\n\t\tparam.addCheck(new CheckMinimum(0));\n\t\tparam.addCheck(new CheckMaximum(4294967295L));\n\t\tparam.setValue(new Long(0));\n\t\tparam.setWritable(false);\n\t\treturn param;\n\t}", "private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }", "public T createModel(Cursor cursor, String id);", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "public DataEntry create(long dataEntryId);", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "UmsIntegrationConsumeSetting selectByPrimaryKey(Long id);", "CptDataStore selectByPrimaryKey(String id);", "@Override\n\tpublic JobPreferences save(JobPreferences educaiton) {\n\t\treturn jobPreferenceDao.save(educaiton);\n\t}", "public static SettingsFragment newInstance(DBManager db, AuthController authController) {\n\n SettingsFragment fragment = new SettingsFragment();\n Bundle bundle = new Bundle();\n bundle.putSerializable(Constants.DB_KEY, db);\n bundle.putSerializable(Constants.AUTH_CONTROLLER_KEY, authController);\n fragment.setArguments(bundle);\n\n return fragment;\n }", "public static Periode getRecordById(int id){ \n Periode p=null; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menampilkan data berdasarkan id atau primary key \n PreparedStatement ps=con.prepareStatement(\"select * from periode where id=?\"); \n ps.setInt(1,id); \n ResultSet rs=ps.executeQuery(); \n while(rs.next()){ \n p = new Periode(); \n p.setId(rs.getInt(\"id\")); \n p.setTahun(rs.getString(\"tahun\")); \n p.setAwal(rs.getString(\"awal\")); \n p.setAkhir(rs.getString(\"akhir\"));\n p.setStatus(rs.getString(\"status\"));\n } \n }catch(Exception e){System.out.println(e);} \n return p; \n }", "public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }", "public static UserPrefernce getInstance(){\r\n\t\tif(mInstance == null){\r\n\t\t\tmInstance = new UserPrefernce();\r\n\t\t}\r\n\t\treturn mInstance;\r\n\t}", "public void setId(long id) {\n id_ = id;\n }", "PensionRoleMenu selectByPrimaryKey(Long id);", "public T from_id(int id) {\n\t\ttry {\n\t\t\treturn first(id_name(), new Integer(id));\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public PersistentShopkeeper newShopkeeper(long idCreateIfLessZero) throws PersistenceException {\n if(idCreateIfLessZero > 0) return (PersistentShopkeeper)PersistentProxi.createProxi(idCreateIfLessZero, 192);\n long id = ConnectionHandler.getTheConnectionHandler().theShopkeeperFacade.getNextId();\n Shopkeeper result = new Shopkeeper(null,null,null,null,null,null,id);\n Cache.getTheCache().put(result);\n return (PersistentShopkeeper)PersistentProxi.createProxi(id, 192);\n }", "int updateByPrimaryKey(PensionRoleMenu record);", "public long newPeriodID() {\n long id;\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(COLUMN_PERIOD_INCOMES, 0);\n values.put(COLUMN_PERIOD_OUTCOMES, 0);\n values.put(COLUMN_PERIOD_BALANCE, 0);\n values.put(COLUMN_PERIOD_TRANSACTIONS, 0);\n // Inserting Row\n id = db.insert(TABLE_PERIOD, null, values);\n db.close();\n return id;\n }", "private void setPoId(Long id) {\r\n this.poId = id;\r\n }", "private Account loadDataFromDB(String id){\n if(mCurrentAccount == null){\n mCurrentAccount = getAccountDetailUC.execute(id);\n try {\n mLastSaveAccount = mCurrentAccount.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n }else{\n mCurrentAccount = getAccountDetailUC.execute(id);\n }\n return mCurrentAccount;\n }", "@Override\n\tpublic Approvatore create(long id_approvatore) {\n\t\tApprovatore approvatore = new ApprovatoreImpl();\n\n\t\tapprovatore.setNew(true);\n\t\tapprovatore.setPrimaryKey(id_approvatore);\n\n\t\treturn approvatore;\n\t}", "public void setID(long id);", "public long insertNewRow(){\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_PAIN_ASSESSMENT_NUM, \"0\");\n initialValues.put(KEY_ANALGESIC_PRES_NUM, \"0\");\n initialValues.put(KEY_ANALGESIC_ADMIN_NUM, \"0\");\n initialValues.put(KEY_NERVE_BLOCK_NUM, \"0\");\n initialValues.put(KEY_ALTERNATIVE_PAIN_RELIEF_NUM, \"0\");\n long id = db.insert(DATA_TABLE, null, initialValues);\n\n String value = MainActivity.deviceID + \"-\" + id;\n updateFieldData(id, KEY_UNIQUEID, value);\n\n return id;\n }", "@RequestMapping(\"/manage/{id}\")\n\tpublic String manageAccount(@PathVariable(\"id\") int id, Model m, Principal princpl) {\n\t\tAgentModel agentModelById = this.servimple.getAgentModelById(id);\n\t\tString position = agentModelById.getPosition();\n\t\tif(position.equals(\"Active\")) {\n\t\tterget = agentModelById.getAgent_name();\n\t\tm.addAttribute(\"myAccount\", agentModelById);\n\t\tm.addAttribute(\"terget\", terget);\n\t\treturn \"Agent/agentPanel\";\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tm.addAttribute(\"sorry\", \"Sorry! Your Id is Deactivated. To activate your id Plz Contact to admin.\");\n\t\t\treturn \"Agent/agentPanel\";\n\t\t\n\t\t}\n\t\n\t}", "public Procurator findById(java.lang.Integer id) {\n\t\ttry {\n\t\t\tProcurator instance = (Procurator) getSession().get(\"com.cargo.model.Procurator\", id);\n\t\t\treturn instance;\n\t\t} catch (RuntimeException re) {\n\t\t\tthrow re;\n\t\t}\n\t}", "public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }", "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "EtpBase selectByPrimaryKey(String id);", "private PreferencesEdit getPreferencesEdit(String userId) {\n\n\t\tPreferencesEdit m_edit = null;\n\t\ttry {\n\t\t\tm_edit = m_preferencesService.edit(userId);\n\t\t} catch (IdUnusedException e) {\n\t\t\ttry {\n\t\t\t\tm_edit = m_preferencesService.add(userId);\n\t\t\t} catch (Exception ee) {\n\t\t\t\tM_log.error(\"getPreferencesEdit: \" +userId + \" \" + e.getMessage());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (InUseException e) {\n\t\t\tM_log.error(\"getPreferencesEdit: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t} catch (PermissionException e) {\n\t\t\tM_log.error(\"getPreferencesEdit: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn m_edit;\n\t}", "TrackerPrefs getTrackerPrefs(final Integer id);" ]
[ "0.5306073", "0.52133363", "0.51780784", "0.5149235", "0.50414985", "0.5033291", "0.48966813", "0.4846379", "0.48332292", "0.47872585", "0.47614285", "0.4730369", "0.4688939", "0.46878654", "0.4686576", "0.46853164", "0.46717748", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46702763", "0.46477583", "0.4647317", "0.46359822", "0.46182585", "0.46120134", "0.46009487", "0.4588683", "0.45782396", "0.45670387", "0.4560868", "0.45588943", "0.45314088", "0.45314088", "0.45314088", "0.4528621", "0.4497494", "0.44954574", "0.44906643", "0.44729897", "0.44638515", "0.44536167", "0.44470915", "0.44462863", "0.4439137", "0.44345197", "0.4430437", "0.4430437", "0.44138235", "0.44075698", "0.43987373", "0.43955192", "0.4393668", "0.4387969", "0.4387969", "0.4383427", "0.4378428", "0.4378088", "0.43719193", "0.4371834", "0.4357824", "0.4348067", "0.4346799", "0.43445748", "0.434141", "0.43394944", "0.43385705", "0.43383613", "0.43371785", "0.4332197", "0.43281603", "0.4320885", "0.4318598", "0.43122116", "0.43069988", "0.43060276", "0.42992052", "0.4297565", "0.42932442", "0.42929995", "0.4286276", "0.42859393", "0.42857093", "0.4268204", "0.42681924", "0.42662293", "0.42548558" ]
0.7507119
0
Create an instance of ManagePreferences by contact lookup key.
public ManagePreferences(Context context, String contactId, String contactLookupKey) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ManagePreferences(Context context, long rowId) {\n }", "public static MethodHandles.Lookup createLookup(Class<?> clazz, int mode)\n {\n return constructor.invokeWith(clazz, mode);\n }", "public static EcidContact doLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n// EcidContact cidContact = getEcidContact(number);\n// if (cidContact != null) {\n// if (DBG) Log.d(TAG, \"Skip look up, already done previously: ctx: \" + ctx + \" number: \" + number);\n// return cidContact;\n// }\n EcidContact cidContact = new EcidContact();\n cidContact.m_number = PhoneNumberUtils.stripSeparators(number);\n cidContact.implLookup(ctx, number, numberType != Calls.OUTGOING_TYPE, false);\n m_mapEcidContacts.put(cidContact.m_number, cidContact);\n if (DBG) Log.d(TAG, \"added cidContact \" + cidContact + \"for number: \" + cidContact.m_number);\n\n if (DBG) Log.d(TAG, \"look up completed: number: \" + number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "private ContactsEntry createContactsEntry(ContentResolver cr, Cursor cur) {\n\t\tString strNumber = \"\";\n\t\tString strLookupKey = \"\";\n\t\tString _ID = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));\n\t\tString strName = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\t\tif(Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\tString selection = new StringBuilder().append(ContactsContract.CommonDataKinds.Phone.CONTACT_ID).append(\" = ?\").toString();\n\t\t\tCursor pCur = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, selection, new String[] { _ID }, null);\n\n\t\t\twhile(pCur.moveToNext()) {\n\t\t\t\tstrNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\t}\n\n\t\t\tif(pCur != null) pCur.close();\n\t\t\tpCur = null;\n\t\t}\n\n\t\tstrLookupKey = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));\n\n\t\tContactsEntry entry = new ContactsEntry(strLookupKey, strNumber, strName);\n\n\t\treturn entry;\n\t}", "private LdapPersonalContactSearchBean getPersonalSearchBean(HttpServletRequest request) {\r\n\t\t// get the data from request\r\n\t\tint start = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_START), 0);\r\n\t\tint limit = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_LIMIT), this.getDefaultLimit());\r\n\t\tString keyword= getData(request, IContactInfoService.KEYWORD_PARAM);\r\n\t\t\r\n\t\t// get the token\r\n\t\tString token = null;\r\n\t\tif(start == 0) {\r\n\t\t\t// put data to cache again\r\n\t\t\tremoveDataFromCache(SEARCH_CACHE_KEY);\r\n\t\t} else {\r\n\t\t\t// get the tokens from cache\r\n\t\t\ttoken = getDataFromCache(SEARCH_CACHE_KEY, String.class);\r\n\t\t}\r\n\t\t\r\n\t\t// create the search bean\r\n\t\tLdapPersonalContactSearchBean searchBean = new LdapPersonalContactSearchBean(start, limit, token);\r\n\t\tsearchBean.setKey(keyword);\r\n\t\tsearchBean.setOwner(getUserName());\r\n\t\t\r\n\t\t// return the search bean.\r\n\t\treturn searchBean;\r\n\t}", "public PowerContactSettings () {\n }", "public Object lookupConfigurationEntry(String key);", "static public ConnectionCodeKeyDialog newInstance() {\n ConnectionCodeKeyDialog dialog = new ConnectionCodeKeyDialog();\n return dialog;\n }", "public Man(String Name, Map<Agent, Integer> preferences) {\n\t\tsuper(Name, preferences);\n\t\t\n\t}", "private ContactImpl createContactWithSupportedProperties(IVCardContactProperties contactProperties) throws MappingMissingException {\r\n ContactCreator contactCreator = new ContactCreator(this.contactTemplateModel, speedDialManager);\r\n ContactImpl createdContact = contactCreator.createContactWithProperties(contactProperties);\r\n \r\n return createdContact;\r\n }", "static KeyExtractor.Factory forSingleMember(Function<Class<?>, Member> keyLookupFn) {\n Objects.requireNonNull(keyLookupFn, \"keyLookupFn\");\n return entityType -> new KeyExtractors.SingleMember(entityType, keyLookupFn.apply(entityType));\n }", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "public static <K extends Key<K>> Converter<MBR<K>, Coordinate<K>> createSearchKeyCreator(\n final MBR<K> proto) {\n return new Converter<MBR<K>, Coordinate<K>>() {\n private final Coordinate<K> maxCoord = proto.getMax().getMaxKey();\n\n @Override\n public Coordinate<K> convert(MBR<K> mbr) {\n if (mbr == null)\n return maxCoord;\n // The min coordinate of the MBR is the search key\n return mbr.getMin();\n }\n };\n }", "public void privateSetPeopleKey(com.hps.july.persistence.PeopleKey inKey) {\n\tboolean people_NULLTEST = (inKey == null);\n\tif (people_NULLTEST) people_man = null; else people_man = (new Integer(inKey.man));\n}", "FutureSecureMap<KeyType, ValueType> create(String name);", "void setAuthInfoKey(Object key);", "public static EcidContact doCacheLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n EcidContact cidContact = getEcidContact(number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "public void assignContactFromPhone(String phoneNumber, boolean lazyLookup) {\n assignContactFromPhone(phoneNumber, lazyLookup, new Bundle());\n }", "private static void initMap(ConfigurationObject config, Map<Long, String> map, String propertyKey,\r\n String key) {\r\n if (propertyKey.startsWith(key)) {\r\n // Parse deliverable ID\r\n long deliverableId = Helper.parseLong(propertyKey.substring(key.length()),\r\n key + propertyKey, 1);\r\n\r\n // Get email subject/body template text for this deliverable ID\r\n // will always exist, not matter required or not\r\n String templateText = Helper.getPropertyValue(config, propertyKey, true, false);\r\n // Put (deliverable ID; subject/body template) pair to the map\r\n map.put(deliverableId, templateText);\r\n }\r\n }", "KeyManager createKeyManager();", "protected PropertyPreference(ExternalKey stakeholderKey, ExternalKey propertyKey,\n String namespace) {\n super(stakeholderKey, namespace);\n setPropertyKey(propertyKey);\n }", "private ChromeService create(final ChromeServiceKey key) {\n final ImmutableMap<String, String> env = ImmutableMap.of(\n ChromeLauncher.ENV_CHROME_PATH, key._path\n );\n // ^^^ In order to pass this environment in, we need to use a many-argument constructor,\n // which doesn't have obvious default values. So I stole the arguments from the fewer-argument constructor:\n // CHECKSTYLE.OFF: LineLength\n // https://github.com/kklisura/chrome-devtools-java-client/blob/master/cdt-java-client/src/main/java/com/github/kklisura/cdt/launch/ChromeLauncher.java#L105\n // CHECKSTYLE.ON: LineLength\n final ChromeLauncher launcher = new ChromeLauncher(\n new ProcessLauncherImpl(),\n env::get,\n new ChromeLauncher.RuntimeShutdownHookRegistry(),\n new ChromeLauncherConfiguration()\n );\n return launcher.launch(ChromeArguments.defaults(true)\n .additionalArguments(key._args)\n .build());\n }", "public static ContactEntry fromCursor(Cursor cursor, Context context) {\n int idColumnIndex = PhoneLoader.getIdColumnIndex(cursor);\n int starredColumn = cursor.getColumnIndex(ContactsContract.Contacts.STARRED);\n int pinnedColumn = cursor.getColumnIndex(\"pinned\");\n int displayNameColumnIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);\n int avatarUriColumnIndex = cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_URI);\n int avatarThumbnailColumnIndex = cursor.getColumnIndex(\n ContactsContract.Contacts.PHOTO_THUMBNAIL_URI);\n int lookupKeyColumnIndex = cursor.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY);\n int typeColumnIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DATA2);\n int labelColumnIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DATA3);\n\n String name = cursor.getString(displayNameColumnIndex);\n String number = PhoneLoader.getPhoneNumber(cursor, context.getContentResolver());\n int starred = cursor.getInt(starredColumn);\n int pinnedPosition = cursor.getInt(pinnedColumn);\n ContactEntry contactEntry = new ContactEntry(context, name, number, starred > 0,\n pinnedPosition);\n contactEntry.setId(cursor.getInt(idColumnIndex));\n contactEntry.setAvatarUri(cursor.getString(avatarUriColumnIndex));\n contactEntry.setAvatarThumbnailUri(cursor.getString(avatarThumbnailColumnIndex));\n contactEntry.setLookupKey(cursor.getString(lookupKeyColumnIndex));\n contactEntry.setType(cursor.getInt(typeColumnIndex));\n contactEntry.setLabel(cursor.getString(labelColumnIndex));\n return contactEntry;\n }", "public SearchAddressBookService(\r\n\t\t\tAccountManager<Account> accountManager,\r\n\t\t\tLdapMailDomainManager domainManager,\r\n\t\t\tLdapGlobalContactManager contactManager, \r\n\t\t\tLdapPersonalContactManager personalContactManager,\r\n\t\t\tILdapGroupManager groupManager,\r\n\t\t\tString category){\r\n\t\tsuper(accountManager) ;\r\n\t\t\r\n\t\tthis.domainManager = domainManager;\r\n\t\tthis.contactManager = contactManager;\r\n\t\tthis.personalContactManager = personalContactManager;\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.category = category;\r\n\t}", "public IPreferenceStore getPreferenceStore(String name);", "public static PhoneAccount getInstance(PhoneNumber phoneNumber, Person accountHolder, String type) {\n\t\tPhoneAccount pa = phoneAccounts.get(phoneNumber); \n\t\t\n\t\tif(pa != null) {\n\t\t\treturn pa; \n\t\t}\n\t\t\n\t\tif(type.equals(PAY_AS_YOU_GO)) {\n\t\t\tpa = new PayAsYouGoAccount(phoneNumber, accountHolder);\n\t\t\tLOG.info(\"Pay as you go account created\");\n\t\t} else if(type.equals(UNLIMITED)) {\n\t\t\tpa = new UnlimitedAccount(phoneNumber, accountHolder);\n\t\t\tLOG.info(\"Unlimited account created\");\n\t\t} else {\n\t\t\tLOG.warning(\"Invalid phone account type: \" + type);\n\t\t\tthrow new IllegalArgumentException(\"Invalid Phone Account type: \" + type);\n\t\t}\n\t\t\n\t\tphoneAccounts.put(phoneNumber, pa);\n\t\treturn pa;\n\t}", "public static GridOrigin loadPrefGridOrigin(Preferences pref, String key, String def) {\n String res = pref.get(key, def);\n\n GridOrigin origin = null;\n\n try {\n origin = GridOrigin.valueOf(res.toUpperCase());\n } catch (IllegalArgumentException e) {\n }\n\n if (origin == null) {\n Log.msg(LogType.MANDATORY, \"Error parsing preferences: \" + key + \" must be valid GridOrigin\");\n origin = GridOrigin.UL;\n }\n\n return origin;\n\n }", "public PreferenceBean createPreferenceBean()\n {\n return new PreferenceBean();\n }", "public static PreferencesView createPreferencesView() {\n // Retrieve application preferences and attach them to their view\n // (This instance must be instanciated after dependencies)\n final LinkedHashMap<String, JPanel> panels = new LinkedHashMap<String, JPanel>(2);\n panels.put(\"General settings\", new PreferencePanel());\n\n final PreferencesView preferencesView = new PreferencesView(getFrame(), Preferences.getInstance(), panels);\n preferencesView.init();\n\n return preferencesView;\n }", "void createPropertyKeyToken( String key, int id );", "public static IntegerPreference create(String category, String key, String name, String desc, Integer defaultValue)\n\t{\n\t\treturn new IntegerPreference(category,key,name,desc,defaultValue,true);\n\t}", "public String getPrefContactId() {\n return getContact().getUid();\n }", "@Override\n\tpublic UserPreferences newInstance() {\n\t\treturn new UserPreferences();\n\t}", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "public Settings(String accountName, boolean createEntry) {\n this.accountSettings = accountName;\n if (createEntry) {\n ACCOUNT_SETTINGS_DB.createOrUpdate(this);\n }\n }", "public String getLookupKey() {\n return queryLookupKey(contactId);\n }", "private HpcSystemAccountLocator() {}", "private ContactManager() {\n }", "public <T> DependencyManager getWith(TypedKey<T> key, T value)\n\t{\n\t\tDependencyManager replacement = new DependencyManager(map);\n\t\treplacement.map.put(Objects.requireNonNull(key), value);\n\t\treturn replacement;\n\t}", "String getLookupKey();", "protected ManagedConnectionPool getManagedConnectionPool(Object key, Subject subject, ConnectionRequestInfo cri)\n throws ResourceException\n {\n try\n {\n ManagedConnectionPool mcp = mcpPools.get(key);\n if (mcp == null)\n {\n ManagedConnectionPoolFactory mcpf = new ManagedConnectionPoolFactory();\n ManagedConnectionPool newMcp = mcpf.create(mcf, clf, subject, cri, poolConfiguration, this);\n\n mcp = mcpPools.putIfAbsent(key, newMcp);\n if (mcp == null)\n {\n mcp = newMcp;\n initLock();\n }\n }\n\n return mcp;\n }\n catch (Throwable t)\n {\n throw new ResourceException(bundle.unableGetManagedConnectionPool(), t);\n }\n }", "void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey inKey) throws java.rmi.RemoteException;", "private LookupUtil(){}", "Company getOrCreateCompanyId(String companyID) throws Exception;", "QueryKey createQueryKey(String name);", "public static ContactEditorFragment newInstance(String lookupUri) {\n ContactEditorFragment fragment = new ContactEditorFragment();\n Bundle args = new Bundle();\n args.putString(ARG_CONTACT_LOOKUP_URI, lookupUri);\n fragment.setArguments(args);\n return fragment;\n }", "private SharedPreferencesManager(){}", "private LdapContactSearchBean getSearchBean(HttpServletRequest request) {\r\n\t\t// get the data from request\r\n\t\tint start = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_START), 0);\r\n\t\tint limit = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_LIMIT), this.getDefaultLimit());\r\n\t\tString keyword= getData(request, IContactInfoService.KEYWORD_PARAM);\r\n\t\tString domain = getData(request, IContactInfoService.GROUP_PARAM);\r\n\t\t\r\n\t\t// get the token\r\n\t\tString token = null;\r\n\t\tif(start == 0) {\r\n\t\t\t// put data to cache again\r\n\t\t\tremoveDataFromCache(SEARCH_CACHE_KEY);\r\n\t\t} else {\r\n\t\t\t// get the tokens from cache\r\n\t\t\ttoken = getDataFromCache(SEARCH_CACHE_KEY, String.class);\r\n\t\t}\r\n\t\t\r\n\t\t// create the search bean\r\n\t\tLdapContactSearchBean searchBean = new LdapContactSearchBean(start, limit, token);\r\n\t\tsearchBean.setKey(keyword);\r\n\t\tif(DOMAIN.equals(this.category)) {\r\n\t\t this.getCode();\r\n\t\t searchBean.setDomainName(domain); \r\n\t\t}else if(GROUP.equals(this.category)) {\r\n\t\t searchBean.setDomainName(getDomain());\r\n\t\t searchBean.setDepartment(domain);\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t// return the search bean.\r\n\t\treturn searchBean;\r\n\t}", "Contact createUnresolvedContact(String address, String persistentData, ContactGroup parentGroup);", "public SettingsPreferenceStore(Settings base){\n\t\tthis.base = base;\n\t}", "public MapsAccountProperties() {\n }", "public HLCContactDetails() {\n }", "protected abstract String getHintGivenSharedPreferencesKey();", "private Intent createSettingsIntent() {\n final String fragmentName;\n final Bundle fragmentArguments;\n if (ChromeFeatureList.isEnabled(ChromeFeatureList.UNIFIED_CONSENT)) {\n fragmentName = SyncAndServicesPreferences.class.getName();\n fragmentArguments = SyncAndServicesPreferences.createArguments(false);\n } else {\n fragmentName = AccountManagementFragment.class.getName();\n fragmentArguments = null;\n }\n return PreferencesLauncher.createIntentForSettingsPage(\n ContextUtils.getApplicationContext(), fragmentName, fragmentArguments);\n }", "UserSettings getOrCreateByUser();", "public PreferenceManager(String prefFileName) {\n\t\tthis(prefFileName, null);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"[onActivityResult]mAddPosition:\" + mAddPosition);\n mIsWaitingActivityResult = false;\n if (REQUEST_CODE_PICK_CONTACT != requestCode || RESULT_OK != resultCode || data == null) {\n mAddPosition = -1;\n return;\n }\n String dataIndex = data.getData().getLastPathSegment(); \n String number = \"\";\n Cursor cursor = this.getContentResolver().query(Data.CONTENT_URI, new String[]{Data._ID, Data.DATA1}, \"Data._ID\"+\" = \"+dataIndex, null, null);\n if(cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n number = cursor.getString(1);\n }else{\n if(cursor != null) cursor.close();\n mAddPosition = -1;\n return;\n }\n cursor.close();\n /*\n * Bug Fix by Mediatek Begin.\n * Original Android¡¯s code:\n * xxx\n * CR ID: ALPS00111767\n * Descriptions: ¡­\n */\n\t\t\n Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n Log.i(TAG, \"onActivityResult(), uri = \" + uri);\n Cursor simIdCursor = this.getContentResolver().query(uri, new String[]{PhoneLookup._ID, PhoneLookup.INDICATE_PHONE_SIM, }, null, null, null);\n int simId = -1;\n simIdCursor.moveToFirst();\n if (simIdCursor != null && simIdCursor.getCount() > 0) {\n if(!simIdCursor.isNull(1))\n simId = simIdCursor.getInt(1);\n }\n simIdCursor.close();\t\n// int simId = data.getIntExtra(\"simId\", -1);\n /*\n * Bug Fix by Mediatek End.\n */\n\n getPrefStatus();\n mHasGotPref = true;\n int tempKey = findKeyByNumber(number);\n Log.d(TAG, \"onActivityResult(), after findKeyByNumber(), tempKey=\" + tempKey);\n if (SpeedDialManageActivity.SPEED_DIAL_MIN > tempKey) {\n mPrefNumState[mAddPosition + 1] = number;\n mPrefMarkState[mAddPosition + 1] = simId;\n mHasNumberByKey = false;\n } else {\n mHasNumberByKey = true;\n }\n Log.i(TAG, \"onActivityResult: number = \" + number + \", simId = \" + simId);\n for (int i = 0; i < mPrefNumState.length; ++i) {\n Log.i(TAG, \"mPrefNumState[\" + i + \"] = \" + mPrefNumState[i] + \", mPrefMarkState[\" + i\n + \"]\" + mPrefMarkState[i]);\n }\n }", "private SearchRegistryCriteria createCriteria(Map criteriaMap)\n {\n SearchRegistryCriteria criteria = new SearchRegistryCriteria();\n\n Object[] keys = criteriaMap.keySet().toArray();\n for (int i=0; i<keys.length; i++)\n {\n Logger.debug(\n \"[SubmitRegistrySearchAction.createCriteria] Setting field \"+keys[i] +\n \" to \"+criteriaMap.get(keys[i]));\n criteria.setFieldValue((Number)keys[i], criteriaMap.get(keys[i]));\n }\n\n return criteria;\n }", "static InitKey toKey(final String key) throws ManagementException {\n\t\t\ttry {\n\t\t\t\treturn valueOf(key.toUpperCase());\n\t\t\t} catch (final IllegalArgumentException e) {\n\t\t\t\tthrow new ManagementException(key + \" is not a valid key for the Tic-Tac-Toe environment\", e);\n\t\t\t}\n\t\t}", "public XmlParserPref(Context cont, String name) {\n\t\tcontext = cont;\n\t\tprefEdit = PreferenceManager.getDefaultSharedPreferences(context).edit();\n\t\tprofileName = name;\n\t}", "protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }", "public PreferenceManager(String prefFileName, Map<String, Object> defaults) {\n\t\tthis.prefFileName = prefFileName;\n\t\tthis.defaults = defaults;\n\t\tinternal = new Properties();\n\t}", "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 }", "public void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetOrganizationKey(arg0);\n }", "private void initVoiceMailProviders() {\n String providerToIgnore = null;\n if (getIntent().getAction().equals(ACTION_ADD_VOICEMAIL)) {\n providerToIgnore = getIntent().getStringExtra(IGNORE_PROVIDER_EXTRA);\n }\n \n mVMProvidersData.clear();\n \n // Stick the default element which is always there\n final String myCarrier = getString(R.string.voicemail_default);\n mVMProvidersData.put(\"\", new VoiceMailProvider(myCarrier, null));\n \n // Enumerate providers\n PackageManager pm = getPackageManager();\n Intent intent = new Intent();\n intent.setAction(ACTION_CONFIGURE_VOICEMAIL);\n List<ResolveInfo> resolveInfos = pm.queryIntentActivities(intent, 0);\n int len = resolveInfos.size() + 1; // +1 for the default choice we will insert.\n \n // Go through the list of discovered providers populating the data map\n // skip the provider we were instructed to ignore if there was one\n for (int i = 0; i < resolveInfos.size(); i++) {\n final ResolveInfo ri= resolveInfos.get(i);\n final ActivityInfo currentActivityInfo = ri.activityInfo;\n final String key = makeKeyForActivity(currentActivityInfo);\n if (key.equals(providerToIgnore)) {\n len--;\n continue;\n }\n final String nameForDisplay = ri.loadLabel(pm).toString();\n Intent providerIntent = new Intent();\n providerIntent.setAction(ACTION_CONFIGURE_VOICEMAIL);\n providerIntent.setClassName(currentActivityInfo.packageName,\n currentActivityInfo.name);\n mVMProvidersData.put(\n key,\n new VoiceMailProvider(nameForDisplay, providerIntent));\n \n }\n \n // Now we know which providers to display - create entries and values array for\n // the list preference\n String [] entries = new String [len];\n String [] values = new String [len];\n entries[0] = myCarrier;\n values[0] = \"\";\n int entryIdx = 1;\n for (int i = 0; i < resolveInfos.size(); i++) {\n final String key = makeKeyForActivity(resolveInfos.get(i).activityInfo);\n if (!mVMProvidersData.containsKey(key)) {\n continue;\n }\n entries[entryIdx] = mVMProvidersData.get(key).name;\n values[entryIdx] = key;\n entryIdx++;\n }\n \n mVoicemailProviders.setEntries(entries);\n mVoicemailProviders.setEntryValues(values);\n \n updateVMPreferenceWidgets(mVoicemailProviders.getValue());\n \n mPerProviderSavedVMNumbers =\n this.getApplicationContext().getSharedPreferences(\n VM_NUMBERS_SHARED_PREFERENCES_NAME, MODE_PRIVATE);\n }", "public static void setDetailsFromSpid(final Context ctx, final Account account)\r\n {\r\n try\r\n {\r\n final Home home = (Home) ctx.get(CRMSpidHome.class);\r\n final CRMSpid spid = (CRMSpid) home.find(ctx, Integer.valueOf(account.getSpid()));\r\n\r\n if (spid != null)\r\n {\r\n if (spid.getBillCycle()!= CRMSpid.DEFAULT_BILLCYCLE)\r\n {\r\n account.setBillCycleID(spid.getBillCycle());\r\n }\r\n \r\n if (spid.getTaxAuthority()!= CRMSpid.DEFAULT_TAXAUTHORITY)\r\n {\r\n account.setTaxAuthority(spid.getTaxAuthority());\r\n }\r\n\r\n if (spid.getDealer()!= CRMSpid.DEFAULT_DEALER)\r\n {\r\n account.setDealerCode(spid.getDealer());\r\n }\r\n \r\n if (spid.getDefaultCreditCategory()!= CRMSpid.DEFAULT_DEFAULTCREDITCATEGORY)\r\n {\r\n account.setCreditCategory(spid.getDefaultCreditCategory());\r\n }\r\n\r\n if (spid.getCurrency()!= CRMSpid.DEFAULT_CURRENCY)\r\n {\r\n account.setCurrency(spid.getCurrency());\r\n }\r\n }\r\n else\r\n {\r\n new MinorLogMsg(SubscriberFactory.class,\r\n \"Unable to determine default parameters. No SPID found with identifier \" + account.getSpid(),\r\n null).log(ctx);\r\n }\r\n }\r\n catch (HomeException exception)\r\n {\r\n new MinorLogMsg(SubscriberFactory.class, \"Unable to determine default billing option.\", exception).log(ctx);\r\n }\r\n }", "public static PersonalCloud open(XDI3Segment cloudNameOrCloudNumber, XDI3Segment senderCN,\r\n \t\t\tXDI3Segment linkContractAddress, String regURI) {\n \t\tPersonalCloud pc = new PersonalCloud();\r\n \t\tXDIHttpClient httpClient = null;\r\n \t\tif (regURI != null && regURI.length() > 0) {\r\n \t\t\thttpClient = new XDIHttpClient(regURI);\r\n \t\t\tpc.registryURI = regURI;\r\n \t\t} else {\r\n \t\t\thttpClient = new XDIHttpClient(DEFAULT_REGISTRY_URI);\r\n \t\t\tpc.registryURI = DEFAULT_REGISTRY_URI;\r\n \t\t}\r\n \t\tXDIDiscovery discovery = new XDIDiscovery();\r\n \t\tdiscovery.setRegistryXdiClient(httpClient);\r\n \t\ttry {\r\n \t\t\tXDIDiscoveryResult discoveryResult = discovery\r\n \t\t\t\t\t.discoverFromXri(cloudNameOrCloudNumber);\r\n \t\t\tpc.cloudNumber = discoveryResult.getCloudNumber();\r\n \t\t\tpc.cloudEndpointURI = discoveryResult.getEndpointUri();\r\n \t\t} catch (Xdi2ClientException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t\treturn null;\r\n \t\t}\r\n \r\n \t\tpc.linkContractAddress = linkContractAddress;\r\n \t\tpc.senderCloudNumber = senderCN;\r\n \t\tSystem.out.println(pc.toString());\r\n \t\t//pc.getProfileInfo();\r\n \t\treturn pc;\r\n \t}", "public ContactManager() {\n\t\tthis.contacts = new HashMap<>();\n\n\t\tgenerateDirectories();\n\t\tloadContacts();\n\t}", "private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}", "public WeakKeyFactory(Class<?> holder, boolean propertyCamelCase) {\n super(holder, propertyCamelCase, null);\n }", "public static WSCustomerContact createWSCustomerContact() {\n\t\t// Contact info\n\t\tWSCustomerContact contact = null;\n\t\tString contactType = BackOfficeGlobals.BACKOFFICE_CONTACT_TYPE_PRIMARY;\n\t\tString emailName = BackOfficeUtils.generateRandomString(BackOfficeGlobals.BACKOFFICE_DEFAULT_EMAIL_NAME_LENGTH);\n\t\tString email = emailName + BackOfficeGlobals.BACKOFFICE_DEFAULT_EMAIL_ADDRESS_PROVIDER;\n\t\tString dateOfBirth = BackOfficeGlobals.BACKOFFICE_CUSTOMER_BIRTHDATE_ZULU;\n\t\tString username = email;\n\t\tString password = BackOfficeGlobals.BACKOFFICE_CUSTOMER_PASSWORD;\n\t\tWSAddress address = null;\n\t\tList<WSPhone> phone = null;\n\t\tWSName name = null;\n\t\tString pin = BackOfficeGlobals.BACKOFFICE_CUSTOMER_PIN;\n\t\tList<WSSecurityQA> securityQAs = null;\n\t\tWSPersonalIdentifier personalIdentifierInfo = null;\n\t\tString addressId = null;\t\t\t\t\t\t\t\t// If address Object present this must be null and vice-versa\n\t\t\n\t\t// WSAddress fields\n\t\tString address1 = BackOfficeGlobals.BACKOFFICE_CUSTOMER_ADDRESS1;\n\t\tString address2 = BackOfficeGlobals.BACKOFFICE_CUSTOMER_ADDRESS2;\n\t\tString address3 = BackOfficeGlobals.BACKOFFICE_CUSTOMER_ADDRESS3;\n\t\tString city = BackOfficeGlobals.BACKOFFICE_CUSTOMER_CITY;\n\t\tString state = BackOfficeGlobals.BACKOFFICE_CUSTOMER_STATE;\n\t\tString postalCode = BackOfficeGlobals.BACKOFFICE_CUSTOMER_POSTAL_CODE;\n\t\tString country = BackOfficeGlobals.BACKOFFICE_CUSTOMER_COUNTRY;\n\n\t\t// Personal identifier\n\t\tpersonalIdentifierInfo = new WSPersonalIdentifier(emailName, BackOfficeGlobals.BACKOFFICE_PERSONAL_ID_TYPE_DRIVERS_LICENSE);\n\t\t\t\t\n\t\tLOG.info(\"##### Creating Generic WSCustomerContactInfo\");\n\t\t\n\t\t// WSPhone fields\n\t\tWSPhone phone1 = new WSPhone(BackOfficeGlobals.BACKOFFICE_CUSTOMER_PHONE_NUMBER, BackOfficeGlobals.BACKOFFICE_PHONE_TYPE_MOBILE, country);\n\t\tphone = Arrays.asList(phone1);\n\t\t\n\t\t// WSSecurityQA fields are Optional\n\n\t\t// Create WSAddress\n\t\taddress = new WSAddress(address1, address2, address3, city, state, postalCode, country);\n\t\t\n\t\t// Create WSName (use the randomly generated email \"name\" as First and Last Name. Suffix and Title optional)\n\t\tname = new WSName(emailName, emailName, \"\", \"\");\n\t\t\n\t\t// Create WSCustomerContact\n\t\tcontact = new WSCustomerContact(contactType, name, address, addressId, phone, email, dateOfBirth, personalIdentifierInfo, username, password, pin, securityQAs);\n\n\t\treturn contact;\n\t}", "public ContactInfo() {\n\n }", "private PreferencesModule() {\n }", "String getSettingByKey(HawkularUser user, String key);", "public IAuthorizationPrincipal newPrincipal(String key, Class type);", "public <T> EntityViewSetting<T, CriteriaBuilder<T>> createSetting(Class<T> entityViewClass, DataFetchingEnvironment dataFetchingEnvironment, String elementRoot) {\n KeysetPage keysetPage = extractKeysetPage(dataFetchingEnvironment);\n Integer pageSize = null;\n Integer offset = null;\n Integer last = null;\n if (keysetPage != null) {\n pageSize = dataFetchingEnvironment.getArgument(pageSizeName);\n offset = dataFetchingEnvironment.getArgument(offsetName);\n last = dataFetchingEnvironment.getArgument(RELAY_LAST_NAME);\n }\n return createSetting(entityViewClass, dataFetchingEnvironment, elementRoot, keysetPage, pageSize, last, offset);\n }", "protected void createLookupCache() {\n }", "Object getPreference(String prefKey, Object defaultValue);", "private ContactSettingsProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\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}", "public static Module getModule(String key) {\r\n Module module = null;\r\n module = (Module) SET.get(key);\r\n module.setSymbol(key);\r\n return module;\r\n }", "kr.pik.message.Profile.Contact getContact();", "public static UserPrefernce getInstance(){\r\n\t\tif(mInstance == null){\r\n\t\t\tmInstance = new UserPrefernce();\r\n\t\t}\r\n\t\treturn mInstance;\r\n\t}", "String getSettingByKey(String key);", "PMSManage getPMSManage();", "Observable<QueryKey> createQueryKeyAsync(String name);", "public static FoundObject create(String number) {\n\t\treturn getPersistence().create(number);\n\t}", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_NAME = \"wallet_name\";\r\n String TRANSACTION_WALLET_ADDRESS = \"transaction_wallet_address\";\r\n String WALLET_POSITION =\"wallet_position\";\r\n String CALL_TRANSACTION_STATUS = \"call_transaction_status\";\r\n String CALL_INCOMING = \"call_incoming\";\r\n String CALL_OUTGOING = \"call_outgoing\";\r\n}", "public BaseItem fromSettings(@Nullable SharedPreferences prefs) {\n\t\tBaseItem defaultItem = getDefault();\n\n\t\t// If we don't have options, return default Item\n\t\tif (prefs == null) {\n\t\t\treturn defaultItem;\n\t\t}\n\n\t\t// NOTE: optimization is to cache this value (e.g. in static attribute of child object - or in some extra object with all settings), and update it automatically when settings is changed...\n\t\tString id = prefs.getString(getPersistenceKey(), String.valueOf(defaultItem.getId()));\n\t\treturn getItemById(Utils.parseIntSafely(id, defaultItem.getId()));\n\t}", "public void setHC_ManagerTo_ID (int HC_ManagerTo_ID);", "public static MethodHandles.Lookup createPrivateLookup(Class<?> clazz)\n {\n return constructor.invokeWith(clazz, MethodHandles.Lookup.PRIVATE);\n }", "static KeyExtractor.Factory forMultipleMembers(Function<Class<?>, List<Member>> keyLookupFn) {\n Objects.requireNonNull(keyLookupFn, \"keyLookupFn\");\n return entityType -> new KeyExtractors.MultipleMembers(entityType, keyLookupFn.apply(entityType));\n }", "public static Lookup createLookup(ObjectDefinition objectDefinition) {\r\n\t\tLookup l = new Lookup(objectDefinition);\r\n\t\treturn l;\r\n\r\n\t}", "private void initComponent() {\n\n mEdit = (EditText) findViewById(R.id.edit_key);\n }", "UserSettings getOrCreateByUser(HawkularUser user);", "public FetchDataFindKey(SplashFindTheKey splashFindTheKey)\n {\n this.splashFindTheKey = splashFindTheKey;\n id = \"1\";\n }", "public ProfileKey createProfileKey(ProfileKey key)\n throws DuplicateProfileKeyException, ProfileKeyManagerPersistenceException {\n ParameterHelpers.checkParameter(key, \"profile key\");\n\n String type = key.getType();\n String username = key.getUsername();\n\n boolean isRegistered = checkType(type);\n\n // if a validator is configured, validate the key\n ObjectValidator validator = getValidator();\n if (validator != null) {\n String message = validator.getMessage(key);\n if (message != null) {\n throw new ProfileKeyValidationException(message);\n }\n }\n\n Connection connection = getConnection();\n\n try {\n try {\n // check to see if the user already exists\n PreparedStatement statement =\n connection.prepareStatement(\"SELECT username FROM all_user WHERE username = ? AND \"\n + \"registered_flag = ?\");\n\n try {\n statement.setString(1, username);\n statement.setString(2, (isRegistered ? \"Y\" : \"N\"));\n\n ResultSet results = statement.executeQuery();\n try {\n if (results.next()) {\n throw new DuplicateProfileKeyException(\"key for '\" + username + \"' already exists\");\n }\n } finally {\n closeResults(results);\n }\n } finally {\n closeStatement(statement);\n }\n\n // generate a new user ID\n long id;\n try {\n id = getGenerator().getNextID();\n } catch (IDGenerationException ex) {\n throw new ProfileKeyManagerPersistenceException(\"error creating ID: \" + ex.getMessage(), ex);\n }\n\n if (!isRegistered) {\n username = String.valueOf(id);\n }\n\n // insert the profile\n insertProfile(connection, username, id, isRegistered);\n\n return new ProfileKey(id, username, type);\n } catch (SQLException ex) {\n throw new ProfileKeyManagerPersistenceException(\"SQL error: \" + ex.getMessage(), ex);\n }\n } finally {\n closeConnection(connection);\n }\n }", "public BookEntry getEntry(Person key) {\n\t\treturn phoneBook.get(key);\n\t}" ]
[ "0.458045", "0.4567375", "0.4560135", "0.44616866", "0.44444847", "0.44138", "0.4385253", "0.43416542", "0.43148687", "0.43063527", "0.4298246", "0.42758608", "0.42534918", "0.42495355", "0.4199497", "0.4197741", "0.41877964", "0.41729096", "0.4168091", "0.41643208", "0.41581905", "0.4141271", "0.41404277", "0.41170096", "0.41115877", "0.4095828", "0.40717977", "0.40585706", "0.40549824", "0.40516105", "0.4047585", "0.40472466", "0.40464997", "0.4036595", "0.40286976", "0.40202653", "0.4018752", "0.40168208", "0.4010106", "0.40100127", "0.4008381", "0.40076098", "0.39939436", "0.39825106", "0.39611027", "0.39608538", "0.39581507", "0.3955799", "0.39524195", "0.39464986", "0.3943613", "0.39336473", "0.3931975", "0.39185226", "0.3914458", "0.39122006", "0.3910965", "0.39043662", "0.38979456", "0.38970888", "0.3894649", "0.38850483", "0.387326", "0.38708144", "0.38701418", "0.38701224", "0.38633776", "0.38625255", "0.38592333", "0.38590038", "0.38563827", "0.3855236", "0.38538143", "0.38506427", "0.38495672", "0.38478774", "0.38437855", "0.38437608", "0.3841973", "0.38402024", "0.38395926", "0.38382676", "0.3837859", "0.38377514", "0.3835944", "0.3831697", "0.38309285", "0.38285697", "0.38269332", "0.38237354", "0.38222775", "0.3817998", "0.38176996", "0.3817254", "0.38127536", "0.3811393", "0.38069743", "0.38034377", "0.3800845", "0.37998846" ]
0.77653706
0
The entire line below reserved word and following expression is a statement:
public static void main(String[] args) { int myVariable = 50; // Basically, any complete "phrase" in Java -- ending with a semicolon -- is a statement. myVariable++; System.out.println("This is a statement too."); if(myVariable < 100) System.out.println("This entire two-line grouping is another statement."); // Multiple statements can be written on the same line, though it is not considered good form: int thisVar = 5; String thatVar = "Nasty hobbitses..."; System.out.println(thatVar); // Whitespace is (generally) ignored in Java. Whether you have 1 space or 5000 spaces, // Java doesn't care. What it does care about is separating things like keywords and // labels -- for the most part, there must be at least one space between alphanumeric // entities. int theOtherVar=99; // Legal int anotherVar = 100; // Legal intyetAnotherVar=101; // Not legal, space needed between 'int' & variable name // Again, generally speaking, spaces are optional between operands and operators. int firstNum=(234+567); // Legal int secondNum = ( 890 + 123 ); // Legal // Indentation is something that you use to make your code more readable, and assist others // in deciphering the flow of the program. Review your company's style guide or coding // standards and ensure that you are following procedures. // Most IDE's do the indentation for you, and there are "reformat" options in the IDE's // themselves to set things straight if you mess up. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo44053a() {\n }", "public void mo9233aH() {\n }", "public void m23075a() {\n }", "public void mo23813b() {\n }", "private void m50366E() {\n }", "public void mo21792Q() {\n }", "public void mo2740a() {\n }", "public void mo12930a() {\n }", "public void mo38117a() {\n }", "public void mo23438b() {\n }", "public void mo56167c() {\n }", "public void mo3749d() {\n }", "public void method_4270() {}", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}", "public void mo21787L() {\n }", "public void mo1403c() {\n }", "public void mo21779D() {\n }", "public void mo6944a() {\n }", "public void mo115190b() {\n }", "void m1864a() {\r\n }", "public void mo97908d() {\n }", "public void a(eq ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public int k() {\r\n/* 55 */ return 9;\r\n/* */ }", "public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }", "public void mo21789N() {\n }", "public void mo9137b() {\n }", "public void mo21793R() {\n }", "public void mo115188a() {\n }", "public void mo1531a() {\n }", "@Test void testCaseExpressionDialect1() {\n sql(\"case x when 2, 4 then 3 ^when^ then 5 else 4 end\")\n .fails(\"(?s)Encountered \\\"when then\\\" at .*\");\n }", "public void mo3376r() {\n }", "public String getStatement();", "public final void mo91715d() {\n }", "public void mo3370l() {\n }", "private void yy() {\n\n\t}", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "public void b(gy ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public void a(gy ☃) {}", "public interface StatementHandler {\n public void statement(String subject, String property, String object,\n boolean literal);\n}", "public void mo21782G() {\n }", "public aql k()\r\n/* 114: */ {\r\n/* 115:126 */ return aql.b;\r\n/* 116: */ }", "protected void syntaxError(String line) {\n\t\tthrow new RuntimeException(\"Syntax error: \" + line);\n\t}", "public void mo21794S() {\n }", "public void mo8738a() {\n }", "public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }", "public void mo5248a() {\n }", "public final void mo51373a() {\n }", "public void mo1405e() {\n }", "public void mo55254a() {\n }", "public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }", "public void mo97906c() {\n }", "public void mo21780E() {\n }", "public void mo21825b() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo21785J() {\n }", "public void mo21791P() {\n }", "public static void main(String[] ignore)\r\n/* 129: */ {\r\n/* 130:124 */ Mark.say(\r\n/* 131:125 */ new Object[] { conditionName(\"Tragedy_of_Macbeth's\") });\r\n/* 132: */ }", "public void mo12628c() {\n }", "public SyntaxWarningRule() {\n super(KEY);\n }", "public void skystonePos4() {\n }", "public void mo5097b() {\n }", "public void mo5099c() {\n }", "private void parseStatement() {\n switch (nextToken.kind) {\n case Token.IDENT:\n parseSimpleStatement();\n break;\n case Token.IF:\n parseIfStatement();\n break;\n case Token.WHILE:\n parseWhileStatement();\n break;\n case Token.RETURN:\n parseReturnStatement();\n break;\n case Token.READ:\n parseReadStatement();\n break;\n case Token.PRINT:\n parsePrintStatement();\n break;\n case Token.LBRACE:\n parseBlock();\n break;\n case Token.SEMICOLON:\n check(Token.SEMICOLON);\n break;\n default:\n error(\"Illegal start of statement: \" + nextToken.kind);\n }\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 }", "private void level7() {\n }", "private PsiScriptNameExpression(int lineNumber) {\n super(lineNumber);\n }", "final public Token IdentifierOrReserved() throws ParseException {\n /*@bgen(jjtree) IdentifierOrReserved */\n SimpleNode jjtn000 = new SimpleNode(JJTIDENTIFIERORRESERVED);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);Token t1;\n log.trace(\"Entering IdentifierOrReserved\");\n try {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case DEFINE:\n t1 = jj_consume_token(DEFINE);\n break;\n case LOAD:\n t1 = jj_consume_token(LOAD);\n break;\n case FILTER:\n t1 = jj_consume_token(FILTER);\n break;\n case FOREACH:\n t1 = jj_consume_token(FOREACH);\n break;\n case MATCHES:\n t1 = jj_consume_token(MATCHES);\n break;\n case ORDER:\n t1 = jj_consume_token(ORDER);\n break;\n case ARRANGE:\n t1 = jj_consume_token(ARRANGE);\n break;\n case DISTINCT:\n t1 = jj_consume_token(DISTINCT);\n break;\n case COGROUP:\n t1 = jj_consume_token(COGROUP);\n break;\n case JOIN:\n t1 = jj_consume_token(JOIN);\n break;\n case CROSS:\n t1 = jj_consume_token(CROSS);\n break;\n case UNION:\n t1 = jj_consume_token(UNION);\n break;\n case SPLIT:\n t1 = jj_consume_token(SPLIT);\n break;\n case INTO:\n t1 = jj_consume_token(INTO);\n break;\n case IF:\n t1 = jj_consume_token(IF);\n break;\n case ALL:\n t1 = jj_consume_token(ALL);\n break;\n case ANY:\n t1 = jj_consume_token(ANY);\n break;\n case AS:\n t1 = jj_consume_token(AS);\n break;\n case BY:\n t1 = jj_consume_token(BY);\n break;\n case USING:\n t1 = jj_consume_token(USING);\n break;\n case INNER:\n t1 = jj_consume_token(INNER);\n break;\n case OUTER:\n t1 = jj_consume_token(OUTER);\n break;\n case PARALLEL:\n t1 = jj_consume_token(PARALLEL);\n break;\n case GROUP:\n t1 = jj_consume_token(GROUP);\n break;\n case AND:\n t1 = jj_consume_token(AND);\n break;\n case OR:\n t1 = jj_consume_token(OR);\n break;\n case NOT:\n t1 = jj_consume_token(NOT);\n break;\n case GENERATE:\n t1 = jj_consume_token(GENERATE);\n break;\n case FLATTEN:\n t1 = jj_consume_token(FLATTEN);\n break;\n case EVAL:\n t1 = jj_consume_token(EVAL);\n break;\n case ASC:\n t1 = jj_consume_token(ASC);\n break;\n case DESC:\n t1 = jj_consume_token(DESC);\n break;\n case INT:\n t1 = jj_consume_token(INT);\n break;\n case LONG:\n t1 = jj_consume_token(LONG);\n break;\n case FLOAT:\n t1 = jj_consume_token(FLOAT);\n break;\n case DOUBLE:\n t1 = jj_consume_token(DOUBLE);\n break;\n case CHARARRAY:\n t1 = jj_consume_token(CHARARRAY);\n break;\n case BYTEARRAY:\n t1 = jj_consume_token(BYTEARRAY);\n break;\n case BAG:\n t1 = jj_consume_token(BAG);\n break;\n case TUPLE:\n t1 = jj_consume_token(TUPLE);\n break;\n case MAP:\n t1 = jj_consume_token(MAP);\n break;\n case IS:\n t1 = jj_consume_token(IS);\n break;\n case NULL:\n t1 = jj_consume_token(NULL);\n break;\n case STREAM:\n t1 = jj_consume_token(STREAM);\n break;\n case THROUGH:\n t1 = jj_consume_token(THROUGH);\n break;\n case STORE:\n t1 = jj_consume_token(STORE);\n break;\n case SHIP:\n t1 = jj_consume_token(SHIP);\n break;\n case CACHE:\n t1 = jj_consume_token(CACHE);\n break;\n case INPUT:\n t1 = jj_consume_token(INPUT);\n break;\n case OUTPUT:\n t1 = jj_consume_token(OUTPUT);\n break;\n case ERROR:\n t1 = jj_consume_token(ERROR);\n break;\n case STDIN:\n t1 = jj_consume_token(STDIN);\n break;\n case STDOUT:\n t1 = jj_consume_token(STDOUT);\n break;\n case LIMIT:\n t1 = jj_consume_token(LIMIT);\n break;\n case SAMPLE:\n t1 = jj_consume_token(SAMPLE);\n break;\n case IDENTIFIER:\n t1 = jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[7] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n {if (true) return t1;}\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n throw new Error(\"Missing return statement in function\");\n }", "public void mo21878t() {\n }", "public int captureCodeFragment03(int x) {\r\n return x + 1;\r\n }", "public void mo2471e() {\n }", "public void mo21795T() {\n }", "@Override\n public String visit(ExpressionStmt n, Object arg) {\n return null;\n }", "public void mo21783H() {\n }", "@Override\n\tprotected String findStatement() {\n\t\treturn null;\n\t}", "public int getId_joueur()\r\n/* */ {\r\n/* 42 */ return this.id_joueur;\r\n/* */ }", "public void syntax_error(Symbol current_token){}", "public String getStatement()\n {\n return _statement;\n }", "C2451d mo3408a(C2457e c2457e);", "public void skystonePos6() {\n }", "@Override\n public String visit(UnparsableStmt n, Object arg) {\n return null;\n }", "void m5771e() throws C0841b;", "public final void mo1285b() {\n }", "private Stmt stmt(){\n \n switch(lexer.token){\n case IDENT:\n \n if (symbolTable.get(lexer.getStringValue()) instanceof Procedure) \n return procedureCall();\n \n //can´t be a function\n else if (symbolTable.get(lexer.getStringValue()) instanceof Function)\n lexer.error(\"Function was expected \\n\");\n \n //assignstmt\n else \n return assignstmt();\n \n case BEGIN:\n return cmpstmt();\n case IF:\n return ifstmt();\n case WHILE:\n return whilestmt();\n case WRITE:\n return writestmt();\n case WRITELN:\n return writelnstmt();\n case READ:\n return readstmt();\n case RETURN:\n return returnStmt();\n default:\n lexer.error(\"missing statment\\n\");\n }\n \n return null;\n }", "public void mo4359a() {\n }", "void m5769c() throws C0841b;", "public void mo9241ay() {\n }", "public boolean isMultiLine() {\n/* 1236 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void mo21788M() {\n }", "public void mo21781F() {\n }", "public int a() {\r\n/* 63 */ return 4;\r\n/* */ }", "private static boolean checkSyntax(LexicalEntry entry, LexicalEntry gold_entry) {\n \n return false;\n\t\t\n\t}", "void m5770d() throws C0841b;", "public String getStatement(){\n return this.statement;\n }", "private void processAssignment(String line) {\n\t\t//TODO: fill\n\t}", "void yylexdebug(int state,int ch)\r\n{\r\nString s=null;\r\n if (ch < 0) ch=0;\r\n if (ch <= YYMAXTOKEN) //check index bounds\r\n s = yyname[ch]; //now get it\r\n if (s==null)\r\n s = \"illegal-symbol\";\r\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\r\n}", "final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }" ]
[ "0.5983025", "0.5968241", "0.5878941", "0.5876367", "0.5844575", "0.58296466", "0.5798523", "0.57895553", "0.57829154", "0.5769673", "0.5758229", "0.5728431", "0.5712035", "0.56954", "0.5658302", "0.56385183", "0.5637727", "0.56320214", "0.5624227", "0.5621769", "0.56178415", "0.5597207", "0.55820477", "0.55517364", "0.55390674", "0.5537537", "0.5514678", "0.55078554", "0.5504685", "0.54932296", "0.5489648", "0.54814315", "0.5477559", "0.54722446", "0.5468861", "0.546838", "0.54662627", "0.5450283", "0.5444282", "0.54419726", "0.54417866", "0.5440992", "0.54330015", "0.5427642", "0.5427042", "0.54206306", "0.54153556", "0.5408322", "0.53999186", "0.53961986", "0.53873277", "0.5385109", "0.53795975", "0.53762674", "0.53551376", "0.5354802", "0.5349292", "0.5345176", "0.53377306", "0.5331973", "0.5327662", "0.5320391", "0.5320391", "0.5320391", "0.5320391", "0.5320391", "0.5320391", "0.5320391", "0.5315329", "0.53142613", "0.53098917", "0.53094727", "0.5309017", "0.5299247", "0.5294237", "0.5272716", "0.5270614", "0.5261331", "0.5257938", "0.5256927", "0.5254812", "0.5252047", "0.5244222", "0.5239438", "0.5239084", "0.5236937", "0.5228545", "0.522424", "0.5222683", "0.5220391", "0.5218235", "0.52077514", "0.52010185", "0.5189045", "0.5188689", "0.5178351", "0.5177714", "0.5176622", "0.5175872", "0.5171189", "0.51671314" ]
0.0
-1
This method creates and returns a connection to my cse database. The url, my username, and password are stored in another class.
public static Connection getConnection() { String DRIVER_CLASS = "com.mysql.cj.jdbc.Driver"; try { Class.forName(DRIVER_CLASS).getDeclaredConstructor().newInstance(); } catch(Exception e) { throw new RuntimeException(e); } java.sql.Connection conn = null; try { conn = DriverManager.getConnection(DatabaseInfo.url, DatabaseInfo.username, DatabaseInfo.password); } catch (SQLException e) { throw new RuntimeException(e); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection connect()\n\t{\n\t\tConnection con = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t//Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/project? useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n \n\t\treturn con;\n \n\t}", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public Connection connectdb(){\n Connection con = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n con = DriverManager.getConnection(url, user, pass);\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(ILocker.class.getName()).log(Level.SEVERE, null, ex);\n }\n return con;\n }", "public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}", "private Connection connect() {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/paymentdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "@Override\n public Connection newConnection(String url, String login, String password) {\n Connection connection = null;\n cpds.setJdbcUrl(url);\n cpds.setUser(login);\n cpds.setPassword(password);\n //logger.debug(\"Connection params: JdbcUrl \" + url + \", Login \" + login + \", Password \" + password);\n\n\n try {\n //logger.debug(\"Try to create new C3P0 connection ...\");\n connection = cpds.getConnection();\n //logger.debug(\"New C3P0 connection created succesfully! \" + connection.toString());\n } catch (SQLException e) {\n //logger.warn(\"Creation of new C3P0 connection is failed!\", e);\n }\n\n return connection;\n }", "public static Connection getInstance() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/restaurant?useSSL=false\", \"root\", \"1234\");\n\t\t} catch (SQLException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "public static Connection getConnection() {\r\n Connection con = null;\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //step-1: get a connection to the db\r\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/user\", \"root\", \"\");\r\n }catch(Exception e) {\r\n System.out.println(\"error\" + e);\r\n }\r\n return con;\r\n\r\n }", "public static Connection getConnection() {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/soccer\" ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }", "public static Connection connect() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\t\t\t\t\n\t\t\treturn DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:mysql://83.212.125.138:3306/st_database\", \"admin\", \"admin\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public Connection getConnection()\r\n {\r\n this.cn = null;\r\n \r\n try\r\n {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n this.cn = DriverManager.getConnection(\"jdbc:mysql://localhost/surtiplas\", \"root\", \"12345\");\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return cn; \r\n }", "public static Connection getConnection(){\n try {\n connection = DriverManager.getConnection(URL,USERNAME,PASSWORD);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return connection;\n }", "public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "private static Connection connectToDB() {\n\t\t\tConnection con = null;\n\t\t\ttry {\n\t\t\t\t// Carichiamo un driver di tipo 1 (bridge jdbc-odbc).\n\t\t\t\t//String driver = \"sun.jdbc.odbc.JdbcOdbcDriver\";\n\t\t\t\tClass.forName(DRIVER);\n\t\t\t\t// Creiamo la stringa di connessione.\n\t\t\t\t// Otteniamo una connessione con username e password.\n\t\t\t\tcon = DriverManager.getConnection (URL, USER, PSW);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn con;\n\t\t}", "public Connection getConnecion()\r\n\t\t{\r\n\t\r\n\t\t \r\n\t\t\r\n\t try {\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\" );\r\n\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/curd_db\", \"root\", \"1254\" );\r\n\t\tif(con!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"connection estabilshed successfully\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Connection could not connect\");\r\n\t\t}\r\n\t }\r\n\t catch (ClassNotFoundException e) \r\n\t {\r\n\r\n\t\te.printStackTrace();\r\n\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t\te.printStackTrace(); \r\n\t }\r\n\treturn con;\r\n\t\t\r\n\t\t}", "protected Connection getConnection()\n {\n Connection connection = null;\n try\n {\n connection = DriverManager.getConnection(url, user, password);\n }\n catch (SQLException ex)\n {\n Logger.getLogger(DB_Utils.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "private static Connection connectieMaken() {\n //declaratie anders kunnen we niks returnen\n Connection connection = null;\n try {\n connection = DriverManager.getConnection(DB_URL, USER, PASS);\n } catch (SQLException ex) {\n Logger.getLogger(JDBC.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }", "private Connection getConnection() throws ClassNotFoundException, SQLException {\n\n log.info(\"Get DB connection\");\n\n String url = AppConfig.getInstance().getProperty(\"db.URL\") +\n AppConfig.getInstance().getProperty(\"db.schema\") +\n AppConfig.getInstance().getProperty(\"db.options\");\n String sDBUser = AppConfig.getInstance().getProperty(\"db.user\");\n String sDBPassword = AppConfig.getInstance().getProperty(\"db.password\");\n\n if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith(\"crypt:\")) {\n AltEncrypter cypher = new AltEncrypter(\"cypherkey\" + sDBUser);\n sDBPassword = cypher.decrypt(sDBPassword.substring(6));\n }\n\n return DriverManager.getConnection(url, sDBUser, sDBPassword);\n }", "public Connection getConexao() {\t\n\t\ttry {\n\t\t\t\n\t\t\tif (this.conn!=null) {\n\t\t\t\treturn this.conn;\n\t\t\t}\n\t\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\"+this.db,this.user,this.pass);\n\t\t\t\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn this.conn;\n\t}", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }", "public static Connection getConnection(){\n\t\t/***********************************************************************\n\t\t * Method................................................getConnection *\n\t\t * Author..........................................................JLH *\n\t\t *---------------------------------------------------------------------*\n\t\t * This method obtains a connection to the database *\n\t\t * *\n\t\t * Return Value \t\t\t\t\t\t\t\t\t\t\t\t\t *\n\t\t * (Connection) conn: Returns a connection to the database or null if *\n\t\t * one cannot be obtained. *\n\t\t ***********************************************************************/\n\t\tConnection conn=null;\n\t\t \n\t\ttry {\n\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t conn = DriverManager.getConnection(\"jdbc:mysql://70.178.114.2:3306/stagecraft?user=root&password=Security_Pr0bs12!@\");\n\t\t}\n\t\tcatch (SQLException ex) {\n\t\t System.out.println(\"Error: \" + ex);\n\t\t return null;\n\t\t}\n\t\tcatch(NullPointerException ex) {\n\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t \treturn null;\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t return conn;\t\t\n\t}", "protected static Connection getConnection() {\r\n\t\t\r\n\t\tSystem.out.print(\"CONSOLE -- ENTROU NA PACKAGE DATA ACCESS OBJECT: getConnection \\n\" ); \r\n\t\t\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\t\tconnection = DriverManager.getConnection(jdbcURL, jdbcUsername, jdbcPassword);\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\t\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn connection;\r\n\t\t\r\n\t}", "public Connection connect(){\n Connection con = null; \n try {\n Class.forName(DB_DRIVE_NAME).newInstance();\n con = DriverManager.getConnection(CONNECTION_URL, DB_CONNECTION_USERNAME, DB_CONNECTION_PASSWORD); \n }catch (Exception e) {\n System.err.println(\"Cannot connect to database server\");\n System.err.println(e);\n }\n return con;\n }", "private Connection getConnction() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tString url = \"jdbc:mysql://192.168.201.120:3306/erp_purchase?zeroDateTimeBeHavior=convertToNull\";\r\n\t\t\tString user = \"xuduo\";\r\n\t\t\tString passwor = \"000000\";\r\n\t\t\tconnection = DriverManager.getConnection(url, user, passwor);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(JdbcExample.class.getName()).log(Level.SEVERE, null, e);\r\n\t\t}\r\n\t\t\r\n\t\treturn connection;\r\n\t}", "public Connection connect() {\n\t\t\n\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\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\tSystem.out.println(\"Creating connection\");\n\t\treturn connection;\n\n\t}", "public static Connection getInstanceConnection(){\r\n\t\ttry {\r\n\t\t\tif(conn==null) {\r\n\t\t\t\tconn=DriverManager.getConnection(url, userDb, pwdDb);\r\n\t\t\t\tSystem.out.println(\"Connexion �tablie avec la base\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Probl�me de connexion\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public static Connection getConection() {\n\n Connection conex = null;\n try {\n\n Class.forName(\"com.mysql.jdbc.Driver\");\n conex = (Connection) DriverManager.getConnection(URL, USERNAME, PASSWORD);\n JOptionPane.showMessageDialog(null, \"Conexión Exitosa!\");\n } catch (Exception ex) {\n\n System.out.println(\"Error\" + ex);\n }\n return conex;\n }", "private Connection connect(){\n Connection connection = null;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n }\n catch (Exception e){\n System.out.print(e);\n }\n return connection;\n }", "public Connection makeConnection() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n // setup the connection with the DB.\n return DriverManager\n .getConnection(\"\"\n + \"jdbc:mysql://\"\n //+ \"itmd544.cbpipzbeulcc.us-west-2.rds.amazonaws.com/itmd544?\"\n //+\"localhost/itmd544\"\n +\"64.131.111.24/itmd544?\"\n + \"user=root&password=root\"\n //+\"root\"\n );\n \n \n } catch (Exception e) {\n //e.printStackTrace();\n System.out.println(\"Could not make connection\");\n System.exit(1);\n }\n \n return null;\n }", "private Connection getConnection() {\n\t\tlog.debug(\"getConnection start\");\n\t\tif (con != null)\n\t\t\treturn con;\n\t\tString url = \"jdbc:mysql://localhost:3306/\" + db;\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\tlog.debug(\"getConnection obtained driver\");\n\t\t\tcon = DriverManager.getConnection(url, user, password);\n\t\t\tlog.debug(\"getConnection got connection\");\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"getConnection: error:\" + ex.getMessage(), ex);\n\t\t\treturn null;\n\t\t}\n\t\treturn con;\n\t}", "public static Connection getConnection() {\r\n\t\tsetProperties();\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tconnection = (Connection) DriverManager.getConnection(DBURL,\r\n\t\t\t\t\tproperties);\r\n//\t\t\tSystem.err.println(\"Connection Established\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"connection Not Established\");\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public static Connection getConexion() {\r\n Connection cn=null;\r\n try{\r\n /**\r\n * conexion a la Base de datos\r\n */\r\n \r\n cn=DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3307/stockcia\",\"root\",\"\");\r\n //cn=DriverManager.getConnection(\"jdbc:mysql://raspberry-tic41.zapto.org:3306/StockCia\", \"tic41\", \"tic41\");//conexion local \r\n }\r\n catch(Exception e){\r\n System.out.println(String.valueOf(e));}\r\n return cn;\r\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressLint(\"NewApi\")\n public Connection CONN()\n {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n Connection conn=null;\n String ConnURL=null;\n try{\n Class.forName(clazz);\n conn= DriverManager.getConnection(url,dbusername,dbpassword);\n //conn=DriverManager.getConnection(ConnURL);\n }\n catch (SQLException se) {\n Log.e(\"ERRO\", se.getMessage());\n } catch (ClassNotFoundException e) {\n Log.e(\"ERRO\", e.getMessage());\n } catch (Exception e) {\n Log.e(\"ERRO\", e.getMessage());\n }\n return conn;\n }", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "public static Connection CrearConexion(){\n String clave=\"inacap\";\r\n String usuario=\"inacap\";\r\n String url=\"jdbc:derby://localhost:1527/aereopuerto\";\r\n \r\n //crear conexion a la Base de datos\r\n \r\n try{\r\n Connection conn=DriverManager.getConnection(url,usuario,clave);\r\n return conn;\r\n }\r\n catch(SQLException e){\r\n System.out.println(\"Excepcion de sql:\"+e);\r\n return null;\r\n }\r\n \r\n \r\n }", "public Connection connect(){\n try{\n \n Class.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n conn = DriverManager.getConnection(dbUrl, name, pass);\n System.out.println(\"connected\");\n }\n catch(Exception e){\n System.out.println(\"connection problem\");\n }\n return conn;\n }", "private Connection createConnection() {\r\n\tConnection result = null;\r\n\r\n\ttry {\r\n\t Class.forName(\"org.sqlite.JDBC\");\r\n\t result = DriverManager.getConnection(\"jdbc:sqlite:\" + fileName);\r\n\t} catch (Exception e) {\r\n\t result = null;\r\n\t}\r\n\r\n\treturn result;\r\n }", "private Connection connect() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(urlPath);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public Connection connect() {\n conn = null;\n try {\n conn = DriverManager.getConnection(url, user, password);\n System.out.println(\"Connected successfully.\");\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n \n return conn;\n }", "public static Connection obtener() \n {\n try\n {\n //sentencia de driver que se va a manejar\n Class.forName(\"com.mysql.jdbc.Driver\");\n \n String url = \"jdbc:mysql://127.0.0.1:3306/biblioteca?serverTimezone=\" + TimeZone.getDefault().getID();\n cnx = DriverManager.getConnection(url, \"root\", \"625387\");\n } \n catch (SQLException ex) {\n \n JOptionPane.showMessageDialog(null, \"Se presento error al conectar a la base de datos \"+ex.getMessage());\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Se presento error al conectar a la base de datos \"+ex.getMessage());\n }\n return cnx;\n }", "private Connection getConnection() {\n Connection conn = null;\n\n // Force the class loader to load the JDBC driver\n try { \n // The newInstance() call is a work around for some \n // broken Java implementations\n Class.forName(jdbcDriver).newInstance(); \n } catch (Exception ex) { \n System.err.println(\"Failed to load the JDBC driver: \" + jdbcDriver);\n }\n\n // Include the username and password on the URL\n StringBuffer url = new StringBuffer();\n url.append(jdbcUrl);\n if (jdbcUsername != null) {\n url.append(\"?user=\" + jdbcUsername);\n if (jdbcPassword != null) {\n url.append(\"&password=\" + jdbcPassword);\n }\n }\n\n // Establish a connection to the database\n try {\n conn = DriverManager.getConnection(url.toString());\n } catch (SQLException ex) {\n System.err.println(\"Failed to establish a database connection: url=\" + url.toString());\n System.err.println(\"SQLException: \" + ex.getMessage()); \n System.err.println(\"SQLState: \" + ex.getSQLState()); \n System.err.println(\"VendorError: \" + ex.getErrorCode()); \n ex.printStackTrace();\n }\n\n return conn;\n }", "public static Connection getConnection() throws SQLException, ClassNotFoundException{\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n //STEP 3: Open a connection\n conn = DriverManager.getConnection(DB_URL,USER,PASS);\n \n return conn;\n }", "public Connection getConnection() throws PersistenceException {\r\n\t\tConnection connection;\r\n\r\n\t\tString password = null; \r\n\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t\r\n\r\n\t\t\tprop.load(getClass().getClassLoader().getResourceAsStream(\"config.properties\"));\r\n\t\t\t// get the property value and print it out\r\n\r\n\t\t\tpassword = prop.getProperty(\"MYSQL_PASSWORD\");\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\t//Class.forName(\"org.postgresql.Driver\");\t\t//driver class loading\r\n\t\t\t/*\r\n\t\t\t * Now the driver is registered at DriverManager (postgreSQL driver automatically\r\n\t\t\t * registers itself at DriverManager once his class is loaded).\r\n\t\t\t * Since driver is loaded and registered, I can obtain a connection to the database \r\n\t\t\t */\r\n\t\t\tconnection = DriverManager.getConnection(dbURI, userName, password);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Where is your MySQL JDBC Driver?\");\r\n\t\t\t//\t\t\tSystem.out.println(\"Where is your postgreSQL JDBC Driver?\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t} catch(SQLException e) {\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public static Connection getConnection() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString dbDirectory = \"C:/Users/MAX-Student/Desktop/java/db\";\r\n\t\t\tSystem.setProperty(\"derby.system.home\", dbDirectory);\r\n\r\n\t\t\t// set the db url, username, and password\r\n\t\t\tString url = \"jdbc:derby:InspirationalDB\";\r\n\t\t\tString username = \"\";\r\n\t\t\tString password = \"\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\r\n\t\t\treturn connection;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\tfor (Throwable t : e)\r\n\t\t\t\tt.printStackTrace(); // for debugging\r\n\t\t\treturn null;\r\n\t\t }\r\n\t}", "public static Connection connectToDB(){\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:C:\\\\Users\\\\abbas\\\\Documents\\\\NetBeansProjects\\\\Plookify\\\\build\\\\classes\\\\Abbas\\\\plookifyDB.sqlite\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n } catch ( Exception e ) {\n System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n }\n //System.out.println(\"Opened database successfully\");\n return c;\n }", "private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }", "private Connection database() {\n Connection con = null;\n String db_url = \"jdbc:mysql://localhost:3306/hospitalms\";\n String db_driver = \"com.mysql.jdbc.Driver\";\n String db_username = \"root\";\n String db_password = \"\";\n \n try {\n Class.forName(db_driver);\n con = DriverManager.getConnection(db_url,db_username,db_password);\n } \n catch (SQLException | ClassNotFoundException ex) { JOptionPane.showMessageDialog(null,ex); }\n return con;\n }", "public Connection connect()\r\n\t\t {\r\n\t\t Connection con = null;\r\n\t\t try\r\n\t\t {\r\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\r\n\t\t //Provide the correct details: DBServer/DBName, username, password\r\n\t\t con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3308/paf\", \"root\", \"\");\r\n\t\t \r\n\t\t//For testing\r\n\t\t System.out.print(\"Successfully connected\"); \r\n\t\t \r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t {e.printStackTrace();}\r\n\t\t return con;\r\n\t\t }", "protected static Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:database1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(\"Connect: \" + e.getMessage());\n }\n return conn;\n }", "public static Connection createDBConnection() throws ClassNotFoundException, SQLException\r\n\t{\r\n\t\tString strDbUser = properties.getProperty(\"jdbc.username\"); // database login username\r\n String strDbPassword = properties.getProperty(\"jdbc.password\"); // database login password\r\n String remoteHost = properties.getProperty(\"remote.host\"); // remote host url (ie cloud server url\t\r\n String remotePort = properties.getProperty(\"remote.port\"); // remote post number\r\n String databaseName = properties.getProperty(\"databaseName\");\r\n Connection con;\r\n \r\n System.out.println(\"Trying connection \");\r\n \r\n\t\tClass.forName(\"org.postgresql.Driver\");\r\n// \tClass.forName(\"com.mysql.jdbc.Driver\");\r\n// con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:\"+tunnelPort+\"/cos420?user=\"+strDbUser+\"&password=\"+strDbPassword);\r\n\t\tString connectString = \"jdbc:postgresql://\" + remoteHost +\":\" + remotePort + \"/\"+databaseName; \r\n\t\tcon = DriverManager.getConnection(connectString , strDbUser,strDbPassword);\r\n\r\n \tif(!con.isClosed())\r\n System.out.println(\"Successfully connected to Postgres server using TCP/IP...\");\r\n\r\n return con;\r\n\t}", "public Connection getConnection() {\n Connection con = null;\n\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost/registration\", \"root\", null);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n\n return con;\n }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "public static Connection getConnection(){\n \n Connection con = null;\n try{\n \n \n String host = \"jdbc:mysql://localhost:3306/spytter\";\n String uName = \"root\";\n con = DriverManager.getConnection(host, uName, \"\");\n \n \n }\n \n catch(SQLException err ){\n System.out.println(err.getMessage());\n }\n return con;\n \n }", "public static Connection getDBConnection(){\n\t\tConnection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*InputStream is = DBConfig.class.getClass().\r\n\t\t\t\t\tgetResourceAsStream(\"/resources/db.properties\");\r\n\t\t\tprop.load(is);\r\n\t\t\tClass.forName(prop.getProperty(\"drivername\"));\r\n\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"jdbcurl\"),\r\n\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));*/\r\n\t\t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"fred\",\"flintstone\");\r\n\t\t\t/*Statement stmt = conn.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT LOCATION_NAME FROM LOCATIONS\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(\"LOCATION_NAME\"));\r\n\t\t\t}*/\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\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\t\r\n\t\treturn conn;\r\n\t}", "private Connection createDatabase() {\n\t\tSystem.out.println(\"We are creating a database\");\n\t\ttry (\n\t\t\t\t// Step 1: Allocate a database \"Connection\" object\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:\" + PORT_NUMBER + \"/\", \n\t\t\t\t\t\t\"root\", \"root\"); // MySQL\n\t\t\t\t// Step 2: Allocate a \"Statement\" object in the Connection\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t) {\n\t\t\t// Step 3 - create our database\n\t\t\tString sql = \"CREATE DATABASE IF NOT EXISTS experiences\";\n\t\t\tstmt.execute(sql);\n\t\t\treturn conn;\n\t\t\t\n\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null; }\n\t}", "private Connection getDBConnection(){\n\t\tConnection conn = null;\n\t\t\t\t\n\t\ttry{\n\t\t\t\t// name of the database\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch(ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\t\n\t\ttry{\n\t\t\t// type of the database file\n\t\t\tString url = \"jdbc:sqlite:vehicles.sqlite\";\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn conn;\n\t}", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public static Connection getConnection() {\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(DB_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DRIVER_URL, DB_USERNAME,\r\n\t\t\t\t\tDB_PASSWORD);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "@SuppressWarnings(\"finally\")\n\tpublic static Connection createConnection() throws Exception {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(Constants.dbClass);\n\t\t\tcon = DriverManager.getConnection(Constants.dbUrl, Constants.dbUser,Constants.dbPwd);\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\treturn con;\n\t\t}\n\t}", "public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}", "public void createConnection()\n\t{\n\t\ttry\n {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n // Get a connection\n conn = DriverManager.getConnection(dbURL, \"root\", \"root\"); \n System.out.println(\"Connected...\");\n }\n catch (Exception except)\n {\n except.printStackTrace();\n }\n\t}", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "public static Connection getConnection() throws Exception{\r\n\t\t\tConnection dbConn = null;\r\n\t try{\r\n\t\tString url = \"jdbc:mysql://localhost:3307/durgadb\";\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tdbConn = DriverManager.getConnection(url, \"root\", \"root\");\r\n\t\t}\r\n\t catch (SQLException sqle) {\r\n\t\t sqle.printStackTrace();\r\n\t\t throw sqle;\r\n\t\t}\r\n catch(Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t throw e;\r\n\t\t}\r\n\treturn dbConn;\r\n\t}", "public Connection my_connection() {\n String url = \"jdbc:sqlite:Database/Project1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n System.out.println(\"Connection to SQLite has been established.\");\n } catch (SQLException e) {\n System.out.println(\"In Exception Block Error\"); \n System.out.println(e.getMessage());\n }\n return conn;\n }", "public static Connection createConnection() throws Exception {\n \tClass.forName(DRIVER);\n \treturn DriverManager.getConnection(DBURL, USERNAME, PASSWORD); \t\n }", "public Connection connectToDb() throws Exception\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tString url= \"jdbc:mysql://83.212.122.254:3306/travlos\";\r\n\t\t\tString username=\"travlos\";\r\n\t\t\tString password=\"travlos\";\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"found\");\r\n\t\t\t\r\n\t\t\t\r\n\t\tConnection con=null;\t\r\n\t\t\tcon=DriverManager.getConnection(url, username, password);\r\n\t\t\tStatement statement= con.createStatement();\r\n\t\t\t\r\n\t System.out.println(\"egine syndesh!\");\r\n\t return con;\r\n\t\t\r\n\t\t}\r\n\t\tcatch (SQLException ee)\r\n\t\t{\r\n\t\t\tthrow new RuntimeException(\"cannot connect the database!\", ee);\r\n\t\t}\r\n\t\r\n\t\r\n\t}", "public static Connection connect() {\n\n\t\t// Create a variable for the connection string.\n\t\tString connectionUrl = \"jdbc:sqlserver://localhost:1433;\"\n\t\t\t\t+ \"databaseName=SwaziBankIntranet2016;user=intranetUser;password=12345678=I\";\n\n\t\t// Declare the JDBC objects.\n\n\t\ttry {\n\t\t\t// Establish the connection.\n\t\t\tClass.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n\t\t\tcon = (Connection) DriverManager.getConnection(connectionUrl);\n\t\t}\n\t\t// Handle any errors that may have occurred.\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn con;\n\t}", "public static Connection getConexion() throws SipsaExcepcion {\n if (DB.conn == null) {\n try {\n Configuracion configuracion = Configuracion.getInstancia();\n Class.forName(configuracion.getDBDriver()).newInstance();\n String connectionUrl = configuracion.getDBCadenaConexion();\n String usuario = configuracion.getDBUsuario();\n String password = configuracion.getDBPassword();\n DB.conn = DriverManager.getConnection(connectionUrl, usuario, password);\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new SipsaExcepcion(\"Error al conectarse a la base de datos de Sipsa\");\n }\n }\n return conn;\n }", "private static Connection getConnection()\n {\n Connection con = null;\n String url = \"jdbc:mysql://localhost/airlines?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\";\n String user = \"root\";\n String pw = \"npass\";\n try {\n con = DriverManager.getConnection(url, user, pw);\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return con;\n }", "public Connection connectToDb() {\n\t\ttry {\n\t\t\t // load the SQLite-JDBC driver using the current class loader\n\t\t Class.forName(\"org.sqlite.JDBC\");\n\t\t myDb = DriverManager.getConnection(\"jdbc:sqlite:Auth.db\");\n\t\t Statement statement = myDb.createStatement();\n\t\t statement.setQueryTimeout(30); // set timeout to 30 seconds.\n\t\t return myDb;\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(null,\n\t \t\t \"Cannot Connect to DB\",\n\t \t\t \"Error\",\n\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t}", "public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}", "public static Connection con(){\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con=(Connection)DriverManager.getConnection(\"jdbc:mysql://localhost:3306/nsbm?\",\"root\",\"\");\n // our SQL SELECT query. \n // if you only need a few columns, specify them by name instead of using \"*\"\n \n }catch(ClassNotFoundException | SQLException e){\n }\n return con;\n }", "public Connection getConnection() {\n if (con == null) {\n try {\n con = DriverManager.getConnection(url, user, password);\n return con;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n }\n\n return con;\n }", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "public Connection getConnection() {\n\t// register the JDBC driver\n\ttry {\n\t Class.forName(super.driver);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t}\n \n\t// create a connection\n\tConnection connection = null;\n\ttry {\n\t connection = DriverManager.getConnection (super.jdbc_url,super.getu(), super.getp());\n\t} catch (SQLException e) {\n\t e.printStackTrace();\n\t}\n\treturn connection;\n }", "public Connection create() {\n\t\tif(ds==null)return null ;\n\t\ttry{\n\t\t\treturn ds.getConnection();\n\t\t}catch(Exception e ){\n\t\t\tSystem.out.println(e) ;\n\t\t\treturn null ;\n\t\t}\n\t\t\n\t}", "public static Connection getConnection() {\r\n\r\n\t\tConfigLoader loader = new ConfigLoader();\r\n\t\tProperties properties = null;\r\n\t\t;\r\n\t\ttry {\r\n\t\t\tproperties = loader.loadConfigurations();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString url = properties.getProperty(\"hsqldb.url\");\r\n\t\t\tString user = properties.getProperty(\"hsqldb.user\");\r\n\t\t\tString password = properties.getProperty(\"hsqldb.password\");\r\n\t\t\tlogger.info(\"Connecting to hsqlDB with db:\" + url);\r\n\t\t\tconnection = DriverManager.getConnection(url, user, password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public static Connection getConnection() {\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstm = null;\n\n\t\tString url = \"jdbc:mariadb://localhost:3306/test\";\n\t\tString id = \"root\";\n\t\tString pw = \"maria\";\n\t\ttry {\n\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\ttry {\n\t\t\t\tcon = DriverManager.getConnection(url, id, pw);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}", "public static Connection establecerConexion() throws SQLException {\r\n Connection con = DriverManager.getConnection(getDatabase(), getUser(), getPassword());\r\n \r\n return con;\r\n \r\n }" ]
[ "0.77343297", "0.7669221", "0.76398647", "0.7532895", "0.7528243", "0.7525775", "0.7502176", "0.74922925", "0.7475282", "0.7468963", "0.7457923", "0.7453334", "0.740731", "0.7381222", "0.7357819", "0.73484474", "0.73427445", "0.7340212", "0.7335137", "0.7334938", "0.7330697", "0.73217314", "0.73205775", "0.73151606", "0.7296068", "0.7293033", "0.7287436", "0.7279552", "0.72780895", "0.72521794", "0.7249714", "0.724588", "0.7238002", "0.72166246", "0.7212346", "0.7207067", "0.7205777", "0.7203042", "0.7198857", "0.7197758", "0.7189936", "0.7185462", "0.71848583", "0.7181925", "0.71812075", "0.71802115", "0.7173959", "0.71737915", "0.7172626", "0.71452314", "0.713188", "0.71194106", "0.7115428", "0.7112304", "0.70865923", "0.7086523", "0.70836246", "0.708137", "0.7063152", "0.70628184", "0.7062344", "0.70360744", "0.7032592", "0.70310885", "0.70307213", "0.7023465", "0.7022259", "0.7019003", "0.70138323", "0.7013674", "0.7011579", "0.7011023", "0.70097256", "0.7006812", "0.6996416", "0.6984524", "0.6982812", "0.69801205", "0.69754994", "0.6974268", "0.6972209", "0.6966847", "0.69539493", "0.69506735", "0.6950162", "0.6949029", "0.6946151", "0.6942471", "0.6937867", "0.6936507", "0.6931855", "0.6931515", "0.6927526", "0.6926515", "0.692649", "0.69254255", "0.69151175", "0.6901107", "0.68992126", "0.6895478" ]
0.7162574
49
This method checks that the given Connection, PreparedStatement, and ResultSet are not null, and then closes them. It is intended for "get" methods that return something.
public static void close(Connection conn, PreparedStatement ps, ResultSet rs) { try { if(rs != null && !rs.isClosed()) { rs.close(); } if(ps != null && !ps.isClosed()) { ps.close(); } if(conn != null && !conn.isClosed()) { conn.close(); } } catch (SQLException e) { throw new RuntimeException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void closing(Connection connection, PreparedStatement preparedStatement, ResultSet rs) {\n try {\n if (rs != null) {\n rs.close();\n preparedStatement.close();\n connection.close();\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n }\n }", "private void closeResultSet(ResultSet rs)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (rs != null)\r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException ex) {} // nothing we can do!\r\n\t}", "private static void close(Connection myConnection, Statement myStatment, ResultSet myResultSet) throws SQLException{\n\t\tif (myResultSet != null) {\n\t\t\tmyResultSet.close();\n\t\t}\n\t\t\n\t\tif (myStatment != null) {\n\t\t\tmyStatment.close();\n\t\t}\n\t\t\n\t\tif (myConnection != null) {\n\t\t\tmyConnection.close();\n\t\t}\n\t}", "private void closeResources(Connection connection, PreparedStatement statement, ResultSet resultSet) {\n JdbcClose.close(resultSet);\n JdbcClose.close(statement);\n JdbcClose.close(connection);\n }", "private void closeConnections(ResultSet rs, Statement stmt, Connection con) {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stmt != null) {\n stmt.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception exp) {\n exp.printStackTrace();\n }\n }", "public void closeResultSet() {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void attemptClose(Connection c, PreparedStatement p, ResultSet o)\n {\n attemptClose(c);\n attemptClose(p);\n attemptClose(o);\n }", "public static void closeResultSet (ResultSet rs) {\n\t\ttry { \n\t\t\tif (rs != null)\n\t\t\t\trs.close(); \n\t\t} catch (SQLException e) {\t\t\n\t\t}\n\t}", "private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {\r\n\r\n\t\tlogger.entering(CLASSNAME, \"cleanupConnection\", new Object[] {conn, rs, statement});\r\n\t\t\r\n\t\tif (statement != null) {\r\n\t\t\ttry {\r\n\t\t\t\tstatement.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (rs != null) {\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"cleanupConnection\");\r\n\t}", "public final void dispose() {\n\ttry { if (resultSet != null) resultSet.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tresultSet = null;\n\n\ttry { if (stmt != null) stmt.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tstmt = null;\n }", "public static void closeJDBCResultSet(ResultSet rs)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(rs != null)\n\t\t\t{\n\t\t\t\trs.close();\n\t\t\t\trs = null;\t\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{ \n\t\t\tSystem.out.println(\"DBManager.java > closeJDBCResultSet() - ERROR closing JDBC ResultSet: \" + e.getMessage()); \n\t\t}\n\t}", "public static void closeConnection(Connection con, ResultSet rs,\n\t\tPreparedStatement ps) throws SQLException {\n\tif(null!=con)\n\t\tcon.close();\n\tif(null!=rs)\n\t\trs.close();\n if(null!=ps)\n\t\tps.close();\n\n}", "public void close(ResultSet rs) {\n if (rs!=null){\n try {\n rs.close();\n } catch (SQLException ignore) {\n }\n }\n }", "public static void close(ResultSet rs) throws SQLException {\r\n if (rs != null) {\r\n rs.close();\r\n }\r\n }", "private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }", "private void close(ResultSet rs) {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "void checkClosed() throws SQLException {\n\n if (result == null) { throw Message.getSQLException(ErrorCode.OBJECT_CLOSED); }\n if (stat != null) {\n stat.checkClosed();\n }\n if (conn != null) {\n conn.checkClosed();\n }\n }", "protected void safeClose() {\n try {\n if (stmt != null) {\n stmt.close();\n }\n } catch (SQLException e) {\n Exceptions.handle()\n .to(OMA.LOG)\n .error(e)\n .withSystemErrorMessage(\"An error occurred while closing a prepared statement: %s (%s)\")\n .handle();\n } finally {\n stmt = null;\n }\n }", "public void close() throws SQLException {\n\t\tif(stmt != null)\n\t\t\tstmt.close();\n\t\t\tstmt = null;\n\t\tif(connection != null)\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t}", "public void closeResultSet(ResultSet rs) {\n if(rs!=null){\n try {\n rs.close();\n logger.info(\"Closing Result Set\");\n } catch (SQLException e) {\n logger.error(\"Error while closing result set\",e);\n }\n }\n }", "public void close() throws SQLException {\n Exception foundExeption = null;\n for (PreparedStatement prep : prepHash.values()) {\n try {\n prep.close();\n } catch (Exception e) {\n foundExeption = e;\n }\n }\n // Close the connection\n try {\n conn.close();\n } catch (SQLException e) {\n throw new SQLException(\"Failed to close database: \" + e);\n }\n\n\n // we do this so we know we tried to close every connection\n // unfortunately we only recieve the final connection error\n if (foundExeption != null) {\n throw new SQLException(\"Failed to close database prepareStatement: \"\n + foundExeption);\n }\n }", "public static void closeJDBCResources(Connection conn, Statement stmt, ResultSet rs)\n\t{\n\t\tcloseJDBCResultSet(rs);\n\t\tcloseJDBCResources(conn, stmt);\n\t}", "public static void close(PreparedStatement ps, ResultSet rs) {\r\n\t\ttry {\r\n\t\t\tif(rs != null && !rs.isClosed()) {\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "private void closeResources(final ResultSet resultSet, final PreparedStatement preparedStatement,\n\t\t\tfinal Connection connection, String methodName) throws DaoException {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" resultSetError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" preparedStatementError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" connectionError: \", e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public static void close(ResultSet rs) {\n\t\tif(rs!=null){\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}", "public void close(ResultSet rs, PreparedStatement pst, Connection c) throws BusinessException {\n\t\tclose(rs, pst);\n\t\tclose(c);\n\t}", "public void close(ResultSet rs, PreparedStatement pst) throws BusinessException {\n\t\tclose(rs);\n\t\tclose(pst);\n\t}", "public static void closeJDBCResources(Connection conn, Statement stmt)\n\t{\t\t\n\t\tcloseJDBCStatement(stmt);\t\t\n\t\tcloseJDBCConnection(conn);\n\t}", "@Override\n\t\tpublic void close(ResultSet res, com.mysql.jdbc.Statement stm,\n\t\t\t\tConnection conn) {\n\t\t\t\n\t\t}", "public static void cleanup(PreparedStatement pstmt, ResultSet rs){\n try {\n //STEP 6: Clean-up environment\n rs.close();\n pstmt.close();\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n } finally {\n //finally block used to close resources\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n } catch (SQLException se2) {\n }// nothing we can do; end finally try\n }//end try\n }", "private void checkClosedResultSet() {\n if(closed) {\n throw new IllegalStateException(\"Resultset is already closed\");\n }\n }", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }", "public void close() throws SQLException {\n currentPreparedStatement.close();\n }", "public static boolean closeAll(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n Connection con = stm.getConnection();\r\n aResultSet.close();\r\n stm.close();\r\n con.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeAll\", \"ResultSet, Statement, and Connection failed.\", ex);\r\n return false;\r\n }\r\n }", "@Override public void close() throws SQLException {\r\n connection.close();\r\n connection = null;\r\n }", "private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "public static void closeQuietly(Connection conn, Statement stmt, ResultSet rs) {\r\n try {\r\n closeQuietly(rs);\r\n } finally {\r\n try {\r\n closeQuietly(stmt);\r\n } finally {\r\n closeQuietly(conn);\r\n }\r\n }\r\n }", "public void close() {\n try {\n con.close();\n } catch (SQLException se) { /*can't do anything */ }\n try {\n stmt.close();\n } catch (SQLException se) { /*can't do anything */ }\n }", "private static void close() {\n try {\n if (songResultSet != null) {\n songResultSet.close();\n }\n if (artistResultSet != null) {\n artistResultSet.close();\n }\n if (albumResultSet != null) {\n albumResultSet.close();\n }\n if (genreResultSet != null) {\n genreResultSet.close();\n }\n\n if (songStatement != null) {\n songStatement.close();\n }\n\n if (albumStatement != null) {\n albumStatement.close();\n }\n\n if (artistStatement != null) {\n artistStatement.close();\n }\n if (genreStatement != null) {\n genreStatement.close();\n }\n\n if (conn != null) {\n conn.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void close()\n throws SQLException\n {\n m_rs.close();\n }", "public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }", "public static void close( ResultSet rs ) {\n closeResultSet( rs );\n }", "public void Cleanup(Statement stat, ResultSet rs) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n\tif (rs != null) {\r\n\t try {\r\n\t\trs.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "public static boolean closeRsAndStatement(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n aResultSet.close();\r\n stm.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeRsAndStatement\", \"Failed.\", ex);\r\n return false;\r\n }\r\n }", "public void closeStatement() {\n\t\tif (stmt != null) {\n\t\t\ttry {\n\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t\tif (pstmt != null) {\n\t\t\ttry {\n\t\t\t\tpstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "public static void closeConnection(Connection connection, PreparedStatement preparedStatement,\n ResultSet resultSet) {\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n log.warn(\"Error closing database connection\", e);\n }\n }\n\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n log.warn(\"Error closing prepared statement.\", e);\n }\n }\n\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n log.warn(\"Error closing result set.\", e);\n }\n }\n }", "public void close() throws SQLException {\n stmt.close();\n con.close();\n isOpen = false;\n }", "public void tidyConnection(Connection conn, Statement sp_stmt, ResultSet rs)\r\n throws MapflowAppException {\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n rs = null;\r\n }\r\n if (sp_stmt != null) {\r\n try {\r\n sp_stmt.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n sp_stmt = null;\r\n }\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n conn = null;\r\n }\r\n }", "public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (connect != null) {\n\t\t\t\tconnect.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "@Test\n public void testPreparedStatementOneClosed() throws Throwable\n {\n Connection c = null;\n Statement st = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try\n {\n assertNotNull(ds);\n c = ds.getConnection();\n assertNotNull(c);\n \n st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.close();\n \n pstmt.setInt(1, 1);\n \n rs = pstmt.executeQuery();\n \n fail(\"Able to execute prepared statement\");\n }\n catch (SQLException e)\n {\n // Ok\n }\n finally\n {\n if (rs != null)\n {\n try\n {\n rs.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (pstmt != null)\n {\n try\n {\n pstmt.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (st != null)\n {\n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n try\n {\n st.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (c != null)\n {\n try\n {\n c.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n }\n }", "void closeInternal() throws SQLException {\n\n if (result != null) {\n try {\n result.close();\n if (closeStatement && stat != null) {\n stat.close();\n }\n }\n finally {\n columnCount = 0;\n result = null;\n stat = null;\n conn = null;\n insertRow = null;\n updateRow = null;\n }\n }\n }", "public void disconnect() {\n \t for (PreparedStatementID i: _preparedStatements.keySet()) {\n \t try { _preparedStatements.get(i).close(); } catch (SQLException ignore) {}\n \t }\n \t _preparedStatements.clear();\n \t // Close the database connection:\n \t try {con.close(); } catch (SQLException ignore) {}\n \t con = null;\n \t return;\n \t }", "private static void closeResource(ResultSet resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "public void close() throws SQLException;", "private void disconnect(ResultSet resultSet, Statement statement, Connection connection) throws SQLException{\n if (resultSet != null) {\n resultSet.close(); //disconnect from resultSet\n }\n\n if (statement != null) {\n statement.close(); //disconnect from statement\n }\n\n if (connection != null) {\n connection.close(); //disconnect from database\n }\n }", "public static void close(ResultSet rs, Statement st, Connection con) {\n\t\ttry {\n\t\t\tif (rs != null) {\n\t\t\t\trs.close();\n\t\t\t}\n\t\t\tif (st != null) {\n\t\t\t\tst.close();\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tLogger.println(e);\n\t\t}\n\t}", "public static void closeJDBCResources(Connection conn){\n\t\ttry\n\t\t{\n\t\t\tif(conn != null)\n\t\t\t{\n\t\t\t\tconn.close();\n\t\t\t\tconn = null;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e){ /*IGNORE*/ }\n\t}", "public void closeSourse()\r\n/* 44: */ {\r\n/* 45: */ try\r\n/* 46: */ {\r\n/* 47: 41 */ if (this.rs != null)\r\n/* 48: */ {\r\n/* 49: 42 */ this.rs.close();\r\n/* 50: 43 */ this.rs = null;\r\n/* 51: */ }\r\n/* 52: 45 */ if (this.ps != null)\r\n/* 53: */ {\r\n/* 54: 46 */ this.ps.close();\r\n/* 55: 47 */ this.ps = null;\r\n/* 56: */ }\r\n/* 57: 49 */ if (this.ct != null)\r\n/* 58: */ {\r\n/* 59: 50 */ this.ct.close();\r\n/* 60: 51 */ this.ct = null;\r\n/* 61: */ }\r\n/* 62: */ }\r\n/* 63: */ catch (SQLException e)\r\n/* 64: */ {\r\n/* 65: 55 */ e.printStackTrace();\r\n/* 66: */ }\r\n/* 67: */ }", "public static void closeQuietly(ResultSet rs) {\r\n try {\r\n close(rs);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "private void flush() {\n\t\ttry {\n\t\t\tif (mResultSet != null) {\n\t\t\t\tmResultSet.close();\n\t\t\t}\n\n\t\t\tif (mStatement != null) {\n\t\t\t\tmStatement.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void close(Connection myConn, Statement mystmt, ResultSet myRs) {\n\t\ttry {\n\t\t\tif(myRs!=null)\n\t\t\t\tmyRs.close();\n\t\t\tif(mystmt!=null)\n\t\t\t\tmystmt.close();\n\t\t\tif(myConn!=null)\n\t\t\t\tmyConn.close();\n\t\t\t\n\t\t}\n\t\t\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\t\tpublic void finalize() {\r\n\t try {\r\n\t if (con != null) {\r\n\t con.close();\r\n\t }\r\n\t } catch (SQLException sqlex) {\r\n\t System.out.println(sqlex);\r\n\t }\r\n\t }", "protected boolean close() {\n try {\n if(this.connection != null) {\n this.connection.close();\n this.connection = null;\n }\n if(this.statement != null) {\n this.statement.close();\n this.statement = null;\n }\n if(this.prepared != null) {\n this.prepared.close();\n this.prepared = null;\n }\n if(this.resultSet != null) {\n this.resultSet.close();\n this.resultSet = null;\n }\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n return true;\n }", "private static void closeResource(PreparedStatement resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "public void close() throws SQLException {\n enable_stmt.close();\n disable_stmt.close();\n show_stmt.close();\n }", "public void closeResources(Connection conn, Statement stmt, ResultSet res) {\n\t\ttry {\n\t\t\tif (res != null) {\n\t\t\t\tres.close();\n\t\t\t}\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "void close() throws SQLException;", "@Override\n\tpublic void disconnect() throws SQLException {\n if (jdbcConnection != null && !jdbcConnection.isClosed()) {\n jdbcConnection.close();\n }\t\t \n\t\t\n\t}", "public static void close()\n\t{\n\t\t\n\t\ttry \n\t\t{\t\t\t\n\t\t\t\n\t\t\tif (RESULT_SET != null)\n\t\t\t{\n\t\t\t\tRESULT_SET.close();\n\t\t\t}\n\t\t\t\n\t\t\tSTATEMENT.close();\n\t\t\tCONNECTION.close();\t\t\n\t\t\n\t\t} catch (Exception e)\n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "private void close() {\n\t\t try {\n\t\t\tresultSet.close();\n\t\t\tstatement.close();\n\t\t\t connect.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t }", "public void close() throws SQLException {\n/* 272 */ this.metadata = null;\n/* 273 */ this.owner = null;\n/* */ }", "public static void attemptClose(ResultSet o)\n {\n try\n { ls.debug(\"Closing \"+o); if (o != null) o.close();}\n catch (Exception e)\n { ls.fatal(e);}\n }", "public void closeConnection()\n {\n try{\n if(statement!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close statement ex:\"+ se.getMessage());\n }// do nothing\n try{\n if(connection!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close connection ex:\"+ se.getMessage());\n }//end finally try\n }", "public static void cerrarConnect(ResultSet rs, Statement stmt){\n if(rs !=null){\n try{\n rs.close();\n }catch(SQLException e){}\n }\n \n if(stmt!=null){\n try {\n stmt.close();\n } catch (SQLException e) {}\n }\n }", "public static void closeAll(Connection conn, Statement stmt, ResultSet rs)\n throws EJBException {\n try {\n if (rs != null) rs.close();\n if (stmt != null) stmt.close();\n if (conn != null) conn.close();\n\n } catch (SQLException e) {\n throw new EJBException(\"Error closing SQL objects\", e);\n }\n }", "@Override\n public void close() throws SQLException {\n }", "public static void close(Connection conn, PreparedStatement ps) {\r\n\t\ttry {\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t\tif(conn != null && !conn.isClosed()) {\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t}", "public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }", "private void closePreparedStatement(final PreparedStatement preparedStatement, final String methodName)\n\t\t\tthrows DaoException {\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \"preparedStatementError: \" + e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\trs.close();\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}\r\n\t\ttry {\r\n\t\t\tst.close();\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}\r\n\t\ttry {\r\n\t\t\tconn.close();\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}\r\n\t}", "public static void fermerConnexion(Statement stmt)\n{\n if(stmt!=null)\n {\n try\n {\n stmt.close();\n }\n catch(Exception e)\n {\n System.out.println(\"Erreur lors de la fermeture d’une connexion dans fermerConnexion(Statement)\");\n }\n }\n}", "public void closeConnection() throws SQLException {\r\n\t\ttry {\r\n\t\t\tif (preparedStatement != null)\r\n\t\t\t\tpreparedStatement.close();\r\n\t\t} finally {\r\n\t\t\tif (connection != null)\r\n\t\t\t\tconnection.close();\r\n\t\t}\r\n\t}", "@Override\n\tprotected void doClose() throws Exception {\n\t\tinitialized = false;\n\t\tJdbcUtils.closeResultSet(this.rs);\n\t\trs = null;\n\t\tcleanupOnClose();\n\n\t\tif(this.con != null) {\n\t\t\tthis.con.setAutoCommit(this.initialConnectionAutoCommit);\n\t\t}\n\n\t\tif (useSharedExtendedConnection && dataSource instanceof ExtendedConnectionDataSourceProxy) {\n\t\t\t((ExtendedConnectionDataSourceProxy)dataSource).stopCloseSuppression(this.con);\n\t\t\tif (!TransactionSynchronizationManager.isActualTransactionActive()) {\n\t\t\t\tDataSourceUtils.releaseConnection(con, dataSource);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tJdbcUtils.closeConnection(this.con);\n\t\t}\n\t}", "public static void close(ResultSet rs) {\n\t\ttry {\n\t\t\trs.close();\n\t\t} catch(SQLException e){\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t}", "public void closeConnection() throws SQLException;", "private void closeInstance(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tconn.getConnection().close();\n\t\t\t\n\t\t\tstmt = null;\n\t\t\trs = null;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n public void closeConnection() throws SQLException{\n getConnection().close();\n }", "private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeConnection(Connection conn) throws SQLException;", "public static boolean close(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n aResultSet.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"close\", \"ResultSet Failed.\", ex);\r\n return false;\r\n }\r\n }" ]
[ "0.7171285", "0.70926255", "0.7031424", "0.7009813", "0.6947499", "0.69356465", "0.6921806", "0.6907407", "0.6905031", "0.68981546", "0.68581223", "0.68465096", "0.68252903", "0.68024933", "0.67948824", "0.67818475", "0.6770719", "0.6751524", "0.6724797", "0.6718739", "0.66895074", "0.6645698", "0.6644778", "0.6639515", "0.6632495", "0.66321284", "0.6582114", "0.6578341", "0.65681416", "0.6564939", "0.65604264", "0.6559697", "0.65571856", "0.6535796", "0.65305704", "0.6523274", "0.6522157", "0.6521243", "0.65207124", "0.649932", "0.6497356", "0.64903355", "0.64903355", "0.6481565", "0.64769685", "0.6472158", "0.64611554", "0.6460543", "0.6460214", "0.6455743", "0.64544475", "0.6451658", "0.64508677", "0.6443766", "0.64369786", "0.64317614", "0.6429312", "0.6413957", "0.63748425", "0.63738835", "0.6343549", "0.6336243", "0.6333672", "0.6328377", "0.6318848", "0.62953806", "0.62920386", "0.62918895", "0.62840676", "0.6282969", "0.62808627", "0.6277902", "0.6277902", "0.6263556", "0.62522954", "0.6252124", "0.6248216", "0.6248216", "0.6248216", "0.6248054", "0.6244817", "0.62329906", "0.6215086", "0.621373", "0.62137234", "0.62120795", "0.62076724", "0.61883014", "0.61879057", "0.61838603", "0.61772794", "0.6170938", "0.6142631", "0.6127735", "0.6121117", "0.61039656", "0.60952556", "0.60951376", "0.6073339", "0.6065713" ]
0.6792979
15
This method checks that the given Connection and PreparedStatement are not null, and then closes them. It is intended for "insert" methods that don't return anything, these are not yet implemented.
public static void close(Connection conn, PreparedStatement ps) { try { if(ps != null && !ps.isClosed()) { ps.close(); } if(conn != null && !conn.isClosed()) { conn.close(); } } catch (SQLException e) { throw new RuntimeException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void closing(Connection connection, PreparedStatement preparedStatement, ResultSet rs) {\n try {\n if (rs != null) {\n rs.close();\n preparedStatement.close();\n connection.close();\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n }\n }", "protected void safeClose() {\n try {\n if (stmt != null) {\n stmt.close();\n }\n } catch (SQLException e) {\n Exceptions.handle()\n .to(OMA.LOG)\n .error(e)\n .withSystemErrorMessage(\"An error occurred while closing a prepared statement: %s (%s)\")\n .handle();\n } finally {\n stmt = null;\n }\n }", "public void closePreparedStatement(PreparedStatement ps) {\n if(ps!=null){\n try {\n ps.close();\n logger.info(\"Closing Prepared Statement\");\n } catch (SQLException e) {\n logger.error(\"Error while closing prepared statement\",e);\n }\n }\n }", "private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {\r\n\r\n\t\tlogger.entering(CLASSNAME, \"cleanupConnection\", new Object[] {conn, rs, statement});\r\n\t\t\r\n\t\tif (statement != null) {\r\n\t\t\ttry {\r\n\t\t\t\tstatement.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (rs != null) {\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"cleanupConnection\");\r\n\t}", "public void close() throws SQLException {\n Exception foundExeption = null;\n for (PreparedStatement prep : prepHash.values()) {\n try {\n prep.close();\n } catch (Exception e) {\n foundExeption = e;\n }\n }\n // Close the connection\n try {\n conn.close();\n } catch (SQLException e) {\n throw new SQLException(\"Failed to close database: \" + e);\n }\n\n\n // we do this so we know we tried to close every connection\n // unfortunately we only recieve the final connection error\n if (foundExeption != null) {\n throw new SQLException(\"Failed to close database prepareStatement: \"\n + foundExeption);\n }\n }", "private void closePreparedStatement(final PreparedStatement preparedStatement, final String methodName)\n\t\t\tthrows DaoException {\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \"preparedStatementError: \" + e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public static void attemptClose(Connection c, PreparedStatement p, ResultSet o)\n {\n attemptClose(c);\n attemptClose(p);\n attemptClose(o);\n }", "public void close() throws SQLException {\n currentPreparedStatement.close();\n }", "public void disconnect() {\n \t for (PreparedStatementID i: _preparedStatements.keySet()) {\n \t try { _preparedStatements.get(i).close(); } catch (SQLException ignore) {}\n \t }\n \t _preparedStatements.clear();\n \t // Close the database connection:\n \t try {con.close(); } catch (SQLException ignore) {}\n \t con = null;\n \t return;\n \t }", "public void closeStatement() {\n\t\tif (stmt != null) {\n\t\t\ttry {\n\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t\tif (pstmt != null) {\n\t\t\ttry {\n\t\t\t\tpstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "@Test\n public void testPreparedStatementOneClosed() throws Throwable\n {\n Connection c = null;\n Statement st = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try\n {\n assertNotNull(ds);\n c = ds.getConnection();\n assertNotNull(c);\n \n st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.close();\n \n pstmt.setInt(1, 1);\n \n rs = pstmt.executeQuery();\n \n fail(\"Able to execute prepared statement\");\n }\n catch (SQLException e)\n {\n // Ok\n }\n finally\n {\n if (rs != null)\n {\n try\n {\n rs.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (pstmt != null)\n {\n try\n {\n pstmt.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (st != null)\n {\n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n try\n {\n st.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (c != null)\n {\n try\n {\n c.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n }\n }", "public void closeStatement(PreparedStatement ps)\n {\n try {\n if(ps != null) {\n ps.close();\n }\n } catch (SQLException ex) {\n }\n }", "public void ExitStatements() {\n try {\n preparedStatement.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitStatements(): \"+e.getMessage());\n }\n }", "public void close() {\n try {\n con.close();\n } catch (SQLException se) { /*can't do anything */ }\n try {\n stmt.close();\n } catch (SQLException se) { /*can't do anything */ }\n }", "public void close() throws SQLException {\n stmt.close();\n con.close();\n isOpen = false;\n }", "public void close() throws SQLException {\n\t\tif(stmt != null)\n\t\t\tstmt.close();\n\t\t\tstmt = null;\n\t\tif(connection != null)\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t}", "public void closeConnection() throws SQLException {\r\n\t\ttry {\r\n\t\t\tif (preparedStatement != null)\r\n\t\t\t\tpreparedStatement.close();\r\n\t\t} finally {\r\n\t\t\tif (connection != null)\r\n\t\t\t\tconnection.close();\r\n\t\t}\r\n\t}", "protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}", "public static void close(Connection conn, PreparedStatement ps, ResultSet rs) {\r\n\t\ttry {\r\n\t\t\tif(rs != null && !rs.isClosed()) {\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t\tif(conn != null && !conn.isClosed()) {\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public static void fermerConnexion(Statement stmt)\n{\n if(stmt!=null)\n {\n try\n {\n stmt.close();\n }\n catch(Exception e)\n {\n System.out.println(\"Erreur lors de la fermeture d’une connexion dans fermerConnexion(Statement)\");\n }\n }\n}", "public static void closePreparedStatement(PreparedStatement pStmt) {\n\t\ttry {\n\t\t\tif (pStmt != null){\n\t\t\t\tpStmt.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Closing SQL Prepared Statement\",e,SystemCode.UNABLE_TO_EXECUTE);\n\n\t\t}\n\n\t}", "public void closeConnection()\n {\n try{\n if(statement!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close statement ex:\"+ se.getMessage());\n }// do nothing\n try{\n if(connection!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close connection ex:\"+ se.getMessage());\n }//end finally try\n }", "public static void closeJDBCResources(Connection conn, Statement stmt)\n\t{\t\t\n\t\tcloseJDBCStatement(stmt);\t\t\n\t\tcloseJDBCConnection(conn);\n\t}", "public static void closeStatement(PreparedStatement statement) throws SQLException {\n\tif (null != statement) {\n\t statement.close();\n\t}\n }", "public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }", "public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }", "void checkClosed() throws SQLException {\n\n if (result == null) { throw Message.getSQLException(ErrorCode.OBJECT_CLOSED); }\n if (stat != null) {\n stat.checkClosed();\n }\n if (conn != null) {\n conn.checkClosed();\n }\n }", "public static void closeConnection(Connection con, ResultSet rs,\n\t\tPreparedStatement ps) throws SQLException {\n\tif(null!=con)\n\t\tcon.close();\n\tif(null!=rs)\n\t\trs.close();\n if(null!=ps)\n\t\tps.close();\n\n}", "public static void close(PreparedStatement psmt) {\n\t\tif(psmt!=null){\r\n\t\t\ttry {\r\n\t\t\t\tpsmt.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void closeConnections(ResultSet rs, Statement stmt, Connection con) {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stmt != null) {\n stmt.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception exp) {\n exp.printStackTrace();\n }\n }", "@Override public void close() throws SQLException {\r\n connection.close();\r\n connection = null;\r\n }", "private static void closeStatement(PreparedStatement statement) throws ProfileKeyManagerPersistenceException {\n try {\n statement.close();\n } catch (SQLException ex) {\n throw new ProfileKeyManagerPersistenceException(\"error closing statement: \" + ex.getMessage(), ex);\n }\n }", "public void tidyConnection(Connection conn, Statement sp_stmt, ResultSet rs)\r\n throws MapflowAppException {\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n rs = null;\r\n }\r\n if (sp_stmt != null) {\r\n try {\r\n sp_stmt.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n sp_stmt = null;\r\n }\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n conn = null;\r\n }\r\n }", "public static void closeJDBCStatement(Statement stmt)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t\tstmt = null;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{ \n\t\t\tSystem.out.println(\"DBManager.java > closeJDBCStatement() - ERROR closing JDBC statement: \" + e.getMessage()); \n\t\t}\n\t}", "protected void finalize() throws Throwable {\n if (selectStatement != null) try {\n selectStatement.close();\n } catch (Exception e) {}\n if (insertStatement != null) try {\n insertStatement.close();\n } catch (Exception e) {}\n if (updateStatement != null) try {\n updateStatement.close();\n } catch (Exception e) {}\n super.finalize();\n }", "public void closeConnection(Connection conn) throws SQLException;", "public static void cleanup(PreparedStatement pstmt, ResultSet rs){\n try {\n //STEP 6: Clean-up environment\n rs.close();\n pstmt.close();\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n } finally {\n //finally block used to close resources\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n } catch (SQLException se2) {\n }// nothing we can do; end finally try\n }//end try\n }", "@Override\n public boolean hasPreparedStatement() {\n return true;\n }", "@Override\n\tpublic void disconnect() throws SQLException {\n if (jdbcConnection != null && !jdbcConnection.isClosed()) {\n jdbcConnection.close();\n }\t\t \n\t\t\n\t}", "private void closeResources(Connection connection, PreparedStatement statement, ResultSet resultSet) {\n JdbcClose.close(resultSet);\n JdbcClose.close(statement);\n JdbcClose.close(connection);\n }", "private void close(Statement stmt) {\n\t\tif (stmt != null) {\n\t\t\ttry {\n\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public static void closeConnection(Connection connection, PreparedStatement preparedStatement,\n ResultSet resultSet) {\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n log.warn(\"Error closing database connection\", e);\n }\n }\n\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n log.warn(\"Error closing prepared statement.\", e);\n }\n }\n\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n log.warn(\"Error closing result set.\", e);\n }\n }\n }", "public void close() throws SQLException;", "public void close() throws SQLException {\n enable_stmt.close();\n disable_stmt.close();\n show_stmt.close();\n }", "private static void closeResource(PreparedStatement resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\tpublic void finalize() {\r\n\t try {\r\n\t if (con != null) {\r\n\t con.close();\r\n\t }\r\n\t } catch (SQLException sqlex) {\r\n\t System.out.println(sqlex);\r\n\t }\r\n\t }", "private static void close(Connection myConnection, Statement myStatment, ResultSet myResultSet) throws SQLException{\n\t\tif (myResultSet != null) {\n\t\t\tmyResultSet.close();\n\t\t}\n\t\t\n\t\tif (myStatment != null) {\n\t\t\tmyStatment.close();\n\t\t}\n\t\t\n\t\tif (myConnection != null) {\n\t\t\tmyConnection.close();\n\t\t}\n\t}", "public static void releaseResource(PreparedStatement ps) {\r\n\t\tif (ps != null) {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"couldn't release statment, \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void close() throws SQLException;", "public boolean isClosed() throws SQLException {\n return currentPreparedStatement.isClosed();\n }", "private void save(Connection paramConnection)\r\n/* 79: */ throws SQLException\r\n/* 80: */ {\r\n/* 81:109 */ PreparedStatement localPreparedStatement = paramConnection.prepareStatement(\"MERGE INTO hub (account_id, min_fee_per_byte, uris, height) KEY (account_id, height) VALUES (?, ?, ?, ?)\");Object localObject1 = null;\r\n/* 82: */ try\r\n/* 83: */ {\r\n/* 84:111 */ int i = 0;\r\n/* 85:112 */ localPreparedStatement.setLong(++i, getAccountId());\r\n/* 86:113 */ localPreparedStatement.setLong(++i, getMinFeePerByteNQT());\r\n/* 87:114 */ localPreparedStatement.setObject(++i, getUris().toArray(new String[getUris().size()]));\r\n/* 88:115 */ localPreparedStatement.setInt(++i, Nxt.getBlockchain().getHeight());\r\n/* 89:116 */ localPreparedStatement.executeUpdate();\r\n/* 90: */ }\r\n/* 91: */ catch (Throwable localThrowable2)\r\n/* 92: */ {\r\n/* 93:109 */ localObject1 = localThrowable2;throw localThrowable2;\r\n/* 94: */ }\r\n/* 95: */ finally\r\n/* 96: */ {\r\n/* 97:117 */ if (localPreparedStatement != null) {\r\n/* 98:117 */ if (localObject1 != null) {\r\n/* 99: */ try\r\n/* 100: */ {\r\n/* 101:117 */ localPreparedStatement.close();\r\n/* 102: */ }\r\n/* 103: */ catch (Throwable localThrowable3)\r\n/* 104: */ {\r\n/* 105:117 */ ((Throwable)localObject1).addSuppressed(localThrowable3);\r\n/* 106: */ }\r\n/* 107: */ } else {\r\n/* 108:117 */ localPreparedStatement.close();\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }\r\n/* 112: */ }", "public void closeConnection() throws SQLException;", "private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }", "@Override\n public void prepare(PreparedStatement statement) {\n }", "public static void closeJDBCResources(Connection conn){\n\t\ttry\n\t\t{\n\t\t\tif(conn != null)\n\t\t\t{\n\t\t\t\tconn.close();\n\t\t\t\tconn = null;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e){ /*IGNORE*/ }\n\t}", "public static void close(PreparedStatement ps, ResultSet rs) {\r\n\t\ttry {\r\n\t\t\tif(rs != null && !rs.isClosed()) {\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }", "@Override\n public void closeConnection() throws SQLException{\n getConnection().close();\n }", "public static void close(Statement stmt) throws SQLException {\r\n if (stmt != null) {\r\n stmt.close();\r\n }\r\n }", "public void finalizarInsercion(PreparedStatement stm){\n try {\n stm.executeUpdate();\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public static void closeConnection() throws SQLException{\n\t\tif( conn != null ){\n\t\t\tlogger.info(\"Closing connection.\");\n\t\t\tconn.close();\n\t\t\tconn = null;\n\n\t\t}\n\t}", "void closeInternal() throws SQLException {\n\n if (result != null) {\n try {\n result.close();\n if (closeStatement && stat != null) {\n stat.close();\n }\n }\n finally {\n columnCount = 0;\n result = null;\n stat = null;\n conn = null;\n insertRow = null;\n updateRow = null;\n }\n }\n }", "public void close(Statement ps) {\n if (ps!=null){\n try {\n ps.close();\n } catch (SQLException ignore) {\n }\n }\n }", "@Override\n public void close() throws SQLException {\n }", "public static void closeObjects(String caller, Connection con, Statement stmt) {\n try {\n if (stmt != null) stmt.close();\n } catch (Exception exc) {\n //noinspection ThrowableInstanceNeverThrown\n StackTraceElement[] se = new Throwable().getStackTrace();\n LOG.error(((caller != null) ? caller + \" f\" : \"F\") + \"ailed to close the statement(s): \"\n + exc.getMessage() + \" Calling line: \" + se[2].toString());\n }\n if (con != null) {\n try {\n if (!con.isClosed()) {\n con.close();\n }\n } catch (SQLException exc) {\n //noinspection ThrowableInstanceNeverThrown\n FxDbException dbExc = new FxDbException(((caller != null) ? caller + \" is u\" : \"U\")\n + \"nable to close the db connection\");\n LOG.error(dbExc);\n System.err.println(dbExc.getMessage());\n }\n }\n }", "@Override\n\tpublic void destroy() {\n\t\ttry {\n//\t\t\tif(stmt!=null&&!stmt.isClosed()){\n//\t\t\t\tstmt.close();\n//\t\t\t}\n\t\t\tif(conn!=null&&conn.isClosed()){\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tsuper.destroy();\n\t}", "@Override\n public void closeConnection() {\n if (connection != null) {\n try {\n //restore autocommit value\n connection.setAutoCommit(autoCommit);\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Can't close connection \", e);\n }\n }\n }", "public final void dispose() {\n\ttry { if (resultSet != null) resultSet.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tresultSet = null;\n\n\ttry { if (stmt != null) stmt.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tstmt = null;\n }", "public void closeConnection() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException sqlEx) {\n dbg(\"closeConnection-->SQLException raised while closing conn =\" + sqlEx.getMessage());\n }\n }\n }", "public static boolean closeAll(final ILogger aLogger, final Statement aStatement){\r\n if (aStatement==null) return true;\r\n try {\r\n Connection con = aStatement.getConnection();\r\n aStatement.close();\r\n con.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeAll\", \"Statement, and Connection failed.\", ex);\r\n return false;\r\n }\r\n }", "public void close () throws SQLException {\r\n\t\tconn.close();\r\n\t}", "public static void closeQuietly(Connection conn, Statement stmt, ResultSet rs) {\r\n try {\r\n closeQuietly(rs);\r\n } finally {\r\n try {\r\n closeQuietly(stmt);\r\n } finally {\r\n closeQuietly(conn);\r\n }\r\n }\r\n }", "public void Cleanup(Statement stat, ResultSet rs) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n\tif (rs != null) {\r\n\t try {\r\n\t\trs.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "public static void closeConnection(){\r\n\t\tif(connection != null)\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException 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}", "@Override\n\tpublic void close() throws SQLException {\n\t\t//Commit must be explicit before closing the connection\n\t\tconnection.commit();\n\t\tconnection.close();\n\t}", "public void closeConnection() throws SQLException {\n conn.close();\r\n }", "private void closeConnection(Connection dbConnection) throws SQLException {\r\n\t\tif (dbConnection != null) {\r\n\t\t\tdbConnection.close();\r\n\t\t}\r\n\t}", "public void cancel() throws SQLException {\n currentPreparedStatement.cancel();\n }", "public void releaseConnection() {\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\tSystem.out.println(\"Exception closing connection: \" + ex);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }", "public static void closeJDBCResources(Connection conn, Statement stmt, ResultSet rs)\n\t{\n\t\tcloseJDBCResultSet(rs);\n\t\tcloseJDBCResources(conn, stmt);\n\t}", "public void close(ResultSet rs, PreparedStatement pst) throws BusinessException {\n\t\tclose(rs);\n\t\tclose(pst);\n\t}", "private void closeResources(final ResultSet resultSet, final PreparedStatement preparedStatement,\n\t\t\tfinal Connection connection, String methodName) throws DaoException {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" resultSetError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" preparedStatementError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" connectionError: \", e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public void close(ResultSet rs, PreparedStatement pst, Connection c) throws BusinessException {\n\t\tclose(rs, pst);\n\t\tclose(c);\n\t}", "public void closeConnection(){\r\n if (connection != null)\r\n try{\r\n log.info(\"close connection\");\r\n connection.close();\r\n }\r\n catch (SQLException e){\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "final void checkEnsure() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (this.conn == null || this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t}\r\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public static void commitAndClose(Connection conn) throws SQLException {\r\n if (conn != null) {\r\n try {\r\n conn.commit();\r\n } finally {\r\n close(conn);\r\n }\r\n }\r\n }", "private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() throws SQLException {\r\n connection.close();\r\n }", "public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }", "public static void commitAndCloseQuietly(Connection conn) {\r\n try {\r\n commitAndClose(conn);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "public void close(){\r\n if(conn!=null){\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n System.out.println(\"Error al cerrar la base de datos: \\n\"+ex.getMessage());\r\n }\r\n }\r\n }", "@Override protected void finalize() {\r\n if (connection != null)\r\n throw new ORM8RuntimeException(\"DbConnection not closed for \" + connectionString);\r\n }", "public static void closeQuietly(Statement stmt) {\r\n try {\r\n close(stmt);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }" ]
[ "0.68288916", "0.6803542", "0.66732", "0.6665013", "0.6626564", "0.6583309", "0.65444773", "0.6514784", "0.6500658", "0.64986455", "0.6387501", "0.63703823", "0.63549894", "0.63074625", "0.63027847", "0.6267378", "0.6264388", "0.6254397", "0.6237788", "0.622723", "0.62243986", "0.62000376", "0.6190007", "0.6179435", "0.61547357", "0.6139152", "0.6129312", "0.61249703", "0.6086792", "0.6048186", "0.6047666", "0.6032106", "0.6005552", "0.6003071", "0.60017985", "0.5975929", "0.59565634", "0.59526354", "0.5942733", "0.59414977", "0.59368515", "0.5923079", "0.5918866", "0.591631", "0.59157646", "0.591063", "0.5907625", "0.5888554", "0.5885217", "0.58836275", "0.58780915", "0.58684534", "0.5860926", "0.5860137", "0.5847616", "0.58368146", "0.5829083", "0.58268136", "0.5816807", "0.58035517", "0.58025056", "0.5788046", "0.57851875", "0.5779007", "0.5771889", "0.5768853", "0.5747995", "0.5747892", "0.574649", "0.5734027", "0.5725394", "0.57200253", "0.5715605", "0.5705722", "0.5699987", "0.56948125", "0.56902343", "0.567874", "0.56786114", "0.56674474", "0.56641483", "0.5656258", "0.56559944", "0.5640085", "0.5638402", "0.56381375", "0.5632574", "0.5632574", "0.56260526", "0.56260407", "0.56260407", "0.56260407", "0.5615286", "0.560784", "0.56061935", "0.55991495", "0.5594713", "0.5593154", "0.55913466", "0.5591197" ]
0.68496406
0
Checks that the given PreparedStatement and ResultSet are not null, and then closes them. It is used in methods that are given a Connection and can use that same connection after the method is used.
public static void close(PreparedStatement ps, ResultSet rs) { try { if(rs != null && !rs.isClosed()) { rs.close(); } if(ps != null && !ps.isClosed()) { ps.close(); } } catch (SQLException e) { throw new RuntimeException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void closing(Connection connection, PreparedStatement preparedStatement, ResultSet rs) {\n try {\n if (rs != null) {\n rs.close();\n preparedStatement.close();\n connection.close();\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n }\n }", "public static void cleanup(PreparedStatement pstmt, ResultSet rs){\n try {\n //STEP 6: Clean-up environment\n rs.close();\n pstmt.close();\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n } finally {\n //finally block used to close resources\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n } catch (SQLException se2) {\n }// nothing we can do; end finally try\n }//end try\n }", "private void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement) {\r\n\r\n\t\tlogger.entering(CLASSNAME, \"cleanupConnection\", new Object[] {conn, rs, statement});\r\n\t\t\r\n\t\tif (statement != null) {\r\n\t\t\ttry {\r\n\t\t\t\tstatement.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (rs != null) {\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (conn != null) {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t} finally {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\tthrow new PersistenceException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.exiting(CLASSNAME, \"cleanupConnection\");\r\n\t}", "private void closeResultSet(ResultSet rs)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (rs != null)\r\n\t\t\t{\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException ex) {} // nothing we can do!\r\n\t}", "public static void close(Connection conn, PreparedStatement ps, ResultSet rs) {\r\n\t\ttry {\r\n\t\t\tif(rs != null && !rs.isClosed()) {\r\n\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t\tif(conn != null && !conn.isClosed()) {\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "private void closeResources(Connection connection, PreparedStatement statement, ResultSet resultSet) {\n JdbcClose.close(resultSet);\n JdbcClose.close(statement);\n JdbcClose.close(connection);\n }", "public static void closeResultSet (ResultSet rs) {\n\t\ttry { \n\t\t\tif (rs != null)\n\t\t\t\trs.close(); \n\t\t} catch (SQLException e) {\t\t\n\t\t}\n\t}", "public static void closeJDBCResultSet(ResultSet rs)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(rs != null)\n\t\t\t{\n\t\t\t\trs.close();\n\t\t\t\trs = null;\t\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{ \n\t\t\tSystem.out.println(\"DBManager.java > closeJDBCResultSet() - ERROR closing JDBC ResultSet: \" + e.getMessage()); \n\t\t}\n\t}", "public static void close(ResultSet rs) throws SQLException {\r\n if (rs != null) {\r\n rs.close();\r\n }\r\n }", "public static void closeConnection(Connection con, ResultSet rs,\n\t\tPreparedStatement ps) throws SQLException {\n\tif(null!=con)\n\t\tcon.close();\n\tif(null!=rs)\n\t\trs.close();\n if(null!=ps)\n\t\tps.close();\n\n}", "private void closeConnections(ResultSet rs, Statement stmt, Connection con) {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stmt != null) {\n stmt.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception exp) {\n exp.printStackTrace();\n }\n }", "public void close(ResultSet rs, PreparedStatement pst) throws BusinessException {\n\t\tclose(rs);\n\t\tclose(pst);\n\t}", "public static void attemptClose(Connection c, PreparedStatement p, ResultSet o)\n {\n attemptClose(c);\n attemptClose(p);\n attemptClose(o);\n }", "public final void dispose() {\n\ttry { if (resultSet != null) resultSet.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tresultSet = null;\n\n\ttry { if (stmt != null) stmt.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tstmt = null;\n }", "public void closeResultSet() {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void Cleanup(Statement stat, ResultSet rs) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n\tif (rs != null) {\r\n\t try {\r\n\t\trs.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "private static void close(Connection myConnection, Statement myStatment, ResultSet myResultSet) throws SQLException{\n\t\tif (myResultSet != null) {\n\t\t\tmyResultSet.close();\n\t\t}\n\t\t\n\t\tif (myStatment != null) {\n\t\t\tmyStatment.close();\n\t\t}\n\t\t\n\t\tif (myConnection != null) {\n\t\t\tmyConnection.close();\n\t\t}\n\t}", "public void close() throws SQLException {\n\t\tif(stmt != null)\n\t\t\tstmt.close();\n\t\t\tstmt = null;\n\t\tif(connection != null)\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t}", "public void closeResultSet(ResultSet rs) {\n if(rs!=null){\n try {\n rs.close();\n logger.info(\"Closing Result Set\");\n } catch (SQLException e) {\n logger.error(\"Error while closing result set\",e);\n }\n }\n }", "public void close(ResultSet rs) {\n if (rs!=null){\n try {\n rs.close();\n } catch (SQLException ignore) {\n }\n }\n }", "public void close() throws SQLException {\n currentPreparedStatement.close();\n }", "private void closePreparedStatement(final PreparedStatement preparedStatement, final String methodName)\n\t\t\tthrows DaoException {\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \"preparedStatementError: \" + e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public static void closeJDBCResources(Connection conn, Statement stmt, ResultSet rs)\n\t{\n\t\tcloseJDBCResultSet(rs);\n\t\tcloseJDBCResources(conn, stmt);\n\t}", "private void close(ResultSet rs) {\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void close() throws SQLException {\n Exception foundExeption = null;\n for (PreparedStatement prep : prepHash.values()) {\n try {\n prep.close();\n } catch (Exception e) {\n foundExeption = e;\n }\n }\n // Close the connection\n try {\n conn.close();\n } catch (SQLException e) {\n throw new SQLException(\"Failed to close database: \" + e);\n }\n\n\n // we do this so we know we tried to close every connection\n // unfortunately we only recieve the final connection error\n if (foundExeption != null) {\n throw new SQLException(\"Failed to close database prepareStatement: \"\n + foundExeption);\n }\n }", "protected void safeClose() {\n try {\n if (stmt != null) {\n stmt.close();\n }\n } catch (SQLException e) {\n Exceptions.handle()\n .to(OMA.LOG)\n .error(e)\n .withSystemErrorMessage(\"An error occurred while closing a prepared statement: %s (%s)\")\n .handle();\n } finally {\n stmt = null;\n }\n }", "public void closeStatement() {\n\t\tif (stmt != null) {\n\t\t\ttry {\n\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t\tif (pstmt != null) {\n\t\t\ttry {\n\t\t\t\tpstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t\tse2.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "public void closePreparedStatement(PreparedStatement ps) {\n if(ps!=null){\n try {\n ps.close();\n logger.info(\"Closing Prepared Statement\");\n } catch (SQLException e) {\n logger.error(\"Error while closing prepared statement\",e);\n }\n }\n }", "public static void closeQuietly(Connection conn, Statement stmt, ResultSet rs) {\r\n try {\r\n closeQuietly(rs);\r\n } finally {\r\n try {\r\n closeQuietly(stmt);\r\n } finally {\r\n closeQuietly(conn);\r\n }\r\n }\r\n }", "private void closeResources(final ResultSet resultSet, final PreparedStatement preparedStatement,\n\t\t\tfinal Connection connection, String methodName) throws DaoException {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" resultSetError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (preparedStatement != null) {\n\t\t\t\tpreparedStatement.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" preparedStatementError: \", e);\n\t\t}\n\t\ttry {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(\"DaoAdminImpl: \" + methodName + \" connectionError: \", e);\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public void closeStatement(PreparedStatement ps)\n {\n try {\n if(ps != null) {\n ps.close();\n }\n } catch (SQLException ex) {\n }\n }", "public static void closeJDBCResources(Connection conn, Statement stmt)\n\t{\t\t\n\t\tcloseJDBCStatement(stmt);\t\t\n\t\tcloseJDBCConnection(conn);\n\t}", "public static void closeConnection(Connection connection, PreparedStatement preparedStatement,\n ResultSet resultSet) {\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n log.warn(\"Error closing database connection\", e);\n }\n }\n\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n log.warn(\"Error closing prepared statement.\", e);\n }\n }\n\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n log.warn(\"Error closing result set.\", e);\n }\n }\n }", "public void close(ResultSet rs, PreparedStatement pst, Connection c) throws BusinessException {\n\t\tclose(rs, pst);\n\t\tclose(c);\n\t}", "public static void closeStatement(PreparedStatement statement) throws SQLException {\n\tif (null != statement) {\n\t statement.close();\n\t}\n }", "public static boolean closeRsAndStatement(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n aResultSet.close();\r\n stm.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeRsAndStatement\", \"Failed.\", ex);\r\n return false;\r\n }\r\n }", "public static void close(ResultSet rs) {\n\t\tif(rs!=null){\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void close(ResultSet rs, Statement st, Connection con) {\n\t\ttry {\n\t\t\tif (rs != null) {\n\t\t\t\trs.close();\n\t\t\t}\n\t\t\tif (st != null) {\n\t\t\t\tst.close();\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tLogger.println(e);\n\t\t}\n\t}", "public static void close(Connection conn, PreparedStatement ps) {\r\n\t\ttry {\r\n\t\t\tif(ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t\tif(conn != null && !conn.isClosed()) {\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t}", "private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }", "public static void close( ResultSet rs ) {\n closeResultSet( rs );\n }", "public void disconnect() {\n \t for (PreparedStatementID i: _preparedStatements.keySet()) {\n \t try { _preparedStatements.get(i).close(); } catch (SQLException ignore) {}\n \t }\n \t _preparedStatements.clear();\n \t // Close the database connection:\n \t try {con.close(); } catch (SQLException ignore) {}\n \t con = null;\n \t return;\n \t }", "public void tidyConnection(Connection conn, Statement sp_stmt, ResultSet rs)\r\n throws MapflowAppException {\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n rs = null;\r\n }\r\n if (sp_stmt != null) {\r\n try {\r\n sp_stmt.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n sp_stmt = null;\r\n }\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n }\r\n catch (final SQLException sqe) {\r\n // logger.info(\"Unexpected exception closing rs: \"+\r\n // sqe.toString() + \", sqlstate = \" + sqe.getSQLState());\r\n // do nothing as this is tidy up\r\n // could do a sysout of the code...\r\n }\r\n conn = null;\r\n }\r\n }", "@Test\n public void testPreparedStatementOneClosed() throws Throwable\n {\n Connection c = null;\n Statement st = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try\n {\n assertNotNull(ds);\n c = ds.getConnection();\n assertNotNull(c);\n \n st = c.createStatement();\n assertNotNull(st);\n \n // Create\n st.execute(\"CREATE TABLE Employees (Employee_ID INTEGER, Name VARCHAR(30));\");\n st.execute(\"INSERT INTO Employees VALUES (1, '#1')\");\n st.execute(\"INSERT INTO Employees VALUES (2, '#2')\");\n \n // Prepared statement\n pstmt = c.prepareStatement(\"SELECT * FROM Employees WHERE Employee_ID = ?\");\n assertNotNull(pstmt);\n \n pstmt.close();\n \n pstmt.setInt(1, 1);\n \n rs = pstmt.executeQuery();\n \n fail(\"Able to execute prepared statement\");\n }\n catch (SQLException e)\n {\n // Ok\n }\n finally\n {\n if (rs != null)\n {\n try\n {\n rs.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (pstmt != null)\n {\n try\n {\n pstmt.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (st != null)\n {\n // Drop\n st.execute(\"DROP TABLE Employees\");\n \n try\n {\n st.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n \n if (c != null)\n {\n try\n {\n c.close();\n }\n catch (SQLException ignore)\n {\n // Ignore\n }\n }\n }\n }", "public void close() throws SQLException {\n stmt.close();\n con.close();\n isOpen = false;\n }", "public void close()\n throws SQLException\n {\n m_rs.close();\n }", "public static void cerrarConnect(ResultSet rs, Statement stmt){\n if(rs !=null){\n try{\n rs.close();\n }catch(SQLException e){}\n }\n \n if(stmt!=null){\n try {\n stmt.close();\n } catch (SQLException e) {}\n }\n }", "public static void closeQuietly(ResultSet rs) {\r\n try {\r\n close(rs);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "public static void releaseResource(PreparedStatement ps) {\r\n\t\tif (ps != null) {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"couldn't release statment, \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void closeJDBCStatement(Statement stmt)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t\tstmt = null;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{ \n\t\t\tSystem.out.println(\"DBManager.java > closeJDBCStatement() - ERROR closing JDBC statement: \" + e.getMessage()); \n\t\t}\n\t}", "public static boolean closeAll(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n Statement stm = aResultSet.getStatement();\r\n Connection con = stm.getConnection();\r\n aResultSet.close();\r\n stm.close();\r\n con.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"closeAll\", \"ResultSet, Statement, and Connection failed.\", ex);\r\n return false;\r\n }\r\n }", "protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}", "public void close() {\n try {\n con.close();\n } catch (SQLException se) { /*can't do anything */ }\n try {\n stmt.close();\n } catch (SQLException se) { /*can't do anything */ }\n }", "public void close() throws SQLException {\n enable_stmt.close();\n disable_stmt.close();\n show_stmt.close();\n }", "private static void closeResource(PreparedStatement resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "void checkClosed() throws SQLException {\n\n if (result == null) { throw Message.getSQLException(ErrorCode.OBJECT_CLOSED); }\n if (stat != null) {\n stat.checkClosed();\n }\n if (conn != null) {\n conn.checkClosed();\n }\n }", "public void closeConnection() throws SQLException {\r\n\t\ttry {\r\n\t\t\tif (preparedStatement != null)\r\n\t\t\t\tpreparedStatement.close();\r\n\t\t} finally {\r\n\t\t\tif (connection != null)\r\n\t\t\t\tconnection.close();\r\n\t\t}\r\n\t}", "public static void closeAll(Connection conn, Statement stmt, ResultSet rs)\n throws EJBException {\n try {\n if (rs != null) rs.close();\n if (stmt != null) stmt.close();\n if (conn != null) conn.close();\n\n } catch (SQLException e) {\n throw new EJBException(\"Error closing SQL objects\", e);\n }\n }", "public void ExitStatements() {\n try {\n preparedStatement.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitStatements(): \"+e.getMessage());\n }\n }", "public void closeResources(Connection conn, Statement stmt, ResultSet res) {\n\t\ttry {\n\t\t\tif (res != null) {\n\t\t\t\tres.close();\n\t\t\t}\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "void closeInternal() throws SQLException {\n\n if (result != null) {\n try {\n result.close();\n if (closeStatement && stat != null) {\n stat.close();\n }\n }\n finally {\n columnCount = 0;\n result = null;\n stat = null;\n conn = null;\n insertRow = null;\n updateRow = null;\n }\n }\n }", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public void cerrarRecursos() {\r\n\t\tfor(Object ob : recursos){\r\n\t\t\tif(ob instanceof PreparedStatement)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t((PreparedStatement) ob).close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void cerrarRecursos() {\n\t\tfor(Object ob : recursos){\n\t\t\tif(ob instanceof PreparedStatement)\n\t\t\t\ttry {\n\t\t\t\t\t((PreparedStatement) ob).close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }", "private void disconnect(ResultSet resultSet, Statement statement, Connection connection) throws SQLException{\n if (resultSet != null) {\n resultSet.close(); //disconnect from resultSet\n }\n\n if (statement != null) {\n statement.close(); //disconnect from statement\n }\n\n if (connection != null) {\n connection.close(); //disconnect from database\n }\n }", "public static void close(ResultSet rs) {\n\t\ttry {\n\t\t\trs.close();\n\t\t} catch(SQLException e){\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t}", "private void checkClosedResultSet() {\n if(closed) {\n throw new IllegalStateException(\"Resultset is already closed\");\n }\n }", "public static void closePreparedStatement(PreparedStatement pStmt) {\n\t\ttry {\n\t\t\tif (pStmt != null){\n\t\t\t\tpStmt.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Closing SQL Prepared Statement\",e,SystemCode.UNABLE_TO_EXECUTE);\n\n\t\t}\n\n\t}", "private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}", "private void close(Statement stmt) {\n\t\tif (stmt != null) {\n\t\t\ttry {\n\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void closeSourse()\r\n/* 44: */ {\r\n/* 45: */ try\r\n/* 46: */ {\r\n/* 47: 41 */ if (this.rs != null)\r\n/* 48: */ {\r\n/* 49: 42 */ this.rs.close();\r\n/* 50: 43 */ this.rs = null;\r\n/* 51: */ }\r\n/* 52: 45 */ if (this.ps != null)\r\n/* 53: */ {\r\n/* 54: 46 */ this.ps.close();\r\n/* 55: 47 */ this.ps = null;\r\n/* 56: */ }\r\n/* 57: 49 */ if (this.ct != null)\r\n/* 58: */ {\r\n/* 59: 50 */ this.ct.close();\r\n/* 60: 51 */ this.ct = null;\r\n/* 61: */ }\r\n/* 62: */ }\r\n/* 63: */ catch (SQLException e)\r\n/* 64: */ {\r\n/* 65: 55 */ e.printStackTrace();\r\n/* 66: */ }\r\n/* 67: */ }", "public static void close(PreparedStatement psmt) {\n\t\tif(psmt!=null){\r\n\t\t\ttry {\r\n\t\t\t\tpsmt.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void close(Statement stmt) throws SQLException {\r\n if (stmt != null) {\r\n stmt.close();\r\n }\r\n }", "@Override public void close() throws SQLException {\r\n connection.close();\r\n connection = null;\r\n }", "private static void closeStatement(PreparedStatement statement) throws ProfileKeyManagerPersistenceException {\n try {\n statement.close();\n } catch (SQLException ex) {\n throw new ProfileKeyManagerPersistenceException(\"error closing statement: \" + ex.getMessage(), ex);\n }\n }", "private void flush() {\n\t\ttry {\n\t\t\tif (mResultSet != null) {\n\t\t\t\tmResultSet.close();\n\t\t\t}\n\n\t\t\tif (mStatement != null) {\n\t\t\t\tmStatement.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public void cleanup(){\n try{\n if (this._connection != null){\n this._connection.close ();\n }//end if\n }catch (SQLException e){\n // ignored.\n }//end try\n }", "@Override\n\t\tpublic void close(ResultSet res, com.mysql.jdbc.Statement stm,\n\t\t\t\tConnection conn) {\n\t\t\t\n\t\t}", "public void close(Statement ps) {\n if (ps!=null){\n try {\n ps.close();\n } catch (SQLException ignore) {\n }\n }\n }", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "private static void closeResource(ResultSet resource) {\r\n if (resource != null) {\r\n try {\r\n resource.close();\r\n } catch (SQLException e) { /* do nothing */ }\r\n }\r\n }", "public static void closeJDBCResources(Connection conn){\n\t\ttry\n\t\t{\n\t\t\tif(conn != null)\n\t\t\t{\n\t\t\t\tconn.close();\n\t\t\t\tconn = null;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e){ /*IGNORE*/ }\n\t}", "@Override\n\tpublic void destroy() {\n\t\ttry {\n//\t\t\tif(stmt!=null&&!stmt.isClosed()){\n//\t\t\t\tstmt.close();\n//\t\t\t}\n\t\t\tif(conn!=null&&conn.isClosed()){\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tsuper.destroy();\n\t}", "private static void close() {\n try {\n if (songResultSet != null) {\n songResultSet.close();\n }\n if (artistResultSet != null) {\n artistResultSet.close();\n }\n if (albumResultSet != null) {\n albumResultSet.close();\n }\n if (genreResultSet != null) {\n genreResultSet.close();\n }\n\n if (songStatement != null) {\n songStatement.close();\n }\n\n if (albumStatement != null) {\n albumStatement.close();\n }\n\n if (artistStatement != null) {\n artistStatement.close();\n }\n if (genreStatement != null) {\n genreStatement.close();\n }\n\n if (conn != null) {\n conn.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void close(Connection myConn, Statement mystmt, ResultSet myRs) {\n\t\ttry {\n\t\t\tif(myRs!=null)\n\t\t\t\tmyRs.close();\n\t\t\tif(mystmt!=null)\n\t\t\t\tmystmt.close();\n\t\t\tif(myConn!=null)\n\t\t\t\tmyConn.close();\n\t\t\t\n\t\t}\n\t\t\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public static void closeResultSet(String databasename) {\n DataBaseConnection.closeResultSet(databasename);\n }", "public static void closeObjects(String caller, Connection con, Statement stmt) {\n try {\n if (stmt != null) stmt.close();\n } catch (Exception exc) {\n //noinspection ThrowableInstanceNeverThrown\n StackTraceElement[] se = new Throwable().getStackTrace();\n LOG.error(((caller != null) ? caller + \" f\" : \"F\") + \"ailed to close the statement(s): \"\n + exc.getMessage() + \" Calling line: \" + se[2].toString());\n }\n if (con != null) {\n try {\n if (!con.isClosed()) {\n con.close();\n }\n } catch (SQLException exc) {\n //noinspection ThrowableInstanceNeverThrown\n FxDbException dbExc = new FxDbException(((caller != null) ? caller + \" is u\" : \"U\")\n + \"nable to close the db connection\");\n LOG.error(dbExc);\n System.err.println(dbExc.getMessage());\n }\n }\n }", "public static void closeQuietly(Statement stmt) {\r\n try {\r\n close(stmt);\r\n } catch (SQLException e) {\r\n // quiet\r\n }\r\n }", "public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (connect != null) {\n\t\t\t\tconnect.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public static void close (Connection c, Statement s, ResultSet rs) {\n\t\tcloseResultSet (rs);\n\t\tcloseStatment (s);\n\t\tcloseConnection (c);\n\t}", "public void cancel() throws SQLException {\n currentPreparedStatement.cancel();\n }", "public static boolean close(final ILogger aLogger, final ResultSet aResultSet){\r\n if (aResultSet==null) return true;\r\n try {\r\n aResultSet.close();\r\n return true;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"close\", \"ResultSet Failed.\", ex);\r\n return false;\r\n }\r\n }", "public void close() throws SQLException;", "public static void fermerConnexion(Statement stmt)\n{\n if(stmt!=null)\n {\n try\n {\n stmt.close();\n }\n catch(Exception e)\n {\n System.out.println(\"Erreur lors de la fermeture d’une connexion dans fermerConnexion(Statement)\");\n }\n }\n}", "public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }" ]
[ "0.73576546", "0.7229617", "0.7187638", "0.71810406", "0.71036786", "0.70073307", "0.7003602", "0.6999012", "0.69672674", "0.69668484", "0.6935947", "0.69130206", "0.6912705", "0.69044095", "0.6891235", "0.6884654", "0.6868493", "0.68665665", "0.68460315", "0.6841227", "0.68412006", "0.68336725", "0.68066543", "0.6791937", "0.67841685", "0.6779256", "0.6763695", "0.67541814", "0.6738544", "0.6737298", "0.66727144", "0.66516536", "0.6627717", "0.65891516", "0.65847147", "0.6562161", "0.6558317", "0.6508228", "0.6506722", "0.6465634", "0.645322", "0.64485025", "0.64480823", "0.6434549", "0.642515", "0.6418474", "0.64168835", "0.64152", "0.6387527", "0.638217", "0.6380801", "0.63785994", "0.6371612", "0.63516647", "0.63325727", "0.632447", "0.63051087", "0.62906677", "0.62856966", "0.62633234", "0.62571704", "0.6253674", "0.6253674", "0.6248737", "0.6248737", "0.6248737", "0.62116945", "0.6205285", "0.6200871", "0.6199796", "0.61977315", "0.6193617", "0.6184832", "0.61606413", "0.61527044", "0.6138384", "0.61356735", "0.6121105", "0.6116518", "0.6113505", "0.61084", "0.61048925", "0.6086682", "0.6048058", "0.6046331", "0.5991605", "0.5978727", "0.59723127", "0.5970328", "0.5970328", "0.59455615", "0.5937285", "0.59344876", "0.59286463", "0.59035206", "0.59008783", "0.59003067", "0.589634", "0.5881807", "0.58576274" ]
0.72127527
2
Parses an XML document
public static String run( String dataFile, String schemeFile ) { String res = ""; try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); docFactory.setValidating( false ); docFactory.setNamespaceAware( true ); SchemaFactory factory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI ); docFactory.setSchema( factory.newSchema( new Source[] { new StreamSource( schemeFile ) } ) ); DocumentBuilder builder = docFactory.newDocumentBuilder(); builder.setErrorHandler( new ErrorHandler() { @Override public void warning(SAXParseException exception) throws SAXException { throw exception; } @Override public void error(SAXParseException exception) throws SAXException { throw exception; } @Override public void fatalError(SAXParseException exception) throws SAXException { throw exception; } }); Document doc = builder.parse( new InputSource( dataFile ) ); return ""; } catch (SAXException | IOException | ParserConfigurationException ex) { return ex.getMessage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseXML(String XML);", "public abstract XMLDocument parse(URL url);", "public void parseXML(String xmlString) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); \n Document document = null; \n try { \n //DOM parser instance \n DocumentBuilder builder = builderFactory.newDocumentBuilder(); \n \n //parse an XML file into a DOM tree, in this case, change the filepath to xml String \n document = builder.parse(new File(filePath));\n \n //get root element, which is <Airports>\n Element rootElement = document.getDocumentElement(); \n \n //traverse child elements. retrieve all the <Airport>\n NodeList nodes = rootElement.getChildNodes(); \n for (int i=0; i < nodes.getLength(); i++) \n { \n Node node = nodes.item(i); \n if (node.getNodeType() == Node.ELEMENT_NODE) { \n Element airport = (Element) node; \n \n //process child element \n String code = airport.getAttribute(\"Code\");\n String name = airport.getAttribute(\"Name\"); \n \n // child node of airport\n NodeList airportChildren = airport.getChildNodes();\n \n // value of longitude & latitude\n String longitude = airportChildren.item(1).getTextContent();\n String latitude = airportChildren.item(2).getTextContent();\n \n Location location = new Location(longitude, latitude);\n airportList.add(new Airport(code, name, location));\n } \n } \n \n // another approach to traverse all the listNode by tagName \n /*NodeList nodeList = rootElement.getElementsByTagName(\"book\"); \n if(nodeList != null) \n { \n for (int i = 0 ; i < nodeList.getLength(); i++) \n { \n Element element = (Element)nodeList.item(i); \n String id = element.getAttribute(\"id\"); \n } \n }*/\n // add the DOM object to the airportList\n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } \n }", "@Override\n\tpublic void parseXML(Element root) throws Exception {\n\t\t\n\t}", "private void parseXMLDocument(final Document doc)\r\n {\r\n Node docRoot = doc.getDocumentElement();\r\n StringBuilder indent = new StringBuilder();\r\n\r\n fullXmlTree.append(\"<\" + docRoot.getNodeName() + \">\\n\");\r\n searchTreeFromBranch(docRoot, 0, indent);\r\n fullXmlTree.append(\"</\" + docRoot.getNodeName() + \">\\n\");\r\n\r\n if (getPrintFullTree())\r\n {\r\n printFullTree();\r\n }\r\n }", "public void parseXmlFile(String fileName){\n\t\t//get the factory\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\t\n\t\ttry {\n\t\t\t//Using factory get an instance of document builder\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\n\t\t\t//parse using builder to get DOM representation of the XML file\n\t\t\tdoc = db.parse(fileName);\n\t\t} catch(ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t} catch(SAXException se) {\n\t\t\tSystem.err.println(\"Malformed XML: Make sure to provide a valid XML document.\");\n\t\t} catch(IOException ioe) {\n\t\t\tSystem.err.println(\"File not found: Path to a valid XML file has to be specified.\" );\n\t\t}\n\t}", "private void parseDocument()\n {\n\tElement docEle = dom.getDocumentElement();\n\n\t// get a nodelist of <employee> elements\n\tNodeList nl = docEle.getElementsByTagName(\"path\");\n\tif (nl != null && nl.getLength() > 0)\n\t{\n\t for (int i = 0; i < nl.getLength(); i++)\n\t {// System.out.println(i);\n\n\t\t// get the employee element\n\t\tElement el = (Element) nl.item(i);\n\n\t\t// get the Employee object\n\t\tmakeRoom(el);\n\n\t }\n\n\t //Log.d(\"NUMROOMS\", \"numRooms = \" + numDetectedRooms + \" \" + \"numHallways = \" + numDetectedHallways);\n\t}\n\t// This will read in the numbers. This is possibly useful for giving the rooms their correct numbers.\n\t// Find all of the glyphs within the room using it's coordinates and the ID designated by roomsMap.\n\t// Organize their coordinates from left to right and translate the filename to what number they are.\n\t// These numbers from left to right are the room number.\n\n\t/*\n\t * NodeList glyphs = docEle.getElementsByTagName(\"use\"); if (nl != null && glyphs.getLength() > 0) { for (int i = 0; i < glyphs.getLength(); i++) {\n\t * \n\t * //get the employee element Element el = (Element) glyphs.item(i); //System.out.println(el.getAttribute(\"id\")); String x = el.getAttribute(\"x\"); String y = el.getAttribute(\"y\");\n\t * \n\t * //Create a new Employee with the value read from the xml nodes\n\t * \n\t * myGlyphs.add(new Point((int)Double.parseDouble(x), (int)(Double.parseDouble(y))));\n\t * \n\t * } }\n\t */\n\n\t//Log.d(Constants.TAG, \"XMLReader::parseDocument() Exiting!\");\n }", "public static Document parseXML(String xmlContent) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\tif (!StringUtils.isEmpty(xmlContent))\r\n\t\t{\r\n\t\t\txmlDoc = parseXML(new ByteArrayInputStream(xmlContent.getBytes()));\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}", "public void parseDocument(String XMLFilePath) {\n\t \n\t SAXParserFactory spf = SAXParserFactory.newInstance();\n\t try {\n\t\tSAXParser sp = spf.newSAXParser();\n\t\tsp.parse(XMLFilePath, this);\n\t }catch(SAXException se) {\n\t\tse.printStackTrace();\n\t }catch(ParserConfigurationException pce) {\n\t\tpce.printStackTrace();\n\t }catch (IOException ie) {\n\t\tie.printStackTrace();\n\t }\n\t}", "void readXML(Element elem) throws XMLSyntaxError;", "private Document parse(String path) throws DocumentException, MalformedURLException {\n File file = new File(path);\r\n SAXReader saxReader = new SAXReader();\r\n return saxReader.read(file);\r\n }", "public void parse(XmlDocument document, Reader in) throws Exception {\n\t\tURL url = document.getURL();\n\t\tparse(document, url, null, in, null, null);\n\t}", "public static void parseXML(String filename) {\n SAXBuilder builder = new SAXBuilder();\n \n //reading XML document\n Document xml = null;\n try {\n xml = builder.build(new File(filename));\n } catch (JDOMException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n //getting root element from XML document\n Element root = xml.getRootElement();\n if (root != null)\n {\n\t Element queryNode = root.getChild(\"query\");\n\t if (queryNode != null)\n\t {\n\t\t Element rcNode = queryNode.getChild(\"recentchanges\");\n\t\t \n\t\t List<Element> rcList = rcNode.getChildren();\n\t\t \n\t\t \n\t\t \n\t\t //Iterating over all childs in XML\n\t\t Iterator<Element> itr = rcList.iterator();\n\t\t while(itr.hasNext()){\n\t\t \tElement rc = itr.next();\n\t\t \tString user = rc.getAttributeValue(\"user\");\n\t\t \tString userId = rc.getAttributeValue(\"userid\");\n\t\t \tString pageId = rc.getAttributeValue(\"pageid\");\n\t\t \tString title = rc.getAttributeValue(\"title\");\n\t\t \tString timestamp = rc.getAttributeValue(\"timestamp\");\n\t\t \tString comments = rc.getAttributeValue(\"comment\");\n\t\t \tString type = rc.getAttributeValue(\"type\");\n\t\t \tString oldRevId = rc.getAttributeValue(\"old_revid\");\n\t\t \tString newRevId = rc.getAttributeValue(\"revid\");\n\t\t \tString recentChangeId = rc.getAttributeValue(\"rcid\");\n\t\t \t\n\t\t// \t //reading attribute from Element using JDOM\n\t\t// System.out.println(\"User: \" + user + \" | User_ID: \" + userId + \" | Page_ID: \" + pageId + \n\t\t// \t\t\" | Title: \" + title + \" | Timestamp: \" + timestamp + \" | Recent_Change_ID: \" + recentChangeId + \" | Old_Rev_ID: \" + oldRevId + \n\t\t// \t\t\" | New_Rev_ID: \" + newRevId + \" | Type: \" + type); \n\t\t \t\n\t\t \ttry {\n\t\t\t\t\t\tcluster.writeWikiResults(user, userId, timestamp, pageId, title, recentChangeId, oldRevId, newRevId, type);\n\t\t\t\t\t\t System.out.println(count++);\n\t\t\t\t\t} catch (ParseException 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} 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 }\n\t }\n } \n }", "public static Document parseXMLFile(final String fileName) throws IOException {\n\t\treturn parseXMLFile(new File(fileName));\n\t}", "public void parse(XmlDocument document, InputStream in) throws Exception {\n\t\tURL url = document.getURL();\n\t\tparse(document, url, null, null, in, null);\n\t}", "public Document parse (String filePath) {\n Document document = null;\n try {\n /* DOM parser instance */\n DocumentBuilder builder = builderFactory.newDocumentBuilder();\n /* parse an XML file into a DOM tree */\n document = builder.parse(filePath);\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return document;\n }", "public Document parse(String xmlString) {\n \n Document document = null;\n try { \n //DOM parser instance\n DocumentBuilder builder = builderFactory.newDocumentBuilder();\n //parse an XML file into a DOM tree\n document = builder.parse( new InputSource( new StringReader( xmlString ) ) ); \n \n } catch (ParserConfigurationException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SAXException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(DOMParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return document;\n }", "public static synchronized Document parseToDocument(String xmlText) throws UMROException {\r\n xmlText = xmlText.substring(xmlText.indexOf('<'));\r\n Document document = null;\r\n try {\r\n DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\r\n domFactory.setNamespaceAware(true);\r\n DocumentBuilder builder = domFactory.newDocumentBuilder();\r\n document = builder.parse(new InputSource(new StringReader(xmlText)));\r\n } catch (IOException ex) {\r\n throw new UMROException(\"IOException while parsing document: \" + ex);\r\n } catch (ParserConfigurationException ex) {\r\n throw new UMROException(\"ParserConfigurationException while parsing document: \" + ex);\r\n } catch (SAXException ex) {\r\n throw new UMROException(\"SAXException while parsing document: \" + ex);\r\n }\r\n return document;\r\n }", "public ParseXML() throws XmlPullParserException, IOException\n {\n\t input =\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><Balls version=1.0><ball><name>900 Global Hook! Black </name><brand>900 Global</brand><release_date>05/15/2012</release_date><radius_of_gyration>2.551</radius_of_gyration><differential>0.046</differential><mass_biass_diff>n/a</mass_biass_diff><lane_condition>Medium</lane_condition><finish>Polished</finish><coverstock>Reactive Resin</coverstock><coverstock_name>S43 Pearl Reactive</coverstock_name><factory_finish>n/a</factory_finish><core_type>Symmetric</core_type><core_name>n/a</core_name></ball><ball><name>900 Global Hook! Hybrid</name><brand>900 Global</brand><release_date>05/15/2012</release_date><radius_of_gyration>2.551</radius_of_gyration><differential>0.046</differential><mass_biass_diff>n/a</mass_biass_diff><lane_condition>Medium</lane_condition><finish>Polished</finish><coverstock>Hybrid Reactive</coverstock><coverstock_name>S43 Hybrid Reactive</coverstock_name><factory_finish>n/a</factory_finish><core_type>Symmetric</core_type><core_name>Symmetric (10# has a pancake core)</core_name></ball>\"; \n\t parse();\n }", "public void readXML() {\n\t try {\n\n\t \t//getting xml file\n\t \t\tFile fXmlFile = new File(\"cards.xml\");\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t \n\t\t\t//doc.getDocumentElement().normalize(); ???\n\t\t \n\t\t \t//inserting card IDs and Effects into arrays\n\t\t\tNodeList nList = doc.getElementsByTagName(\"card\");\n\t\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\t\tNode nNode = nList.item(i);\n\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t\t\tint id = Integer.parseInt(eElement.getAttribute(\"id\"));\n\t\t\t\t\tString effect = eElement.getElementsByTagName(\"effect\").item(0).getTextContent();\n\t\t\t\t\tidarr.add(id);\n\t\t\t\t\teffsarr.add(effect);\n\t\t\t\t}\n\t\t\t}\n\t } catch (Exception e) {\n\t\t\te.printStackTrace();\n\t }\n }", "void read(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException;", "public ArrayList<Publication> parseXML(){\n ArrayList<Publication> publications = new ArrayList<Publication>();\n try {\n System.out.println(\"Starting parse xml\");\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(new File(\"dblp_abstract_dataset.xml\"));\n document.getDocumentElement().normalize();\n NodeList nodeList = document.getDocumentElement().getChildNodes();\n parseChannelNodes(nodeList,publications);\n System.out.println(\"publications count: \"+publications.size());\n }catch (ParserConfigurationException ex){\n ex.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return publications;\n }", "public void parseResultXML (String res) {\n\n try {\n \t DOMParser dparser = new DOMParser ();\n\n // Construct an InputSource from the XML String we're given.\n\t // Xerces is usually used to handling file objects so we need\n\t // to hack a bit here ....\n dparser.parse (new InputSource (\n\t\t\t new ByteArrayInputStream ( res.getBytes() ) ));\n\n walk ( dparser.getDocument () );\n\n } catch (Exception e) { System.out.println(\"Errors \" + e); }\n }", "private static Document loadXMLFromString(String xml) throws ParserConfigurationException, SAXException,\n\t\t\tIOException {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tInputSource is = new InputSource(new StringReader(xml));\n\t\treturn builder.parse(is);\n\t}", "@Override\n public void parseXml(Element ele, LoadContext lc) {\n\n }", "XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;", "public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}", "private static Document parseXML(InputStream stream) throws Exception {\n DocumentBuilderFactory objDocumentBuilderFactory = null;\n DocumentBuilder objDocumentBuilder = null;\n Document doc = null;\n try {\n objDocumentBuilderFactory = DocumentBuilderFactory.newInstance();\n objDocumentBuilder = objDocumentBuilderFactory.newDocumentBuilder();\n doc = objDocumentBuilder.parse(stream);\n } catch (Exception ex) {\n throw ex;\n }\n return doc;\n }", "public abstract T readFromXml(XmlPullParser parser, int version, Context context)\n throws IOException, XmlPullParserException;", "public static void parseXML(String strXmlContent) {\n\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t\ttry {\r\n\t\t\tSAXParser saxParser = spf.newSAXParser();\r\n\t\t\tsaxParser.parse(new ByteArrayInputStream(strXmlContent.getBytes()),\r\n\t\t\t\t\tnew SAXXMLReader());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private static Document parseXmlFile(String in) {\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource(new StringReader(in));\n return db.parse(is);\n } catch (ParserConfigurationException e) {\n throw new RuntimeException(e);\n } catch (SAXException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public Document parse(InputSource aXmlInstance)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tif (aXmlInstance == null) {\n\t\t\tthrow new IllegalArgumentException(\"InputSource cannot be null\");\n\t\t}\n\n\t\tparserImpl.parse(aXmlInstance);\n\n\t\treturn parserImpl.getDocument();\n\t}", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "public static Document parseXMLFile(final File file) throws IOException {\n\t\ttry {\t\t\t\n\t\t\tfinal DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tfinal DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder();\n\t\t\tfinal Document document = documentBuilder.parse(file);\n\t\t\t\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException | SAXException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public void parse()\n throws ClassNotFoundException, IllegalAccessException,\n\t InstantiationException, IOException, SAXException,\n\t ParserConfigurationException\n {\n\tSAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();\n\txmlReader = saxParser.getXMLReader();\n\txmlReader.setContentHandler(this);\n\txmlReader.setEntityResolver(this);\n\txmlReader.setErrorHandler(this);\n\txmlReader.setDTDHandler(this);\n\txmlReader.parse(xmlSource);\n\t}", "private void parse(XmlDocument document, URL systemId, URL publicId,\n\t\t\tReader reader, InputStream stream, String encoding)\n\t\t\tthrows Exception {\n\t\tString pubString;\n\t\tString sysString;\n\n\t\tif (systemId != null) {\n\t\t\tsysString = systemId.toString();\n\t\t} else {\n\t\t\tsysString = \"\";\n\t\t}\n\n\t\tif (publicId != null) {\n\t\t\tpubString = publicId.toString();\n\t\t} else {\n\t\t\tpubString = \"\";\n\t\t}\n\n\t\t_document = document;\n\t\t_root = null;\n\t\t_parser = new XmlParser();\n\t\t_document._parser = _parser;\n\t\treset();\n\n\t\ttry {\n\t\t\t_parser.setHandler(new Handler());\n\n\t\t\tif (reader != null) {\n\t\t\t\t_parser.parse(sysString, pubString, reader);\n\t\t\t} else if (stream != null) {\n\t\t\t\t_parser.parse(sysString, pubString, stream, encoding);\n\t\t\t} else {\n\t\t\t\t_parser.parse(sysString, pubString, encoding);\n\t\t\t}\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Who knows, maybe something was parsed at this point, so allow the\n\t\t\t * application to decide by setting everything up here.\n\t\t\t */\n\t\t\tdocument.setRoot(_root);\n\t\t}\n\t}", "private void readXML() {\n\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\n\t\tXMLReader handler = new XMLReader();\n\t\tSAXParser parser;\n\t\t\n\t\t//Parsing xml file\n\t\ttry {\n\t\t\tparser = factory.newSAXParser();\n\t\t\tparser.parse(\"src/data/users.xml\", handler);\n\t\t\tgroupsList = handler.getGroupNames();\n\t\t} catch(SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t};\n\t}", "public Document parseFile(InputStream inputStream) {\r\n \r\n try {\r\n setDocument(docBuilder.parse(inputStream));\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return getDocument();\r\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "public Document parseFile(String fileName) {\r\n log.debug(\"Parsing XML file... \" + fileName);\r\n DocumentBuilder docBuilder;\r\n Document doc = null;\r\n DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\r\n docBuilderFactory.setIgnoringElementContentWhitespace(true);\r\n try {\r\n docBuilder = docBuilderFactory.newDocumentBuilder();\r\n }\r\n catch (ParserConfigurationException e) {\r\n log.debug(\"Wrong parser configuration: \" + e.getMessage());\r\n return null;\r\n }\r\n File sourceFile = new File(fileName);\r\n try {\r\n doc = docBuilder.parse(sourceFile);\r\n setDocument(doc);\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return doc; \r\n }", "private static ArrayList<Publication> getParserAuthor() {\n\t\n\t ArrayList<Publication> list= new ArrayList<Publication>(); \n //获取DOM解析器 \n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n DocumentBuilder builder; \n try { \n builder = factory.newDocumentBuilder(); \n Document doc; \n doc = builder.parse(new File(\"Myxml.xml\")); \n //得到一个element根元素,获得根节点 \n Element root = doc.getDocumentElement(); \n System.out.println(\"根元素:\"+root.getNodeName()); \n \n //子节点 \n NodeList personNodes = root.getElementsByTagName(\"publication\"); \n for(int i = 0; i<personNodes.getLength();i++){ \n Element personElement = (Element) personNodes.item(i); \n Publication publication = new Publication(); \n NodeList childNodes = personElement.getChildNodes(); \n //System.out.println(\"*****\"+childNodes.getLength()); \n \n for (int j = 0; j < childNodes.getLength(); j++) { \n if(childNodes.item(j).getNodeType()==Node.ELEMENT_NODE){ \n if(\"authors\".equals(childNodes.item(j).getNodeName())){ \n publication.setAuthors(childNodes.item(j).getFirstChild().getNodeValue()); \n }else if(\"id\".equals(childNodes.item(j).getNodeName())){ \n publication.setId(childNodes.item(j).getFirstChild().getNodeValue()); \n } \n } \n } \n list.add(publication); \n } \n for(Publication publication2 : list){ //为了查看数据是否正确,进行打印结果 \n System.out.println(publication2.toString()); \n } \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } \n return list;\n}", "public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationException e) { \n\t\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public Document parse(File aFile)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\t/**\n\t\t * @todo Fix/implement this later\n\t\t */\n\t\tthrow new SAXException(\"Not supported\");\n\t}", "public static Document getXMLDoc(String filename) throws ParserConfigurationException, IOException, SAXException {\n\n File xmlFile = new File(filename);\n\n // create instance of the document builder factory to get the builder\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\n // get the document builder from the factory\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\n // parse the file into the doc\n Document doc = dBuilder.parse(xmlFile);\n\n // normalize doc\n doc.getDocumentElement().normalize();\n\n return doc;\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "public XmlParser(String strFile) throws XmlException\n {\n File fXmlFile = new File(strFile);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder;\n try\n {\n dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(fXmlFile);\n doc.getDocumentElement().normalize();\n }\n catch (ParserConfigurationException ex)\n {\n throw new XmlException(\"Unable to initialize XML parser for: \" + strFile);\n }\n catch (SAXException ex)\n {\n throw new XmlException(\"Incorrect XML format: \" + strFile);\n }\n catch (IOException ex)\n {\n throw new XmlException(\"Unable to open XML file: \" + strFile);\n }\n }", "void processElement(File documentPath) \n\t\t\tthrows XMLFormatException;", "private static void parse_xml() {\n\t\tUiHierarchyXmlLoader loader = new UiHierarchyXmlLoader();\n\t\tBasicTreeNode btn = loader.parseXml(\"/home/haos/haos.xml\");\n\n\t\tUtil.log(btn.getChildrenList());\n\t\tUtil.log(dump_node(btn, 0));\n\n\t\tfor (BasicTreeNode child : btn.getChildren()) {\n\t\t\tif (child instanceof UiNode) {\n\t\t\t\tsearch_for_clickables((UiNode) child);\n\t\t\t} else {\n\t\t\t\tUtil.err(child + \" is NOT UiNode\");\n\t\t\t}\n\t\t}\n\n\t\tList<Rectangle> nafs = loader.getNafNodes();\n\t\tUtil.log(nafs);\n\t}", "public DOMParser() { ; }", "private Document initialize() {\r\n Document doc = null;\r\n try {\r\n File file = new File(\"./evidence.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();\r\n doc = docBuilder.parse(file);\r\n doc.getDocumentElement().normalize();\r\n } catch (ParserConfigurationException | IOException | SAXException e) {\r\n System.err.println(\"Parser failed parse file:\"+e.getMessage());\r\n }\r\n return doc;\r\n }", "public void parseDocument(File XMLInputFile) throws FunctionException {\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument started\");\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//get a factory\r\n\t\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t\t\t\t//get a new instance of parser\r\n\t\t\t\tSAXParser sp = spf.newSAXParser();\r\n\t\t\t\t//parse the file and also register this class for call backs\r\n\t\t\t\tsp.parse(XMLInputFile, this);\r\n\t\t\t}catch(SAXException se) {\r\n\t\t\t\tthrow new FunctionException(\"SAXException had occurred.\\n\"+se.getMessage());\r\n\t\t\t}catch(ParserConfigurationException pce) {\r\n\t\t\t\tthrow new FunctionException(\"ParserConfigurationException had occurred.\\n\"+pce.getMessage());\r\n\t\t\t}catch (IOException ie) {\r\n\t\t\t\tthrow new FunctionException(\"IOException had occurred.\\n\"+ie.getMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument completed\");\r\n\t\t}", "public static Document parseXML(File xmlFile) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\t// Ensure that the file is present and can be read.\r\n\t\tif (xmlFile != null && xmlFile.canRead())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\txmlDoc = parseXML(new FileInputStream(xmlFile));\r\n\t\t\t} catch (FileNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new BaseException(\"ERR_FILE_PARSE\", \"Unable to load file provided\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}", "public static Document loadXMLFrom(String xml) throws Exception {\n\t\tSource source = new StreamSource(new StringReader(xml));\n\t\tDOMResult result = new DOMResult();\n\t\tTransformerFactory.newInstance().newTransformer().transform(source, result);\n\t\treturn (Document) result.getNode();\n\t}", "@Test\n public void simpleXmlParsingTest() throws ParserConfigurationException, SAXException, IOException {\n String simpleInput = \"<test></test>\";\n TestTreeNode root = TestingUtils.parseXmlTree(simpleInput);\n\n assertThat(root, notNullValue());\n assertThat(root.getLabel().get(), is(\"test\"));\n assertThat(root.getChildren().isPresent(), is(false));\n }", "Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;", "public void parse() throws ParserConfigurationException, SAXException, IOException, XMLStreamException {\n\t\tString currentElem = null;\n\t\tCard card = null;\n\t\tType type = null;\n\t\tAuthor author = null;\n\n\t\tXMLInputFactory xmlFactory = XMLInputFactory.newInstance();\n\t\tXMLEventReader xmlReader = xmlFactory.createXMLEventReader(new StreamSource(xmlFileName));\n\n\t\twhile (xmlReader.hasNext()) {\n\t\t\tXMLEvent event = xmlReader.nextEvent();\n\n\t\t\tif (event.isCharacters() && event.asCharacters().isWhiteSpace()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (event.isStartElement()) {\n\t\t\t\tStartElement startElement = event.asStartElement();\n\t\t\t\tcurrentElem = startElement.getName().getLocalPart();\n\n\t\t\t\tif (currentElem.equals(\"OldCards\")) {\n\t\t\t\t\toldCards = new OldCards();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentElem.equals(\"Card\")) {\n\t\t\t\t\tcard = new Card();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentElem.equals(\"Type\")) {\n\t\t\t\t\ttype = new Type();\n\t\t\t\t\tAttribute attribute = startElement.getAttributeByName(new QName(\"send\"));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\ttype.setSend(Boolean.parseBoolean(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentElem.equals(\"Author\")) {\n\t\t\t\t\tauthor = new Author();\n\t\t\t\t\tAttribute attribute = startElement.getAttributeByName(new QName(\"famous\"));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tauthor.setFamous(Boolean.parseBoolean(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.isCharacters()) {\n\t\t\t\tCharacters characters = event.asCharacters();\n\n\t\t\t\tif (currentElem.equals(\"Thema\")) {\n\t\t\t\t\tcard.setThema(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentElem.equals(\"Type\")) {\n\t\t\t\t\ttype.setType(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (currentElem.equals(\"Country\")) {\n\t\t\t\t\tcard.setCountry(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentElem.equals(\"Year\")) {\n\t\t\t\t\tcard.setYear(Integer.parseInt(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (currentElem.equals(\"Author\")) {\n\t\t\t\t\tauthor.setName(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (currentElem.equals(\"Valuable\")) {\n\t\t\t\t\tcard.setValuable(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.isEndElement()) {\n\t\t\t\tEndElement endElement = event.asEndElement();\n\t\t\t\tString localName = endElement.getName().getLocalPart();\n\n\t\t\t\tif (localName.equals(\"Card\")) {\n\t\t\t\t\toldCards.getCards().add(card);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (localName.equals(\"Type\")) {\n\t\t\t\t\tcard.setType(type);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (localName.equals(\"Author\")) {\n\t\t\t\t\tcard.getAuthors().add(author);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\txmlReader.close();\n\t}", "private static Document initializeXML(String filePath) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"Initializing the xml file :\" + filePath);\n\t\t\txmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(filePath));\n\t\t\txmlDocument.getDocumentElement().normalize();\n\t\t\treturn xmlDocument;\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"Error while reading from XML. File Path : \" + filePath + \" \\n\" + e.getMessage());\n\t\t\tthrow (new Exception(e.getMessage()));\n\n\t\t}\n\t}", "private static Document parseXmlFile(String strXml) {\n // get the factory\n final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n try {\n // Using factory get an instance of document builder\n final DocumentBuilder db = dbf.newDocumentBuilder();\n final Document dom;\n File file;\n\n file = new File(strXml);\n if (!file.exists()) {\n strXml = \"data/\" + strXml;\n }\n\n // Parse using builder to get DOM representation of the XML file\n dom = db.parse(strXml);\n\n return dom;\n } catch (final Exception e) {\n Verbose.log(Level.SEVERE, e, \"Laoding Specifications\",\n e.getMessage());\n } // end try\n\n return null;\n }", "public Document getDocFromFile(String filename)\r\n throws ParserConfigurationException{\r\n {\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document doc = null;\r\n try{\r\n doc = db.parse(filename);\r\n }\r\n catch (Exception ex){\r\n System.out.println(\"XML parse failure\");\r\n ex.printStackTrace();\r\n }\r\n return doc;\r\n } \r\n }", "public static Document loadXmlFile(String fname) {\r\n try {\r\n Document doc = DocumentBuilderFactory.newInstance()\r\n .newDocumentBuilder().parse(fname);\r\n return doc;\r\n } catch (Exception e) {\r\n logger.log(Level.SEVERE, \"exception\", e);\r\n }\r\n\r\n return null;\r\n }", "public static Document parse(String xmlString) {\n try {\n return DocumentHelper.parseText(xmlString);\n } catch (DocumentException de) {\n throw new RuntimeException(de);\n }\n }", "public interface XMLParser {\n\n String parse();\n}", "public void parse() throws ParserConfigurationException, SAXException,\n\t\t\tIOException, XMLStreamException {\n\n\t\tGem gem = new Gem();\n\t\tVisualParameters params = new VisualParameters();\n\n\t\t// current element name holder\n\t\tString currentElement = null;\n\n\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n\n\t\tfactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);\n\n\t\tXMLEventReader reader = factory.createXMLEventReader(new StreamSource(\n\t\t\t\txmlFileName));\n\n\t\twhile (reader.hasNext()) {\n\t\t\tXMLEvent event = reader.nextEvent();\n\n\t\t\t// skip any empty content\n\t\t\tif (event.isCharacters() && event.asCharacters().isWhiteSpace()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// handler for start tags\n\t\t\tif (event.isStartElement()) {\n\t\t\t\tStartElement startElement = event.asStartElement();\n\t\t\t\tcurrentElement = startElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.FOND.equalsTo(currentElement)) {\n\t\t\t\t\tfond = new Fond();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.GEM.equalsTo(currentElement)) {\n\t\t\t\t\tgem = new Gem();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(currentElement)) {\n\t\t\t\t\tparams = new VisualParameters();\n\t\t\t\t\tAttribute attribute = startElement\n\t\t\t\t\t\t\t.getAttributeByName(new QName(XML.VALUE_COLOR\n\t\t\t\t\t\t\t\t\t.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setValueColor(EnumColors.fromValue(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.TRANSPARENCY.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setTransparency(Integer.valueOf(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.FACETING.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setFaceting(Integer.valueOf(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// handler for contents\n\t\t\tif (event.isCharacters()) {\n\t\t\t\tCharacters characters = event.asCharacters();\n\n\t\t\t\tif (XML.NAME.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setName(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.PRECIOUSNESS.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setPreciousness(Boolean.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.ORIGIN.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setOrigin(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.VALUE.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setValue(Double.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// handler for end tags\n\t\t\tif (event.isEndElement()) {\n\t\t\t\tEndElement endElement = event.asEndElement();\n\t\t\t\tString localName = endElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.GEM.equalsTo(localName)) {\n\t\t\t\t\tfond.getGem().add(gem);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(localName)) {\n\t\t\t\t\t// just add answer to container\n\t\t\t\t\tgem.setVisualParameters(params);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}", "private void parse() throws XMLStreamException {\n while (reader.hasNext()) {\n if (reader.next() == START_ELEMENT) {\n handleElement();\n }\n }\n }", "public static void nonRecursiveParserXML(NodeList rList, Document doc){\r\n\t try {\t\r\n\t System.out.println(\"===========================\");\r\n\t for (int temp1 = 0; temp1 < rList.getLength(); temp1++) {\r\n\t \t NodeList nList = doc.getElementsByTagName(\"mxCell\");\r\n\t System.out.println(\"++++++++++++++ mxCell +++++++++++++++++\");\r\n\t for (int temp = 0; temp < nList.getLength(); temp++) {// for each cell\r\n\t Node nNode = nList.item(temp); // a cell is called in as nNode\r\n\t System.out.println(\"\\nCurrent Element :\" + nNode.getNodeName());\r\n\t if (nNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\t Element eElement = (Element) nNode;\r\n\t NamedNodeMap attList = eElement.getAttributes(); \r\n\t \r\n\t for(int ind = 0; ind < attList.getLength(); ind++){\r\n\t \t System.out.println(\"Attribute :\" + attList.item(ind));\r\n\t } \r\n\t NodeList subNodes = eElement.getElementsByTagName(\"mxGeometry\");\r\n\t System.out.println(\"\\t\\t------------ mxGeometry --------------\");\r\n\t for(int subInd = 0; subInd < subNodes.getLength(); subInd++){\r\n\t \t NamedNodeMap elemAtList = subNodes.item(subInd).getAttributes(); \r\n\t \r\n\t for(int ind2 = 0; ind2 < elemAtList.getLength(); ind2++){\r\n\t \t System.out.println(\"Attribute :\" + elemAtList.item(ind2));\r\n\t }\r\n\t }\r\n\t //System.out.println(\"First Name : \" + eElement.getElementsByTagName(\"mxGeometry\").item(0).getTextContent());\r\n\t }\r\n\t } \r\n\t }\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t\t}", "public String LoadXML(String filename) throws org.xml.sax.SAXException,\n\t\t\tSAXException {\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t// factory.setValidating(true);\n\t\t// factory.\n\t\tfactory.setIgnoringElementContentWhitespace(true);\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tFile file = new File(filename);\n\t\t\tdoc = builder.parse(file);\n\t\t\t// Do something with the document here.\n\t\t} catch (ParserConfigurationException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\t\treturn doc.getElementsByTagName(\"text\").item(0).getFirstChild()\n\t\t\t\t.getNodeValue();\n\t}", "public Document parse(String aUri)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tparserImpl.parse(aUri);\n\n\t\treturn parserImpl.getDocument();\n\t}", "public static void main(String[] args) throws ParserConfigurationException {\n\t\tDocumentBuilder dBuilder;\n\t\tDocument doc = null;\n\t\tdBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\ttry {\n\t\t\tdoc = dBuilder.parse(new File(filepath));\n\t\t} catch (SAXException | IOException e) {\n\t\t\tSystem.out.println(\"Invalid File / Xml\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\tSystem.out.println(\"Root element is: <\" + doc.getDocumentElement().getNodeName() + \">\");\n\n\t\tNodeList childNodes = doc.getDocumentElement().getChildNodes();\n\t\tfor (int i = 0; i < childNodes.getLength(); i++) {\n\t\t\tNode node = childNodes.item(i);\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tString name = node.getNodeName();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tSystem.out.println(\"Node name: '\" + name + \"' has text content: \" + value);\n\t\t\t}\n\t\t}\n\n\t\t// Validate XML against schema.xsd\n\t\tSchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\n\t\t// Validate will throw exception only if xml is not valid against the schema\n\t\ttry {\n\t\t\tSchema schema = factory.newSchema(new File(schemapath));\n\t\t\tValidator validator = schema.newValidator();\n\t\t\tvalidator.validate(new StreamSource(new File(filepath)));\n\t\t\tSystem.out.println(\"XML is valid. No exception was thrown\");\n\t\t} catch (SAXException | IOException e) {\n\t\t\tSystem.out.println(\"Invalid XML. Exception found: \" + e.getMessage());\n\t\t}\n\t}", "public static Document loadXMLFromString(String xml) {\n\n\t\tDocument document = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tStringReader sr = new StringReader(xml);\n\t\t\tInputSource is = new InputSource(sr);\n\t\t\tdocument = builder.parse(is);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn document;\n\t}", "public static Node readXML(String filename)\r\n\t{\r\n\t\t\r\n\t\tDocument doc=null;\r\n\t\t\r\n\t\tDocumentBuilder db = null;\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\r\n\t try {\r\n\t \tdbf.setIgnoringElementContentWhitespace(true);\r\n\t db = dbf.newDocumentBuilder();\r\n\t \tdoc = db.parse(new File(filename));\r\n\r\n\t\t\t//******* ALBERO DOM *********/\r\n\t\t\t\r\n\t\t\t// Elemento corrispondente al DOCTYPE\r\n\t\t Node child = doc.getFirstChild();\r\n\t\t // Elemento corrispondente al primo elemento del documento\r\n\t\t child = child.getNextSibling();\r\n\t\t \r\n\t\t return child;\r\n\t }\t\r\n\t\tcatch (IOException se){\r\n\t\t\tSystem.err.println(\"Il file \" + filename + \" non e' stato trovato\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcatch (SAXException se){\r\n\t\t\tSystem.err.println(\"Non � possibile fare il parser\");\r\n\t\t\treturn null;\r\n\t\t}\t\r\n\t\tcatch (ParserConfigurationException pce){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public XMLDocument() {\r\n xml = new StringBuilder();\r\n }", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException{\n\t File inputFile = new File(\"C:\\\\Users\\\\msamiull\\\\workspace\\\\jgraphx-master\\\\t.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.parse(inputFile);\r\n \r\n\t\tdoc.getDocumentElement().normalize();\r\n System.out.println(\"Main element :\"+ doc.getDocumentElement().getNodeName());\r\n// NodeList nodeList = doc.getElementsByTagName(\"root\");\r\n \r\n NodeList nodeList = doc.getElementsByTagName(\"iOOBN\");\r\n// NamedNodeMap attribList = doc.getAttributes();\r\n \r\n// nonRecursiveParserXML(nList, doc);\r\n\r\n ArrayList<String> tagList = new ArrayList<String>();\r\n// tagList.add(\"mxCell\");\r\n// tagList.add(\"mxGeometry\");\r\n// tagList.add(\"mxPoint\");\r\n tagList.add(\"Node\");\r\n tagList.add(\"state\");\r\n tagList.add(\"tuple\"); // purposely i raplced \"datarow\" by \"tuple\" so that my parser can consider state first before tuple/data\r\n tagList.add(\"parent\");\r\n \r\n recursiveParserXML(nodeList, tagList);\r\n\r\n }", "public void startDocument() throws SAXException {\n\t\ttry {\n\t\t\tlogger.info(\"Parsing XML buddies\");\n\t\t} catch (Exception e) {\n\t\t\tbuddies = null;\n\t\t\tthrow new SAXException(\"XMLBuddyParser error\", e);\n\t\t}\n\t}", "private void parseNodes() throws ParserException{\n NodeList fileNodesList = root.getElementsByTagName(\"file\");\n NodeList nodeNodesList = root.getElementsByTagName(\"node\");\n NodeXML tmp;\n for(int i=0; i<nodeNodesList.getLength(); i++){\n tmp = getNode((Element) nodeNodesList.item(i));\n mapForAccess.put(tmp.hostname,tmp);\n if(tmp.isMaster) {\n master = tmp;\n }\n else {\n slaves.add(tmp);\n }\n }\n }", "private void parseXML(String rawXML){\n Log.w(\"AndroidParseXMLActivity\", \"Start Parsing\");\n SAXParserFactory factory = SAXParserFactory.newInstance();\n try {\n\n //Use the sax parser to parse the raw XML.\n SAXParser saxParser = factory.newSAXParser();\n XMLReader xmlreader = saxParser.getXMLReader();\n\n //Use the handler to parse the XML to text\n PaintingXMLHandler handler = new PaintingXMLHandler();\n xmlreader.setContentHandler(handler);\n\n //Objects to read the stream.\n InputSource inStream = new InputSource();\n inStream.setCharacterStream(new StringReader(rawXML));\n\n //Parse the input stream\n xmlreader.parse(inStream);\n\n //Get the map markers from the handler.\n if (handler.getPaintLines() != null) {\n touchArea.loadPainting(handler.getPaintLines());\n }\n setBackgroundColor(handler.getBackground());\n\n\n Toast.makeText(this, \"Loaded\", Toast.LENGTH_LONG).show();\n } catch (ParserConfigurationException e) {\n Toast.makeText(this, \"Error 1 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (SAXException e) {\n Toast.makeText(this, \"Error 2 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }catch(IOException e){\n Toast.makeText(this, \"Error 3 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }", "public static void initXMLdoc() throws Exception {\n\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n DOMImplementation impl = builder.getDOMImplementation();\n\n\tdoc = impl.createDocument(null,null,null);\n }", "public static Document parse(InputStream in) throws ParserConfigurationException, SAXException, IOException {\n\t DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\t \n\n\t return db.parse(in);\n\t }", "@Override\npublic\tvoid parseInput() {\n InputStream is = new ByteArrayInputStream(this.body.toString().getBytes());\n\t\t\n\t\t\n\t\ttry {\n\t\t\tthis.domIn = new XMLInputConversion(is);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.rootXML = this.domIn.extractDOMContent();\n\t}", "abstract public void data(Document document, Element rootElement);", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "interface IXMLParser\n{\n boolean exists (String path);\n\n Node getNode (String path);\n\n Node[] getChildren (String path);\n\n String getText (String path);\n\n void setText (String path, String value);\n\n String getAttribute (String path, String attributeName);\n\n String setAttribute (String path, String attributeName);\n}", "public void readXML(org.dom4j.Element el) throws Exception {\n String name,value;\n org.dom4j.Element node=el;\n\n if (el.attribute(\"type\") != null)\n setType(el.attribute(\"type\").getText());\n if (el.attribute(\"action\") != null)\n setAction(ActionList.valueOf(el.attribute(\"action\").getText()));\n if (el.attribute(\"direction\") != null)\n setDirection(DirectionList.valueOf(el.attribute(\"direction\").getText()));\n if (el.attribute(\"content\") != null)\n setContent(el.attribute(\"content\").getText());\n if (el.attribute(\"iterations\") != null)\n setIterations(org.jbrain.xml.binding._TypeConverter.parseInteger(el.attribute(\"iterations\").getText(), sObjName, \"Iterations\"));\n if (el.attribute(\"asynchronous\") != null)\n setAsynchronous(org.jbrain.xml.binding._TypeConverter.parseBoolean(el.attribute(\"asynchronous\").getText(), sObjName, \"Asynchronous\"));\n }", "@Override\n\tpublic Document loadDocument(String file) {\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tdbf.setNamespaceAware(true);\n\t\tDocumentBuilder db;\n\t\ttry {\n\t\t\tdb = dbf.newDocumentBuilder();\n\t\t\tDocument document = db.parse(new File(file));\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FactoryConfigurationError e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}", "public Document load(final String filename) throws IOException, SAXException {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n factory.setNamespaceAware(true);\n final DocumentBuilder builder;\n try {\n builder = factory.newDocumentBuilder();\n } catch (final ParserConfigurationException pce) {\n pce.printStackTrace();\n return null;\n }\n final InputStream inputStream = getClass().getResourceAsStream(filename);\n if (inputStream != null) {\n // for files found in JARs\n return builder.parse(inputStream);\n } else {\n // for files directly on the file system\n return builder.parse(new File(filename));\n }\n }", "private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }", "public Duc2002Document getParsedDocument(Document document) throws Exception {\n\t\tDuc2002Document ducDoc=new Duc2002Document();\n\t\t// iterate through child elements of root\n\t\tElement root = document.getRootElement();\n\t\tfor ( Iterator i = root.elementIterator(); i.hasNext(); ) {\n\t\t\tElement element = (Element) i.next();\n\t\t\tString elementName=element.getQualifiedName();\n\t\t\tif(elementName.equals(\"DOCNO\"))\n\t\t\t\tducDoc.setDocNo(element.getStringValue());\n\t\t\telse if(elementName.equals(\"HEAD\"))\n\t\t\t\tducDoc.setTopic(element.getStringValue());\n\t\t\telse if(elementName.equals(\"TEXT\"))\n\t\t\t{\n\t\t\t\tducDoc.setText(element.getStringValue());\n\t\t\t\tString[] sentences = new String[element.elements().size()];\n\t\t\t\tint[] sentenceWordCounts = new int[element.elements().size()];\n\t\t\t\tint no=0;\n\t\t\t\tfor(Iterator j=element.elementIterator(); j.hasNext();) {\n\t\t\t\t\tElement sentence = (Element) j.next();\n\t\t\t\t\tsentences[no]=sentence.getStringValue();\n\t\t\t\t\tfor(Iterator k=sentence.attributeIterator(); k.hasNext(); ) {\n\t\t\t\t\t\tAttribute attribute=(Attribute) k.next();\n\t\t\t\t\t\tif(attribute.getQualifiedName().equals(\"wdcount\"))\n\t\t\t\t\t\t\tsentenceWordCounts[no]=Integer.parseInt(attribute.getStringValue());\n\t\t\t\t\t}\n\t\t\t\t\tno++;\n\t\t\t\t}\n\t\t\t\tducDoc.setSentences(sentences);\n\t\t\t\tducDoc.setSentenceWordCounts(sentenceWordCounts);\n\t\t\t}\n\t\t}\n\t\treturn ducDoc;\n\t}", "public void initParser(String file) {\n if (checkFileExists(file)) {\n parseXml(file);\n }\n }", "public synchronized Node parse(String url) throws IOException,SAXException\n {\n if(log.isDebugEnabled())\n log.debug(\"parse: \"+url);\n return parse(new InputSource(url));\n }", "public void testXmlReader() throws Exception {\n File file = new File(\"src/test/resources/reader/sample.xml\");\n final URL testdata = file.toURI().toURL();\n reader.parse(testdata, creator);\n assertEquals(\"Did not create expected number of nodes\", 1, creator.size());\n }", "Document toXml() throws ParserConfigurationException, TransformerException, IOException;", "public void parseXml(String file) {\n\n try {\n\n debug(\"\\n\\nIn the beginning God created the heaven and the world...\\n\\n\");\n\n File fXmlFile = new File(\"./levels/\" + file);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(fXmlFile);\n\n doc.getDocumentElement().normalize();\n debug(\"Chosen entity: \" + doc.getDocumentElement().getNodeName());\n\n NodeList placeList = doc.getElementsByTagName(\"place\");\n NodeList passageList = doc.getElementsByTagName(\"passage\");\n NodeList furnitureList = doc.getElementsByTagName(\"furniture\");\n NodeList storyList = doc.getElementsByTagName(\"story\");\n\n // Create object arrays\n ArrayList<Place> places = new ArrayList<>();\n ArrayList<Item> items = new ArrayList<>();\n ArrayList<Passage> passages = new ArrayList<>();\n ArrayList<Furniture> furnitures = new ArrayList<Furniture>();\n\n // parse story text\n Node storyNode = storyList.item(0);\n Element storyElement = (Element) storyNode;\n debug(\"Intro: \" + storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n debug(\"Level: \" + storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"Version: \" + storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n // add story elements to world\n world.setIntroduction(\n storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n world.setLevelName(storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n world.setLevelVersion(storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n\n // parse all existing Places\n for (int placeCounter = 0; placeCounter < placeList.getLength(); placeCounter++) {\n Node placeNode = placeList.item(placeCounter);\n\n debug(\"\\nCurrent Element: \" + placeNode.getNodeName());\n\n if (placeNode.getNodeType() == Node.ELEMENT_NODE) {\n Element placeElement = (Element) placeNode;\n\n debug(\"- Ending: \" + placeElement.getAttribute(\"end\"));\n debug(\"- id: \" + placeElement.getAttribute(\"id\"));\n debug(\"- Name: \" + placeElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + placeElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create Places.\n places.add(new Place(placeElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n placeElement.getElementsByTagName(\"description\").item(0).getTextContent().replace(\"\\\\n\", \"\\n\")));\n\n // add EndingPlace to World, set endingText to Places' Description\n if (placeElement.getAttribute(\"end\").equals(\"bad\")) {\n world.addBadEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n } else if(placeElement.getAttribute(\"end\").equals(\"good\")) {\n world.addGoodEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n }\n \n // parse all existing Place Items\n NodeList itemList = placeElement.getElementsByTagName(\"item\");\n\n for (int itemCounter = 0; itemCounter < itemList.getLength(); itemCounter++) {\n Node itemNode = itemList.item(itemCounter);\n\n Element itemElement = (Element) itemNode;\n\n debug(\"- Item\" + itemCounter + \":\");\n debug(\"- - Name: \" + itemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + itemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create items.\n items.add(new Item(itemElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n itemElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n // Set items in current place.\n places.get(placeCounter).addObjectToPlace(getIncludedItem(itemElement, items));\n\n }\n }\n }\n\n // parse all furniture\n for (int furnitureCounter = 0; furnitureCounter < furnitureList\n .getLength(); furnitureCounter++) {\n Node furnitureNode = furnitureList.item(furnitureCounter);\n\n Element furnitureElement = (Element) furnitureNode;\n\n debug(\"\\nCurrent Element: \" + furnitureNode.getNodeName());\n\n debug(\"- Furniture\" + furnitureCounter);\n debug(\"- - In Place: \"\n + furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent());\n debug(\n \"- - Name: \" + furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create furniture objects\n furnitures.add(\n new Furniture(furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent(), // name\n furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent(), // description\n furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent()));\n\n NodeList furnitureItemList = furnitureElement.getElementsByTagName(\"content-item\");\n\n // parse all Furniture Items\n for (int furnitureItemCounter = 0; furnitureItemCounter < furnitureItemList\n .getLength(); furnitureItemCounter++) {\n Node furnitureItemNode = furnitureItemList.item(furnitureItemCounter);\n\n Element furnitureItemElement = (Element) furnitureItemNode;\n\n debug(\"- - Content Items:\");\n debug(\"- - - Name: \"\n + furnitureItemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - - Description: \"\n + furnitureItemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n addItems(furnitureItemElement, furnitures, items, furnitureCounter);\n\n }\n\n NodeList furnitureObstacleList = furnitureElement.getElementsByTagName(\"obstacle\");\n\n // parse all Furniture Obstacles\n for (int furnitureObstacleCounter = 0; furnitureObstacleCounter < furnitureObstacleList\n .getLength(); furnitureObstacleCounter++) {\n Node furnitureObstacleNode = furnitureObstacleList.item(furnitureObstacleCounter);\n\n Element furnitureObstacleElement = (Element) furnitureObstacleNode;\n\n debug(\"- - Obstacle:\");\n debug(\"- - - Description: \" + furnitureObstacleElement.getElementsByTagName(\"description\")\n .item(0).getTextContent());\n debug(\"- - - Resolution: \" + furnitureObstacleElement.getElementsByTagName(\"resolution\")\n .item(0).getTextContent());\n // debug(\"- - - Requirement: \" +\n // furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // create furniture obstacle\n if (furnitureObstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new DoubleItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items,\n furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"additionalItem\").item(0).getTextContent())));\n\n } else if (furnitureObstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new RiddleObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"requiredAnswer\").item(0)\n .getTextContent()));\n\n } else {\n // normal Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new ItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"requiredItem\").item(0).getTextContent())));\n }\n // add damage points to obstacle\n if (!furnitureObstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(furnitureCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(furnitureObstacleElement.getAttribute(\"damage\")));\n }\n\n }\n\n }\n\n // Add current furniture to its containing Place\n setFurnitureInPlace(furnitures, places);\n\n // parse all existing passages\n for (int passageCounter = 0; passageCounter < passageList.getLength(); passageCounter++) {\n Node passageNode = passageList.item(passageCounter);\n\n debug(\"\\nCurrent Element: \" + passageNode.getNodeName());\n\n if (passageNode.getNodeType() == Node.ELEMENT_NODE) {\n Element passageElement = (Element) passageNode;\n\n debug(\"- id: \" + passageElement.getAttribute(\"id\"));\n debug(\"- Name: \" + passageElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + passageElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- Comes from: \"\n + passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent());\n debug(\"- Connects to: \"\n + passageElement.getElementsByTagName(\"connectTo\").item(0).getTextContent());\n\n // Create Passage with connected Places.\n passages\n .add(new Passage(passageElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n passageElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n getFromPlace(passageElement, places), // from this Place\n getFollowPlace(passageElement, places)) // to that Place\n );\n\n // parse all existing Passage Obstacles\n NodeList obstacleList = passageElement.getElementsByTagName(\"obstacle\");\n\n for (int obstacleCounter = 0; obstacleCounter < obstacleList\n .getLength(); obstacleCounter++) {\n Node obstacleNode = obstacleList.item(obstacleCounter);\n\n Element obstacleElement = (Element) obstacleNode;\n\n debug(\"- Obstacle\" + passageCounter + \":\");\n debug(\"- - Description: \"\n + obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- - Resolution: \"\n + obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent());\n // debug(\"- - Required Item: \" +\n // obstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // Create the obstacle for each passage.\n if (obstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n passages.get(passageCounter)\n .setObstacle(new DoubleItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items,\n obstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"additionalItem\")\n .item(0).getTextContent())));\n\n } else if (obstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n passages.get(passageCounter).setObstacle(new RiddleObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"requiredAnswer\").item(0).getTextContent()));\n\n } else {\n // normal Obstacle\n passages.get(passageCounter)\n .setObstacle(new ItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"requiredItem\")\n .item(0).getTextContent())));\n }\n\n // add damage points to obstacle\n if (!obstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(passageCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(obstacleElement.getAttribute(\"damage\")));\n }\n\n\n }\n }\n }\n\n startingPlace = places.get(0);\n\n // Add Places to GameWorld\n addPlacesToWorld(places, world);\n\n // set starting Place in GameWorld\n if (world.getStartingPlace() == null) {\n world.setStartingPlace(startingPlace);\n }\n\n debug(\"\\n\\n\");\n debug(\"World has successfully been created! God saw all that he had made, and it was good.\");\n debug(\"\\n\\n\\n\\n\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "void init(Document doc) {\n mDoc = doc;\n mDoc.getDocumentElement().normalize();\n load();\n }", "private void parseXmlFile(InputStream file)\n {\n\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n\ttry\n\t{\n\t // Using factory get an instance of document builder\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Creating a new Document Builder.\");\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\n\t // parse using builder to get DOM representation of the XML file\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Attempting to parse the file.\");\n\t // This line causes the program to crash when attempting to read the SVG file, which is in XML format.\n\t dom = db.parse(file);\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Finished parsing the file.\");\n\t}\n\tcatch (ParserConfigurationException pce)\n\t{\n\t Log.d(Constants.TAG, \"ParserConfigurationException MSG: \" + pce.getMessage());\n\n\t pce.printStackTrace();\n\t}\n\tcatch (SAXException se)\n\t{\n\t Log.d(Constants.TAG, \"SAXException MSG: \" + se.getMessage());\n\n\t se.printStackTrace();\n\t}\n\tcatch (IOException ioe)\n\t{\n\t Log.d(Constants.TAG, \"IOException MSG: \" + ioe.getMessage());\n\n\t ioe.printStackTrace();\n\t}\n\tcatch (Exception e)\n\t{\n\t Log.d(Constants.TAG, \"Exception MSG: \" + e.getMessage());\n\t e.printStackTrace();\n\t}\n\n\t//Log.d(Constants.TAG, \"XMLReader::parseXmlFile() Exiting!\");\n }", "public ConferenceInfoDocument(String xml)\n\t\tthrows XMLException\n\t{\n\t\tbyte[] bytes;\n\n\t\ttry {\n\t\t\tbytes = xml.getBytes(\"UTF-8\");\n\t\t}\n\t\tcatch (UnsupportedEncodingException uee) {\n\t\t\tlogger.warn(\"Failed to gets bytes from String for the UTF-8 charset\", uee);\n\t\t\tbytes = xml.getBytes();\n\t\t}\n\n\t\ttry {\n\t\t\tdocument = XMLUtils.newDocumentBuilderFactory().newDocumentBuilder()\n\t\t\t\t.parse(new ByteArrayInputStream(bytes));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new XMLException(e.getMessage());\n\t\t}\n\n\t\tconferenceInfo = document.getDocumentElement();\n\t\tif (conferenceInfo == null) {\n\t\t\tthrow new XMLException(\"Could not parse conference-info document,\"\n\t\t\t\t+ \" conference-info element not found\");\n\t\t}\n\n\t\tconferenceDescription = XMLUtils.findChild(conferenceInfo,\n\t\t\tCONFERENCE_DESCRIPTION_ELEMENT_NAME);\n\t\t// conference-description is mandatory\n\t\tif (conferenceDescription == null) {\n\t\t\tthrow new XMLException(\"Could not parse conference-info document,\"\n\t\t\t\t+ \" conference-description element not found\");\n\t\t}\n\n\t\tconferenceState = XMLUtils.findChild(conferenceInfo, CONFERENCE_STATE_ELEMENT_NAME);\n\t\tif (conferenceState != null)\n\t\t\tuserCount = XMLUtils.findChild(conferenceState, USER_COUNT_ELEMENT_NAME);\n\n\t\tusers = XMLUtils.findChild(conferenceInfo, USERS_ELEMENT_NAME);\n\t\tif (users == null) {\n\t\t\tthrow new XMLException(\"Could not parse conference-info document,\"\n\t\t\t\t+ \" 'users' element not found\");\n\t\t}\n\t\tNodeList usersNodeList = users.getElementsByTagName(USER_ELEMENT_NAME);\n\t\tfor (int i = 0; i < usersNodeList.getLength(); i++) {\n\t\t\tUser user = new User((Element) usersNodeList.item(i));\n\t\t\tusersList.add(user);\n\t\t}\n\t}", "public void getXmlFromStream (BufferedReader reader){\n\n String tmpDate = null;\n String strDate = null;\n Date date = null;\n\n try{\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n XmlPullParser xpp = factory.newPullParser();\n\n // point the parser to our file.\n xpp.setInput(reader);\n // get initial eventType\n int eventType = xpp.getEventType();\n\n // process tag while not reaching the end of document\n while(eventType != XmlPullParser.END_DOCUMENT) {\n switch(eventType) {\n // at start of document: START_DOCUMENT\n case XmlPullParser.START_DOCUMENT:\n //study = new Study();\n break;\n\n // at start of a tag: START_TAG\n case XmlPullParser.START_TAG:\n // get tag name\n String tagName = xpp.getName();\n\n // if <Cube>, get attribute: 'currency'\n if(tagName.equalsIgnoreCase(KEY_CUBE)) {\n if(strDate == null){\n strDate = xpp.getAttributeValue(null, KEY_DATE);\n }\n\n String currency = xpp.getAttributeValue(null, KEY_CURRENCY);\n String rate = xpp.getAttributeValue(null, KEY_RATE);\n if(currency != null) {\n\n // Create new object\n date = createDate(strDate); // Create date\n double doubleRate = Double.parseDouble(rate); // Convert string to double\n cubes.add(new CubeXML(new Date(),currency, doubleRate)); // Create object and store in list\n }\n }\n break;\n }\n // jump to next event\n eventType = xpp.next();\n }\n\n // Add euro\n cubes.add(new CubeXML(date, \"Euro\",1));\n\n } catch (XmlPullParserException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private PersonDao parseXmlStringPerson(String xmlDoc){\n try {\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n PersonHandler personHandle = new PersonHandler();\n saxParser.parse(new InputSource(new StringReader(xmlDoc)), personHandle);\n return ((ArrayList<PersonDao>)personHandle.getObjects()).get(0);\n } catch (Exception e) {\n AppLogger.getLogger().error(e.getMessage());\n }\n return null;\n }", "public static Document parseXML(InputStream xmlStream) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\r\n\t\t\txmlDoc = builder.parse(xmlStream);\r\n\t\t} catch (ParserConfigurationException e)\r\n\t\t{\r\n\t\t\tthrow new BaseException(\"ERR_XML_PARSE\", \"Error while parsing XML\", e);\r\n\t\t} catch (SAXException e)\r\n\t\t{\r\n\t\t\tthrow new BaseException(\"ERR_XML_PARSE\", \"Error while parsing XML\", e);\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tthrow new BaseException(\"ERR_XML_PARSE\", \"Error while parsing XML\", e);\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}", "protected void parseRootElement() {\n\n // This is the Activiti method body for parsing through the XML object model\n // The Joda Engine needs less information than Activiti. That's why some methods are commented out.\n parseProcessDefinitions();\n }", "public XmlPullParser getLocalXML(String filename) throws IOException {\r\n\t\ttry {\r\n\t\t\tin = mContext.getAssets().open(filename);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tXmlPullParser parser = Xml.newPullParser();\r\n\t\t\tparser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);\r\n\t\t\tparser.setInput(in, null);\r\n\t\t\tparser.nextTag();\r\n\t\t\treturn parser;\r\n\t\t} catch (XmlPullParserException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "private NodeList getNodeListFromFile(String xmlFileName) throws ParserConfigurationException, SAXException, IOException {\r\n\t\ttry{\r\n\t\t\t//sample XMLParser code, nothing to change\r\n\t\t\tFile fXmlFile = new File(xmlFileName);\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\r\n\t\t\tdoc.getDocumentElement().normalize();\r\n\t\t\treturn doc.getElementsByTagName(\"element\");\r\n\t\t} catch ( Throwable throwable ) {\r\n\t\t System.out.println(throwable.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Document getDocument() throws FIFException {\n try {\n DOMParser parser = new DOMParser();\n ParsingErrorHandler handler = new ParsingErrorHandler();\n parser.setErrorHandler(handler);\n parser.setEntityResolver(new EntityResolver());\n parser.parse(new InputSource(new StringReader(text)));\n\n if (handler.isError()) {\n logger.error(\n \"XML Parsing Errors while generating XML document \"\n + \"for message: \"\n + text);\n throw new FIFException(\n \"XML parser reported the following errors:\\n\"\n + handler.getErrors());\n }\n return (parser.getDocument());\n } catch (SAXException e) {\n throw new FIFException(\"Cannot parse message string \" + text, e);\n } catch (IOException e) {\n throw new FIFException(\"Cannot parse message string \" + text, e);\n }\n }" ]
[ "0.68500906", "0.6778623", "0.64440745", "0.64156216", "0.63998663", "0.63457435", "0.63075334", "0.62935424", "0.62734646", "0.62332565", "0.618391", "0.61230236", "0.6111972", "0.6097276", "0.60910165", "0.60405463", "0.6028189", "0.6009458", "0.6006771", "0.6005588", "0.5988747", "0.5987896", "0.5963349", "0.59551334", "0.59260267", "0.59176075", "0.5907886", "0.59014845", "0.5860779", "0.5839146", "0.5832365", "0.581174", "0.57927346", "0.5786078", "0.5775169", "0.57672185", "0.5759045", "0.5758162", "0.5736697", "0.57352924", "0.57250726", "0.57162756", "0.571491", "0.5689329", "0.56665176", "0.5657626", "0.5641496", "0.56217957", "0.56195724", "0.5611619", "0.5598726", "0.55942255", "0.5590364", "0.55390644", "0.55356306", "0.5524607", "0.5508912", "0.550525", "0.5502385", "0.54954606", "0.54841906", "0.5479352", "0.5456768", "0.54428506", "0.54426557", "0.54200214", "0.541503", "0.54100823", "0.5395877", "0.53920203", "0.53837585", "0.537959", "0.53748447", "0.53654206", "0.5360008", "0.53586465", "0.53580844", "0.53566176", "0.534867", "0.53468555", "0.5344737", "0.5318681", "0.5312377", "0.53093165", "0.5305776", "0.530408", "0.53010297", "0.5296799", "0.52940905", "0.52465594", "0.5244776", "0.52441734", "0.52421296", "0.5236462", "0.5236291", "0.5225623", "0.521806", "0.5215959", "0.5213753", "0.5213164", "0.52098024" ]
0.0
-1
TODO: merge to this project private SensorCommunication sensorCommunication; Empty constructor needed for serialization This constructor shall never be called otherwise
public Sensor() { if(this.rawData == null) this.rawData = new Vector<SensorData>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SensorData() {\n\n\t}", "public BasicSensor() {}", "public SensorReader() {\n\t\tinit();\n\t}", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public RegistroSensor() \n {\n\n }", "public SensorStation(){\n\n }", "DeviceSensor createDeviceSensor();", "public SensorLog() {\n }", "RegisterSensor() {\n }", "public TRIP_Sensor () {\n super();\n }", "ExternalSensor createExternalSensor();", "public IRSensorSubsystem() {\n\n }", "SensorDescription(){\n\n }", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public Sensor(int threadNumber) {\n\t\tdeviceNumber = threadNumber;\n\t}", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "Sensor getSensor();", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public String getSensor()\n {\n return sensor;\n }", "@Override\n public void receivedSensor(SensorData sensor) {\n synchronized(_sensorListeners) {\n if (!_sensorListeners.containsKey(sensor.channel)) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_SENSOR.str);\n UdpConstants.writeSensorData(resp.stream, sensor);\n \n // Send to all listeners\n synchronized(_sensorListeners) {\n Map<SocketAddress, Integer> _listeners = _sensorListeners.get(sensor.channel);\n _udpServer.bcast(resp, _listeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize sensor \" + sensor.channel);\n }\n }", "public interface SensorData {\n String toString();\n}", "public PerforceSensor() {\r\n //nothing yet.\r\n }", "public PSensor toParcelable() {\n return new PSensor(this.sensorID, this.displayedSensorName, this.bluetoothID, this.sampleRate,\n this.savePeriod, this.smoothness, this.sensorType, this.graphType,\n this.rawDataMeasurementUnit, this.rawDataMeasurementSystem,\n this.displayedMeasurementUnit, this.displayedMeasurementSystem, this.isInternalSensor);\n }", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness,\n String displayedSensorName, SensorType sensorType, String bluetoothID,\n MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit,\n MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) {\n isInternalSensor = false;\n\n // compute the lowest external sensorID which is not forgiven yet\n int id = 100;\n for (Sensor sensor : SensorManager.getAllSensors()) {\n if (id <= sensor.getSensorID()) {\n id = sensor.getSensorID() + 1;\n }\n }\n\n sensorID = id;\n\n this.sensorDriver = sensorDriver;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.bluetoothID = bluetoothID;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementSystem = displayedMeasurementSystem;\n this.displayedMeasurementUnit = displayedMeasurementUnit;\n this.graphType = GraphType.LINE;\n this.isEnabled = true;\n\n SensorManager.addNewSensor(this);\n }", "public Sensor registerSensor(String name, String type) {\n \tSCSensor sensor = new SCSensor(name);\n \n String uid = UUID.randomUUID().toString();\n sensor.setId(uid);\n sensor.setType(type);\n \n //temporary fix..\n if(sensorCatalog.hasSensorWithName(name))\n \tsensorCatalog.removeSensor(sensorCatalog.getSensorWithName(name).getId());\n \n // Setting PublicEndPoint\n sensor.setPublicEndpoint(publicEndPoint);\n \n /*sensor = generateSensorEndPoints(sensor);*/\n Endpoint dataEndpoint;\n if (Constants.SENSOR_TYPE_BLOCK.equalsIgnoreCase(type)) {\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n } else if (Constants.SENSOR_TYPE_STREAMING.equalsIgnoreCase(type)) {\n dataEndpoint = new StreamingEndpoint();\n \n dataEndpoint.setProperties(configuration.getStreamingServer().getParameters());\n dataEndpoint.getProperties().put(\"PATH\", \"sensor/\" + sensor.getId() + \"/data\");\n \n // add the routing to the streaming server\n } else {\n // defaulting to JMS\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n }\n \n sensor.setDataEndpoint(dataEndpoint);\n \n Endpoint controlEndpoint;\n \n controlEndpoint = new JMSEndpoint();\n controlEndpoint.setAddress(sensor.getId() + \"/control\");\n // TODO: we have to decide the connection factory to be used\n controlEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n sensor.setControlEndpoint(controlEndpoint);\n \n // set the update sending endpoint as the global endpoint\n Endpoint updateSendingEndpoint;\n updateSendingEndpoint = new JMSEndpoint();\n \n updateSendingEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n updateSendingEndpoint.setAddress(sensor.getId() + \"/update\");\n sensor.setUpdateEndpoint(updateSendingEndpoint);\n \n registry.addSensor(sensor);\n \n sensorCatalog.addSensor(sensor);\n updateManager.sensorChange(Constants.Updates.ADDED, sensor.getId());\n return sensor;\n }", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "public void sensorReader() {\n try {\n Log.i(TAG, \"wants to read from Arduino\");\n this.inputStream = socket.getInputStream();\n this.inputStreamReader = new InputStreamReader(inputStream);\n Log.i(TAG, \"inputstream ready\");\n this.bufferedReader = new BufferedReader(inputStreamReader);\n Log.i(TAG, \"buffered reader ready\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public MovementData() {\n\t\tsensorData = new ArrayList<SensorReading>();\t\t\n\t\tthis.nextIndex = 0;\n\t\tthis.prevIndex = -1;\n\t}", "public MonitoredData() {}", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "public device() {\n\t\tsuper();\n\t}", "private void sensorInformation(){\n\t\tthis.name = this.paramName;\n\t\tthis.version = this.paramVersion;\n\t\tthis.author = this.paramVersion;\n\t}", "protected Sensor[] getSensorValues() { return sensors; }", "public ActuatorData()\n\t{\n\t\tsuper(); \n\t}", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "public HeadTiltProcessingService(Sensor sensor, int timeInterval){\n this(sensor);\n this.timeInterval=timeInterval;\n }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "public SensorException(String message) {\r\n super(message);\r\n }", "public DuplicateSensorException(){\n }", "private SensorController(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected Sensor(int gpsSensorID, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = gpsSensorID;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this. displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "public Device(Hub h) {\n uuid = UUID.randomUUID();\n status = Status.NORMAL;\n hub = h;\n }", "public RegisterSensor(final String version, final Object sensorDescription, final ObservationTemplate observationTemplate) {\n super(version);\n this.observationTemplate = observationTemplate;\n this.sensorDescription = new SensorDescription(sensorDescription);\n }", "protected AbstractSensorMatrixNode(final SensorMatrix sensorMatrix) {\n super();\n if (sensorMatrix == null) {\n throw new IllegalArgumentException(\"sensorMatrix must not be null\");\n }\n this.sensorMatrix = sensorMatrix;\n setWidth(sensorMatrix.columns() * sensorMatrix.getReceptiveFieldWidth());\n setHeight(sensorMatrix.rows() * sensorMatrix.getReceptiveFieldHeight());\n }", "public IoTSecurityAlertedDevice() {\n }", "public SensorLog(Date when, Float temperature) {\n this.when = when;\n this.temperature = temperature;\n }", "private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }", "public RegisterSensor.SensorDescription getRealSensorDescription() {\n return sensorDescription;\n }", "public DoorSensorClient(String serviceName) throws IOException {\n super(serviceName);\n }", "public CommunicationException() {\r\n\t\tsuper();\r\n\t}", "private static void initialize_sensorTypeToWrapperDataFormat() {\n\t\tsensorTypeToWrapperDataFormat.put(\"weather\", \"XML/JSON\");\n\t\tsensorTypeToWrapperDataFormat.put(\"traffic\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"roadactivity\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowfall\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowdepth\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"webcam\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"radar\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"satellite\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"sealevel\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"cosm\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"bikehire\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"railwaystation\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"ADSBHub\", \"Stream\");\n\t}", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "public SensorDescription(final Object description){\n any = description;\n }", "public NxtTouchSensor(ComponentContainer container) {\n super(container, \"NxtTouchSensor\");\n handler = new Handler();\n previousState = State.UNKNOWN;\n sensorReader = new Runnable() {\n public void run() {\n if (bluetooth != null && bluetooth.IsConnected()) {\n SensorValue<Boolean> sensorValue = getPressedValue(\"\");\n if (sensorValue.valid) {\n State currentState = sensorValue.value ? State.PRESSED : State.RELEASED;\n\n if (currentState != previousState) {\n if (currentState == State.PRESSED && pressedEventEnabled) {\n Pressed();\n }\n if (currentState == State.RELEASED && releasedEventEnabled) {\n Released();\n }\n }\n\n previousState = currentState;\n }\n }\n if (isHandlerNeeded()) {\n handler.post(sensorReader);\n }\n }\n };\n\n SensorPort(DEFAULT_SENSOR_PORT);\n PressedEventEnabled(false);\n ReleasedEventEnabled(false);\n }", "GenericFloatSensor sensor();", "public void sensorSystem() {\n\t}", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public PlugwiseMQTTDeviceInfo()\n\t{\n\t\t// initialize internal variables\n\t\tthis.macAddress = \"\";\n\t\tthis.type = \"circle\";\n\t}", "public TRIP_Sensor(int id, double x, double y) {\n super(id,x,y);\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public abstract void createSensors() throws Exception;", "public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}", "public Payload() {}", "public void sendSensorData(String[] sensor) {\r\n\t\tlogger.info(\"intializing sensors: \" + Arrays.toString(sensor));\r\n\t\treadyToProcessData = false;\r\n\t\tthis.sensor = sensor;\r\n\t\tfor (int i = 0; i < sensor.length; i++) {\r\n\t\t\tif (sensor[i].equals(\"Dist-Nx-v3\")) {\r\n\t\t\t\t// dist_nx = controlClass.getDist_nx();\r\n\t\t\t\tsendCommand(10, 1, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"DIST-NX:\" + dist_nx);\r\n\t\t\t} else if (sensor[i].equals(\"LightSensorArray\")) {\r\n\t\t\t\t// lsa = controlClass.getLsa();\r\n\t\t\t\tsendCommand(10, 2, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"LSA:\" + lsa);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDLinks\")) {\r\n\t\t\t\t// eopdLeft = controlClass.getEopdLeft();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"EOPD links\" + eopdLeft);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDRechts\")) {\r\n\t\t\t\t// eopdRight = controlClass.getEopdRight();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 2);\r\n\t\t\t\t// logger.debug(\"EOPD rechts\" + eopdRight);\r\n\t\t\t} else if (sensor[i].equals(\"AbsoluteIMU-ACG\")) {\r\n\t\t\t\t// absimu_acg = controlClass.getAbsimu_acg();\r\n\t\t\t\tsendCommand(10, 4, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"Gyro\" + absimu_acg);\r\n\t\t\t} else if (sensor[i].equals(\"IRThermalSensor\")) {\r\n\t\t\t\t// tsLeft = controlClass.getTsLeft();\r\n\t\t\t\tsendCommand(10, 5, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"ts left\" + tsLeft);\r\n\t\t\t} else if (sensor[i].equals(\"ColourSensor\")) {\r\n\t\t\t\tsendCommand(10, 6, i + 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tsendCommand(0, 0, 0, 0);\r\n\t\t\t\tlogger.debug(\"Sensor existiert nicht\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treadyToProcessData = true;\r\n\r\n\t\ttry {\r\n\t\t\tint linearAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.linearAccelaration\"));\r\n\t\t\tint rotationAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationAccelaration\"));\r\n\t\t\tint speed = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationSpeed\"));\r\n\t\t\tsetLinearAccelaration(linearAccelaration);\r\n\t\t\tsetRotationAccelaration(rotationAccelaration);\r\n\t\t\tsetRotationSpeed(speed);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"sendSensorData: error while parsing properties\");\r\n\t\t}\r\n\t\t// notifyAll();\r\n\t\tlogger.debug(\"sendSensorData flag set to: \" + readyToProcessData);\r\n\t}", "public synchronized MonitoringDevice fromJSON(String json){\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\t//Convert object to JSON string and pretty print\n\t\tMonitoringDevice mDeviceTemp = null;\n\t\t\n\t\ttry {\n\t\t\n\t\t\tmDeviceTemp = mapper.readValue(json, MonitoringDevice.class);\n\t\t\t\n\t\t\tlogger.debug(\"Json object read:\" + mDeviceTemp.toJson());\n\t\t\t\n\t\t\tlogger.debug(\"Monitoring device id given:\" + mDeviceTemp.getId() );\n\t\t\tlogger.debug(\"Monitoring address given:\" + mDeviceTemp.getIp_address() );\n\t\t\t\n\t\t\tDeviceTypeContainer deviceTypeContainer = (DeviceTypeContainer) this.getReferenceContainer(\"DeviceType\");\t\t\t\n\t\t\tDeviceType deviceTypeTmp = (DeviceType) deviceTypeContainer.getObject(mDeviceTemp.getType().getId());\n\t\t\t\n\t\t\tif (deviceTypeTmp != null) {\n\t\t\t\tmDeviceTemp.setType(deviceTypeTmp);\n\t\t\t} else {\n\t\t\t\tdeviceTypeContainer.fromJSON(mDeviceTemp.getType().toJson());\n\t\t\t}\n\t\t\t\n\t\t\tSignalContainer signalContainer = (SignalContainer) this.getReferenceContainer(\"Signal\");\n\t\t\tfor (int i=0; i < mDeviceTemp.inputOutputPorts.size(); i++){\n\t\t\t\tInputOutputPort inputOutputPort = mDeviceTemp.inputOutputPorts.get(i);\n\t\t\t\tSignal signal = (Signal) signalContainer.getObject(inputOutputPort.getSignalType().getId());\n\t\t\t\t\n\t\t\t\tif (signal == null){\n\t\t\t\t\tsignalContainer.fromJSON(inputOutputPort.getSignalType().toJson());\n\t\t\t\t} else { \n\t\t\t\t\tinputOutputPort.setSignalType(signal);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmDeviceTemp.updateIndexes();\n\n\t\t} catch (JsonParseException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mDeviceTemp;\n\t}", "public SensorLog(String id, Date when, Float temperature) {\n this.id = id;\n this.when = when;\n this.temperature = temperature;\n }", "public IGarmentDriver getSensorDriver() {\n return sensorDriver;\n }", "public interface SensorDataService{\n Temperature saveTemperature(Temperature temperature);\n Humidity saveHumidity(Humidity humidity);\n AirPressure saveAirPressure(AirPressure airPressure);\n}", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "public int getSensorID() {\n return sensorID;\n }", "public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }", "public Temperature() {\n\t\tsuper();\n\t}", "public Device() {\n }", "public ThreadedConnectionHandler(Socket clientSocket) {\r\n this.clientSocket = clientSocket;\r\n //Set up a service object to get the current date and time\r\n this.theDateService = new DateTimeService();\r\n //this.lngNumberOfReadings = 0;\r\n this.theTemperatureService = new TemperatureService();\r\n }", "public MHLMobileIOClient(BandAccelerometerAppActivity a, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = new MHLBlockingSensorReadingQueue();\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }", "public abstract void recordSensorData(RealmObject sensorData);", "public BaseConfig() {\n\t\tlong current = System.currentTimeMillis();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(current);\n\t\tthis.start_hours = cal.get(Calendar.HOUR_OF_DAY);\n\t\tthis.start_minutes = cal.get(Calendar.MINUTE);\n\t\tthis.stop_hours = this.start_hours;\n\t\tthis.stop_minutes = this.start_minutes;\n\t\tthis.force_on = false;\n\t\tthis.force_off = false;\n\t\tthis.sensor_type = SensorType.LIGHT;\n\t\tthis.sensing_threshold = .5f;\n\t\tthis.sensorInterval = 3000;\n\t\t/*String address;\n\t\ttry {\n\t\t\taddress = InetAddress.getLocalHost().toString();\n\t\t\taddress = address.substring(address.indexOf('/') + 1);\n\t\t\tserverIP = address;\n\t\t\tserverPort = 9999;\n\t\t} catch (UnknownHostException e) {\n\t\t\t// Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t\n\t}", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "public Sensor(String name, boolean state, int image, String key, Context c){\n this.name = name;\n this.state = state;\n this.image = image;\n this.context = c;\n this.key = key;\n\n }", "public static ReferenceSensor from(UUID id, UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemTime, InformationSource informationSource, String comment) {\n return new ReferenceSensor(id, channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemTime, informationSource, comment);\n }", "public RainCollectorSensor() {\r\n\t\trecalibrateData();\r\n\t\tmetric = true; \r\n\t}", "public Observable<Data> start(Sensor sensor){\n return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> {\n DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus());\n return new Data(sensor, dataTypeInt);\n });\n }", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public HiTechnicMagneticSensor(Port port) {\r\n super(port);\r\n init();\r\n }", "public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}", "public MHLMobileIOClient(BandAccelerometerAppActivity a, MHLBlockingSensorReadingQueue q, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = q;\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }", "public Payload() {\n\t}", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public ObjXportStusRecord() {\n\t\tsuper(ObjXportStus.OBJ_XPORT_STUS);\n\t}", "public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}", "public void logSensorData () {\n\t}", "public Commercial()\n {\n super();\n payload = 0;\n }", "public SerialCommFrame()\n {\n super();\n initialize();\n }" ]
[ "0.73992854", "0.70757174", "0.6787543", "0.6783614", "0.6781397", "0.67739505", "0.66766584", "0.66509414", "0.66340184", "0.6586872", "0.6574346", "0.64939415", "0.64922124", "0.635115", "0.6347336", "0.63358104", "0.62638587", "0.61782324", "0.6150746", "0.6130647", "0.612042", "0.61198723", "0.61100215", "0.60648614", "0.6042341", "0.6037428", "0.5982216", "0.5964722", "0.59179974", "0.59071845", "0.58578837", "0.5850444", "0.5848012", "0.5827195", "0.5822608", "0.5820012", "0.5819807", "0.5794532", "0.57805234", "0.57731736", "0.5754558", "0.5731285", "0.57182866", "0.5708526", "0.569342", "0.5653641", "0.5641883", "0.56247723", "0.56184566", "0.5618051", "0.56156343", "0.5610317", "0.55981004", "0.5597614", "0.5591821", "0.55885166", "0.55812573", "0.55767304", "0.5564769", "0.555652", "0.55560476", "0.55441606", "0.5541037", "0.55368876", "0.55144477", "0.55131006", "0.55000275", "0.5499632", "0.54924756", "0.54898727", "0.547407", "0.5458055", "0.5456492", "0.54475313", "0.5436835", "0.54367745", "0.5434421", "0.5434123", "0.5432236", "0.54257035", "0.54235905", "0.5422723", "0.54220086", "0.5415298", "0.54121286", "0.5409527", "0.5405973", "0.53950083", "0.53919214", "0.5382658", "0.53759307", "0.53738755", "0.5366296", "0.5360539", "0.5358872", "0.5352521", "0.53477633", "0.5340844", "0.53287", "0.532157" ]
0.72629994
1
Creates a new Sensor, assigns the given values and adds the Sensor to the SensorManagers sensor list. The new Sensor will have the lowest external sensorID, which is not forgiven yet. Use only for external Sensors
public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness, String displayedSensorName, SensorType sensorType, String bluetoothID, MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit, MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) { isInternalSensor = false; // compute the lowest external sensorID which is not forgiven yet int id = 100; for (Sensor sensor : SensorManager.getAllSensors()) { if (id <= sensor.getSensorID()) { id = sensor.getSensorID() + 1; } } sensorID = id; this.sensorDriver = sensorDriver; this.sampleRate = sampleRate; this.savePeriod = savePeriod; this.smoothness = smoothness; this.displayedSensorName = displayedSensorName; this.sensorType = sensorType; this.bluetoothID = bluetoothID; this.rawDataMeasurementSystem = rawDataMeasurementSystem; this.rawDataMeasurementUnit = rawDataMeasurementUnit; this.displayedMeasurementSystem = displayedMeasurementSystem; this.displayedMeasurementUnit = displayedMeasurementUnit; this.graphType = GraphType.LINE; this.isEnabled = true; SensorManager.addNewSensor(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExternalSensor createExternalSensor();", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "DeviceSensor createDeviceSensor();", "public synchronized int addSensor(Sensor s) throws Exception{\n int index = sList.addSensor(s);\n sensors.put(index, s);\n \n listeners.stream().forEach((listener) -> {\n listener.modelEventHandler(ModelEventType.SENSORADDED, index);\n });\n \n s.addListener(this);\n \n return index;\n }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "private void registerSensors()\n {\n // Double check that the device has the required sensor capabilities\n\n if(!HasGotSensorCaps()){\n showToast(\"Required sensors not supported on this device!\");\n return;\n }\n\n // Provide a little feedback via a toast\n\n showToast(\"Registering sensors!\");\n\n // Register the listeners. Used for receiving notifications from\n // the SensorManager when sensor values have changed.\n\n sensorManager.registerListener(this, senStepCounter, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senStepDetector, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue create(\n long sensorValueId) {\n return getPersistence().create(sensorValueId);\n }", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "public Sensor registerSensor(String name, String type) {\n \tSCSensor sensor = new SCSensor(name);\n \n String uid = UUID.randomUUID().toString();\n sensor.setId(uid);\n sensor.setType(type);\n \n //temporary fix..\n if(sensorCatalog.hasSensorWithName(name))\n \tsensorCatalog.removeSensor(sensorCatalog.getSensorWithName(name).getId());\n \n // Setting PublicEndPoint\n sensor.setPublicEndpoint(publicEndPoint);\n \n /*sensor = generateSensorEndPoints(sensor);*/\n Endpoint dataEndpoint;\n if (Constants.SENSOR_TYPE_BLOCK.equalsIgnoreCase(type)) {\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n } else if (Constants.SENSOR_TYPE_STREAMING.equalsIgnoreCase(type)) {\n dataEndpoint = new StreamingEndpoint();\n \n dataEndpoint.setProperties(configuration.getStreamingServer().getParameters());\n dataEndpoint.getProperties().put(\"PATH\", \"sensor/\" + sensor.getId() + \"/data\");\n \n // add the routing to the streaming server\n } else {\n // defaulting to JMS\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n }\n \n sensor.setDataEndpoint(dataEndpoint);\n \n Endpoint controlEndpoint;\n \n controlEndpoint = new JMSEndpoint();\n controlEndpoint.setAddress(sensor.getId() + \"/control\");\n // TODO: we have to decide the connection factory to be used\n controlEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n sensor.setControlEndpoint(controlEndpoint);\n \n // set the update sending endpoint as the global endpoint\n Endpoint updateSendingEndpoint;\n updateSendingEndpoint = new JMSEndpoint();\n \n updateSendingEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n updateSendingEndpoint.setAddress(sensor.getId() + \"/update\");\n sensor.setUpdateEndpoint(updateSendingEndpoint);\n \n registry.addSensor(sensor);\n \n sensorCatalog.addSensor(sensor);\n updateManager.sensorChange(Constants.Updates.ADDED, sensor.getId());\n return sensor;\n }", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "RegisterSensor() {\n }", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public final flipsParser.defineSensor_return defineSensor() throws RecognitionException {\n flipsParser.defineSensor_return retval = new flipsParser.defineSensor_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal52=null;\n Token string_literal53=null;\n Token string_literal54=null;\n flipsParser.defineSensorValue_return defineSensorValue55 = null;\n\n\n CommonTree string_literal52_tree=null;\n CommonTree string_literal53_tree=null;\n CommonTree string_literal54_tree=null;\n RewriteRuleTokenStream stream_132=new RewriteRuleTokenStream(adaptor,\"token 132\");\n RewriteRuleTokenStream stream_131=new RewriteRuleTokenStream(adaptor,\"token 131\");\n RewriteRuleTokenStream stream_130=new RewriteRuleTokenStream(adaptor,\"token 130\");\n RewriteRuleSubtreeStream stream_defineSensorValue=new RewriteRuleSubtreeStream(adaptor,\"rule defineSensorValue\");\n try {\n // flips.g:176:2: ( ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue -> defineSensorValue )\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue\n {\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' )\n int alt21=3;\n switch ( input.LA(1) ) {\n case 130:\n {\n alt21=1;\n }\n break;\n case 131:\n {\n alt21=2;\n }\n break;\n case 132:\n {\n alt21=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 0, input);\n\n throw nvae;\n }\n\n switch (alt21) {\n case 1 :\n // flips.g:176:5: 'sen'\n {\n string_literal52=(Token)match(input,130,FOLLOW_130_in_defineSensor839); \n stream_130.add(string_literal52);\n\n\n }\n break;\n case 2 :\n // flips.g:176:11: 'sensor'\n {\n string_literal53=(Token)match(input,131,FOLLOW_131_in_defineSensor841); \n stream_131.add(string_literal53);\n\n\n }\n break;\n case 3 :\n // flips.g:176:20: 'sensors'\n {\n string_literal54=(Token)match(input,132,FOLLOW_132_in_defineSensor843); \n stream_132.add(string_literal54);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_defineSensorValue_in_defineSensor846);\n defineSensorValue55=defineSensorValue();\n\n state._fsp--;\n\n stream_defineSensorValue.add(defineSensorValue55.getTree());\n\n\n // AST REWRITE\n // elements: defineSensorValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 177:2: -> defineSensorValue\n {\n adaptor.addChild(root_0, stream_defineSensorValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "public void addSensor(String sensorId, String sensorType, String sensorUnits, int interval, int threshold, boolean upperlimit){\n Sensor theSensor = new Sensor(sensorId, sensorType, sensorUnits, interval, threshold, upperlimit);\n sensors.addSensor(theSensor);\n theSensor.setFieldStation(this);\n }", "protected Sensor<Float> createExtreme(Sensor<Float> sensor, Extreme type)\n {\n String key = sensor.getUuid() + \".\" + type.key;\n History history = extremes.get(key);\n\n // Es gibt noch gar keine Queue fuer die Werte. Dann legen wir eine an\n if (history == null)\n {\n Settings settings = Application.getPluginLoader().getPlugin(Plugin.class).getResources().getSettings();\n int minutes = settings.getInt(\"scheduler.interval.minutes\",5);\n int size = 24 * 60 / minutes;\n history = new History(size);\n extremes.put(key,history);\n }\n\n Float value = sensor.getValue();\n\n // Wert hinzufuegen\n history.push(value);\n \n // Extrem-Wert ermitteln\n List<Float> values = history.elements();\n for (Float f:values)\n {\n if (type == Extreme.MAX && f.compareTo(value) > 0)\n {\n value = f;\n continue;\n }\n if (type == Extreme.MIN && f.compareTo(value) < 0)\n {\n value = f;\n continue;\n }\n }\n\n Sensor clone = (Sensor<Float>) sensor.clone();\n clone.setUuid(key);\n clone.setValue(value);\n clone.setName(i18n.tr(\"{0} ({1})\",sensor.getName(),type.title));\n return clone;\n }", "public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }", "public synchronized void addSensor(int type) {\n\n if (running) {\n throw new IllegalStateException(\"Is running\");\n }\n Sensor s = manager.getDefaultSensor(type);\n\n if (!sensorsList.contains(s)) {\n sensorsList.add(s);\n }\n }", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public SetSensorCommand(List<SensorType> requiredSensors) {\n super(CommandType.SetSensor);\n this.requiredSensors = requiredSensors;\n }", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public abstract void createSensors() throws Exception;", "public int insertSensorData(DataValue dataVal) throws Exception;", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "public int Register(){\n\t\tnumSensors = 0;\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tif(mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME)) numSensors++; \n\t\treturn numSensors;\t\n\t}", "@Override\n void add()\n {\n long sensorId = Long.parseLong(textSensorId.getText());\n MissionNumber missionNumber = textMissionNumber.getValue();\n String jobOrderNumber = textJobOrderNumber.getText();\n \n FPS16SensorDataGenerator generator = new FPS16SensorDataGenerator(tspiConfigurator.getTspiGenerator(), sensorId, missionNumber, jobOrderNumber);\n controller.addSensorDataGenerator(getRate(), getChannel(), generator);\n }", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "public Sensor(int threadNumber) {\n\t\tdeviceNumber = threadNumber;\n\t}", "Sensor getSensor();", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "public void loadSensors() {\r\n\t\thandlerBridge.loadBrigde();\r\n\t\thandlerSensor = new SensorHandler(handlerBridge.loadSensors());\r\n\t}", "protected Sensor[] getSensorValues() { return sensors; }", "public BasicSensor() {}", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public RegisterSensor(final String version, final Object sensorDescription, final ObservationTemplate observationTemplate) {\n super(version);\n this.observationTemplate = observationTemplate;\n this.sensorDescription = new SensorDescription(sensorDescription);\n }", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public void startSensors() {\r\n\t\tsensorManager.registerListener(this, accelerometer,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\t\tsensorManager.registerListener(this, magneticField,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\r\n\t\tLog.d(TAG, \"Called startSensors\");\r\n\t}", "protected Sensor(int gpsSensorID, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = gpsSensorID;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this. displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public static Sensor checkAndAddSensor(Context aContext, String name, String address) {\n\t\tSensor s = getSensor(name, address);\n\t\t\n\t\tif (s != null) {\n\t\t\treturn s;\n\t\t}\n\n\t\tif (name.contains(Defines.ZEPHYR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ZEPHYR_ENABLED) {\n\t\t\t\ts = new ZephyrSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.POLAR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_POLAR_ENABLED) {\n\t\t\t\ts = new PolarSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.WOCKET_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_WOCKETS_ENABLED) {\n\t\t\t\ts = new WocketSensor(aContext, name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.ASTHMAPOLIS_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ASTHMAPOLIS_ENABLED) {\n\t\t\t\ts = new AsthmapolisSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\n\t\t\t}\n\t\t}\n\n\t\treturn s;\n\t}", "private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}", "public SensorReader() {\n\t\tinit();\n\t}", "public SensorData() {\n\n\t}", "public void init(Object[] parameters) {\n\n\t\t// read your parameters here and process them & extract sensor\n\t\t// parameters\n\t\t// for example we assume here that parameters[2 & 3] is an array\n\t\t// containing the sensor parameters\n\t\tObject[] sensorParameters = new Object[2];\n\t\t\n\t\tsensorParameters[0] = parameters[2];\n\t\tsensorParameters[1] = parameters[3];\n\t\n\t\tdeploySensor.deploySensor(\n\t\t\t\tLoadSensor.class.getName(),\n\t\t\t\tComponentStateChangeEvent.class.getName(),\n\t\t\t\tsensorParameters,\n\t\t\t\tnull, //no clientInterfaces\n\t\t\t\tnew String[] { \"pushLoadChange\" } //just one server interface\n\t\t);\n\t}", "private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }", "public void connectSensor() {\n mReleaseHandle = mSensorHandler.getReleaseHandle(mSensorResultReceiver, mSensorStateChangeReceiver);\n }", "public void initSensorListener() {\n SensorManager mSensorManager = (SensorManager) this.mContext.getSystemService(\"sensor\");\n if (mSensorManager == null) {\n Slog.e(\"Fsm_MagnetometerWakeupManager\", \"connect SENSOR_SERVICE fail\");\n return;\n }\n boolean isRegisted = mSensorManager.registerListener(this.mMagnetometerListener, mSensorManager.getDefaultSensor(SENSOR_TYPE_HALL), 100000);\n Slog.d(\"Fsm_MagnetometerWakeupManager\", \"register Hall Sensor result:\" + isRegisted);\n }", "public void requestSensor(String sensorType){\n switch(sensorType){\n case \"SENSOR_ACC\":\n accelerometer = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n phoneSensorsMan.registerListener(sel,accelerometer, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GYRO\":\n gyro = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n phoneSensorsMan.registerListener(sel,gyro, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_MAGNET\":\n magnet = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n phoneSensorsMan.registerListener(sel,magnet, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GPS\":\n phoneLocationMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,100,1,locListener);\n break;\n case \"SENSOR_ORIENTATION\":\n orientation = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n phoneSensorsMan.registerListener(sel,orientation, SensorManager.SENSOR_DELAY_GAME);\n\n\n }\n }", "private void initSensorManager() {\n\t\ttry {\n\t\t\tSensorManager sensorManage = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\t\t\tList<Sensor> mySensors = sensorManage\n\t\t\t\t\t.getSensorList(Sensor.TYPE_ACCELEROMETER);\n\t\t\tmAccel = 0.00f;\n\t\t\tmAccelCurrent = SensorManager.GRAVITY_EARTH;\n\t\t\tmAccelLast = SensorManager.GRAVITY_EARTH;\n\t\t\tsensorManage.registerListener(new SensorEventListener() {\n\t\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t\t\t\t}\n\n\t\t\t\t@SuppressLint(\"FloatMath\")\n\t\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\n\t\t\t\t\tfloat x = event.values[0];// Get X-Coordinator\n\n\t\t\t\t\tfloat y = event.values[1];// Get Y-Coordinator\n\n\t\t\t\t\tfloat z = event.values[2];// Get Z-Coordinator\n\n\t\t\t\t\tmAccelLast = mAccelCurrent;\n\t\t\t\t\tmAccelCurrent = (float) Math\n\t\t\t\t\t\t\t.sqrt((double) (x * x + y * y + z * z));\n\t\t\t\t\tfloat delta = mAccelCurrent - mAccelLast;\n\t\t\t\t\tmAccel = mAccel * 0.9f + delta; // perform low-cut filter\n\n\t\t\t\t\tif (SHAKING_DELTA > mAccel\n\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage != CameraMessageStatus.Focused) {\n\t\t\t\t\t\t// BY SAM for start autofocusing\n\t\t\t\t\t\tif (!lock_autofocus) {\n\t\t\t\t\t\t\tif (autoFocusCounter > AUTO_FOCUS_START_INTERVAL\n\t\t\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage == CameraMessageStatus.Shacked) {\n//\t\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t\t\t\t\t} else if (autoFocusCounter > AUTO_FOCUS_START_INTERVAL) {\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!lock_autofocus\n\t\t\t\t\t\t\t\t&& Math.abs(z - old_z) > SHAKING_Z_DELTA) {\n\n\t\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n//\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\tautoFocusCounter = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!lock_autofocus) {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_img_middle));\n\t\t\t\t\t\t\t\tautoFocusCounter++;\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_press_focus));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (mAccel > SHAKING_DELTA)// Shaking\n\t\t\t\t\t{\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.phone_silent));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Shacked;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\n\t\t\t\t\t}\n\t\t\t\t\told_z = z;\n\n\t\t\t\t}\n\t\t\t}, mySensors.get(0), SensorManager.SENSOR_DELAY_NORMAL);\n\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Unable to detect SensorManager. \",\n\t\t\t\t\t\"Error data \" + e.toString());\n\t\t}\n\t}", "public void start() {\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)==null){ // check if rotation sensor present\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD)==null\n || mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)==null){ // check if acc & mag sensors are present\n noSensorAlert(); // alert if no sensors are present\n }\n else { // use acc & mag sensors\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n haveSensor = mSensorManager.registerListener(this,mAccelerometer,SensorManager.SENSOR_DELAY_UI);\n haveSensor2 = mSensorManager.registerListener(this,mMagnetometer,SensorManager.SENSOR_DELAY_UI);\n }\n }\n else { // use rotation sensor\n mRotationV = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n haveSensor = mSensorManager.registerListener(this,mRotationV,SensorManager.SENSOR_DELAY_UI);\n }\n }", "public RegistroSensor() \n {\n\n }", "public static ArrayList<Sensor> getSensorsFromFile(InputStream fileStream) {\n ArrayList<Sensor> sensors = new ArrayList<>();\n Properties props = new Properties();\n\n // load configuration file\n try {\n props.load(fileStream);\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // for every property in the file...\n Enumeration e = props.propertyNames();\n iterateProperties:\n while(e.hasMoreElements()) {\n String sensorName = (String)e.nextElement();\n String[] parameters = props.getProperty(sensorName).split(\", *\");\n Duration[] refreshPeriods = new Duration[3];\n\n // validate parameter count\n if(parameters.length < 4) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (at least 4 needed)\");\n continue iterateProperties;\n }\n\n // parse refresh periods in ms\n for(int i = 0; i < 3; ++i)\n try {\n refreshPeriods[i] = Duration.ofMillis(Integer.parseInt(parameters[i + 1]));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect duration formatting (integer in milliseconds expected)\");\n continue iterateProperties;\n }\n\n // create sensor of specified type and add to arrayList\n switch (parameters[0]) {\n case \"LSM303a\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303a type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303AccelerationSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"LSM303m\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303m type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303MagneticSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"L3GD20H\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (L3GD20H type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new L3GD20HGyroscopeSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimInt\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimInt type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorInt(sensorName, refreshPeriods, Integer.parseInt(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimFloat\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorFloat(sensorName, refreshPeriods, Float.parseFloat(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimVecFloat\":\n if(parameters.length != 7) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 7)\");\n continue iterateProperties;\n }\n try {\n float[] seed = new float[3];\n for(int i = 0; i < seed.length; ++i) {\n seed[i] = Float.parseFloat(parameters[i + 4]);\n }\n sensors.add(new SimulatedSensorVecFloat(sensorName, refreshPeriods, seed));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n default:\n System.err.println(\"config.properties error (\" + sensorName + \"): \" + parameters[0] + \" is not a valid sensor type\");\n continue iterateProperties;\n }\n }\n\n return sensors;\n }", "public void onSensorChanged(int sensor, float[] values) {\n\t\t\t\n\t\t\t// grab the values required to respond to user movement.\n\t\t\tmAccelX = (float) (0.2 * values[0]);\n\t\t\tmAccelY = (float) (0.2 * values[1]);\n\t\t\t// mAccelZ = values[2];\n\t\t\tinvalidate();\n\t\t}", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "public int getSensorID() {\n return sensorID;\n }", "public static void CreateSensorSQL(String name, String type, String location, int updateTime) {\n\n try (\n PreparedStatement stmt = conn.\n prepareStatement(SENSOR_CREATE_SQL, ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_READ_ONLY);) {\n stmt.setString(1, name);\n stmt.setString(2, type);\n stmt.setString(3, location);\n stmt.setInt(4, updateTime);\n\n stmt.execute();\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Sensor Exist already!!\");\n }\n\n }", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "public int getSensorId() {\n\t\treturn sensorid;\n\t}", "public final flipsParser.defineSensorValue_return defineSensorValue() throws RecognitionException {\n flipsParser.defineSensorValue_return retval = new flipsParser.defineSensorValue_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token Identifier56=null;\n Token char_literal57=null;\n Token And58=null;\n Token char_literal59=null;\n Token And60=null;\n Token Identifier61=null;\n Token char_literal62=null;\n flipsParser.integerValuePositive_return sen = null;\n\n\n CommonTree Identifier56_tree=null;\n CommonTree char_literal57_tree=null;\n CommonTree And58_tree=null;\n CommonTree char_literal59_tree=null;\n CommonTree And60_tree=null;\n CommonTree Identifier61_tree=null;\n CommonTree char_literal62_tree=null;\n RewriteRuleTokenStream stream_124=new RewriteRuleTokenStream(adaptor,\"token 124\");\n RewriteRuleTokenStream stream_120=new RewriteRuleTokenStream(adaptor,\"token 120\");\n RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n RewriteRuleTokenStream stream_And=new RewriteRuleTokenStream(adaptor,\"token And\");\n RewriteRuleSubtreeStream stream_integerValuePositive=new RewriteRuleSubtreeStream(adaptor,\"rule integerValuePositive\");\n try {\n // flips.g:181:2: ( Identifier '=' sen= integerValuePositive ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )* -> ( ^( DEFINE Identifier ^( SENSOR $sen) ) )+ )\n // flips.g:181:4: Identifier '=' sen= integerValuePositive ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )*\n {\n Identifier56=(Token)match(input,Identifier,FOLLOW_Identifier_in_defineSensorValue862); \n stream_Identifier.add(Identifier56);\n\n char_literal57=(Token)match(input,124,FOLLOW_124_in_defineSensorValue864); \n stream_124.add(char_literal57);\n\n pushFollow(FOLLOW_integerValuePositive_in_defineSensorValue868);\n sen=integerValuePositive();\n\n state._fsp--;\n\n stream_integerValuePositive.add(sen.getTree());\n // flips.g:181:44: ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )*\n loop24:\n do {\n int alt24=2;\n int LA24_0 = input.LA(1);\n\n if ( (LA24_0==Identifier) ) {\n int LA24_2 = input.LA(2);\n\n if ( (LA24_2==124) ) {\n alt24=1;\n }\n\n\n }\n else if ( (LA24_0==And||LA24_0==120) ) {\n alt24=1;\n }\n\n\n switch (alt24) {\n \tcase 1 :\n \t // flips.g:181:45: ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive\n \t {\n \t // flips.g:181:45: ( And | ',' ( And )? )?\n \t int alt23=3;\n \t int LA23_0 = input.LA(1);\n\n \t if ( (LA23_0==And) ) {\n \t alt23=1;\n \t }\n \t else if ( (LA23_0==120) ) {\n \t alt23=2;\n \t }\n \t switch (alt23) {\n \t case 1 :\n \t // flips.g:181:46: And\n \t {\n \t And58=(Token)match(input,And,FOLLOW_And_in_defineSensorValue872); \n \t stream_And.add(And58);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // flips.g:181:50: ',' ( And )?\n \t {\n \t char_literal59=(Token)match(input,120,FOLLOW_120_in_defineSensorValue874); \n \t stream_120.add(char_literal59);\n\n \t // flips.g:181:54: ( And )?\n \t int alt22=2;\n \t int LA22_0 = input.LA(1);\n\n \t if ( (LA22_0==And) ) {\n \t alt22=1;\n \t }\n \t switch (alt22) {\n \t case 1 :\n \t // flips.g:181:54: And\n \t {\n \t And60=(Token)match(input,And,FOLLOW_And_in_defineSensorValue876); \n \t stream_And.add(And60);\n\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t Identifier61=(Token)match(input,Identifier,FOLLOW_Identifier_in_defineSensorValue881); \n \t stream_Identifier.add(Identifier61);\n\n \t char_literal62=(Token)match(input,124,FOLLOW_124_in_defineSensorValue883); \n \t stream_124.add(char_literal62);\n\n \t pushFollow(FOLLOW_integerValuePositive_in_defineSensorValue887);\n \t sen=integerValuePositive();\n\n \t state._fsp--;\n\n \t stream_integerValuePositive.add(sen.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop24;\n }\n } while (true);\n\n\n\n // AST REWRITE\n // elements: sen, Identifier\n // token labels: \n // rule labels: retval, sen\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_sen=new RewriteRuleSubtreeStream(adaptor,\"rule sen\",sen!=null?sen.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 182:2: -> ( ^( DEFINE Identifier ^( SENSOR $sen) ) )+\n {\n if ( !(stream_sen.hasNext()||stream_Identifier.hasNext()) ) {\n throw new RewriteEarlyExitException();\n }\n while ( stream_sen.hasNext()||stream_Identifier.hasNext() ) {\n // flips.g:182:5: ^( DEFINE Identifier ^( SENSOR $sen) )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DEFINE, \"DEFINE\"), root_1);\n\n adaptor.addChild(root_1, stream_Identifier.nextNode());\n // flips.g:182:25: ^( SENSOR $sen)\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(SENSOR, \"SENSOR\"), root_2);\n\n adaptor.addChild(root_2, stream_sen.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n stream_sen.reset();\n stream_Identifier.reset();\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public static IContentSensorManager createContentSensorManager(int token, Activity activity) {\n long currentTime = System.currentTimeMillis();\n IContentSensorManager iContentSensorManager = null;\n ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();\n try {\n Class<IContentSensorManager> clz = getContentSensorManagerClass();\n if (clz != null) {\n Constructor constructor = clz.getConstructor(new Class[]{Integer.TYPE, Activity.class});\n constructor.setAccessible(true);\n iContentSensorManager = (IContentSensorManager) constructor.newInstance(new Object[]{Integer.valueOf(token), activity});\n }\n StrictMode.setThreadPolicy(oldPolicy);\n } catch (ClassNotFoundException e) {\n LogUtil.e(\"ContentSensorFactory\", \"ClassNotFoundExceptione:\" + e);\n } catch (NoSuchMethodException e2) {\n LogUtil.e(\"ContentSensorFactory\", \"NoSuchMethodExceptione:\" + e2);\n } catch (InstantiationException e3) {\n LogUtil.e(\"ContentSensorFactory\", \"InstantiationExceptione:\" + e3);\n } catch (IllegalAccessException e4) {\n LogUtil.e(\"ContentSensorFactory\", \"IllegalAccessExceptione:\" + e4);\n } catch (InvocationTargetException e5) {\n LogUtil.e(\"ContentSensorFactory\", \"InvocationTargetExceptione:\" + e5);\n } catch (Throwable th) {\n StrictMode.setThreadPolicy(oldPolicy);\n }\n if (iContentSensorManager != null) {\n return iContentSensorManager;\n }\n LogUtil.w(\"ContentSensorFactory\", \"DefaultContentSensorManager is created\");\n return new DefaultContentSensorManager();\n }", "public DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "public void onCreate() {\r\n\r\n\t\tLog.d(TAG, \"Called onCreate\");\r\n\r\n\t\tsuper.onCreate();\r\n\r\n\t\tmeter = Pedometer.getInstance();\r\n\r\n\t\tinitializeSensors();\r\n\r\n\t\tIntentFilter filter = new IntentFilter(Application.SENSORSWITCHID);\r\n\t\tsensorSwitch = new SensorSwitchReceiver();\r\n\t\tregisterReceiver(sensorSwitch, filter);\r\n\r\n\t\tsensorUpdateIntent = new Intent(Application.SENSORSUPDATEID);\r\n\r\n\t}", "public void sendSensorData(String[] sensor) {\r\n\t\tlogger.info(\"intializing sensors: \" + Arrays.toString(sensor));\r\n\t\treadyToProcessData = false;\r\n\t\tthis.sensor = sensor;\r\n\t\tfor (int i = 0; i < sensor.length; i++) {\r\n\t\t\tif (sensor[i].equals(\"Dist-Nx-v3\")) {\r\n\t\t\t\t// dist_nx = controlClass.getDist_nx();\r\n\t\t\t\tsendCommand(10, 1, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"DIST-NX:\" + dist_nx);\r\n\t\t\t} else if (sensor[i].equals(\"LightSensorArray\")) {\r\n\t\t\t\t// lsa = controlClass.getLsa();\r\n\t\t\t\tsendCommand(10, 2, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"LSA:\" + lsa);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDLinks\")) {\r\n\t\t\t\t// eopdLeft = controlClass.getEopdLeft();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"EOPD links\" + eopdLeft);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDRechts\")) {\r\n\t\t\t\t// eopdRight = controlClass.getEopdRight();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 2);\r\n\t\t\t\t// logger.debug(\"EOPD rechts\" + eopdRight);\r\n\t\t\t} else if (sensor[i].equals(\"AbsoluteIMU-ACG\")) {\r\n\t\t\t\t// absimu_acg = controlClass.getAbsimu_acg();\r\n\t\t\t\tsendCommand(10, 4, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"Gyro\" + absimu_acg);\r\n\t\t\t} else if (sensor[i].equals(\"IRThermalSensor\")) {\r\n\t\t\t\t// tsLeft = controlClass.getTsLeft();\r\n\t\t\t\tsendCommand(10, 5, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"ts left\" + tsLeft);\r\n\t\t\t} else if (sensor[i].equals(\"ColourSensor\")) {\r\n\t\t\t\tsendCommand(10, 6, i + 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tsendCommand(0, 0, 0, 0);\r\n\t\t\t\tlogger.debug(\"Sensor existiert nicht\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treadyToProcessData = true;\r\n\r\n\t\ttry {\r\n\t\t\tint linearAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.linearAccelaration\"));\r\n\t\t\tint rotationAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationAccelaration\"));\r\n\t\t\tint speed = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationSpeed\"));\r\n\t\t\tsetLinearAccelaration(linearAccelaration);\r\n\t\t\tsetRotationAccelaration(rotationAccelaration);\r\n\t\t\tsetRotationSpeed(speed);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"sendSensorData: error while parsing properties\");\r\n\t\t}\r\n\t\t// notifyAll();\r\n\t\tlogger.debug(\"sendSensorData flag set to: \" + readyToProcessData);\r\n\t}", "@Test\n public void addSensors() throws IOException, InterruptedException {\n Thread.sleep(2000);\n logger.info(\"Adding a list of sensors\");\n addPrimaryCall(11, 10, 6488238, 16);\n addPrimaryCall(12, 12, 6488239, 16);\n addPrimaryCall(13, 25, 6488224, 16);\n\n adc.New_ADC_session(adc.getAccountId());\n Thread.sleep(2000);\n adc.driver1.findElement(By.partialLinkText(\"Sensors\")).click();\n Thread.sleep(2000);\n adc.Request_equipment_list();\n }", "public AddSensor() {\n initComponents();\n }", "GenericFloatSensor sensor();", "public static ReferenceSensor create(UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemChangeTime,\n InformationSource informationSource, String comment) {\n\n return new ReferenceSensor(channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemChangeTime, informationSource, comment);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_C_First(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByUuid_C_First(uuid, companyId, orderByComparator);\n }", "public synchronized Sensor getSensor(int id)\n {\n return sensors.get(id);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_First(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByUuid_First(uuid, orderByComparator);\n }", "@Override\n public LowerTemperature createLowerTemperature(\n LowerTemperature lowerTemperature) {\n return lowerTemperatureRepository.save(lowerTemperature);\n }", "private void initSensor() {\n if ((status == PedoListener.RUNNING) || (status == PedoListener.STARTING)\n && status != PedoListener.PAUSED) {\n return;\n }\n\n Database db = Database.getInstance(getActivity());\n\n todayOffset = db.getSteps(Util.getToday());\n\n SharedPreferences prefs = getActivity().getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n goal = prefs.getInt(PedoListener.GOAL_PREF_INT, PedoListener.DEFAULT_GOAL);\n since_boot = db.getCurrentSteps();\n int pauseDifference = since_boot - prefs.getInt(\"pauseCount\", since_boot);\n\n Log.i(TAG, \"PedoListener initSensor todayOffset=\"+todayOffset+\" since_boot=\"+since_boot+\" pauseDifference=\"+pauseDifference);\n\n // register a sensor listener to live update the UI if a step is taken\n sensorManager = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if (sensor == null) {\n new AlertDialog.Builder(getActivity()).setTitle(\"R.string.no_sensor\")\n .setMessage(\"R.string.no_sensor_explain\")\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(final DialogInterface dialogInterface) {\n getActivity().finish();\n }\n }).setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n }).create().show();\n } else {\n sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI, 0);\n }\n\n since_boot -= pauseDifference; \n\n total_start = db.getTotalWithoutToday();\n total_days = db.getDays();\n\n Log.i(TAG, \"PedoListener initSensor since_boot=\"+since_boot+ \" total_start=\"+total_start+\" total_days=\"+total_days);\n\t\n \tstatus = PedoListener.STARTING;\n\t\n\t db.setConfig(\"status_service\", \"start\");\n \n db.close();\n\n updateUI();\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "private void startListening() {\n if (mEnabledByEmulator && mEnabledByUser) {\n if (DEBUG) Log.d(TAG, \"+++ Sensor \" + getEmulatorFriendlyName() + \" is started.\");\n mSenMan.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST);\n }\n }", "public SensorStation(){\n\n }", "public void addSampleToDB(Sample sensorSample, String TABLE_NAME) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"timestamp\", sensorSample.getTimestamp());\n values.put(\"x_val\", sensorSample.getX());\n values.put(\"y_val\", sensorSample.getY());\n values.put(\"z_val\", sensorSample.getZ());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "@Override\n public void receivedSensor(SensorData sensor) {\n synchronized(_sensorListeners) {\n if (!_sensorListeners.containsKey(sensor.channel)) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_SENSOR.str);\n UdpConstants.writeSensorData(resp.stream, sensor);\n \n // Send to all listeners\n synchronized(_sensorListeners) {\n Map<SocketAddress, Integer> _listeners = _sensorListeners.get(sensor.channel);\n _udpServer.bcast(resp, _listeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize sensor \" + sensor.channel);\n }\n }", "private int checkRegisteredSensors() {\n\n int counter = 0;\n\n if (listSensorDB.size() < 1) {\n Log.d(getClass().getName(), \"Lista de sensores cadastrados é ZERO! Retornando de checkRegisteredSensors()\");\n return 0;\n }\n\n if (HSSensor.getInstance().getListSensorOn().size() < 1)\n HSSensor.getInstance().setListSensorOn(listSensorDB);\n\n\n for (Sensor sensor : HSSensor.getInstance().getListSensorOn()) {\n\n Socket sock = new Socket();\n if (sensor.getIp().isEmpty()) {\n Log.d(getClass().getName(), \"O IP do sensor [\" + sensor.getNome() + \"] está vazio. Acabou de ser configurado? \" +\n \"Nada a fazer em checkRegisteredSensors()\");\n continue;\n }\n\n SocketAddress addr = new InetSocketAddress(sensor.getIp(), 8000);\n\n try {\n\n sock.connect(addr, 5000);\n Log.d(getClass().getName(), \"Conectamos em \" + sensor.getIp());\n\n\n PrintWriter pout = new PrintWriter(sock.getOutputStream());\n\n pout.print(\"getinfo::::::::\\n\");\n pout.flush();\n\n Log.d(getClass().getName(), \"Enviado getinfo:::::::: para \" + sensor.getIp() + \" - Aguardando resposta...\");\n\n byte[] b = new byte[256];\n\n sock.setSoTimeout(5000);\n int bytes = sock.getInputStream().read(b);\n sock.close();\n\n String result = new String(b, 0, bytes - 1);\n Log.d(getClass().getName(), \"Recebida resposta de \" + sensor.getIp() + \" para nosso getinfo::::::::\");\n\n Sensor tmpSensor = buildSensorFromGetInfo(result);\n if (tmpSensor == null) {\n Log.d(getClass().getName(), \"Resposta de \" + sensor.getIp() + \" nao é um sensor valido!\");\n Log.d(getClass().getName(), \"Resposta: \" + result);\n continue;\n }\n\n if (sensor.equals(tmpSensor)) {\n\n sensor.setActive(true);\n counter++;\n\n Log.d(getClass().getName(), \"Resposta de \" + sensor.getIp() + \" é um sensor valido!\");\n Log.d(getClass().getName(), \"Sensor \" + sensor.getNome() + \" : \" + sensor.getIp() + \" PAREADO!\");\n }\n\n\n } catch (Exception e) {\n\n if (e.getMessage() != null) {\n Log.d(getClass().getName(), e.getMessage());\n }\n sensor.setActive(false);\n }\n\n }\n\n return counter;\n }", "private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }", "public int getSensorId();", "public SensorLog(String id, Date when, Float temperature) {\n this.id = id;\n this.when = when;\n this.temperature = temperature;\n }", "public static Sensor getFirstSensor() {\n\t\tSensor retVal = null;\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mEnabled) {\n\t\t\t\tretVal = mSensors.get(x);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchBysensorId_First(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchBysensorId_First(sensorId, orderByComparator);\n }", "private void registerSensorListeners(){\n\n // Get the accelerometer and gyroscope sensors if they exist\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null){\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n }\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null){\n mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n }\n\n // Acquire the wake lock to sample with the screen off\n mPowerManager = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);\n\n mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\n mWakeLock.acquire();\n\n // Register sensor listener after delay to compensate for user putting phone in pocket\n\n long delay = 5;\n\n Log.d(TAG, \"Before start: \" + System.currentTimeMillis());\n\n exec.schedule(new Runnable() {\n @Override\n public void run() {\n mSensorManager.registerListener(PhoneSensorLogService.this, mAccelerometer, SAMPLE_RATE);\n mSensorManager.registerListener(PhoneSensorLogService.this, mGyroscope, SAMPLE_RATE);\n Log.d(TAG, \"Start: \" + System.currentTimeMillis());\n if (timedMode) {\n scheduleLogStop();\n }\n }\n }, delay, TimeUnit.SECONDS);\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "private void createGroundSensor() {\n CircleShape shape = new CircleShape();\n shape.setRadius(bodyHalfSize.x / 2);\n shape.setPosition(new Vector2(0, -bodyHalfSize.y - bodyHalfSize.x));\n\n FixtureDef fixDef = new FixtureDef();\n fixDef.shape = shape;\n fixDef.isSensor = true;\n fixDef.filter.categoryBits = Global.PLAYER_BIT;\n fixDef.filter.maskBits = Global.GROUND_BIT | Global.SEMISOLID_BIT;\n\n body.createFixture(fixDef).setUserData(\"sensor\");\n shape.dispose();\n }", "private void registerListeners(){\n\n //!!!Sensor delay can also be expressed as an int in microseconds, and can use an extra int to give max queue time\n //sampling period is considered a suggestion, and must be in microseconds\n //IMPORTANT TO USE QUEUE. drastically reduced battery consumption\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY );\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n /* //This is for raw PPG data on Polar watches, not implemented\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(65545),\n SensorManager.SENSOR_DELAY_NORMAL);\n */\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findBysensorId_First(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findBysensorId_First(sensorId, orderByComparator);\n }" ]
[ "0.68262196", "0.65771836", "0.6456224", "0.62811774", "0.621502", "0.61227936", "0.6111058", "0.611", "0.6036705", "0.59223765", "0.5906559", "0.59012103", "0.5860498", "0.5849534", "0.58491886", "0.58319134", "0.5814497", "0.5805737", "0.5760379", "0.5727278", "0.5717411", "0.568592", "0.5661583", "0.5639966", "0.5626671", "0.5619478", "0.55433685", "0.54957914", "0.54768085", "0.5472363", "0.5468967", "0.5468363", "0.5408163", "0.54000646", "0.5382958", "0.5364834", "0.53645533", "0.5348514", "0.5332138", "0.5311862", "0.5308593", "0.53085595", "0.5267262", "0.525944", "0.52588934", "0.524506", "0.5241116", "0.5219685", "0.52155924", "0.5188649", "0.5179061", "0.5157608", "0.51465434", "0.5119987", "0.50927746", "0.50870246", "0.50714296", "0.50706893", "0.50541276", "0.5048228", "0.50383717", "0.50342107", "0.5026451", "0.5010218", "0.500836", "0.4998494", "0.49941933", "0.49843693", "0.49488991", "0.49383694", "0.4928259", "0.4924709", "0.49234894", "0.49032304", "0.48976156", "0.4887403", "0.48868382", "0.48778853", "0.4871451", "0.4862705", "0.48607624", "0.48559004", "0.48268095", "0.48175454", "0.48171562", "0.48143697", "0.48069277", "0.48018375", "0.47992522", "0.4797578", "0.47950158", "0.47945312", "0.47856688", "0.47666672", "0.47620657", "0.4743146", "0.47322276", "0.47300413", "0.47238824", "0.47078645" ]
0.5521751
27
Creates a new Sensor, assigns the given values and adds the Sensor to the SensorManagers sensor list. The new Sensor will have the same sensorID as in Android. (see android.hardware.Sensor Use only for internal Sensors
protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod, float smoothness, String displayedSensorName, SensorType sensorType, MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit) { this.isInternalSensor = true; this.sensorID = sensor.getType(); this.sampleRate = sampleRate; this.savePeriod = savePeriod; this.smoothness = smoothness; this.displayedSensorName = displayedSensorName; this.sensorType = sensorType; this.rawDataMeasurementSystem = rawDataMeasurementSystem; this.displayedMeasurementSystem = rawDataMeasurementSystem; this.rawDataMeasurementUnit = rawDataMeasurementUnit; this.displayedMeasurementUnit = rawDataMeasurementUnit; this.graphType = GraphType.LINE; SensorManager.addNewSensor(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DeviceSensor createDeviceSensor();", "private void registerSensors()\n {\n // Double check that the device has the required sensor capabilities\n\n if(!HasGotSensorCaps()){\n showToast(\"Required sensors not supported on this device!\");\n return;\n }\n\n // Provide a little feedback via a toast\n\n showToast(\"Registering sensors!\");\n\n // Register the listeners. Used for receiving notifications from\n // the SensorManager when sensor values have changed.\n\n sensorManager.registerListener(this, senStepCounter, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senStepDetector, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "ExternalSensor createExternalSensor();", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue create(\n long sensorValueId) {\n return getPersistence().create(sensorValueId);\n }", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public final flipsParser.defineSensor_return defineSensor() throws RecognitionException {\n flipsParser.defineSensor_return retval = new flipsParser.defineSensor_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal52=null;\n Token string_literal53=null;\n Token string_literal54=null;\n flipsParser.defineSensorValue_return defineSensorValue55 = null;\n\n\n CommonTree string_literal52_tree=null;\n CommonTree string_literal53_tree=null;\n CommonTree string_literal54_tree=null;\n RewriteRuleTokenStream stream_132=new RewriteRuleTokenStream(adaptor,\"token 132\");\n RewriteRuleTokenStream stream_131=new RewriteRuleTokenStream(adaptor,\"token 131\");\n RewriteRuleTokenStream stream_130=new RewriteRuleTokenStream(adaptor,\"token 130\");\n RewriteRuleSubtreeStream stream_defineSensorValue=new RewriteRuleSubtreeStream(adaptor,\"rule defineSensorValue\");\n try {\n // flips.g:176:2: ( ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue -> defineSensorValue )\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue\n {\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' )\n int alt21=3;\n switch ( input.LA(1) ) {\n case 130:\n {\n alt21=1;\n }\n break;\n case 131:\n {\n alt21=2;\n }\n break;\n case 132:\n {\n alt21=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 0, input);\n\n throw nvae;\n }\n\n switch (alt21) {\n case 1 :\n // flips.g:176:5: 'sen'\n {\n string_literal52=(Token)match(input,130,FOLLOW_130_in_defineSensor839); \n stream_130.add(string_literal52);\n\n\n }\n break;\n case 2 :\n // flips.g:176:11: 'sensor'\n {\n string_literal53=(Token)match(input,131,FOLLOW_131_in_defineSensor841); \n stream_131.add(string_literal53);\n\n\n }\n break;\n case 3 :\n // flips.g:176:20: 'sensors'\n {\n string_literal54=(Token)match(input,132,FOLLOW_132_in_defineSensor843); \n stream_132.add(string_literal54);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_defineSensorValue_in_defineSensor846);\n defineSensorValue55=defineSensorValue();\n\n state._fsp--;\n\n stream_defineSensorValue.add(defineSensorValue55.getTree());\n\n\n // AST REWRITE\n // elements: defineSensorValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 177:2: -> defineSensorValue\n {\n adaptor.addChild(root_0, stream_defineSensorValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "RegisterSensor() {\n }", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }", "public Sensor registerSensor(String name, String type) {\n \tSCSensor sensor = new SCSensor(name);\n \n String uid = UUID.randomUUID().toString();\n sensor.setId(uid);\n sensor.setType(type);\n \n //temporary fix..\n if(sensorCatalog.hasSensorWithName(name))\n \tsensorCatalog.removeSensor(sensorCatalog.getSensorWithName(name).getId());\n \n // Setting PublicEndPoint\n sensor.setPublicEndpoint(publicEndPoint);\n \n /*sensor = generateSensorEndPoints(sensor);*/\n Endpoint dataEndpoint;\n if (Constants.SENSOR_TYPE_BLOCK.equalsIgnoreCase(type)) {\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n } else if (Constants.SENSOR_TYPE_STREAMING.equalsIgnoreCase(type)) {\n dataEndpoint = new StreamingEndpoint();\n \n dataEndpoint.setProperties(configuration.getStreamingServer().getParameters());\n dataEndpoint.getProperties().put(\"PATH\", \"sensor/\" + sensor.getId() + \"/data\");\n \n // add the routing to the streaming server\n } else {\n // defaulting to JMS\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n }\n \n sensor.setDataEndpoint(dataEndpoint);\n \n Endpoint controlEndpoint;\n \n controlEndpoint = new JMSEndpoint();\n controlEndpoint.setAddress(sensor.getId() + \"/control\");\n // TODO: we have to decide the connection factory to be used\n controlEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n sensor.setControlEndpoint(controlEndpoint);\n \n // set the update sending endpoint as the global endpoint\n Endpoint updateSendingEndpoint;\n updateSendingEndpoint = new JMSEndpoint();\n \n updateSendingEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n updateSendingEndpoint.setAddress(sensor.getId() + \"/update\");\n sensor.setUpdateEndpoint(updateSendingEndpoint);\n \n registry.addSensor(sensor);\n \n sensorCatalog.addSensor(sensor);\n updateManager.sensorChange(Constants.Updates.ADDED, sensor.getId());\n return sensor;\n }", "public synchronized int addSensor(Sensor s) throws Exception{\n int index = sList.addSensor(s);\n sensors.put(index, s);\n \n listeners.stream().forEach((listener) -> {\n listener.modelEventHandler(ModelEventType.SENSORADDED, index);\n });\n \n s.addListener(this);\n \n return index;\n }", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public void addSensor(String sensorId, String sensorType, String sensorUnits, int interval, int threshold, boolean upperlimit){\n Sensor theSensor = new Sensor(sensorId, sensorType, sensorUnits, interval, threshold, upperlimit);\n sensors.addSensor(theSensor);\n theSensor.setFieldStation(this);\n }", "public synchronized void addSensor(int type) {\n\n if (running) {\n throw new IllegalStateException(\"Is running\");\n }\n Sensor s = manager.getDefaultSensor(type);\n\n if (!sensorsList.contains(s)) {\n sensorsList.add(s);\n }\n }", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness,\n String displayedSensorName, SensorType sensorType, String bluetoothID,\n MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit,\n MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) {\n isInternalSensor = false;\n\n // compute the lowest external sensorID which is not forgiven yet\n int id = 100;\n for (Sensor sensor : SensorManager.getAllSensors()) {\n if (id <= sensor.getSensorID()) {\n id = sensor.getSensorID() + 1;\n }\n }\n\n sensorID = id;\n\n this.sensorDriver = sensorDriver;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.bluetoothID = bluetoothID;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementSystem = displayedMeasurementSystem;\n this.displayedMeasurementUnit = displayedMeasurementUnit;\n this.graphType = GraphType.LINE;\n this.isEnabled = true;\n\n SensorManager.addNewSensor(this);\n }", "public int Register(){\n\t\tnumSensors = 0;\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tif(mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME)) numSensors++; \n\t\treturn numSensors;\t\n\t}", "Sensor getSensor();", "protected Sensor(int gpsSensorID, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = gpsSensorID;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this. displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "public void onSensorChanged(int sensor, float[] values) {\n\t\t\t\n\t\t\t// grab the values required to respond to user movement.\n\t\t\tmAccelX = (float) (0.2 * values[0]);\n\t\t\tmAccelY = (float) (0.2 * values[1]);\n\t\t\t// mAccelZ = values[2];\n\t\t\tinvalidate();\n\t\t}", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "public void startSensors() {\r\n\t\tsensorManager.registerListener(this, accelerometer,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\t\tsensorManager.registerListener(this, magneticField,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\r\n\t\tLog.d(TAG, \"Called startSensors\");\r\n\t}", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public SetSensorCommand(List<SensorType> requiredSensors) {\n super(CommandType.SetSensor);\n this.requiredSensors = requiredSensors;\n }", "protected Sensor[] getSensorValues() { return sensors; }", "public Sensor(int threadNumber) {\n\t\tdeviceNumber = threadNumber;\n\t}", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public abstract void createSensors() throws Exception;", "private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public void connectSensor() {\n mReleaseHandle = mSensorHandler.getReleaseHandle(mSensorResultReceiver, mSensorStateChangeReceiver);\n }", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "public BasicSensor() {}", "private void initSensorManager() {\n\t\ttry {\n\t\t\tSensorManager sensorManage = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\t\t\tList<Sensor> mySensors = sensorManage\n\t\t\t\t\t.getSensorList(Sensor.TYPE_ACCELEROMETER);\n\t\t\tmAccel = 0.00f;\n\t\t\tmAccelCurrent = SensorManager.GRAVITY_EARTH;\n\t\t\tmAccelLast = SensorManager.GRAVITY_EARTH;\n\t\t\tsensorManage.registerListener(new SensorEventListener() {\n\t\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t\t\t\t}\n\n\t\t\t\t@SuppressLint(\"FloatMath\")\n\t\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\n\t\t\t\t\tfloat x = event.values[0];// Get X-Coordinator\n\n\t\t\t\t\tfloat y = event.values[1];// Get Y-Coordinator\n\n\t\t\t\t\tfloat z = event.values[2];// Get Z-Coordinator\n\n\t\t\t\t\tmAccelLast = mAccelCurrent;\n\t\t\t\t\tmAccelCurrent = (float) Math\n\t\t\t\t\t\t\t.sqrt((double) (x * x + y * y + z * z));\n\t\t\t\t\tfloat delta = mAccelCurrent - mAccelLast;\n\t\t\t\t\tmAccel = mAccel * 0.9f + delta; // perform low-cut filter\n\n\t\t\t\t\tif (SHAKING_DELTA > mAccel\n\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage != CameraMessageStatus.Focused) {\n\t\t\t\t\t\t// BY SAM for start autofocusing\n\t\t\t\t\t\tif (!lock_autofocus) {\n\t\t\t\t\t\t\tif (autoFocusCounter > AUTO_FOCUS_START_INTERVAL\n\t\t\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage == CameraMessageStatus.Shacked) {\n//\t\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t\t\t\t\t} else if (autoFocusCounter > AUTO_FOCUS_START_INTERVAL) {\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!lock_autofocus\n\t\t\t\t\t\t\t\t&& Math.abs(z - old_z) > SHAKING_Z_DELTA) {\n\n\t\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n//\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\tautoFocusCounter = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!lock_autofocus) {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_img_middle));\n\t\t\t\t\t\t\t\tautoFocusCounter++;\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_press_focus));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (mAccel > SHAKING_DELTA)// Shaking\n\t\t\t\t\t{\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.phone_silent));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Shacked;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\n\t\t\t\t\t}\n\t\t\t\t\told_z = z;\n\n\t\t\t\t}\n\t\t\t}, mySensors.get(0), SensorManager.SENSOR_DELAY_NORMAL);\n\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Unable to detect SensorManager. \",\n\t\t\t\t\t\"Error data \" + e.toString());\n\t\t}\n\t}", "protected Sensor<Float> createExtreme(Sensor<Float> sensor, Extreme type)\n {\n String key = sensor.getUuid() + \".\" + type.key;\n History history = extremes.get(key);\n\n // Es gibt noch gar keine Queue fuer die Werte. Dann legen wir eine an\n if (history == null)\n {\n Settings settings = Application.getPluginLoader().getPlugin(Plugin.class).getResources().getSettings();\n int minutes = settings.getInt(\"scheduler.interval.minutes\",5);\n int size = 24 * 60 / minutes;\n history = new History(size);\n extremes.put(key,history);\n }\n\n Float value = sensor.getValue();\n\n // Wert hinzufuegen\n history.push(value);\n \n // Extrem-Wert ermitteln\n List<Float> values = history.elements();\n for (Float f:values)\n {\n if (type == Extreme.MAX && f.compareTo(value) > 0)\n {\n value = f;\n continue;\n }\n if (type == Extreme.MIN && f.compareTo(value) < 0)\n {\n value = f;\n continue;\n }\n }\n\n Sensor clone = (Sensor<Float>) sensor.clone();\n clone.setUuid(key);\n clone.setValue(value);\n clone.setName(i18n.tr(\"{0} ({1})\",sensor.getName(),type.title));\n return clone;\n }", "public static Sensor checkAndAddSensor(Context aContext, String name, String address) {\n\t\tSensor s = getSensor(name, address);\n\t\t\n\t\tif (s != null) {\n\t\t\treturn s;\n\t\t}\n\n\t\tif (name.contains(Defines.ZEPHYR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ZEPHYR_ENABLED) {\n\t\t\t\ts = new ZephyrSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.POLAR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_POLAR_ENABLED) {\n\t\t\t\ts = new PolarSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.WOCKET_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_WOCKETS_ENABLED) {\n\t\t\t\ts = new WocketSensor(aContext, name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.ASTHMAPOLIS_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ASTHMAPOLIS_ENABLED) {\n\t\t\t\ts = new AsthmapolisSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\n\t\t\t}\n\t\t}\n\n\t\treturn s;\n\t}", "public void start() {\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)==null){ // check if rotation sensor present\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD)==null\n || mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)==null){ // check if acc & mag sensors are present\n noSensorAlert(); // alert if no sensors are present\n }\n else { // use acc & mag sensors\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n haveSensor = mSensorManager.registerListener(this,mAccelerometer,SensorManager.SENSOR_DELAY_UI);\n haveSensor2 = mSensorManager.registerListener(this,mMagnetometer,SensorManager.SENSOR_DELAY_UI);\n }\n }\n else { // use rotation sensor\n mRotationV = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n haveSensor = mSensorManager.registerListener(this,mRotationV,SensorManager.SENSOR_DELAY_UI);\n }\n }", "@Override\n void add()\n {\n long sensorId = Long.parseLong(textSensorId.getText());\n MissionNumber missionNumber = textMissionNumber.getValue();\n String jobOrderNumber = textJobOrderNumber.getText();\n \n FPS16SensorDataGenerator generator = new FPS16SensorDataGenerator(tspiConfigurator.getTspiGenerator(), sensorId, missionNumber, jobOrderNumber);\n controller.addSensorDataGenerator(getRate(), getChannel(), generator);\n }", "private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public final flipsParser.defineSensorValue_return defineSensorValue() throws RecognitionException {\n flipsParser.defineSensorValue_return retval = new flipsParser.defineSensorValue_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token Identifier56=null;\n Token char_literal57=null;\n Token And58=null;\n Token char_literal59=null;\n Token And60=null;\n Token Identifier61=null;\n Token char_literal62=null;\n flipsParser.integerValuePositive_return sen = null;\n\n\n CommonTree Identifier56_tree=null;\n CommonTree char_literal57_tree=null;\n CommonTree And58_tree=null;\n CommonTree char_literal59_tree=null;\n CommonTree And60_tree=null;\n CommonTree Identifier61_tree=null;\n CommonTree char_literal62_tree=null;\n RewriteRuleTokenStream stream_124=new RewriteRuleTokenStream(adaptor,\"token 124\");\n RewriteRuleTokenStream stream_120=new RewriteRuleTokenStream(adaptor,\"token 120\");\n RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n RewriteRuleTokenStream stream_And=new RewriteRuleTokenStream(adaptor,\"token And\");\n RewriteRuleSubtreeStream stream_integerValuePositive=new RewriteRuleSubtreeStream(adaptor,\"rule integerValuePositive\");\n try {\n // flips.g:181:2: ( Identifier '=' sen= integerValuePositive ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )* -> ( ^( DEFINE Identifier ^( SENSOR $sen) ) )+ )\n // flips.g:181:4: Identifier '=' sen= integerValuePositive ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )*\n {\n Identifier56=(Token)match(input,Identifier,FOLLOW_Identifier_in_defineSensorValue862); \n stream_Identifier.add(Identifier56);\n\n char_literal57=(Token)match(input,124,FOLLOW_124_in_defineSensorValue864); \n stream_124.add(char_literal57);\n\n pushFollow(FOLLOW_integerValuePositive_in_defineSensorValue868);\n sen=integerValuePositive();\n\n state._fsp--;\n\n stream_integerValuePositive.add(sen.getTree());\n // flips.g:181:44: ( ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive )*\n loop24:\n do {\n int alt24=2;\n int LA24_0 = input.LA(1);\n\n if ( (LA24_0==Identifier) ) {\n int LA24_2 = input.LA(2);\n\n if ( (LA24_2==124) ) {\n alt24=1;\n }\n\n\n }\n else if ( (LA24_0==And||LA24_0==120) ) {\n alt24=1;\n }\n\n\n switch (alt24) {\n \tcase 1 :\n \t // flips.g:181:45: ( And | ',' ( And )? )? Identifier '=' sen= integerValuePositive\n \t {\n \t // flips.g:181:45: ( And | ',' ( And )? )?\n \t int alt23=3;\n \t int LA23_0 = input.LA(1);\n\n \t if ( (LA23_0==And) ) {\n \t alt23=1;\n \t }\n \t else if ( (LA23_0==120) ) {\n \t alt23=2;\n \t }\n \t switch (alt23) {\n \t case 1 :\n \t // flips.g:181:46: And\n \t {\n \t And58=(Token)match(input,And,FOLLOW_And_in_defineSensorValue872); \n \t stream_And.add(And58);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // flips.g:181:50: ',' ( And )?\n \t {\n \t char_literal59=(Token)match(input,120,FOLLOW_120_in_defineSensorValue874); \n \t stream_120.add(char_literal59);\n\n \t // flips.g:181:54: ( And )?\n \t int alt22=2;\n \t int LA22_0 = input.LA(1);\n\n \t if ( (LA22_0==And) ) {\n \t alt22=1;\n \t }\n \t switch (alt22) {\n \t case 1 :\n \t // flips.g:181:54: And\n \t {\n \t And60=(Token)match(input,And,FOLLOW_And_in_defineSensorValue876); \n \t stream_And.add(And60);\n\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t Identifier61=(Token)match(input,Identifier,FOLLOW_Identifier_in_defineSensorValue881); \n \t stream_Identifier.add(Identifier61);\n\n \t char_literal62=(Token)match(input,124,FOLLOW_124_in_defineSensorValue883); \n \t stream_124.add(char_literal62);\n\n \t pushFollow(FOLLOW_integerValuePositive_in_defineSensorValue887);\n \t sen=integerValuePositive();\n\n \t state._fsp--;\n\n \t stream_integerValuePositive.add(sen.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop24;\n }\n } while (true);\n\n\n\n // AST REWRITE\n // elements: sen, Identifier\n // token labels: \n // rule labels: retval, sen\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_sen=new RewriteRuleSubtreeStream(adaptor,\"rule sen\",sen!=null?sen.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 182:2: -> ( ^( DEFINE Identifier ^( SENSOR $sen) ) )+\n {\n if ( !(stream_sen.hasNext()||stream_Identifier.hasNext()) ) {\n throw new RewriteEarlyExitException();\n }\n while ( stream_sen.hasNext()||stream_Identifier.hasNext() ) {\n // flips.g:182:5: ^( DEFINE Identifier ^( SENSOR $sen) )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DEFINE, \"DEFINE\"), root_1);\n\n adaptor.addChild(root_1, stream_Identifier.nextNode());\n // flips.g:182:25: ^( SENSOR $sen)\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(SENSOR, \"SENSOR\"), root_2);\n\n adaptor.addChild(root_2, stream_sen.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n stream_sen.reset();\n stream_Identifier.reset();\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "public RegisterSensor(final String version, final Object sensorDescription, final ObservationTemplate observationTemplate) {\n super(version);\n this.observationTemplate = observationTemplate;\n this.sensorDescription = new SensorDescription(sensorDescription);\n }", "public void onCreate() {\r\n\r\n\t\tLog.d(TAG, \"Called onCreate\");\r\n\r\n\t\tsuper.onCreate();\r\n\r\n\t\tmeter = Pedometer.getInstance();\r\n\r\n\t\tinitializeSensors();\r\n\r\n\t\tIntentFilter filter = new IntentFilter(Application.SENSORSWITCHID);\r\n\t\tsensorSwitch = new SensorSwitchReceiver();\r\n\t\tregisterReceiver(sensorSwitch, filter);\r\n\r\n\t\tsensorUpdateIntent = new Intent(Application.SENSORSUPDATEID);\r\n\r\n\t}", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "public void requestSensor(String sensorType){\n switch(sensorType){\n case \"SENSOR_ACC\":\n accelerometer = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n phoneSensorsMan.registerListener(sel,accelerometer, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GYRO\":\n gyro = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n phoneSensorsMan.registerListener(sel,gyro, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_MAGNET\":\n magnet = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n phoneSensorsMan.registerListener(sel,magnet, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GPS\":\n phoneLocationMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,100,1,locListener);\n break;\n case \"SENSOR_ORIENTATION\":\n orientation = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n phoneSensorsMan.registerListener(sel,orientation, SensorManager.SENSOR_DELAY_GAME);\n\n\n }\n }", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void loadSensors() {\r\n\t\thandlerBridge.loadBrigde();\r\n\t\thandlerSensor = new SensorHandler(handlerBridge.loadSensors());\r\n\t}", "public SensorReader() {\n\t\tinit();\n\t}", "GenericFloatSensor sensor();", "public static IContentSensorManager createContentSensorManager(int token, Activity activity) {\n long currentTime = System.currentTimeMillis();\n IContentSensorManager iContentSensorManager = null;\n ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();\n try {\n Class<IContentSensorManager> clz = getContentSensorManagerClass();\n if (clz != null) {\n Constructor constructor = clz.getConstructor(new Class[]{Integer.TYPE, Activity.class});\n constructor.setAccessible(true);\n iContentSensorManager = (IContentSensorManager) constructor.newInstance(new Object[]{Integer.valueOf(token), activity});\n }\n StrictMode.setThreadPolicy(oldPolicy);\n } catch (ClassNotFoundException e) {\n LogUtil.e(\"ContentSensorFactory\", \"ClassNotFoundExceptione:\" + e);\n } catch (NoSuchMethodException e2) {\n LogUtil.e(\"ContentSensorFactory\", \"NoSuchMethodExceptione:\" + e2);\n } catch (InstantiationException e3) {\n LogUtil.e(\"ContentSensorFactory\", \"InstantiationExceptione:\" + e3);\n } catch (IllegalAccessException e4) {\n LogUtil.e(\"ContentSensorFactory\", \"IllegalAccessExceptione:\" + e4);\n } catch (InvocationTargetException e5) {\n LogUtil.e(\"ContentSensorFactory\", \"InvocationTargetExceptione:\" + e5);\n } catch (Throwable th) {\n StrictMode.setThreadPolicy(oldPolicy);\n }\n if (iContentSensorManager != null) {\n return iContentSensorManager;\n }\n LogUtil.w(\"ContentSensorFactory\", \"DefaultContentSensorManager is created\");\n return new DefaultContentSensorManager();\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "public SensorData() {\n\n\t}", "public void initSensorListener() {\n SensorManager mSensorManager = (SensorManager) this.mContext.getSystemService(\"sensor\");\n if (mSensorManager == null) {\n Slog.e(\"Fsm_MagnetometerWakeupManager\", \"connect SENSOR_SERVICE fail\");\n return;\n }\n boolean isRegisted = mSensorManager.registerListener(this.mMagnetometerListener, mSensorManager.getDefaultSensor(SENSOR_TYPE_HALL), 100000);\n Slog.d(\"Fsm_MagnetometerWakeupManager\", \"register Hall Sensor result:\" + isRegisted);\n }", "private void startListening() {\n if (mEnabledByEmulator && mEnabledByUser) {\n if (DEBUG) Log.d(TAG, \"+++ Sensor \" + getEmulatorFriendlyName() + \" is started.\");\n mSenMan.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST);\n }\n }", "public final SensorManager invoke() {\n Object systemService = this.this$0.c().getSystemService(\"sensor\");\n if (systemService != null) {\n return (SensorManager) systemService;\n }\n throw new d.m(\"null cannot be cast to non-null type android.hardware.SensorManager\");\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER && s.equals(\"Accelerometre\")) {\n float Ax = sensorEvent.values[0];\n float Ay = sensorEvent.values[1];\n float Az = sensorEvent.values[2];\n\n acce = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Ax = \" + Ax + \" \" + \"\\n Ay = \" + Ay + \" \" + \"\\n Az = \" + Az + \"\\n\";\n\n // Do something with this sensor value .\n sensorTxt.setText(acce);\n Log.d(TAG, \" TimeAcc = \" + sensorEvent.timestamp + \" Ax = \" + Ax + \" \" + \" Ay = \" + Ay + \" \" + \" Az = \" + Az);\n }\n\n //LUMIERE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT && s.equals(\"Lumiere\")) {\n // La valeur de la lumière\n float lv = sensorEvent.values[0];\n\n light = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Light value = \" + lv + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(light);\n }\n\n //PROXIMITE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY && s.equals(\"Proximite\")) {\n // La valeur de proximité\n float p = sensorEvent.values[0];\n\n proxi = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Proximite value = \" + p + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(proxi);\n }\n\n //GYROSCOPE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE && s.equals(\"Gyroscope\")) {\n // Les valeurs du gyroscope\n float xGyroscope = sensorEvent.values[0];\n float yGyroscope = sensorEvent.values[1];\n float zGyroscope = sensorEvent.values[2];\n\n gyro = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Valeur du gyroscope \\n Valeur en x = \" + xGyroscope + \" \" + \"\\n Valeur en y = \" + yGyroscope + \" \" + \"\\n Valeur en z = \" + zGyroscope + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(gyro);\n }\n\n }", "public int getSensorId() {\n\t\treturn sensorid;\n\t}", "private void registerSensorListeners(){\n\n // Get the accelerometer and gyroscope sensors if they exist\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null){\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n }\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null){\n mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n }\n\n // Acquire the wake lock to sample with the screen off\n mPowerManager = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);\n\n mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\n mWakeLock.acquire();\n\n // Register sensor listener after delay to compensate for user putting phone in pocket\n\n long delay = 5;\n\n Log.d(TAG, \"Before start: \" + System.currentTimeMillis());\n\n exec.schedule(new Runnable() {\n @Override\n public void run() {\n mSensorManager.registerListener(PhoneSensorLogService.this, mAccelerometer, SAMPLE_RATE);\n mSensorManager.registerListener(PhoneSensorLogService.this, mGyroscope, SAMPLE_RATE);\n Log.d(TAG, \"Start: \" + System.currentTimeMillis());\n if (timedMode) {\n scheduleLogStop();\n }\n }\n }, delay, TimeUnit.SECONDS);\n }", "public RegistroSensor() \n {\n\n }", "public void setSensorValue (float value) {\n this.currentSensorValue = value;\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == SENS_ACCELEROMETER && event.values.length > 0) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n latestAccel = (float)Math.sqrt(Math.pow(x,2.)+Math.pow(y,2)+Math.pow(z,2));\n //Log.d(\"pow\", String.valueOf(latestAccel));\n\n }\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy >0) {\n\n Log.d(\"Sensor\", event.sensor.getType() + \",\" + event.accuracy + \",\" + event.timestamp + \",\" + Arrays.toString(event.values));\n\n int newValue = Math.round(event.values[0]);\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n \n if(newValue!=0 && lastTimeSentUnix < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnix = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", latestAccel);\n intent.putExtra(\"TIME\", event.timestamp);\n intent.putExtra(\"ACCEL\", latestAccel);\n\n\n Log.d(\"change\", \"send intent\");\n\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), latestAccel, event.timestamp, event.values);\n }\n }\n\n }", "private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "public static ReferenceSensor create(UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemChangeTime,\n InformationSource informationSource, String comment) {\n\n return new ReferenceSensor(channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemChangeTime, informationSource, comment);\n }", "public int getSensorID() {\n return sensorID;\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "@Override\n public void receivedSensor(SensorData sensor) {\n synchronized(_sensorListeners) {\n if (!_sensorListeners.containsKey(sensor.channel)) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_SENSOR.str);\n UdpConstants.writeSensorData(resp.stream, sensor);\n \n // Send to all listeners\n synchronized(_sensorListeners) {\n Map<SocketAddress, Integer> _listeners = _sensorListeners.get(sensor.channel);\n _udpServer.bcast(resp, _listeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize sensor \" + sensor.channel);\n }\n }", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "public void setSensorOn() {\n\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n long now = SystemClock.elapsedRealtime();\n\n long deltaMs = 0;\n if (mLastUpdateTS != 0) {\n deltaMs = now - mLastUpdateTS;\n if (mUpdateTargetMs > 0 && deltaMs < mUpdateTargetMs) {\n // New sample is arriving too fast. Discard it.\n return;\n }\n }\n\n // Format and post message for the emulator.\n float[] values = event.values;\n final int len = values.length;\n\n mChangeMsg.order(getEndian());\n mChangeMsg.position(0);\n mChangeMsg.putInt(getType());\n mChangeMsg.putFloat(values[0]);\n if (len > 1) {\n mChangeMsg.putFloat(values[1]);\n if (len > 2) {\n mChangeMsg.putFloat(values[2]);\n }\n }\n postMessage(ProtocolConstants.SENSORS_SENSOR_EVENT, mChangeMsg);\n\n // Computes average update time for this sensor and average globally.\n if (mLastUpdateTS != 0) {\n if (mGlobalAvgUpdateMs != 0) {\n mGlobalAvgUpdateMs = (mGlobalAvgUpdateMs + deltaMs) / 2;\n } else {\n mGlobalAvgUpdateMs = deltaMs;\n }\n }\n mLastUpdateTS = now;\n\n // Update the UI for the sensor, with a static throttling of 10 fps max.\n if (hasUiHandler()) {\n if (mLastDisplayTS != 0) {\n long uiDeltaMs = now - mLastDisplayTS;\n if (uiDeltaMs < 1000 / 4 /* 4fps in ms */) {\n // Skip this UI update\n return;\n }\n }\n mLastDisplayTS = now;\n\n mValues[0] = values[0];\n if (len > 1) {\n mValues[1] = values[1];\n if (len > 2) {\n mValues[2] = values[2];\n }\n }\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_DISPLAY_MODIFIED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }\n\n if (DEBUG) {\n long now2 = SystemClock.elapsedRealtime();\n long processingTimeMs = now2 - now;\n Log.d(TAG, String.format(\"glob %d - local %d > target %d - processing %d -- %s\",\n mGlobalAvgUpdateMs, deltaMs, mUpdateTargetMs, processingTimeMs,\n mSensor.getName()));\n }\n }", "@SuppressLint(\"WakelockTimeout\") // Suppresses some error messages.\n\n @Override\n public int onStartCommand(Intent intent, int flags, int startId) /* Establishes the sensor and the ability to collect data at the start of the data collection */\n {\n mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); // Starts a sensor data collection service\n Sensor mPedometer = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); // Starts it for the sensor pedometer.\n mSensorManager.registerListener(this, mPedometer, SensorManager.SENSOR_DELAY_NORMAL); // Calls the sensor delay to normal.\n return START_STICKY; // Makes it so the service restarts if it is stopped.\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "private void initSensor() {\n if ((status == PedoListener.RUNNING) || (status == PedoListener.STARTING)\n && status != PedoListener.PAUSED) {\n return;\n }\n\n Database db = Database.getInstance(getActivity());\n\n todayOffset = db.getSteps(Util.getToday());\n\n SharedPreferences prefs = getActivity().getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n goal = prefs.getInt(PedoListener.GOAL_PREF_INT, PedoListener.DEFAULT_GOAL);\n since_boot = db.getCurrentSteps();\n int pauseDifference = since_boot - prefs.getInt(\"pauseCount\", since_boot);\n\n Log.i(TAG, \"PedoListener initSensor todayOffset=\"+todayOffset+\" since_boot=\"+since_boot+\" pauseDifference=\"+pauseDifference);\n\n // register a sensor listener to live update the UI if a step is taken\n sensorManager = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if (sensor == null) {\n new AlertDialog.Builder(getActivity()).setTitle(\"R.string.no_sensor\")\n .setMessage(\"R.string.no_sensor_explain\")\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(final DialogInterface dialogInterface) {\n getActivity().finish();\n }\n }).setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n }).create().show();\n } else {\n sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI, 0);\n }\n\n since_boot -= pauseDifference; \n\n total_start = db.getTotalWithoutToday();\n total_days = db.getDays();\n\n Log.i(TAG, \"PedoListener initSensor since_boot=\"+since_boot+ \" total_start=\"+total_start+\" total_days=\"+total_days);\n\t\n \tstatus = PedoListener.STARTING;\n\t\n\t db.setConfig(\"status_service\", \"start\");\n \n db.close();\n\n updateUI();\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "private void getSensorService() {\n mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n if (mSensorManager == null) {\n Log.e(TAG, \"----getSystemService failed\");\n\n } else {\n mWakeupUncalibratedGyro = mSensorManager.getDefaultSensor(\n Sensor.TYPE_GYROSCOPE_UNCALIBRATED, true);\n }\n\n if (mWakeupUncalibratedGyro != null) {\n mSensorManager.registerListener(mListener, mWakeupUncalibratedGyro,\n SensorManager.SENSOR_DELAY_UI);\n }\n }", "public synchronized void addRawData (SensorData sensorData) {\n if (!isEnabled) {\n return;\n }\n\n rawData.add(sensorData);\n\n GarmentOSService.callback(CallbackFlags.VALUE_CHANGED, new ValueChangedCallback(sensorData.getLongUnixDate(), sensorData.getData()));\n\n if (rawData.size() > savePeriod) {\n saveSensor();\n }\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)\n return;\n /*\n * record the accelerometer data, the event's timestamp as well as\n * the current time. The latter is needed so we can calculate the\n * \"present\" time during rendering. In this application, we need to\n * take into account how the screen is rotated with respect to the\n * sensors (which always return data in a coordinate space aligned\n * to with the screen in its native orientation).\n */\n\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mSensorX = event.values[0];\n mSensorY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mSensorX = -event.values[1];\n mSensorY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mSensorX = -event.values[0];\n mSensorY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mSensorX = event.values[1];\n mSensorY = -event.values[0];\n break;\n }\n\n mGLView.updateScene(10*mSensorX,10*mSensorY,10*event.values[2]);\n\n }", "public synchronized Sensor getSensor(int id)\n {\n return sensors.get(id);\n }", "public void init() {\n Log.d(\"in init()\", \"Initializing\");\n prevTime = System.currentTimeMillis();\n sensorListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n timstamps.add(System.currentTimeMillis());\n }\n /*\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n x_g.add(sensorEvent.values[0]);\n y_g.add(sensorEvent.values[1]);\n z_g.add(sensorEvent.values[2]);\n }\n */\n curTime = System.currentTimeMillis();\n// Log.d(\"Time = \", \"\" + (curTime - prevTime) + \" > \" + MIN_TIME);\n if (curTime - prevTime > MIN_TIME) {\n //int minVal = Math.min(x.size(), x_g.size());\n if(isExternalStorageWritable()){\n //writeToFile(x,y,z,x_g,y_g,z_g,minVal);\n writeToFile(x,y,z,timstamps);\n }\n x.clear();\n y.clear();\n z.clear();\n timstamps.clear();\n //x_g.clear();\n //y_g.clear();\n //z_g.clear();\n prevTime = curTime;\n }\n\n /*\n if (x.size() != N_SAMPLES && y.size() != N_SAMPLES && z.size() != N_SAMPLES ){\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n }else {\n if(isExternalStorageWritable()){\n writeToFile(x,y,z);\n }\n x.clear();\n y.clear();\n z.clear();\n }\n */\n\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensorManager.registerListener(sensorListener,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);\n// sensorManager.registerListener(sensorListener,\n// sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), SensorManager.SENSOR_DELAY_NORMAL);\n\n //Checks if the Accelerometer or Gyroscope sensor is available or not\n if(sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) == null ){\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(R.string.app_name);\n builder.setIcon(R.mipmap.ic_launcher);\n builder.setMessage(\"Accelerometer Sensor is not available, please exit\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}", "public void sendSensorData(String[] sensor) {\r\n\t\tlogger.info(\"intializing sensors: \" + Arrays.toString(sensor));\r\n\t\treadyToProcessData = false;\r\n\t\tthis.sensor = sensor;\r\n\t\tfor (int i = 0; i < sensor.length; i++) {\r\n\t\t\tif (sensor[i].equals(\"Dist-Nx-v3\")) {\r\n\t\t\t\t// dist_nx = controlClass.getDist_nx();\r\n\t\t\t\tsendCommand(10, 1, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"DIST-NX:\" + dist_nx);\r\n\t\t\t} else if (sensor[i].equals(\"LightSensorArray\")) {\r\n\t\t\t\t// lsa = controlClass.getLsa();\r\n\t\t\t\tsendCommand(10, 2, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"LSA:\" + lsa);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDLinks\")) {\r\n\t\t\t\t// eopdLeft = controlClass.getEopdLeft();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"EOPD links\" + eopdLeft);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDRechts\")) {\r\n\t\t\t\t// eopdRight = controlClass.getEopdRight();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 2);\r\n\t\t\t\t// logger.debug(\"EOPD rechts\" + eopdRight);\r\n\t\t\t} else if (sensor[i].equals(\"AbsoluteIMU-ACG\")) {\r\n\t\t\t\t// absimu_acg = controlClass.getAbsimu_acg();\r\n\t\t\t\tsendCommand(10, 4, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"Gyro\" + absimu_acg);\r\n\t\t\t} else if (sensor[i].equals(\"IRThermalSensor\")) {\r\n\t\t\t\t// tsLeft = controlClass.getTsLeft();\r\n\t\t\t\tsendCommand(10, 5, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"ts left\" + tsLeft);\r\n\t\t\t} else if (sensor[i].equals(\"ColourSensor\")) {\r\n\t\t\t\tsendCommand(10, 6, i + 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tsendCommand(0, 0, 0, 0);\r\n\t\t\t\tlogger.debug(\"Sensor existiert nicht\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treadyToProcessData = true;\r\n\r\n\t\ttry {\r\n\t\t\tint linearAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.linearAccelaration\"));\r\n\t\t\tint rotationAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationAccelaration\"));\r\n\t\t\tint speed = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationSpeed\"));\r\n\t\t\tsetLinearAccelaration(linearAccelaration);\r\n\t\t\tsetRotationAccelaration(rotationAccelaration);\r\n\t\t\tsetRotationSpeed(speed);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"sendSensorData: error while parsing properties\");\r\n\t\t}\r\n\t\t// notifyAll();\r\n\t\tlogger.debug(\"sendSensorData flag set to: \" + readyToProcessData);\r\n\t}", "public void init(Object[] parameters) {\n\n\t\t// read your parameters here and process them & extract sensor\n\t\t// parameters\n\t\t// for example we assume here that parameters[2 & 3] is an array\n\t\t// containing the sensor parameters\n\t\tObject[] sensorParameters = new Object[2];\n\t\t\n\t\tsensorParameters[0] = parameters[2];\n\t\tsensorParameters[1] = parameters[3];\n\t\n\t\tdeploySensor.deploySensor(\n\t\t\t\tLoadSensor.class.getName(),\n\t\t\t\tComponentStateChangeEvent.class.getName(),\n\t\t\t\tsensorParameters,\n\t\t\t\tnull, //no clientInterfaces\n\t\t\t\tnew String[] { \"pushLoadChange\" } //just one server interface\n\t\t);\n\t}", "private void createGroundSensor() {\n CircleShape shape = new CircleShape();\n shape.setRadius(bodyHalfSize.x / 2);\n shape.setPosition(new Vector2(0, -bodyHalfSize.y - bodyHalfSize.x));\n\n FixtureDef fixDef = new FixtureDef();\n fixDef.shape = shape;\n fixDef.isSensor = true;\n fixDef.filter.categoryBits = Global.PLAYER_BIT;\n fixDef.filter.maskBits = Global.GROUND_BIT | Global.SEMISOLID_BIT;\n\n body.createFixture(fixDef).setUserData(\"sensor\");\n shape.dispose();\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "protected boolean registerSensor() {\n final android.hardware.Sensor sensor = mSensorConfig.getUnderlyingSensor();\n final int reportingDelay = mSensorConfig.getReportingDelayUs();\n final int samplingDelay = mSensorConfig.getSamplingDelayUs();\n final SensorManager sensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n isRegistered = sensorManager.registerListener(this, sensor, samplingDelay, reportingDelay);\n return isRegistered;\n }" ]
[ "0.6797555", "0.64247566", "0.64128554", "0.6339899", "0.63079816", "0.6225251", "0.617305", "0.6138219", "0.6093071", "0.60386854", "0.601026", "0.5995042", "0.5967301", "0.5913234", "0.58909607", "0.5884586", "0.585892", "0.5839238", "0.5829147", "0.5827199", "0.5822041", "0.57182497", "0.57151043", "0.5669066", "0.5648349", "0.5638704", "0.559853", "0.5587526", "0.5563214", "0.55496275", "0.5494494", "0.5494428", "0.5476184", "0.5468551", "0.544921", "0.5448767", "0.5447965", "0.54235435", "0.54224634", "0.54088193", "0.54085994", "0.54042023", "0.53738445", "0.5360167", "0.5356166", "0.53096455", "0.5307168", "0.530716", "0.5305184", "0.5286", "0.5285883", "0.52643615", "0.5261781", "0.52524376", "0.52453476", "0.52409667", "0.52404684", "0.52348673", "0.522487", "0.5206292", "0.5201064", "0.5199323", "0.5195651", "0.5192057", "0.514848", "0.5108785", "0.5093551", "0.5079652", "0.5077555", "0.5071629", "0.5047435", "0.50417334", "0.5035094", "0.50252557", "0.5021685", "0.5012163", "0.5009749", "0.5009726", "0.5002381", "0.49997172", "0.49966073", "0.49869707", "0.49846676", "0.49759182", "0.49669078", "0.4945614", "0.4945614", "0.492451", "0.49058113", "0.48935744", "0.48912066", "0.48816812", "0.4880973", "0.48767385", "0.48760822", "0.48665416", "0.48613867", "0.4842689", "0.48239765", "0.48155198" ]
0.6040186
9
Creates a new GPS Sensor, assigns the given values and adds the Sensor to the SensorManagers sensor list. Use only for internal GPS Sensors
protected Sensor(int gpsSensorID, int sampleRate, int savePeriod, float smoothness, String displayedSensorName, SensorType sensorType, MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit) { this.isInternalSensor = true; this.sensorID = gpsSensorID; this.sampleRate = sampleRate; this.savePeriod = savePeriod; this.smoothness = smoothness; this. displayedSensorName = displayedSensorName; this.sensorType = sensorType; this.rawDataMeasurementSystem = rawDataMeasurementSystem; this.displayedMeasurementSystem = rawDataMeasurementSystem; this.rawDataMeasurementUnit = rawDataMeasurementUnit; this.displayedMeasurementUnit = rawDataMeasurementUnit; this.graphType = GraphType.LINE; SensorManager.addNewSensor(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerSensors()\n {\n // Double check that the device has the required sensor capabilities\n\n if(!HasGotSensorCaps()){\n showToast(\"Required sensors not supported on this device!\");\n return;\n }\n\n // Provide a little feedback via a toast\n\n showToast(\"Registering sensors!\");\n\n // Register the listeners. Used for receiving notifications from\n // the SensorManager when sensor values have changed.\n\n sensorManager.registerListener(this, senStepCounter, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senStepDetector, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "DeviceSensor createDeviceSensor();", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "RegisterSensor() {\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "ExternalSensor createExternalSensor();", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue create(\n long sensorValueId) {\n return getPersistence().create(sensorValueId);\n }", "public void startSensors() {\r\n\t\tsensorManager.registerListener(this, accelerometer,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\t\tsensorManager.registerListener(this, magneticField,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\r\n\t\tLog.d(TAG, \"Called startSensors\");\r\n\t}", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public final flipsParser.defineSensor_return defineSensor() throws RecognitionException {\n flipsParser.defineSensor_return retval = new flipsParser.defineSensor_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal52=null;\n Token string_literal53=null;\n Token string_literal54=null;\n flipsParser.defineSensorValue_return defineSensorValue55 = null;\n\n\n CommonTree string_literal52_tree=null;\n CommonTree string_literal53_tree=null;\n CommonTree string_literal54_tree=null;\n RewriteRuleTokenStream stream_132=new RewriteRuleTokenStream(adaptor,\"token 132\");\n RewriteRuleTokenStream stream_131=new RewriteRuleTokenStream(adaptor,\"token 131\");\n RewriteRuleTokenStream stream_130=new RewriteRuleTokenStream(adaptor,\"token 130\");\n RewriteRuleSubtreeStream stream_defineSensorValue=new RewriteRuleSubtreeStream(adaptor,\"rule defineSensorValue\");\n try {\n // flips.g:176:2: ( ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue -> defineSensorValue )\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue\n {\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' )\n int alt21=3;\n switch ( input.LA(1) ) {\n case 130:\n {\n alt21=1;\n }\n break;\n case 131:\n {\n alt21=2;\n }\n break;\n case 132:\n {\n alt21=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 0, input);\n\n throw nvae;\n }\n\n switch (alt21) {\n case 1 :\n // flips.g:176:5: 'sen'\n {\n string_literal52=(Token)match(input,130,FOLLOW_130_in_defineSensor839); \n stream_130.add(string_literal52);\n\n\n }\n break;\n case 2 :\n // flips.g:176:11: 'sensor'\n {\n string_literal53=(Token)match(input,131,FOLLOW_131_in_defineSensor841); \n stream_131.add(string_literal53);\n\n\n }\n break;\n case 3 :\n // flips.g:176:20: 'sensors'\n {\n string_literal54=(Token)match(input,132,FOLLOW_132_in_defineSensor843); \n stream_132.add(string_literal54);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_defineSensorValue_in_defineSensor846);\n defineSensorValue55=defineSensorValue();\n\n state._fsp--;\n\n stream_defineSensorValue.add(defineSensorValue55.getTree());\n\n\n // AST REWRITE\n // elements: defineSensorValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 177:2: -> defineSensorValue\n {\n adaptor.addChild(root_0, stream_defineSensorValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Sensor registerSensor(String name, String type) {\n \tSCSensor sensor = new SCSensor(name);\n \n String uid = UUID.randomUUID().toString();\n sensor.setId(uid);\n sensor.setType(type);\n \n //temporary fix..\n if(sensorCatalog.hasSensorWithName(name))\n \tsensorCatalog.removeSensor(sensorCatalog.getSensorWithName(name).getId());\n \n // Setting PublicEndPoint\n sensor.setPublicEndpoint(publicEndPoint);\n \n /*sensor = generateSensorEndPoints(sensor);*/\n Endpoint dataEndpoint;\n if (Constants.SENSOR_TYPE_BLOCK.equalsIgnoreCase(type)) {\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n } else if (Constants.SENSOR_TYPE_STREAMING.equalsIgnoreCase(type)) {\n dataEndpoint = new StreamingEndpoint();\n \n dataEndpoint.setProperties(configuration.getStreamingServer().getParameters());\n dataEndpoint.getProperties().put(\"PATH\", \"sensor/\" + sensor.getId() + \"/data\");\n \n // add the routing to the streaming server\n } else {\n // defaulting to JMS\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n }\n \n sensor.setDataEndpoint(dataEndpoint);\n \n Endpoint controlEndpoint;\n \n controlEndpoint = new JMSEndpoint();\n controlEndpoint.setAddress(sensor.getId() + \"/control\");\n // TODO: we have to decide the connection factory to be used\n controlEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n sensor.setControlEndpoint(controlEndpoint);\n \n // set the update sending endpoint as the global endpoint\n Endpoint updateSendingEndpoint;\n updateSendingEndpoint = new JMSEndpoint();\n \n updateSendingEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n updateSendingEndpoint.setAddress(sensor.getId() + \"/update\");\n sensor.setUpdateEndpoint(updateSendingEndpoint);\n \n registry.addSensor(sensor);\n \n sensorCatalog.addSensor(sensor);\n updateManager.sensorChange(Constants.Updates.ADDED, sensor.getId());\n return sensor;\n }", "private void registerLocationListeners() {\n// SharedPreferences perfs = PreferenceManager\n// .getDefaultSharedPreferences(getApplicationContext());\n// if (perfs.getBoolean(getString(R.string.gps_pref_key), false)) {\n// registerForGPS();\n// } else {\n// useDefaultLocation(perfs,\n// getString(R.string.state_location_pref_key));\n// }\n registerForGPS();\n onGPSOn();\n SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n Sensor gsensor = mSensorManager\n .getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n Sensor msensor = mSensorManager\n .getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n mSensorManager.registerListener(qiblaManager, gsensor,\n SensorManager.SENSOR_DELAY_GAME);\n mSensorManager.registerListener(qiblaManager, msensor,\n SensorManager.SENSOR_DELAY_GAME);\n schedule();\n isRegistered = true;\n\n }", "public SetSensorCommand(List<SensorType> requiredSensors) {\n super(CommandType.SetSensor);\n this.requiredSensors = requiredSensors;\n }", "public abstract void createSensors() throws Exception;", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "public void start() {\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)==null){ // check if rotation sensor present\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD)==null\n || mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)==null){ // check if acc & mag sensors are present\n noSensorAlert(); // alert if no sensors are present\n }\n else { // use acc & mag sensors\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n haveSensor = mSensorManager.registerListener(this,mAccelerometer,SensorManager.SENSOR_DELAY_UI);\n haveSensor2 = mSensorManager.registerListener(this,mMagnetometer,SensorManager.SENSOR_DELAY_UI);\n }\n }\n else { // use rotation sensor\n mRotationV = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n haveSensor = mSensorManager.registerListener(this,mRotationV,SensorManager.SENSOR_DELAY_UI);\n }\n }", "public void onSensorChanged(int sensor, float[] values) {\n\t\t\t\n\t\t\t// grab the values required to respond to user movement.\n\t\t\tmAccelX = (float) (0.2 * values[0]);\n\t\t\tmAccelY = (float) (0.2 * values[1]);\n\t\t\t// mAccelZ = values[2];\n\t\t\tinvalidate();\n\t\t}", "public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness,\n String displayedSensorName, SensorType sensorType, String bluetoothID,\n MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit,\n MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) {\n isInternalSensor = false;\n\n // compute the lowest external sensorID which is not forgiven yet\n int id = 100;\n for (Sensor sensor : SensorManager.getAllSensors()) {\n if (id <= sensor.getSensorID()) {\n id = sensor.getSensorID() + 1;\n }\n }\n\n sensorID = id;\n\n this.sensorDriver = sensorDriver;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.bluetoothID = bluetoothID;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementSystem = displayedMeasurementSystem;\n this.displayedMeasurementUnit = displayedMeasurementUnit;\n this.graphType = GraphType.LINE;\n this.isEnabled = true;\n\n SensorManager.addNewSensor(this);\n }", "public BasicSensor() {}", "protected Sensor[] getSensorValues() { return sensors; }", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}", "private void initLocation() {\n\t\tlocationManager = (LocationManager) this\n\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\n\t\t// Define a listener that responds to location updates\n\t\tnetworkLocListener = new MyLocationListener();\n\t\tgpsLocListener = new MyLocationListener();\n\n\t\tlocationProvider2 = LocationManager.NETWORK_PROVIDER;\n\t\tlocationProvider1 = LocationManager.GPS_PROVIDER;\n\n\t\tgps_enabled = false;\n\t\tnetwork_enabled = false;\n\t\t// exceptions will be thrown if provider is not permitted.\n\n\t\t// try{gps_enabled=mlocManager.isProviderEnabled(LocationManager.GPS_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tgps_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\t\t// try{network_enabled=mlocManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tnetwork_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n\t\t// don't start listeners if no provider is enabled\n\t\tif (!gps_enabled && !network_enabled) {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Either network or GPS not enabled, please check\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t/*\n\t\t\t * Intent gpsOptionsIntent = new\n\t\t\t * Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS\n\t\t\t * ); startActivity(gpsOptionsIntent);\n\t\t\t */\n\t\t}\n\n\t\t// Define a listener that responds to location updates\n\t\t// LocationListener locationListener = new LocationListener() {\n\t\t// @Override\n\t\t// public void onLocationChanged(Location location) {\n\t\t// // Called when a new location is found by the network location\n\t\t// // provider.\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Updating current location\");\n\t\t// Toast.makeText(getApplicationContext(),\n\t\t// \"Updating current location\", Toast.LENGTH_LONG).show();\n\t\t// }\n\t\t//\n\t\t// public void onStatusChanged(String provider, int status,\n\t\t// Bundle extras) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"status changed\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderEnabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"location enabled\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderDisabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Location disabled\");\n\t\t// }\n\t\t// };\n\n\t\tif (network_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.NETWORK_PROVIDER, 1, 1, networkLocListener);\n\t\t}\n\t\tif (gps_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.GPS_PROVIDER, 1, 1, gpsLocListener);\n\t\t}\n\t}", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public static final void activateGps() {\n // This is called first to ensure that multiple instances of the listener aren't actually called and running.\n deactivateGps();\n\n loadLocationManager();\n \n // Load last known location coordinate, if available, so that user doesn't have to wait as long for a location.\n if (isGpsEnabled()) {\n Location gpsLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (gpsLocation != null) {\n mLocationGps = gpsLocation;\n }\n } else if (isNetworkEnabled()) {\n Location networkLocation = mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (networkLocation != null) {\n mLocationNetwork = networkLocation;\n }\n }\n \n mLocationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equalsIgnoreCase(LocationManager.GPS_PROVIDER)) {\n mLocationGps = location;\n } else if (location.getProvider().equalsIgnoreCase(LocationManager.NETWORK_PROVIDER)) {\n mLocationNetwork = location;\n }\n// while (latitudeNowString.length() < 10) { latitudeNowString = latitudeNowString + \"0\"; }\n// while (longitudeNowString.length() < 11) { longitudeNowString = longitudeNowString + \"0\"; }\n }\n\n public void onStatusChanged(String provider, int status, Bundle extras) {}\n\n public void onProviderEnabled(String provider) {}\n\n public void onProviderDisabled(String provider) {}\n\n };\n\n // Register the listener with the Location Manager to receive location updates.\n if (isGpsEnabled()) {\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME, MIN_DISTANCE, mLocationListener); // In milliseconds, meters.\n }\n if (isNetworkEnabled()) {\n mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME, MIN_DISTANCE, mLocationListener); // In milliseconds, meters.\n }\n }", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "@Override\n void add()\n {\n long sensorId = Long.parseLong(textSensorId.getText());\n MissionNumber missionNumber = textMissionNumber.getValue();\n String jobOrderNumber = textJobOrderNumber.getText();\n \n FPS16SensorDataGenerator generator = new FPS16SensorDataGenerator(tspiConfigurator.getTspiGenerator(), sensorId, missionNumber, jobOrderNumber);\n controller.addSensorDataGenerator(getRate(), getChannel(), generator);\n }", "public int Register(){\n\t\tnumSensors = 0;\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tif(mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME)) numSensors++; \n\t\treturn numSensors;\t\n\t}", "public RegistroSensor() \n {\n\n }", "private void startService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTimeMillis,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\t\tlocationListener.onLocationChanged(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER));\r\n\t}", "Sensor getSensor();", "public void requestSensor(String sensorType){\n switch(sensorType){\n case \"SENSOR_ACC\":\n accelerometer = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n phoneSensorsMan.registerListener(sel,accelerometer, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GYRO\":\n gyro = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n phoneSensorsMan.registerListener(sel,gyro, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_MAGNET\":\n magnet = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n phoneSensorsMan.registerListener(sel,magnet, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GPS\":\n phoneLocationMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,100,1,locListener);\n break;\n case \"SENSOR_ORIENTATION\":\n orientation = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n phoneSensorsMan.registerListener(sel,orientation, SensorManager.SENSOR_DELAY_GAME);\n\n\n }\n }", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public void addSensor(String sensorId, String sensorType, String sensorUnits, int interval, int threshold, boolean upperlimit){\n Sensor theSensor = new Sensor(sensorId, sensorType, sensorUnits, interval, threshold, upperlimit);\n sensors.addSensor(theSensor);\n theSensor.setFieldStation(this);\n }", "public void loadSensors() {\r\n\t\thandlerBridge.loadBrigde();\r\n\t\thandlerSensor = new SensorHandler(handlerBridge.loadSensors());\r\n\t}", "private void registerSensorListeners(){\n\n // Get the accelerometer and gyroscope sensors if they exist\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null){\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n }\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null){\n mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n }\n\n // Acquire the wake lock to sample with the screen off\n mPowerManager = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);\n\n mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\n mWakeLock.acquire();\n\n // Register sensor listener after delay to compensate for user putting phone in pocket\n\n long delay = 5;\n\n Log.d(TAG, \"Before start: \" + System.currentTimeMillis());\n\n exec.schedule(new Runnable() {\n @Override\n public void run() {\n mSensorManager.registerListener(PhoneSensorLogService.this, mAccelerometer, SAMPLE_RATE);\n mSensorManager.registerListener(PhoneSensorLogService.this, mGyroscope, SAMPLE_RATE);\n Log.d(TAG, \"Start: \" + System.currentTimeMillis());\n if (timedMode) {\n scheduleLogStop();\n }\n }\n }, delay, TimeUnit.SECONDS);\n }", "GenericFloatSensor sensor();", "public void init() {\n Log.d(\"in init()\", \"Initializing\");\n prevTime = System.currentTimeMillis();\n sensorListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n timstamps.add(System.currentTimeMillis());\n }\n /*\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n x_g.add(sensorEvent.values[0]);\n y_g.add(sensorEvent.values[1]);\n z_g.add(sensorEvent.values[2]);\n }\n */\n curTime = System.currentTimeMillis();\n// Log.d(\"Time = \", \"\" + (curTime - prevTime) + \" > \" + MIN_TIME);\n if (curTime - prevTime > MIN_TIME) {\n //int minVal = Math.min(x.size(), x_g.size());\n if(isExternalStorageWritable()){\n //writeToFile(x,y,z,x_g,y_g,z_g,minVal);\n writeToFile(x,y,z,timstamps);\n }\n x.clear();\n y.clear();\n z.clear();\n timstamps.clear();\n //x_g.clear();\n //y_g.clear();\n //z_g.clear();\n prevTime = curTime;\n }\n\n /*\n if (x.size() != N_SAMPLES && y.size() != N_SAMPLES && z.size() != N_SAMPLES ){\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n }else {\n if(isExternalStorageWritable()){\n writeToFile(x,y,z);\n }\n x.clear();\n y.clear();\n z.clear();\n }\n */\n\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensorManager.registerListener(sensorListener,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);\n// sensorManager.registerListener(sensorListener,\n// sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), SensorManager.SENSOR_DELAY_NORMAL);\n\n //Checks if the Accelerometer or Gyroscope sensor is available or not\n if(sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) == null ){\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(R.string.app_name);\n builder.setIcon(R.mipmap.ic_launcher);\n builder.setMessage(\"Accelerometer Sensor is not available, please exit\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER && s.equals(\"Accelerometre\")) {\n float Ax = sensorEvent.values[0];\n float Ay = sensorEvent.values[1];\n float Az = sensorEvent.values[2];\n\n acce = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Ax = \" + Ax + \" \" + \"\\n Ay = \" + Ay + \" \" + \"\\n Az = \" + Az + \"\\n\";\n\n // Do something with this sensor value .\n sensorTxt.setText(acce);\n Log.d(TAG, \" TimeAcc = \" + sensorEvent.timestamp + \" Ax = \" + Ax + \" \" + \" Ay = \" + Ay + \" \" + \" Az = \" + Az);\n }\n\n //LUMIERE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT && s.equals(\"Lumiere\")) {\n // La valeur de la lumière\n float lv = sensorEvent.values[0];\n\n light = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Light value = \" + lv + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(light);\n }\n\n //PROXIMITE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY && s.equals(\"Proximite\")) {\n // La valeur de proximité\n float p = sensorEvent.values[0];\n\n proxi = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Proximite value = \" + p + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(proxi);\n }\n\n //GYROSCOPE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE && s.equals(\"Gyroscope\")) {\n // Les valeurs du gyroscope\n float xGyroscope = sensorEvent.values[0];\n float yGyroscope = sensorEvent.values[1];\n float zGyroscope = sensorEvent.values[2];\n\n gyro = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Valeur du gyroscope \\n Valeur en x = \" + xGyroscope + \" \" + \"\\n Valeur en y = \" + yGyroscope + \" \" + \"\\n Valeur en z = \" + zGyroscope + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(gyro);\n }\n\n }", "public synchronized void addSensor(int type) {\n\n if (running) {\n throw new IllegalStateException(\"Is running\");\n }\n Sensor s = manager.getDefaultSensor(type);\n\n if (!sensorsList.contains(s)) {\n sensorsList.add(s);\n }\n }", "public synchronized int addSensor(Sensor s) throws Exception{\n int index = sList.addSensor(s);\n sensors.put(index, s);\n \n listeners.stream().forEach((listener) -> {\n listener.modelEventHandler(ModelEventType.SENSORADDED, index);\n });\n \n s.addListener(this);\n \n return index;\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\r\n\t\tif (start_button.getText().equals(\"Stop\")) {\r\n\r\n\t\t\tswitch(event.sensor.getType()){\r\n\r\n\t\t\t\t/* Accelerometer Sensor */\r\n\t\t\t\tcase Sensor.TYPE_LINEAR_ACCELERATION:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Read data from sensor */\r\n\t\t\t\t\tfor(int i =0; i < 3; i++){\r\n\t\t\t\t\t\tacceleration[i] = event.values[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Insert data to local database */\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tdataSource_d=new Path_d_dataSource(this);\r\n\t\t\t\t\tdataSource_d.open();\r\n\t\t\t\t\tpath_d=null;\r\n\t\t\t\t\tpath_d=dataSource_d.createPath_d(path_h.getId(), direction[0], direction[1], direction[2],\r\n\t\t\t\t\t\t\tacceleration[0], acceleration[1], acceleration[2], gyro[0], gyro[1], gyro[2]);\r\n\t\t\t\t\tdataSource_d.close();\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Get system date */\r\n\t\t\t\t\tDate dCurrentTime = new Date();\r\n\t\t\t\t\tCharSequence sCurrentTime = DateFormat.format(\"hh:mm:ss\", dCurrentTime.getTime());\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Send data to external server */\r\n\t\t\t\t\tString url = \"http://caminamaps.com/caminadev/insert_path_d.php?\"\r\n\t\t\t\t\t\t\t+\"date=\"+sCurrentTime\r\n\t\t\t\t\t\t\t+\"&directionX=\"+direction[0]\r\n\t\t\t\t\t\t\t+\"&directionY=\"+direction[1]\r\n\t\t\t\t\t\t\t+\"&directionZ=\"+direction[2]\r\n\t\t\t\t\t\t\t+\"&accelerationX=\"+acceleration[0]\r\n\t\t\t\t\t\t\t+\"&accelerationY=\"+acceleration[1]\r\n\t\t\t\t\t\t\t+\"&accelerationZ=\"+acceleration[2]\r\n\t\t\t\t\t\t\t+\"&gyroX=\"+gyro[0]\r\n\t\t\t\t\t\t\t+\"&gyroY=\"+gyro[1]\r\n\t\t\t\t\t\t\t+\"&gyroZ=\"+gyro[2]\r\n\t\t\t\t\t\t\t+\"&steps=0\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tHttpConnection con = new HttpConnection(url);\r\n\t\t\t\t\t\t(new Thread(con)).start();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/* Orientation Sensor */\r\n\t\t\t\tcase Sensor.TYPE_ORIENTATION:\r\n\t\t\t\t{\t\r\n\t\t\t\t\t/* Read data from sensor */\r\n\t\t\t\t\tfor(int i =0; i < 3; i++){\r\n\t\t\t\t\t\tdirection[i] = event.values[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t\t/* Gyro Sensor */\r\n\t\t\t\tcase Sensor.TYPE_GYROSCOPE:\r\n\t\t\t\t{\t\r\n\t\t\t\t\t/* Read data from sensor */\r\n\t\t\t\t\tfor(int i =0; i < 3; i++){\r\n\t\t\t\t\t\tgyro[i] = event.values[i];\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}", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "protected Sensor<Float> createExtreme(Sensor<Float> sensor, Extreme type)\n {\n String key = sensor.getUuid() + \".\" + type.key;\n History history = extremes.get(key);\n\n // Es gibt noch gar keine Queue fuer die Werte. Dann legen wir eine an\n if (history == null)\n {\n Settings settings = Application.getPluginLoader().getPlugin(Plugin.class).getResources().getSettings();\n int minutes = settings.getInt(\"scheduler.interval.minutes\",5);\n int size = 24 * 60 / minutes;\n history = new History(size);\n extremes.put(key,history);\n }\n\n Float value = sensor.getValue();\n\n // Wert hinzufuegen\n history.push(value);\n \n // Extrem-Wert ermitteln\n List<Float> values = history.elements();\n for (Float f:values)\n {\n if (type == Extreme.MAX && f.compareTo(value) > 0)\n {\n value = f;\n continue;\n }\n if (type == Extreme.MIN && f.compareTo(value) < 0)\n {\n value = f;\n continue;\n }\n }\n\n Sensor clone = (Sensor<Float>) sensor.clone();\n clone.setUuid(key);\n clone.setValue(value);\n clone.setName(i18n.tr(\"{0} ({1})\",sensor.getName(),type.title));\n return clone;\n }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "private void initSensorManager() {\n\t\ttry {\n\t\t\tSensorManager sensorManage = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\t\t\tList<Sensor> mySensors = sensorManage\n\t\t\t\t\t.getSensorList(Sensor.TYPE_ACCELEROMETER);\n\t\t\tmAccel = 0.00f;\n\t\t\tmAccelCurrent = SensorManager.GRAVITY_EARTH;\n\t\t\tmAccelLast = SensorManager.GRAVITY_EARTH;\n\t\t\tsensorManage.registerListener(new SensorEventListener() {\n\t\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t\t\t\t}\n\n\t\t\t\t@SuppressLint(\"FloatMath\")\n\t\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\n\t\t\t\t\tfloat x = event.values[0];// Get X-Coordinator\n\n\t\t\t\t\tfloat y = event.values[1];// Get Y-Coordinator\n\n\t\t\t\t\tfloat z = event.values[2];// Get Z-Coordinator\n\n\t\t\t\t\tmAccelLast = mAccelCurrent;\n\t\t\t\t\tmAccelCurrent = (float) Math\n\t\t\t\t\t\t\t.sqrt((double) (x * x + y * y + z * z));\n\t\t\t\t\tfloat delta = mAccelCurrent - mAccelLast;\n\t\t\t\t\tmAccel = mAccel * 0.9f + delta; // perform low-cut filter\n\n\t\t\t\t\tif (SHAKING_DELTA > mAccel\n\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage != CameraMessageStatus.Focused) {\n\t\t\t\t\t\t// BY SAM for start autofocusing\n\t\t\t\t\t\tif (!lock_autofocus) {\n\t\t\t\t\t\t\tif (autoFocusCounter > AUTO_FOCUS_START_INTERVAL\n\t\t\t\t\t\t\t\t\t&& CommonValues.getInstance().CameraMessage == CameraMessageStatus.Shacked) {\n//\t\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t\t\t\t\t} else if (autoFocusCounter > AUTO_FOCUS_START_INTERVAL) {\n\t\t\t\t\t\t\t\tautoFocusCounter = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!lock_autofocus\n\t\t\t\t\t\t\t\t&& Math.abs(z - old_z) > SHAKING_Z_DELTA) {\n\n\t\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n//\t\t\t\t\t\t\tCameraManager.get().requestAutoFocus(handler,\n//\t\t\t\t\t\t\t\t\tR.id.auto_focus);\n\t\t\t\t\t\t\tautoFocusCounter = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!lock_autofocus) {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_img_middle));\n\t\t\t\t\t\t\t\tautoFocusCounter++;\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tstatusView\n\t\t\t\t\t\t\t\t\t\t.setText(getString(R.string.brcd_press_focus));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (mAccel > SHAKING_DELTA)// Shaking\n\t\t\t\t\t{\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.phone_silent));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Shacked;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\n\t\t\t\t\t}\n\t\t\t\t\told_z = z;\n\n\t\t\t\t}\n\t\t\t}, mySensors.get(0), SensorManager.SENSOR_DELAY_NORMAL);\n\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Unable to detect SensorManager. \",\n\t\t\t\t\t\"Error data \" + e.toString());\n\t\t}\n\t}", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "private void initSensor() {\n if ((status == PedoListener.RUNNING) || (status == PedoListener.STARTING)\n && status != PedoListener.PAUSED) {\n return;\n }\n\n Database db = Database.getInstance(getActivity());\n\n todayOffset = db.getSteps(Util.getToday());\n\n SharedPreferences prefs = getActivity().getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n goal = prefs.getInt(PedoListener.GOAL_PREF_INT, PedoListener.DEFAULT_GOAL);\n since_boot = db.getCurrentSteps();\n int pauseDifference = since_boot - prefs.getInt(\"pauseCount\", since_boot);\n\n Log.i(TAG, \"PedoListener initSensor todayOffset=\"+todayOffset+\" since_boot=\"+since_boot+\" pauseDifference=\"+pauseDifference);\n\n // register a sensor listener to live update the UI if a step is taken\n sensorManager = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if (sensor == null) {\n new AlertDialog.Builder(getActivity()).setTitle(\"R.string.no_sensor\")\n .setMessage(\"R.string.no_sensor_explain\")\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(final DialogInterface dialogInterface) {\n getActivity().finish();\n }\n }).setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n }).create().show();\n } else {\n sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI, 0);\n }\n\n since_boot -= pauseDifference; \n\n total_start = db.getTotalWithoutToday();\n total_days = db.getDays();\n\n Log.i(TAG, \"PedoListener initSensor since_boot=\"+since_boot+ \" total_start=\"+total_start+\" total_days=\"+total_days);\n\t\n \tstatus = PedoListener.STARTING;\n\t\n\t db.setConfig(\"status_service\", \"start\");\n \n db.close();\n\n updateUI();\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "private void startLoggerService() {\n\n // ---use the LocationManager class to obtain GPS locations---\n lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n GPSLoggerService.setLocationManager(lm);\n\n locationListener = new MyLocationListener();\n\n lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n\n }", "public SensorData() {\n\n\t}", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "public SensorStation(){\n\n }", "public void setSensorValue (float value) {\n this.currentSensorValue = value;\n }", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }", "public static ArrayList<Sensor> getSensorsFromFile(InputStream fileStream) {\n ArrayList<Sensor> sensors = new ArrayList<>();\n Properties props = new Properties();\n\n // load configuration file\n try {\n props.load(fileStream);\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // for every property in the file...\n Enumeration e = props.propertyNames();\n iterateProperties:\n while(e.hasMoreElements()) {\n String sensorName = (String)e.nextElement();\n String[] parameters = props.getProperty(sensorName).split(\", *\");\n Duration[] refreshPeriods = new Duration[3];\n\n // validate parameter count\n if(parameters.length < 4) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (at least 4 needed)\");\n continue iterateProperties;\n }\n\n // parse refresh periods in ms\n for(int i = 0; i < 3; ++i)\n try {\n refreshPeriods[i] = Duration.ofMillis(Integer.parseInt(parameters[i + 1]));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect duration formatting (integer in milliseconds expected)\");\n continue iterateProperties;\n }\n\n // create sensor of specified type and add to arrayList\n switch (parameters[0]) {\n case \"LSM303a\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303a type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303AccelerationSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"LSM303m\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303m type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303MagneticSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"L3GD20H\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (L3GD20H type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new L3GD20HGyroscopeSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimInt\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimInt type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorInt(sensorName, refreshPeriods, Integer.parseInt(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimFloat\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorFloat(sensorName, refreshPeriods, Float.parseFloat(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimVecFloat\":\n if(parameters.length != 7) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 7)\");\n continue iterateProperties;\n }\n try {\n float[] seed = new float[3];\n for(int i = 0; i < seed.length; ++i) {\n seed[i] = Float.parseFloat(parameters[i + 4]);\n }\n sensors.add(new SimulatedSensorVecFloat(sensorName, refreshPeriods, seed));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n default:\n System.err.println(\"config.properties error (\" + sensorName + \"): \" + parameters[0] + \" is not a valid sensor type\");\n continue iterateProperties;\n }\n }\n\n return sensors;\n }", "private void startLocationUpdate()\r\n {\r\n try \r\n {\r\n _locationProvider = LocationProvider.getInstance(null);\r\n \r\n if ( _locationProvider == null ) \r\n {\r\n // We would like to display a dialog box indicating that GPS isn't supported, but because\r\n // the event-dispatcher thread hasn't been started yet, modal screens cannot be pushed onto\r\n // the display stack. So delay this operation until the event-dispatcher thread is running\r\n // by asking it to invoke the following Runnable object as soon as it can.\r\n Runnable showGpsUnsupportedDialog = new Runnable() \r\n {\r\n public void run() \r\n {\r\n Dialog.alert(\"GPS is not supported on this platform, exiting...\");\r\n System.exit( 1 );\r\n }\r\n };\r\n invokeLater( showGpsUnsupportedDialog ); // ask event-dispatcher thread to display dialog ASAP\r\n } \r\n else \r\n {\r\n // only a single listener can be associated with a provider, and unsetting it involves the same\r\n // call but with null, therefore, no need to cache the listener instance\r\n _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);\r\n }\r\n } catch (LocationException le) {\r\n System.err.println(\"Failed to instantiate the LocationProvider object, exiting...\");\r\n System.err.println(le); \r\n System.exit(0);\r\n } \r\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public AddSensor() {\n initComponents();\n }", "public void start() {\n sensorManager.registerListener(this, gyroscope, SENSOR_DELAY);\n sensorManager.registerListener(this, rotationVector, SENSOR_DELAY);\n //sender = new UDPSender();\n }", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "public void init() {\n mLocationManager = (LocationManager) this.activity.getSystemService(Context\n .LOCATION_SERVICE);\n // checking run time location access permissions only for API version >= 23 (Marshmallow)\n if (ActivityCompat.checkSelfPermission(this.activity, Manifest.permission\n .ACCESS_FINE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n // if permission is already granted request for permissions\n // ActivityCompat.requestPermissions(\n // this.activity, new String[]{Manifest.permission\n // .ACCESS_FINE_LOCATION},\n // MY_PERMISSIONS_REQUEST_ACCESS_LOCATION);\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n UPDATE_INTERVAL_IN_MILLISECONDS, MIN_DISTANCE, locationListener);\n mLocationManager.addGpsStatusListener(gpsStatusListener);\n mLocationManager.addNmeaListener(nmeaListener);\n }", "private void getSensorService() {\n mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n if (mSensorManager == null) {\n Log.e(TAG, \"----getSystemService failed\");\n\n } else {\n mWakeupUncalibratedGyro = mSensorManager.getDefaultSensor(\n Sensor.TYPE_GYROSCOPE_UNCALIBRATED, true);\n }\n\n if (mWakeupUncalibratedGyro != null) {\n mSensorManager.registerListener(mListener, mWakeupUncalibratedGyro,\n SensorManager.SENSOR_DELAY_UI);\n }\n }", "public void init(Object[] parameters) {\n\n\t\t// read your parameters here and process them & extract sensor\n\t\t// parameters\n\t\t// for example we assume here that parameters[2 & 3] is an array\n\t\t// containing the sensor parameters\n\t\tObject[] sensorParameters = new Object[2];\n\t\t\n\t\tsensorParameters[0] = parameters[2];\n\t\tsensorParameters[1] = parameters[3];\n\t\n\t\tdeploySensor.deploySensor(\n\t\t\t\tLoadSensor.class.getName(),\n\t\t\t\tComponentStateChangeEvent.class.getName(),\n\t\t\t\tsensorParameters,\n\t\t\t\tnull, //no clientInterfaces\n\t\t\t\tnew String[] { \"pushLoadChange\" } //just one server interface\n\t\t);\n\t}", "private void registerListeners(){\n\n //!!!Sensor delay can also be expressed as an int in microseconds, and can use an extra int to give max queue time\n //sampling period is considered a suggestion, and must be in microseconds\n //IMPORTANT TO USE QUEUE. drastically reduced battery consumption\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY );\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n /* //This is for raw PPG data on Polar watches, not implemented\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(65545),\n SensorManager.SENSOR_DELAY_NORMAL);\n */\n }", "public void add_location() {\n if (currentLocationCheckbox.isChecked()) {\n try {\n CurrentLocation locationListener = new CurrentLocation();\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null) {\n int latitude = (int) (location.getLatitude() * 1E6);\n int longitude = (int) (location.getLongitude() * 1E6);\n currentLocation = new GeoPoint(latitude, longitude);\n }\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n } else {\n currentLocation = null;\n }\n\n }", "private synchronized void initLocation() {\n if (locationManager == null) {\n LocationManager manager =\n (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\n\n Criteria criteriaCoarse = new Criteria();\n /* \"Coarse\" accuracy means \"no need to use GPS\".\n * Typically a gShots phone would be located in a building,\n * and GPS may not be able to acquire a location.\n * We only care about the location to determine the country,\n * so we don't need a super accurate location, cell/wifi is good enough.\n */\n criteriaCoarse.setAccuracy(Criteria.ACCURACY_COARSE);\n criteriaCoarse.setPowerRequirement(Criteria.POWER_LOW);\n String providerName =\n manager.getBestProvider(criteriaCoarse, /*enabledOnly=*/true);\n \n \n List<String> providers = manager.getAllProviders();\n for (String providerNameIter : providers) {\n try {\n LocationProvider provider = manager.getProvider(providerNameIter);\n } catch (SecurityException se) {\n // Not allowed to use this provider\n Logger.w(\"Unable to use provider \" + providerNameIter);\n continue;\n }\n Logger.i(providerNameIter + \": \" +\n (manager.isProviderEnabled(providerNameIter) ? \"enabled\" : \"disabled\"));\n }\n\n /* Make sure the provider updates its location.\n * Without this, we may get a very old location, even a\n * device powercycle may not update it.\n * {@see android.location.LocationManager.getLastKnownLocation}.\n */\n manager.requestLocationUpdates(providerName,\n /*minTime=*/0,\n /*minDistance=*/0,\n new LoggingLocationListener(),\n Looper.getMainLooper());\n locationManager = manager;\n locationProviderName = providerName;\n }\n assert locationManager != null;\n assert locationProviderName != null;\n }", "public RegisterSensor(final String version, final Object sensorDescription, final ObservationTemplate observationTemplate) {\n super(version);\n this.observationTemplate = observationTemplate;\n this.sensorDescription = new SensorDescription(sensorDescription);\n }", "public SensorReader() {\n\t\tinit();\n\t}", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "private void setupLocationProvider() {\n final LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n mGPSLocationProvider = new AppLocationProvider(locManager, LocationManager.GPS_PROVIDER, 1000L);\n mGPSLocationProvider.start();\n\n mActiveLocationProvider = new AppLocationProvider(locManager, LocationManager.NETWORK_PROVIDER, 1000L);\n mActiveLocationProvider.start();\n }", "public void onCreate() {\r\n\r\n\t\tLog.d(TAG, \"Called onCreate\");\r\n\r\n\t\tsuper.onCreate();\r\n\r\n\t\tmeter = Pedometer.getInstance();\r\n\r\n\t\tinitializeSensors();\r\n\r\n\t\tIntentFilter filter = new IntentFilter(Application.SENSORSWITCHID);\r\n\t\tsensorSwitch = new SensorSwitchReceiver();\r\n\t\tregisterReceiver(sensorSwitch, filter);\r\n\r\n\t\tsensorUpdateIntent = new Intent(Application.SENSORSUPDATEID);\r\n\r\n\t}", "public static GPSManager newInstance(Handler handler)\n {\n return new GPSManager(handler);\n }", "private void createGroundSensor() {\n CircleShape shape = new CircleShape();\n shape.setRadius(bodyHalfSize.x / 2);\n shape.setPosition(new Vector2(0, -bodyHalfSize.y - bodyHalfSize.x));\n\n FixtureDef fixDef = new FixtureDef();\n fixDef.shape = shape;\n fixDef.isSensor = true;\n fixDef.filter.categoryBits = Global.PLAYER_BIT;\n fixDef.filter.maskBits = Global.GROUND_BIT | Global.SEMISOLID_BIT;\n\n body.createFixture(fixDef).setUserData(\"sensor\");\n shape.dispose();\n }", "public void initSensorListener() {\n SensorManager mSensorManager = (SensorManager) this.mContext.getSystemService(\"sensor\");\n if (mSensorManager == null) {\n Slog.e(\"Fsm_MagnetometerWakeupManager\", \"connect SENSOR_SERVICE fail\");\n return;\n }\n boolean isRegisted = mSensorManager.registerListener(this.mMagnetometerListener, mSensorManager.getDefaultSensor(SENSOR_TYPE_HALL), 100000);\n Slog.d(\"Fsm_MagnetometerWakeupManager\", \"register Hall Sensor result:\" + isRegisted);\n }", "public Latitude(@NonNull byte[] values) {\n mLatitude = BLEUtils.createSInt32(values, 0);\n }", "private void startListening() {\n if (mEnabledByEmulator && mEnabledByUser) {\n if (DEBUG) Log.d(TAG, \"+++ Sensor \" + getEmulatorFriendlyName() + \" is started.\");\n mSenMan.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST);\n }\n }", "public MovementData() {\n\t\tsensorData = new ArrayList<SensorReading>();\t\t\n\t\tthis.nextIndex = 0;\n\t\tthis.prevIndex = -1;\n\t}", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "public NewLocation(int locationID, double longitude, double altitude, double latitude, float speed, long time) {\n this.locationID= locationID;\n this.longitude = longitude;\n this.altitude = altitude;\n this.latitude = latitude;\n this.speed = speed;\n this.time = time;\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}", "private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }", "private void startLoggerService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tdevNaam = android.os.Build.MODEL;\r\n\t\tdevNaam = devNaam.replaceAll(\" \", \"\");\r\n\t\t\r\n\t\tnew dbSchrijf(\"project78\", \"sommelsdijk\", extern).execute(\"table\", devNaam);\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\r\n\t\tToast.makeText(getBaseContext(),\r\n\t\t\t\t\"Service gemaakt met interval : \\n\" + minTimeMillis,\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\r\n\t}", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "@SuppressLint(\"WakelockTimeout\") // Suppresses some error messages.\n\n @Override\n public int onStartCommand(Intent intent, int flags, int startId) /* Establishes the sensor and the ability to collect data at the start of the data collection */\n {\n mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); // Starts a sensor data collection service\n Sensor mPedometer = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); // Starts it for the sensor pedometer.\n mSensorManager.registerListener(this, mPedometer, SensorManager.SENSOR_DELAY_NORMAL); // Calls the sensor delay to normal.\n return START_STICKY; // Makes it so the service restarts if it is stopped.\n }" ]
[ "0.6386406", "0.61585265", "0.61217934", "0.6089884", "0.6076588", "0.6069285", "0.6024928", "0.5962822", "0.5925151", "0.58907735", "0.58553207", "0.5796379", "0.57573265", "0.57137996", "0.5707855", "0.5686643", "0.56676", "0.56460613", "0.5610229", "0.55773854", "0.5560422", "0.55359334", "0.55327976", "0.55228543", "0.55157614", "0.5498122", "0.5493281", "0.5491814", "0.5483441", "0.5482327", "0.54675406", "0.5463884", "0.5443323", "0.5419881", "0.5416952", "0.5397643", "0.5392187", "0.5376101", "0.53737044", "0.53598285", "0.5359455", "0.5341751", "0.53387755", "0.5318358", "0.53176177", "0.5312179", "0.5309289", "0.5307906", "0.53048575", "0.5304694", "0.5300647", "0.5288502", "0.5274759", "0.5267035", "0.5266041", "0.52656335", "0.5257598", "0.5243368", "0.52422905", "0.5239807", "0.5230613", "0.52300924", "0.5225135", "0.5207088", "0.5203595", "0.5203209", "0.518596", "0.5185436", "0.5169714", "0.51428866", "0.513744", "0.5127413", "0.51170564", "0.51043075", "0.51013047", "0.5095028", "0.5094852", "0.508559", "0.5070909", "0.50671065", "0.5062859", "0.5060412", "0.5058907", "0.5058285", "0.50372076", "0.50344014", "0.50339", "0.50329506", "0.50294244", "0.5028922", "0.50256777", "0.50216955", "0.5012541", "0.50009215", "0.49942163", "0.49715692", "0.49704814", "0.49702835", "0.49639034", "0.4963486" ]
0.6004575
7
returns if the sensor is an internal Sensor.
public boolean isInternalSensor() { return isInternalSensor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInternal();", "public boolean isInternal()\n {\n return m_fInternal;\n }", "public abstract boolean sensorFound();", "boolean hasSaveSensor();", "public boolean hasGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ != null;\n }", "boolean hasGetLatestSensorReadingForUser();", "public boolean isIsPhysicalDevice() {\n return isPhysicalDevice;\n }", "private boolean isSensorTypeAlreadyMonitored(int type) {\n for (MonitoredSensor sensor : mSensors) {\n if (sensor.getType() == type) {\n return true;\n }\n }\n return false;\n }", "public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}", "private boolean isSupported(Context context, int sensorType) {\n\t\t\tsensorManager =\n\t\t (SensorManager) context\n\t\t .getSystemService(Context.SENSOR_SERVICE);\n\t\t List<Sensor> sensors = sensorManager.getSensorList(sensorType);\n\t\t return sensors.size() > 0;\n\t\t}", "public static boolean isRecognized(byte sensorType){\n switch (sensorType) {\n case GPS:\n case ACCELEROMETER:\n return true;\n default:\n return false;\n }\n }", "public static boolean isSensorNetworkAvailable() {\n\t\treturn viewPort != null;\n\t}", "public boolean hasSaveSensor() {\n return saveSensor_ != null;\n }", "public boolean getInternal()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INTERNAL$4, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "protected boolean registerSensor() {\n final android.hardware.Sensor sensor = mSensorConfig.getUnderlyingSensor();\n final int reportingDelay = mSensorConfig.getReportingDelayUs();\n final int samplingDelay = mSensorConfig.getSamplingDelayUs();\n final SensorManager sensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n isRegistered = sensorManager.registerListener(this, sensor, samplingDelay, reportingDelay);\n return isRegistered;\n }", "public boolean hasGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUserBuilder_ != null || getLatestSensorReadingForUser_ != null;\n }", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public Integer getSensorType() {\n return sensorType;\n }", "Sensor getSensor();", "protected boolean unregisterSensor() {\n if (isRegistered) {\n final SensorManager sensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n sensorManager.unregisterListener(this);\n isRegistered = false;\n }\n return false;\n }", "public String getSensor()\n {\n return sensor;\n }", "private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }", "public boolean getSensor(int x, int y) {\n\t\tif (x < size && x >= 0 && y < size && y >= 0) {\n \t\t\tboolean sensor[][] = ms.getMotionSensors();\n \t\t\treturn sensor[x][y];\n \t\t}\n \t\telse {\n \t\t\tSystem.out.println(\"Error with getSensor - index out of bounds!\");\n \t\t}\n \t\treturn false;\n \t}", "boolean internal();", "public int getSensorState() {\n return -1;\n }", "public boolean hasSaveSensor() {\n return saveSensorBuilder_ != null || saveSensor_ != null;\n }", "public boolean visible_SetupSensorCountField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_Sensordata_txtBx);\r\n\t}", "@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}", "@ApiModelProperty(value = \"This is an internally managed gift certificate associated with the loyalty cash rewards program.\")\n public Boolean isInternal() {\n return internal;\n }", "public static boolean isIOSDriver()\n\t{\n\t\treturn LocalDriverManagerMobile.INSTANCE.getDriver() instanceof IOSDriver;\n\t}", "@Override\r\n public boolean isKnown ()\r\n {\r\n Shape shape = getShape();\r\n\r\n return (shape != null) && (shape != Shape.NOISE);\r\n }", "public RegisterSensor.SensorDescription getRealSensorDescription() {\n return sensorDescription;\n }", "public boolean getAlarmSensorCurrentState() {\n return alarmSensorCurrentState;\n }", "public boolean isProximitySensorAvailable() {\n return mProximitySensor != null;\n }", "public static boolean checkSensorState()\n\t{\n\t\tboolean state = false;\n\t\ttry\n\t\t{\t\n\t\t\t\tfor (SensorData sData : sCollect.getList())\n\t\t\t\t{\n\t\t\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sData.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}catch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t\treturn state;\n\t}", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "public boolean isSensorReady(SensorType type)\n {\n return sensorModules.getSensorsBySensorType(type).size() > 0;\n }", "private boolean isSupportedInternal() {\n boolean z = false;\n synchronized (this.mLock) {\n if (this.mServiceManager == null) {\n Log.e(TAG, \"isSupported: called but mServiceManager is null!?\");\n return false;\n }\n try {\n if (this.mServiceManager.getTransport(IWifi.kInterfaceName, HAL_INSTANCE_NAME) != (byte) 0) {\n z = true;\n }\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Exception while operating on IServiceManager: \" + e);\n return false;\n }\n }\n }", "boolean isMonitoring();", "boolean isMonitoring();", "ExternalSensor createExternalSensor();", "boolean hasDevice();", "public boolean hasDeleteSensor() {\n return deleteSensor_ != null;\n }", "public static boolean isGpsconnected(){\n return gpsconnected;\n }", "private boolean isGPSconnected() {\n \tLocationManager manager\n \t= (LocationManager) getSystemService(Context.LOCATION_SERVICE );\n \tboolean gpsStatus\n \t= manager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n \treturn gpsStatus;\n }", "public boolean isAnvil() {\n return this.type == Type.ANVIL;\n }", "public boolean hasRoboticon(){\r\n\t\treturn roboticon != null;\r\n\t}", "public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}", "public boolean getIsInPlatform(){\n return isInPlatform();\n }", "boolean hasDeviceId();", "boolean hasDeviceId();", "boolean isMonitoringEnabled();", "public boolean isKnown();", "public boolean isUnknown() {\n\t\treturn (access & Opcodes.ACC_UNKNOWN) != 0;\n\t}", "public boolean isProvidesLocomotion() {\n\t\treturn providesLocomotion;\n\t}", "public abstract boolean isBefore(SoSensor s);", "public boolean asBoolean() {\r\n\t\ttry {\r\n\t\t\tboolean isreg = home.getConnection().isRegistered(objectName);\r\n\t\t\tif (logger.isLoggable(Level.FINER))\r\n\t\t\t\tlogger.log(Level.FINER, \"isRegistered \" + this + \" -> \" + isreg);\r\n\t\t\treturn isreg;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO clean exception before logging\r\n\t\t\tif (logger.isLoggable(Level.FINE))\r\n\t\t\t\tlogger.log(Level.INFO, \"exception \" + this + \" -> false\", e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isInternalThesis() {\n return hasThesis() && getThesis().isFinalAndApprovedThesis();\n }", "private static boolean atSensor(SensorEvent e, int x, int y) {\n return e.getXpos() == x && e.getYpos() == y;\n }", "public boolean isConnected() {\r\n\t\treturn backend != null;\r\n\t}", "public boolean isIdentification() {\n \treturn model.isIdentification();\n }", "public boolean isSaddled() {\n\t\treturn dataManager.get(DATA_SADDLED);\n\t}", "public void setSensorOn() {\n\n }", "public boolean isWall() {\n return type == CellType.WALL;\n }", "public boolean IsAvailable()\n\t{\n\t\treturn mbHasAccelerometer;\n\t}", "public boolean isWall () {\n if (this.equals(SquareType.WALL))\n return true;\n else\n return false;\n }", "public Boolean isReady()\n {\n return (sensorModules != null && !sensorModules.isEmpty());\n }", "public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }", "boolean hasIosAppDataStream();", "public boolean isConnected(){\r\n return (id!=-1 && matlabEng!=null); \r\n }", "public static boolean isMonitoring(){\n\t\treturn ZMonitorManager.getInstance().getMonitorLifecycle().isMonitorStarted();\n\t}", "public boolean isMonitored() {\n return monitored;\n }", "public boolean getNorth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NORTH$0, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "public int getSensorID() {\n return sensorID;\n }", "public final boolean isSystem() {\n\t\treturn m_info.isSystem();\n\t}", "public boolean isLever() {\n return this.type == Type.LEVER;\n }", "public boolean isHuman() {\r\n return human;\r\n }", "public Boolean isWifiEnabled() {\n return (mask / 2) % 2 == 1;\n }", "public IGarmentDriver getSensorDriver() {\n return sensorDriver;\n }", "public boolean isHuman() {\n\t\treturn isHuman;\n\t}", "public boolean isMonitoringDisabled() {\r\n\t\treturn monitoringDisabled;\r\n\t}", "protected boolean isWall2()\n {\n\n if(isTouching(Wall.class)) //&&!isTouching(Door.class))\n return true;\n /*else if(isTouching(Door.class))\n {\n Door d = (Door)getOneIntersectingObject(Door.class);\n if(d.alreadyOpened==false)\n return true;\n else\n return false;\n }*/\n else\n return false;\n }", "boolean hasDeleteSensor();", "public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }", "public boolean isConnecting ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _roboCOM!=null;\r\n\t\t}\r\n\t}", "public interface MicroUSB {\n void isMicroUsb();\n}", "private boolean isWificonnected(){\n\t\tConnectivityManager connMgr\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo\n\t\t= connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI); \n\t\tboolean isWifiConn = networkInfo.isConnected();\n\t\treturn isWifiConn;\n\t}", "protected boolean isOnline() {\n\n ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n //check if the connection id wifi or mobile data\n boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;\n\n return isConnected;\n\n }", "boolean isPeripheralAccess();", "public boolean isDetecting()\n\t{\n\t\treturn currentlyDetecting;\n\t}", "@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }", "public boolean isInPlatform() {\n return isInPlatform;\n }", "boolean hasMobileDeviceConstant();", "private Boolean isExternalBackendRunning() {\n\t\ttry {\n\t\t\tHttpResponse response = this.http.get(this.guid);\n\t\t\tif (HTTP.getCode(response) != 200) {\n\t\t\t\tHTTP.release(response);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn HTTP.getString(response).equals(Backend.OUTPUT_GUID);\n\t\t} catch (IOException exception) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isUnknown() {\n return (flags & UNKNOWN) != 0;\n }", "default boolean isInfernoTower() {\n return this instanceof InfernoTower;\n }", "@Override\n public boolean isPhysical() {\n return getViewProvider().isEventSystemEnabled();\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public boolean isOnline() {\n boolean connected = false;\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n connected = true;\n } else {\n connected = false;\n }\n return connected;\n }", "public boolean WifiAvaible() {\n boolean Wifi = false;\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo NI : netInfo) {\n if (NI.getTypeName().equalsIgnoreCase(\"WIFI\")){\n if (NI.isConnected()){\n Wifi = true;\n }\n }\n }\n return Wifi;\n }" ]
[ "0.6733534", "0.6572921", "0.61927825", "0.61068225", "0.6091463", "0.6052026", "0.5951177", "0.59365267", "0.59364516", "0.5934271", "0.59256035", "0.58985853", "0.5878154", "0.5829469", "0.5815663", "0.5778047", "0.5747934", "0.5747222", "0.5722536", "0.5696381", "0.56371397", "0.5636647", "0.5528552", "0.5510172", "0.5502975", "0.54618865", "0.54450566", "0.5431079", "0.54305", "0.54138994", "0.5403521", "0.540217", "0.53963965", "0.5384726", "0.5382844", "0.53628254", "0.53558016", "0.5355371", "0.53421605", "0.53421605", "0.53352785", "0.5329031", "0.53236544", "0.5314919", "0.5298676", "0.5286398", "0.52658314", "0.5259267", "0.52495307", "0.5228006", "0.5228006", "0.5207494", "0.5205809", "0.5179279", "0.5160947", "0.515994", "0.5153925", "0.5141583", "0.5140103", "0.5135424", "0.5133421", "0.51188064", "0.5118382", "0.51149094", "0.51127404", "0.51095074", "0.51093125", "0.5108807", "0.51080894", "0.510745", "0.51047635", "0.5095921", "0.5087938", "0.5078919", "0.50788224", "0.5075322", "0.50751644", "0.5071618", "0.50703895", "0.5065784", "0.5063975", "0.5057437", "0.50553465", "0.50544184", "0.5050886", "0.5034437", "0.503181", "0.5019625", "0.5017736", "0.5012417", "0.50093", "0.50025326", "0.50018436", "0.49977133", "0.49951646", "0.49941134", "0.49940425", "0.498988", "0.49881533", "0.49869484" ]
0.85729426
0
returns if the sensor is enabled.
public boolean isEnabled() { return isEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}", "public boolean isEnable() {\n return _enabled;\n }", "public boolean isEnabled()\n {\n return mSettings.getBoolean(ENABLED, true);\n }", "public boolean isEnable() {\n return enable;\n }", "public Boolean isEnable() {\n\t\treturn enable;\n\t}", "public Boolean isEnable() {\n return this.enable;\n }", "final public boolean isEnabled() {\n return enabledType!=ENABLED_NONE;\n }", "boolean hasEnabled();", "public static boolean isEnabled()\n\t{\n\t\treturn App.getSPAPI().getBool(SPKey.ENABLED);\n\t}", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}", "public java.lang.Boolean getEnabled() {\n return enabled;\n }", "public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}", "public boolean isEnabled()\r\n\t{\r\n\t\treturn enabled;\r\n\t}", "public boolean getEnabled() {\n\t\treturn mCurrentState != STATE.DISABLED;\n\t}", "public boolean isEnabled ( ) {\r\n\t\treturn enabled;\r\n\t}", "public boolean isEnabled() {\n\t\treturn enabled;\n\t}", "public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public boolean enabled() {\n return m_enabled;\n }", "public boolean isEnabled() {\n return mBundle.getBoolean(KEY_ENABLED, true);\n }", "public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }", "public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }", "boolean isMonitoringEnabled();", "public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}", "public Boolean getIsEnable() {\n\t\treturn isEnable;\n\t}", "public String getEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public boolean getEnabled() {\n return enabled;\n }", "public boolean isEnabled(){\n\t\treturn mEnabled;\n\t}", "public boolean enabled(){\n return enabled;\n }", "public Boolean getEnabled() {\r\n return enabled;\r\n }", "public Boolean getEnabled() {\n return enabled;\n }", "public Boolean getEnabled() {\n return this.enabled;\n }", "public Boolean getEnabled() {\n return this.enabled;\n }", "public boolean isEnabled() {\n for (Transmitter t : getTransmitters()) {\n if (t.getTxStatus() == TxStatus.ENABLED) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isLockerEnable(){\n return getBooleanValue(KEY_LOCKER_ENABLE);\n }", "public boolean isEnabled() {\n\n return enabled;\n }", "public Boolean isEnabled() {\r\r\n\t\treturn _isEnabled;\r\r\n\t}", "public boolean isEnabled() {\r\n return enabled;\r\n }", "public boolean isEnabled() {\r\n return enabled;\r\n }", "public boolean isEnabled() {\n return myEnabled;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public Boolean enabled() {\n return this.enabled;\n }", "public boolean isEnabled() {\r\n return m_enabled;\r\n }", "public boolean isEnabled() {\n return mEnabled;\n }", "public boolean isEnabled() {\n return mEnabled;\n }", "protected boolean registerSensor() {\n final android.hardware.Sensor sensor = mSensorConfig.getUnderlyingSensor();\n final int reportingDelay = mSensorConfig.getReportingDelayUs();\n final int samplingDelay = mSensorConfig.getSamplingDelayUs();\n final SensorManager sensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n isRegistered = sensorManager.registerListener(this, sensor, samplingDelay, reportingDelay);\n return isRegistered;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public String getIsEnable() {\n return isEnable;\n }", "public static boolean isEnabled() {\n return true;\n }", "public boolean isGpsEnable() {\r\n\t\treturn lm.isProviderEnabled(LocationManager.GPS_PROVIDER);\r\n\t}", "public String isEnabled() {\n return this.isEnabled;\n }", "public boolean isEnabled() {\n return m_Enabled;\n }", "public Boolean getEnable() {\n\t\treturn enable;\n\t}", "public Boolean getEnable() {\n return this.enable;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "public Boolean isEnabled() {\n return this.isEnabled;\n }", "public Boolean enable() {\n return this.enable;\n }", "public boolean IsAvailable()\n\t{\n\t\treturn mbHasAccelerometer;\n\t}", "public boolean isMonitoringEnabled(){\n return (selectorThread != null ?\n selectorThread.isMonitoringEnabled() : false);\n }", "public boolean isSaddled() {\n\t\treturn dataManager.get(DATA_SADDLED);\n\t}", "public boolean isEnabled () {\n return impl.isEnabled ();\n }", "public static boolean enableVolumeMonitoring() {\r\n return enableVolumeMonitoring.getValue();\r\n }", "public Boolean getEnable() {\n return enable;\n }", "public boolean isEnabled() { return _enabled; }", "@Override\n\tpublic boolean isEnabled() {\n\t\treturn this.enabled;\n\t}", "public boolean getEnabled() throws IllegalStateException\n {\n return audioEffect.getEnabled();\n }", "public boolean isEnabled() { return this.myEnabled; }", "public boolean isEnabled(){\n return enabled;\n }", "public Boolean getEnable() {\n return enable;\n }", "private boolean isGPSconnected() {\n \tLocationManager manager\n \t= (LocationManager) getSystemService(Context.LOCATION_SERVICE );\n \tboolean gpsStatus\n \t= manager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n \treturn gpsStatus;\n }", "java.lang.String getEnabled();", "public boolean locationSettingsEnabled() {\n \tif (mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)\n \t\t\t&& mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public boolean enabled()\n {\n return binLog != null;\n }", "private boolean isEnabled() {\n return isEnabled;\n }", "public boolean isEnabled() {\n return enabled;\n }", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "public boolean getVibrationEnabled() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n return prefs.getBoolean(\"vibration_switch\", true);\n }" ]
[ "0.88131565", "0.75024396", "0.74884915", "0.7418108", "0.738713", "0.7384159", "0.73475146", "0.7257556", "0.72510046", "0.7198806", "0.7198806", "0.7198806", "0.7100127", "0.70806545", "0.7059046", "0.7041027", "0.7034546", "0.69965005", "0.6996422", "0.6987852", "0.6987852", "0.6975036", "0.6968981", "0.6964338", "0.6952192", "0.6945676", "0.69237936", "0.6921075", "0.6913558", "0.690655", "0.688344", "0.68752354", "0.6874798", "0.68721485", "0.6868278", "0.6868278", "0.6861506", "0.6861466", "0.6855385", "0.6844792", "0.6836778", "0.6836778", "0.6834062", "0.6830692", "0.6830692", "0.6830692", "0.6820238", "0.6816908", "0.68144614", "0.68144614", "0.6791783", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.67901844", "0.6770771", "0.67682505", "0.6765665", "0.6760857", "0.67425996", "0.67374665", "0.6733184", "0.66970336", "0.66970336", "0.66761893", "0.66571975", "0.6645924", "0.66379076", "0.6632808", "0.66271746", "0.66256285", "0.6610224", "0.65973145", "0.6589018", "0.6570323", "0.6565084", "0.65637577", "0.65532184", "0.6546152", "0.65459585", "0.6526795", "0.6524422", "0.651986", "0.6519421", "0.6511567", "0.65107155", "0.65107155", "0.65107155", "0.65107155", "0.65107155", "0.65107155", "0.65107155", "0.65107155", "0.65006" ]
0.659572
79
sets the enabled status to the given value. => enables or disables the sensor
public void setEnabled(boolean newValue) { this.isEnabled = newValue; if (newValue) { if (isInternalSensor) { InternalSensors.getInstance().enableInternalSensor(this); } else { // TODO: enable external sensors } } else { saveSensor(); if (isInternalSensor) { InternalSensors.getInstance().disableInternalSensor(this); } else { // TODO: disable external sensors } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public void setEnabled(boolean value) {\n this.enabled = value;\n }", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "final public void setEnabled(int value) {\n enabledType = value;\n }", "final public void setEnabled(boolean value) {\n enabledType = value ? ENABLED_ANY : ENABLED_NONE;\n }", "public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }", "public boolean setEnabled(boolean enable);", "public void onboard_control_sensors_enabled_SET(@MAV_SYS_STATUS_SENSOR int src)\n { set_bits(- 1 + src, 26, data, 178); }", "@Override\n public void setEnabled(boolean val) {\n super.setEnabled(val);\n mEnabled = val;\n }", "public void setEnabled(UIEvent.Type aType, boolean aValue) { getEventAdapter(true).setEnabled(aType, aValue); }", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "public void enable() {\r\n m_enabled = true;\r\n }", "@SimpleFunction(description = \"Enable screen status sensor to run once\")\n @Override\n\tpublic void Enabled(boolean enabled) {\n\t\t// TODO Auto-generated method stub\n\t\tif (this.enabled != enabled)\n\t\t\tthis.enabled = enabled;\n\n\t\tif (enabled) {\n\t\t\tprobe.registerListener(listener);\n\t\t\tLog.i(TAG, \"register listener for run-once\");\n\t\t} else {\n\t\t\tprobe.unregisterListener(listener);\n\t\t\tLog.i(TAG, \"unregister run-once listener\");\n\t\t}\n\t\t\n\t}", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "public void setEnabled(final boolean enabled);", "public static void ToggleEnabled()\n {\n \t\tEnabled = !Enabled;\n \t\tConfigHandler.configFile.save();\n \t \t\n }", "private void updateEnabledState() {\n updateEnabledState(spinner, spinner.isEnabled()); }", "@Override public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n\n m_globalEnabled = enabled;\n checkEnabled();\n }", "@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }", "private void enableNextSensor(BluetoothGatt gatt) {\n BluetoothGattCharacteristic characteristic;\n switch (mState) {\n case 0:\n Log.d(TAG, \"Enabling pressure cal\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_CONFIG_CHAR);\n characteristic.setValue(new byte[] {0x02});\n break;\n case 1:\n Log.d(TAG, \"Enabling pressure\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_CONFIG_CHAR);\n characteristic.setValue(new byte[] {0x01});\n break;\n case 2:\n Log.d(TAG, \"Enabling humidity\");\n characteristic = gatt.getService(HUMIDITY_SERVICE)\n .getCharacteristic(HUMIDITY_CONFIG_CHAR);\n characteristic.setValue(new byte[] {0x01});\n break;\n default:\n mHandler.sendEmptyMessage(MSG_DISMISS);\n Log.i(TAG, \"All Sensors Enabled\");\n return;\n }\n\n gatt.writeCharacteristic(characteristic);\n }", "public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}", "public void setEnabled(boolean enabled);", "public void setEnabled(boolean enabled);", "public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}", "public void setEnabled(boolean enabled) {\n\t\tthis.enabled = enabled;\n\t\tfireChange();\n\t}", "boolean updateEnabling();", "public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "public void setEnabled(boolean arg){\r\n\t\tenabled = arg;\r\n\t\tif(!arg){\r\n\t\t\tstop(0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsonido = new Sonido(path,true);\r\n\t\t}\r\n\t}", "public void setEnabled(boolean enabled) {\r\n\t}", "public final void setEnabled( boolean enabled )\n {\n this.enabled = enabled;\n }", "public void onEnabled() {\r\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(boolean enabled) {\n mEnabled = enabled;\n }", "public void setEnable(String name,boolean value) {\n\t\tgetButtonPanel().getButton(name).setEnabled(value);\n\t\tgetGameMenuBar().getItem(name).setEnabled(value);\n\t}", "public void setSensorOn() {\n\n }", "public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}", "public void setEnabled(boolean enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}", "public void setEnabled(String enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}", "public abstract void setEnabled(Context context, boolean enabled);", "public void enable() {\n disabled = false;\n updateSign(true);\n circuit.enable();\n notifyChipEnabled();\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "public void enableLime(LimeState val);", "@Override\n public void setEnabled(boolean enabled) {\n }", "@Override\n public void enable() {\n if (!sensorEnabled) {\n //Log.d(TAG, \"start app tracking\");\n sensorEnabled = true;\n new AppObserver().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }", "public void toggleEnable();", "@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}", "public void setEnable(Boolean enable) {\n this.enable = enable;\n }", "public Builder setEnabled(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n enabled_ = value;\n onChanged();\n return this;\n }", "private void disableSensor() {\n if (DEBUG) Log.w(TAG, \"<<< Sensor \" + getEmulatorFriendlyName() + \" is disabled.\");\n mEnabledByEmulator = false;\n mValue = \"Disabled by emulator\";\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public void enable() {\n\t\tenabled = true;\n\t\t//System.out.println(\"Enabled Controller\");\n\t}", "public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }", "public void setDataSwitchEnable(boolean bEnable){\n mDataSwitch = bEnable;\n }", "public void setEnable (boolean state) {\n impl.setEnable (state);\n }", "public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}", "public void setEnable(Boolean enable) {\n this.enable = enable;\n }", "@Override\n \t\tpublic void onWrite(int value) {\n \t\t\tboolean temp = (value & 0x80) == 0x80;\n \t\t\tif (temp != CPU.NMIEnable) {\n \t\t\t\tCPU.NMIEnable = temp;\n \t\t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\t\tif(CPU.NMIEnable)\n \t\t\t\t\t\tLog.debug(\"Enabling NMI interrupts\");\n \t\t\t\t\telse\n \t\t\t\t\t\tLog.debug(\"Disabling NMI interrupts\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// IRQEnable\n \t\t\tCPU.irqEnable = (value >> 4) & 0x03;\n \t\t\tLog.debug(\"IRQ Enable set to \" + CPU.irqEnable);\n \t\t\t\n \t\t\t// Standard Controller Enable\n \t\t\tCPU.standardControllerRead = (value & 0x01) != 0;\n \t\t\tif (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {\n \t\t\t\tif(CPU.standardControllerRead)\n \t\t\t\t\tLog.debug(\"Enabling automatic reading of standard controller\");\n \t\t\t\telse\n \t\t\t\t\tLog.debug(\"Disabling automatic reading of standard controller\");\n \t\t\t}\n \t\t}", "public void enable();", "public void setEnabled(java.lang.Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnable(Boolean enable) {\n\t\tthis.enable = enable;\n\t}", "public void setEnable(Boolean enable) {\n this.enable = enable;\n }", "public void setEnabledLevel(int level)\r\n {\r\n this.enabled = level;\r\n }", "public void setEnable(boolean enable) {\n this.enable = enable;\n }", "public abstract void Enabled();", "public void setEnabled(boolean enabled) {\n synchronized (mBinder) {\n if (mEnabled == enabled) {\n return;\n }\n\n mEnabled = enabled;\n }\n\n ILocationProviderManager manager = mManager;\n if (manager != null) {\n try {\n manager.onSetEnabled(mEnabled);\n } catch (RemoteException | RuntimeException e) {\n Log.w(mTag, e);\n }\n }\n }", "public abstract void setSensorState(boolean state);", "public void enable(){\n if(criticalStop) return;\n getModel().setStatus(true);\n }", "public void setEnable(Boolean enable) {\n\t\tthis.enable = enable;\n\t}", "public void setEnabled(final boolean theFlag) {\n myEnabled = theFlag;\n }", "protected void setEnabled(boolean state) {\n enabled = state;\n log.warn(\"{} command has been {}.\", name, state ? \"enabled\" : \"disabled\");\n }", "public void enable() {\n\t\tif (!permanent) {\n\t\t\tenabled = true;\n\t\t\trect.setColor(c);\n\t\t}\n\t}", "public void setEnabled(boolean enabled) {\n synchronized (mLock) {\n Slog.i(TAG, \"Explicit health checks \" + (enabled ? \"enabled.\" : \"disabled.\"));\n mEnabled = enabled;\n }\n }", "public synchronized void setEnabled(boolean enabled) {\n \t\t\tlistenerEnabled = enabled;\n \t\t}", "public abstract void onEnable();", "@ReactMethod\n public void setEnabled(Boolean enabled) {\n wifi.setWifiEnabled(enabled);\n }", "public void enableSensors(boolean enable) \n\t{\n\t\tif( enable ) {\n\t\t\t// set negative loop count, to discard first few samples\n\t\t\tiAccelCount = -3;\n\t\t\tlastSampleTime = -1;\n\t\t\tgravity=null;\n\t\t\tsavedGravity=null;\n\t\t\tsensorMan.registerListener(this, accel,\tSensorManager.SENSOR_DELAY_GAME);\n\t\t\tsensorMan.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL);\n\t\t}\n\t\telse {\n\t\t\tsensorMan.unregisterListener(this);\n\t\t}\n\t}", "public void enable() {\n\t\tm_enabled = true;\n\t\tm_controller.reset();\n\t}", "@Override\n\t\t\tprotected void updateEnabled() {\n\t\t\t}", "public final void setDisabled(boolean value)\n {\n myDisabledProperty.set(value);\n }", "@Override\r\n\tpublic void enable() {\n\t\tcurrentState.enable();\r\n\t}", "void setShutterLEDState(boolean on);", "public void setEnabled (boolean enabled) {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\tint flags = enabled ? 0 : OS.Pt_BLOCKED | OS.Pt_GHOST;\r\n\tOS.PtSetResource (topHandle, OS.Pt_ARG_FLAGS, flags, OS.Pt_BLOCKED | OS.Pt_GHOST);\r\n}", "void enable();", "public void onEnable() {\n }", "public void enableUpdates(boolean state) {\n sEnableUpdate = state;\n }", "boolean getEnabled();", "boolean getEnabled();" ]
[ "0.7502934", "0.73789626", "0.72711444", "0.72121584", "0.71503776", "0.71324766", "0.7007123", "0.6983052", "0.6958566", "0.6931558", "0.69236296", "0.68367946", "0.6834298", "0.68095857", "0.68095857", "0.68095857", "0.68095857", "0.678912", "0.67839646", "0.6750968", "0.6749736", "0.67456436", "0.67395663", "0.672459", "0.67191046", "0.67191046", "0.67020345", "0.6651646", "0.66489065", "0.66194975", "0.65823174", "0.65823174", "0.65763074", "0.6564291", "0.65517145", "0.6546975", "0.6545528", "0.65206355", "0.6512268", "0.6512268", "0.6512268", "0.6512268", "0.6505774", "0.6503767", "0.6499634", "0.64963937", "0.64891964", "0.6483003", "0.64743876", "0.6466999", "0.6462738", "0.6462738", "0.6462738", "0.6462738", "0.6462738", "0.64517725", "0.6442365", "0.6429435", "0.641601", "0.6402389", "0.63875496", "0.6381644", "0.6367255", "0.6357111", "0.635441", "0.63410425", "0.6326353", "0.63130355", "0.6293286", "0.6291511", "0.6286813", "0.6282577", "0.62799287", "0.6275209", "0.62700367", "0.625898", "0.6236446", "0.62320983", "0.62253135", "0.62146074", "0.61906016", "0.6182573", "0.6162916", "0.6147027", "0.6141054", "0.6134347", "0.61340654", "0.6133329", "0.6127854", "0.61260086", "0.6122818", "0.6110768", "0.61064875", "0.61018056", "0.6100273", "0.60939246", "0.60936576", "0.6082826", "0.6080501", "0.6080501" ]
0.73488986
2
adds tje given sensorData to rawData. If rawData > savePeriod the data will be saved to the Storage and rawData will be cleared.
public synchronized void addRawData (SensorData sensorData) { if (!isEnabled) { return; } rawData.add(sensorData); GarmentOSService.callback(CallbackFlags.VALUE_CHANGED, new ValueChangedCallback(sensorData.getLongUnixDate(), sensorData.getData())); if (rawData.size() > savePeriod) { saveSensor(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "private void saveGyroData(float axis_x, float axis_y, float axis_z, long timestamp){\n //Log.v(TAG, \"saveGyroData:: axis_x: \"+axis_x+\" axis_y: \"+axis_y+\" axis_z: \"+axis_z);\n //SensorData sensorData = new SensorData(axis_x, axis_y, axis_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(axis_x, axis_y, axis_z, Util.getTimeMillis(timestamp));\n listGyroData.add(sensorData);\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "private void add(GyroReading gyroReading) {\n m_gyroData.addFirst(gyroReading);\n\n try {\n while (gyroReading.timeStamp - (m_gyroData.get(m_gyroData.size() - 2).timeStamp) >= m_minimumRecordTime) {\n m_gyroData.removeLast();\n }\n } catch (Exception NoSuchElementException) {\n\n }\n }", "public abstract void recordSensorData(RealmObject sensorData);", "public void addToBuffer(String filename, SensorData sensorData){\n ObjectOutputStream outstream;\n try {\n File bufferFile = new File(filename);\n //Checks to see if the buffer file already exists. \n if(bufferFile.exists())\n {\n //Create an AppendableObjectOutputStream to add the the end of the buffer file as opposed to over writeing it. \n outstream = new AppendableObjectOutputStream(new FileOutputStream (filename, true));\n } else {\n //Create an ObjectOutputStream to create a new Buffer file. \n outstream = new ObjectOutputStream(new FileOutputStream (filename)); \n }\n //Adds the SensorData to the end of the buffer file.\n outstream.writeObject(sensorData);\n outstream.close();\n } catch(IOException io) {\n System.out.println(io);\n }\n }", "private void sendData(SensorData sensorData) {\n EventMessage message = new EventMessage(EventMessage.EventType.RECEIVED_RAW_DATA);\n message.setSensorData(sensorData);\n EventBus.getDefault().post(message);\n }", "private void saveSamples(boolean charging, long diffTime) {\n int sampleIndex = store.getInt(charging ? chargingSampleId : disChargingSampleId, -1);\n\n //starts with id 1 in database\n if (sampleIndex == -1)\n sampleIndex = 1;\n //only maximum of 10 samples required.\n if (sampleIndex > 10)\n sampleIndex = 1;\n\n if (!charging) {\n dischargingSampleViewModel.insert(new DischargingSampleModel(sampleIndex, diffTime));\n } else {\n chargingSampleViewModel.insert(new ChargingSampleModel(sampleIndex, diffTime));\n }\n logStatic(\"New sample found for \" +\n (charging ? \"charging\" : \"discharging\") + \" at level \" +\n store.getInt(bat_level) + \" id \" + sampleIndex);\n\n //increment the sample id\n store.setInt(charging ? chargingSampleId : disChargingSampleId, 1 + 1);\n }", "public void update(String filename, SensorData sensorData){\n //Adds the sensor data to the buffer. \n addToBuffer(filename, sensorData);\n \n //Uploads the data to the server if it's turned on. \n if (Server.getInstance().getServerIsOn())\n if(uploadData()){\n //If the upload was successful, clear the buffer.\n clearBuffer();\n }\n }", "private void addOrReplaceDataSeries() {\n int chartMode;\n try {\n m_pLock.lock();\n chartMode = mChartMode;\n } finally {\n m_pLock.unlock();\n }\n\n if (m_pLineChart.getData().size() > 0) {\n m_pLineChart.getData().clear();\n }\n\n switch (chartMode) {\n case CHART_MODE_2_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_2SEC);\n m_pLineChart.getData().add(m_pDataSeries2_2SEC);\n m_pLineChart.getData().add(m_pDataSeries3_2SEC);\n break;\n case CHART_MODE_10_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_10SEC);\n m_pLineChart.getData().add(m_pDataSeries2_10SEC);\n m_pLineChart.getData().add(m_pDataSeries3_10SEC);\n break;\n case CHART_MODE_30_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_30SEC);\n m_pLineChart.getData().add(m_pDataSeries2_30SEC);\n m_pLineChart.getData().add(m_pDataSeries3_30SEC);\n break;\n case CHART_MODE_5_MINUTES:\n m_pLineChart.getData().add(m_pDataSeries1_5MIN);\n m_pLineChart.getData().add(m_pDataSeries2_5MIN);\n m_pLineChart.getData().add(m_pDataSeries3_5MIN);\n break;\n default:\n break;\n }\n\n m_pXAxis.setDisable(true);\n int chartRange;\n int tickUnit;\n ObservableList<XYChart.Data<Number, Number>> observableList1, observableList2, observableList3;\n switch (mChartMode) {\n case CHART_MODE_2_SECONDS:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n case CHART_MODE_10_SECONDS:\n observableList1 = m_pDataSerieObservableList1_10SEC;\n observableList2 = m_pDataSerieObservableList2_10SEC;\n observableList3 = m_pDataSerieObservableList3_10SEC;\n chartRange = X_AXIS_RANGE_10_SECOND_MODE;\n tickUnit = X_AXIS_TICK_10_SECOND_MODE;\n break;\n case CHART_MODE_30_SECONDS:\n observableList1 = m_pDataSerieObservableList1_30SEC;\n observableList2 = m_pDataSerieObservableList2_30SEC;\n observableList3 = m_pDataSerieObservableList3_30SEC;\n chartRange = X_AXIS_RANGE_30_SECOND_MODE;\n tickUnit = X_AXIS_TICK_30_SECOND_MODE;\n break;\n case CHART_MODE_5_MINUTES:\n observableList1 = m_pDataSerieObservableList1_5MIN;\n observableList2 = m_pDataSerieObservableList2_5MIN;\n observableList3 = m_pDataSerieObservableList3_5MIN;\n chartRange = X_AXIS_RANGE_5_MINUTE_MODE;\n tickUnit = X_AXIS_TICK_5_MINUTE_MODE;\n break;\n default:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n }\n\n if (observableList1.isEmpty() == false && observableList2.isEmpty() == false && observableList3.isEmpty() == false) {\n double maxValue = Math.max(Math.max(observableList1.get(observableList1.size() - 1).getXValue().doubleValue(),\n observableList2.get(observableList1.size() - 1).getXValue().doubleValue()),\n observableList3.get(observableList1.size() - 1).getXValue().doubleValue());\n double newLowerBound = maxValue - chartRange;\n double newUpperBound = maxValue;\n m_pXAxis.setLowerBound(newLowerBound);\n m_pXAxis.setUpperBound(newUpperBound);\n m_pXAxis.setTickUnit(tickUnit);\n m_pXAxis.setDisable(false);\n }\n \n // Update if there is some data series which is not to be plotted\n boolean toPlotDataSeries1 = mToPlotDataSeries1;\n boolean toPlotDataSeries2 = mToPlotDataSeries2;\n boolean toPlotDataSeries3 = mToPlotDataSeries3;\n mToPlotDataSeries1 = true;\n mToPlotDataSeries2 = true;\n mToPlotDataSeries3 = true; \n switchDataSeriesStatus(1, toPlotDataSeries1);\n switchDataSeriesStatus(2, toPlotDataSeries2);\n switchDataSeriesStatus(3, toPlotDataSeries3);\n \n\n }", "public boolean insertData(TransformStorage newData) { \n// // check if data is older than first frame in STORAGE - maxStorageTime\n// if (!storage.isEmpty() && storage.firstKey() - maxStorageTime > newData.getTimeStamp()) {\n// return false; \n// }\n \n storage.put(newData.getTimeStamp(), newData); \n \n removeOldData(); // same as pruneList in time_cache.h \n return true;\n }", "public void recordSensors2(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n\t\t\t\t\tSystem.out.println(\"OdTheta\" + sd.getOdTheta());\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getOdLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getOdTheta())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getOdLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getOdTheta()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n \n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "public synchronized void addData(Object[] data) throws IOException {\n\t\tif (! stopped){\n\t\t\tsampleCount.add(incr);\n\t\t\tString sampleCountString = sampleCount.toString();\n\t\t\trealWriter.write(sampleCountString + \";\" + ((Integer)data[0]).toString() + \"\\n\");\n\n//\t\t\tdos.writeChars(sampleCountString);\n//\t\t\tdos.writeChar(';' );\n//\t\t\tdos.writeChars((((Integer)data[0]).toString()));\n//\t\t\tdos.writeChar('\\n' );\n\t\t}\n\t}", "private void processHeartRateData(SensorEvent event){\n //interval between two data entry should be min SENSOR_DATA_MIN_INTERVAL\n if ((event.timestamp - lastUpdatePPG) < SENSOR_DATA_MIN_INTERVAL_NANOS) {\n return;\n }\n lastUpdatePPG = event.timestamp;\n long timestamp = Util.getStartTime() + event.timestamp/Const.NANOS_TO_MILLIS;\n savePPGData(event.values[0], timestamp);\n\n\n }", "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "public int appendData(byte[] data) {\n\t\t\n\t\tsynchronized (mData) {\n\n\t\t\tif (mDataLength + data.length > mData.capacity()) {\n\t\t\t\t//the buffer will overflow... attempt to trim data\n\t\t\t\t\n\t\t\t\tif ((mDataLength + data.length)-mDataPointer <= mData.capacity()) {\n\t\t\t\t\t//we can cut off part of the data to fit the rest\n\t\t\t\t\t\n\t\t\t\t\ttrimData();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//the encoder is gagging\n\t\t\t\t\t\n\t\t\t\t\treturn (mData.capacity() - (mDataLength + data.length)); // refuse data and tell the amount of overflow\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmData.position(mDataLength);\n\t\t\tmData.put(data);\n\n\t\t\tmDataLength += data.length;\n\t\t\t\n\t\t\tstart(); //if idle\n\t\t\t\n\t\t\treturn (mData.capacity() - mDataLength); //return the remaining amount of space in the buffer\n\t\t}\n\t}", "private void saveData( ) throws IOException {\n \tString FILENAME = \"data_file\";\n String stringT = Long.toString((SystemClock.elapsedRealtime() - timer.getBase())/1000)+\"\\n\";\n String stringS = textView.getText().toString()+\"\\n\";\n String stringD = Long.toString(System.currentTimeMillis())+\"\\n\";\n FileOutputStream fos;\n\t\ttry {\n\t\t\tfos = openFileOutput(FILENAME, Context.MODE_APPEND); //MODE_APPEND\n\t\t\tfos.write(stringS.getBytes());\n\t\t\tfos.write(stringT.getBytes());\n\t\t\tfos.write(stringD.getBytes());\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private synchronized void getRawData (Date begin, Date end, Vector<SensorData> data) {\n for (SensorData sensorData : rawData) {\n if ((sensorData.getDate().before(end) || sensorData.getDate()\n .equals(end))\n && (sensorData.getDate().after(begin) || sensorData\n .getDate().equals(begin))) {\n data.add(sensorData);\n }\n }\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public boolean uploadData(){\n ObjectInputStream instream = null;\n Vector<SensorData> dummyData = new Vector<SensorData>();\n \n try {\n //Tries to create an ObjectInStream for the buffer serialisation file.\n FileInputStream fileinput = new FileInputStream (\"data/buffer.ser\");\n instream = new ObjectInputStream(fileinput);\n \n //Loops through the ObjectInputStream\n do{\n try {\n //Tries to get an object from the ObjectInputStream\n SensorData newData = (SensorData)instream.readObject();\n //Adds the data to the Vector<SensorData> if not null.\n if (newData != null)\n dummyData.add(newData);\n } catch(ClassNotFoundException ex) {\n //Caught Exception if the instream.readObject() isn't of type SensorData\n System.out.println(ex);\n }\n } while (true);\n } catch(IOException io) {\n //Caught Exception if the instream.readObject found the end of the file or failed to create the instream\n System.out.println(io); \n }\n \n try {\n //Tries to colse the instream.\n instream.close();\n } catch (IOException ex) {\n System.out.println(ex); \n }\n \n if (dummyData.size() > 0){\n //if there was any SensorData found in the Buffer add it to the Server. \n Server.getInstance().addData(dummyData, id);\n return true;\n } else {\n //Otherwise something went wrong or there was no SensorData to add so return false.\n return false;\n }\n \n \n }", "public void update(long timestamp, double[] data)\n { \n \tlock.AcquireWrite();\n \ttry {\n \t\tif (timestamp > time) {\n \t\t\tif (this.data == null)\n \t\t\t\tthis.data = new double[data.length];\n \t\t\ttime = timestamp;\n \t\t\tfor (int i=0; i<data.length;++i)\n \t\t\t\tthis.data[i]= data[i];\n \t\t}\n \t}\n \tfinally{\n \t\tlock.ReleaseWrite();\n \t}\n }", "public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n for (int i = 0; i < 40; i++) { \n Double reactorValue = reactorAmplitude * Math.sin(2 * Math.PI * reactorFrequency * ((double) i * 5 / 10000) + reactorPhase);\n Double controlValue = controlAmplitude * Math.sin(2 * Math.PI * controlFrequency * ((double) i * 5 / 10000) + controlPhase);\n if (reactorValue + controlValue > 150) {\n this.outputData.get(0).getData().get(i).setYValue(149);\n overshoot = true;\n } else if (reactorValue + controlValue < -150) {\n this.outputData.get(0).getData().get(i).setYValue(-149);\n overshoot = true;\n } else {\n this.outputData.get(0).getData().get(i).setYValue(reactorValue + controlValue);\n }\n if (this.online == true) {\n this.rmsSum = this.rmsSum + Math.pow(reactorValue + controlValue, 2);\n }\n }\n calculateOutputPower();\n checkForInstability(overshoot);\n }", "private void saveAccelerometerData(float acc_x, float acc_y, float acc_z, long timestamp){\n //Log.v(TAG, \"saveAccelerometerData:: acc_x: \"+acc_x+\" acc_y: \"+acc_y+\" acc_z: \"+acc_z);\n //SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(timestamp));\n listAccelData.add(sensorData);\n }", "public SensorData getLastSensorData() {\n if (mSensorData.size() > 0) {\n for (SensorData sensorData : mSensorData) {\n if (sensorData.isDatasetComplete()) {\n return sensorData;\n }\n }\n }\n return null;\n }", "private void UI_RefreshSensorData ()\r\n\t{\r\n\t\t\t\t\r\n\t\tlong now = System.currentTimeMillis();\r\n\t\t\r\n\t\tif (now-ts_last_rate_calc>1000)\r\n\t\t{\r\n\t\t\tsensor_event_rate=last_nAccVal/((now-ts_last_rate_calc)/1000.0);\r\n\t\t\tts_last_rate_calc=now;\r\n\t\t}\r\n\t}", "public void addSensor(String sensorId, String sensorType, String sensorUnits, int interval, int threshold, boolean upperlimit){\n Sensor theSensor = new Sensor(sensorId, sensorType, sensorUnits, interval, threshold, upperlimit);\n sensors.addSensor(theSensor);\n theSensor.setFieldStation(this);\n }", "private void processGyroData(SensorEvent event){\n //interval between two data entry should be min SENSOR_DATA_MIN_INTERVAL which is millis\n if ((event.timestamp - lastUpdateGyro) < SENSOR_DATA_MIN_INTERVAL_NANOS) { //multiply to convert to millis from nanos\n return;\n }\n\n\n float[] values = event.values;\n\n float axis_x = values[0];\n float axis_y = values[1];\n float axis_z = values[2];\n\n //float gyroscopeRotationVelocity = (float)Math.sqrt(axis_x * axis_x + axis_y * axis_y + axis_z * axis_z);\n //magnitude of gyroscope reading thresholded\n\n //if(gyroscopeRotationVelocity > EPSILON){\n lastUpdateGyro = event.timestamp;\n long timestamp = Util.getStartTime() + event.timestamp/Const.NANOS_TO_MILLIS;\n saveGyroData(axis_x, axis_y, axis_z, timestamp);\n //}\n }", "private void saveSensorData(InetAddress address, int port, Product product, int length){\n sensorDatas.add(new SensorData(product,port,address,length));\n\n if(isHere(port,address,product.getNameOfProduct())){\n update(port,address,product);\n }else{\n actualSensorDatas.add(new SensorData(product,port,address,length));\n }\n }", "private void populateSensorData(String name, long timeStamp, float x, float y, float z) {\n //Log.d(CLASS_NAME,sensorData.toString());\n\n //Appending the key and Co-ordinates\n logValues.append(name).append(\";\").append(timeStamp).append(\";\").append(pressedKey).append(\";\")\n .append(coordinateX).append(\";\").append(coordinateY).append(\";\").append(x).append(\";\")\n .append(y).append(\";\").append(z).append(\"\\r\\n\");\n\n }", "public void logSensorData () {\n\t}", "public void recordSensors(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\tSystem.out.println(\"Yaw\" + sd.getYaw());\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getYaw())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getYaw()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n int drawline1 = (int)Math.round((sd.getLocationX() * scale) + width/2);\n int drawline2 = (int)Math.round((sd.getLocationY() * scale) + height/2);\n g2d.setColor(Color.green);\n g2d.drawLine(drawline1, drawline2, x, y);\n g2d.setColor(Color.black);\n g2d.fillRect(x,y,2,2);\n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "public void putMarketData(RawData rawData) {\n\t\t\n\t\t//raw data can have multiple market change messages (must have at least one)\n\t\tif (rawData.getMc().size() < 1) {\n\t\t\tSystem.out.println(\"ERROR: no mc in \" + rawData.getOp() + \n\t\t\t\t\t\", pt = \" + rawData.getPt() + \n\t\t\t\t\t\", clk = \" + rawData.getClk());\n\t\t\tRuntime.getRuntime().halt(0);\n\t\t}\n\n\t\t//not all have marketDefinition but all have id, check it against blacklist\n\t\tfor (Mc mc : rawData.getMc()) {\n\t\t\tif (!nonMarketData.containsKey(mc.getId())) {\n\t\t\t\t\n\t\t\t\t//copy non-null fields to attributes\n\t\t\t\tMarketData newMarketData = copyFrom(marketData.get(mc.getId()), mc, rawData.getPt());\n\n\t\t\t\tif (mc.getId().contains(Test.FORENSIC)) {\n\t\t\t\t\tUtils.prettilyPrint(newMarketData, null);\n\t\t\t\t}\n\n\t\t\t\t//if not a market in which we are not interested in\n\t\t\t\tif (newMarketData != null) {\n\t\t\t\t\tmarketData.put(mc.getId(), newMarketData);\n\t\t\t\t} else {\n\t\t\t\t\tmarketData.remove(mc.getId());\n\t\t\t\t\tnonMarketData.put(mc.getId(), mc.getMarketDefinition().getMarketType());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void addToSamples(short[] data) throws SoundOverflowException {\n\t\tfor (int i = 0; i < data.length; ++i) {\n\t\t\tdouble scale = 1.0;\n\t\t\tif (i < RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) i / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\t\t\telse if (i > data.length - RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) (data.length - i) / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\n\t\t\tdouble v = compute(i) * scale * amplitude;\n\t\t\t\n\t\t\tif (Short.MAX_VALUE - v < data[i]) { \n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\t\n\t\t\tif (Short.MIN_VALUE + v > data[i]) {\n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\tdata[i] += Math.round(v);\n\t\t}\n\t}", "public void refreshDataPacket() {\n ByteBuf buffer = PacketUtils.writePacket(getFreshFullDataPacket());\n setFullDataPacket(buffer);\n }", "public void addRawDataFile(@NotNull final RawDataFile rawDataFile) {\n\n if (filesAndDataSets.containsKey(rawDataFile)) {\n logger.fine(\"Raw data file \" + rawDataFile.getName() + \" already displayed.\");\n return;\n }\n\n final Scan[] scans = getScanSelection().getMatchingScans(rawDataFile);\n if (scans.length == 0) {\n logger.warning(\n \"No matching scans found in file \\\"\" + rawDataFile.getName() + \"\\\" for scan selection.\");\n return;\n }\n\n Range<Double> rawMZRange =\n (getMzRange() != null && pnChromControls.cbXIC.isSelected()) ? getMzRange()\n : rawDataFile.getDataMZRange();\n\n TICDataSet ticDataset = new TICDataSet(rawDataFile, List.of(scans), rawMZRange, null,\n getPlotType());\n filesAndDataSets.put(rawDataFile, ticDataset);\n chromPlot.addTICDataSet(ticDataset, rawDataFile.getColorAWT());\n\n logger.finest(\"Added raw data file \" + rawDataFile.getName());\n }", "private void appendData() {\n XYDataset tempdata = getDataset();\n\n XYSeriesCollection originaldata = (XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset();\n XYSeriesCollection newdata = (XYSeriesCollection) getDataset();\n\n addToDataSet(newdata, originaldata);\n tempdata = missingSeries(newdata, originaldata);\n\n XYSeriesCollection foo = (XYSeriesCollection) tempdata;\n int n = foo.getSeriesCount();\n for (int i = 0; i < n; i++) {\n originaldata.addSeries(foo.getSeries(i));\n }\n nullMissingPoints((XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset());\n }", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "void add(S3TimeData timeData) {\n assert timeData != null;\n\n synchronized (mux) {\n map.put(timeData.getKey(), timeData);\n\n mux.notifyAll();\n }\n }", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }", "public void addSampleToDB(Sample sensorSample, String TABLE_NAME) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"timestamp\", sensorSample.getTimestamp());\n values.put(\"x_val\", sensorSample.getX());\n values.put(\"y_val\", sensorSample.getY());\n values.put(\"z_val\", sensorSample.getZ());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public synchronized Vector<SensorData> getRawData(int numberOfValues, boolean loadFromStorage) {\n Vector<SensorData> returnData = new Vector<SensorData>();\n if (loadFromStorage && rawData.size() < numberOfValues) {\n SensorDataDeSerializer deSerializer =\n new SensorDataDeSerializer(sensorID, returnData, numberOfValues - rawData.size());\n long id = deSerializer.work();\n while (!SensorDataDeSerializer.jobFinsihed(id)) {}\n returnData.addAll(rawData);\n } else {\n if (rawData.size() <= numberOfValues) {\n return rawData;\n }\n for (int i = rawData.size() - numberOfValues; i < rawData.size(); i++) {\n returnData.add(rawData.get(i));\n }\n }\n return returnData;\n }", "public void init() {\n Log.d(\"in init()\", \"Initializing\");\n prevTime = System.currentTimeMillis();\n sensorListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n timstamps.add(System.currentTimeMillis());\n }\n /*\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n x_g.add(sensorEvent.values[0]);\n y_g.add(sensorEvent.values[1]);\n z_g.add(sensorEvent.values[2]);\n }\n */\n curTime = System.currentTimeMillis();\n// Log.d(\"Time = \", \"\" + (curTime - prevTime) + \" > \" + MIN_TIME);\n if (curTime - prevTime > MIN_TIME) {\n //int minVal = Math.min(x.size(), x_g.size());\n if(isExternalStorageWritable()){\n //writeToFile(x,y,z,x_g,y_g,z_g,minVal);\n writeToFile(x,y,z,timstamps);\n }\n x.clear();\n y.clear();\n z.clear();\n timstamps.clear();\n //x_g.clear();\n //y_g.clear();\n //z_g.clear();\n prevTime = curTime;\n }\n\n /*\n if (x.size() != N_SAMPLES && y.size() != N_SAMPLES && z.size() != N_SAMPLES ){\n x.add(sensorEvent.values[0]);\n y.add(sensorEvent.values[1]);\n z.add(sensorEvent.values[2]);\n }else {\n if(isExternalStorageWritable()){\n writeToFile(x,y,z);\n }\n x.clear();\n y.clear();\n z.clear();\n }\n */\n\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n sensorManager.registerListener(sensorListener,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);\n// sensorManager.registerListener(sensorListener,\n// sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), SensorManager.SENSOR_DELAY_NORMAL);\n\n //Checks if the Accelerometer or Gyroscope sensor is available or not\n if(sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) == null ){\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(R.string.app_name);\n builder.setIcon(R.mipmap.ic_launcher);\n builder.setMessage(\"Accelerometer Sensor is not available, please exit\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n }", "public abstract void recordSensorDataBlockID(SensorDataBlock block);", "public void pushData() {\n\t\t\tFile file = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t+ \"/reverseme.pcm\");\n\t\t\t// Get the length of the audio stored in the file (16 bit so 2 bytes\n\t\t\t// per short)\n\t\t\t// and create a short array to store the recorded audio.\n\t\t\tint audioLength = (int) (file.length() / 2);\n\t\t\taudio = new short[audioLength];\n\n\t\t\ttry {\n\t\t\t\t// Create a DataInputStream to read the audio data back from the\n\t\t\t\t// saved file.\n\t\t\t\tInputStream is = new FileInputStream(file);\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\n\t\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\t\t// Read the file into the music array.\n\t\t\t\tint i = 0;\n\t\t\t\twhile (dis.available() > 0) {\n\t\t\t\t\taudio[i] = dis.readShort();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\t// Close the input streams.\n\t\t\t\tdis.close();\n\n\t\t\t} catch (Throwable t) {\n\t\t\t\tLog.e(\"AudioTrack\", \"Playback Failed\");\n\t\t\t}\n\t\t}", "public synchronized Vector<SensorData> getRawData() {\n return rawData;\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == SENS_ACCELEROMETER && event.values.length > 0) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n latestAccel = (float)Math.sqrt(Math.pow(x,2.)+Math.pow(y,2)+Math.pow(z,2));\n //Log.d(\"pow\", String.valueOf(latestAccel));\n\n }\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy >0) {\n\n Log.d(\"Sensor\", event.sensor.getType() + \",\" + event.accuracy + \",\" + event.timestamp + \",\" + Arrays.toString(event.values));\n\n int newValue = Math.round(event.values[0]);\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n \n if(newValue!=0 && lastTimeSentUnix < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnix = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", latestAccel);\n intent.putExtra(\"TIME\", event.timestamp);\n intent.putExtra(\"ACCEL\", latestAccel);\n\n\n Log.d(\"change\", \"send intent\");\n\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), latestAccel, event.timestamp, event.values);\n }\n }\n\n }", "public void getNextRawSamples( double[] rawBuffer );", "private int syncEnergyData() throws IOException {\n\n // initialize some useful dates\n Calendar today = Calendar.getInstance();\n //today.add(Calendar.MINUTE, -15);\n Calendar year_ago = Calendar.getInstance();\n year_ago.add(Calendar.YEAR, -1);\n Calendar week_ago = Calendar.getInstance();\n week_ago.add(Calendar.MONTH, -1);\n Calendar day_ago = Calendar.getInstance();\n day_ago.add(Calendar.DATE, -1);\n\n\n String consumption_point = \"carleton_campus_en_use\";\n String production_point = \"carleton_wind_production\";\n\n //get the two live data points for first screen\n\n String quarter_hourly_consumption = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", consumption_point);\n Log.i(\"quarter_hourly_consumption\", quarter_hourly_consumption);\n // update liveConsumption based on data from most recent complete 1/4 hour\n String[] consumption_list = quarter_hourly_consumption.split(\"[\\n|\\r]\");\n String recent_consumption_line = consumption_list[consumption_list.length - 2];\n liveConsumption = (Double.parseDouble(recent_consumption_line.substring(recent_consumption_line.indexOf(';') + 1, recent_consumption_line.length())));\n\n // quarter-hourly windmill1 production for past 24 hours\n String quarter_hourly_production1 = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", production_point);\n // update liveProduction based on data from most recent complete 1/4 hour\n String[] production1_list = quarter_hourly_production1.split(\"[\\n|\\r]\");\n String recent_production1_line = production1_list[production1_list.length - 2];\n liveProduction1 = (Double.parseDouble(recent_production1_line.substring(recent_production1_line.indexOf(';') + 1, recent_production1_line.length())));\n\n // update values stored in sharedPref for next time app loads\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor ed = sharedPref.edit();\n ed.putFloat(\"liveConsumption\", (float)liveConsumption);\n ed.putFloat(\"liveProduction1\", (float)liveProduction1);\n ed.commit();\n\n\n // get all the graph data and save in files\n String[] time_units = {\"day\", \"hour\", \"quarterhour\"};\n Date[] start_dates = {year_ago.getTime(), week_ago.getTime(), day_ago.getTime()};\n String[] points = {consumption_point, production_point};\n String[] dependent_variables = {\"consumption\", \"production1\"};\n\n for (int i = 0; i < time_units.length; i++) {\n String increment = time_units[i];\n Date start = start_dates[i];\n\n for (int j = 0; j < points.length; j++) {\n String data = readEnergyJSON(start, today.getTime(), increment, points[j]);\n\n try {\n DataOutputStream out = new DataOutputStream(\n context.openFileOutput(increment + \"_\" + dependent_variables[j] +\n \"_data\", Context.MODE_PRIVATE));\n out.writeUTF(data);\n out.close();\n } catch (IOException e) {\n Log.i(\"syncEnergyData\", \"I/O Error\");\n }\n }\n }\n return 0;\n }", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "org.hl7.fhir.SampledData addNewValueSampledData();", "public void flushData()\n {\n try {\n //outputStreamAccelerometer.flush();\n //outputStreamLinear.flush();\n outputStreamAccelerometer.close();\n outputStreamLinear.close();\n\n String paths[] = {fileAccelerometer.getPath(), fileLinear.getPath(), fileSettings.getPath()};\n MediaScannerConnection.scanFile(context, paths, null, this);\n }\n catch(Exception exc)\n {\n Log.e(\"LOGGER_ERROR_FLUSH\", exc.toString());\n exc.printStackTrace();\n }\n }", "protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy > 0) {\n int newValue = Math.round(event.values[0]);\n\n if(newValue!=0 && lastTimeSentUnixHR < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnixHR = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", event.accuracy);\n intent.putExtra(\"TIME\", event.timestamp);\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n\n }\n }\n // also send motion/humidity/step data to know when NOT to interpret hr data\n\n if (event.sensor.getType() == SENS_STEP_COUNTER && event.values[0]-currentStepCount!=0) {\n\n if(lastTimeSentUnixSC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixSC = System.currentTimeMillis() / 1000L;\n currentStepCount = event.values[0];\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n\n }\n\n if (event.sensor.getType() == SENS_ACCELEROMETER) {\n\n if(lastTimeSentUnixACC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixACC = System.currentTimeMillis() / 1000L;\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n }\n\n }", "@SimpleFunction(description = \"Append new row of data to existing data set.\")\n public void AppendToDataSet(final int DataSetID, \n final YailList Fields, final YailList Data) {\n // Create new \"DataObject\" and add to upload queue\n DataObject dob = new DataObject(DataSetID, Fields, Data);\n if (pending.size() >= QUEUEDEPTH) {\n UploadDataSetFailed(\"Upload queue full!\");\n return;\n }\n pending.add(dob);\n numPending++; \n new UploadTask().execute(); \n }", "public boolean addData(String data){\r\n\r\n\t\t// the data parameter should be a json string with the following format:\r\n\t\t// \"Transmit ID\":\"Device ID\",\r\n \t\t//\t \"RSSI\":\"Decibels\",\r\n \t\t//\t \"Receive ID\":\"Device ID\"\r\n \t\t//\t \"GPS\":\"Location\",\r\n \t\t//\t \"IMU\":\"Orientation\",\r\n \t\t//\t \"Timestamp\":\"<UNIX time>\"\r\n \t\t//\tthis string will be parsed and its contents will be saved in the database \r\n \t\t\r\n\r\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public MovementData() {\n\t\tsensorData = new ArrayList<SensorReading>();\t\t\n\t\tthis.nextIndex = 0;\n\t\tthis.prevIndex = -1;\n\t}", "void add(Iterable<S3TimeData> newData) {\n assert newData != null;\n\n synchronized (mux) {\n for (S3TimeData data : newData)\n map.put(data.getKey(), data);\n\n mux.notifyAll();\n }\n }", "public void processData(int newVal) {\n\t\tif(samplePoints[counter] < 0) {\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newVal;\n\t\t} else {\n\t\t\tdouble newAverage = lastAverage + ((newVal - samplePoints[counter]) / SAMPLE_POINTS);\n\t\t\tdouble difference = 10 * Math.abs(newAverage - lastAverage);\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newAverage;\n\t\t\tif(tookOff) {\n\t\t\t\tif(difference > DIFFERENCE_THRESHOLD || System.currentTimeMillis() - startTime > 16000) {\n\t\t\t\t\t//The robot is landing\n\t\t\t\t\tSound.beep();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\ttookOff = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(difference < DIFFERENCE_THRESHOLD) {\n\t\t\t\t\tdifferenceCounter--;\n\t\t\t\t} else {\n\t\t\t\t\tdifferenceCounter = DIFFERENCE_POINTS_COUNTER;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(differenceCounter < 0) {\n\t\t\t\t\t//The robot is now in the air.\n\t\t\t\t\tSound.beep();\n\t\t\t\t\ttookOff = true;\n\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\tArrays.fill(samplePoints, -1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcounter = (counter + 1) % SAMPLE_POINTS;\n\t}", "public void attachData(double[] newData) {\n\t\tdouble[] newDataArray = new double[data.length + newData.length];\n\t\tSystem.arraycopy(data, 0, newDataArray, 0, data.length);\n\t\tSystem.arraycopy(newData, 0, newDataArray, data.length, newData.length);\n\t\tdata = newDataArray;\n\t}", "@Override\n public String store(byte[] data, String partialReference) throws DataStoreException\n {\n numStoreRequests.incrementAndGet();\n String absoluteReference = UUID.randomUUID().toString() + partialReference;\n dataMap.put(absoluteReference, data);\n return absoluteReference;\n }", "public void addDataBufferAsRawDataPoints(RecordSet recordSet, byte[] dataBuffer, int recordDataSize, boolean doUpdateProgressBar) throws DataInconsitsentException {\n\t\tint dataBufferSize = GDE.SIZE_BYTES_INTEGER * recordSet.getNoneCalculationRecordNames().length;\n\t\tbyte[] convertBuffer = new byte[dataBufferSize];\n\t\tint[] points = new int[recordSet.getNoneCalculationRecordNames().length];\n\t\tString sThreadId = String.format(\"%06d\", Thread.currentThread().getId()); //$NON-NLS-1$\n\t\tint progressCycle = 0;\n\t\tVector<Integer> timeStamps = new Vector<Integer>(1, 1);\n\t\tif (doUpdateProgressBar) this.application.setProgress(progressCycle, sThreadId);\n\n\t\tint timeStampBufferSize = GDE.SIZE_BYTES_INTEGER * recordDataSize;\n\t\tbyte[] timeStampBuffer = new byte[timeStampBufferSize];\n\t\tif (!recordSet.isTimeStepConstant()) {\n\t\t\tSystem.arraycopy(dataBuffer, 0, timeStampBuffer, 0, timeStampBufferSize);\n\n\t\t\tfor (int i = 0; i < recordDataSize; i++) {\n\t\t\t\ttimeStamps.add(((timeStampBuffer[0 + (i * 4)] & 0xff) << 24) + ((timeStampBuffer[1 + (i * 4)] & 0xff) << 16) + ((timeStampBuffer[2 + (i * 4)] & 0xff) << 8)\n\t\t\t\t\t\t+ ((timeStampBuffer[3 + (i * 4)] & 0xff) << 0));\n\t\t\t}\n\t\t}\n\t\tlog.log(Level.FINE, timeStamps.size() + \" timeStamps = \" + timeStamps.toString()); //$NON-NLS-1$\n\n\t\tfor (int i = 0; i < recordDataSize; i++) {\n\t\t\tlog.log(Level.FINER, i + \" i*dataBufferSize+timeStampBufferSize = \" + i * dataBufferSize + timeStampBufferSize); //$NON-NLS-1$\n\t\t\tSystem.arraycopy(dataBuffer, i * dataBufferSize + timeStampBufferSize, convertBuffer, 0, dataBufferSize);\n\n\t\t\t//0=VoltageRx, 1=Voltage, 2=Current, 3=Capacity, 4=Power, 5=Energy, 6=CellBalance, 7=CellVoltage1, 8=CellVoltage2, 9=CellVoltage3, \n\t\t\t//10=CellVoltage4, 11=CellVoltage5, 12=CellVoltage6, 13=Revolution, 14=Efficiency, 15=Height, 16=Climb, 17=ValueA1, 18=ValueA2, 19=ValueA3,\n\t\t\t//20=AirPressure, 21=InternTemperature, 22=ServoImpuls In, 23=ServoImpuls Out, \n\t\t\t//M-LINK 24=valAdd00 25=valAdd01 26=valAdd02 27=valAdd03 28=valAdd04 29=valAdd05 30=valAdd06 31=valAdd07 32=valAdd08 33=valAdd09 34=valAdd10 35=valAdd11 36=valAdd12 37=valAdd13 38=valAdd14;\n\t\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\t\tpoints[j] = (((convertBuffer[0 + (j * 4)] & 0xff) << 24) + ((convertBuffer[1 + (j * 4)] & 0xff) << 16) + ((convertBuffer[2 + (j * 4)] & 0xff) << 8) + ((convertBuffer[3 + (j * 4)] & 0xff) << 0));\n\t\t\t}\n\n\t\t\tif (recordSet.isTimeStepConstant())\n\t\t\t\trecordSet.addNoneCalculationRecordsPoints(points);\n\t\t\telse\n\t\t\t\trecordSet.addNoneCalculationRecordsPoints(points, timeStamps.get(i) / 10.0);\n\n\t\t\tif (doUpdateProgressBar && i % 50 == 0) this.application.setProgress(((++progressCycle * 5000) / recordDataSize), sThreadId);\n\t\t}\n\t\tif (doUpdateProgressBar) this.application.setProgress(100, sThreadId);\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "public void createDataSet(){\n final Thread thread = new Thread(new Runnable() {\r\n public void run(){\r\n while(true){//we want this running always, it is ok running while robot is disabled.\r\n whileCount++;\r\n currentVoltage = angleMeter.getVoltage(); //gets the non-average voltage of the sensor\r\n runningTotalVoltage[currentIndex] = currentVoltage;//store the new data point\r\n currentIndex = (currentIndex + 1) % arraySize;//currentIndex is the index to be changed\r\n if (bufferCount < arraySize) {\r\n bufferCount++;//checks to see if the array is full of data points\r\n }\r\n }\r\n }\r\n });\r\n thread.start();\r\n }", "public void handleUpdate(WasteBinSensorData updatedData)\n\t{\n\t\t// extract updated values and store them in the current instance\n\t\t// variables.\n\t\tthis.fillLevel = updatedData.getFillLevel();\n\t\tthis.temperatureAsMeasure = updatedData.getTemperature();\n\t\t\n\t\t// update the latest update time\n\t\tthis.latestUpdate = new Date();\n\t\tHashMap<String, Object> valuesMap = new HashMap<>();\n\t\tvaluesMap.put(\"getTemperature\", this.getTemperature());\n\t\tvaluesMap.put(\"getLevel\", this.getLevel());\n\t\tPWALNewDataAvailableEvent event = new PWALNewDataAvailableEvent(this.getUpdatedAt(), this.getPwalId(),\n\t\t\t\tthis.getExpiresAt(), valuesMap, this);\n\t\tlogger.info(\"Device {} is publishing a new data available event on topic: {}\", this.getPwalId(),\n\t\t\t\tthis.eventPublisher.getTopics());\n\t\tthis.eventPublisher.publish(event);\n\t\t\n\t}", "public void addStoredTime(long timeInMilliseconds){\n mStoredTime += timeInMilliseconds;\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }", "public void playback(short[] data) {\n\n\t\t\taudioTracker.write(data, 0, data.length);\n\t\t}", "public synchronized Vector<SensorData> getRawData(Date time, boolean plusMinusOneSecond) {\n if (!plusMinusOneSecond) {\n return getRawData(time, time);\n } else {\n return getRawData(new Date(time.getTime() - 1000), new Date(time.getTime() + 1000));\n }\n }", "private void saveData() {\n }", "void saveData() throws SerializerException;", "public void addData(String level, int seconds, String time)\r\n {\r\n this.data.add(new Data(level, seconds, time));\r\n }", "public void add(ProbeObject obj) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_DATA, obj.getData());\n values.put(KEY_CONFIG, obj.getConfig());\n values.put(KEY_TIMESTAMP, obj.getTimestamp());\n values.put(KEY_DEVICE, obj.getBuild());\n\n // Inserting Row\n db.insert(TABLE_MOBILE_SENSOR, null, values);\n db.close(); // Closing database connection\n }", "@Override\r\npublic void onClick(View v) {\r\n switch (v.getId()) {\r\n case R.id.btnStart:\r\n btnStart.setEnabled(false);\r\n btnStop.setEnabled(true);\r\n // sensorData = new ArrayList();\r\n Toast.makeText(GroovyDancero.this,\"Test!!!\", Toast.LENGTH_LONG).show();\r\n System.out.println(\"Start test\");\r\n WriteFile(filepath,acc);\r\n started = true;\r\n sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST);\r\n break;\r\n case R.id.btnStop:\r\n try {\r\n btnStart.setEnabled(true);\r\n btnStop.setEnabled(false);\r\n // btnUpload.setEnabled(true);\r\n started = false;\r\n sensorManager.unregisterListener(this);\r\n //if (FileHelper.saveToFile(lastX)){\r\n // Toast.makeText(GroovyDancero.this,\"Saved to file\",Toast.LENGTH_SHORT).show();\r\n //}else{\r\n // Toast.makeText(GroovyDancero.this,\"Error save file!!!\",Toast.LENGTH_SHORT).show();\r\n //}\r\n /*\r\n * if(writer != null) { try { writer.close(); } catch\r\n * (IOException e) { // TODO Auto-generated catch block\r\n * e.printStackTrace(); } }\r\n */} catch (Exception e) {\r\n e.printStackTrace();\r\n Toast.makeText(GroovyDancero.this,\"Error save file!!!\",Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n}", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "public void saveSensorsDB() throws Exception {\n\n\t\t//Get JDBC connection\n\t\tConnection connection = null;\n\t\tStatement stmt = null;\n\t\tConnectDB conn = new ConnectDB();\n\t\tconnection = conn.getConnection();\n\n\t\tstmt = connection.createStatement();\n\t\tfor (int key : getMap().keySet()) {\n\t\t\tSubArea value = getMap().get(key);\n\t\t\tint fireValue = (value.isFireSensor()) ? 1 : 0;\n\t\t\tint burglaryValue = (value.isBurglarySensor()) ? 1 : 0;\n\t\t\t//Save Fire and Burglary sensors\n\t\t\tString sql = \"UPDATE section SET fireSensor=\" + fireValue\n\t\t\t\t\t+ \", burglarySensor=\" + burglaryValue + \" WHERE id=\" + key;\n\t\t\tstmt.executeUpdate(sql);\n\t\t}\n\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n long now = SystemClock.elapsedRealtime();\n\n long deltaMs = 0;\n if (mLastUpdateTS != 0) {\n deltaMs = now - mLastUpdateTS;\n if (mUpdateTargetMs > 0 && deltaMs < mUpdateTargetMs) {\n // New sample is arriving too fast. Discard it.\n return;\n }\n }\n\n // Format and post message for the emulator.\n float[] values = event.values;\n final int len = values.length;\n\n mChangeMsg.order(getEndian());\n mChangeMsg.position(0);\n mChangeMsg.putInt(getType());\n mChangeMsg.putFloat(values[0]);\n if (len > 1) {\n mChangeMsg.putFloat(values[1]);\n if (len > 2) {\n mChangeMsg.putFloat(values[2]);\n }\n }\n postMessage(ProtocolConstants.SENSORS_SENSOR_EVENT, mChangeMsg);\n\n // Computes average update time for this sensor and average globally.\n if (mLastUpdateTS != 0) {\n if (mGlobalAvgUpdateMs != 0) {\n mGlobalAvgUpdateMs = (mGlobalAvgUpdateMs + deltaMs) / 2;\n } else {\n mGlobalAvgUpdateMs = deltaMs;\n }\n }\n mLastUpdateTS = now;\n\n // Update the UI for the sensor, with a static throttling of 10 fps max.\n if (hasUiHandler()) {\n if (mLastDisplayTS != 0) {\n long uiDeltaMs = now - mLastDisplayTS;\n if (uiDeltaMs < 1000 / 4 /* 4fps in ms */) {\n // Skip this UI update\n return;\n }\n }\n mLastDisplayTS = now;\n\n mValues[0] = values[0];\n if (len > 1) {\n mValues[1] = values[1];\n if (len > 2) {\n mValues[2] = values[2];\n }\n }\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_DISPLAY_MODIFIED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }\n\n if (DEBUG) {\n long now2 = SystemClock.elapsedRealtime();\n long processingTimeMs = now2 - now;\n Log.d(TAG, String.format(\"glob %d - local %d > target %d - processing %d -- %s\",\n mGlobalAvgUpdateMs, deltaMs, mUpdateTargetMs, processingTimeMs,\n mSensor.getName()));\n }\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tif (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) {\t\n\t\t\t\n\t\t\tfloat x, y, z;\n\t\t\tx = event.values[0];\n\t\t\ty = event.values[1];\n\t\t\tz = event.values[2];\n\t\t\t\n\t\t\tfloat [] first = {x,y,z};\n\t\t\tlast = lowpassFilter(first,last);\n\n\n\t\t\tdouble m = Math.sqrt(last[0] * last[0] + last[1] * last[1] + last[2] * last[2]);\n\n\t\t\t// Inserts the specified element into this queue if it is possible\n\t\t\t// to do so immediately without violating capacity restrictions,\n\t\t\t// returning true upon success and throwing an IllegalStateException\n\t\t\t// if no space is currently available. When using a\n\t\t\t// capacity-restricted queue, it is generally preferable to use\n\t\t\t// offer.\n\n\t\t\ttry {\n\t\t\t\tmAccBuffer.add(new Double(m));\n\n\t\t\t} catch (IllegalStateException e) {\n\n\t\t\t\t// Exception happens when reach the capacity.\n\t\t\t\t// Doubling the buffer. ListBlockingQueue has no such issue,\n\t\t\t\t// But generally has worse performance\n\t\t\t\tArrayBlockingQueue<Double> newBuf = new ArrayBlockingQueue<Double>( mAccBuffer.size() * 2);\n\t\t\t\tmAccBuffer.drainTo(newBuf);\n\t\t\t\tmAccBuffer = newBuf;\n\t\t\t\tmAccBuffer.add(new Double(m));\n\t\t\t}\n\t\t}\n\n\t}", "public void add(Object o) {\n Logger.log(\"DEBUG\", \"Data to add to queue: \" + o.toString());\n while(isLocked()) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n addToTail(o);\n LAST_WRITE_TIME = now();\n }", "@Override\n public void feedRawData(byte[] data) {\n mARGSession.feedRawData(data);\n }", "public void updateData(TimingObj timingObj) {\n\n\t\tStatsObject statsObj = data.get(timingObj.getClassName());\n\n\t\tif (statsObj == null) {\n\t\t\tstatsObj = new StatsObject(timingObj.getClassName());\n\t\t\tdata.put(timingObj.getClassName(), statsObj);\n\t\t}\n\t\tstatsObj.addTiming(timingObj.duration());\n\t}", "public void updateData() {\n List<Device> devices = Lists.newArrayList();\n CustomAdapter customAdapter = (CustomAdapter) deviceListView.getAdapter();\n for (int i = 0; i < customAdapter.getCount(); i++) {\n Model model = customAdapter.getItem(i);\n if (model.isChecked()) {\n devices.add(model.getDevice());\n }\n }\n\n SensorDao sensorDao = new SensorDao(parentActivity);\n Map<Device, List<Sensor>> sensorDeviceMap = sensorDao.fetchDeviceSpecificSensors(devices);\n\n // Aggregate the information about sensor and devices based on unique\n // Map<BluetoothDevice, Map<FileName, List<SensorLabels>>>\n Map<BluetoothDevice, Map<String, List<String>>> rearrangedSensorDeviceInfo = Maps.newHashMap();\n for (Map.Entry<Device, List<Sensor>> elem : sensorDeviceMap.entrySet()) {\n Device device = elem.getKey();\n BluetoothDevice bluetoothDevice = CommonUtils.getBluetoothAdapter(\n parentActivity, REQUEST_BT_ENABLE).getRemoteDevice(device.getDeviceId());\n Map<String, List<String>> fileNameSensorNameMap = rearrangedSensorDeviceInfo.get(bluetoothDevice);\n List<Sensor> sensors = elem.getValue();\n\n if (fileNameSensorNameMap == null) {\n fileNameSensorNameMap = Maps.newHashMap();\n rearrangedSensorDeviceInfo.put(bluetoothDevice, fileNameSensorNameMap);\n }\n\n for(Sensor sensor : sensors) {\n String dataFilePath = sensor.getSensorDataFilePath();\n String sensorName = sensor.getSensorLabel();\n List<String> sensorNames = fileNameSensorNameMap.get(dataFilePath);\n if (sensorNames == null) {\n fileNameSensorNameMap.put(dataFilePath, Lists.newArrayList(sensorName));\n } else {\n sensorNames.add(sensorName);\n }\n }\n }\n\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_STARTED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_FINISHED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_ENDED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_INITIATED);\n parentActivity.registerReceiver(broadcastReceiver, intentFilter);\n\n //Start service for every device.\n for (Map.Entry<BluetoothDevice, Map<String, List<String>>> elem : rearrangedSensorDeviceInfo.entrySet()) {\n BluetoothDevice device = elem.getKey();\n Map<String, List<String>> fileNameSensorsMap = elem.getValue();\n if (fileNameSensorsMap.size() > 0) {\n Bundle bundle = new Bundle();\n bundle.putParcelable(ServerActionsService.PARAM_BLUETOOTH_DEVICE, device);\n bundle.putSerializable(PARAM_FILENAME_SENSOR_INFO, (Serializable) fileNameSensorsMap);\n\n Intent intent = new Intent(parentActivity, ServerActionsService.class);\n intent.setAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA);\n intent.putExtras(bundle);\n\n parentActivity.startService(intent);\n }\n }\n }", "public DataValue getLastDataByDeviceIdAndSensorTypeSortedByTimestamp(SensorValue sensorVal) throws Exception;", "void processData(float[] receiveData) {\r\n\t\tlogger.debug(\"verarbeite Daten\");\r\n\t\t// gibt empfangene Daten weiter\r\n\r\n\t\tlogger.debug(\"value processData:\" + Arrays.toString(receiveData));\r\n\t\tif (receiveData[0] == Sensor.DistNx.getNumber()) {\r\n\t\t\t// Dist-Nx\r\n\t\t\tlogger.info(\"DistNX-Werte: \" + receiveData[2]);\r\n\t\t\tdistNx.setDistance(Math.round(receiveData[2]));\r\n\t\t} else if (receiveData[0] == Sensor.LightSensorArray.getNumber()) {\r\n\t\t\t// LSA\r\n\t\t\tlsa.setLSA(Math.round(receiveData[1] - 1),\r\n\t\t\t\t\tMath.round(receiveData[2]));\r\n\t\t} else if (receiveData[0] == Sensor.EOPDLinks.getNumber()) {\r\n\t\t\t// linker EOPD\r\n\t\t\teopdLeft.setEOPDdistance(Math.round(receiveData[2]));\r\n\t\t} else if (receiveData[0] == Sensor.EOPDRechts.getNumber()) {\r\n\t\t\t// rechter EOPD\r\n\t\t\teopdRight.setEOPDdistance(Math.round(receiveData[2]));\r\n\t\t} else if (receiveData[0] == Sensor.AbsoluteIMU.getNumber()) {\r\n\t\t\t// AbsIMU-ACG\r\n\t\t\tif (Math.round(receiveData[1]) >= 16) {\r\n\t\t\t\tabs_Imu.setAngle(Math.round(receiveData[2]),\r\n\t\t\t\t\t\tMath.round(receiveData[1]) - 16);\r\n\t\t\t} else {\r\n\t\t\t\tabs_Imu.setTiltData(Math.round(receiveData[2]),\r\n\t\t\t\t\t\tMath.round(receiveData[1]) - 11);\r\n\t\t\t}\r\n\r\n\t\t} else if (receiveData[0] == 6) {\r\n\t\t\t// Akkuladung\r\n\t\t\taccumulator.setMilliVolt(Math.round(receiveData[1]));\r\n\t\t} else if (receiveData[0] == 7) {\r\n\t\t\tlogger.debug(\"Genuegend Werte uebermittelt: \" + this);\r\n\t\t\tsensorReady = false;\r\n\t\t} else if (receiveData[0] == Sensor.IRThermalSensor.getNumber()) {\r\n\t\t\t// ThermalSensor\r\n\t\t\tthermal.setTemperature(Math.round(receiveData[2]));\r\n\t\t} else if (receiveData[0] == 9) {\r\n\t\t\tif (receiveData[1] == 1) {\r\n\t\t\t\t// TODO Reset Button gedrueckt; ggf. muss noch weiteres getan\r\n\t\t\t\t// werden\r\n\t\t\t\tinitializeProgram.renewNavigation();\r\n\t\t\t} else if (receiveData[1] == 2) {\r\n\t\t\t\tinitializeProgram.setProgramStarted();\r\n\t\t\t}\r\n\t\t} else if (receiveData[0] == 10) {\r\n\t\t\tsemaphore.down();\r\n\t\t} else if (receiveData[0] == 11) {\r\n\t\t\tsemaphore.down();\r\n\t\t} else if (receiveData[0] == 12) {\r\n\t\t\tsemaphore.down();\r\n\t\t} else if (receiveData[0] == 13) {\r\n\t\t\tsemaphore.down();\r\n\t\t\tsemaphore.down();\r\n\t\t} else {\r\n\r\n\t\t\t// System.out.println(\"process Data (no sensor) \" +\r\n\t\t\t// Arrays.toString(receiveData));\r\n\t\t\t// logger.error(\"process Data (no sensor) \"\r\n\t\t\t// + Arrays.toString(receiveData));\r\n\t\t}\r\n\r\n\t}", "public void insertData(double sugarLevel, double injectAmount) {\n int data_id = getLatestID(\"data\", \"data_ID\");\n closeConnection();\n String query = \"INSERT INTO data (data_ID,blood_sug_lvl,last_update,inj_amnt,users_user_id) VALUES (\"\n + data_id + \",\" + sugarLevel + \",now(),\" + injectAmount + \",1)\";\n sendUpdate(query);\n }", "public void addData(DataPoint point)\n {\n data.add(point);\n }", "private void save() {\n // Get the current measurement\n final LiveData<Measurement> ldm = mViewModel.getMeasurementById(mMeasurementId);\n ldm.observe(getViewLifecycleOwner(), new Observer<Measurement>() {\n @Override\n public void onChanged(final Measurement measurement) {\n ldm.removeObserver(this);\n updateMeasurement(measurement);\n snackBar(\"Measurement updated!\");\n }\n });\n }", "private boolean saveRate(TSDBData rateObj) {\n InfluxDBClient dbClient = new InfluxDBClient();\n\n ObjectMapper mapper = new ObjectMapper();\n String jsonData = null;\n boolean result;\n try {\n jsonData = mapper.writeValueAsString(rateObj);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n result = dbClient.saveData(jsonData);\n return result;\n }", "public void refreshDataPacket(Runnable runnable) {\n PacketWriterUtils.writeCallbackPacket(getFreshFullDataPacket(), buf -> {\n setFullDataPacket(buf);\n runnable.run();\n });\n }", "@Override\n public void write(byte[] data) throws SerialError {\n int offset= 0;\n int size_toupload=0;\n byte[] buffer = new byte[SIZE_SERIALUSB];\n if(!isConnected())\n {\n open();\n }\n try\n {\n while(offset < data.length) {\n\n if(offset+SIZE_SERIALUSB > data.length)\n {\n size_toupload = data.length-offset;\n }\n System.arraycopy(data, offset, buffer, 0, size_toupload);\n int size_uploaded = conn.bulkTransfer(epOUT, buffer, size_toupload, TIMEOUT);\n if(size_uploaded<0)\n {\n throw new SerialError(\" bulk Transfer fail\");\n }\n offset += size_uploaded;\n }\n\n }catch (Exception e)\n {\n throw new SerialError(e.getMessage());\n }\n }", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\tint entropyAccuracy = SensorDescInformation.entropyAccuracy;\n\t\t\tSensorQueriesAccelerometer accQuery = new SensorQueriesAccelerometer(SensorDescInformation.earliest, SensorDescInformation.latest, context.getFilesDir());\n\t\t\tint count = accQuery.getCount();\n\t\t\tif (accQuery.containsReadings()){\n\t\t\t\tfloat min = accQuery.getMinValue().getAccX();\n\t\t\t\tfloat max = accQuery.getMaxValue().getAccX();\n\t\t\t\tfloat interval = max-min;\n\t\t\t\tList<SensorData> data = accQuery.list;\n\t\t\t\tint [][] counter = new int [entropyAccuracy][3];\n\t\t\t\tfor (SensorData temp : data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint joX = (int) ((temp.getValueFloat(0)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tint joY = (int) ((temp.getValueFloat(1)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tint joZ = (int) ((temp.getValueFloat(2)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tcounter [joX][0]++;\n\t\t\t\t\t\tcounter [joY][1]++;\n\t\t\t\t\t\tcounter [joZ][2]++;\n\t\t\t\t}\n\t\t\t\tfloat entroX = 0, entroY = 0, entroZ = 0;\n\t\t\t\tfor (int i = 0; i < entropyAccuracy; i++ ){\n\t\t\t\t\tentroX += (counter[i][0]/count)*Math.log10(counter[i][0]/count);\n\t\t\t\t\tentroY += (counter[i][1]/count)*Math.log10(counter[i][1]/count);\n\t\t\t\t\tentroZ += (counter[i][2]/count)*Math.log10(counter[i][2]/count);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfloat changeRateX = 0, changeRateY = 0, changeRateZ = 0;\n\t\t\t\n\t\t\t\tfor (int i = 0; i< data.size(); i++){\n\t\t\t\t\tchangeRateX += (data.get(i+1).getValueFloat(0) - data.get(i).getValueFloat(0))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t\tchangeRateY += (data.get(i+1).getValueFloat(1) - data.get(i).getValueFloat(1))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t\tchangeRateZ += (data.get(i+1).getValueFloat(2) - data.get(i).getValueFloat(2))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t}\n\t\t\t\tchangeRateX /= data.size();\n\t\t\t\tchangeRateY /= data.size();\n\t\t\t\tchangeRateZ /= data.size();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfinal SharedPreferences settings = context.getSharedPreferences(NervousStatics.SENSOR_PREFS, 0);\n\t\t\t\t\n\t\t\t\tfloat freq = (int)context.getSharedPreferences(NervousStatics.SENSOR_FREQ, 0).getInt(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_freqValue\", 30) * 1000;\n\t\t\t\tboolean isLo = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doMeasure\", true);\n\t\t\t\tboolean isSh = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doShare\", true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdataReady(System.currentTimeMillis(), entroX, entroY, entroZ, freq, changeRateX, changeRateY, changeRateZ, isLo, isSh);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\tfinal SharedPreferences settings = context.getSharedPreferences(NervousStatics.SENSOR_PREFS, 0);\n\t\t\t\t\n\t\t\t\tfloat freq = (int)context.getSharedPreferences(NervousStatics.SENSOR_FREQ, 0).getInt(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_freqValue\", 30) * 1000;\n\t\t\t\tboolean isLo = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doMeasure\", true);\n\t\t\t\tboolean isSh = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doShare\", true);\n\t\t\t\tdataReady(System.currentTimeMillis(), 0, 0, 0, freq, 0, 0, 0, isLo, isSh);\n\t\t\t};\n\t\t\treturn null;\n\t\t}", "private void updateData(char tag, byte[] data) {\n float max;\n float min;\n switch (tag){\n case 'E':\n addEntry(ecgChart, unpackFloatValue(data),\n PLOT_SPAN_SECONDS * ECG_SAMPLE_RATE);\n ecg_list.add(unpackFloatValue(data));\n if(ecg_list.size() > PLOT_SPAN_SECONDS * ECG_SAMPLE_RATE)\n ecg_list.remove(0);\n max = Collections.max(ecg_list);\n min = Collections.min(ecg_list);\n ecgChart.getAxisLeft().setAxisMaximum(max);\n ecgChart.getAxisLeft().setAxisMinimum(min);\n break;\n case 'O':\n addEntry(oxiChart, unpackFloatValue(data),\n PLOT_SPAN_SECONDS * OXIMETER_SAMPLE_RATE);\n oxi_list.add(unpackFloatValue(data));\n if(oxi_list.size() > PLOT_SPAN_SECONDS * OXIMETER_SAMPLE_RATE)\n oxi_list.remove(0);\n max = Collections.max(oxi_list);\n min = Collections.min(oxi_list);\n oxiChart.getAxisLeft().setAxisMaximum(max);\n oxiChart.getAxisLeft().setAxisMinimum(min);\n break;\n case 'P':\n pulseText.setText(String.valueOf((int)unpackFloatValue(data)));\n break;\n case 'S':\n spO2Text.setText(String.valueOf((int)unpackFloatValue(data)));\n break;\n case 'T':\n tempText.setText(String.format(\"%.1f\", unpackFloatValue(data)));\n break;\n case 'A':\n alarmHandler(new String(data));\n break;\n case 'W':\n errorHandler(new String(data));\n break;\n default:\n break;\n }\n }", "@Override\n public void onDataWrite(String deviceName, String data)\n {\n if(mTruconnectHandler.getLastWritePacket().contentEquals(data))\n {\n mTruconnectCallbacks.onDataWritten(data);\n\n String nextPacket = mTruconnectHandler.getNextWriteDataPacket();\n if(!nextPacket.contentEquals(\"\"))\n {\n mBLEHandler.writeData(deviceName, nextPacket);\n }\n }\n else\n {\n mTruconnectCallbacks.onError(TruconnectErrorCode.WRITE_FAILED);\n mTruconnectHandler.onError();\n }\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "public void addQueue(SensorData latest) {\r\n//\t\tMap<String,Integer> latestLog = latest.getSSIDs();\r\n//\t\tLog.v(LOG_TAG, latestLog.keySet().toString());\r\n// \tif( latestLog!=null && passedLog!=null ){\r\n// \tdouble nowRatio = OverlapRatio.between( latestLog, passedLog );\r\n// \tif( nowRatio!=-1 && nowRatio!=0 ){\r\n// \ttimeQueue.add( latest.getTime( MatchingConstants.PARAM_STRING[MatchingConstants.SN_WiFi] ) );\r\n// \toverlapRatioQueue.add( (float)nowRatio );\r\n// \tFloat f = overlapRatioQueue.getLast();\r\n// \tif( f!=null ){\r\n// \tLog.v( LOG_TAG, \"NowRatio=\" + f.toString() + \",Size=\" + overlapRatioQueue.size() );\r\n// \t}\r\n// \t}\r\n// \t}\r\n// \tpassedLog = latestLog;\r\n\t}", "public void store() {\r\n\t\tdata = busExt.get();\r\n\t}", "void writeCurrentTrackData(int position, int value) {\n currentTrackData[position].write(position, value);\n }" ]
[ "0.6958177", "0.569329", "0.5677685", "0.5606124", "0.5558784", "0.54911876", "0.54609007", "0.5371148", "0.53462577", "0.5310645", "0.52844507", "0.52786714", "0.5277859", "0.52684665", "0.5265532", "0.5249447", "0.5219877", "0.5196181", "0.5159902", "0.51550823", "0.51003987", "0.50967747", "0.5094372", "0.5079678", "0.5075191", "0.5061687", "0.5028176", "0.5024568", "0.5015323", "0.4997445", "0.49956724", "0.49931544", "0.4973729", "0.4972487", "0.49684832", "0.49615505", "0.49601242", "0.49597827", "0.49584123", "0.49532726", "0.49360022", "0.49301174", "0.4917342", "0.48972338", "0.48937604", "0.48928896", "0.48894736", "0.48872393", "0.4867686", "0.48604715", "0.4849771", "0.48428446", "0.48288023", "0.4793632", "0.47900626", "0.47891378", "0.47814125", "0.47754225", "0.47742063", "0.4774163", "0.4761602", "0.47615838", "0.475872", "0.47582728", "0.47390518", "0.47350827", "0.47311503", "0.47299558", "0.47296134", "0.47266603", "0.47189215", "0.47176567", "0.47134805", "0.47127676", "0.46979395", "0.46915734", "0.46915323", "0.46881905", "0.4677166", "0.46712267", "0.46683422", "0.46679512", "0.4663714", "0.4661719", "0.46613756", "0.4660637", "0.46567932", "0.4646572", "0.46461794", "0.46437275", "0.46346647", "0.46263647", "0.46122023", "0.46109107", "0.46100545", "0.46024442", "0.45976466", "0.45962468", "0.4595942", "0.45957577" ]
0.80892026
0
saves the sensorData to the Storage
private void saveSensor() { new SensorDataSerializer(sensorID, rawData); rawData.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "private void saveData() {\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "public void saveSensorsDB() throws Exception {\n\n\t\t//Get JDBC connection\n\t\tConnection connection = null;\n\t\tStatement stmt = null;\n\t\tConnectDB conn = new ConnectDB();\n\t\tconnection = conn.getConnection();\n\n\t\tstmt = connection.createStatement();\n\t\tfor (int key : getMap().keySet()) {\n\t\t\tSubArea value = getMap().get(key);\n\t\t\tint fireValue = (value.isFireSensor()) ? 1 : 0;\n\t\t\tint burglaryValue = (value.isBurglarySensor()) ? 1 : 0;\n\t\t\t//Save Fire and Burglary sensors\n\t\t\tString sql = \"UPDATE section SET fireSensor=\" + fireValue\n\t\t\t\t\t+ \", burglarySensor=\" + burglaryValue + \" WHERE id=\" + key;\n\t\t\tstmt.executeUpdate(sql);\n\t\t}\n\n\t}", "public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "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 }", "private void saveToStorage() {\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(\"GeoFences\", Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(currentList);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "public static void save(){\n\t\tif(GUIReferences.currentFile != null) {\n\t\t\txml.XMLSaver.saveSensorList(GUIReferences.currentFile);\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t} else {\n\t\t\tsaveAs();\n\t\t}\n\t}", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "private void save() {\n // Get the current measurement\n final LiveData<Measurement> ldm = mViewModel.getMeasurementById(mMeasurementId);\n ldm.observe(getViewLifecycleOwner(), new Observer<Measurement>() {\n @Override\n public void onChanged(final Measurement measurement) {\n ldm.removeObserver(this);\n updateMeasurement(measurement);\n snackBar(\"Measurement updated!\");\n }\n });\n }", "private void saveDataToFile(boolean stop){\n Log.d(TAG, \"saveDataToFile\");\n\n List<SensorData> tempGyroList = new ArrayList<>(listGyroData);\n List<SensorData> tempAccelerList = new ArrayList<>(listAccelData);\n List<PPGData> tempPPGList = new ArrayList<>(listPPGData);\n\n //Should create right away since we already have a copy to allow for new samples to come\n listGyroData.clear(); listAccelData.clear(); listPPGData.clear();\n\n SaveDataInBackground backgroundSave = new SaveDataInBackground(stop);\n backgroundSave.execute(tempAccelerList, tempGyroList, tempPPGList);\n Log.d(TAG, \"saveDataToFile: Saving files asynchronously\");\n }", "public void writeToStorage() throws Exception {\n TaggingDeviceRestTest.ensureDeviceExists(eKey);\n String baseUrl = REST_URL + \"/core/device\";\n TaggingDeviceRestTest\n .putSecurityIPs(baseUrl,\n eKey,\n Collections.singletonList(IPv4.fromIPv4Address(ip)));\n }", "private void saveData( ) throws IOException {\n \tString FILENAME = \"data_file\";\n String stringT = Long.toString((SystemClock.elapsedRealtime() - timer.getBase())/1000)+\"\\n\";\n String stringS = textView.getText().toString()+\"\\n\";\n String stringD = Long.toString(System.currentTimeMillis())+\"\\n\";\n FileOutputStream fos;\n\t\ttry {\n\t\t\tfos = openFileOutput(FILENAME, Context.MODE_APPEND); //MODE_APPEND\n\t\t\tfos.write(stringS.getBytes());\n\t\t\tfos.write(stringT.getBytes());\n\t\t\tfos.write(stringD.getBytes());\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void save() {\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(\"studentData.dat\");\n\n\t\t\tObjectOutputStream oos;\n\t\t\ttry {\n\t\t\t\toos = new ObjectOutputStream(fos);\n\n\t\t\t\toos.writeObject(studentList);\n\t\t\t\toos.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"File is finished writing to the hard drive\");\n\t}", "private void saveData() {\n\t\tlogger.trace(\"saveData() is called\");\n\t\t\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFileOutputStream fileOut = new FileOutputStream(\"server-info.dat\");\n\t\t\tout = new ObjectOutputStream(fileOut);\n\t\t\tout.writeObject(jokeFile);\n\t\t\tout.writeObject(kkServerPort);\n\t\t\tout.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"saving server-info.dat file is encountering an error for some reason.\");\n\t\t\tlogger.error(\"saving server-info.dat file is encountering an error for some reason.\");\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"saving server-info.dat file is encountering an error for some reason.\");\t\n\t\t\tlogger.error(\"saving server-info.dat file is encountering an error for some reason.\");\n\t\t} \n\t\tfinally {\n\t\t\tif (out != null){\n\t\t\t\ttry{\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e){\n\t\t\t\t\tSystem.err.println(\"saving server-info.dat file is encountering an error for some reason.\");\n\t\t\t\t\tlogger.error(\"saving server-info.dat file is encountering an error for some reason.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "void saveData() throws SerializerException;", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void storePin() {\n DataStoreGP1 data = (DataStoreGP1) ds;\r\n data.pin = data.temp_p;\r\n System.out.println(\"Pin has been saved successfully..\");\r\n }", "private void saveToFileData() {//Context context) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(fileNameData, Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(Data.userData);\n objectOutputStream.close();\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\npublic void onClick(View v) {\r\n switch (v.getId()) {\r\n case R.id.btnStart:\r\n btnStart.setEnabled(false);\r\n btnStop.setEnabled(true);\r\n // sensorData = new ArrayList();\r\n Toast.makeText(GroovyDancero.this,\"Test!!!\", Toast.LENGTH_LONG).show();\r\n System.out.println(\"Start test\");\r\n WriteFile(filepath,acc);\r\n started = true;\r\n sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST);\r\n break;\r\n case R.id.btnStop:\r\n try {\r\n btnStart.setEnabled(true);\r\n btnStop.setEnabled(false);\r\n // btnUpload.setEnabled(true);\r\n started = false;\r\n sensorManager.unregisterListener(this);\r\n //if (FileHelper.saveToFile(lastX)){\r\n // Toast.makeText(GroovyDancero.this,\"Saved to file\",Toast.LENGTH_SHORT).show();\r\n //}else{\r\n // Toast.makeText(GroovyDancero.this,\"Error save file!!!\",Toast.LENGTH_SHORT).show();\r\n //}\r\n /*\r\n * if(writer != null) { try { writer.close(); } catch\r\n * (IOException e) { // TODO Auto-generated catch block\r\n * e.printStackTrace(); } }\r\n */} catch (Exception e) {\r\n e.printStackTrace();\r\n Toast.makeText(GroovyDancero.this,\"Error save file!!!\",Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n}", "public boolean save(T data) throws MIDaaSException;", "public void storeData() {\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"DB/Guest.ser\"));\n out.writeInt(guestList.size());\n out.writeInt(Guest.getMaxID());\n for (Guest guest : guestList)\n out.writeObject(guest);\n //System.out.printf(\"GuestController: %,d Entries Saved.\\n\", guestList.size());\n out.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "void saveStorage(StorageEntity storage);", "public void saveToFile() throws InterruptedException\n {\n //generate data\n StringBuilder data = new StringBuilder();\n data.append(\"X,Y,Z,GPS,Timestamp\");\n //loop voor de hardcoded data die wordt aangemaakt in de loop.\n for (int i = 0; i < 5; i++)\n {\n Long currentTime = System.currentTimeMillis();\n data.append(\"\\n\" + i + \",\" + i * i + \",\" + (i + i) + \",\" + (i+i+i)*i + \",\" + currentTime);\n TimeUnit.SECONDS.sleep(1);\n }\n\n FileOutputStream fos = null;\n try\n {\n //saving the file into device\n fos = this.mainActivity.openFileOutput(MainActivity.FILE_NAME, Context.MODE_PRIVATE);\n fos.write(data.toString().getBytes());\n mEditText.getText().clear();\n Toast.makeText(this.mainActivity, \"Saved to\" + mainActivity.getFilesDir() + \"/\" + MainActivity.FILE_NAME, Toast.LENGTH_LONG).show();\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n if (fos != null)\n {\n try\n {\n fos.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\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 addRawData (SensorData sensorData) {\n if (!isEnabled) {\n return;\n }\n\n rawData.add(sensorData);\n\n GarmentOSService.callback(CallbackFlags.VALUE_CHANGED, new ValueChangedCallback(sensorData.getLongUnixDate(), sensorData.getData()));\n\n if (rawData.size() > savePeriod) {\n saveSensor();\n }\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "void saveCurrentStation();", "public void save() {\t\n\t\n\t\n\t}", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public void store() {\r\n\t\tdata = busExt.get();\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void persist(DataOutputStream dos) throws Exception;", "boolean hasSaveSensor();", "protected void saveValues() {\n dataModel.persist();\n }", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}", "public void saveToXML(Element rootElement){\n Element sensorElement = rootElement.addElement(\"sensor\")\n .addAttribute(\"id\",String.valueOf(getModel().getId()));\n sensorElement.addElement(\"name\").addText(getModel().getName());\n sensorElement.addElement(\"refresh\").addText(String.valueOf(getModel().getRefreshTime()));\n sensorElement.addElement(\"signal\").addText(String.valueOf(getModel().getSignal()));\n sensorElement.addElement(\"battery\").addText(String.valueOf(getModel().getBattery()));\n if(getPanel() != null){\n sensorElement.addElement(\"icon\").addText(getPanel().getIconType().getName());\n sensorElement.addElement(\"header_color\").addText(getPanel().getHexHeaderColor());\n }\n Element valuesElement = sensorElement.addElement(\"values\");\n for(Value value : getModel().getValues()){\n value.saveToXML(valuesElement);\n }\n }", "public synchronized void writeStore() {\n FileOutputStream fileStream = null;\n\n try {\n File storeFile = new File(getStoreName());\n File oldStoreFile = new File(oldStoreName);\n\n if (oldStoreFile.exists()) {\n oldStoreFile.delete();\n }\n\n if (storeFile.exists()) {\n storeFile.renameTo(oldStoreFile);\n }\n\n File newStoreFile = new File(getStoreName());\n\n // Make sure the needed directories exists\n if (!newStoreFile.getParentFile().exists()) {\n newStoreFile.getParentFile().mkdirs();\n }\n\n fileStream = new FileOutputStream(newStoreFile);\n ObjectOutputStream outStream = new ObjectOutputStream(fileStream);\n outStream.writeObject(store);\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, Utility.expandStackTraceToString(e));\n } finally {\n if (fileStream != null) {\n try {\n fileStream.close();\n } catch (IOException e) {\n LOGGER.log(Level.WARNING, Utility.expandStackTraceToString(e));\n }\n }\n }\n }", "private void uploadFromDataStorage() {\n }", "private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }", "private void saveData(){\n\t\tsynchronized(onlineAllInfoList){\n\t\t\tRecorder.save(onlineAllInfoList, onlineAllInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving onlineCompetitionInfoList...\");System.out.flush();\n\t\tsynchronized(onlineCompetitionInfoList){\n\t\t\tRecorder.save(onlineCompetitionInfoList, onlineCompetitionInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving competitionList...\");System.out.flush();\n\t\tsynchronized(competitionList){\n\t\t\tRecorder.save(competitionList, competitionInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving allAIInfoList...\");System.out.flush();\n\t\tsynchronized(allAIInfoList){\n\t\t\tRecorder.save(allAIInfoList, allInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving waitingInfoList...\");System.out.flush();\n\t\tsynchronized(waitingInfoList){\n\t\t\tRecorder.save(waitingInfoList, waitingInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving sortedAIInfoPool...\");System.out.flush();\n\t\tsynchronized(sortedAIInfoPool){\n\t\t\tRecorder.save(sortedAIInfoPool, sortedInfoListFileName);\t\t\t\n\t\t}\n\t}", "public void save() {\n ProductData.saveData(tree);\n }", "public void save(DataOutput stream)\n throws IOException\n {\n stream.write(getBytes());\n }", "public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}", "void save();", "void save();", "void save();", "org.naru.park.ParkController.CommonAction getSaveSensor();", "private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }", "private void saveGyroData(float axis_x, float axis_y, float axis_z, long timestamp){\n //Log.v(TAG, \"saveGyroData:: axis_x: \"+axis_x+\" axis_y: \"+axis_y+\" axis_z: \"+axis_z);\n //SensorData sensorData = new SensorData(axis_x, axis_y, axis_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(axis_x, axis_y, axis_z, Util.getTimeMillis(timestamp));\n listGyroData.add(sensorData);\n }", "private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}", "public void save(List<T> data) {\n\t\ttry {\n\t\t\tFile file = new File(getFileLocation());\n\t\t\tif (!file.getParentFile().exists()) {\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(getFileLocation());\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\tbw.write(gson.toJson(data));\n\t\t\tbw.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveQuickly(){\r\n String quickSavePath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.save(quickSavePath);\r\n }", "public abstract void recordSensorData(RealmObject sensorData);", "public static void save()\n\t{\n writeMap();\n\t}", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "void saveSaves(Object data, Context context);", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "public org.naru.park.ParkController.CommonAction getSaveSensor() {\n return saveSensor_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : saveSensor_;\n }", "abstract public void saveData(Bundle bundle);", "public void saveAsSerialization() {\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(new File(\"saves/data.dat\")))){\n os.writeObject(this);\n } catch (FileNotFoundException e){\n System.out.println(\"Could not create file: \" + e.getMessage());\n } catch (IOException e){\n System.out.println(\"IO exception occurred: \" + e.getMessage());\n }\n\n }", "@Override\n public void saveValues() {\n \n }", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "private static void saveData(String data) {\n }", "public void save() {\r\n IniReader.write(FILE_NAME, \"x\", x, \"y\", y, \"fullscreen\", fullscreen, \"controlType\", controlType, \"vol\", volMul,\r\n \"keyUpMouse\", getKeyUpMouseName(), \"keyDownMouse\", getKeyDownMouseName(), \"keyUp\", getKeyUpName(), \"keyDown\", keyDownName,\r\n \"keyLeft\", keyLeftName, \"keyRight\", keyRightName, \"keyShoot\", keyShootName, \"keyShoot2\", getKeyShoot2Name(),\r\n \"keyAbility\", getKeyAbilityName(), \"keyEscape\", getKeyEscapeName(), \"keyMap\", keyMapName, \"keyInventory\", keyInventoryName,\r\n \"keyTalk\", getKeyTalkName(), \"keyPause\", getKeyPauseName(), \"keyDrop\", getKeyDropName(), \"keySellMenu\", getKeySellMenuName(),\r\n \"keyBuyMenu\", getKeyBuyMenuName(), \"keyChangeShipMenu\", getKeyChangeShipMenuName(), \"keyHireShipMenu\", getKeyHireShipMenuName());\r\n }", "public interface SensorDataService{\n Temperature saveTemperature(Temperature temperature);\n Humidity saveHumidity(Humidity humidity);\n AirPressure saveAirPressure(AirPressure airPressure);\n}", "@Override\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\toutState.putInt(\"data\", mData);\n\t}", "public void save() {\n\t\tpreferences().flush();\n\t}", "public int insertSensorData(DataValue dataVal) throws Exception;", "@Override\n\t protected void onSaveInstanceState(Bundle outState) {\n\t super.onSaveInstanceState(outState);\n\t // save the current data, for instance when changing screen orientation\n\t outState.putSerializable(\"dataset\", mDataset);\n\t outState.putSerializable(\"renderer\", mRenderer);\n\t outState.putSerializable(\"current_series\", mCurrentSeries);\n\t outState.putSerializable(\"current_renderer\", mCurrentRenderer);\n\t }", "private void saveMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (!varTmpDir.exists()) {\n varTmpDir.createNewFile();\n }\n FileOutputStream fileOut = new FileOutputStream(varTmpDir);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(longTermMemory);\n out.close();\n fileOut.close();\n System.out.println(\"SAVED LONG TERM MEMORIES IN \" + brainLocation);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "@Override\n public void saveData() {\n System.out.println(\"GateWay\");\n }", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }", "protected void save(DataOutputStream os) throws IOException {\n\n super.save(os);\n os.writeFloat(StartingFunds);\n os.writeInt(NumTestTraders);\n os.writeInt(NumSteps);\n }", "public void save() {\n // Convert the settings to a string\n String output = readSettings();\n \n try {\n // Make sure the file exists\n if (!settingsFile.exists()) {\n File parent = settingsFile.getParentFile();\n parent.mkdirs();\n settingsFile.createNewFile(); \n }\n \n // Write the data into the file\n BufferedWriter writer = new BufferedWriter(new FileWriter(settingsFile));\n writer.write(output);\n writer.close(); \n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void save(HashMap<Integer, T> data) {\n\t\tthis.data.putAll(data);\n\t}", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}", "private void saveSensorData(InetAddress address, int port, Product product, int length){\n sensorDatas.add(new SensorData(product,port,address,length));\n\n if(isHere(port,address,product.getNameOfProduct())){\n update(port,address,product);\n }else{\n actualSensorDatas.add(new SensorData(product,port,address,length));\n }\n }", "public void Write_data() {\n // add-write text into file\n try {\n FileOutputStream fileout=openFileOutput(\"savedata11.txt\", MODE_PRIVATE);\n OutputStreamWriter outputWriter=new OutputStreamWriter(fileout);\n outputWriter.write(Integer.toString(_cnt));\n outputWriter.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setStorageLocation( String name ) throws IOException {\n\t \tlog.config( \"update Storage Location to: \"+name );\n\t\tPersistentData data = null;\n\t\ttry {\n\t\t\tdata = io.readState();\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.log( Level.SEVERE, ex.toString(), ex );\n\t\t\tdata = new PersistentData();\n\t\t}\n\t\tio.setFile( name );\n\t\tio.writeState(data);\n\t}", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void saveInstrument() {\n String instrument = mInstrument.getText().toString().trim();\n String brand = mBrand.getText().toString().trim();\n String serial = mSerial.getText().toString().trim();\n int quantity = mQuantity.getValue();\n String priceString = mPrice.getText().toString().trim();\n if(TextUtils.isEmpty(instrument) && TextUtils.isEmpty(brand) && TextUtils.isEmpty(serial) &&\n TextUtils.isEmpty(priceString) && quantity == 0){\n return;\n }\n float price = 0;\n if(!TextUtils.isEmpty(priceString)){\n price = Float.parseFloat(priceString);\n }\n //Retrieve selected supplier from Spinner\n String suppName = mSpinner.getSelectedItem().toString();\n //A query request to get the id of the selected supplier\n String [] projection = {SupplierEntry._ID, SupplierEntry.COLUMN_NAME};\n String selection = SupplierEntry.COLUMN_NAME + \"=?\";\n String [] selectionArgs = {suppName};\n Cursor cursor = getContentResolver().query(SupplierEntry.CONTENT_SUPPLIER_URI, projection, selection, selectionArgs, null);\n int idSupplier = 0;\n try {\n int idColumnIndex = cursor.getColumnIndex(SupplierEntry._ID);\n //move the cursor to the 0th position, before you start extracting out column values from it\n if (cursor.moveToFirst()) {\n idSupplier = cursor.getInt(idColumnIndex);\n }\n }finally {\n cursor.close();\n }\n ContentValues values = new ContentValues();\n values.put(InstrumentEntry.COLUMN_NAME, instrument);\n values.put(InstrumentEntry.COLUMN_BRAND, brand);\n values.put(InstrumentEntry.COLUMN_SERIAL, serial);\n values.put(InstrumentEntry.COLUMN_PRICE, price);\n values.put(InstrumentEntry.COLUMN_NB, quantity);\n values.put(InstrumentEntry.COLUMN_SUPPLIER_ID, idSupplier);\n Uri uri = getContentResolver().insert(InstrumentEntry.CONTENT_INSTRUMENT_URI, values);\n if(uri != null){\n Toast.makeText(this, \"Instrument successfully inserted\", Toast.LENGTH_SHORT);\n }else\n Toast.makeText(this, \"Instrument insertion failed\", Toast.LENGTH_SHORT);\n }", "public void save(OutputStream os) throws IOException;", "private synchronized void saveVectorData(Vector data, int index)\r\n {\r\n debug(\"saveVectorData(Vector, \" + index + \") - to File\");\r\n\r\n // Create a filename to save the Data \r\n String fileName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + index;\r\n\r\n // Now we can send it to be serialized\r\n StockMarketUtils.serializeData(data, fileName);\r\n\r\n debug(\"saveVectorData(Vector, \" + index + \") - to File complete\");\r\n }", "private void saveAccelerometerData(float acc_x, float acc_y, float acc_z, long timestamp){\n //Log.v(TAG, \"saveAccelerometerData:: acc_x: \"+acc_x+\" acc_y: \"+acc_y+\" acc_z: \"+acc_z);\n //SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(timestamp));\n listAccelData.add(sensorData);\n }", "public boolean save() {\n\t\t\tif (mmaped) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tfinal boolean ret = storage.set(index, buf);\n\t\t\tstorage.release(buf);\n\t\t\tbuf = null;\n\t\t\treturn ret;\n\t\t}" ]
[ "0.7171921", "0.7154856", "0.68867606", "0.6862248", "0.65747577", "0.6556915", "0.6483792", "0.64761645", "0.6474207", "0.643909", "0.64291877", "0.6397387", "0.63803464", "0.6363199", "0.63628525", "0.6355687", "0.6343878", "0.63311017", "0.6287861", "0.6281791", "0.6246814", "0.62461483", "0.6244098", "0.62199736", "0.61839163", "0.61576396", "0.61441356", "0.6138319", "0.6079792", "0.60797423", "0.6061506", "0.60284555", "0.60087657", "0.5995235", "0.59776956", "0.5976411", "0.5972634", "0.5964937", "0.5960651", "0.59271866", "0.590703", "0.59040856", "0.58892685", "0.58842546", "0.5872729", "0.5868327", "0.58625513", "0.5862492", "0.5861833", "0.58592665", "0.58544993", "0.5846355", "0.5846355", "0.5846355", "0.5842578", "0.5832824", "0.58176064", "0.5813574", "0.5812614", "0.58032966", "0.5789103", "0.5786629", "0.57841486", "0.5783962", "0.57803386", "0.5775662", "0.57730824", "0.5765356", "0.576082", "0.5759364", "0.57523173", "0.57479936", "0.57455856", "0.5740812", "0.573735", "0.5733722", "0.5723029", "0.5719666", "0.5716517", "0.57106835", "0.571044", "0.5705818", "0.5704788", "0.5704402", "0.57011175", "0.5698517", "0.56913054", "0.56875974", "0.56715465", "0.56714326", "0.5668845", "0.5666182", "0.56655854", "0.56645125", "0.5662698", "0.5648582", "0.5645461", "0.56415784", "0.56193656", "0.56089485" ]
0.84655255
0
returns the actual rawData of the Sensor, which is not saved to the storage yet.
public synchronized Vector<SensorData> getRawData() { return rawData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}", "@Override\n public SignalSet getRawData() {\n return this.datRaw;\n }", "Object getRawData();", "public int[] getTempSensorData()\n {\n return tempSensorData;\n }", "public JSONObject getRawData() {\n return rawData;\n }", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "@Override\n\tpublic Serializable[] getData() {\n\t Double light = 0.0, temperature = 0.0;\n\t int packetType = 0;\n\t \n\t light = ((int) (Math.random() * 10000)) / 10.0;\n\t temperature = ((int) (Math.random() * 1000)) / 10.0;\n\t packetType = 2;\n\t\treturn new Serializable[] { packetType, temperature, light };\n\t}", "public byte[] getData() {\n return data;\n }", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "public byte[] getData() {\n\treturn null;\n }", "public byte[] getData() {\n return this.data;\n }", "public SensorData getLastSensorData() {\n if (mSensorData.size() > 0) {\n for (SensorData sensorData : mSensorData) {\n if (sensorData.isDatasetComplete()) {\n return sensorData;\n }\n }\n }\n return null;\n }", "public byte[] getData()\n {\n if (m_data == null)\n {\n return null;\n }\n return (byte[]) m_data.clone();\n }", "public byte[] getData() {\n return ByteExtensions.clone(this.data);\n }", "public String getSensor()\n {\n return sensor;\n }", "public byte[] getData();", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAverageFuelRate = CAN1Comm.Get_AverageFuelRate_333_PGN65390();\n\t\tLatestFuelConsumed = CAN1Comm.Get_ADaysFuelUsed_1405_PGN65390();\t\n\t}", "byte[] getData() {\n return data;\n }", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public double[] getRealData() {\r\n return realData;\r\n }", "public SensorData getData(String sensorId){\n return sensors.getData(sensorId);\n }", "public byte[] getData() {\r\n return Arrays.copyOf(data, data.length);\r\n }", "public byte[] getData() {\n if (this.length==0) {\n return new byte[0];\n }\n return data;\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "public byte getData() {\n return data;\n }", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "@Override\n public Raster getData() {\n final Rectangle rect = new Rectangle(getMinX(), getMinY(), getWidth(),\n getHeight());\n return getData(rect);\n }", "@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }", "@Override\n public Object getData() {\n return blockValues.toString();\n }", "public double[] getData() {\n return data;\n }", "protected String[] getSensorValues() {\r\n\t\t// FL, FM, FR, RB, RF, LF\r\n\t\tString[] sensorValues = sensor.getAllSensorsValue(this.x, this.y, getDirection());\r\n\t\treturn sensorValues;\r\n\t}", "String getSensorDataPoint();", "public long getData() {\n return data;\n }", "public float[] getData()\n {\n return this.pixels;\n }", "protected Sensor[] getSensorValues() { return sensors; }", "public float getRawValue() { return rawValue; }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\r\n\t\treturn data;\r\n\t}", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "public byte[] getDataBlock() {\n return serialize;\n }", "public String getData() {\r\n return this.data;\r\n }", "public String getData()\n {\n return data;\n }", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public String getData()\n\t{\n\t\treturn data;\n\t}", "public byte getData() {\n return this.data;\n }", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public java.lang.String getData() {\r\n return data;\r\n }", "public String getData() {\n\t\treturn this.data;\n\t}", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "public Object getData(){\n\t\treturn this.data;\n\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public float[] getSensorValues() {\n return mVal;\n }", "public String getData() {\n\treturn data;\n }", "Sensor getSensor();", "public double getReading() {\n return this.getDataRef().get();\n }", "public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}", "public synchronized Object getData() {\n return data;\n }", "private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }", "public RegisterSensor.SensorDescription getRealSensorDescription() {\n return sensorDescription;\n }", "public Object getRawValue();", "public abstract double GetRaw();", "public double getValue() {\n\t\treturn sensorval;\n\t}", "public String getData() {\n return coreValue();\n }", "public String getRawValue() {\n\t\treturn rawValue;\n\t}", "public String getRawValue() {\n\t\treturn rawValue;\n\t}", "public byte[] getDataByte() {\n\t\t\n\t\tif (!isDoubleType)\n\t\t{\n\t\t\treturn ipixel_o;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t}", "public String getData(String rawData){\n\t\treturn \"1\";\n\t}", "public Object data() {\n return this.data;\n }", "@Override\n public byte[] getValue() {\n return MetricUtils.concat2(topologyId, getTag(), sampleRate).getBytes();\n }", "public byte[] getByteData() { return bytedata; }", "public int[] getCurrentReading() {\n\t\tint[] ret = obsMatrix.getSensorReading();\n\t\tif (ret[0] == -1 || ret[1] == -1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint[] reading = { ret[1], ret[0] };\n\t\treturn reading;\n\t}", "public byte[] getAsBytes() {\n return (byte[])data;\n }", "public T getData() {\n return this.data;\n }", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "String getData();", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public String data() {\n return this.data;\n }", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public byte[] GetBytes() {\n return data;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }" ]
[ "0.7213266", "0.7046011", "0.68381804", "0.6789436", "0.6728527", "0.66144854", "0.6595221", "0.65799755", "0.6577123", "0.65511066", "0.6513496", "0.6511103", "0.64665246", "0.64656496", "0.6416579", "0.64111096", "0.6409069", "0.6404163", "0.64009476", "0.639297", "0.638102", "0.6346972", "0.6331011", "0.6303613", "0.628618", "0.6274309", "0.6274309", "0.6266133", "0.62588775", "0.6253327", "0.6252096", "0.6246976", "0.6243407", "0.62324405", "0.6226359", "0.6223342", "0.621805", "0.61997914", "0.61997914", "0.61997914", "0.61997914", "0.6194331", "0.6190533", "0.6190533", "0.6190533", "0.6190533", "0.6174482", "0.6167776", "0.61668473", "0.6166658", "0.6166658", "0.6166658", "0.6166658", "0.616531", "0.61652386", "0.61581725", "0.61525184", "0.61378545", "0.6137329", "0.61350197", "0.61306584", "0.6114101", "0.61129445", "0.61050564", "0.60955477", "0.60903776", "0.608305", "0.6081469", "0.60712093", "0.6065482", "0.60573846", "0.60570836", "0.60516036", "0.60467917", "0.6027252", "0.6020941", "0.6020941", "0.5989928", "0.5981898", "0.5967739", "0.5956301", "0.595432", "0.59477353", "0.59414005", "0.5935614", "0.59297985", "0.59277546", "0.5923946", "0.5923946", "0.5923946", "0.5923946", "0.59218866", "0.5914868", "0.5913649", "0.59093463", "0.59065473", "0.59065473", "0.59065473", "0.59065473", "0.5878336" ]
0.83104247
0
returns the rawData from the given timestamp to the millisecond exact. Or, if plusMinusOneSecond = true the rawData from the given timestamp plus minus 1 second.
public synchronized Vector<SensorData> getRawData(Date time, boolean plusMinusOneSecond) { if (!plusMinusOneSecond) { return getRawData(time, time); } else { return getRawData(new Date(time.getTime() - 1000), new Date(time.getTime() + 1000)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] getExactTime(long timestamp) {\n DATA1++;\n return new String(String.valueOf(DATA1) + \" zac[1]!!!\").getBytes();\n }", "public T get(long timestamp) {\n int index = fit(timestamp);\n return get(index);\n }", "public abstract long getTimestampMillis();", "public long getTimestamp() {\n return ((long)(buffer.get(4) & 0xff) << 24) |\n ((long)(buffer.get(5) & 0xff) << 16) |\n ((long)(buffer.get(6) & 0xff) << 8) |\n ((long)(buffer.get(7) & 0xff));\n }", "com.google.protobuf.Timestamp getTimestamp();", "com.google.protobuf.ByteString\n getTimestampBytes();", "com.google.protobuf.ByteString\n getTimestampBytes();", "com.google.protobuf.ByteString\n getTimestampBytes();", "com.google.protobuf.ByteString getSignedTimeStamp();", "@Test\n public void testTimeStampRounding() throws SQLException {\n assumeBinaryModeRegular();\n LocalTime time = LocalTime.parse(\"23:59:59.999999500\");\n Time actual = insertThenReadWithoutType(time, \"time_without_time_zone_column\", Time.class, false/*no roundtrip*/);\n assertEquals(Time.valueOf(\"24:00:00\"), actual);\n }", "static long toMilliseconds(Timestamp timestamp) {\n return timestamp.getTime();\n }", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "@Test\n public void testTimeStampRoundingWithType() throws SQLException {\n assumeBinaryModeRegular();\n LocalTime time = LocalTime.parse(\"23:59:59.999999500\");\n Time actual =\n insertThenReadWithType(time, Types.TIME, \"time_without_time_zone_column\", Time.class, false/*no roundtrip*/);\n assertEquals(Time.valueOf(\"24:00:00\"), actual);\n }", "public LocalDateTime getTimeStampMicroObj(int columnIndex) {\n TimeStampMicroVector vector = (TimeStampMicroVector) table.getVector(columnIndex);\n return vector.getObject(rowNumber);\n }", "private void appendFirstPoint(long timestamp, double value) {\n long twoHourTimestampOverage = timestamp % BLOCK_HEADER_OFFSET_SECS;\n long blockHeaderTimestamp = timestamp - twoHourTimestampOverage;\n timestamps.write(32, blockHeaderTimestamp);\n prevTimestamp = timestamp;\n prevTimestampDelta = prevTimestamp - blockHeaderTimestamp;\n timestamps.write(14, prevTimestampDelta);\n\n // Store first value with no compression.\n long longValue = Double.doubleToLongBits(value);\n values.write(64, longValue);\n previousValue = longValue;\n previousLeadingZeros = 64;\n previousTrailingZeros = 64;\n }", "public NTPTimeStamp64(long raw) {\n _secs = (raw >> 32)& 0xFFFFFFFFL; // force unsigned\n \n _frac = raw & 0xFFFFFFFFL; // force unsigned\n _fracDouble = _frac / SCALE;\n System.out.println(\"raw ctor: _secs, _frac = \" + Long.toHexString(_secs) + \n \", \" + Long.toHexString(_frac));\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long refineTimestamp(long timestamp) {\n long time = (timestamp / windowSlotSize) * windowSlotSize;\n return time;\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getTimestamp();", "String getTimestamp();", "long getTimestamp();", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public static int getNanosOfSecond(Timestamp timestamp) {\n return timestamp.getNanos();\n }", "public LocalDateTime getTimeStampMicroObj(String columnName) {\n TimeStampMicroVector vector = (TimeStampMicroVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "public long getTimestamp();", "public long getTimestamp();", "public long getTimeStampMicro(int columnIndex) {\n TimeStampMicroVector vector = (TimeStampMicroVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "int maxSecondsForRawSampleRow();", "public static byte[] shortCalendarToRawBytes(Calendar timestamp, boolean honorDeviceTimeOffset) {\n\n // The mi-band device currently records sleep\n // only if it happens after 10pm and before 7am.\n // The offset is used to trick the device to record sleep\n // in non-standard hours.\n // If you usually sleep, say, from 6am to 2pm, set the\n // shift to -8, so at 6am the device thinks it's still 10pm\n // of the day before.\n if (honorDeviceTimeOffset) {\n int offsetInHours = getDeviceTimeOffsetHours();\n if (offsetInHours != 0) {\n timestamp.add(Calendar.HOUR_OF_DAY, offsetInHours);\n }\n }\n\n // MiBand2:\n // year,year,month,dayofmonth,hour,minute\n\n byte[] year = fromUint16(timestamp.get(Calendar.YEAR));\n return new byte[] {\n year[0],\n year[1],\n fromUint8(timestamp.get(Calendar.MONTH) + 1),\n fromUint8(timestamp.get(Calendar.DATE)),\n fromUint8(timestamp.get(Calendar.HOUR_OF_DAY)),\n fromUint8(timestamp.get(Calendar.MINUTE))\n };\n }", "public LocalDateTime getTimeStampNanoObj(String columnName) {\n TimeStampNanoVector vector = (TimeStampNanoVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "public long getTimeStampMicro(String columnName) {\n TimeStampMicroVector vector = (TimeStampMicroVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "int getTimestamp();", "public long toTimelineValue(long millisecond) { return millisecond; }", "public NTPTimeStamp64(ByteBuffer bb) throws IOException {\n \n if (bb == null) {\n throw new IOException(\"NTPTimeStamp64 ctor: bb uninitialized\");\n }\n if (bb.remaining() < 8) {\n throw new IOException(\"NTPTimeStamp64 ctor: bb remain of \" + \n bb.remaining() + \" < 8\");\n }\n \n _secs = ((long) bb.getInt()) & 0xFFFFFFFFL; // force unsigned\n \n // max of unsigned long\n \n _frac = ((long) bb.getInt()) & 0xFFFFFFFFL; // force unsigned\n _fracDouble = _frac / SCALE;\n System.out.println(\"Buffer ctor: _secs, _frac = \" + Long.toHexString(_secs) + \n \", \" + Long.toHexString(_frac));\n \n }", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "com.google.protobuf.Timestamp getSendTime();", "public LocalDateTime getTimeStampNanoObj(int columnIndex) {\n TimeStampNanoVector vector = (TimeStampNanoVector) table.getVector(columnIndex);\n return vector.getObject(rowNumber);\n }", "long getTimeStamp();", "public long getTimeStamp() {return timeStamp;}", "public long baseTimestamp() {\n return buffer.getLong(BASE_TIMESTAMP_OFFSET);\n }", "float getTimeRecord();", "public long getTimeStampNano(String columnName) {\n TimeStampNanoVector vector = (TimeStampNanoVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "private long calculateFrameTimestamp(int totalBits) {\n int samples = totalBits >> 4;\n long frameUs = mFramesUsCache.get(samples, -1);\n if (frameUs == -1) {\n frameUs = samples * 1000_000 / mChannelsSampleRate;\n mFramesUsCache.put(samples, frameUs);\n }\n long timeUs = SystemClock.elapsedRealtimeNanos() / 1000;\n // accounts the delay of polling the audio sample data\n timeUs -= frameUs;\n long currentUs;\n long lastFrameUs = mFramesUsCache.get(LAST_FRAME_ID, -1);\n if (lastFrameUs == -1) { // it's the first frame\n currentUs = timeUs;\n } else {\n currentUs = lastFrameUs;\n }\n if (DEBUG)\n Log.i(TAG, \"count samples pts: \" + currentUs + \", time pts: \" + timeUs + \", samples: \" +\n \"\" + samples);\n // maybe too late to acquire sample data\n if (timeUs - currentUs >= (frameUs << 1)) {\n // reset\n currentUs = timeUs;\n }\n mFramesUsCache.put(LAST_FRAME_ID, currentUs + frameUs);\n return currentUs;\n }", "public long getSinceTimeMs(int index) {\n return sinceTimeMs_.getLong(index);\n }", "@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();", "com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();", "public static long getSeconds(Timestamp timestamp) {\n long ms = timestamp.getTime();\n return ms > 0 ? (ms / 1000) : (ms - 999)/1000;\n }", "public CDSPacketTime(long timeStamp) {\r\n \tthis.time = timeStamp;\r\n \t\r\n \tdays = (timeStamp >> 48) & 0x0000ffffL; // this is a 16 bit quantity\r\n \t\r\n \tmillis = (timeStamp >> 16) & 0x00000000ffffffffL; // this is a 32 bit quantity\r\n \t\r\n \tmicros = timeStamp & 0x0000ffffL; // this is a 16 bit quantity\r\n \t \r\n }", "public long getTimestampMillisecUTC();", "public DateTime timestamp() {\n\n\t\tif (timestamp == null) {\n\n\t\t\tfinal DateTimeValue dt = ProtoDateUtil.fromDecimalDateTime(message.getBaseTimeStamp());\n\n\t\t\ttimestamp = new DateTime(dt.getYear(), dt.getMonth(), dt.getDay(), dt.getHour(), dt.getMinute(),\n\t\t\t\t\tdt.getSecond(), dt.getMillis(), ISOChronology.getInstanceUTC());\n\n\t\t}\n\n\t\treturn timestamp;\n\n\t}", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n }\n }", "public String getTimestamp() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public LocalDateTime getTimeStampMilliObj(String columnName) {\n TimeStampMilliVector vector = (TimeStampMilliVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "Long timestamp();", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public LocalDateTime getTimeStampMilliObj(int columnIndex) {\n TimeStampMilliVector vector = (TimeStampMilliVector) table.getVector(columnIndex);\n return vector.getObject(rowNumber);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSignedTimeStamp() {\n return signedTimeStamp_;\n }", "public long getSinceTimeMs(int index) {\n return sinceTimeMs_.getLong(index);\n }", "@JsonProperty(\"timestamp\")\n public Double getTimestamp() {\n return timestamp;\n }", "TimeStamp getT();", "public Long getTimestamp() {\n return timestamp;\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public long getTimeStampNano(int columnIndex) {\n TimeStampNanoVector vector = (TimeStampNanoVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getSignedTimeStamp() {\n return signedTimeStamp_;\n }", "public String getRecordTimeStamp1() {\n return recordTimeStamp1;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "public static Timestamp getSQLTimesTemp(Date data) {\r\n\r\n\t\tTimestamp dt = new Timestamp(data.getTime());\r\n\r\n\t\treturn dt;\r\n\t}" ]
[ "0.5954202", "0.57522726", "0.55203575", "0.5512498", "0.53498095", "0.5310734", "0.5310734", "0.5310734", "0.5295686", "0.52844733", "0.51787364", "0.5149699", "0.5149699", "0.5105067", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.50967824", "0.5095074", "0.50945246", "0.5090587", "0.50855005", "0.5081313", "0.5081313", "0.5073221", "0.50694585", "0.5066894", "0.5066894", "0.50556326", "0.5049727", "0.5049727", "0.5044484", "0.5035532", "0.5033358", "0.50163645", "0.50163645", "0.49873248", "0.49670607", "0.49585542", "0.4958021", "0.49325052", "0.49309754", "0.48992562", "0.4896572", "0.48813996", "0.48700038", "0.48599184", "0.48317325", "0.48293573", "0.48255455", "0.4818297", "0.47981364", "0.4797542", "0.47969666", "0.4793864", "0.47826514", "0.4779015", "0.47775516", "0.47759843", "0.4773358", "0.47619915", "0.47619915", "0.47590992", "0.4751291", "0.47327223", "0.47327223", "0.47277623", "0.47233906", "0.4719229", "0.47172907", "0.47165418", "0.47155586", "0.47067496", "0.46926063", "0.46860495", "0.46772933", "0.46772933", "0.4675679", "0.46702877", "0.4670266", "0.46692067", "0.46641248", "0.465916", "0.46575695", "0.4650361", "0.4650361", "0.46486908", "0.46465218" ]
0.6829254
0
returns the rawData between the two given timestamps including the given times themselves, either from the database or from the actual rawData or both. Depending of the given timestamps.
public synchronized Vector<SensorData> getRawData(Date begin, Date end) { Date firstLocallyHoldDate; Vector<SensorData> data = new Vector<SensorData>(); if (rawData.size() == 0) { firstLocallyHoldDate = new Date(); } else { firstLocallyHoldDate = rawData.get(0).getDate(); } if (begin.after(firstLocallyHoldDate) || begin.equals(firstLocallyHoldDate)) { getRawData(begin, end, data); } else { SensorDataDeSerializer deSerializer = new SensorDataDeSerializer(sensorID, data, Utils.dateToLongUnix(begin), Utils.dateToLongUnix(end), 0); deSerializer.work(); if (!end.before(firstLocallyHoldDate)) { getRawData(begin, end, data); } } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<models.garaDB.tables.pojos.Ride> fetchByTimestamp(Timestamp... values) {\n return fetch(Ride.RIDE.TIMESTAMP, values);\n }", "public String assembleGetObservationsQuery(Set<DataStream> dataStreams, Date minTimestamp, Date maxTimestamp) {\n\t\tString sqlQuery = null;\r\n\t\t\r\n\t\tString queryPrefix = \"SELECT * FROM observation\";\r\n\t\tString whereStr = \"\";\r\n\t\t\r\n\t\tSet<DataStream> localDataStreams = new HashSet<DataStream>();\r\n\t\tlocalDataStreams.addAll(dataStreams);\r\n\t\t\r\n\t\t// ~~~ sensorIds and phenomenon constraint ~~~\r\n\t\tIterator<DataStream> iterator = localDataStreams.iterator();\r\n\t\t\r\n\t\tif(iterator.hasNext()) { \r\n\t\t\t\r\n\t\t\twhereStr = \" WHERE \";\r\n\t\t\t\r\n\t\t\tDataStream ds = iterator.next();\r\n\t\t\t\r\n\t\t\twhereStr = whereStr + \"((procedure_id = '\" + ds.getSensorId() + \"'\";\r\n\t\t\t\r\n\t\t\tif(ds.getPhenomenon() != null)\r\n\t\t\t\twhereStr = whereStr + \" AND phenomenon_id='\" + ds.getPhenomenon() + \"')\";\r\n\t\t\t\r\n\t\t\twhile(iterator.hasNext()) {\r\n\t\t\t\t\r\n\t\t\t\tds = iterator.next();\r\n\t\t\t\t\r\n\t\t\t\twhereStr = whereStr + \" OR \" ;\r\n\t\t\t\t\r\n\t\t\t\twhereStr = whereStr + \"(procedure_id = '\" + ds.getSensorId() + \"'\";\r\n\t\t\t\t\r\n\t\t\t\tif(ds.getPhenomenon() != null)\r\n\t\t\t\t\twhereStr = whereStr + \" AND phenomenon_id='\" + ds.getPhenomenon() + \"')\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhereStr = whereStr + \")\";\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: Supports only the same phenomenon for all sid. Do we want to support sensor streams with different phneomenon? \r\n\t\t// Phenomenon restriction\r\n\t\t//if (sensorStreamSet.size() > 0) {\r\n\t\t//\twhereStr = whereStr + \" AND phenomenon_id='\" + sensorStreamSet.iterator().next().getPhenomenon() + \"'\";\r\n\t\t//}\r\n\t\t\r\n\t\t// time constraint\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(DateTimeUtils.DATE_FORMAT);\r\n\t\t\t\r\n\t\tif(maxTimestamp != null)\r\n\t\t\twhereStr = whereStr + \" AND time_stamp <= TIMESTAMP WITH TIME ZONE '\" + sdf.format(maxTimestamp) + \"'\";\r\n\t\t\r\n\t\tif(minTimestamp != null) {\r\n\t\t\twhereStr = whereStr + \" AND time_stamp > TIMESTAMP WITH TIME ZONE '\" + sdf.format(minTimestamp) + \"'\"; \r\n\t\t}\r\n\t\t\r\n\t\tString querySuffix = \" ORDER BY time_stamp ASC\";\r\n\t\t\r\n\t\tsqlQuery = queryPrefix + whereStr + querySuffix;\r\n\t\t\r\n\t\treturn sqlQuery;\r\n\t}", "private void gettimes() {\n\t\tCursor c=mydb.rawQuery(\"SELECT * FROM timedata \", null);\n\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata after retriving completed @@@@@@@@@@@@@@@@@@@@@\");\n\t\t c.moveToFirst();\n\t\t \n\t\t if(c!=null)\n\t\t {\n\t\t\t do{\n\t\t\t\t \n\t\t\t\t int c1=c.getColumnIndex(\"fromtime\");\n\t\t\t\t if(c.getCount()>0)\n\t\t\t\t dfromtime=c.getString(c1);\n\t\t\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata \"+dfromtime);\n\t\t\t\t int c2=c.getColumnIndex(\"totime\");\n\t\t\t\t dtotime=c.getString(c2);\n\t\t\t\t \n\t\t\t }while(c.moveToNext());\n\t\t\t c.close();\n\t\t\t mydb.close();\n\t\t }\n\t}", "private Points getTransactions(long startTimestamp, long endTimestamp) {\n if (startTimestamp > endTimestamp) {\n long tmp = startTimestamp;\n startTimestamp = endTimestamp;\n endTimestamp = tmp;\n }\n int low = 0;\n int high = transactionList.size() - 1;\n int x = -1;\n int y = -1;\n while (low <= high) {\n int mid = (high + low) >> 1;\n if (transactionList.get(mid).transactionTimestamp >= startTimestamp) {\n x = mid;\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n if (x == -1) {\n return new Points(-1, -1);\n }\n\n low = 0;\n high = transactionList.size() - 1;\n while (low <= high) {\n int mid = (high + low) >> 1;\n if (transactionList.get(mid).transactionTimestamp <= endTimestamp) {\n y = mid;\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n if (y == -1) {\n return new Points(-1, -1);\n }\n return new Points(x, y);\n }", "public static byte[] getExactTime(long timestamp) {\n DATA1++;\n return new String(String.valueOf(DATA1) + \" zac[1]!!!\").getBytes();\n }", "public List<models.garaDB.tables.pojos.Ride> fetchByStarttime(Timestamp... values) {\n return fetch(Ride.RIDE.STARTTIME, values);\n }", "public List<models.garaDB.tables.pojos.Ride> fetchByEndtime(Timestamp... values) {\n return fetch(Ride.RIDE.ENDTIME, values);\n }", "@Override\n\tpublic List<PositionData> getPositionDataBetweenTime(String terminalId,\n\t\t\tString start_time, String stop_time) {\n\t\tList<PositionData> position_between = new ArrayList<PositionData>();\n\t\ttry {\n\t\t\tString start_time_in_format = start_time.substring(0,2) + \"-\" + start_time.substring(2,4) + \"-\" + start_time.substring(4,6) + \" \" + start_time.substring(6,8) + \":\" + start_time.substring(8,10) + \":\" + start_time.substring(10,12);\n\t\t\tString stop_time_in_format = stop_time.substring(0,2) + \"-\" + stop_time.substring(2,4) + \"-\" + stop_time.substring(4,6) + \" \" + stop_time.substring(6,8) + \":\" + stop_time.substring(8,10) + \":\" + stop_time.substring(10,12);\n\t\t\tposition_between = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' and date>'\" + start_time_in_format + \"' and date<'\" + stop_time_in_format + \"' order by date desc\");\n\t\t\t\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 position_between;\n\t}", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByRecTimestamp(java.sql.Timestamp... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.REC_TIMESTAMP, values);\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "public byte[] getPhotoTimesBefore(String rpiId, String time, int numberOfDates) throws SQLException, IOException;", "public static Date[] getRangeDateTimes(List dateTimes, Date dateTime, boolean millisecondIgnored)\n\t{\n\t\tfor (int i = 0; i < dateTimes.size() - 1; i++)\n\t\t{\n\t\t\tDate dateTime1 = (Date) dateTimes.get(i);\n\t\t\tDate dateTime2 = (Date) dateTimes.get(i + 1);\n\t\t\t\n\t\t\tlong time = dateTime.getTime();\n\t\t\tlong time1 = dateTime1.getTime();\n\t\t\tlong time2 = dateTime2.getTime();\n\t\t\t\n\t\t\tif (millisecondIgnored)\n\t\t\t{\n\t\t\t\ttime1 = time1 - time1 % 1000;\n\t\t\t\ttime2 = time2 - time2 % 1000;\n\t\t\t}\n\t\t\t\n\t\t\tif (time >= time1 && time <= time2)\n\t\t\t{\n\t\t\t\treturn new Date[] {dateTime1, dateTime2};\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Vector<Log> get(Timestamp begin, Timestamp end) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tVector<Log> ret = new Vector<Log>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetAll);\r\n\t\t\tps.setTimestamp(1, begin);\r\n\t\t\tps.setTimestamp(2, end);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tret.add(generate(rs));\r\n\t\t\t}\r\n\t\t\tcon.close();\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}\r\n\t\treturn ret;\r\n\t}", "@Override\n\tpublic Hashtable getSensorData(Context androidContext, String sensorID, long dateTime,\n\t\t\tlong timeDifference) {\n\t\tString Time_Stamp = \"timestamp\";\n\t\tAndroidSensorDataManager androidSensorDataManager = AndroidSensorDataManagerSingleton.getInstance(androidContext);\n\t\t//androidSensorDataManager.startCollectSensorUsingThreads();\n\t\tAndroidSensorDataContentProviderImpl dataProvider = new AndroidSensorDataContentProviderImpl();\n\t\tandroidSensorDataManager.startSensorDataAcquistionPollingMode(sensorID, dataProvider, null);\n\t\ttry {\n\t\t\tThread.sleep(300);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tboolean dataFound = false;\n\t\tint counter = 0;\n\t\tBundle currentData = null;\n\t\tHashtable bundleHT = null;\n\t\tList<Bundle> sensorDataBundle;\n\t\twhile ( counter <3 && !dataFound ) {\n\t\t\t\tcounter++;\n\t\t\t\t\n\t\t\t\t//using data provider's data\n\t\t\t\t//instead of expensively requery the sensor\n\t\t\t\t//which might be also wrong\n\t\t\t\tsensorDataBundle = dataProvider.getSensorDataReading();\n\t\t\t\t\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n//\t\t\t //\tsensorDataBundle = androidSensorDataManager.get\n\t\t \tsensorDataBundle = androidSensorDataManager.returnSensorDataAndroidAfterInitialization(sensorID, false);\n\t\t }\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n\t\t\t \t//something very slow regarding with sensor reading\n\t\t\t \ttry {\n\t\t\t\t\t\tThread.sleep(500*counter);\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 }\n\t\t\t\tfor ( Bundle curData : sensorDataBundle) {\n\t\t\t\t\t//if ( curData.getLong(Time_Stamp) >= dateTime - timeDifference && curData.getLong(Time_Stamp) <= dateTime + timeDifference ) {\n\t\t\t\t\t\tcurrentData = curData;\n\t\t\t\t\t bundleHT = convertBundleToHash(currentData);\n\t\t\t\t\t\tdataFound = true;\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn bundleHT;\n\t\t\n\t\t\n\t}", "public static TrafficSnapshot extractInfo(String timestamp) {\n // \"2016-12-01T05:00:00 5\" -> (\"2016-12-01\", \"05:00:00 5\")\n String[] split = timestamp.split(\"T\");\n String date = split[0];\n // \"5:00:00 5\" -> (\"05:00:00\", \"5\")\n String[] timeAndCars = split[1].split(\" \");\n String time = timeAndCars[0];\n int cars = Integer.parseInt(timeAndCars[1]);\n TrafficSnapshot ts = new TrafficSnapshot(date, time, cars);\n return ts;\n }", "public static void main(final String[] args) throws Exception {\n try (SQLHandler sq = new SQLHandler(\"gps_trips\")) {\n System.out.println(print(sq.query(\"SELECT MIN(start_time) AS start_time, vehicle, start_lat, start_lon FROM trips WHERE start_time >= 3433892584000 AND start_time < 3433892883999 GROUP BY vehicle\")));\n System.out.println(print(sq.query(\"SELECT MAX(end_time) AS end_time, vehicle, end_lat, end_lon FROM trips WHERE start_time >= 3433892584000 AND start_time < 3433892883999 GROUP BY vehicle\")));\n System.out.println(print(sq.query(\"SELECT start.start_time AS start_time, start.vehicle AS vehicle, start.start_lat AS start_lat, start.start_lon AS start_lon, end.end_time AS end_time, end.end_lat AS end_lat, end.end_lon AS end_lon FROM (SELECT MIN(start_time) AS start_time, vehicle, start_lat, start_lon FROM trips WHERE start_time >= 3433892584000 AND start_time < 3433892883999 GROUP BY vehicle) AS start, (SELECT MAX(end_time) AS end_time, vehicle, end_lat, end_lon FROM trips WHERE start_time >= 3433892584000 AND start_time < 3433892883999 GROUP BY vehicle) AS end WHERE start.vehicle = end.vehicle\")));\n }\n }", "public synchronized Vector<SensorData> getRawData(Date time, boolean plusMinusOneSecond) {\n if (!plusMinusOneSecond) {\n return getRawData(time, time);\n } else {\n return getRawData(new Date(time.getTime() - 1000), new Date(time.getTime() + 1000));\n }\n }", "public int[] gettimestamps(int trackid)\n {\n String timestampsstring;\n\n Cursor res = db.rawQuery( \"select BULKTIME from TRACKDATA where TRACKID=\"+trackid+\"\", null );\n int id[] = new int[res.getCount()];\n res.moveToFirst();\n timestampsstring= res.getString(res.getColumnIndex(\"BULKTIME\"));\n String[] timestamps=timestampsstring.split(\";\");\n int[] timestampslist = new int[timestamps.length];\n int j = 0;\n j = 0;\n for (int i = 0; i < timestamps.length; i++) {\n if(i == 0) {\n timestampslist[i] = Integer.parseInt(timestamps[i]) + trackid;\n }\n else\n {\n timestampslist[i] = timestampslist[i-1] + Integer.parseInt(timestamps[i]) ;\n }\n }\n\n res.close();\n\n return timestampslist;\n }", "public T get(long timestamp) {\n int index = fit(timestamp);\n return get(index);\n }", "private synchronized void getRawData (Date begin, Date end, Vector<SensorData> data) {\n for (SensorData sensorData : rawData) {\n if ((sensorData.getDate().before(end) || sensorData.getDate()\n .equals(end))\n && (sensorData.getDate().after(begin) || sensorData\n .getDate().equals(begin))) {\n data.add(sensorData);\n }\n }\n }", "public ArrayList getDailyPunchList(Badge b, long ts){\n try{\n ArrayList<Punch> punches = new ArrayList<>();\n String originalTimeStamp = new SimpleDateFormat(\"yyyy-MM-dd\").format(ts);\n query = \"SELECT * FROM punch WHERE badgeid = '\" + b.getId() + \"' ORDER BY originaltimestamp\" ;\n pstSelect = conn.prepareStatement(query);\n pstSelect.execute();\n resultset = pstSelect.getResultSet();\n resultset.first();\n \n while(resultset.next()){\n String timestamp = resultset.getString(4);\n if(timestamp.contains(originalTimeStamp) ){\n int dbPunchID = resultset.getInt(1);\n int termID = resultset.getInt(2);\n String badgeID = resultset.getString(3);\n Timestamp dbTS = resultset.getTimestamp(4);\n long longTS = dbTS.getTime();\n int punchType = resultset.getInt(5);\n String otStamp = dbTS.toString();\n\n Punch p = new Punch(b, longTS, punchType, otStamp, dbPunchID, termID);\n\n punches.add(p);\n }\n }\n \n \n \n return punches;\n }\n \n catch(Exception e){\n System.err.println(\"** getDailyPunchList: \" + e.toString());\n }\n \n \n return null;\n }", "@Override\n\tpublic Map getStartandStopByGPS(String terminalId, String start_time,\n\t\t\tString stop_time) {\n\t\tMap map = new HashMap();\n\t\ttry {\n\t\t\tif(start_time.length()==12&&stop_time.length()==12){\n\t\t\t\tString start_time_in_format = start_time.substring(0,2) + \"-\" + start_time.substring(2,4) + \"-\" + start_time.substring(4,6) + \" \" + start_time.substring(6,8) + \":\" + start_time.substring(8,10) + \":\" + start_time.substring(10,12);\n\t\t\t\tString stop_time_in_format = stop_time.substring(0,2) + \"-\" + stop_time.substring(2,4) + \"-\" + stop_time.substring(4,6) + \" \" + stop_time.substring(6,8) + \":\" + stop_time.substring(8,10) + \":\" + stop_time.substring(10,12);\n\t\t\t\tmap.put(\"start_time_in_format\", start_time_in_format);\n\t\t\t\tmap.put(\"stop_time_in_format\", stop_time_in_format);\n\t\t\t\tList<PositionData> position_between = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' and date>'\" + start_time_in_format + \"' and date<'\" + stop_time_in_format + \"' order by date desc\");\n\t\t\t\tfor(int i=0;i<position_between.size();i++){\n\t\t\t\t\tif(position_between.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\t\tposition_between.remove(i);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString start_point = \"Nil\";\n\t\t\t\tString stop_point = \"Nil\";\n\t\t\t\tif(position_between.size()>0){\n\t\t\t\t\tString stop_point_latitude = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.substring(0,stop_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.split(\":\")[1];\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart = stop_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart = \"0.\" + tempStrPart;\n\t\t\t\t\tdouble tempD = Double.parseDouble(tempStrPart)/60*100;\n\t\t\t\t\tstop_point_latitude = Integer.parseInt(stop_point_latitude.split(\"\\\\.\")[0]) + tempD + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString stop_point_longitute = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.substring(0,stop_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.split(\":\")[1];\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart = \"0.\" + stop_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD = Double.parseDouble(_tempStrPart)/60*100;\n\t\t\t\t\tstop_point_longitute = Integer.parseInt(stop_point_longitute.split(\"\\\\.\")[0]) + _tempD + \"\";\n\t\t\t\t\tstop_point = stop_point_longitute + \",\" + stop_point_latitude;\n\t\t\t\t\t\n\t\t\t\t\tString start_point_latitude = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.substring(0,start_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.split(\":\")[1];\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart1 = start_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_latitude = Integer.parseInt(start_point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString start_point_longitute = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.substring(0,start_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.split(\":\")[1];\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart1 = \"0.\" + start_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD1 = Double.parseDouble(_tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_longitute = Integer.parseInt(start_point_longitute.split(\"\\\\.\")[0]) + _tempD1 + \"\";\n\t\t\t\t\tstart_point = start_point_longitute + \",\" + start_point_latitude;\n//\t\t\t\t\tSystem.out.println(start_point + \"-->\" + stop_point);\n//\t\t\t\t\tmap.put(\"start_point\",start_point);\n//\t\t\t\t\tmap.put(\"stop_point\", stop_point);\n\t\t\t\t}\n\t\t\t\treturn map;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public ArrayList<P> getAdvertisingPacketsBetween(long startTimestamp, long endTimestamp) {\n return AdvertisingPacketUtil.getAdvertisingPacketsBetween(new ArrayList<>(advertisingPackets), startTimestamp, endTimestamp);\n }", "public List<com.moseeker.baseorm.db.logdb.tables.pojos.LogEmailSendrecord> fetchByCreateTime(Timestamp... values) {\n return fetch(LogEmailSendrecord.LOG_EMAIL_SENDRECORD.CREATE_TIME, values);\n }", "public void printBlocksUntilTimestamp(LocalDateTime time) {\n Result<GameLogsRecord> result = jooq.selectFrom(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .and(GAME_LOGS.MESSAGE_TYPE.equal(\"BlockPlacedMessage\")\n .or(GAME_LOGS.MESSAGE_TYPE.equal(\"BlockDestroyedMessage\")))\n .and(GAME_LOGS.TIMESTAMP.lessThan(time))\n .orderBy(GAME_LOGS.ID.asc())\n .fetch();\n\n List<Block> placedBlocks = new ArrayList<>();\n List<Block> destroyedBlocks = new ArrayList<>();\n List<Block> presentBlocks = new ArrayList<>();\n\n for (GameLogsRecord record: result) {\n Block curBlock = getBlockFromRecord(record);\n if (record.getMessageType().equals(\"BlockPlacedMessage\")) {\n placedBlocks.add(curBlock);\n presentBlocks.add(curBlock);\n } else if (record.getMessageType().equals(\"BlockDestroyedMessage\")) {\n destroyedBlocks.add(curBlock);\n presentBlocks.remove(curBlock);\n } else {\n throw new RuntimeException(\"Wrong message type \" + record.getMessageType());\n }\n }\n\n System.out.println(\"Placed Blocks\");\n for (Block block: placedBlocks) {\n System.out.println(\" - \" + block.toString());\n }\n\n System.out.println(\"Destroyed Blocks\");\n for (Block block: destroyedBlocks) {\n System.out.println(\" - \" + block.toString());\n }\n\n System.out.println(\"Present Blocks\");\n for (Block block: presentBlocks) {\n System.out.println(\" - \" + block.toString());\n }\n }", "public List<org.nazymko.th.parser.autodao.tables.pojos.ConnectorSyncPageLog> fetchByTime(Timestamp... values) {\n\t\treturn fetch(ConnectorSyncPageLog.CONNECTOR_SYNC_PAGE_LOG.TIME, values);\n\t}", "public ArrayList<TweetContent> retrieveTweet(String userId, String tweetTime){\n String separator = \"|\";\n ArrayList<TweetContent> tweetResults = null;\n\n if(dbType.equals(\"HBase\")){\n String rowKey = \"\\\"\" + pad(userId) + separator + tweetTime + \"\\\"\";\n tweetResults = retrieveDataFromHBase(rowKey);\n }\n else if(dbType.equals(\"MySQL\")){\n String idWithTime = pad(userId) + separator + tweetTime;\n tweetResults = retrieveDataFromMySql(idWithTime);\n\n }\n return tweetResults;\n }", "public String[][][] getSchedule(int userId)throws SQLException{\n //create the arrays\n String[] startTimes;\n String[] endTimes;\n String[] titles;\n String[] locations;\n String[][] times;\n String[][] data;\n String[][][] results;\n \n //declare the size int, used to initialize the arrays\n int size = 0;\n \n //Create the LocalDate objects to use in query\n LocalDate date = LocalDate.now();\n Month month = date.getMonth();\n int year = date.getYear();\n int firstDay = 1;\n int lastDay = date.lengthOfMonth();\n LocalDate begin = LocalDate.of(year, month, firstDay);\n LocalDate end = LocalDate.of(year, month, lastDay);\n \n //Establish the connection\n Connection conn = DriverManager.getConnection(url, user, pass);\n \n //Run query and set size value\n String query = \"SELECT COUNT(*) FROM appointment WHERE userId = \"\n + userId + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n PreparedStatement ps = conn.prepareStatement(query);\n \n ResultSet set = ps.executeQuery(query);\n ResultSetMetaData meta = set.getMetaData();\n int columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n size = set.getInt(i);\n }\n } \n \n //initialize the arrays\n startTimes = new String[size];\n endTimes = new String[size];\n titles = new String[size];\n locations = new String[size];\n \n //Populate the startTimes array\n int x = 0;\n query = \"SELECT start FROM appointment WHERE userId = \" + userId \n + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n ps = conn.prepareStatement(query);\n \n set = ps.executeQuery(query);\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n startTimes[x] = value;\n x++;\n }\n } \n \n //Populate the endTimes array\n x = 0;\n set = ps.executeQuery(\"SELECT end FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n endTimes[x] = value;\n x++;\n }\n }\n \n //Populate the titles array\n x = 0;\n set = ps.executeQuery(\"SELECT title FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n titles[x] = value;\n x++;\n }\n }\n \n //Populate the descriptions array\n x = 0;\n set = ps.executeQuery(\"SELECT location FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n locations[x] = value;\n x++;\n }\n }\n \n //initialize the matrices\n data = new String[][]{titles, locations};\n times = new String[][]{startTimes, endTimes};\n \n results = new String[][][]{data, times};\n return results;\n \n }", "Map<String, Map<Long, Double>> getRawMetrics(String metricName, String parameters, long from, long to);", "public static Map<String, Object> getDeviceStats(long deviceId, long timestamp) {\n Map<String, Object> record = new HashMap<>();\n long tsStart = getTimestampStart(timestamp, initialTimestamp == -1 ? timestamp : initialTimestamp);\n try {\n record = db.getDeviceRecord(deviceId,tsStart);\n }\n catch(SQLException ex) {\n logger.error(String.format(\"ERROR obtaining stats for device %d at timestamp-start %d%n\", deviceId, tsStart));\n ex.printStackTrace();\n }\n catch(Exception ex) {\n ex.printStackTrace();\n }\n return record;\n }", "public void reorderData(Double[] times) {\n _reordered = false;\n\t\tDouble[] longitudes;\n\t\ttry {\n\t\t\tlongitudes = getSampleLongitudes();\n\t\t} catch ( Exception ex ) {\n\t\t\tlongitudes = null;\n\t\t}\n\t\tDouble[] latitudes;\n\t\ttry {\n\t\t\tlatitudes = getSampleLatitudes();\n\t\t} catch ( Exception ex ) {\n\t\t\tlatitudes = null;\n\t\t}\n\t\tDouble[] depths;\n\t\ttry {\n\t\t\tdepths = getSampleDepths();\n\t\t} catch ( Exception ex ) {\n\t\t\tdepths = null;\n\t\t}\n\t\t\n\t\tTreeSet<DataLocation> orderedSet = new TreeSet<DataLocation>();\n\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\tDataLocation dataLoc = new DataLocation();\n\t\t\t// Assign the row index instead of the number\n\t\t\tdataLoc.setRowIndex(rowIdx);\n\t\t\tif ( longitudes != null )\n\t\t\t\tdataLoc.setLongitude(longitudes[rowIdx]);\n\t\t\tif ( latitudes != null )\n\t\t\t\tdataLoc.setLatitude(latitudes[rowIdx]);\n\t\t\tif ( depths != null )\n\t\t\t\tdataLoc.setDepth(depths[rowIdx]);\n\t\t\tif ( times != null ) {\n\t\t\t\tDouble timeValSecs = times[rowIdx];\n\t\t\t\tif ( timeValSecs != null )\n\t\t\t\t\tdataLoc.setDataDate( new Date(Math.round(timeValSecs * 1000.0)) );\n\t\t\t}\n\t\t\t// Leave dataValue as the missing value and add to the ordered set\n\t\t\tif ( ! orderedSet.add(dataLoc) )\n\t\t\t\tthrow new RuntimeException(\"Unexpected duplicate data location with row number\");\n\t\t}\n\n\t\t// Reorder the rows according to the ordering in orderedSet\n\t\t// Just assign the new order of the object arrays; no need to duplicate the objects themselves\n\t\tObject[][] orderedRows = new Object[numSamples][];\n\t\tint rowIdx = 0;\n boolean actuallyReordered = false;\n\t\tfor ( DataLocation dataLoc : orderedSet ) {\n\t\t\t// getRowNumber returns the row index assigned above\n\t\t\torderedRows[rowIdx] = stdObjects[dataLoc.getRowIndex()];\n if ( rowIdx != dataLoc.getRowIndex()) {\n actuallyReordered = true;\n }\n\t\t\trowIdx++;\n\t\t}\n if ( actuallyReordered ) {\n logger.info(\"dataset \" + this.getDatasetName() + \" was reordered by time.\");\n }\n\t\t// Update the array of array of objects to the new ordering\n\t\tstdObjects = orderedRows;\n // force refetch of sample times\n _sampleTimes = null;\n _reordered = true;\n\t}", "@Override\n\tpublic Hashtable getSensorData(String sensorID, long dateTime,\n\t\t\tlong timeDifference) {\n\t\treturn getSensorData(MyApplication.getAppContext(), sensorID, dateTime, timeDifference);\n\t}", "public static GraphFlatPair getFlatPairAroundTimePoint(long timestamp, BaseGraph<AbstractGraphPoint> graph) {\r\n GraphFlatPair result = null;\r\n if (null != graph && 0 < graph.size()) {\r\n GraphFlatCollection<IGraphFlat> allFlats = DTUtil.findAllFlats(graph);\r\n TreeSet<GraphFlatPair> flatPairs = allFlats.getFlatPairs();\r\n for (GraphFlatPair currPair : flatPairs) {\r\n long startTime = currPair.getFirstFlat().getEarliestPoint().getTimestamp();\r\n long endTime = currPair.getSecondFlat().getLatestPoint().getTimestamp();\r\n if (startTime <= timestamp && endTime >= timestamp) {\r\n result = currPair;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public List<com.generator.tables.pojos.CreditChain> fetchByTimeStamp(LocalDateTime... values) {\n return fetch(CreditChain.CREDIT_CHAIN.TIME_STAMP, values);\n }", "public DBResult getEarliestArrivalTimes(int sourceId, Set<Short> routeIds, Set<Integer> businessDay, long fromTime,\n long toTime) throws SQLException {\n String sql = String.format(QUERY_EARLIEST_ARRIVAL_TIMES_HETERO, preparePlaceHolders(routeIds.size()),\n preparePlaceHolders(businessDay.size()));\n PreparedStatement statement = connection.prepareStatement(sql);\n statement = connection.prepareStatement(sql);\n statement.setInt(1, sourceId);\n int idx = setValues(2, statement, routeIds.toArray());\n statement.setLong(idx++, fromTime);\n statement.setLong(idx++, toTime);\n idx = setValues(idx, statement, businessDay.toArray());\n statement.setLong(idx, toTime);\n return new DBResult(statement, statement.executeQuery());\n }", "@RequestMapping(value = \"/lpg\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<LiquefiedPetroleumGasMeasurement>> getLiquefiedPetroleumGasMeasurementBetweenTimestamps(\n\t\t\t@PathVariable String username, @RequestParam(\"from\") long from,\n\t\t\t@RequestParam(\"to\") long to, @RequestParam(value = \"room\", required = false) String room_name) {\n\n\t\tLOG.debug(\"getLiquefiedPetroleumGasMeasurementBetweenTimestamps: \" + from + \" and \"\n\t\t\t\t+ to);\n\n\t\tList<LiquefiedPetroleumGasMeasurement> liquefiedPetroleumGasMeasurement;\n\n\t\ttry {\n\t\t\tliquefiedPetroleumGasMeasurement = gasesMeasurementService\n\t\t\t\t\t.getLiquefiedPetroleumGasMeasurementBetweenTimestamps(username, from,\n\t\t\t\t\t\t\tto, room_name);\n\n\t\t\tif (liquefiedPetroleumGasMeasurement != null) {\n\t\t\t\treturn new ResponseEntity<List<LiquefiedPetroleumGasMeasurement>>(\n\t\t\t\t\t\tliquefiedPetroleumGasMeasurement, HttpStatus.OK);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<List<LiquefiedPetroleumGasMeasurement>>(\n\t\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.warn(e.getMessage());\n\t\t\treturn new ResponseEntity<List<LiquefiedPetroleumGasMeasurement>>(\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}", "private void populateTimes() {\n\n int trackID = preferences.getInt(\"Track\", -1);\n int reverse = preferences.getInt(\"Reverse\", -1);\n Cursor topTimes = DBQueries.getTopTimes(trackID, reverse, \"liststring\", 3, database);\n Cursor latestTimes = DBQueries.getLatestTimes(trackID, reverse, \"liststring\", 3, database);\n\n ListView latestTimeList = (ListView) findViewById(R.id.latestTimes);\n ListView topTimesList = (ListView) findViewById(R.id.topTimes);\n\n ListAdapter topTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n topTimes,\n new String[]{topTimes.getColumnName(topTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n ListAdapter latestTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n latestTimes,\n new String[]{latestTimes.getColumnName(latestTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n\n topTimesList.setAdapter(topTimesAdapter);\n latestTimeList.setAdapter(latestTimesAdapter);\n\n Utilities.setListViewHeightFromContent(topTimesList);\n Utilities.setListViewHeightFromContent(latestTimeList);\n }", "@RequestMapping(value = \"/co\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<CarbonMonoxideMeasurement>> getCarbonMonoxideMeasurementsBetweenTimestamps(\n\t\t\t@PathVariable String username, @RequestParam(\"from\") long from,\n\t\t\t@RequestParam(\"to\") long to, @RequestParam(value = \"room\", required = false) String room_name) {\n\n\t\tLOG.debug(\"getCarbonMonoxideMeasurementsBetweenTimestamps: \" + from + \" and \"\n\t\t\t\t+ to);\n\n\t\tList<CarbonMonoxideMeasurement> carbonMonoxideMeasurementList;\n\n\t\ttry {\n\t\t\tcarbonMonoxideMeasurementList = gasesMeasurementService\n\t\t\t\t\t.getCarbonMonoxideMeasurementBetweenTimestamps(username, from,\n\t\t\t\t\t\t\tto, room_name);\n\n\t\t\tif (carbonMonoxideMeasurementList != null) {\n\t\t\t\treturn new ResponseEntity<List<CarbonMonoxideMeasurement>>(\n\t\t\t\t\t\tcarbonMonoxideMeasurementList, HttpStatus.OK);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<List<CarbonMonoxideMeasurement>>(\n\t\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.warn(e.getMessage());\n\t\t\treturn new ResponseEntity<List<CarbonMonoxideMeasurement>>(\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}", "private Get prepareGet(final byte[] row, final byte[][] columnFamilies,\t\n\t\t\t\t\t\t\t\tfinal long timeStamp, final long[] timeRange) throws IOException {\n\t\t\n\t\tGet get = new Get(row);\n\t\t\n\t\tif(columnFamilies != null)\n\t\t\tfor(byte[] cf : columnFamilies)\n\t\t\t\tget.addFamily(cf);\n\t\t\n\t\tif(timeRange == null)\n\t\t\treturn get.setTimeStamp(timeStamp);\n\t\telse\n\t\t\treturn get.setTimeRange(timeRange[0], timeRange[1]);\t\t\n\t}", "public static byte[] shortCalendarToRawBytes(Calendar timestamp, boolean honorDeviceTimeOffset) {\n\n // The mi-band device currently records sleep\n // only if it happens after 10pm and before 7am.\n // The offset is used to trick the device to record sleep\n // in non-standard hours.\n // If you usually sleep, say, from 6am to 2pm, set the\n // shift to -8, so at 6am the device thinks it's still 10pm\n // of the day before.\n if (honorDeviceTimeOffset) {\n int offsetInHours = getDeviceTimeOffsetHours();\n if (offsetInHours != 0) {\n timestamp.add(Calendar.HOUR_OF_DAY, offsetInHours);\n }\n }\n\n // MiBand2:\n // year,year,month,dayofmonth,hour,minute\n\n byte[] year = fromUint16(timestamp.get(Calendar.YEAR));\n return new byte[] {\n year[0],\n year[1],\n fromUint8(timestamp.get(Calendar.MONTH) + 1),\n fromUint8(timestamp.get(Calendar.DATE)),\n fromUint8(timestamp.get(Calendar.HOUR_OF_DAY)),\n fromUint8(timestamp.get(Calendar.MINUTE))\n };\n }", "@Override\n\tpublic ArrayList<String> getRaw(final String... parameters) {\n\t\treturn this.execute(query,\n\t\t\t\tnew PreparedStatementCallback<ArrayList<String>>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ArrayList<String> doInPreparedStatement(\n\t\t\t\t\t\t\tPreparedStatement arg0) throws SQLException,\n\t\t\t\t\t\t\tDataAccessException {\n\t\t\t\t\t\tArrayList<String> result = new ArrayList<String>();\n\n\t\t\t\t\t\tsetArgs(arg0, parameters);\n\t\t\t\t\t\tResultSet rs = arg0.executeQuery();\n\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\tresult.add(rs.getString(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public List<MeteringDataSec> findWithinTimeRange(final Instant startTime, final Instant untilTime) {\n\t\tInstant until = untilTime == null ? startTime.plus(5, ChronoUnit.MINUTES) : untilTime;\n\n\t\tList<MeteringDataSec> matches = meteringDataRepository.findWithinTimeRange(Timestamp.from(startTime), Timestamp.from(until));\n\t\tif (!matches.isEmpty()) {\n\t\t\tLOG.info(\"findWithinTimeRange found {} entries starting with: {}\", matches.size(), matches.get(0).getCreationTime());\n\t\t}\n\n\t\treturn matches;\n\t}", "@Query(\n \"SELECT wayToWellbeing, SUM(num) AS value FROM ( \" +\n \"SELECT wellbeing_questions.way_to_wellbeing AS wayToWellbeing, SUM(wellbeing_questions.weighting) AS num FROM wellbeing_questions \" +\n \"INNER JOIN wellbeing_records ON wellbeing_records.question_id == wellbeing_questions.wellbeing_question_id \" +\n \"WHERE user_input == 1 AND wellbeing_records.time BETWEEN :startTime AND :endTime \" +\n \"GROUP BY wellbeing_questions.way_to_wellbeing \" +\n \"UNION ALL \" +\n \"SELECT activity_records.way_to_wellbeing AS wayToWellbeing, SUM(\"+ ACTIVITY_OF_TYPE_VALUE +\") AS num FROM survey_activity \" +\n \"INNER JOIN activity_records ON survey_activity.activity_record_id == activity_records.id \" +\n \"INNER JOIN survey_response ON survey_activity.survey_response_id == survey_response.id \" +\n \"WHERE survey_response.timestamp BETWEEN :startTime AND :endTime \" +\n \"GROUP BY activity_records.way_to_wellbeing )\" +\n \"GROUP BY wayToWellbeing\"\n )\n LiveData<List<WellbeingGraphItem>> getWaysToWellbeingBetweenTimes(long startTime, long endTime);", "private String get_RunData(){\n\t\t\n\t\tmyCursor = dbh.db.rawQuery(\"select * from Run where personid = '\"+recid+\"'\",null);\n\t\t\n\t\tint timecol = myCursor.getColumnIndex(\"Timestamp\");\n\t\tint datacol = myCursor.getColumnIndex(\"data\");\n\t\tint run_timecol = myCursor.getColumnIndex(\"run_time\");\n\t\tint pace_col = myCursor.getColumnIndex(\"pace\");\n\t\tint steps_col = myCursor.getColumnIndex(\"steps\");\n\t\tint count = myCursor.getCount();\n\t\tJSONArray jsa = new JSONArray();\n\t\tif(myCursor.getCount() > 0){\n\t\t\tmyCursor.moveToFirst();\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\n\t\t\tString run_times = myCursor.getString(run_timecol);\n\t\t\tTimestamp ts = Timestamp.valueOf(myCursor.getString(timecol));\n\t\t\tdouble data_info = myCursor.getDouble(datacol);\n\t\t\tfloat pace_val = myCursor.getFloat(pace_col);\n\t\t\tfloat steps_val = myCursor.getFloat(steps_col);\n\t\t\tJSONObject js = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjs.put(\"timestamp\", ts);\n\t\t\t\tjs.put(\"data\", data_info);\n\t\t\t\tjs.put(\"pace\", pace_val);\n\t\t\t\tjs.put(\"steps\", steps_val);\n\t\t\t\tjs.put(\"run_time\", run_times);\n\t\t\t\tjs.put(\"id\", recid);\n\t\t\t\tjsa.put(i, js);\n\t\t\t\tmyCursor.moveToNext();\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tlog.info(\"Json exception \"+e.getMessage());\n\t\t\t}\t\n\t\t}\t\n\t\treturn jsa.toString();\n\t\t\n\t}", "public void checkDataOrder(Double[] times) {\n Double[] longitudes;\n Double[] latitudes;\n try {\n longitudes = getSampleLongitudes();\n latitudes = getSampleLatitudes();\n } catch ( Exception ex ) {\n // Messages about problems getting the longitudes or latitudes should already have been generated\n return;\n }\n TreeSet<DataLocation> orderedSet = new TreeSet<DataLocation>();\n for (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n if ( times[rowIdx] != null ) {\n DataLocation dataLoc = new DataLocation();\n // Messages about missing longitude, latitude, or times should already have been generated\n if ( (times[rowIdx] == null) || (longitudes[rowIdx] == null) || (latitudes[rowIdx] == null) )\n continue;\n dataLoc.setDataDate(new Date(Math.round(times[rowIdx] * 1000.0)));\n dataLoc.setLongitude(longitudes[rowIdx]);\n dataLoc.setLatitude(latitudes[rowIdx]);\n dataLoc.setRowNumber(rowIdx + 1);\n if ( !orderedSet.add(dataLoc) )\n throw new RuntimeException(\"Unexpected duplicate data location with row number\");\n }\n }\n\n // TODO: needs a better method of figuring out which rows are actually misordered\n // the following works okay if there is only one block of misordered data\n // or if multiple blocks are consistent in the \"direction\" they are misordered.\n\n double[] maxSpeeds = DashboardConfigStore.getMaxCalcSpeedsKnots();\n double[] maxTimeGaps = DashboardConfigStore.getMaxTimeGapsDays();\n\n // The following will say:\n // 4,5,6 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 1,2 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> forwardErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> forwardSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> forwardTimeGapMsgs = new ArrayList<ADCMessage>();\n int lastRowNum = 0;\n int expectedRowNum = 1;\n for (DataLocation dataLoc : orderedSet) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum < actualRowNum ) {\n forwardErrs.add(expectedRowNum);\n expectedRowNum += 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[actualRowNum - 1],\n latitudes[actualRowNum - 1], longitudes[lastRowNum - 1], latitudes[lastRowNum - 1]);\n double hourdelta = (times[actualRowNum - 1] - times[lastRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n forwardTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n forwardTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum += 1;\n }\n }\n // The following will say:\n // 7,8,9 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 3,4 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> reverseErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> reverseSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> reverseTimeGapMsgs = new ArrayList<ADCMessage>();\n lastRowNum = 0;\n expectedRowNum = numSamples;\n for (DataLocation dataLoc : orderedSet.descendingSet()) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum > actualRowNum ) {\n reverseErrs.add(expectedRowNum);\n expectedRowNum -= 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[lastRowNum - 1],\n latitudes[lastRowNum - 1], longitudes[actualRowNum - 1], latitudes[actualRowNum - 1]);\n double hourdelta = (times[lastRowNum - 1] - times[actualRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n reverseTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n reverseTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum -= 1;\n }\n }\n // Guess that the set with fewer errors is the correct one\n TreeSet<Integer> errorRowsNums;\n ArrayList<ADCMessage> speedMsgs;\n ArrayList<ADCMessage> timeGapMsgs;\n if ( (forwardErrs.size() + forwardSpeedMsgs.size() + forwardTimeGapMsgs.size())\n <= (reverseErrs.size() + reverseSpeedMsgs.size() + reverseTimeGapMsgs.size()) ) {\n errorRowsNums = forwardErrs;\n speedMsgs = forwardSpeedMsgs;\n timeGapMsgs = forwardTimeGapMsgs;\n }\n else {\n errorRowsNums = reverseErrs;\n speedMsgs = reverseSpeedMsgs;\n timeGapMsgs = reverseTimeGapMsgs;\n }\n for (Integer rowNum : errorRowsNums) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(rowNum);\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n String comment = \"time-misordered data row\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage spdmsg : speedMsgs) {\n // Speed problems could be in longitude ...\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or latitude ...\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or time\n for (Integer colIdx : indicesForTime) {\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage tgmsg : timeGapMsgs) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(tgmsg.getSeverity());\n msg.setRowNumber(tgmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(tgmsg.getGeneralComment());\n msg.setDetailedComment(tgmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n }", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "@Override\n public List<Revenue> revenuesForTime(long startTime, long endTime) {\n List<Revenue> revenues = revenueRepository.findAll();\n List<Revenue> foundRevenues = new ArrayList<>();\n for(Revenue revenue : revenues){\n if(revenue.getTimestamp() == startTime || revenue.getTimestamp() == endTime){\n foundRevenues.add(revenue);\n continue;\n }\n if(revenue.getTimestamp() > startTime && revenue.getTimestamp() < endTime ){\n foundRevenues.add(revenue);\n }\n }\n return foundRevenues;\n }", "public Obs findStops_trips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY)\n\t\t\tthrows ParseException {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t/**\n\t\t * Stops sets and time stamps for these stops\n\t\t */\n\t\tString stops = towers[0];\n\t\tString tstops = tstamps[0];\n\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\t/**\n\t\t\t\t * if the time exceeds timing threshold, then check the distance\n\t\t\t\t * between towers. If this distance less than the distance\n\t\t\t\t * threshold, then previous tower is the end of the current\n\t\t\t\t * trip.\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\tcal.setTime(sTime);\n\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tcal.setTime(eTime);\n\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t// if (buffer.size() >= trip_length) {\n\t\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\t\tstops += CLM;\n\t\t\t\t\t\ttstops += CLM;\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * Add start and end of the trips to the stop sequences\n\t\t\t\t\t */\n\t\t\t\t\tstops += buffer.get(buffer.size() - 1);\n\t\t\t\t\ttstops += tbuffer.get(tbuffer.size() - 1);\n\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\t// else {\n\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t/**\n\t\t\t\t * Reset maximum distances\n\t\t\t\t */\n\t\t\t\tmax_distance = 0;\n\t\t\t\t// }\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\t// if (buffer.size() >= trip_length) {\n\t\t\tif (!stops.isEmpty()) {\n\t\t\t\tstops += CLM;\n\t\t\t\ttstops += CLM;\n\t\t\t}\n\t\t\t/**\n\t\t\t * Add start and end of the trips to the stop sequences\n\t\t\t */\n\t\t\tstops += buffer.get(buffer.size() - 1);\n\t\t\ttstops += tbuffer.get(tbuffer.size() - 1);\n\n\t\t\t// }\n\t\t}\n\n\t\t// System.out.println(\"stops:\\t\" + stops);\n\t\t// System.out.println(\"time stamps:\\t\" + tstops);\n\t\treturn new Obs(stops, tstops);\n\n\t}", "public ArrayList<MarkupFeature> getDataForCollaborationRoomSince (long collaborationRoomId,\r\n long timestamp,\r\n SQLiteDatabase database) {\r\n String orderBy = \"seqtime DESC\";\r\n String sqlSelection = \"collabroomid==? AND seqtime>? \";\r\n String[] sqlSelectionArguments = {String.valueOf (collaborationRoomId), String.valueOf (timestamp)};\r\n\r\n return getData (sqlSelection,\r\n sqlSelectionArguments,\r\n orderBy,\r\n NO_LIMIT,\r\n database);\r\n }", "public\n FileGetWorkingTimeStampsRsp\n (\n TaskTimer timer,\n ArrayList<Long> stamps\n )\n { \n super(timer);\n\n if(stamps == null) \n throw new IllegalArgumentException(\"The timestamps cannot be (null)!\");\n pTimeStamps = stamps;\n\n LogMgr.getInstance().logAndFlush\n (LogMgr.Kind.Net, LogMgr.Level.Finest,\n getTimer().toString()); \n }", "public Obs findtrips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY) {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\tboolean marks[] = new boolean[towers.length];\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\ttry {\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t\tmarks[i] = true;\n\n\t\t\t\t\t}\n\t\t\t\t\t// else {\n\t\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t\t/**\n\t\t\t\t\t * Reset maximum distances\n\t\t\t\t\t */\n\t\t\t\t\tmax_distance = 0;\n\t\t\t\t\t// }\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\tmarks[marks.length - 1] = true;\n\t\t}\n\n\t\t/**\n\t\t * User trips buffers.\n\t\t */\n\t\tString trips = towers[0];\n\t\tString tstrips = tstamps[0];\n\n\t\tfor (int i = 1; i < marks.length; i++) {\n\t\t\tboolean mark = marks[i];\n\t\t\ttrips += CLM + towers[i];\n\t\t\ttstrips += CLM + tstamps[i];\n\n\t\t\t/**\n\t\t\t * The end of the previous trip is the start of the new trip.\n\t\t\t */\n\t\t\tif (mark && i != marks.length - 1) {\n\t\t\t\ttrips += RLM + towers[i];\n\t\t\t\ttstrips += RLM + tstamps[i];\n\t\t\t}\n\n\t\t}\n\t\treturn new Obs(trips, tstrips);\n\n\t}", "@Test\n public void ratingAtSameTimeAsStartIsReturned() {\n LocalDateTime firstTime = LocalDateTime.of(2017, Month.JANUARY, 1, 0, 0);\n\n TimePeriod tp = new TimePeriod(firstTime, firstTime.plusHours(4));\n ScoreTime r1 = new ScoreTime(firstTime, 3);\n ScoreTime r2 = new ScoreTime(firstTime.plusHours(3), 3);\n\n List<ScoreTime> returnedList = getRatingsBetweenAndSometimesOneBefore(tp, Arrays.asList(r1, r2));\n assertEquals(2, returnedList.size());\n assertEquals(r1.getTime(), returnedList.get(0).getTime());\n assertEquals(r2.getTime(), returnedList.get(1).getTime());\n }", "public static double getAttHour(String time1, String time2)\r\n/* 178: */ throws ParseException\r\n/* 179: */ {\r\n/* 180:258 */ double hour = 0.0D;\r\n/* 181:259 */ DateFormat fulDate = new SimpleDateFormat(\"HH:mm\");\r\n/* 182:260 */ long t12 = fulDate.parse(\"12:00\").getTime();\r\n/* 183:261 */ long t13 = fulDate.parse(\"13:00\").getTime();\r\n/* 184:262 */ long t1 = fulDate.parse(time1).getTime();\r\n/* 185:263 */ long PERHOUR = 3600000L;\r\n/* 186:264 */ if (time2 == null)\r\n/* 187: */ {\r\n/* 188:265 */ if (t12 - t1 > 0L) {\r\n/* 189:266 */ hour = (t12 - t1) / PERHOUR;\r\n/* 190: */ }\r\n/* 191: */ }\r\n/* 192: */ else\r\n/* 193: */ {\r\n/* 194:269 */ long t2 = fulDate.parse(time2).getTime();\r\n/* 195:270 */ if ((t1 <= t12) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 196:271 */ hour = (t12 - t1) / PERHOUR;\r\n/* 197:272 */ } else if ((t1 <= t12) && (t2 >= t13)) {\r\n/* 198:273 */ hour = (t2 - t1) / PERHOUR - 1.0D;\r\n/* 199:274 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 200:275 */ hour = 0.0D;\r\n/* 201:276 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t13)) {\r\n/* 202:277 */ hour = (t2 - t13) / PERHOUR;\r\n/* 203: */ } else {\r\n/* 204:279 */ hour = (t2 - t1) / PERHOUR;\r\n/* 205: */ }\r\n/* 206: */ }\r\n/* 207:282 */ DecimalFormat df = new DecimalFormat(\"#.0\");\r\n/* 208:283 */ return Double.parseDouble(df.format(hour));\r\n/* 209: */ }", "public Collection<BaseData> getBaseDataByDate(Date startDate, Date endDate){\n\t\tQuery query = em.createQuery(\"from BaseData c where c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (List<BaseData>)query.getResultList();\n\t}", "@Override\r\n\tpublic ArrayList<Board1> getByTime(String startTime) {\n\t\treturn dao.selectByTime(startTime);\r\n\t}", "private VoltTable[] getTransactionData(long interval, final long now) {\n ParameterSet parameters = new ParameterSet();\n parameters.setParameters((byte)interval, now);\n \n return this.executeOncePerSite(SysProcFragmentId.PF_txnData,\n SysProcFragmentId.PF_txnDataAggregator,\n parameters);\n }", "public Map<Map<String, Object>, Map<String, Object>> queryFromAndTo(String siteId, int lastHours, String from, String to, String timeType) {\n String[] fromToIndices = filterRangeDateIndices(from, to, lastHours, timeType);\n boolean isLoggedTime = false;\n if (lastHours > 0 || timeType.equals(\"h\") || timeType.equals(\"m\")) {\n isLoggedTime = true;\n }\n return doMultiRequestForDays(siteId, fromToIndices, isLoggedTime, lastHours, timeType);\n }", "public ArrayList<Timestamp> getQueryParameters(Timestamp from, Timestamp to) {\n ArrayList<Timestamp> params = new ArrayList<Timestamp>();\n params.add(to);\n params.add(to);\n return params;\n }", "public static void queryUberAndStore(LocationAndTime locationAndTime,UberClientUtil uberClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<Price> prices=uberClient.getPriceRequest(requestMap).getPrices();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(prices!=null){\n for(Price price:prices){\n price.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilUber.writeRecordToFile(price);\n }\n }\n\n\n\n\n }", "public DBResult getEarliestArrivalTime(int sourceId, int targetId, Set<Short> routeIds, Set<Integer> businessDay,\n long fromTime, long toTime) throws SQLException {\n String sql = String.format(QUERY_EARLIEST_ARRIVAL_TIME_HOMO, preparePlaceHolders(routeIds.size()),\n preparePlaceHolders(businessDay.size()));\n PreparedStatement statement = connection.prepareStatement(sql);\n statement = connection.prepareStatement(sql);\n statement.setInt(1, sourceId);\n statement.setInt(2, targetId);\n int idx = setValues(3, statement, routeIds.toArray());\n statement.setLong(idx++, fromTime);\n statement.setLong(idx++, toTime);\n idx = setValues(idx, statement, businessDay.toArray());\n statement.setLong(idx, toTime);\n return new DBResult(statement, statement.executeQuery());\n }", "public static byte[] calendarToRawBytes(Calendar timestamp, boolean honorDeviceTimeOffset) {\n\n // The mi-band device currently records sleep\n // only if it happens after 10pm and before 7am.\n // The offset is used to trick the device to record sleep\n // in non-standard hours.\n // If you usually sleep, say, from 6am to 2pm, set the\n // shift to -8, so at 6am the device thinks it's still 10pm\n // of the day before.\n if (honorDeviceTimeOffset) {\n int offsetInHours = getDeviceTimeOffsetHours();\n if (offsetInHours != 0) {\n timestamp.add(Calendar.HOUR_OF_DAY, offsetInHours);\n }\n }\n\n // MiBand2:\n // year,year,month,dayofmonth,hour,minute,second,dayofweek,0,0,tz\n\n byte[] year = fromUint16(timestamp.get(Calendar.YEAR));\n return new byte[] {\n year[0],\n year[1],\n fromUint8(timestamp.get(Calendar.MONTH) + 1),\n fromUint8(timestamp.get(Calendar.DATE)),\n fromUint8(timestamp.get(Calendar.HOUR_OF_DAY)),\n fromUint8(timestamp.get(Calendar.MINUTE)),\n fromUint8(timestamp.get(Calendar.SECOND)),\n dayOfWeekToRawBytes(timestamp),\n 0, // fractions256 (not set)\n // 0 (DST offset?) Mi2\n // k (tz) Mi2\n };\n }", "public long[] window(long timestamp) throws TimeWindowException {\n long[] w = new long[2];\n\n w[0] = windowStart(timestamp);\n w[1] = w[0] + div();\n\n return w;\n }", "@RequestMapping(value = \"/getpatientfromhbase\", method = RequestMethod.GET)\n public Object getPatientResultFromHbase(int patientId, long timestamp) {\n String tableName = \"hbr-data\";\n String columnFamily = \"cf\";\n String column = \"data\";\n String row = \"\";\n long max = 9999999999999L;\n String filterRowKey = \"patient.\"+String.valueOf(patientId)+\".\";\n //ArrayList<Object> array = new ArrayList<Object>();\n JSONArray array = new JSONArray();\n try {\n Configuration configuration = HBaseConfiguration.create();\n Connection conn = ConnectionFactory.createConnection(configuration);\n\n Table table = conn.getTable(TableName.valueOf(tableName));\n PrefixFilter prefixFilter = new PrefixFilter(Bytes.toBytes(filterRowKey));\n\n FilterList filterList = new FilterList();\n\n RowFilter filter1 = new RowFilter(CompareFilter.CompareOp.LESS, new BinaryComparator(Bytes.toBytes(filterRowKey+String.valueOf(max-timestamp))));\n filterList.addFilter(prefixFilter);\n filterList.addFilter(filter1);\n\n Scan s = new Scan();\n s.setFilter(filterList);\n s.addColumn(columnFamily.getBytes(), column.getBytes());\n ResultScanner scanner = table.getScanner(s);\n for (Result r: scanner) {\n Map<String, Object> map = new HashedMap();\n map.put(\"patient\", Bytes.toString(r.getRow()));\n map.put(\"value\", Bytes.toString(r.value()));\n map.put(\"timestamp\", r.raw()[0].getTimestamp());\n array.add(map);\n map.clear();\n }\n //System.out.println(Bytes.toString(result.value()));\n\n return array;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return array;\n }", "@Test\n public void testTimeStampRounding() throws SQLException {\n assumeBinaryModeRegular();\n LocalTime time = LocalTime.parse(\"23:59:59.999999500\");\n Time actual = insertThenReadWithoutType(time, \"time_without_time_zone_column\", Time.class, false/*no roundtrip*/);\n assertEquals(Time.valueOf(\"24:00:00\"), actual);\n }", "public static void main(String[] args) {\n\t\tint[] time1 = new int[2];// 0,0 by default\n\t\tint[] time2 = new int[2];// 0,0 by default\n\n\t\t// System.out.println(time1[0]); //0\n\n\t\ttime1[0] = 19;\n\t\ttime1[1] = 10;\n\n\t\ttime2[0] = 11;\n\t\ttime2[1] = 18;\n\n\t\t// Before comparing, check if both arrays have\n\t\t// valid hour/minute;\n\n\t\tif (time1[0] < 0 || time1[1] > 23) {\n\t\t\tSystem.out.println(\"Time1 has invalid hour\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (time1[1] < 0 || time1[1] > 59) {\n\t\t\tSystem.out.println(\"Time1 has invalid minute\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (time2[0] < 0 || time2[1] > 23) {\n\t\t\tSystem.out.println(\"Time2 has invalid hour\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (time2[1] < 0 || time2[1] > 59) {\n\t\t\tSystem.out.println(\"Time2 has invalid minute\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"*****COMPARE ARRAYS*****\");\n\t\t\n\t\t//COMPARE ARRAYS and tell which one is earlier\n\t\t\n\t\tif (time1[0] < time2[0]) {\n\t\t\tSystem.out.println(\"Time1 is earlier\");\n\t\t}else if (time2[0] < time1[0]) {\n\t\t\tSystem.out.println(\"Time2 is earlier\");\n\t\t}else { //hours are equal. check minutes\n\t\t\tif (time1[1] < time2[1]) {\n\t\t\t\tSystem.out.println(\"Time1 is earlier\");\n\t\t\t} else if (time2[1] < time1[1]) {\n\t\t\t\tSystem.out.println(\"Time2 is earlier\");\n\t\t\t}else { //minutes are equal\n\t\t\t\tSystem.out.println(\"Same time!\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void enterDiffValuesIntoDB() {\n Location senderLocation = new Location(\"\");\n senderLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE)));\n senderLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE)));\n\n Location receiverLocation = new Location(\"\");\n receiverLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LATITUDE)));\n receiverLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LONGITUDE)));\n String distance = Float.toString(senderLocation.distanceTo(receiverLocation));\n databaseHandler.setValueInExpInfo(distance, \"actual_distance\", experimentNumber);\n\n float altDiff = Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_ALTITUDE))\n - Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_ALTITUDE));\n String altitudeDifference = Float.toString(altDiff);\n databaseHandler.setValueInExpInfo(altitudeDifference, \"altitude_difference\", experimentNumber);\n\n getWeatherData();\n }", "@Query(\n \"SELECT wayToWellbeing, SUM(num) AS value FROM ( \" +\n \"SELECT wellbeing_questions.way_to_wellbeing AS wayToWellbeing, SUM(wellbeing_questions.weighting) AS num FROM wellbeing_questions \" +\n \"INNER JOIN wellbeing_records ON wellbeing_records.question_id == wellbeing_questions.wellbeing_question_id \" +\n \"WHERE user_input == 1 AND wellbeing_records.time BETWEEN :startTime AND :endTime \" +\n \"GROUP BY wellbeing_questions.way_to_wellbeing \" +\n \"UNION ALL \" +\n \"SELECT activity_records.way_to_wellbeing AS wayToWellbeing, SUM(\" + ACTIVITY_OF_TYPE_VALUE + \") AS num FROM survey_activity \" +\n \"INNER JOIN activity_records ON survey_activity.activity_record_id == activity_records.id \" +\n \"INNER JOIN survey_response ON survey_activity.survey_response_id == survey_response.id \" +\n \"WHERE survey_response.timestamp BETWEEN :startTime AND :endTime \" +\n \"GROUP BY activity_records.way_to_wellbeing ) \" +\n \"GROUP BY wayToWellbeing\"\n )\n List<WellbeingGraphItem> getWaysToWellbeingBetweenTimesNotLive(long startTime, long endTime);", "public ArrayList<Float> getLatestExerciseValuesItem(String exerciseName) {\n\n ArrayList<Float> latestExerciseValues = new ArrayList<>();\n ArrayList<Long> timestamps = new ArrayList<>();\n long latestTimestamp = 0;\n\n Cursor cursor = db.query(DATABASE_TABLE_EXERCISE_VALUES, new String[] {\n KEY_ID, KEY_EXERCISE, KEY_TIME, KEY_WEIGHT_1, KEY_SET_1, KEY_WEIGHT_2, KEY_SET_2,\n KEY_WEIGHT_3, KEY_SET_3, KEY_WEIGHT_4, KEY_SET_4, KEY_WEIGHT_5, KEY_SET_5,\n KEY_WEIGHT_6, KEY_SET_6, KEY_WEIGHT_7, KEY_SET_7, KEY_WEIGHT_8, KEY_SET_8,\n KEY_WEIGHT_9, KEY_SET_9, KEY_WEIGHT_10, KEY_SET_10}, null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n String exercise = cursor.getString(COLUMN_EXERCISE_NAME_INDEX);\n if (exercise.equals(exerciseName)) {\n long timestamp = cursor.getLong(COLUMN_TIMESTAMP);\n timestamps.add(timestamp);\n }\n } while (cursor.moveToNext());\n }\n\n for (int i = 0; i < timestamps.size(); i++) {\n if (timestamps.get(i) > latestTimestamp) latestTimestamp = timestamps.get(i);\n }\n\n if (cursor.moveToFirst()) {\n do {\n long timestamp = cursor.getLong(COLUMN_TIMESTAMP);\n if (timestamp == latestTimestamp) {\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_1));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_1));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_2));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_2));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_3));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_3));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_4));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_4));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_5));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_5));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_6));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_6));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_7));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_7));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_8));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_8));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_9));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_9));\n latestExerciseValues.add(cursor.getFloat(COLUMN_WEIGHT_10));\n latestExerciseValues.add(cursor.getFloat(COLUMN_SET_10));\n break;\n }\n } while (cursor.moveToNext());\n }\n\n return latestExerciseValues;\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 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 List<cn.com.ho.workflow.infrastructure.db.tables.pojos.ActHiAttachment> fetchByTime_(LocalDateTime... values) {\n return fetch(ActHiAttachment.ACT_HI_ATTACHMENT.TIME_, values);\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTypeByTime(String taskType, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ? AND \"\r\n\t\t\t\t+ \" task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,taskType,time1,time2);\r\n\t}", "private void getTimestamps() {\n \t\tCalendar calendar = new GregorianCalendar(2007,Calendar.JANUARY,1);\n \t\tcalendar.set(2000 + yy, mm - 1, dd, HH, MM);\n \t\tString[] tempstr = new String[6];\n \n \t\tfor(int i = 0; i < r.length; i++) {\n \t\t\tif(calendar.get(Calendar.YEAR) < 10) {\n \t\t\t\ttempstr[0] = \"0\" + str(calendar.get(Calendar.YEAR));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[0] = str(calendar.get(Calendar.YEAR));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.MONTH) < 9) {\n \t\t\t\ttempstr[1] = \"0\" + str(calendar.get(Calendar.MONTH) + 1);\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[1] = str(calendar.get(Calendar.MONTH) + 1);\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.DATE) < 10) {\n \t\t\t\ttempstr[2] = \"0\" + str(calendar.get(Calendar.DATE));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[2] = str(calendar.get(Calendar.DATE));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.HOUR) < 12) {\n \t\t\t\tif(calendar.get(Calendar.AM_PM) == 1) {\n \t\t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR) + 12);\n \t\t\t\t}\n \t\t\t\telse if(calendar.get(Calendar.HOUR) < 10) {\n \t\t\t\t\ttempstr[3] = \"0\" + str(calendar.get(Calendar.HOUR));\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR));\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.MINUTE) < 10) {\n \t\t\t\ttempstr[4] = \"0\" + str(calendar.get(Calendar.MINUTE));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[4] = str(calendar.get(Calendar.MINUTE));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.SECOND) < 10) {\n \t\t\t\ttempstr[5] = \"0\" + str(calendar.get(Calendar.SECOND));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[5] = str(calendar.get(Calendar.SECOND));\n \t\t\t}\n \t\t\t\n \t\t\t//LightMaskClient.appendMainText(\"\\nGettings time\");\n \t\t\t//matTime[i] = calendar.getTimeInMillis();\n \t\t\t//LightMaskClient.appendMainText(\"\\nGot time\" + matTime[i]);\n \n \t\t\t//timestamps[i] = tempstr[3] + \":\" + tempstr[4] + \":\" + tempstr[5] + \" \" + tempstr[1] + \"/\" + tempstr[2] + \"/\" + tempstr[0];\n \t\t\ttimestamps[i] = tempstr[1] + \"/\" + tempstr[2] + \"/\" + tempstr[0] + \" \" + tempstr[3] + \":\" + tempstr[4] + \":\" + tempstr[5];\n \t\t\t//LightMaskClient.appendMainText(\"\\n\" + timestamps[i]);\n \t\t\tcalendar.add(Calendar.SECOND, period);\n \t\t}\n \t}", "@Override\n\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\ttOccslots = new ArrayList<Integer>();\n\t\t\t\tpOccslots = new ArrayList<Integer>();\n\t\t\t\tfor (int i = 0; i < teacherDateList.size(); i++){\n\t\t\t\t\tParseObject o = teacherDateList.get(i);\n\t\t\t\t\ttOccslots.add(o.getInt(Constants.SLOTID));\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < parentDateList.size(); i++){\n\t\t\t\t\tParseObject o = parentDateList.get(i);\n\t\t\t\t\tpOccslots.add(o.getInt(Constants.SLOTID));\n\t\t\t\t}\n \t\t\tParseQuery<ParseObject> query = new ParseQuery<ParseObject>(Constants.TIMELINE);\n \t\t\tquery.whereNotContainedIn(Constants.SLOTID, tOccslots);\n \t\t\tquery.whereNotContainedIn(Constants.SLOTID, pOccslots);\n \t\t\tquery.addAscendingOrder(Constants.SLOTID);\n \t\t\ttry {\n\t\t\t\t\ttimesAvailable = query.find();\n\t\t\t\t} catch (ParseException 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\tqueriedTimes = new ArrayList<Time>();\n for (ParseObject allTimes : timesAvailable){\n \tTime time = new Time();\n \ttime.setSlot(allTimes.getInt(Constants.SLOTID));\n time.setTeacher(tFirstname+Constants.SPACE+tLastname);\n time.setTime(allTimes.getString(Constants.TIME));\n queriedTimes.add(time);\n } \n timesList.addAll(queriedTimes);\n\t\t\t\treturn null;\n\t\t\t}", "@RequestMapping(\"/GetDetail\")\n public Msg<List<Detail>> getDetail(@RequestParam(name = \"userid\") Integer userId,\n @RequestParam(name = \"timestamp\") String timestamp) {\n return detailService.getDetail(userId, timestamp);\n }", "public Double[] checkMissingLonLatTime() {\n try {\n Double[] longitudes = getSampleLongitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( longitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n String comment = \"missing longitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no longitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n try {\n Double[] latitudes = getSampleLatitudes();\n for (int j = 0; j < numSamples; j++) {\n if ( latitudes[j] == null ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n String comment = \"missing latitude\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"no latitude column\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n Double[] times = null;\n try {\n times = calcSampleTimes();\n for (int j = 0; j < numSamples; j++) {\n if ( times[j] == null ) {\n for (int k = 0; k < indicesForTime.length; k++) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(j + 1);\n msg.setColNumber(indicesForTime[k] + 1);\n msg.setColName(userColNames[indicesForTime[k]]);\n String comment = \"invalid sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n }\n } catch ( Exception ex ) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n String comment = \"missing columns for sample date/time specification\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n\n return times;\n }", "public byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;", "public DataValue getLastDataByDeviceIdSortedByTimestamp(String deviceId) throws Exception;", "public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }", "private Builder(com.alibaba.dts.formats.avro.Timestamp other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.timestamp)) {\n this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.millis)) {\n this.millis = data().deepCopy(fields()[1].schema(), other.millis);\n fieldSetFlags()[1] = true;\n }\n }", "@RequestMapping(value = \"/ng\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<NaturalGasMeasurement>> getNaturalGasMeasurementBetweenTimestamps(\n\t\t\t@PathVariable String username, @RequestParam(\"from\") long from,\n\t\t\t@RequestParam(\"to\") long to, @RequestParam(value = \"room\", required = false) String room_name) {\n\n\t\tLOG.debug(\"getNaturalGasMeasurementBetweenTimestamps: \" + from + \" and \"\n\t\t\t\t+ to);\n\n\t\tList<NaturalGasMeasurement> naturalGasMeasurement;\n\n\t\ttry {\n\t\t\tnaturalGasMeasurement = gasesMeasurementService\n\t\t\t\t\t.getNaturalGasMeasurementBetweenTimestamps(username, from,\n\t\t\t\t\t\t\tto, room_name);\n\n\t\t\tif (naturalGasMeasurement != null) {\n\t\t\t\treturn new ResponseEntity<List<NaturalGasMeasurement>>(\n\t\t\t\t\t\tnaturalGasMeasurement, HttpStatus.OK);\n\t\t\t} else {\n\t\t\t\treturn new ResponseEntity<List<NaturalGasMeasurement>>(\n\t\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.warn(e.getMessage());\n\t\t\treturn new ResponseEntity<List<NaturalGasMeasurement>>(\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}", "public static List<String> getAllStartTime(String data) throws SQLException\n {\n \tList<String> all_time = new ArrayList<String>();\n \tResultSet time;\n \tif(data.charAt(0) == 'M')\n \t\ttime = test.readDatabase(\"select distinct Begin_Time from class_2016 where Term_Code = '\"+test.getLatestSemester()+\"' and Monday_Ind1 = 'M' and Wednesday_Ind1 = 'W'and Friday_Ind1 = 'F' and Begin_Time >= 800 and Begin_Time <= 1700 order by Begin_Time\");\n \telse\n \t\ttime = test.readDatabase(\"select distinct Begin_Time from class_2016 where Term_Code = '\"+test.getLatestSemester()+\"' and Tuesday_Ind1 = 'T' and Thursday_Ind1 = 'R' and Begin_Time >= 800 and Begin_Time <= 1700 and (End_Time - Begin_Time) = 120 order by Begin_Time\");\n\t\tall_time = test.writeResultSet(time,\"Begin_Time\");\n \treturn all_time;\n\n }", "public ArrayList<double[]> getRecentCoordinates(){\n Connection connection = null;\n ResultSet resultSet = null;\n PreparedStatement preparedStatement = null;\n\n ArrayList<double[]> coordinates = new ArrayList<double[]>();\n String cordsQuery = \"SELECT bike_id, x_cord, y_cord FROM bike_stats WHERE time >= (now() - INTERVAL 1 MINUTE)\";\n\n try{\n connection = DBCleanup.getConnection();\n\n preparedStatement = connection.prepareStatement(cordsQuery);\n resultSet = preparedStatement.executeQuery();\n while(resultSet.next()) {\n double[] row = new double[3];\n int row0 = resultSet.getInt(\"bike_id\");\n row[0] = (double) row0;\n row[1] = resultSet.getDouble(\"x_cord\");\n row[2] = resultSet.getDouble(\"y_cord\");\n coordinates.add(row);\n }\n return coordinates;\n\n }catch(SQLException e){\n System.out.println(e.getMessage() + \" - getRecentCoordinates()\");\n }finally {\n DBCleanup.closeStatement(preparedStatement);\n DBCleanup.closeResultSet(resultSet);\n DBCleanup.closeConnection(connection);\n }\n return null;\n }", "public Timestamp getOriginalServiceData();", "ResultSet selectByTimeRanch(String from_utc, String to_utc) {\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(selectStmt);\n preparedStatement.setString(1, from_utc);\n preparedStatement.setString(2, to_utc);\n return preparedStatement.executeQuery();\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n }\n return null;\n }", "public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByUpdateTime(Timestamp... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.UPDATE_TIME, values);\n }", "public Obs findStops(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY) {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t/**\n\t\t * Stops sets and time stamps for these stops\n\t\t */\n\t\tString stops = \"\";\n\t\tString tstops = \"\";\n\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\ttry {\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Add buffer mode to the stops\n\t\t\t\t\t\t */\n\t\t\t\t\t\tint index = modeIndex(buffer);\n\t\t\t\t\t\tif (index != -1) {\n\t\t\t\t\t\t\t// System.out.println(\"Find stop\");\n\t\t\t\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\t\t\t\tstops += CLM;\n\t\t\t\t\t\t\t\ttstops += CLM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstops += buffer.get(index);\n\t\t\t\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// else {\n\t\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t\t/**\n\t\t\t\t\t * Reset maximum distances\n\t\t\t\t\t */\n\t\t\t\t\tmax_distance = 0;\n\t\t\t\t\t// }\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\t/**\n\t\t\t * Add buffer mode to the stops\n\t\t\t */\n\t\t\tint index = modeIndex(buffer);\n\t\t\tif (index != -1) {\n\t\t\t\t// System.out.println(\"Find from the remaining buffer\");\n\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\tstops += CLM;\n\t\t\t\t\ttstops += CLM;\n\t\t\t\t}\n\t\t\t\tstops += buffer.get(index);\n\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// System.out.println(\"stops:\\t\" + stops);\n\t\t// System.out.println(\"time stamps:\\t\" + tstops);\n\t\treturn new Obs(stops, tstops);\n\n\t}", "@GetMapping(value = \"/lines\")\n public Set<Line> lines(@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.TIME) LocalTime timestamp, @RequestParam int x,\n @RequestParam int y) {\n LOGGER.info(\"GET lines - params: timestamp={}, x={}, y={}\", timestamp, x, y);\n return lineService.getLines(timestamp, x, y);\n }", "private static String[] getDataForRow(CWaypoint wayPoint) {\r\n\t\tString data[] = new String[1];\r\n\t\tdata[0] = dateFormat.format(wayPoint.getTime());\r\n\t\treturn data;\r\n\t}", "public static Table getcurrentTable(List<Currency> currencies, List<Time>times){\n\n\n Time currentTime = times.get(times.size()-1);\n Time yesterdayTime = times.get(times.size()-2);\n\n\n Table currentTable = new Table(currentTime.getDate(),currencies,currentTime);\n currentTable.setYesterdayTime(yesterdayTime);\n currentTable.setTodayTime(currentTime);\n return currentTable;\n }", "public static Timestamp getSQLTimesTemp(Date data) {\r\n\r\n\t\tTimestamp dt = new Timestamp(data.getTime());\r\n\r\n\t\treturn dt;\r\n\t}", "public ArrayList<Integer> formatTimes(ArrayList<String> times)\n\t\t{\n\t\t \t/* creating the calendar object */\n\t\t\tCalendar startTime = Calendar.getInstance();\n\t\t\t/* setting the start time calendar object based on the first string */\n\t\t\tstartTime.set(Integer.parseInt(times.get(0).substring(0, 4)), \n\t\t\t\t\t\t Integer.parseInt(times.get(0).substring(5, 7)), \n\t\t\t\t\t\t Integer.parseInt(times.get(0).substring(8, 10)), \n\t\t\t\t\t\t Integer.parseInt(times.get(0).substring(11, 13)),\n\t\t\t\t\t\t Integer.parseInt(times.get(0).substring(14, 16)),\n\t\t\t\t\t Integer.parseInt(times.get(0).substring(17, 19)));\n\t\t\t\n\t\t\t/* the arraylist that will be returned by this method */\n\t\t\tArrayList<Integer> timePassed = new ArrayList<Integer>();\n\t\t\ttimePassed.add(0);\n\t\t\t\n\t\t\t/* now, convert each other time string to a calendar object and then calculate the time difference\n\t\t\t * between this one and 0 hour\n\t\t\t */\n\t\t\tfor (int i=1; i<times.size(); i++)\n\t\t\t{\n\t\t\t\tCalendar thisTime = Calendar.getInstance();\n\t\t\t\tthisTime.set(Integer.parseInt(times.get(i).substring(0, 4)), \n\t\t\t\t\t\t \t Integer.parseInt(times.get(i).substring(5, 7)), \n\t\t\t\t\t\t \t Integer.parseInt(times.get(i).substring(8, 10)), \n\t\t\t\t\t\t \t Integer.parseInt(times.get(i).substring(11, 13)),\n\t\t\t\t\t\t \t Integer.parseInt(times.get(i).substring(14, 16)),\n\t\t\t\t\t\t \t Integer.parseInt(times.get(i).substring(17, 19)));\n\t\t\t\t\n\t\t\t\tint differenceHours = (int) ((thisTime.getTimeInMillis() - startTime.getTimeInMillis()) / 3600000);\n\t\t\t\t\n\t\t\t\ttimePassed.add(differenceHours);\n\t\t\t}\n\t\t\t\n\t\t\treturn timePassed;\t\t\t\n\t\t}", "private double[] extractAnnotation(double startTime, double endtime, double sampleRate){\n double timePeriod = 1/sampleRate;\n /*\n This is the sound data represented as a series of samples/frames (each frame is 1 timePeriod long and consists of {bytesPerSample} bytes)\n We calculate which data to read in by rounding down the lower bound to the nearest frame and rounding the higher bound up (can be seen below).\n We want this rounding effect to get a buffer around the annotation, so that we don't lose any of the important data.\n ---------------------------------------\n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |\n ---------------------------------------\n Example:\n Sampling rate : 6Hz\n Time period : 1/6\n Start time : 0.2s\n End time : 0.9s\n Start Frame : roundDown(0.2 / (1/6)) = Frame 1\n End Frame : roundUp(0.9 / (1/6)) = Frame 6 (So we read up but NOT including frame 6).\n */\n int numberOfFramesStart = (int)(startTime / timePeriod);\n int numberOfFramesEnd = (int)Math.ceil(endtime / timePeriod);\n int framesToExtract = numberOfFramesEnd - numberOfFramesStart;\n double[] audioFrames = null;\n try{\n audioFrames = new double[framesToExtract];\n System.arraycopy(fileAsFrames, numberOfFramesStart, audioFrames, 0, framesToExtract);\n return audioFrames;\n } catch(Exception e){\n Main.handleErrorMessage(\"Failed trying to extract frames from buffer\", e);\n }\n return audioFrames;\n }", "public TimeStampReport toTimeStampReport(){\t\t\n\t\tMap<Integer,PlayerWealthDataReport> wData = new HashMap<>();\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\twData.put(w.ownerID, w.toPlayerWealthDataReport());\n\t\t}\n\n\t\treturn new TimeStampReport(_time,wData);\n\t}", "public void MapMyTags() {\n\n\t\t// INITIALIZE THE DB AND ARRAYLIST FOR DB ELEMENTS \n\t\tMsgDatabaseHandler mdb = new MsgDatabaseHandler(getApplicationContext());\n\t\tArrayList<MessageData> message_array_from_db = mdb.Get_Messages();\n\t\t\n\t\tfinal MWMPoint[] points = new MWMPoint[message_array_from_db.size()];\n\t\t\n\t\t// CHECK IF TAGS EXISTS, IF SO PROCESS THE TAGS\n\t\tif (message_array_from_db.size() > 0) {\n\t\t\t\n\t\t\tfor (int i = 0; i < message_array_from_db.size(); i++) {\n\n\t\t\t String tag = message_array_from_db.get(i).getTag();\n\t\t\t String latitude = message_array_from_db.get(i).getLatitude();\n\t\t\t String longitude = message_array_from_db.get(i).getLongitude();\n\t\t\t String _time = message_array_from_db.get(i).getTime();\n\t\t\t \t\t \n\t\t\t Double lat = Double.parseDouble(latitude);\n\t\t\t Double lon = Double.parseDouble(longitude);\n\t\t\t \n\t\t // PROCESS THE TIME DIFFERENCE\n\t\t\t Long then = Long.parseLong(_time);\n\t\t\t\tLong now = System.currentTimeMillis();\n\t\t\t\tString difference = getDifference(now, then);\n\t\t\t\t\n\t\t\t\t// COUNTER FOR TIME SPLIT\n\t\t\t\tint colon = 0;\n\t\t\t\t\n\t\t\t\t// Count colons for proper output\n\t\t\t\tfor(int ix = 0; ix < difference.length(); ix++) {\n\t\t\t\t if(difference.charAt(ix) == ':') colon++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// SPLIT THE DIFFERENCE BY A \":\"\n\t\t\t\tString[] splitDiff = difference.split(\":\");\n\t\t\t\tString hours = null, minutes = null, seconds = null, str = null;\n\t\t\t\t\n\t\t\t\t// CALCULATE THE TIME DIFFERENCE\n\t\t\t\tswitch (colon) {\n\t\t\t\tcase 1:\n\t\t\t\t\tif (Integer.parseInt(splitDiff[0]) == DOUBLE_ZERO) {\n\t\t\t\t\t\tseconds = splitDiff[1];\n\t\t\t\t\t\tif (Integer.parseInt(seconds) > 1) {\n\t\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[1] + \" seconds ago\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (Integer.parseInt(seconds) == 1) {\n\t\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[1] + \" second ago\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (Integer.parseInt(seconds) == DOUBLE_ZERO) {\n\t\t\t\t\t\t\tstr = \"Occurred: \" + \"Happening Now\";\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tminutes = splitDiff[0];\n\t\t\t\t\t\tif (Integer.parseInt(minutes) > 1) {\t\t\t\t\t\t\n\t\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[0] + \" minutes ago\";\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[0] + \" minute ago\";\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\thours = splitDiff[0];\n\t\t\t\t\tif (Integer.parseInt(hours) > 1) {\n\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[0] + \" hours ago\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstr = \"Occurred: \" + splitDiff[0] + \" hour ago\";\n\t\t\t\t\t}\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstr = \"Happening Now\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString mPoint = tag + \"\\n\" + str;\n\t\t\t\t// CALL MAPS WITH ME AND PLOT POINTS ON THE MAP\n\t\t\t points[i] = new MWMPoint(lat, lon, mPoint);\n\t\t\t MapsWithMeApi.showPointsOnMap(this, \"Total Tags: \" + message_array_from_db.size(), points);\n\t\t\t}\n\t\t\tmdb.close();\n\t\t}\n\t\telse {\n\t\t\t// GET THE NAME OF THIS DEVICE \n\t\t\tpreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tString myTagName = preferences.getString(\"tagID\", \"Sender-01\");\n\t\t\t\n\t\t\tgps.getLocation();\n\t\t\tMapsWithMeApi.showPointOnMap(this, gps.getLatitude(), gps.getLongitude(), myTagName + \"\\nMy Position\");\n\t\t}\t\t\n\t}", "public List<MiniEventTimetableConfigPojo> fetchByStartTime(Timestamp... values) {\n\t\treturn fetch(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG.START_TIME, values);\n\t}", "@Override\n protected List<ReceiveItems> doInBackground(String... timestamp) {\n try {\n List<ReceiveItems> receiveItems = SnapCommonUtils.getSyncDatabaseHelper(context).getReceiveItemsDao().queryBuilder().where().rawComparison(\"lastmodified_timestamp\",\">\", new SimpleDateFormat(SnapToolkitConstants.ORMLITE_STANDARD_DATEFORMAT, Locale.getDefault()).parse(timestamp[0])).query();\n for (ReceiveItems object : receiveItems) {\n if (object.getProductSkuID() != null) {\n object.setProductSkuCode(object.getProductSkuID().getProductSkuCode());\n } else {\n //need the else code here\n }\n }\n return receiveItems;\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n return null;\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n return null;\n }\n }", "public List<MiniEventTimetableConfigPojo> fetchByEndTime(Timestamp... values) {\n\t\treturn fetch(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG.END_TIME, values);\n\t}", "@Override\n public void returnData(int hour, int min, int index) {\n switch (index) {\n case 1:\n mTimer1hour = hour;\n mTimer1min = min;\n\n //send data\n sendTimeData(1,true);\n break;\n case 2:\n mTimer2hour = hour;\n mTimer2min = min;\n\n //send data\n sendTimeData(2,true);\n break;\n }\n }", "public long refineTimestamp(long timestamp) {\n long time = (timestamp / windowSlotSize) * windowSlotSize;\n return time;\n }", "public TransformStorage getData(long time) { \n \n if (storage.isEmpty()) {\n // TODO: throw error: \"Cache for frame \" + parentFrame.getFrameID() + \" to \" + childFrame.getFrameID() + \" is empty\";\n return null;\n } else if (storage.size() == 1) {\n // only one transform in cache, so return that one\n return storage.firstEntry().getValue();\n } \n \n TransformStorage low, high; \n \n if (time < storage.firstKey()) {\n // extrapolate back: low = oldest transform\n // high = oldest but one \n low = storage.firstEntry().getValue(); // O(1) (I guess?)\n high = storage.higherEntry(storage.firstKey()).getValue(); // O(log n) --> can be done in O(1), but how?\n } else if (time > storage.lastKey()) {\n // extrapolate forward: low = newest but one\n // high = newest transform \n low = storage.lowerEntry(storage.lastKey()).getValue(); // O(log n) --> can be done in O(1), but how?\n high = storage.lastEntry().getValue(); // O(1) (I guess?)\n } else {\n // interpolate: low = newest transform older than time,\n // high = oldest transform newer than time\n low = storage.ceilingEntry(time).getValue();\n high = storage.floorEntry(time).getValue();\n } \n\n return TransformStorage.interpolate(low, high, time);\n \n }" ]
[ "0.554982", "0.5406476", "0.5172046", "0.5074408", "0.506985", "0.5040807", "0.5016186", "0.49896905", "0.4930881", "0.4870556", "0.4837814", "0.48137432", "0.47993487", "0.4783246", "0.47723803", "0.47567657", "0.47535095", "0.47230792", "0.4711921", "0.47103804", "0.46885806", "0.4668807", "0.4617042", "0.4573481", "0.45495862", "0.45435575", "0.45376202", "0.45242772", "0.4517966", "0.4504373", "0.44834325", "0.4461423", "0.4447454", "0.44445133", "0.44335192", "0.44308165", "0.4420439", "0.44125962", "0.44037947", "0.43895173", "0.4380632", "0.43681425", "0.4365845", "0.43602088", "0.43330473", "0.43219241", "0.43158382", "0.43132278", "0.43103057", "0.42959192", "0.4285279", "0.4272644", "0.426405", "0.4257774", "0.42577124", "0.42421612", "0.4238423", "0.4233424", "0.42280045", "0.42209858", "0.42192712", "0.42177895", "0.42152622", "0.42147464", "0.41975874", "0.4195206", "0.41951847", "0.41911036", "0.41898164", "0.41891414", "0.41882765", "0.41850394", "0.4182311", "0.4176812", "0.4175864", "0.41750464", "0.4173992", "0.41719577", "0.41681635", "0.41658133", "0.4163575", "0.4146214", "0.41414106", "0.41379333", "0.4137087", "0.41366065", "0.413257", "0.41285747", "0.41281694", "0.41275296", "0.4123895", "0.412009", "0.41192305", "0.41153857", "0.41090694", "0.41084248", "0.41069755", "0.4100815", "0.4095841", "0.4091144" ]
0.45594576
24
Get the sensor driver for the given sensor
public IGarmentDriver getSensorDriver() { return sensorDriver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sensor getSensor();", "public Peripheral getHardwareDriverFromSoftwareDriver();", "DeviceSensor createDeviceSensor();", "public PeripheralHardwareDriverInterface getHardwareDriver();", "public String getSensor()\n {\n return sensor;\n }", "private MonitoredSensor getSensorByEFN(String name) {\n for (MonitoredSensor sensor : mSensors) {\n if (sensor.mEmulatorFriendlyName.contentEquals(name)) {\n return sensor;\n }\n }\n return null;\n }", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "public abstract String getDriver();", "public static Sensor getFirstSensor() {\n\t\tSensor retVal = null;\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mEnabled) {\n\t\t\t\tretVal = mSensors.get(x);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t}", "public Sensor getSensor(int index) {\n if (index < 0 || index >= sensors.length)\n throw new IllegalArgumentException\n (\"Sensor index must be between 0 and \" + (sensors.length-1)) ;\n\n return sensors[index] ;\n }", "public static Sensor getSensor(String name) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "Driver getDriver();", "ExternalSensor createExternalSensor();", "private void getSensorService() {\n mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n if (mSensorManager == null) {\n Log.e(TAG, \"----getSystemService failed\");\n\n } else {\n mWakeupUncalibratedGyro = mSensorManager.getDefaultSensor(\n Sensor.TYPE_GYROSCOPE_UNCALIBRATED, true);\n }\n\n if (mWakeupUncalibratedGyro != null) {\n mSensorManager.registerListener(mListener, mWakeupUncalibratedGyro,\n SensorManager.SENSOR_DELAY_UI);\n }\n }", "public synchronized Sensor getSensor(int id)\n {\n return sensors.get(id);\n }", "protected EV3DevPlatform getPlatform() {\n\n //TODO Duplicated code\n final String BATTERY = \"/power_supply\";\n final String BATTERY_PATH = ROOT_PATH + BATTERY;\n final String BATTERY_EV3 = \"legoev3-battery\";\n final String BATTERY_PISTORMS = \"pistorms-battery\";\n final String BATTERY_BRICKPI = \"brickpi-battery\";\n final String BATTERY_BRICKPI3 = \"brickpi3-battery\";\n final String EV3BRICK_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_EV3;\n final String PISTORMS_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_PISTORMS;\n final String BRICKPI_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_BRICKPI;\n final String BRICKPI3_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_BRICKPI3;\n\n if(Sysfs.existPath(EV3BRICK_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(EV3BRICK_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.EV3BRICK);\n return EV3DevPlatform.EV3BRICK;\n } else if(Sysfs.existPath(PISTORMS_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(PISTORMS_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.PISTORMS);\n return EV3DevPlatform.PISTORMS;\n } else if(Sysfs.existPath(BRICKPI_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(BRICKPI_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.BRICKPI);\n return EV3DevPlatform.BRICKPI;\n } else if(Sysfs.existPath(BRICKPI3_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(BRICKPI3_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.BRICKPI3);\n return EV3DevPlatform.BRICKPI3;\n } else {\n final String OS_NAME = System.getProperty(\"os.name\");\n final String OS_VERSION = System.getProperty(\"os.version\");\n final String message = \"Platform not supported: \" + OS_NAME + \" \" + OS_VERSION;\n log.error(message);\n throw new RuntimeException(message);\n }\n }", "public int getSensorId();", "public DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public String getDriver() {\n\t\t\tif (mDriver == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + DRIVER);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tmDriver = list.get(0);\n\t\t\t}\n\t\t\treturn mDriver;\n\t\t}", "org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser();", "public EV3UltrasonicSensor getSensor() {\r\n\t\treturn sensor;\r\n\t}", "GenericFloatSensor sensor();", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "RegisterSensor() {\n }", "public synchronized MonitoringDevice getBySerial(String serial)\n\t{\n\t\tlogger.debug(\"search by serial:\" + serial);\n\t\tInteger id = this.indexBySerial.get(serial);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "Map<String, ISensor> getSensorMap();", "Reference getDevice();", "final int getDriverNum() {\n return device.getDriverNum(this);\n }", "public void requestSensor(String sensorType){\n switch(sensorType){\n case \"SENSOR_ACC\":\n accelerometer = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n phoneSensorsMan.registerListener(sel,accelerometer, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GYRO\":\n gyro = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n phoneSensorsMan.registerListener(sel,gyro, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_MAGNET\":\n magnet = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n phoneSensorsMan.registerListener(sel,magnet, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GPS\":\n phoneLocationMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,100,1,locListener);\n break;\n case \"SENSOR_ORIENTATION\":\n orientation = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n phoneSensorsMan.registerListener(sel,orientation, SensorManager.SENSOR_DELAY_GAME);\n\n\n }\n }", "public SensorData getData(String sensorId){\n return sensors.getData(sensorId);\n }", "public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}", "public RegisterSensor.SensorDescription getRealSensorDescription() {\n return sensorDescription;\n }", "@Override\r\n public Driver getDriver(Integer age) {\r\n if(!drivers.containsKey(age)) {\r\n System.out.println(\"No Driver with age \" + age.toString() + \" is present in the system.\");\r\n return null;\r\n }\r\n return drivers.get(age);\r\n }", "public void selectDriver();", "public int getSensorID() {\n return sensorID;\n }", "public String getSoftwareDriverId();", "public static Mixer getPrimaryCaptureDriver() {\r\n\t\t//final String searchName = \"Microphone (Realtek High Defini\";\r\n\t\t//final String searchName = \"Primary Sound Capture Driver\";\r\n\t\tfinal String searchName = \"Stereo Mix (Realtek High Defini\";// this one for loopback\r\n\t\tMixer.Info infos[] = AudioSystem.getMixerInfo();\r\n\t\t\r\n\t\tfor(Mixer.Info i : infos) {\r\n\t\t\tif(i.getName().equals(searchName)) {\r\n\t\t\t\tif(DEBUG) {\r\n\t\t\t\t\tSystem.out.println(\"Found primary sound capture driver: \" + i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn AudioSystem.getMixer(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(DEBUG) {\r\n\t\t\tSystem.out.println(\"Failed to find sound capture driver, name=\\\"\" + searchName + \"\\\".\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static Sensor getSensor(String name, String address) {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mName.equals(name)) {\n\t\t\t\tif (mSensors.get(x).mAddress.equals(address))\n\t\t\t\t\treturn mSensors.get(x);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getDriver() {\r\n return driver;\r\n }", "public DeviceLocator getDeviceLocator();", "public abstract String getDriver() throws DataServiceException;", "public String getDriver() {\n return driver;\n }", "public String getDriver() {\n return driver;\n }", "public Integer getSensorType() {\n return sensorType;\n }", "String getSensorDataPoint();", "public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }", "String getDeviceName();", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "@Override\r\n\tpublic Shop_Driver findDriverByID(String driverid) {\n\t\treturn shopdriverDao.getById(driverid);\r\n\t}", "public SuperSensor getSensorByTypeName(String type, String name)\n {\n if(type == null || name == null)\n {\n return null;\n }\n return (SuperSensor) sensorModules.getSensorByTypeName(type.toLowerCase(), name.toLowerCase());\n }", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public interface PeripheralSoftwareDriverInterface extends DriverBaseDataEventListener {\r\n\r\n /**\r\n * Is set in the BaseDriver, you can overwrite it, but for debugging\r\n * purposes not handy\r\n */\r\n public final static String DriverBaseName = \"driver:port\";\r\n\r\n /**\r\n * Returns the driver DB id.\r\n * @return \r\n */\r\n public int getId();\r\n \r\n /**\r\n * Starts the driver and runs the thread\r\n */\r\n public void startDriver();\r\n\r\n /**\r\n * Stops the driver and the thread the driver is running in\r\n */\r\n public void stopDriver();\r\n\r\n /**\r\n * Returns the Hardware driver which belongs to the given running software\r\n * driver.\r\n *\r\n * @return\r\n */\r\n public Peripheral getHardwareDriverFromSoftwareDriver();\r\n\r\n \r\n /**\r\n * Returns the hardware driver.\r\n * @return \r\n */\r\n public PeripheralHardwareDriverInterface getHardwareDriver();\r\n \r\n /**\r\n * Returns the amount of active devices attached to this driver.\r\n *\r\n * @return\r\n */\r\n public int getRunningDevicesCount();\r\n\r\n /**\r\n * Returns a list of running devices whom belong to this driver.\r\n *\r\n * @return\r\n */\r\n public List<Device> getRunningDevices();\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay. this function\r\n * should create a batch with a default name (anonymous)\r\n *\r\n * @param batchData Strings with commands\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData);\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay.\r\n *\r\n * @param batchData Strings with commands\r\n * @param batchName String with the name of the batch to use later on with\r\n * runBatch()\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData, String batchName);\r\n\r\n /**\r\n * Runs the batch previously set with the anonymous addBatch\r\n */\r\n public void runBatch();\r\n\r\n /**\r\n * Runs the batch previously set with addBatch with a batchName\r\n *\r\n * @param batchName Name of the batch to run\r\n */\r\n public void runBatch(String batchName);\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @param prefix When having multiple devices supported by the hardware a\r\n * prefix can distinct the device in your hardware\r\n * @return result of the send command\r\n * @throws java.io.IOException\r\n * @Obsolete Use writeBytes.\r\n */\r\n public boolean sendData(String data, String prefix) throws IOException;\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @return the result of the command\r\n * @throws java.io.IOException\r\n * @Obsolete Use WriteBytes.\r\n */\r\n public boolean sendData(String data) throws IOException;\r\n\r\n /**\r\n * Retrieves the name of the class.\r\n *\r\n * @return the name of the class\r\n */\r\n public String getName();\r\n\r\n /**\r\n * For adding an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * for removing an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * Handles data received from the hardware driver to be used by overwriting\r\n * classes.\r\n *\r\n * @param oEvent\r\n */\r\n @Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Driver proxy for hardware data.\r\n *\r\n * @param oEvent\r\n */\r\n public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Returns the package name of the driver as used in the database.\r\n *\r\n * @return The package name of this class\r\n */\r\n public String getPackageName();\r\n\r\n /**\r\n * Adds a device to the listers for whom data can exist.\r\n *\r\n * @param device\r\n */\r\n public void addDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Removes a device from the listeners list.\r\n *\r\n * @param device\r\n */\r\n public void removeDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Handle the data coming from a device driver to dispatch to the hardware\r\n * driver. With this function you can do stuff with the data. For example if\r\n * needed change from string to byte array?\r\n *\r\n * @param device\r\n * @param group\r\n * @param set\r\n * @param deviceData\r\n * @return A string which represents a result, human readable please.\r\n * @throws java.io.IOException\r\n */\r\n public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;\r\n\r\n /**\r\n * Handles data coming from a device as is in the request!\r\n * @param device\r\n * @param request\r\n * @return\r\n * @throws IOException \r\n */\r\n public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;\r\n \r\n /**\r\n * Sets the driver DB id.\r\n * @param driverDBId \r\n */\r\n public void setId(int driverDBId);\r\n \r\n /**\r\n * Sets the named id\r\n * @param dbNameId\r\n */\r\n public void setNamedId(String dbNameId);\r\n \r\n /**\r\n * Gets the named id\r\n * @return \r\n */\r\n public String getNamedId();\r\n \r\n /**\r\n * Returns if the driver supports custom devices.\r\n * @return \r\n */\r\n public boolean hasCustom();\r\n \r\n /**\r\n * Set if a driver has custom devices.\r\n * @param hasCustom\r\n * @return \r\n */\r\n public void setHasCustom(boolean hasCustom);\r\n \r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @param softwareId\r\n */\r\n public void setSoftwareDriverId(String softwareId);\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @param softwareIdVersion\r\n */\r\n public void setSoftwareDriverVersion(String softwareIdVersion);\r\n\r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverId();\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverVersion();\r\n\r\n /**\r\n * Returns true if there is a web presentation present.\r\n *\r\n * @return\r\n */\r\n public boolean hasPresentation();\r\n\r\n /**\r\n * Sets a web presentation;\r\n *\r\n * @param pres\r\n */\r\n public void addWebPresentationGroup(WebPresentationGroup pres);\r\n\r\n /**\r\n * Returns the web presentation.\r\n *\r\n * @return\r\n */\r\n public List<WebPresentationGroup> getWebPresentationGroups();\r\n\r\n /**\r\n * Sets the friendlyname.\r\n * @param name \r\n */\r\n public void setFriendlyName(String name);\r\n \r\n /**\r\n * Returns the friendlyname.\r\n * @return \r\n */\r\n public String getFriendlyName();\r\n \r\n /**\r\n * Sets a link with the device service.\r\n * @param deviceServiceLink \r\n */\r\n public void setDeviceServiceLink(PeripheralDriverDeviceMutationInterface deviceServiceLink);\r\n \r\n /**\r\n * Removes a device service link.\r\n */\r\n public void removeDeviceServiceLink();\r\n \r\n /**\r\n * Indicator to let know a device is loaded.\r\n * @param device \r\n */\r\n public void deviceLoaded(Device device);\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 }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_First(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByUuid_First(uuid, orderByComparator);\n }", "public Sensor findSensorByID(int ID)\n\t{\n\t\tIterator<Entry<String, ArrayList<Sensor>>> it = sensors.entrySet().iterator();\n\t\t\n\t\twhile(it.hasNext()) \n\t\t{\n\t\t\tMap.Entry pair = (Map.Entry) it.next();\n\t\t\tArrayList<Sensor> sensors = (ArrayList<Sensor>) pair.getValue();\n\t\t\t\n\t\t\tfor(Sensor sensor : sensors) {\n\t\t\t\tif(sensor.id() == ID)\n\t\t\t\t{\n\t\t\t\t\treturn sensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public String getCaptureDevice();", "public abstract boolean sensorFound();", "public String getDriver()\n {\n return m_driverName;\n }", "public int getSensorId() {\n\t\treturn sensorid;\n\t}", "public String getRingerDevice();", "public final PeripheralSoftwareDriverInterface getSoftwareDriver(){\n return peripheralSoftware;\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceSensorOutputs/{device}\")\n List<JsonSensorOutput> byDevice(@PathParam(\"device\") int device);", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByUuid_First(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByUuid_First(uuid, orderByComparator);\n }", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "protected HardwareDevice getHardwareOn(String name, Object hardwareDeviceMapping) {\n\n HardwareDevice hardwareDevice = null;\n try {\n HardwareMap.DeviceMapping<HardwareDevice> deviceMapping = (HardwareMap.DeviceMapping<HardwareDevice>) hardwareDeviceMapping;\n hardwareDevice = (HardwareDevice)deviceMapping.get(name);\n }\n catch (Throwable e)\n {\n try {\n ActiveOpMode.handleCatchAllException(e, getTelemetryUtil());\n } catch (InterruptedException e1) {\n //DbgLog.msg(e.getLocalizedMessage());\n }\n\n }\n\n return hardwareDevice;\n }", "public SoSensorCB getFunction() { return func; }", "DeviceClass getDeviceClass();", "public SmartHomeDevice getCustomDevice(String id);", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "Instrument getInstrument(String vendorCode);", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public static Sensor checkAndAddSensor(Context aContext, String name, String address) {\n\t\tSensor s = getSensor(name, address);\n\t\t\n\t\tif (s != null) {\n\t\t\treturn s;\n\t\t}\n\n\t\tif (name.contains(Defines.ZEPHYR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ZEPHYR_ENABLED) {\n\t\t\t\ts = new ZephyrSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.POLAR_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_POLAR_ENABLED) {\n\t\t\t\ts = new PolarSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.WOCKET_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_WOCKETS_ENABLED) {\n\t\t\t\ts = new WocketSensor(aContext, name, address);\n\t\t\t\tmSensors.add(s);\n\t\t\t}\n\t\t} else if (name.contains(Defines.ASTHMAPOLIS_DEVICE_NAME)) {\n\t\t\tif (Globals.IS_ASTHMAPOLIS_ENABLED) {\n\t\t\t\ts = new AsthmapolisSensor(name, address);\n\t\t\t\tmSensors.add(s);\n\n\t\t\t}\n\t\t}\n\n\t\treturn s;\n\t}", "public DataValue getGreatestDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_C_First(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByUuid_C_First(uuid, companyId, orderByComparator);\n }", "public static AppiumDriver getDriver(){\n return appiumDriverList.get(0);\n }", "public List<SuperSensor> getSensorsByClass(Class c)\n {\n return sensorModules.getSensorsByClass(c);\n }", "public Driver getDriver() throws InterruptedException {\n return drivers.take();\n }", "private void readNextSensor(BluetoothGatt gatt) {\n BluetoothGattCharacteristic characteristic;\n switch (mState) {\n case 0:\n Log.d(TAG, \"Reading pressure cal\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_CAL_CHAR);\n break;\n case 1:\n Log.d(TAG, \"Reading pressure\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_DATA_CHAR);\n break;\n case 2:\n Log.d(TAG, \"Reading humidity\");\n characteristic = gatt.getService(HUMIDITY_SERVICE)\n .getCharacteristic(HUMIDITY_DATA_CHAR);\n break;\n default:\n mHandler.sendEmptyMessage(MSG_DISMISS);\n Log.i(TAG, \"All Sensors Enabled\");\n return;\n }\n\n gatt.readCharacteristic(characteristic);\n }", "public Driver getFirstDriver()\n\t{\n\t\tif(unitSpaceAvailable == MAX_QUEUE){return null;}\n\t\treturn queue.get(0);\n\t}", "public org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n }", "public final Device blockingGetHardware() {\n Device hardware = find(false);\n if (hardware != null) {\n return hardware;\n }\n while (!Thread.currentThread().isInterrupted()) {\n try {\n Thread.sleep(2000);\n Device hardware2 = find(false);\n if (hardware2 != null) {\n return hardware2;\n }\n } catch (InterruptedException e) {\n return null;\n }\n }\n return null;\n }", "public Driver findDriverById(long id);", "public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);", "public static String getDriver(){\n\t\treturn HIVE_DRIVER;\n\t}", "DeviceCapabilitiesProvider getDeviceCapabilitiesProvider();", "public static List<String> GetDriverOnSystem() {\n\t\tOSType osType = Utils.getOperatingSystemType();\n\t\tswitch (osType) {\n\t\tcase Windows:\n\t\t\treturn GetDriverOnWindows();\n\t\tcase MacOS:\n\t\t\treturn GetDriverOnMacOS();\n\t\tcase Linux:\n\t\t\treturn GetDriverOnMacOS();\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public final PeripheralHardwareDriverInterface getPeripheralHardwareDriver() throws PeripheralHardwareException {\n if(peripheralDriver!=null){\n return peripheralDriver;\n } else {\n throw new PeripheralHardwareException(\"There is no hardware driver present\");\n }\n }", "public IDevice getNamedDevice(String simpleName) {\n\t\ttry {\n\t\t\treturn (IDevice) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n org.naru.park.ParkController.CommonAction, org.naru.park.ParkController.CommonAction.Builder, org.naru.park.ParkController.CommonActionOrBuilder> \n getGetLatestSensorReadingForUserFieldBuilder() {\n if (getLatestSensorReadingForUserBuilder_ == null) {\n getLatestSensorReadingForUserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.naru.park.ParkController.CommonAction, org.naru.park.ParkController.CommonAction.Builder, org.naru.park.ParkController.CommonActionOrBuilder>(\n getGetLatestSensorReadingForUser(),\n getParentForChildren(),\n isClean());\n getLatestSensorReadingForUser_ = null;\n }\n return getLatestSensorReadingForUserBuilder_;\n }", "public String getSoftwareDriverVersion();", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public static WebDriver getDriver() {\n\t\t\n\t\tString driver = System.getProperty(\"selenium.driver\");\n\t\tif(driver.equals(\"ie\")) {\n\t\t\treturn getIEDriver();\n\t\t\t\n\t\t}\n\t\telse if(driver.equals(\"chrome\")) {\n\t\t\treturn getChromeDriver();\n\t\t}\n\t\t\telse if(driver.equals(\"firefox\")) {\n\t\t\t\treturn getFirefoxriver();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(\"System property selenium driver is not set\");\n\t\t}\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByUuid_C_First(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchByUuid_C_First(uuid, companyId, orderByComparator);\n }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "public Device getByDeviceId(String deviceId) {\n\n try {\n return deviceRepository.findByDeviceId(deviceId);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Override\r\n\tpublic Json_Driver findShopDriverByID(String driverid) {\n\t\treturn shopuserDao.findJsonDriverByD_ID(driverid);\r\n\t}", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchBysensorId_First(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchBysensorId_First(sensorId, orderByComparator);\n }" ]
[ "0.72184175", "0.68307966", "0.6542731", "0.63443017", "0.6331817", "0.6319395", "0.62139785", "0.6106773", "0.60540783", "0.59944916", "0.59433985", "0.590944", "0.5908816", "0.5892391", "0.5856331", "0.5787004", "0.5761592", "0.57252115", "0.566729", "0.5629293", "0.5586682", "0.5574886", "0.55609524", "0.5557965", "0.55451846", "0.55371475", "0.5532505", "0.55276126", "0.5507932", "0.5475951", "0.54720163", "0.5463115", "0.5428312", "0.5424283", "0.54207975", "0.5410241", "0.54084307", "0.5407079", "0.53770995", "0.53614515", "0.53414226", "0.5325061", "0.53245574", "0.5314648", "0.5314648", "0.5303854", "0.5297545", "0.52901506", "0.5286719", "0.5283603", "0.52814883", "0.5280512", "0.5279116", "0.527761", "0.5265602", "0.5253837", "0.524654", "0.5230732", "0.5206942", "0.52017975", "0.5196951", "0.51967895", "0.51831937", "0.5171143", "0.5143593", "0.5142763", "0.51395625", "0.5135667", "0.5124955", "0.5117565", "0.511248", "0.5104207", "0.5091262", "0.50911665", "0.5086349", "0.5083851", "0.5072101", "0.5070981", "0.50635904", "0.5049397", "0.5047748", "0.5046216", "0.50403523", "0.5039277", "0.5030042", "0.5016018", "0.5010191", "0.5006318", "0.49944568", "0.4976044", "0.49750417", "0.49713862", "0.49624318", "0.4962211", "0.49573675", "0.49560133", "0.4948695", "0.49472094", "0.49384055", "0.49362803" ]
0.70962477
1
only an internal helper method to prevent multiple code.
private synchronized void getRawData (Date begin, Date end, Vector<SensorData> data) { for (SensorData sensorData : rawData) { if ((sensorData.getDate().before(end) || sensorData.getDate() .equals(end)) && (sensorData.getDate().after(begin) || sensorData .getDate().equals(begin))) { data.add(sensorData); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public void method_4270() {}", "@Override\n\tprotected void logic() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "public boolean method_216() {\r\n return false;\r\n }", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "public boolean method_196() {\r\n return false;\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "public boolean method_208() {\r\n return false;\r\n }", "@Override\n public void func_104112_b() {\n \n }", "protected void additionalProcessing() {\n\t}", "static void ignore() {\n }", "public boolean method_108() {\r\n return false;\r\n }", "private void m50366E() {\n }", "public boolean method_4088() {\n return false;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public boolean method_214() {\r\n return false;\r\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Override\n public void perish() {\n \n }", "public void method_191() {}", "@Override\n\tprotected void interr() {\n\t}", "public boolean method_198() {\r\n return false;\r\n }", "public boolean method_210() {\r\n return false;\r\n }", "public boolean method_3897() {\r\n return false;\r\n }", "public boolean method_4093() {\n return false;\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public boolean method_4132() {\n return false;\n }", "@Override\n public Object preProcess() {\n return null;\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public boolean method_4102() {\n return false;\n }", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "default boolean isSpecial() { return false; }", "public void trySafeMethod(){\n safeMethod();\n }", "protected void doSomethingElse()\r\n {\r\n \r\n }", "final void checkForComodification() {\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public void swrap() throws NoUnusedObjectExeption;", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected void runBeforeIteration() {}", "private void kk12() {\n\n\t}", "private final void i() {\n }", "public void mo38117a() {\n }", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public final void mo91715d() {\n }", "public void method_203() {}", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "OptimizeResponse() {\n\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void method_9653() {\r\n this.field_9138.method_4479(false);\r\n }", "private static void cajas() {\n\t\t\n\t}", "private IgnoreListHelper() {\n\t}", "public void reuse() {}", "protected Problem() {/* intentionally empty block */}", "static void badMethod() {\n doStuff();\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "private Unescaper() {\n\n\t}", "public void method_115() {}", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "protected void h() {}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private void level7() {\n }", "@Override\n\tpublic boolean allowMultithreading()\n\t{\n\t\treturn true;\n\t}", "@Override\r\n protected final void checkNotPrepared ()\r\n {\r\n if (isPrepared ())\r\n throw new IllegalStateException (\"This object was already prepared and can therefore not be modified: \" +\r\n toString ());\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public boolean method_195() {\r\n return false;\r\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}", "void m1864a() {\r\n }", "public void method_202() {}", "public void m23075a() {\n }", "@Override\n\tpublic void jugar() {}", "public void mo23813b() {\n }", "void berechneFlaeche() {\n\t}", "public void logic(){\r\n\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void fixSingletonIncluded() {\n if (included_strings != null && included_strings.size() == 1) {\n str = included_strings.iterator().next();\n included_strings = null;\n flags &= ~STR;\n }\n }", "public Unsafe method_4123() {\n return null;\n }", "public void method_206() {}", "private CacheBuilder$OneWeigher() {\n void var2_-1;\n void var1_-1;\n }", "protected OpinionFinding() {/* intentionally empty block */}", "public void m9741j() throws cf {\r\n }", "@Override\r\n\tprotected void doF1() {\n\t\t\r\n\t}", "private void privateUnsynchSetThis(Bug1815013 p) {\n this.x = p.get()[0];\n }", "public boolean method_109() {\r\n return true;\r\n }" ]
[ "0.6044926", "0.6044926", "0.6029732", "0.59592915", "0.5886533", "0.58680695", "0.58621943", "0.57458323", "0.5678456", "0.56745094", "0.56356066", "0.562792", "0.5627562", "0.5616221", "0.5595669", "0.55779845", "0.55642515", "0.55576944", "0.5543683", "0.5507566", "0.54873323", "0.547986", "0.5479838", "0.547263", "0.5469526", "0.5420452", "0.54032516", "0.54014117", "0.5401146", "0.5400337", "0.53978497", "0.53919286", "0.5387841", "0.53375113", "0.5322912", "0.5294905", "0.52732563", "0.52659535", "0.52599424", "0.5253645", "0.52402645", "0.52345645", "0.5213677", "0.5208773", "0.5205014", "0.51948065", "0.51866895", "0.5177722", "0.51685166", "0.51684165", "0.5168248", "0.5135498", "0.51320606", "0.51210785", "0.5106396", "0.5105731", "0.51046294", "0.51017296", "0.50986594", "0.50981724", "0.5093308", "0.5085774", "0.50749713", "0.5070704", "0.5070405", "0.50702405", "0.5064878", "0.5057713", "0.5057704", "0.5057213", "0.505715", "0.5054394", "0.50543064", "0.5051751", "0.5049795", "0.5044462", "0.50402194", "0.50392973", "0.50392973", "0.5033282", "0.5032605", "0.50257456", "0.50257456", "0.5016476", "0.5015729", "0.5010173", "0.50027144", "0.5000698", "0.49985117", "0.4997636", "0.499592", "0.49915016", "0.49863744", "0.49828127", "0.49803627", "0.49798098", "0.49788424", "0.4976974", "0.497473", "0.49705243", "0.49666265" ]
0.0
-1
Returns the given number of the newest SensorData of the Sensor.
public synchronized Vector<SensorData> getRawData(int numberOfValues, boolean loadFromStorage) { Vector<SensorData> returnData = new Vector<SensorData>(); if (loadFromStorage && rawData.size() < numberOfValues) { SensorDataDeSerializer deSerializer = new SensorDataDeSerializer(sensorID, returnData, numberOfValues - rawData.size()); long id = deSerializer.work(); while (!SensorDataDeSerializer.jobFinsihed(id)) {} returnData.addAll(rawData); } else { if (rawData.size() <= numberOfValues) { return rawData; } for (int i = rawData.size() - numberOfValues; i < rawData.size(); i++) { returnData.add(rawData.get(i)); } } return returnData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataValue getLastDataByDeviceIdAndSensorTypeSortedByTimestamp(SensorValue sensorVal) throws Exception;", "public SensorData getLastSensorData() {\n if (mSensorData.size() > 0) {\n for (SensorData sensorData : mSensorData) {\n if (sensorData.isDatasetComplete()) {\n return sensorData;\n }\n }\n }\n return null;\n }", "public DataValue getGreatestDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public int getLatestWeather() { //This function goes through the readings Arraylist and gets the most recent weather Code and returns it.\n int code;\n code = readings.get(readings.size() - 1).code;\n return code;\n }", "public DataValue getLastDataByDeviceIdSortedByTimestamp(String deviceId) throws Exception;", "public SensorBean getLatestReading() {\n return latestReading;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n private List<SensorData> getLastSensorData(Session session, int idConcentrator)\n {\n Query query = session\n .createSQLQuery(\n \"SELECT SensorDatas.idMonitorData FROM SensorDatas, Sensors, Concentrators WHERE SensorDatas.idSensor = Sensors.idSensor AND Sensors.idConcentrator = Concentrators.idConcentrator AND Concentrators.idConcentrator = :id ORDER By SensorDatas.timeStamp DESC LIMIT 1\")\n .setParameter(\"id\", idConcentrator);\n List result = query.list();\n if (result.isEmpty()) {\n return null;\n }\n else\n {\n int idMonitorData = (Integer) result.iterator().next();\n Criteria cr = session.createCriteria(SensorData.class)\n .add(Restrictions.eq(\"monitorData.idMonitorData\", idMonitorData));\n return cr.list();\n }\n }", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;", "public Sensor getSensor(int index) {\n if (index < 0 || index >= sensors.length)\n throw new IllegalArgumentException\n (\"Sensor index must be between 0 and \" + (sensors.length-1)) ;\n\n return sensors[index] ;\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_Last(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByUuid_Last(uuid, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findBysensorId_Last(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findBysensorId_Last(sensorId, orderByComparator);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByUuid_C_Last(uuid, companyId, orderByComparator);\n }", "public LocationInfoHandler getLatestLocationInfo (){\n\t\tString selectQuery = \"SELECT * FROM \" + table_locationInfo + \" ORDER BY \" \n\t\t\t\t+ key_date_entry + \" DESC \" + \" LIMIT 1 \" ;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif(cursor.getCount() == 0)\n\t\t\treturn null;\n\t\tcursor.moveToFirst();\n\t\tLocationInfoHandler locationInfoHandlerArray = new LocationInfoHandler(\n\t\t\t\tcursor.getInt(0), \n\t\t\t\tcursor.getInt(1), \n\t\t\t\tcursor.getString(2), \n\t\t\t\tcursor.getString(3), \n\t\t\t\tcursor.getString(4), \n\t\t\t\tcursor.getInt(5), \n\t\t\t\tconvertToBitmap(cursor.getBlob(6))\n\t\t\t\t);\n\t\tdb.close();\n\t\treturn locationInfoHandlerArray;\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchBysensorId_Last(\n long sensorId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchBysensorId_Last(sensorId, orderByComparator);\n }", "public int getSensorCount() {\n return sensorCount ;\n }", "protected long getLastDLRow() {\n List<String> res = dbconnector.execRead(\"SELECT id FROM DW_station_state \" +\n \"ORDER BY id DESC \" +\n \"LIMIT 1\").get(0);\n return Long.parseLong(res.get(0));\n }", "org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser();", "@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}", "@Override\n \tpublic long getLatestSequenceNumber() {\n \t\tsharedLock.lock();\n \t\ttry {\n \t\t\treturn sequenceNumber;\n \t\t} finally {\n \t\t\tsharedLock.unlock();\n \t\t}\n \t}", "public int getLatestPressure() {\n int pressure = 0;\n if (readings.size() > 0) {\n pressure = readings.get(readings.size() - 1).pressure;\n }\n return pressure;\n }", "public int getSensorID() {\n return sensorID;\n }", "public SubLocationHandler getLatestSubLocation (){\n\t\tString selectQuery = \"SELECT * FROM \" + table_subLocation + \" ORDER BY \" \n\t\t\t\t+ key_date_entry + \" DESC \" + \" LIMIT 1 \" ;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif(cursor.getCount() == 0)\n\t\t\treturn null;\n\t\tcursor.moveToFirst();\n\t\tSubLocationHandler subLocationHandlerArray = new SubLocationHandler(\n\t\t\t\tcursor.getInt(0), \n\t\t\t\tcursor.getInt(1), \n\t\t\t\tcursor.getString(2), \n\t\t\t\tcursor.getString(3), \n\t\t\t\tcursor.getDouble(4), \n\t\t\t\tcursor.getDouble(5), \n\t\t\t\tcursor.getInt(6)\n\t\t\t\t);\n\t\tdb.close();\n\t\treturn subLocationHandlerArray;\n\t}", "public SensorData getData(String sensorId){\n return sensors.getData(sensorId);\n }", "public int getSensorId();", "private int getMeasurementVersion(String measurement) {\n synchronized (measurementVersions) {\n if (measurementVersions.containsKey(measurement)) {\n return measurementVersions.get(measurement);\n }\n \n // This should never be necessary, unless the measurement does not exist.\n int value = integerQuery(\"measurements\", \"version\", \"name = ?\", new String[] {measurement}, 0);\n measurementVersions.put(measurement, value);\n return value;\n }\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "protected long getLastCleanedRow() {\n List<String> res = dbconnector.execRead(\"SELECT value FROM MS_DataCleaning_conf \" +\n \"WHERE name='sample_last_cleaned_row'\").get(0);\n return Long.parseLong(res.get(0));\n }", "public LocationHandler getLatestLocation (){\n\t\tString selectQuery = \"SELECT * FROM \" + table_location + \" ORDER BY \" \n\t\t\t\t+ key_date_entry + \" DESC \" + \" LIMIT 1 \" ;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif(cursor.getCount() == 0)\n\t\t\treturn null;\n\t\tcursor.moveToFirst();\n\t\tLocationHandler locationHandlerArray = new LocationHandler(\n\t\t\t\tcursor.getInt(cursor.getColumnIndex(key_id)), \n\t\t\t\tcursor.getInt(cursor.getColumnIndex(key_base_id)), \n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_date_entry)), \n\t\t\t\tcursor.getDouble(cursor.getColumnIndex(key_latitude)), \n\t\t\t\tcursor.getDouble(cursor.getColumnIndex(key_longitude)), \n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_name)), \n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_type)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_search_tag)),\n\t\t\t\tcursor.getDouble(cursor.getColumnIndex(key_amountables)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_description)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_best_seller)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(key_web_site))\n\t\t\t\t);\n\t\tdb.close();\n\t\treturn locationHandlerArray;\n\t}", "public int getSensorId() {\n\t\treturn sensorid;\n\t}", "public LocationTypeHandler getLatestLocationType (){\n\t\tString selectQuery = \"SELECT * FROM \" + table_locationType + \" ORDER BY \" \n\t\t\t\t+ key_date_entry + \" DESC \" + \" LIMIT 1 \" ;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif(cursor.getCount() == 0)\n\t\t\treturn null;\n\t\tcursor.moveToFirst();\n\t\tLocationTypeHandler locationTypeHandlerArray = new LocationTypeHandler(\n\t\t\t\tcursor.getInt(0), \n\t\t\t\tcursor.getInt(1), \n\t\t\t\tcursor.getString(2), \n\t\t\t\tconvertToBitmap(cursor.getBlob(3)),\n\t\t\t\tcursor.getString(4), \n\t\t\t\tcursor.getString(5),\n\t\t\t\tcursor.getString(6),\n\t\t\t\tconvertToBitmap(cursor.getBlob(7))\n\t\t\t\t);\n\t\tdb.close();\n\t\treturn locationTypeHandlerArray;\n\t}", "public Scholl last() {\n String sql = \"SELECT * FROM \" + Value.TABLE_SCHOLLS + \" ORDER BY \" + Value.COLUMN_NODE + \" DESC LIMIT 1\";\n\n Cursor c = db.rawQuery(sql, null);\n\n if (c != null)\n c.moveToFirst();\n\n Scholl scholl = new Scholl();\n scholl.setUid((c.getString(c.getColumnIndex(Value.COLUMN_UID))));\n scholl.setNode(c.getString(c.getColumnIndex(Value.COLUMN_NODE)));\n scholl.setCaption(c.getString(c.getColumnIndex(Value.COLUMN_CAPTION)));\n scholl.setImage(c.getString(c.getColumnIndex(Value.COLUMN_IMAGE)));\n scholl.setCreated(c.getString(c.getColumnIndex(Value.COLUMN_CREATED)));\n scholl.setStatus(c.getString(c.getColumnIndex(Value.COLUMN_STATUS)));\n scholl.setRead(c.getString(c.getColumnIndex(Value.COLUMN_READ)));\n\n c.close();\n\n return scholl;\n }", "public int getSensors() {\n return sensors;\n }", "public void setLatestReading(SensorBean latestReading) {\n this.latestReading = latestReading;\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByUuid_Last(\n java.lang.String uuid,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByUuid_Last(uuid, orderByComparator);\n }", "String getSensorDataPoint();", "private Data getLastCommitData(int varIndex) {\n List<Data> dataList = _dataMap.get(varIndex);\n return dataList.get(dataList.size() - 1);\n }", "protected ValueVersion getLastChunk() {\n\n if (numChunks < 0) {\n throw new IllegalStateException(\"Chunk count is unknown:\" +\n numChunks);\n }\n\n if (numChunks == 0) {\n return null;\n }\n\n final long superChunkId = ((numChunks - 1) / chunksPerPartition) + 1;\n final long chunkId = ((numChunks - 1) % chunksPerPartition) + 1;\n\n final Key lastChunkKey =\n chunkKeyFactory.create(internalLOBKey, superChunkId, chunkId);\n\n return kvsImpl.get(lastChunkKey, Consistency.ABSOLUTE,\n chunkTimeoutMs, TimeUnit.MILLISECONDS);\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue fetchByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchByUuid_C_Last(uuid, companyId, orderByComparator);\n }", "public int getLast() {\n\treturn _last;\n }", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public String get_Sensorcount_text() {\r\n\t\treturn FetchText(DefineSetup_Sensordata_txtBx);\r\n\t}", "public V getLatest() {\n return lastItemOfList(versions);\n }", "public double getElementFromLast(int channel, int position, int DataPointer){\n\t\t\tint index = datapointer - 1 - position;\r\n\t\t\tif(index < 0 ) index += this.datalen;\r\n\r\n\t\t\treturn databuffer[channel][index];\r\n\t\t}", "@Override\n\tpublic FinanceData getLastData() {\n\t\treturn list_fr.get(0);\n\t}", "public int getDataNumber(Key key) {\r\n\t\t\tint ret = -1;\r\n\t\t\t\r\n\t\t\tdata.reset();\r\n\t\t\t//find position of key\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tret = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}", "public final int getLatestPostNumber() {\n\t\treturn this.latestPostNumber;\n\t}", "boolean hasGetLatestSensorReadingForUser();", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int getData(int index) {\n return data_.get(index);\n }", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "private int grabANewNumberForTest() {\n clockPanel.updateTestClock(testNumbersList);\n if (testNumbersList.size() == 0) {\n testOver();\n }\n return testNumbersList.remove((int)(Math.random()*testNumbersList.size()));\n }", "public int getNumberOfSensors() {\n\t\treturn numSensors;\n\t}", "public int getNewNumber() {\r\n int num;\r\n num=unusedLockers.get(0);\r\n unusedLockers.remove(0);\r\n return num;\r\n }", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "protected long getRecordNumber() {\n\t\treturn _nextRecordNumber.getAndIncrement();\n\t}", "@Override\r\n\tpublic double getValue(int index) {\n\t\tif (data==null) return 0;\r\n\t\t\r\n\t\tdouble d = 0;\r\n\t\tint begin=index+pos;\r\n\t\tif (begin<0) begin=0;\r\n\t\tif (begin>data.size()-1) begin = data.size()-1;\r\n\t\td = data.get(begin).getOpen();\r\n\t\t\r\n\t\treturn d;\r\n\t}", "int getLatestCopyNo(int materialID)\n throws SQLException, NoSuchElementException;", "public Taxi getLastInserted() {\n\t\t\n\t\tprepareStatement();\n\t\t\n\t\tquery = \"SELECT * FROM TAXI ORDER BY update DESC LIMIT 1\";\n\t\t\n\t\tlogger.debug(\"Taxi ->getLastInserted()\");\n\t\tlogger.debug(query);\n\t\t\n\t\texecuteStatement();\t\n\t\t\n\t\tassignResult();\n\t\t\n\t\treturn taxi;\n\t}", "public int getData(int index) {\n return data_.get(index);\n }", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public float getLastValue() {\n // ensure float division\n return ((float)(mLastData - mLow))/mStep;\n }", "public T get(long timestamp) {\n int index = fit(timestamp);\n return get(index);\n }", "public int getSensorState() {\n return -1;\n }", "Sensor getSensor();", "public List<Sensor> findLatestByNotLookingTraining() {\n\n Pulse pulse = pulseRepository.findFirstByOrderByCreatedDesc();\n pulse = pulseDataCorrection.fix(pulse);\n\n Acceleration acceleration = accelerationRepository.findFirstByOrderByCreatedDesc();\n\n List<Sensor> sensorList = new ArrayList<Sensor>();\n sensorList.add(acceleration);\n sensorList.add(pulse);\n\n return sensorList;\n }", "public static Sensor getFirstSensor() {\n\t\tSensor retVal = null;\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tif (mSensors.get(x).mEnabled) {\n\t\t\t\tretVal = mSensors.get(x);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t}", "public int[] getTempSensorData()\n {\n return tempSensorData;\n }", "@SuppressWarnings(\"PointlessArithmeticExpression\")\n static int getDataFirstRecord(final int territoryNumber) {\n return INDEX[territoryNumber + POS_INDEX_FIRST_RECORD];\n }", "public int getLast() {\n\t\treturn last;\n\t}", "public String getLastUsedStationNumber()\n\t{\n\t\treturn getValue(WareHouse.LASTUSEDSTATIONNUMBER).toString();\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByCompanyId_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence()\n .findByCompanyId_Last(companyId, orderByComparator);\n }", "private void getLastValueSensor(int id) {\n if (RESPONSES != null) {\n try {\n JSONObject jsonObject = new JSONObject(RESPONSES);\n JSONArray jsonArray = jsonObject.getJSONArray(\"data\");\n for (int i = 0; i <= jsonArray.length() + 1; i++) {\n JSONObject jsonObject1 = new JSONObject(jsonArray.getString(i));\n setId(jsonObject1.getInt(\"id\"));\n //Log.d(TAG, \"ID on the iteration \" + i + \" = \" + getId());\n if (getId() == id) {\n setValue(jsonObject1.getString(\"logvalue\"));\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n setValue(\":)\");\n }\n }", "public static Sample getLastSample(int chan) {\n\t\tString path = LAST + chan;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\treturn getSample(response);\n\t}", "public int getLastProgressivo() {\r\n\t\treturn messageNumber.get();\r\n\t}", "public Observable<Data> start(Sensor sensor){\n return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> {\n DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus());\n return new Data(sensor, dataTypeInt);\n });\n }", "public int minor() {\n\t\treturn identifiers[MINOR_INDEX];\n\t}", "private int getRandNumber() {\n int randNum = 0;\n Random generator = new Random();\n randNum = generator.nextInt(LIST.length()-1);\n return randNum;\n }", "Integer getDataLgth();", "private ProxyDatasetHandler readDatasetScanAddLatest( Element simpleLatestElem, InvCatalogImpl catalog )\r\n {\r\n // Default values is simpleLatestElem is null.\r\n ProxyDatasetHandler latestAdder = null;\r\n String latestName = \"latest.xml\";\r\n boolean latestOnTop = true;\r\n String latestServiceName = \"latest\";\r\n boolean isResolver = true;\r\n\r\n // If simpleLatestElem exists, read values.\r\n if ( simpleLatestElem != null )\r\n {\r\n // Get latest name.\r\n String tmpLatestName = simpleLatestElem.getAttributeValue( \"name\" );\r\n if ( tmpLatestName != null )\r\n latestName = tmpLatestName;\r\n\r\n // Does latest go on top or bottom of list.\r\n Attribute topAtt = simpleLatestElem.getAttribute( \"top\" );\r\n if ( topAtt != null )\r\n {\r\n try\r\n {\r\n latestOnTop = topAtt.getBooleanValue();\r\n }\r\n catch ( DataConversionException e )\r\n {\r\n latestOnTop = true;\r\n }\r\n }\r\n\r\n // Get the latest service name.\r\n String tmpLatestServiceName = simpleLatestElem.getAttributeValue( \"serviceName\" );\r\n if ( tmpLatestServiceName != null )\r\n latestServiceName = tmpLatestServiceName;\r\n\r\n // Get isResolver.\r\n String isResolverString = simpleLatestElem.getAttributeValue( \"isResolver\" );\r\n if ( isResolverString != null )\r\n if ( isResolverString.equalsIgnoreCase( \"false\" ) )\r\n isResolver = false;\r\n }\r\n\r\n // Build the SimpleLatestProxyDsHandler\r\n InvService service = catalog.findService( latestServiceName );\r\n if ( service == null )\r\n logger.warn( \"readDatasetScanAddLatest(): named service <\" + latestServiceName + \"> not found.\" );\r\n else\r\n latestAdder = new SimpleLatestProxyDsHandler( latestName, latestOnTop, service, isResolver );\r\n\r\n return latestAdder;\r\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "com.rpg.framework.database.Protocol.MonsterState getData(int index);", "public Reading get_reading () {\n if (!this.on) {\n return null;\n }\n\n Instant instant = Instant.now();\n return new Reading(\n (float) instant.getEpochSecond(),\n this.currentSensorValue,\n this.stationName,\n this.stationLocation\n );\n }", "@Override\n\tpublic Hashtable getSensorData(Context androidContext, String sensorID, long dateTime,\n\t\t\tlong timeDifference) {\n\t\tString Time_Stamp = \"timestamp\";\n\t\tAndroidSensorDataManager androidSensorDataManager = AndroidSensorDataManagerSingleton.getInstance(androidContext);\n\t\t//androidSensorDataManager.startCollectSensorUsingThreads();\n\t\tAndroidSensorDataContentProviderImpl dataProvider = new AndroidSensorDataContentProviderImpl();\n\t\tandroidSensorDataManager.startSensorDataAcquistionPollingMode(sensorID, dataProvider, null);\n\t\ttry {\n\t\t\tThread.sleep(300);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tboolean dataFound = false;\n\t\tint counter = 0;\n\t\tBundle currentData = null;\n\t\tHashtable bundleHT = null;\n\t\tList<Bundle> sensorDataBundle;\n\t\twhile ( counter <3 && !dataFound ) {\n\t\t\t\tcounter++;\n\t\t\t\t\n\t\t\t\t//using data provider's data\n\t\t\t\t//instead of expensively requery the sensor\n\t\t\t\t//which might be also wrong\n\t\t\t\tsensorDataBundle = dataProvider.getSensorDataReading();\n\t\t\t\t\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n//\t\t\t //\tsensorDataBundle = androidSensorDataManager.get\n\t\t \tsensorDataBundle = androidSensorDataManager.returnSensorDataAndroidAfterInitialization(sensorID, false);\n\t\t }\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n\t\t\t \t//something very slow regarding with sensor reading\n\t\t\t \ttry {\n\t\t\t\t\t\tThread.sleep(500*counter);\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 }\n\t\t\t\tfor ( Bundle curData : sensorDataBundle) {\n\t\t\t\t\t//if ( curData.getLong(Time_Stamp) >= dateTime - timeDifference && curData.getLong(Time_Stamp) <= dateTime + timeDifference ) {\n\t\t\t\t\t\tcurrentData = curData;\n\t\t\t\t\t bundleHT = convertBundleToHash(currentData);\n\t\t\t\t\t\tdataFound = true;\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn bundleHT;\n\t\t\n\t\t\n\t}", "public org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n }", "public double getLastPhotonCount() {\r\n return photoncount;\r\n }", "public double getLastCount()\n {\n\n return this.lastCount;\n }", "private Device selectDeviceWithMostData(List<Device> devices, long[] alreadyPresentDataSize) {\n // Find device with maximum available data;\n Device deviceWithMaximumAvailableData = devices.get(0);\n for (Device d : devices) {\n if (alreadyPresentDataSize[d.getDeviceId()] > alreadyPresentDataSize[deviceWithMaximumAvailableData.getDeviceId()]) {\n deviceWithMaximumAvailableData = d;\n }\n }\n return deviceWithMaximumAvailableData;\n }", "public XYDistribution getNewestMoonDistribution() throws SQLException {\r\n\t\ttry (PreparedStatement ps = m_ogdb\r\n\t\t\t\t.getDatabaseConnection()\r\n\t\t\t\t.prepareStatement(\r\n\t\t\t\t\t\t\"SELECT timestamp, galaxies, systems, moonDistributionString FROM moonDistributions \"\r\n\t\t\t\t\t\t\t\t+ \"WHERE timestamp = (SELECT max(timestamp) FROM moonDistributions);\")) {\r\n\t\t\ttry (ResultSet rs = ps.executeQuery()) {\r\n\t\t\t\tif (rs.next()) {\r\n\t\t\t\t\tLocalDate date = rs.getDate(\"timestamp\",\r\n\t\t\t\t\t\t\tOGameAPIDatabase.serverCalendar).toLocalDate();\r\n\t\t\t\t\tString distributionString = rs\r\n\t\t\t\t\t\t\t.getString(\"moonDistributionString\");\r\n\t\t\t\t\tint galaxies = rs.getInt(\"galaxies\");\r\n\t\t\t\t\tint systems = rs.getInt(\"systems\");\r\n\t\t\t\t\tXYDistribution md = new XYDistribution(date, galaxies,\r\n\t\t\t\t\t\t\tsystems);\r\n\t\t\t\t\tmd.setFromString(distributionString);\r\n\t\t\t\t\treturn md;\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public float getLastServoValue(int servo){\r\n return lastServoValues[getServo(servo)];\r\n }", "public synchronized int addSensor(Sensor s) throws Exception{\n int index = sList.addSensor(s);\n sensors.put(index, s);\n \n listeners.stream().forEach((listener) -> {\n listener.modelEventHandler(ModelEventType.SENSORADDED, index);\n });\n \n s.addListener(this);\n \n return index;\n }", "private int getLatestRuns() {\n // return 90 for simplicity\n return 90;\n }", "public double get(int n) {\n int i = (pointer - 1 - n + memory.length) % memory.length;\n return memory[i];\n }", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "public double lastNum() {\n // Variable of support.\n double supp = this.num;\n while (supp > 10) {\n supp = supp - 10;\n }\n return supp;\n }", "public org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser() {\n if (getLatestSensorReadingForUserBuilder_ == null) {\n return getLatestSensorReadingForUser_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n } else {\n return getLatestSensorReadingForUserBuilder_.getMessage();\n }\n }", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "@Override\n\tpublic String getLastPostingNumber() {\n\t\tString count = userInfoDAO.getLastPostingNumber();\n\t\treturn count;\n\t}", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue findByGroupId_Last(\n long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n com.lrexperts.liferay.liferayofthings.NoSuchSensorValueException {\n return getPersistence().findByGroupId_Last(groupId, orderByComparator);\n }" ]
[ "0.6601442", "0.6442331", "0.6336687", "0.59946495", "0.59490347", "0.59262556", "0.5866039", "0.5796465", "0.5756928", "0.57090163", "0.55371773", "0.5522297", "0.54840755", "0.5475003", "0.54613304", "0.54609424", "0.5433983", "0.5331124", "0.5322373", "0.53054804", "0.52815115", "0.5253719", "0.525036", "0.5209599", "0.5208331", "0.52041215", "0.51582295", "0.5157123", "0.5126445", "0.51223683", "0.5121922", "0.5119368", "0.5087791", "0.507188", "0.5055835", "0.5053851", "0.5051747", "0.503924", "0.5011864", "0.5005329", "0.49975297", "0.49891558", "0.4984213", "0.49792722", "0.4977681", "0.4959039", "0.49556267", "0.49415213", "0.4939734", "0.4935736", "0.4931788", "0.49266368", "0.4917656", "0.49149084", "0.49135143", "0.49095923", "0.49095923", "0.49076584", "0.49027812", "0.48994803", "0.4896541", "0.48897788", "0.48778236", "0.4875336", "0.48736408", "0.48713237", "0.48609054", "0.48596495", "0.48582748", "0.48510543", "0.48462918", "0.48408288", "0.48402506", "0.48328713", "0.48027158", "0.47943366", "0.47921214", "0.47832438", "0.47784373", "0.47765183", "0.47730848", "0.47661868", "0.4764767", "0.47623673", "0.47561055", "0.47558045", "0.4752552", "0.47517142", "0.474736", "0.47422323", "0.47420564", "0.47375378", "0.47366858", "0.47363678", "0.4734222", "0.47318152", "0.47302917", "0.4726801", "0.4722474", "0.47169018", "0.47142768" ]
0.0
-1
sets the rawDataMeasurementSystem [e.g. METRICAL] and the rawDataMeasurementUnit [e.g. KILO] of the Sensor The rawDataMeasurementUnit has to fit to the rawDataMeasurementSystem! so KILO and METRICAL is legal! and KILO and ANGLOSAXON is illegal!
public void setRawDataMeasurementSystemAndUnit( MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit) { if (!rawDataMeasurementUnit .containsMeasurementSystem(rawDataMeasurementSystem)) { throw new IllegalArgumentException(); } this.rawDataMeasurementSystem = rawDataMeasurementSystem; this.rawDataMeasurementUnit = rawDataMeasurementUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDataUnit(String dataUnit) {\n this.dataUnit = dataUnit == null ? null : dataUnit.trim();\n }", "public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }", "public void setUserUnits(String userUnitsString) throws DeviceException {\n\t\t// Make hardware unit compatible if it has not been explicitly set\n\t\tif (!hardwareUnitHasBeenExplicitlySet) {\n\t\t\thardwareUnit = QuantityFactory.createUnitFromString(userUnitsString);\n\t\t\tsetCompatibleUnits();\n\t\t}\n\t\tactuallySetUserUnits(userUnitsString);\n\t\tuserUnitHasBeenExplicitlySet = true;\n\t}", "private void readMeasurementData() {\n if (choice == 1){\n readImperialData();\n } \n if (choice == 2){\n readMetricData();\n }\n }", "public void setHardwareUnitString(String hardwareUnitString) throws DeviceException {\n\t\t// If user unit has been set, check the new hardware unit is compatible\n\t\tif (userUnitHasBeenExplicitlySet && !acceptableUnits.contains(hardwareUnitString)) {\n\t\t\tthrow new DeviceException(\n\t\t\t\t\t\"The hardware unit could not be set to '\" + hardwareUnitString + \"' because this is incompatible\"\n\t\t\t\t\t\t\t+ \" with the explicitly set user unit '\" + userUnit.toString() + \"'\");\n\t\t}\n\n\t\tactuallySetHardwareUnitString(hardwareUnitString);\n\t\thardwareUnitHasBeenExplicitlySet = true;\n\t\tif (!userUnitHasBeenExplicitlySet) {\n\t\t\ttry {\n\t\t\t\tactuallySetUserUnits(hardwareUnitString);\n\t\t\t} catch (DeviceException e) {\n\t\t\t\tthrow new DeviceException(\"Error in setHardwareUnitString for \" + hardwareUnitString, e);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "protected void actuallySetUserUnits(String userUnitsString) throws DeviceException {\n\t\tif (acceptableUnits.contains(userUnitsString)) {\n\t\t\tuserUnit = QuantityFactory.createUnitFromString(userUnitsString);\n\t\t} else {\n\t\t\tuserUnitStringIsNotAcceptable(userUnitsString);\n\t\t}\n\t}", "public UnitsComponent() {\n\t\ttry {\n\t\t\tsetHardwareUnitString(\"\");\n\t\t\tsetUserUnits(\"\");\n\t\t} catch (DeviceException e) {\n\t\t\tlogger.error(\"Code logic error:\", e);\n\t\t}\n\t\tuserUnitHasBeenExplicitlySet = false;\n\t\thardwareUnitHasBeenExplicitlySet = false;\n\t}", "void setStation(String stationType, double band);", "public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}", "public static void setSensorData() throws SensorNotFoundException\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") +\"sensors/?state=\"+Constants.SENSOR_STATE_STOCK;\n\t\tsCollect = new SensorCollection();\n\t\tsCollect.setList(sURL);\n\t\t\t\n\t\tfor (SensorData sData : sCollect.getList())\n\t\t{\n\t\t\tif (sData.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t{\n\t\t\t\tsensorText.setText(sData.getSensorData() + \"\\r\\n\" + \"Device: \"\n\t\t\t\t\t+ (ConnectionManager.getInstance().currentSensor(0).getDeviceName() + \"\\r\\n\" + \"Manufacture: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getManufacturerName() + \"\\r\\n\"\n\t\t\t\t\t\t\t+ \"FlashDate: \" + ConnectionManager.getInstance().currentSensor(0).getFlashDate()\n\t\t\t\t\t\t\t+ \"\\r\\n\" + \"Battery: \"\n\t\t\t\t\t\t\t+ ConnectionManager.getInstance().currentSensor(0).getBatteryVoltage()));\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "public void setUnit(String unit);", "public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n for (int i = 0; i < 40; i++) { \n Double reactorValue = reactorAmplitude * Math.sin(2 * Math.PI * reactorFrequency * ((double) i * 5 / 10000) + reactorPhase);\n Double controlValue = controlAmplitude * Math.sin(2 * Math.PI * controlFrequency * ((double) i * 5 / 10000) + controlPhase);\n if (reactorValue + controlValue > 150) {\n this.outputData.get(0).getData().get(i).setYValue(149);\n overshoot = true;\n } else if (reactorValue + controlValue < -150) {\n this.outputData.get(0).getData().get(i).setYValue(-149);\n overshoot = true;\n } else {\n this.outputData.get(0).getData().get(i).setYValue(reactorValue + controlValue);\n }\n if (this.online == true) {\n this.rmsSum = this.rmsSum + Math.pow(reactorValue + controlValue, 2);\n }\n }\n calculateOutputPower();\n checkForInstability(overshoot);\n }", "public void setUnit () {\n\t\tdouble f = factor;\n\t\t/* Transform the value as a part of Unit */\n\t\tif (Double.isNaN(value)) return;\n\t\tif ((mksa&_log) != 0) {\n\t\t\tif ((mksa&_mag) != 0) value *= -2.5;\n\t\t\tfactor *= AstroMath.dexp(value);\n\t\t\tvalue = 0;\n\t\t}\n\t\telse {\n\t\t\tfactor *= value;\n\t\t\tvalue = 1.;\n\t\t}\n\t\t// Transform also the symbol\n\t\tif (f != factor) {\n\t\t\tif (symbol == null) symbol = edf(factor);\n\t\t\telse symbol = edf(factor) + toExpr(symbol);\n\t\t}\n\t}", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "private void setCompatibleUnits() {\n\t\tacceptableUnits = generateCompatibleUnits(this.hardwareUnit);\n\t}", "private void assignMeasurementData(Measurement measurement, Obsunit obsUnit, List<Object> dataList) {\n for (Object data : dataList) {\n if (data instanceof DataN) {\n DataN dataN = (DataN) data;\n if (obsUnit.getOunitid().equals(dataN.getDataNPK().getOunitid())) {\n int columnIndex = workbookStudy.getVariateColumnIndex(dataN.getDataNPK().getVariatid());\n if (columnIndex != -1) {\n MeasurementData measurementData = new MeasurementData();\n measurementData.setData(dataN);\n measurement.setMeasurementData(columnIndex, measurementData);\n }\n }\n } else if (data instanceof DataC) {\n DataC dataC = (DataC) data;\n if (obsUnit.getOunitid().equals(dataC.getDataCPK().getOunitid())) {\n int columnIndex = workbookStudy.getVariateColumnIndex(dataC.getDataCPK().getVariatid());\n if (columnIndex != -1) {\n MeasurementData measurementData = new MeasurementData();\n measurementData.setData(dataC);\n measurement.setMeasurementData(columnIndex, measurementData);\n }\n }\n }\n }\n }", "public abstract BaseQuantityDt setUnits(String theString);", "public void setUnit(java.lang.String value) {\n\t\tsetValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.UNIT, value);\n\t}", "public void setUnitOfMeasurement(String unitOfMeasurement) {\r\n\t\tthis.unitOfMeasurement = unitOfMeasurement;\r\n\t}", "public final void setUnits() {\r\n\r\n for (final FileMincVarElem element : varArray) {\r\n\r\n if (element.units != null) {\r\n\r\n if (element.name.equals(\"xspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 0);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 0);\r\n }\r\n }\r\n\r\n if (element.name.equals(\"yspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 1);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 1);\r\n }\r\n }\r\n\r\n if (element.name.equals(\"zspace\")) {\r\n\r\n if (element.units.equals(\"mm\")) {\r\n setUnitsOfMeasure(Unit.MILLIMETERS.getLegacyNum(), 2);\r\n } else if (element.units.equals(\"in\")) {\r\n setUnitsOfMeasure(Unit.INCHES.getLegacyNum(), 2);\r\n }\r\n }\r\n }\r\n }\r\n }", "public void setWavelength(float wavelength) {\n/* 61 */ this.wavelength = wavelength;\n/* */ }", "public static void setData() \n\t{\n\t\tsetCustomerData();\n\t\ttry\n\t\t{\n\t\t\tsetSensorData();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "public void setSystemOperationData(byte[] sysOpdata) {\n\t\tthis.systemOperationData=sysOpdata;\n\t}", "public SoilMoistureSensor() {\r\n\t\tthis.cancel = false;\r\n\t\tthis.soilMoisture = 0;\r\n\t\tthis.updateInterval = 90; //Sensor update interval is 90 seconds.\r\n\t}", "@Test\n\tpublic void testchangeUnits1(){\t\t//Celcius to Kelvin\n\t\tTemperature data = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tdata.changeUnits(Temperature.Units.KELVIN);\n\t\tassertEquals(data.getUnits() , Temperature.Units.KELVIN);\n\t\tassertTrue(data.getValue() == 273.15);\n\t}", "public void sensorSystem() {\n\t}", "public void setUnit(Length units) {\n unit = units;\n }", "public void setBaseMtmUsd(double value) {\r\n this.baseMtmUsd = value;\r\n }", "private void updateValues(){\n if (mCelsian != null) {\n mCelsian.readMplTemp();\n mCelsian.readShtTemp();\n mCelsian.readRh();\n mCelsian.readPres();\n mCelsian.readUvaValue();\n mCelsian.readUvbValue();\n mCelsian.readUvdValue();\n mCelsian.readUvcomp1Value();\n mCelsian.readUvcomp2Value();\n }\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n Sensor sensor=event.sensor;\n mMeasure.setMesureX(event.values[0]);\n mMeasure.setMesureY(event.values[1]);\n mMeasure.setMesureZ(event.values[2]);\n switch(sensor.getType()){\n case Sensor.TYPE_ACCELEROMETER:\n mTextArea.getTextValue1().setText(\"X=\" + (double)Math.round(mMeasure.getMesureX() * 100) / 100);\n mTextArea.getTextValue2().setText(\"Y=\" + (double)Math.round(mMeasure.getMesureY() * 100) / 100);\n mTextArea.getTextValue3().setText(\"Z=\" + (double)Math.round(mMeasure.getMesureZ() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Acceleration measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]+\" y=\"+event.values[1]+\" z=\"+event.values[2]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mTextArea.getTextValue1().setText(\"X=\" + (double)Math.round(mMeasure.getMesureX()* 100) / 100);\n mTextArea.getTextValue2().setText(\"Y=\" + (double)Math.round(mMeasure.getMesureY() * 100) / 100);\n mTextArea.getTextValue3().setText(\"Z=\" + (double)Math.round(mMeasure.getMesureZ() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Magnetic field measure\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]+\" y=\"+event.values[1]+\" z=\"+event.values[2]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_PROXIMITY:\n if (mMeasure.getMesureX()==0){\n mTextArea.getTextValue1().setText(\"Object detected\");\n mTextArea.getTextValue1().setBackgroundColor(Color.GREEN);\n } else {\n mTextArea.getTextValue1().setText(\"no object detected\");\n mTextArea.getTextValue1().setBackgroundColor(0xffffffff);\n }\n //mTextArea.getTextValue1().setText(\"\"+mMeasure.getMesureX());\n\n System.out.println(\"\\n\");\n System.out.println(\"Proximity measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_LIGHT:\n mTextArea.getTextValue1().setText(\"\" + (double)Math.round(mMeasure.getMesureX() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Luminosity measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]);\n System.out.println(\"\\n\");\n }\n }", "public void setVolUnits(String v) {\n \t\tpreBoilVol.setUnits(v);\n \t\tpostBoilVol.setUnits(v);\n \t\tcalcMaltTotals();\n \t\tcalcHopsTotals();\n \n \t}", "public void setTime_unit(byte time_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 10, time_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 10, time_unit);\n\t\t}\n\t}", "public void setNewValues(){\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n time = simTime.getText();\n simulation.setTime(time);\n simulation.setD(doorT);\n simulation.setP(phoneT);\n simulation.setQ(questionT);\n }", "public abstract BaseQuantityDt setSystem(String theUri);", "public void setSensorOff() {\n\n }", "public void setUnits(byte units) { this.units = units; }", "void setScale(ScaleSelector sensor, int scaleNo);", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "@Override\n\tpublic void setUnitsString(String units) {\n\t\t\n\t}", "public void SetSpeedRaw(double speed)\n {\n Motors.Set(speed);\n }", "@Override\n public void updateGeneric() {\n if (getRange() <= 0)\n DistanceSensorNonOpIssue.reportIssue(this, getSubsystemName());\n else\n DistanceSensorNonOpIssue.resolveIssue(this);\n }", "public void setUnit(String unit)\n {\n this.unit = unit;\n }", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public void setSystem(byte system) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t}\n\t}", "public void setBUSUNIT(java.lang.CharSequence value) {\n this.BUS_UNIT = value;\n }", "public void setUnitTable(Units value);", "private void updateBaseSetup() throws IOException, TimeOutException, SerialPortException {\n\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, GDE.STRING_ENTRY);\n\t\tif (this.ultraDuoPlusSetup != null) {\n\t\t\tif (this.ultraDuoPlusSetup.getChannelData1() == null || !this.ultraDuoPlusSetup.getChannelData1().isSynced()) {\n\t\t\t\tChannelData1 channelData1 = new ObjectFactory().createUltraDuoPlusTypeChannelData1();\n\t\t\t\tchannelData1.setValue(this.serialPort.readChannelData(1));\n\t\t\t\tthis.ultraDuoPlusSetup.setChannelData1(channelData1);\n\t\t\t}\n\t\t\tif (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 && (this.ultraDuoPlusSetup.getChannelData2() == null || !this.ultraDuoPlusSetup.getChannelData2().isSynced())) {\n\t\t\t\tChannelData2 channelData2 = new ObjectFactory().createUltraDuoPlusTypeChannelData2();\n\t\t\t\tchannelData2.setValue(this.serialPort.readChannelData(2));\n\t\t\t\tthis.ultraDuoPlusSetup.setChannelData2(channelData2);\n\t\t\t}\n\t\t\tthis.device.convert2IntArray(this.channelValues1, this.ultraDuoPlusSetup.channelData1.getValue());\n\t\t\tif (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45) { //no configurable outlet channel 2\n\t\t\t\tthis.device.convert2IntArray(this.channelValues2, this.ultraDuoPlusSetup.channelData2.getValue());\n\t\t\t}\n\t\t\tif (UltraDuoPlusDialog.log.isLoggable(java.util.logging.Level.FINEST)) {\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_CHANNEL_1_SETUP; i++) {\n\t\t\t\t\tsb.append(this.channelValues1[i]).append(GDE.STRING_LEFT_BRACKET).append(i).append(GDE.STRING_RIGHT_BRACKET_COMMA);\n\t\t\t\t}\n\t\t\t\tsb.append(\" : \");//$NON-NLS-1$\n\t\t\t\tfor (int i = 0; this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 && i < UltramatSerialPort.SIZE_CHANNEL_2_SETUP; i++) {\n\t\t\t\t\tsb.append(this.channelValues2[i]).append(GDE.STRING_LEFT_BRACKET).append(i).append(GDE.STRING_RIGHT_BRACKET_COMMA);\n\t\t\t\t}\n\t\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, sb.toString());\n\t\t\t}\n\n\t\t\tif (this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45) {\n\t\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, \"add handler\"); //$NON-NLS-1$\n\t\t\t\t//don't need a change listener handler for baseDeviceSetupGroup and baseDeviceSetupGroup1, it will always written to sync date and time\n\t\t\t\tthis.baseDeviceSetupGroup2.addListener(SWT.Selection, new Listener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handleEvent(Event evt) {\n\t\t\t\t\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, \"baseDeviceSetupComposite2.handleEvent, channelValues2[\" + evt.index + \"] changed\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\t\t\tChannelData2 value = new ChannelData2();\n\t\t\t\t\t\tvalue.setValue(StringHelper.integer2Hex4ByteString(UltraDuoPlusDialog.this.channelValues2));\n\t\t\t\t\t\tUltraDuoPlusDialog.this.ultraDuoPlusSetup.setChannelData2(value);\n\t\t\t\t\t\tUltraDuoPlusDialog.this.ultraDuoPlusSetup.getChannelData2().setChanged(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < UltramatSerialPort.SIZE_CHANNEL_1_SETUP; i++) {\n\t\t\tif (this.channelParameters[i] != null) {\n\t\t\t\tthis.channelParameters[i].setSliderSelection(this.channelValues1[i]);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; this.device.getDeviceTypeIdentifier() != GraupnerDeviceType.UltraDuoPlus45 && i < UltramatSerialPort.SIZE_CHANNEL_2_SETUP; i++) {\n\t\t\tif (this.channelParameters[UltramatSerialPort.SIZE_CHANNEL_1_SETUP + i] != null) {\n\t\t\t\tthis.channelParameters[UltramatSerialPort.SIZE_CHANNEL_1_SETUP + i].setSliderSelection(this.channelValues2[i]);\n\t\t\t}\n\t\t}\n\t\tUltraDuoPlusDialog.log.log(java.util.logging.Level.FINEST, GDE.STRING_EXIT);\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "public void setSample(int x, int y, int b, double s, DataBuffer data) {\n // Bounds check for 'b' will be performed automatically\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n data.setElemDouble(bankIndices[b], y * scanlineStride + x * pixelStride + bandOffsets[b], s);\n }", "public void setUnitOfMeasure(String unitOfMeasure) {\r\n this.unitOfMeasure = unitOfMeasure;\r\n }", "public void setMeasurementArray(){\n\t\tnResults = rt.size();\n\t\tData = new double[4][nResults];\n\t\tfor(int i =1; i<nResults; i++) {\n\t\t\tData[0][i]=i;\n\t\t\tData[1][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Mean\"),i); \n\t\t\tData[2][i]=rt.getValueAsDouble(rt.getColumnIndex(\"StdDev\"),i);\n\t\t\tData[3][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Max\"),i)-rt.getValueAsDouble(rt.getColumnIndex(\"Min\"),i);\n\t\t}\n\t\treturn;\n\t}", "void setStation(double station);", "@Accessor(qualifier = \"Unit\", type = Accessor.Type.SETTER)\n\tpublic void setUnit(final B2BUnitModel value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(UNIT, value);\n\t}", "public void setS0Utilization(double argS0Utilization) {\n s0Utilization = argS0Utilization;\n }", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "public void setTimeUnit(String timeUnit)\n\t{\n\t\tthis.timeUnit = timeUnit;\n\t\ttimeUnitSet = true;\n\t}", "public void sendSensorData(String[] sensor) {\r\n\t\tlogger.info(\"intializing sensors: \" + Arrays.toString(sensor));\r\n\t\treadyToProcessData = false;\r\n\t\tthis.sensor = sensor;\r\n\t\tfor (int i = 0; i < sensor.length; i++) {\r\n\t\t\tif (sensor[i].equals(\"Dist-Nx-v3\")) {\r\n\t\t\t\t// dist_nx = controlClass.getDist_nx();\r\n\t\t\t\tsendCommand(10, 1, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"DIST-NX:\" + dist_nx);\r\n\t\t\t} else if (sensor[i].equals(\"LightSensorArray\")) {\r\n\t\t\t\t// lsa = controlClass.getLsa();\r\n\t\t\t\tsendCommand(10, 2, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"LSA:\" + lsa);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDLinks\")) {\r\n\t\t\t\t// eopdLeft = controlClass.getEopdLeft();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"EOPD links\" + eopdLeft);\r\n\t\t\t} else if (sensor[i].equals(\"EOPDRechts\")) {\r\n\t\t\t\t// eopdRight = controlClass.getEopdRight();\r\n\t\t\t\tsendCommand(10, 3, i + 1, 2);\r\n\t\t\t\t// logger.debug(\"EOPD rechts\" + eopdRight);\r\n\t\t\t} else if (sensor[i].equals(\"AbsoluteIMU-ACG\")) {\r\n\t\t\t\t// absimu_acg = controlClass.getAbsimu_acg();\r\n\t\t\t\tsendCommand(10, 4, i + 1, 0);\r\n\t\t\t\t// logger.debug(\"Gyro\" + absimu_acg);\r\n\t\t\t} else if (sensor[i].equals(\"IRThermalSensor\")) {\r\n\t\t\t\t// tsLeft = controlClass.getTsLeft();\r\n\t\t\t\tsendCommand(10, 5, i + 1, 1);\r\n\t\t\t\t// logger.debug(\"ts left\" + tsLeft);\r\n\t\t\t} else if (sensor[i].equals(\"ColourSensor\")) {\r\n\t\t\t\tsendCommand(10, 6, i + 1, 0);\r\n\t\t\t} else {\r\n\t\t\t\tsendCommand(0, 0, 0, 0);\r\n\t\t\t\tlogger.debug(\"Sensor existiert nicht\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treadyToProcessData = true;\r\n\r\n\t\ttry {\r\n\t\t\tint linearAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.linearAccelaration\"));\r\n\t\t\tint rotationAccelaration = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationAccelaration\"));\r\n\t\t\tint speed = Integer\r\n\t\t\t\t\t.parseInt(propPiServer\r\n\t\t\t\t\t\t\t.getProperty(\"CommunicationPi.BrickControlPi.rotationSpeed\"));\r\n\t\t\tsetLinearAccelaration(linearAccelaration);\r\n\t\t\tsetRotationAccelaration(rotationAccelaration);\r\n\t\t\tsetRotationSpeed(speed);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"sendSensorData: error while parsing properties\");\r\n\t\t}\r\n\t\t// notifyAll();\r\n\t\tlogger.debug(\"sendSensorData flag set to: \" + readyToProcessData);\r\n\t}", "public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}", "protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}", "public void setSensorOn() {\n\n }", "public void setData(ArrayList<SolarSystem> solarSystemToAdapt) {\n this.solarSystemToAdapt = solarSystemToAdapt;\n\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n long now = SystemClock.elapsedRealtime();\n\n long deltaMs = 0;\n if (mLastUpdateTS != 0) {\n deltaMs = now - mLastUpdateTS;\n if (mUpdateTargetMs > 0 && deltaMs < mUpdateTargetMs) {\n // New sample is arriving too fast. Discard it.\n return;\n }\n }\n\n // Format and post message for the emulator.\n float[] values = event.values;\n final int len = values.length;\n\n mChangeMsg.order(getEndian());\n mChangeMsg.position(0);\n mChangeMsg.putInt(getType());\n mChangeMsg.putFloat(values[0]);\n if (len > 1) {\n mChangeMsg.putFloat(values[1]);\n if (len > 2) {\n mChangeMsg.putFloat(values[2]);\n }\n }\n postMessage(ProtocolConstants.SENSORS_SENSOR_EVENT, mChangeMsg);\n\n // Computes average update time for this sensor and average globally.\n if (mLastUpdateTS != 0) {\n if (mGlobalAvgUpdateMs != 0) {\n mGlobalAvgUpdateMs = (mGlobalAvgUpdateMs + deltaMs) / 2;\n } else {\n mGlobalAvgUpdateMs = deltaMs;\n }\n }\n mLastUpdateTS = now;\n\n // Update the UI for the sensor, with a static throttling of 10 fps max.\n if (hasUiHandler()) {\n if (mLastDisplayTS != 0) {\n long uiDeltaMs = now - mLastDisplayTS;\n if (uiDeltaMs < 1000 / 4 /* 4fps in ms */) {\n // Skip this UI update\n return;\n }\n }\n mLastDisplayTS = now;\n\n mValues[0] = values[0];\n if (len > 1) {\n mValues[1] = values[1];\n if (len > 2) {\n mValues[2] = values[2];\n }\n }\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_DISPLAY_MODIFIED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }\n\n if (DEBUG) {\n long now2 = SystemClock.elapsedRealtime();\n long processingTimeMs = now2 - now;\n Log.d(TAG, String.format(\"glob %d - local %d > target %d - processing %d -- %s\",\n mGlobalAvgUpdateMs, deltaMs, mUpdateTargetMs, processingTimeMs,\n mSensor.getName()));\n }\n }", "public SensorData() {\n\n\t}", "public void setUnits(java.lang.String param) {\r\n localUnitsTracker = param != null;\r\n\r\n this.localUnits = param;\r\n }", "void writeEeprom(ImuEepromWriter sensor, int scaleNo, short[] data);", "public void setLogicalUnitNumber(final Integer logicalUnitNumberValue) {\n this.logicalUnitNumber = logicalUnitNumberValue;\n }", "public void setUnit(String unit) {\n this.unit = unit;\n }", "public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "void initialize() {\n setClockSource(MPU6050_CLOCK_PLL_INTERNAL);\n setFullScaleGyroRange(MPU6050_GYRO_FS_250);\n setFullScaleAccelRange(MPU6050_ACCEL_FS_2);\n }", "public void setUnits(int value) {\r\n this.units = value;\r\n }", "@Override\n\tvoid performReading() {\n\t\tthis.humiditySensorMeasurements.setAbsHumidity(this.varibles.get(\"absHumidity\"));\n\t\tthis.humiditySensorMeasurements.setRelHumidity(this.varibles.get(\"relHumidity\"));\n\t\tSensorResults hum = this.humiditySensorMeasurements.measurements();\n\t\n\t/*if (hum == SensorResults.HIGH && temp == SensorResults.HIGH) {\n\t\t\t// System.out.println(\"abnormal temp\");\n\t\t\tthis.creatMessage(\"abnormal hight Humidity\");\n\t\t}\n\t\tif (hum == SensorResults.LOW) {\n\t\t\t// System.out.println(\"abnormal Light\");\n\t\t\tthis.creatMessage(\"abnormal low Humidity\");\n\t\t}/**/\n\t\tmap.put(\"Light\", hum);\n\t\tthis.observer.update();\n\t}", "public void setDataFromLMS(java.lang.String dataFromLMS);", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public void setMass_unit(byte mass_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 9, mass_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 9, mass_unit);\n\t\t}\n\t}", "private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}", "private void resetSense() {\r\n\t\tArrays.fill(this.senseBytes, (byte)0x00);\r\n\t\tthis.updateUnitStatus();\r\n\t}", "public void setMagnitudeSystem ( MagnitudeSystem system ) {\r\n\t\tthis.system = system;\r\n\t}", "private Measurement getMeasurements(){\n Measurement measurement = new Measurement();\n\n //set to date of measurement added\n measurement.setDate(new Date());\n\n //retrieve measurement data from edit texts. if edit text is empty make measurement 0;\n String neckString = neckEditText.getText().toString();\n double neck = (!neckString.equals(\"\")) ? Double.parseDouble(neckString) : 0;\n measurement.setNeck(neck);\n\n String chestString = chestEditText.getText().toString();\n double chest = (!chestString.equals(\"\")) ? Double.parseDouble(chestString) : 0;\n measurement.setChest(chest);\n\n String shoulderString = shoulderEditText.getText().toString();\n double shoulders = (!shoulderString.equals(\"\")) ? Double.parseDouble(shoulderString) : 0;\n measurement.setShoulders(shoulders);\n\n String leftArmString = leftArmEditText.getText().toString();\n double leftArm = (!leftArmString.equals(\"\")) ? Double.parseDouble(leftArmString) : 0;\n measurement.setLeftArm(leftArm);\n\n String rightArmString = rightArmEditText.getText().toString();\n double rightArm = (!rightArmString.equals(\"\")) ? Double.parseDouble(rightArmString) : 0;\n measurement.setRightArm(rightArm);\n\n String leftForearmString = leftForearmEditText.getText().toString();\n double leftForearm = (!leftForearmString.equals(\"\")) ? Double.parseDouble(leftForearmString) : 0;\n measurement.setLeftForearm(leftForearm);\n\n String rightForearmString = rightForearmEditText.getText().toString();\n double rightForearm = (!rightForearmString.equals(\"\")) ? Double.parseDouble(rightForearmString) : 0;\n measurement.setRightForearm(rightForearm);\n\n String waistString = waistEditText.getText().toString();\n double waist = (!waistString.equals(\"\")) ? Double.parseDouble(waistString) : 0;\n measurement.setWaist(waist);\n\n String hipsString = hipsEditText.getText().toString();\n double hips = (!hipsString.equals(\"\")) ? Double.parseDouble(hipsString) : 0;\n measurement.setHips(hips);\n\n String leftLegString = leftLegEditText.getText().toString();\n double leftLeg = (!leftLegString.equals(\"\")) ? Double.parseDouble(leftLegString) : 0;\n measurement.setLeftLeg(leftLeg);\n\n String rightLegString = rightLegEditText.getText().toString();\n double rightLeg = (!rightLegString.equals(\"\")) ? Double.parseDouble(rightLegString) : 0;\n measurement.setRightLeg(rightLeg);\n\n String leftCalfString = leftCalfEditText.getText().toString();\n double leftCalf = (!leftCalfString.equals(\"\")) ? Double.parseDouble(leftCalfString) : 0;\n measurement.setLeftCalf(leftCalf);\n\n String rightCalfString = rightCalfEditText.getText().toString();\n double rightCalf = (!rightCalfString.equals(\"\")) ? Double.parseDouble(rightCalfString) : 0;\n measurement.setRightCalf(rightCalf);\n\n String weightString = weightEditText.getText().toString();\n double weight = (!weightString.equals(\"\")) ? Double.parseDouble(weightString) : 0;\n measurement.setWeight(weight);\n\n String bodyFatString = bodyFatEditText.getText().toString();\n double bodyFat = (!bodyFatString.equals(\"\")) ? Double.parseDouble(bodyFatString) : 0;\n measurement.setBodyFat(bodyFat);\n\n //below variables are should be retrieved from the Shared Preferences.\n int age = mSharedPreferences.getInt(Constants.AGE, 0);\n measurement.setAge(age);\n boolean male = mSharedPreferences.getBoolean(Constants.SEX, true);\n measurement.setMale(male);\n String activityLevel = mSharedPreferences.getString(Constants.ACTIVITY, \"\");\n\n if(activityLevel.equals(getString(R.string.sedentary))){\n measurement.setActivityLevel(Calculators.SEDENTERAY);\n } else if(activityLevel.equals(getString(R.string.light))){\n measurement.setActivityLevel(Calculators.LIGHT);\n }else if(activityLevel.equals(getString(R.string.moderate))){\n measurement.setActivityLevel(Calculators.MODERATE);\n }else if(activityLevel.equals(getString(R.string.very_active))){\n measurement.setActivityLevel(Calculators.VERY_ACTIVE);\n }else if(activityLevel.equals(getString(R.string.extremely_active))){\n measurement.setActivityLevel(Calculators.EXTREMELY_ACTIVE);\n }\n\n double height = mSharedPreferences.getFloat(Constants.HEIGHT,0);\n measurement.setHeight(height);\n\n //if weight is more than 0 use the Calculators class to calculate the rest of the measurement variables\n if(weight > 0){\n measurement.setRestingEnergyExpenditure(Calculators.getRestingEnergyExpenditure(weight, height, age, male));\n measurement.setTotalDailyEnergyExpenditure(Calculators.getTotalDailyEnergyExpenditure(measurement.getRestingEnergyExpenditure(), measurement.getActivityLevel()));\n measurement.setProteinAmount(Calculators.getProteinAmount(weight));\n measurement.setFatAmount(Calculators.getFatAmount(measurement.getTotalDailyEnergyExpenditure()));\n measurement.setCarbAmount(Calculators.getCarbAmount(measurement.getProteinAmount(), measurement.getFatAmount(), measurement.getTotalDailyEnergyExpenditure()));\n measurement.setBMI(Calculators.getBMI(height, weight, true));\n measurement.setBMICategory(Calculators.getBMICatagory(measurement.getBMI()));\n measurement.setWaistToHeightRatio(Calculators.waistToHeightRatio(waist, height));\n measurement.setWITHCategory(Calculators.getWTHCatagory(measurement.getWaistToHeightRatio(), male));\n }\n return measurement;\n }", "public void restoreValues() {\n drive_control.stopDriving();\n if (ACTUAL_DIFICULTY == EASY)\n drive_control.setSpeedScale(EASY_BASE_SPEED);\n if (ACTUAL_DIFICULTY == MEDIUM)\n drive_control.setSpeedScale(MEDIUM);\n if (ACTUAL_DIFICULTY == HARD)\n drive_control.setSpeedScale(HARD);\n drive_control.startDriving(getContext(), DriveControl.JOY_STICK);\n isUserControlAct = true;\n }", "public final void setodometer_reading(String odometer_reading)\n\t{\n\t\tsetodometer_reading(getContext(), odometer_reading);\n\t}", "public void setUnitsString(String units) {\n if (units != null) {\n units = units.trim();\n }\n this.units = units;\n forVar.addAttribute(new Attribute(CDM.UNITS, units));\n }", "public SoundlevelMeasurement() {\n this.dBval = 0;\n this.timestamp = null;\n }", "public void setUnitID(int num) {\n m_UnitID = num;\n // setChanged(true);\n }", "public synchronized void addRawData (SensorData sensorData) {\n if (!isEnabled) {\n return;\n }\n\n rawData.add(sensorData);\n\n GarmentOSService.callback(CallbackFlags.VALUE_CHANGED, new ValueChangedCallback(sensorData.getLongUnixDate(), sensorData.getData()));\n\n if (rawData.size() > savePeriod) {\n saveSensor();\n }\n }", "public String getMeasurementValue() {\n\t\t\t\t\t\treturn measurementValue;\n\t\t\t\t\t}", "public void setUnitVector(double x, double y)\n {\n unitVector.setVector(new double [] {x,y}, true);\n }", "protected synchronized void initialize()\n {\n super.initialize();\n\n\n m_conversionToInches = kmV_Per_V / kmV_per_MM / kmmPerIn;\n\n // LiveWindow.addSensor(\"Ultrasonic\",\n // ((DigitalInput) m_echoChannel).getChannel(), this);\n }", "public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }", "public native void setUnits(int resolutionType) throws MagickException;", "private void updateSensors()\r\n\t{\t\t\r\n\t\tthis.lineSensorRight\t\t= perception.getRightLineSensor();\r\n\t\tthis.lineSensorLeft \t\t= perception.getLeftLineSensor();\r\n\t\t\r\n\t\tthis.angleMeasurementLeft \t= this.encoderLeft.getEncoderMeasurement();\r\n\t\tthis.angleMeasurementRight \t= this.encoderRight.getEncoderMeasurement();\r\n\r\n\t\tthis.mouseOdoMeasurement\t= this.mouseodo.getOdoMeasurement();\r\n\r\n\t\tthis.frontSensorDistance\t= perception.getFrontSensorDistance();\r\n\t\tthis.frontSideSensorDistance = perception.getFrontSideSensorDistance();\r\n\t\tthis.backSensorDistance\t\t= perception.getBackSensorDistance();\r\n\t\tthis.backSideSensorDistance\t= perception.getBackSideSensorDistance();\r\n\t}", "public void setTimeSeriesIdentifier(TimeSeriesIdentifier timeSeriesIdentifier)\n\t{\n\t\tthis.timeSeriesIdentifier = timeSeriesIdentifier;\n\t\tif (unitsAbbr == null || unitsAbbr.trim().length() == 0 || unitsAbbr.trim().equalsIgnoreCase(\"unknown\"))\n\t\t\tunitsAbbr = this.timeSeriesIdentifier.getStorageUnits();\n\t}", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "public SetSensorCommand(List<SensorType> requiredSensors) {\n super(CommandType.SetSensor);\n this.requiredSensors = requiredSensors;\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "private void updateTrimData() {\n\t\tupdateLeftTrimData();\r\n\t\tupdateRightTrimData();\r\n\t}", "private void sendData(SensorData sensorData) {\n EventMessage message = new EventMessage(EventMessage.EventType.RECEIVED_RAW_DATA);\n message.setSensorData(sensorData);\n EventBus.getDefault().post(message);\n }" ]
[ "0.58444643", "0.5538712", "0.5535677", "0.5480942", "0.54189616", "0.54183286", "0.5397402", "0.53839326", "0.53601396", "0.53576756", "0.53425974", "0.5311795", "0.53056675", "0.52989715", "0.5250954", "0.52494615", "0.5242322", "0.5227815", "0.5226954", "0.52055573", "0.5197564", "0.5194166", "0.5193381", "0.5189571", "0.5175107", "0.5167683", "0.51144105", "0.51138425", "0.5075073", "0.5071547", "0.5060831", "0.50474554", "0.5021462", "0.5001296", "0.4999804", "0.4993658", "0.4993027", "0.49907717", "0.4981587", "0.49813613", "0.49795678", "0.49771664", "0.4955708", "0.49239227", "0.4923065", "0.49161726", "0.49155772", "0.4893767", "0.4892711", "0.48894328", "0.48852783", "0.48795936", "0.48786214", "0.48735932", "0.4858743", "0.48569775", "0.48506036", "0.48448247", "0.4833773", "0.48280385", "0.482584", "0.48246717", "0.4822931", "0.4822924", "0.48203102", "0.48058888", "0.48035964", "0.4803326", "0.47943008", "0.47931665", "0.4791717", "0.47883445", "0.47824255", "0.477904", "0.47721428", "0.47678453", "0.47670394", "0.47591868", "0.47547847", "0.47544193", "0.47481078", "0.47440353", "0.47434998", "0.47410458", "0.4738535", "0.4736333", "0.47322643", "0.4731256", "0.47287276", "0.47266296", "0.472661", "0.47174457", "0.4716547", "0.47158772", "0.47158724", "0.4712981", "0.47109532", "0.47092316", "0.4707419", "0.47034836" ]
0.79558337
0
Create a parcelable Sensor object from the given Sensor for internal use
public PSensor toParcelable() { return new PSensor(this.sensorID, this.displayedSensorName, this.bluetoothID, this.sampleRate, this.savePeriod, this.smoothness, this.sensorType, this.graphType, this.rawDataMeasurementUnit, this.rawDataMeasurementSystem, this.displayedMeasurementUnit, this.displayedMeasurementSystem, this.isInternalSensor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "public de.unistuttgart.vis.wearable.os.api.PSensor toParcelableAPI() {\n return new de.unistuttgart.vis.wearable.os.api.PSensor(this.sensorID, this.displayedSensorName, this.bluetoothID, this.sampleRate,\n this.savePeriod, this.smoothness, this.sensorType, this.graphType,\n this.rawDataMeasurementUnit, this.rawDataMeasurementSystem,\n this.displayedMeasurementUnit, this.displayedMeasurementSystem, this.isInternalSensor);\n }", "ExternalSensor createExternalSensor();", "DeviceSensor createDeviceSensor();", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public SensorData() {\n\n\t}", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "Sensor getSensor();", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness,\n String displayedSensorName, SensorType sensorType, String bluetoothID,\n MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit,\n MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) {\n isInternalSensor = false;\n\n // compute the lowest external sensorID which is not forgiven yet\n int id = 100;\n for (Sensor sensor : SensorManager.getAllSensors()) {\n if (id <= sensor.getSensorID()) {\n id = sensor.getSensorID() + 1;\n }\n }\n\n sensorID = id;\n\n this.sensorDriver = sensorDriver;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.bluetoothID = bluetoothID;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementSystem = displayedMeasurementSystem;\n this.displayedMeasurementUnit = displayedMeasurementUnit;\n this.graphType = GraphType.LINE;\n this.isEnabled = true;\n\n SensorManager.addNewSensor(this);\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue create(\n long sensorValueId) {\n return getPersistence().create(sensorValueId);\n }", "@Override\n public SpesaObject createFromParcel(Parcel in) {\n return new SpesaObject(in);\n }", "public BasicSensor() {}", "public RegistroSensor() \n {\n\n }", "protected Sensor[] getSensorValues() { return sensors; }", "public SensorReader() {\n\t\tinit();\n\t}", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "protected Sensor(int gpsSensorID, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = gpsSensorID;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this. displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public static SensorFragment newInstance(long sensorId) {\n SensorFragment fragment = new SensorFragment();\n Bundle args = new Bundle();\n args.putLong(ARG_PARAM1, sensorId);\n fragment.setArguments(args);\n return fragment;\n }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "public static IContentSensorManager createContentSensorManager(int token, Activity activity) {\n long currentTime = System.currentTimeMillis();\n IContentSensorManager iContentSensorManager = null;\n ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();\n try {\n Class<IContentSensorManager> clz = getContentSensorManagerClass();\n if (clz != null) {\n Constructor constructor = clz.getConstructor(new Class[]{Integer.TYPE, Activity.class});\n constructor.setAccessible(true);\n iContentSensorManager = (IContentSensorManager) constructor.newInstance(new Object[]{Integer.valueOf(token), activity});\n }\n StrictMode.setThreadPolicy(oldPolicy);\n } catch (ClassNotFoundException e) {\n LogUtil.e(\"ContentSensorFactory\", \"ClassNotFoundExceptione:\" + e);\n } catch (NoSuchMethodException e2) {\n LogUtil.e(\"ContentSensorFactory\", \"NoSuchMethodExceptione:\" + e2);\n } catch (InstantiationException e3) {\n LogUtil.e(\"ContentSensorFactory\", \"InstantiationExceptione:\" + e3);\n } catch (IllegalAccessException e4) {\n LogUtil.e(\"ContentSensorFactory\", \"IllegalAccessExceptione:\" + e4);\n } catch (InvocationTargetException e5) {\n LogUtil.e(\"ContentSensorFactory\", \"InvocationTargetExceptione:\" + e5);\n } catch (Throwable th) {\n StrictMode.setThreadPolicy(oldPolicy);\n }\n if (iContentSensorManager != null) {\n return iContentSensorManager;\n }\n LogUtil.w(\"ContentSensorFactory\", \"DefaultContentSensorManager is created\");\n return new DefaultContentSensorManager();\n }", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "RegisterSensor() {\n }", "public SensorStation(){\n\n }", "public interface SensorData {\n String toString();\n}", "public void getFromParcel(Parcel in)\n {\n this.clear();\n\n //Récupération du nombre d'objet\n int size = in.readInt();\n\n //On repeuple la liste avec de nouveau objet\n for(int i = 0; i < size; i++)\n {\n MeteoData meteoData = new MeteoData();\n meteoData.setDateDebut(in.readString());\n meteoData.setDateFin(in.readString());\n meteoData.setTemperature(in.readString());\n meteoData.setSymbole(in.readString());\n meteoData.setWindSpeed(in.readString());\n meteoData.setWindDirection(in.readString());\n meteoData.setWindDescription(in.readString());\n meteoData.setClouds(in.readString());\n meteoData.setHumidity(in.readString());\n this.add(meteoData);\n }\n\n\n }", "public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r14) {\n /*\n r13 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r14)\n r1 = 1\n r2 = 1000(0x3e8, float:1.401E-42)\n r3 = 0\n r5 = 0\n r8 = r1\n r9 = r8\n r7 = r2\n r10 = r3\n r12 = r5\n L_0x000f:\n int r2 = r14.dataPosition()\n if (r2 >= r0) goto L_0x004d\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r14)\n int r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r2)\n if (r3 == r1) goto L_0x0048\n r4 = 2\n if (r3 == r4) goto L_0x0043\n r4 = 3\n if (r3 == r4) goto L_0x003e\n r4 = 4\n if (r3 == r4) goto L_0x0039\n r4 = 5\n if (r3 == r4) goto L_0x002f\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r14, r2)\n goto L_0x000f\n L_0x002f:\n android.os.Parcelable$Creator<com.google.android.gms.location.zzaj> r3 = com.google.android.gms.location.zzaj.CREATOR\n java.lang.Object[] r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createTypedArray(r14, r2, r3)\n r12 = r2\n com.google.android.gms.location.zzaj[] r12 = (com.google.android.gms.location.zzaj[]) r12\n goto L_0x000f\n L_0x0039:\n int r7 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x003e:\n long r10 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readLong(r14, r2)\n goto L_0x000f\n L_0x0043:\n int r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x0048:\n int r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x004d:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r14, r0)\n com.google.android.gms.location.LocationAvailability r14 = new com.google.android.gms.location.LocationAvailability\n r6 = r14\n r6.<init>(r7, r8, r9, r10, r12)\n return r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.location.zzaa.createFromParcel(android.os.Parcel):java.lang.Object\");\n }", "public Sensor(int threadNumber) {\n\t\tdeviceNumber = threadNumber;\n\t}", "public static ReferenceSensor from(UUID id, UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemTime, InformationSource informationSource, String comment) {\n return new ReferenceSensor(id, channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemTime, informationSource, comment);\n }", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "private Note(Parcel in) {\n content = in.readString();\n color = (Color) in.readSerializable();\n }", "private ParcelableNameValuePair(Parcel in) {\n\t\tname = in.readString();\n\t\tvalue = in.readString();\n\t}", "public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}", "public Observable<Data> start(Sensor sensor){\n return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> {\n DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus());\n return new Data(sensor, dataTypeInt);\n });\n }", "public T caseSensor(Sensor object) {\n\t\treturn null;\n\t}", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "protected Sensor<Float> createExtreme(Sensor<Float> sensor, Extreme type)\n {\n String key = sensor.getUuid() + \".\" + type.key;\n History history = extremes.get(key);\n\n // Es gibt noch gar keine Queue fuer die Werte. Dann legen wir eine an\n if (history == null)\n {\n Settings settings = Application.getPluginLoader().getPlugin(Plugin.class).getResources().getSettings();\n int minutes = settings.getInt(\"scheduler.interval.minutes\",5);\n int size = 24 * 60 / minutes;\n history = new History(size);\n extremes.put(key,history);\n }\n\n Float value = sensor.getValue();\n\n // Wert hinzufuegen\n history.push(value);\n \n // Extrem-Wert ermitteln\n List<Float> values = history.elements();\n for (Float f:values)\n {\n if (type == Extreme.MAX && f.compareTo(value) > 0)\n {\n value = f;\n continue;\n }\n if (type == Extreme.MIN && f.compareTo(value) < 0)\n {\n value = f;\n continue;\n }\n }\n\n Sensor clone = (Sensor<Float>) sensor.clone();\n clone.setUuid(key);\n clone.setValue(value);\n clone.setName(i18n.tr(\"{0} ({1})\",sensor.getName(),type.title));\n return clone;\n }", "GenericFloatSensor sensor();", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "public abstract T toObject(String uuid, Map<String, Object> data);", "@Override\n public User createFromParcel(Parcel in) {\n return new User(in);\n }", "public abstract void recordSensorData(RealmObject sensorData);", "public interface SensorDataService{\n Temperature saveTemperature(Temperature temperature);\n Humidity saveHumidity(Humidity humidity);\n AirPressure saveAirPressure(AirPressure airPressure);\n}", "public SensorLog() {\n }", "@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }", "public static ReferenceSensor create(UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemChangeTime,\n InformationSource informationSource, String comment) {\n\n return new ReferenceSensor(channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemChangeTime, informationSource, comment);\n }", "@Override protected Parcelable onSaveInstanceState() {\n Parcelable superState = super.onSaveInstanceState();\n SavedState ss = new SavedState(superState);\n ss.rotated = rotated;\n ss.totalSpacingDegree = totalSpacingDegree;\n ss.satelliteDistance = satelliteDistance;\n ss.measureDiff = measureDiff;\n ss.expandDuration = expandDuration;\n ss.closeItemsOnClick = closeItemsOnClick;\n return ss;\n }", "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeInt(locationID);\n dest.writeDouble(longitude);\n dest.writeDouble(altitude);\n dest.writeDouble(latitude);\n dest.writeFloat(speed);\n dest.writeLong(time);\n\n }", "private void activeSensor(Sensor sensor) {\n selectedSensor = sensor;\n// selectedSensor.debug(true);\n// if (start) {\n// view = (DrawingView) findViewById(R.id.surface);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n// }\n }", "@Override\n\t\tpublic Info createFromParcel(Parcel source) {\n\t\t\treturn new Info(source);\n\t\t}", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "FromValues createFromValues();", "public synchronized Sensor getSensor(int id)\n {\n return sensors.get(id);\n }", "public interface C0591c extends Parcelable {\n}", "@Override\n public ImageData createFromParcel(Parcel source) {\n return new ImageData(source); // using parcelable constructor\n }", "@Override\n public void receivedSensor(SensorData sensor) {\n synchronized(_sensorListeners) {\n if (!_sensorListeners.containsKey(sensor.channel)) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_SENSOR.str);\n UdpConstants.writeSensorData(resp.stream, sensor);\n \n // Send to all listeners\n synchronized(_sensorListeners) {\n Map<SocketAddress, Integer> _listeners = _sensorListeners.get(sensor.channel);\n _udpServer.bcast(resp, _listeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize sensor \" + sensor.channel);\n }\n }", "Map<String, ISensor> getSensorMap();", "public MovementData() {\n\t\tsensorData = new ArrayList<SensorReading>();\t\t\n\t\tthis.nextIndex = 0;\n\t\tthis.prevIndex = -1;\n\t}", "@Override\n\t\tpublic LoginDto createFromParcel(Parcel source) {\n\t\t\tLoginDto td = new LoginDto();\n\t\t\ttd.custNo = source.readString();\n\t\t\ttd.leftTimes = source.readString();\n\t\t\ttd.contentCode = source.readInt();\n\t\t\ttd.contentMsg = source.readString();\n\t\t\treturn td;\n\t\t}", "public C1748jj createFromParcel(Parcel parcel) {\n int G = C0721a.m714G(parcel);\n int i = 0;\n int i2 = 0;\n int i3 = 0;\n String str = null;\n IBinder iBinder = null;\n Scope[] scopeArr = null;\n Bundle bundle = null;\n while (parcel.dataPosition() < G) {\n int F = C0721a.m713F(parcel);\n switch (C0721a.m720aH(F)) {\n case 1:\n i = C0721a.m728g(parcel, F);\n break;\n case 2:\n i2 = C0721a.m728g(parcel, F);\n break;\n case 3:\n i3 = C0721a.m728g(parcel, F);\n break;\n case 4:\n str = C0721a.m736o(parcel, F);\n break;\n case 5:\n iBinder = C0721a.m737p(parcel, F);\n break;\n case 6:\n scopeArr = (Scope[]) C0721a.m722b(parcel, F, Scope.CREATOR);\n break;\n case 7:\n bundle = C0721a.m738q(parcel, F);\n break;\n default:\n C0721a.m721b(parcel, F);\n break;\n }\n }\n if (parcel.dataPosition() == G) {\n return new C1748jj(i, i2, i3, str, iBinder, scopeArr, bundle);\n }\n throw new C0721a.C0722a(\"Overread allowed size end=\" + G, parcel);\n }", "@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "private void sensorInformation(){\n\t\tthis.name = this.paramName;\n\t\tthis.version = this.paramVersion;\n\t\tthis.author = this.paramVersion;\n\t}", "protected NewLocation(Parcel in) {\n locationID = in.readInt();\n longitude = in.readDouble();\n altitude = in.readDouble();\n latitude = in.readDouble();\n speed = in.readFloat();\n time = in.readLong();\n }", "public static SensorDialogFragment newInstance(String buoyID, String sensorID) {\n SensorDialogFragment fragment = new SensorDialogFragment();\n Bundle args = new Bundle();\n args.putString(BUOY_ID, buoyID);\n args.putString(SENSOR_ID, sensorID);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putSerializable(\"device\", mDevice);\n }", "public String getSensor()\n {\n return sensor;\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "public static <T extends Structure> T CreateInstance(String resourceLocation, Class<? extends Structure> child) {\n T structure = null;\n\n Gson file = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();\n structure = (T) file.fromJson(ZipUtil.decompressResource(resourceLocation), child);\n\n return structure;\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "@Test\n public void dashboardViewModelIsParcelable() {\n setUpDashboardViewModel();\n Parcel parcel = Parcel.obtain();\n dashboardViewModel.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n DashboardViewModel parceledViewModel = DashboardViewModel.CREATOR.createFromParcel(parcel);\n assertEquals(dashboardViewModel, parceledViewModel);\n }", "private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }", "protected Stock(Parcel in) {\n sid = in.readInt();\n companyName = in.readString();\n symbol = in.readString();\n primaryExchange = in.readDouble();\n latestValue = in.readDouble();\n stockPrice = in.readDouble();\n numberOfStocks = in.readInt();\n stockSector = in.readString();\n long tmpTimeStamp = in.readLong();\n timeStamp = tmpTimeStamp != -1 ? new Date(tmpTimeStamp) : null;\n }", "public void my_readFromParcel(Parcel in) {\n x = in.readFloat();\n y = in.readFloat();\n }", "public final flipsParser.defineSensor_return defineSensor() throws RecognitionException {\n flipsParser.defineSensor_return retval = new flipsParser.defineSensor_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal52=null;\n Token string_literal53=null;\n Token string_literal54=null;\n flipsParser.defineSensorValue_return defineSensorValue55 = null;\n\n\n CommonTree string_literal52_tree=null;\n CommonTree string_literal53_tree=null;\n CommonTree string_literal54_tree=null;\n RewriteRuleTokenStream stream_132=new RewriteRuleTokenStream(adaptor,\"token 132\");\n RewriteRuleTokenStream stream_131=new RewriteRuleTokenStream(adaptor,\"token 131\");\n RewriteRuleTokenStream stream_130=new RewriteRuleTokenStream(adaptor,\"token 130\");\n RewriteRuleSubtreeStream stream_defineSensorValue=new RewriteRuleSubtreeStream(adaptor,\"rule defineSensorValue\");\n try {\n // flips.g:176:2: ( ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue -> defineSensorValue )\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' ) defineSensorValue\n {\n // flips.g:176:4: ( 'sen' | 'sensor' | 'sensors' )\n int alt21=3;\n switch ( input.LA(1) ) {\n case 130:\n {\n alt21=1;\n }\n break;\n case 131:\n {\n alt21=2;\n }\n break;\n case 132:\n {\n alt21=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 0, input);\n\n throw nvae;\n }\n\n switch (alt21) {\n case 1 :\n // flips.g:176:5: 'sen'\n {\n string_literal52=(Token)match(input,130,FOLLOW_130_in_defineSensor839); \n stream_130.add(string_literal52);\n\n\n }\n break;\n case 2 :\n // flips.g:176:11: 'sensor'\n {\n string_literal53=(Token)match(input,131,FOLLOW_131_in_defineSensor841); \n stream_131.add(string_literal53);\n\n\n }\n break;\n case 3 :\n // flips.g:176:20: 'sensors'\n {\n string_literal54=(Token)match(input,132,FOLLOW_132_in_defineSensor843); \n stream_132.add(string_literal54);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_defineSensorValue_in_defineSensor846);\n defineSensorValue55=defineSensorValue();\n\n state._fsp--;\n\n stream_defineSensorValue.add(defineSensorValue55.getTree());\n\n\n // AST REWRITE\n // elements: defineSensorValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 177:2: -> defineSensorValue\n {\n adaptor.addChild(root_0, stream_defineSensorValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "private SmartDevice createDevice(Cursor cursor){\n String id = cursor.getString(cursor.getColumnIndex(COLUMN_ID));\n String name = cursor.getString(cursor.getColumnIndex(COLUMN_NAME));\n String type = cursor.getString(cursor.getColumnIndex(COLUMN_TYPE));\n String active = cursor.getString(cursor.getColumnIndex(COLUMN_ACTIVE));\n String image = cursor.getString(cursor.getColumnIndex(COLUMN_IMAGE));\n return new SmartDevice(id, name, type, active, image);\n }", "SensorDescription(){\n\n }", "public abstract T deserialize(String serial);", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "private User(Parcel in) {\n mData = in.readInt();\n }", "public Sensor(String name, boolean state, int image, String key, Context c){\n this.name = name;\n this.state = state;\n this.image = image;\n this.context = c;\n this.key = key;\n\n }", "public PengineSwitch(Parcel in) {\n super(in);\n String str = null;\n if (in.readByte() == 0) {\n this.id = null;\n in.readInt();\n } else {\n this.id = Integer.valueOf(in.readInt());\n }\n this.dataType = in.readByte() == 0 ? null : Integer.valueOf(in.readInt());\n this.timestamp = in.readByte() == 0 ? null : Long.valueOf(in.readLong());\n this.upProperty = in.readByte() == 0 ? null : in.readString();\n this.column0 = in.readByte() == 0 ? null : in.readString();\n this.column1 = in.readByte() == 0 ? null : in.readString();\n this.column2 = in.readByte() == 0 ? null : in.readString();\n this.column3 = in.readByte() == 0 ? null : in.readString();\n this.column4 = in.readByte() == 0 ? null : in.readString();\n this.column5 = in.readByte() == 0 ? null : in.readString();\n this.column6 = in.readByte() == 0 ? null : in.readString();\n this.column7 = in.readByte() != 0 ? in.readString() : str;\n }", "public static ArrayList<Sensor> getSensorsFromFile(InputStream fileStream) {\n ArrayList<Sensor> sensors = new ArrayList<>();\n Properties props = new Properties();\n\n // load configuration file\n try {\n props.load(fileStream);\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // for every property in the file...\n Enumeration e = props.propertyNames();\n iterateProperties:\n while(e.hasMoreElements()) {\n String sensorName = (String)e.nextElement();\n String[] parameters = props.getProperty(sensorName).split(\", *\");\n Duration[] refreshPeriods = new Duration[3];\n\n // validate parameter count\n if(parameters.length < 4) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (at least 4 needed)\");\n continue iterateProperties;\n }\n\n // parse refresh periods in ms\n for(int i = 0; i < 3; ++i)\n try {\n refreshPeriods[i] = Duration.ofMillis(Integer.parseInt(parameters[i + 1]));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect duration formatting (integer in milliseconds expected)\");\n continue iterateProperties;\n }\n\n // create sensor of specified type and add to arrayList\n switch (parameters[0]) {\n case \"LSM303a\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303a type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303AccelerationSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"LSM303m\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303m type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303MagneticSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"L3GD20H\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (L3GD20H type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new L3GD20HGyroscopeSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimInt\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimInt type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorInt(sensorName, refreshPeriods, Integer.parseInt(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimFloat\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorFloat(sensorName, refreshPeriods, Float.parseFloat(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimVecFloat\":\n if(parameters.length != 7) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 7)\");\n continue iterateProperties;\n }\n try {\n float[] seed = new float[3];\n for(int i = 0; i < seed.length; ++i) {\n seed[i] = Float.parseFloat(parameters[i + 4]);\n }\n sensors.add(new SimulatedSensorVecFloat(sensorName, refreshPeriods, seed));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n default:\n System.err.println(\"config.properties error (\" + sensorName + \"): \" + parameters[0] + \" is not a valid sensor type\");\n continue iterateProperties;\n }\n }\n\n return sensors;\n }", "public final QScanResultEntity createFromParcel(Parcel parcel) {\n QScanResultEntity qScanResultEntity = new QScanResultEntity();\n qScanResultEntity.packageName = parcel.readString();\n qScanResultEntity.softName = parcel.readString();\n qScanResultEntity.version = parcel.readString();\n qScanResultEntity.versionCode = parcel.readInt();\n qScanResultEntity.path = parcel.readString();\n qScanResultEntity.apkType = parcel.readInt();\n qScanResultEntity.certMd5 = parcel.readString();\n qScanResultEntity.size = parcel.readInt();\n qScanResultEntity.type = parcel.readInt();\n qScanResultEntity.advice = parcel.readInt();\n qScanResultEntity.malwareid = parcel.readInt();\n qScanResultEntity.name = parcel.readString();\n qScanResultEntity.label = parcel.readString();\n qScanResultEntity.discription = parcel.readString();\n qScanResultEntity.url = parcel.readString();\n return qScanResultEntity;\n }", "protected abstract VerifiableSensorOperation doClone();", "private void readObject(ObjectInputStream _stream)\n/* 435: */ throws IOException, ClassNotFoundException\n/* 436: */ {\n/* 437:508 */ _stream.defaultReadObject();\n/* 438:509 */ this._origin_VA.restoreOwner(this);\n/* 439:510 */ //finishReadObject_xjal(_stream, TileGIS.class);\n/* 440: */ }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "public interface IMedia extends Parcelable {\n\n enum Type {\n MOVIE(\"movie\"), TV(\"tv\");\n\n private String name;\n\n Type(String name) {\n this.name = name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }\n\n String getBackdropPath();\n\n int[] getGenreIds();\n\n Genre[] getGenres();\n\n long getId();\n\n String getOriginalTitle();\n\n String getTitle();\n\n String getOverview();\n\n String getReleaseDate();\n\n String getPosterPath();\n\n String getHomePage();\n\n float getPopularity();\n\n boolean isVideo();\n\n float getVoteAverage();\n\n int getVoteCount();\n\n VideosResponse getVideos();\n\n Type getType();\n\n Creator<IMedia> CREATOR = new Creator<IMedia>() {\n @Override\n public IMedia createFromParcel(Parcel parcel) {\n String type = parcel.readString();\n if(Type.MOVIE.name.equals(type)){\n return Movie.CREATOR.createFromParcel(parcel);\n }else{\n return TV.CREATOR.createFromParcel(parcel);\n }\n }\n\n @Override\n public IMedia[] newArray(int i) {\n return new IMedia[i];\n }\n };\n\n}", "public SensorData getData(String sensorId){\n return sensors.getData(sensorId);\n }" ]
[ "0.63142645", "0.6043109", "0.5990616", "0.5887039", "0.57617915", "0.5578664", "0.5538196", "0.55298036", "0.54736155", "0.53492576", "0.53168935", "0.5263512", "0.52488977", "0.5229638", "0.5189576", "0.5149184", "0.5136845", "0.51085997", "0.5081045", "0.50578564", "0.5027633", "0.5008328", "0.4976376", "0.49701294", "0.49548846", "0.49347946", "0.49326918", "0.48587838", "0.4784772", "0.47770202", "0.47758418", "0.47670212", "0.47599903", "0.47535518", "0.4746284", "0.4718556", "0.47139233", "0.47102243", "0.4696122", "0.4685519", "0.46806818", "0.46699587", "0.46670914", "0.46510565", "0.46376425", "0.46329603", "0.46320435", "0.46129316", "0.46065277", "0.45654714", "0.4562011", "0.45583403", "0.4538612", "0.4533751", "0.4529875", "0.45167994", "0.45106703", "0.4506755", "0.4504562", "0.4499425", "0.4489674", "0.4482843", "0.44752142", "0.44736853", "0.4472998", "0.4471195", "0.44656724", "0.44626004", "0.44621867", "0.4447455", "0.4435783", "0.4429131", "0.4428712", "0.44276175", "0.442401", "0.440391", "0.43943772", "0.43924263", "0.43908754", "0.43857762", "0.43852773", "0.43835393", "0.43803325", "0.4378271", "0.43781397", "0.43597615", "0.43588683", "0.43513495", "0.43511084", "0.43405902", "0.433958", "0.43395442", "0.43385392", "0.43299794", "0.43266606", "0.43264794", "0.43248555", "0.43237865", "0.43209985", "0.43197733" ]
0.7178949
0
Create a parcelable Sensor object from the given Sensor
public de.unistuttgart.vis.wearable.os.api.PSensor toParcelableAPI() { return new de.unistuttgart.vis.wearable.os.api.PSensor(this.sensorID, this.displayedSensorName, this.bluetoothID, this.sampleRate, this.savePeriod, this.smoothness, this.sensorType, this.graphType, this.rawDataMeasurementUnit, this.rawDataMeasurementSystem, this.displayedMeasurementUnit, this.displayedMeasurementSystem, this.isInternalSensor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PSensor toParcelable() {\n return new PSensor(this.sensorID, this.displayedSensorName, this.bluetoothID, this.sampleRate,\n this.savePeriod, this.smoothness, this.sensorType, this.graphType,\n this.rawDataMeasurementUnit, this.rawDataMeasurementSystem,\n this.displayedMeasurementUnit, this.displayedMeasurementSystem, this.isInternalSensor);\n }", "private Sensor jsonToSensor(JsonElement rawSensor) throws IOException, InterruptedException {\n var sensorProperties = rawSensor.getAsJsonObject();\n var sensorLocation = sensorProperties.get(\"location\").getAsString();\n var coordinate = this.getCoordinate(sensorLocation); // get location information\n\n Double reading = null;\n float battery = sensorProperties.get(\"battery\").getAsFloat();\n if (battery > MIN_BATTERY) { // invalidate reading if below threshold\n String readingVal = sensorProperties.get(\"reading\").getAsString();\n reading = Double.valueOf(readingVal);\n }\n\n return new Sensor(sensorLocation, battery, reading, coordinate.x, coordinate.y);\n }", "ExternalSensor createExternalSensor();", "DeviceSensor createDeviceSensor();", "public SensorData() {\n\n\t}", "protected Sensor(android.hardware.Sensor sensor, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = sensor.getType();\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "void addSensor(Sensor sensor) {\n List<Sensor> listToAddTo;\n\n switch (sensor.getSensorType()) {\n case PM10:\n listToAddTo = this.pm10Sensors;\n break;\n case TEMP:\n listToAddTo = this.tempSensors;\n break;\n case HUMID:\n listToAddTo = this.humidSensors;\n break;\n default:\n listToAddTo = new ArrayList<>();\n break;\n }\n listToAddTo.add(sensor);\n }", "public Sensor(String id_, String buildingID_, String sensorType_){\n\t\tsuper(id_,buildingID_);\n\t\tsensorType = sensorType_;\t\n\t}", "@Override\n public SpesaObject createFromParcel(Parcel in) {\n return new SpesaObject(in);\n }", "Sensor getSensor();", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "protected SuperSensor createNewSensor(SensorMessage message)\n {\n return ModuleInstanceProvider.getSensorInstanceByType(message.getType());\n }", "public RegistroSensor() \n {\n\n }", "public static com.lrexperts.liferay.liferayofthings.model.SensorValue create(\n long sensorValueId) {\n return getPersistence().create(sensorValueId);\n }", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "private Sensor registerSensor(HalSensorConfig config){\n Sensor sensor = new Sensor();\n sensor.setDeviceConfig(config);\n manager.addAvailableDeviceConfig(config.getClass());\n manager.register(sensor);\n return sensor;\n }", "public void getFromParcel(Parcel in)\n {\n this.clear();\n\n //Récupération du nombre d'objet\n int size = in.readInt();\n\n //On repeuple la liste avec de nouveau objet\n for(int i = 0; i < size; i++)\n {\n MeteoData meteoData = new MeteoData();\n meteoData.setDateDebut(in.readString());\n meteoData.setDateFin(in.readString());\n meteoData.setTemperature(in.readString());\n meteoData.setSymbole(in.readString());\n meteoData.setWindSpeed(in.readString());\n meteoData.setWindDirection(in.readString());\n meteoData.setWindDescription(in.readString());\n meteoData.setClouds(in.readString());\n meteoData.setHumidity(in.readString());\n this.add(meteoData);\n }\n\n\n }", "public BasicSensor() {}", "protected Sensor[] getSensorValues() { return sensors; }", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public Sensor(IGarmentDriver sensorDriver, int sampleRate, int savePeriod, float smoothness,\n String displayedSensorName, SensorType sensorType, String bluetoothID,\n MeasurementSystems rawDataMeasurementSystem, MeasurementUnits rawDataMeasurementUnit,\n MeasurementSystems displayedMeasurementSystem, MeasurementUnits displayedMeasurementUnit) {\n isInternalSensor = false;\n\n // compute the lowest external sensorID which is not forgiven yet\n int id = 100;\n for (Sensor sensor : SensorManager.getAllSensors()) {\n if (id <= sensor.getSensorID()) {\n id = sensor.getSensorID() + 1;\n }\n }\n\n sensorID = id;\n\n this.sensorDriver = sensorDriver;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this.displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.bluetoothID = bluetoothID;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementSystem = displayedMeasurementSystem;\n this.displayedMeasurementUnit = displayedMeasurementUnit;\n this.graphType = GraphType.LINE;\n this.isEnabled = true;\n\n SensorManager.addNewSensor(this);\n }", "public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }", "public SensorReader() {\n\t\tinit();\n\t}", "MonitoredSensor(Sensor sensor) {\n mSensor = sensor;\n mEnabledByUser = true;\n\n // Set appropriate sensor name depending on the type. Unfortunately,\n // we can't really use sensor.getName() here, since the value it\n // returns (although resembles the purpose) is a bit vaguer than it\n // should be. Also choose an appropriate format for the strings that\n // display sensor's value.\n switch (sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n mUiName = \"Accelerometer\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"acceleration\";\n break;\n case 9: // Sensor.TYPE_GRAVITY is missing in API 7\n mUiName = \"Gravity\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gravity\";\n break;\n case Sensor.TYPE_GYROSCOPE:\n mUiName = \"Gyroscope\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"gyroscope\";\n break;\n case Sensor.TYPE_LIGHT:\n mUiName = \"Light\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"light\";\n break;\n case 10: // Sensor.TYPE_LINEAR_ACCELERATION is missing in API 7\n mUiName = \"Linear acceleration\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"linear-acceleration\";\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mUiName = \"Magnetic field\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"magnetic-field\";\n break;\n case Sensor.TYPE_ORIENTATION:\n mUiName = \"Orientation\";\n mTextFmt = \"%+03.0f %+03.0f %+03.0f\";\n mEmulatorFriendlyName = \"orientation\";\n break;\n case Sensor.TYPE_PRESSURE:\n mUiName = \"Pressure\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"pressure\";\n break;\n case Sensor.TYPE_PROXIMITY:\n mUiName = \"Proximity\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"proximity\";\n break;\n case 11: // Sensor.TYPE_ROTATION_VECTOR is missing in API 7\n mUiName = \"Rotation\";\n mTextFmt = \"%+.2f %+.2f %+.2f\";\n mEmulatorFriendlyName = \"rotation\";\n break;\n case Sensor.TYPE_TEMPERATURE:\n mUiName = \"Temperature\";\n mTextFmt = \"%.0f\";\n mEmulatorFriendlyName = \"temperature\";\n break;\n default:\n mUiName = \"<Unknown>\";\n mTextFmt = \"N/A\";\n mEmulatorFriendlyName = \"unknown\";\n if (DEBUG) Loge(\"Unknown sensor type \" + mSensor.getType() +\n \" for sensor \" + mSensor.getName());\n break;\n }\n }", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "public static SensorFragment newInstance(long sensorId) {\n SensorFragment fragment = new SensorFragment();\n Bundle args = new Bundle();\n args.putLong(ARG_PARAM1, sensorId);\n fragment.setArguments(args);\n return fragment;\n }", "public void addSensor(Sensor sensor){\n sensors.addSensor(sensor);\n sensor.setFieldStation(this);\n }", "RegisterSensor() {\n }", "public static Sensor CreateSensorFromTable(String sensorName) {\n\n ResultSet rs = null;\n\n Sensor sensor = null;\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 while (rs.next()) {\n String[] loca = rs.getString(2).split(\",\");\n Location location = new Location();\n location.setLongitude(Double.parseDouble(loca[0]));\n location.setLatitude(Double.parseDouble(loca[1]));\n\n sensor = Station.getInstance().createSensor(sensorName, rs.getString(1), location);\n sensor.setUpdateTime(rs.getInt(3));\n }\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 1 Issue!!\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBExecute.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n }\n return sensor;\n\n }", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "private ParcelableNameValuePair(Parcel in) {\n\t\tname = in.readString();\n\t\tvalue = in.readString();\n\t}", "public SensorStation(){\n\n }", "public interface SensorData {\n String toString();\n}", "public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r14) {\n /*\n r13 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r14)\n r1 = 1\n r2 = 1000(0x3e8, float:1.401E-42)\n r3 = 0\n r5 = 0\n r8 = r1\n r9 = r8\n r7 = r2\n r10 = r3\n r12 = r5\n L_0x000f:\n int r2 = r14.dataPosition()\n if (r2 >= r0) goto L_0x004d\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r14)\n int r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r2)\n if (r3 == r1) goto L_0x0048\n r4 = 2\n if (r3 == r4) goto L_0x0043\n r4 = 3\n if (r3 == r4) goto L_0x003e\n r4 = 4\n if (r3 == r4) goto L_0x0039\n r4 = 5\n if (r3 == r4) goto L_0x002f\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r14, r2)\n goto L_0x000f\n L_0x002f:\n android.os.Parcelable$Creator<com.google.android.gms.location.zzaj> r3 = com.google.android.gms.location.zzaj.CREATOR\n java.lang.Object[] r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createTypedArray(r14, r2, r3)\n r12 = r2\n com.google.android.gms.location.zzaj[] r12 = (com.google.android.gms.location.zzaj[]) r12\n goto L_0x000f\n L_0x0039:\n int r7 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x003e:\n long r10 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readLong(r14, r2)\n goto L_0x000f\n L_0x0043:\n int r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x0048:\n int r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x004d:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r14, r0)\n com.google.android.gms.location.LocationAvailability r14 = new com.google.android.gms.location.LocationAvailability\n r6 = r14\n r6.<init>(r7, r8, r9, r10, r12)\n return r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.location.zzaa.createFromParcel(android.os.Parcel):java.lang.Object\");\n }", "public static IContentSensorManager createContentSensorManager(int token, Activity activity) {\n long currentTime = System.currentTimeMillis();\n IContentSensorManager iContentSensorManager = null;\n ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();\n try {\n Class<IContentSensorManager> clz = getContentSensorManagerClass();\n if (clz != null) {\n Constructor constructor = clz.getConstructor(new Class[]{Integer.TYPE, Activity.class});\n constructor.setAccessible(true);\n iContentSensorManager = (IContentSensorManager) constructor.newInstance(new Object[]{Integer.valueOf(token), activity});\n }\n StrictMode.setThreadPolicy(oldPolicy);\n } catch (ClassNotFoundException e) {\n LogUtil.e(\"ContentSensorFactory\", \"ClassNotFoundExceptione:\" + e);\n } catch (NoSuchMethodException e2) {\n LogUtil.e(\"ContentSensorFactory\", \"NoSuchMethodExceptione:\" + e2);\n } catch (InstantiationException e3) {\n LogUtil.e(\"ContentSensorFactory\", \"InstantiationExceptione:\" + e3);\n } catch (IllegalAccessException e4) {\n LogUtil.e(\"ContentSensorFactory\", \"IllegalAccessExceptione:\" + e4);\n } catch (InvocationTargetException e5) {\n LogUtil.e(\"ContentSensorFactory\", \"InvocationTargetExceptione:\" + e5);\n } catch (Throwable th) {\n StrictMode.setThreadPolicy(oldPolicy);\n }\n if (iContentSensorManager != null) {\n return iContentSensorManager;\n }\n LogUtil.w(\"ContentSensorFactory\", \"DefaultContentSensorManager is created\");\n return new DefaultContentSensorManager();\n }", "private Note(Parcel in) {\n content = in.readString();\n color = (Color) in.readSerializable();\n }", "@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }", "protected Sensor(int gpsSensorID, int sampleRate, int savePeriod,\n float smoothness, String displayedSensorName, SensorType sensorType,\n MeasurementSystems rawDataMeasurementSystem,\n MeasurementUnits rawDataMeasurementUnit) {\n this.isInternalSensor = true;\n\n this.sensorID = gpsSensorID;\n this.sampleRate = sampleRate;\n this.savePeriod = savePeriod;\n this.smoothness = smoothness;\n this. displayedSensorName = displayedSensorName;\n this.sensorType = sensorType;\n this.rawDataMeasurementSystem = rawDataMeasurementSystem;\n this.displayedMeasurementSystem = rawDataMeasurementSystem;\n this.rawDataMeasurementUnit = rawDataMeasurementUnit;\n this.displayedMeasurementUnit = rawDataMeasurementUnit;\n this.graphType = GraphType.LINE;\n\n SensorManager.addNewSensor(this);\n }", "public Observable<Data> start(Sensor sensor){\n return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> {\n DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus());\n return new Data(sensor, dataTypeInt);\n });\n }", "FromValues createFromValues();", "@Override\n public User createFromParcel(Parcel in) {\n return new User(in);\n }", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "@Test\n public void dashboardViewModelIsParcelable() {\n setUpDashboardViewModel();\n Parcel parcel = Parcel.obtain();\n dashboardViewModel.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n DashboardViewModel parceledViewModel = DashboardViewModel.CREATOR.createFromParcel(parcel);\n assertEquals(dashboardViewModel, parceledViewModel);\n }", "public interface IMedia extends Parcelable {\n\n enum Type {\n MOVIE(\"movie\"), TV(\"tv\");\n\n private String name;\n\n Type(String name) {\n this.name = name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }\n\n String getBackdropPath();\n\n int[] getGenreIds();\n\n Genre[] getGenres();\n\n long getId();\n\n String getOriginalTitle();\n\n String getTitle();\n\n String getOverview();\n\n String getReleaseDate();\n\n String getPosterPath();\n\n String getHomePage();\n\n float getPopularity();\n\n boolean isVideo();\n\n float getVoteAverage();\n\n int getVoteCount();\n\n VideosResponse getVideos();\n\n Type getType();\n\n Creator<IMedia> CREATOR = new Creator<IMedia>() {\n @Override\n public IMedia createFromParcel(Parcel parcel) {\n String type = parcel.readString();\n if(Type.MOVIE.name.equals(type)){\n return Movie.CREATOR.createFromParcel(parcel);\n }else{\n return TV.CREATOR.createFromParcel(parcel);\n }\n }\n\n @Override\n public IMedia[] newArray(int i) {\n return new IMedia[i];\n }\n };\n\n}", "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeInt(locationID);\n dest.writeDouble(longitude);\n dest.writeDouble(altitude);\n dest.writeDouble(latitude);\n dest.writeFloat(speed);\n dest.writeLong(time);\n\n }", "public abstract T toObject(String uuid, Map<String, Object> data);", "public DataStorage (SensorManager sensorManager, Sensor gyro, Sensor acceleromter) {\n this.sensorManager = sensorManager;\n this.sensor = gyro;\n\n dataPoints = new LinkedList<>();\n gyroListener = new GyroListener();\n accelListener = new AccelListener();\n sensorManager.registerListener(gyroListener, gyro, SensorManager.SENSOR_DELAY_GAME);\n sensorManager.registerListener(accelListener, acceleromter, SensorManager.SENSOR_DELAY_GAME);\n }", "@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }", "public interface SensorDataService{\n Temperature saveTemperature(Temperature temperature);\n Humidity saveHumidity(Humidity humidity);\n AirPressure saveAirPressure(AirPressure airPressure);\n}", "protected Sensor<Float> createExtreme(Sensor<Float> sensor, Extreme type)\n {\n String key = sensor.getUuid() + \".\" + type.key;\n History history = extremes.get(key);\n\n // Es gibt noch gar keine Queue fuer die Werte. Dann legen wir eine an\n if (history == null)\n {\n Settings settings = Application.getPluginLoader().getPlugin(Plugin.class).getResources().getSettings();\n int minutes = settings.getInt(\"scheduler.interval.minutes\",5);\n int size = 24 * 60 / minutes;\n history = new History(size);\n extremes.put(key,history);\n }\n\n Float value = sensor.getValue();\n\n // Wert hinzufuegen\n history.push(value);\n \n // Extrem-Wert ermitteln\n List<Float> values = history.elements();\n for (Float f:values)\n {\n if (type == Extreme.MAX && f.compareTo(value) > 0)\n {\n value = f;\n continue;\n }\n if (type == Extreme.MIN && f.compareTo(value) < 0)\n {\n value = f;\n continue;\n }\n }\n\n Sensor clone = (Sensor<Float>) sensor.clone();\n clone.setUuid(key);\n clone.setValue(value);\n clone.setName(i18n.tr(\"{0} ({1})\",sensor.getName(),type.title));\n return clone;\n }", "public Sensor(int threadNumber) {\n\t\tdeviceNumber = threadNumber;\n\t}", "public T caseSensor(Sensor object) {\n\t\treturn null;\n\t}", "@Override\n public Movie createFromParcel(Parcel in) {\n return new Movie(in);\n }", "@Override\n\t\tpublic Info createFromParcel(Parcel source) {\n\t\t\treturn new Info(source);\n\t\t}", "@Override\n\t\tpublic LoginDto createFromParcel(Parcel source) {\n\t\t\tLoginDto td = new LoginDto();\n\t\t\ttd.custNo = source.readString();\n\t\t\ttd.leftTimes = source.readString();\n\t\t\ttd.contentCode = source.readInt();\n\t\t\ttd.contentMsg = source.readString();\n\t\t\treturn td;\n\t\t}", "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "public static ReferenceSensor from(UUID id, UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemTime, InformationSource informationSource, String comment) {\n return new ReferenceSensor(id, channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemTime, informationSource, comment);\n }", "public interface C0591c extends Parcelable {\n}", "public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}", "@Override\n public ImageData createFromParcel(Parcel source) {\n return new ImageData(source); // using parcelable constructor\n }", "public void my_readFromParcel(Parcel in) {\n x = in.readFloat();\n y = in.readFloat();\n }", "public abstract void recordSensorData(RealmObject sensorData);", "public SensorLog() {\n }", "private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }", "GenericFloatSensor sensor();", "public C1748jj createFromParcel(Parcel parcel) {\n int G = C0721a.m714G(parcel);\n int i = 0;\n int i2 = 0;\n int i3 = 0;\n String str = null;\n IBinder iBinder = null;\n Scope[] scopeArr = null;\n Bundle bundle = null;\n while (parcel.dataPosition() < G) {\n int F = C0721a.m713F(parcel);\n switch (C0721a.m720aH(F)) {\n case 1:\n i = C0721a.m728g(parcel, F);\n break;\n case 2:\n i2 = C0721a.m728g(parcel, F);\n break;\n case 3:\n i3 = C0721a.m728g(parcel, F);\n break;\n case 4:\n str = C0721a.m736o(parcel, F);\n break;\n case 5:\n iBinder = C0721a.m737p(parcel, F);\n break;\n case 6:\n scopeArr = (Scope[]) C0721a.m722b(parcel, F, Scope.CREATOR);\n break;\n case 7:\n bundle = C0721a.m738q(parcel, F);\n break;\n default:\n C0721a.m721b(parcel, F);\n break;\n }\n }\n if (parcel.dataPosition() == G) {\n return new C1748jj(i, i2, i3, str, iBinder, scopeArr, bundle);\n }\n throw new C0721a.C0722a(\"Overread allowed size end=\" + G, parcel);\n }", "public void readFromParcel(Parcel in) {\n mStreams.clear();\n Parcelable[] parcebleArray = in.readParcelableArray(Stream.class.getClassLoader());\n if(parcebleArray != null) {\n for (Parcelable p : parcebleArray) {\n Stream s = (Stream) p;\n mStreams.add(s);\n }\n }\n }", "@Override protected Parcelable onSaveInstanceState() {\n Parcelable superState = super.onSaveInstanceState();\n SavedState ss = new SavedState(superState);\n ss.rotated = rotated;\n ss.totalSpacingDegree = totalSpacingDegree;\n ss.satelliteDistance = satelliteDistance;\n ss.measureDiff = measureDiff;\n ss.expandDuration = expandDuration;\n ss.closeItemsOnClick = closeItemsOnClick;\n return ss;\n }", "public User(Parcel in){\n String[] data = new String[4];\n\n in.readStringArray(data);\n // the order needs to be the same as in writeToParcel() method\n // Converts from string\n this.name = data[0];\n this.description = data[1];\n this.id = Integer.parseInt(data[2]);\n this.followed = Boolean.parseBoolean(data[3]);\n }", "protected NewLocation(Parcel in) {\n locationID = in.readInt();\n longitude = in.readDouble();\n altitude = in.readDouble();\n latitude = in.readDouble();\n speed = in.readFloat();\n time = in.readLong();\n }", "Parcelle createParcelle();", "public final QScanResultEntity createFromParcel(Parcel parcel) {\n QScanResultEntity qScanResultEntity = new QScanResultEntity();\n qScanResultEntity.packageName = parcel.readString();\n qScanResultEntity.softName = parcel.readString();\n qScanResultEntity.version = parcel.readString();\n qScanResultEntity.versionCode = parcel.readInt();\n qScanResultEntity.path = parcel.readString();\n qScanResultEntity.apkType = parcel.readInt();\n qScanResultEntity.certMd5 = parcel.readString();\n qScanResultEntity.size = parcel.readInt();\n qScanResultEntity.type = parcel.readInt();\n qScanResultEntity.advice = parcel.readInt();\n qScanResultEntity.malwareid = parcel.readInt();\n qScanResultEntity.name = parcel.readString();\n qScanResultEntity.label = parcel.readString();\n qScanResultEntity.discription = parcel.readString();\n qScanResultEntity.url = parcel.readString();\n return qScanResultEntity;\n }", "public abstract T deserialize(String serial);", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "SensorDescription(){\n\n }", "Map<String, ISensor> getSensorMap();", "public static ReferenceSensor create(UUID channelId, String instrumentManufacturer,\n String instrumentModel, String serialNumber, int numberOfComponents,\n double cornerPeriod, double lowPassband, double highPassband,\n Instant actualTime, Instant systemChangeTime,\n InformationSource informationSource, String comment) {\n\n return new ReferenceSensor(channelId, instrumentManufacturer, instrumentModel,\n serialNumber, numberOfComponents, cornerPeriod, lowPassband, highPassband,\n actualTime, systemChangeTime, informationSource, comment);\n }", "@Override\n public void receivedSensor(SensorData sensor) {\n synchronized(_sensorListeners) {\n if (!_sensorListeners.containsKey(sensor.channel)) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_SENSOR.str);\n UdpConstants.writeSensorData(resp.stream, sensor);\n \n // Send to all listeners\n synchronized(_sensorListeners) {\n Map<SocketAddress, Integer> _listeners = _sensorListeners.get(sensor.channel);\n _udpServer.bcast(resp, _listeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize sensor \" + sensor.channel);\n }\n }", "public interface Treasure extends Parcelable {\n Coins getValue();\n String getName();\n Treasure reroll();\n}", "public synchronized Sensor getSensor(int id)\n {\n return sensors.get(id);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }", "public static ArrayList<Sensor> getSensorsFromFile(InputStream fileStream) {\n ArrayList<Sensor> sensors = new ArrayList<>();\n Properties props = new Properties();\n\n // load configuration file\n try {\n props.load(fileStream);\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // for every property in the file...\n Enumeration e = props.propertyNames();\n iterateProperties:\n while(e.hasMoreElements()) {\n String sensorName = (String)e.nextElement();\n String[] parameters = props.getProperty(sensorName).split(\", *\");\n Duration[] refreshPeriods = new Duration[3];\n\n // validate parameter count\n if(parameters.length < 4) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (at least 4 needed)\");\n continue iterateProperties;\n }\n\n // parse refresh periods in ms\n for(int i = 0; i < 3; ++i)\n try {\n refreshPeriods[i] = Duration.ofMillis(Integer.parseInt(parameters[i + 1]));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect duration formatting (integer in milliseconds expected)\");\n continue iterateProperties;\n }\n\n // create sensor of specified type and add to arrayList\n switch (parameters[0]) {\n case \"LSM303a\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303a type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303AccelerationSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"LSM303m\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (LSM303m type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new LSM303MagneticSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"L3GD20H\":\n if(parameters.length != 6) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (L3GD20H type requires exactly 6)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new L3GD20HGyroscopeSensor(sensorName, refreshPeriods, Float.parseFloat(parameters[4]), Integer.parseInt(parameters[5])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimInt\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimInt type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorInt(sensorName, refreshPeriods, Integer.parseInt(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimFloat\":\n if(parameters.length != 5) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 5)\");\n continue iterateProperties;\n }\n try {\n sensors.add(new SimulatedSensorFloat(sensorName, refreshPeriods, Float.parseFloat(parameters[4])));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n case \"SimVecFloat\":\n if(parameters.length != 7) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect number of parameters (SimFloat type requires exactly 7)\");\n continue iterateProperties;\n }\n try {\n float[] seed = new float[3];\n for(int i = 0; i < seed.length; ++i) {\n seed[i] = Float.parseFloat(parameters[i + 4]);\n }\n sensors.add(new SimulatedSensorVecFloat(sensorName, refreshPeriods, seed));\n } catch(NumberFormatException ex) {\n System.err.println(\"config.properties error (\" + sensorName + \"): incorrect formatting\");\n continue iterateProperties;\n }\n break;\n\n default:\n System.err.println(\"config.properties error (\" + sensorName + \"): \" + parameters[0] + \" is not a valid sensor type\");\n continue iterateProperties;\n }\n }\n\n return sensors;\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "public static SensorDialogFragment newInstance(String buoyID, String sensorID) {\n SensorDialogFragment fragment = new SensorDialogFragment();\n Bundle args = new Bundle();\n args.putString(BUOY_ID, buoyID);\n args.putString(SENSOR_ID, sensorID);\n fragment.setArguments(args);\n return fragment;\n }", "public String getSensor()\n {\n return sensor;\n }", "private void activeSensor(Sensor sensor) {\n selectedSensor = sensor;\n// selectedSensor.debug(true);\n// if (start) {\n// view = (DrawingView) findViewById(R.id.surface);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n// }\n }", "public Weather(Parcel in) {\n summary = in.readString();\n picURL = in.readString();\n }", "public static <T extends Structure> T CreateInstance(String resourceLocation, Class<? extends Structure> child) {\n T structure = null;\n\n Gson file = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();\n structure = (T) file.fromJson(ZipUtil.decompressResource(resourceLocation), child);\n\n return structure;\n }", "public RegisterSensor(final String version, final Object sensorDescription, final ObservationTemplate observationTemplate) {\n super(version);\n this.observationTemplate = observationTemplate;\n this.sensorDescription = new SensorDescription(sensorDescription);\n }", "@Override\n\t\tpublic photo createFromParcel(Parcel in) {\n\t\t\t return new photo(in);\n\t\t}", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putSerializable(\"device\", mDevice);\n }", "private Vault(Parcel in) {\n \tid = in.readInt();\n \tgymnastId = in.readInt();\n \tname = in.readString();\n \tdScore = in.readDouble();\n \teScore = in.readDouble();\n \tdate = new Date(in.readLong());\n \tdata = in.readString();\n \t\n \tconvertDataToSpeedAndDistanceData();\n }", "public <T> T getParcelable(@NonNull final String key,\n @NonNull final Parcelable.Creator<T> creator) {\n return getParcelable(key, creator, null);\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "public LogEvent createFromParcel(Parcel parcel) {\n long j = 0;\n Bundle bundle = null;\n int zzaq = zza.zzaq(parcel);\n int i = 0;\n byte[] bArr = null;\n String str = null;\n long j2 = 0;\n while (parcel.dataPosition() < zzaq) {\n int zzap = zza.zzap(parcel);\n switch (zza.zzcj(zzap)) {\n case 1:\n i = zza.zzg(parcel, zzap);\n break;\n case 2:\n j2 = zza.zzi(parcel, zzap);\n break;\n case 3:\n str = zza.zzq(parcel, zzap);\n break;\n case 4:\n bArr = zza.zzt(parcel, zzap);\n break;\n case 5:\n bundle = zza.zzs(parcel, zzap);\n break;\n case 6:\n j = zza.zzi(parcel, zzap);\n break;\n default:\n zza.zzb(parcel, zzap);\n break;\n }\n }\n if (parcel.dataPosition() == zzaq) {\n return new LogEvent(i, j2, j, str, bArr, bundle);\n }\n throw new zza.zza(\"Overread allowed size end=\" + zzaq, parcel);\n }" ]
[ "0.714916", "0.6217719", "0.59472454", "0.5925174", "0.5489485", "0.5472411", "0.5439583", "0.53962064", "0.5353913", "0.53427166", "0.53126657", "0.52453595", "0.52200305", "0.5204683", "0.51948285", "0.51678073", "0.5166897", "0.5073928", "0.50453514", "0.5034619", "0.5001123", "0.49980146", "0.499788", "0.49665904", "0.49381015", "0.49278262", "0.49142584", "0.49123445", "0.48722303", "0.48389125", "0.48319945", "0.48288882", "0.48220333", "0.48169675", "0.4814636", "0.4781166", "0.47673455", "0.47353628", "0.47331592", "0.47300318", "0.4729789", "0.47062895", "0.46775416", "0.4667955", "0.4664869", "0.4654802", "0.46458697", "0.4642837", "0.4637884", "0.46371293", "0.4628481", "0.462215", "0.46173912", "0.46153405", "0.4603557", "0.45997113", "0.45977885", "0.45961666", "0.45958224", "0.45955566", "0.45955405", "0.45781416", "0.45586112", "0.45481142", "0.4545046", "0.45360565", "0.45346892", "0.45253813", "0.45126635", "0.45018944", "0.4501438", "0.45012754", "0.4497241", "0.44857833", "0.4469608", "0.44682696", "0.44669363", "0.44571152", "0.44452053", "0.4444475", "0.44276232", "0.4427241", "0.44171053", "0.4416119", "0.44102854", "0.4408761", "0.44039094", "0.44027162", "0.43986818", "0.43963242", "0.43950963", "0.43950114", "0.43931416", "0.43768626", "0.43742862", "0.43716842", "0.43697888", "0.43644297", "0.43542954", "0.43532816" ]
0.5840249
4
/////////////////////////////////////////////////////// //////////////// GETTERS AND SETTERS ////////////////// ///////////////////////////////////////////////////////
public int getSensorID() { return sensorID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "protected abstract Set method_1559();", "String setValue();", "public void setdat()\n {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private void assignment() {\n\n\t\t\t}", "public int\t\tget() { return value; }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void get() {\n }", "@Override\n String get();", "public String get();", "public void setAge(int age) { this.age = age; }", "public Object get()\n {\n return m_internalValue;\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n protected void updateProperties() {\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "private ReadProperty()\r\n {\r\n\r\n }", "public T get() {\n return value;\n }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }", "public abstract String get();", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public int value() { \n return this.value; \n }", "@Override\n public void saveValues() {\n \n }", "@Override\npublic void setAttributes() {\n\t\n}", "public void setName(String name){this.name=name;}", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "public String get()\n {\n return this.string;\n }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "@Test\n public void testGetSets() {\n ref.setKey(\"test23\");\n assertEquals(\"test23\", ref.getKey());\n ref.setAuthor(\"test23\");\n assertEquals(\"test23\", ref.getAuthor());\n ref.setEditor(\"test23\");\n assertEquals(\"test23\", ref.getEditor());\n ref.setTitle(\"test23\");\n assertEquals(\"test23\", ref.getTitle());\n ref.setBooktitle(\"test23\");\n assertEquals(\"test23\", ref.getBooktitle());\n ref.setYear(\"1839\");\n assertEquals(\"1839\", ref.getYear());\n ref.setPublisher(\"Otava\");\n assertEquals(\"Otava\", ref.getPublisher());\n ref.setJournal(\"test23\");\n assertEquals(\"test23\", ref.getJournal());\n ref.setVolume(\"3\");\n assertEquals(\"3\", ref.getVolume());\n ref.setNumber(\"123\");\n assertEquals(\"123\", ref.getNumber());\n ref.setSeries(\"test23\");\n assertEquals(\"test23\", ref.getSeries());\n ref.setEdition(\"3rd\");\n assertEquals(\"3rd\", ref.getEdition());\n ref.setPages(\"12-35\");\n assertEquals(\"12-35\", ref.getPages());\n ref.setMonth(\"May\");\n assertEquals(\"May\", ref.getMonth());\n ref.setNote(\"test23\");\n assertEquals(\"test23\", ref.getNote());\n }", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public String get() {\n return value;\n\t}", "public byte[] get(){\n return this.value;\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public int getSet() {\n return set;\n }", "private void setData() {\n\n }", "public Object getValue() { return _value; }", "public void setupProperties() {\n // left empty for subclass to override\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "protected void storeCurrentValues() {\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public void set(String name, Object value) {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public Object getValue(){\n \treturn this.value;\n }", "public void setU(String f){\n u = f;\n}", "public void setRes(){\r\n \r\n }", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void setUserData(){\n }", "@Test\n\tpublic void testSet() {\n\t}", "public V get() {\n return value;\n }", "public void setX(int x) { this.x=x; }", "public Object getValue()\n {\n\treturn value;\n }", "public int get () { return rating; }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "String get();", "String get();", "public int getlife(){\r\n return life;\r\n}", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "public void setName(String name){this.name = name;}", "@Override\n\tpublic void initializeValues() {\n\n\t}", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public int getAge() {return age;}", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "public Book getBook() \t\t{ return this.myBook; }", "@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}", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public void setValue(Object value) { this.value = value; }", "public Object getNewValue()\n {\n return newValue;\n }", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public void testGetterAndSetter() {\n UDDIOperationInput uddiOperationInput = new UDDIOperationInput();\n\n //Test Get and Set ElementType\n QName qName = new QName(UDDI_NS_URI, \"input\");\n assertNotNull(\"getElementType was null\",\n uddiOperationInput.getElementType());\n assertTrue(\"getElementType was incorrect\",\n uddiOperationInput.getElementType().equals(qName));\n\n //Test Get and Set Required\n uddiOperationInput.setRequired(isRequired);\n assertFalse(\"getRequired returned true\",\n uddiOperationInput.getRequired());\n isRequired = true;\n uddiOperationInput.setRequired(isRequired);\n assertTrue(\"getRequired returned false\",\n uddiOperationInput.getRequired());\n\n //Test Get and Set BusinessName\n uddiOperationInput.setBusinessName(businessName);\n assertTrue(\"getBusinessName incorrect\",\n uddiOperationInput.getBusinessName().equals(businessName));\n\n //Test Get and Set ServiceName\n uddiOperationInput.setServiceName(serviceName);\n assertTrue(\"getServiceName incorrect\",\n uddiOperationInput.getServiceName().equals(serviceName));\n }", "@Override\n\tpublic void setData() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void setPrice(double price){this.price=price;}", "String getName(){return this.name;}", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public String getName () { return this.name; }", "Datty getDatty();" ]
[ "0.6553492", "0.6423966", "0.6359154", "0.62207294", "0.6200378", "0.61341244", "0.6086578", "0.6046086", "0.603219", "0.59598625", "0.58804107", "0.58567077", "0.5813157", "0.58106345", "0.5798105", "0.57964057", "0.57964057", "0.5789135", "0.57880443", "0.5783892", "0.5772191", "0.57676685", "0.57633054", "0.5743723", "0.57310325", "0.5714982", "0.5704934", "0.5703348", "0.57028645", "0.5694989", "0.5688101", "0.567581", "0.56704134", "0.56645733", "0.56428355", "0.56408036", "0.5627023", "0.56250244", "0.5622256", "0.56164074", "0.56152093", "0.5608588", "0.5602011", "0.5600754", "0.5584187", "0.55838686", "0.55838686", "0.5582093", "0.55793655", "0.5575759", "0.55692637", "0.5564303", "0.5558325", "0.55561644", "0.5556025", "0.5555965", "0.55476385", "0.5545631", "0.55409557", "0.5538746", "0.55386704", "0.55294716", "0.5528638", "0.55283546", "0.5525111", "0.55206996", "0.55206996", "0.55190384", "0.5518244", "0.5518021", "0.55179566", "0.55163157", "0.5509932", "0.5509641", "0.55096203", "0.550885", "0.550885", "0.550318", "0.5502603", "0.54928505", "0.54928505", "0.54928505", "0.54928505", "0.54928505", "0.54928505", "0.54914695", "0.54908854", "0.5489086", "0.5486725", "0.5486283", "0.5483988", "0.5472124", "0.547109", "0.5469796", "0.54674786", "0.5463965", "0.54637724", "0.5463366", "0.5459211", "0.5457715", "0.5457362" ]
0.0
-1
File imgFile = new File("img/Checker.bmp"); return ImageIO.read(imgFile);
private BufferedImage initImg() throws IOException { int h = 256, w = 256; BufferedImage img = new BufferedImage(h, w, BufferedImage.TYPE_INT_ARGB); //int red = 0xff000000 + 0x00ff0000 + 0x00000000 + 0x00000000; short max = 0, min = 255, c = max; int color = SimpleImageViewer.getIntPixel(c, c, c); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { img.setRGB(x, y, color); } } return img; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BufferedImage readImage() throws IOException{\n\t\tFile read = new File(\"src/blue_plate.png\");\n\t\t//decodes a supplied File and returns a BufferedImage\n\t\tBufferedImage master = ImageIO.read(read);\n\t\treturn master;\n\t\t\n\t}", "private BufferedImage getImage(String f) {\n BufferedImage image = null;\n File file = new File(f);\n\n try {\n image = ImageIO.read(file);\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(\n null,\n \"Image could not be read!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "static public Image read(String filename) throws IOException\n {\n MyBMPFile reader = new MyBMPFile();\n \n return reader.loadBitmap(filename);\n }", "public static Image loadImage(String name) {\r\n Image result = null;\r\n try {\r\n result = ImageIO.read(IO.class.getClassLoader().getResourceAsStream(\"data/\" + name));\r\n } catch (Exception ex) {\r\n } \r\n return result;\r\n }", "public void test(String path){\n File file = new File(path);\n byte[] image = new byte[(int) file.length()];\n try {\n FileInputStream fis = new FileInputStream(file);\n fis.read(image); //read file into bytes[]\n\n fis.close();\n test(image);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "String getImage();", "BufferedImage getImage();", "BufferedImage getImage();", "BufferedImage getImage();", "private BufferedImage readImage(String fileName) {\n BufferedImage image = null;\n\n try {\n InputStream inputFile = getClass().getResourceAsStream(fileName);\n image = ImageIO.read(inputFile);\n } catch (IIOException fnfexc) {\n System.err.println(\"Bitmap file '\" + fileName + \"' cannot be found\");\n } catch (IOException ioexp) {\n System.err.println(\"No contact with outside world\");\n }\n\n return image;\n }", "protected BufferedImage loadImage(String nameOfFile)\n {\n BufferedImage img;\n try{\n img= ImageIO.read(new File(\"\"+nameOfFile));\n return img;\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n return null;\n }", "public int getImage();", "private BufferedImage loadImage(String path) {\n try {\n return ImageIO.read(getClass().getClassLoader().getResource(path));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n return null;\n }", "public Image getBassClef();", "public ImageFile(BufferedImage img) throws ImageException{\r\n\tloadImage(img);\r\n}", "static BufferedImage getImage(String directory) {\n\t\tClassLoader loader = DrawingUtility.class.getClassLoader();\n\t\tBufferedImage image;\n\t\ttry {\n\n\t\t\timage = ImageIO.read(loader.getResource(directory));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Fail load image from \" + directory);\n\t\t\timage = null;\n\t\t}\n\t\treturn image;\n\n\t}", "public BufferedImage readImage(String path) {\n File file = new File(path);\n BufferedImage image = null;\n try {\n image = ImageIO.read(file);\n } catch (IOException ex) {\n Logger.getLogger(ProcessImage.class.getName()).log(Level.SEVERE, null, ex);\n }\n return image;\n }", "public static BufferedImage readImageFromFile() {\r\n BufferedImage img = null;\r\n final JFileChooser fileChooser = new JFileChooser();\r\n File selectedFile = null;\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) {\r\n selectedFile = fileChooser.getSelectedFile();\r\n System.out.println(\"Selected file: \" + selectedFile.getAbsolutePath());\r\n }\r\n try {\r\n img = ImageIO.read(selectedFile);\r\n } catch (IOException e) {\r\n }\r\n return img;\r\n }", "static BufferedImage loadImage(String filename){\r\n\t\t\r\n\t\tBufferedImage image = null;\r\n\t\ttry{\r\n\t\t\timage = ImageIO.read(View.class.getResource(filename));\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace(System.err);\r\n\t\t}\r\n\t\t\r\n\t\treturn image;\r\n\t}", "private static BufferedImage loadImage(File parFile) throws IOException\n\t{\n\t\treturn ImageIO.read(parFile);\n\t}", "public ModelImage readImage(boolean one) throws IOException {\r\n // The data types are Sun, hence the byte order is big-endian.\r\n int i;\r\n int num; //image number within file\r\n\r\n boolean endianess = LITTLE_ENDIAN;\r\n\r\n try {\r\n file = new File(fileDir + fileName);\r\n raFile = new RandomAccessFile(file, \"r\");\r\n progressBar = new ViewJProgressBar(ViewUserInterface.getReference().getProgressBarPrefix() + fileName,\r\n ViewUserInterface.getReference().getProgressBarPrefix() + \"BioRad image(s) ...\", 0, 100,\r\n false, null, null);\r\n xDim = getSignedShort(endianess); // 0\r\n yDim = getSignedShort(endianess); // 2\r\n zDim = getSignedShort(endianess); // 4\r\n ramp1Min = (short)getSignedShort(endianess); // 6\r\n ramp1Max = (short)getSignedShort(endianess); // 8\r\n notes = getInt(endianess); // 10\r\n byteFormat = (short)getSignedShort(endianess); // 14\r\n num = (short)getSignedShort(endianess); // 16\r\n\r\n setProgressBarVisible(!one);\r\n\r\n for (i = 0; i < 32; i++) {\r\n name[i] = 0;\r\n }\r\n readAgain = true;\r\n i = 0;\r\n while(readAgain) {\r\n name[i++] = raFile.readByte(); // 18\r\n if (name[i-1] == 0) {\r\n readAgain = false;\r\n }\r\n }\r\n fName = new String(name,0,i-1);\r\n raFile.seek(50);\r\n merged = (short)getSignedShort(endianess); // 50\r\n color1 = getUnsignedShort(endianess); // 52\r\n fileID = getUnsignedShort(endianess); // 54\r\n if (fileID != 12345) {\r\n throw new IOException(\"fileID is an illegal \" + fileID);\r\n }\r\n ramp2Min = (short)getSignedShort(endianess); // 56\r\n ramp2Max = (short)getSignedShort(endianess); // 58\r\n color2 = getUnsignedShort(endianess); // 60\r\n edited = (short)getSignedShort(endianess); // 62\r\n lens = (short)getSignedShort(endianess); // 64\r\n magFactor = getFloat(endianess); // 66\r\n // Position to the start of the image data\r\n raFile.seek(76);\r\n\r\n fileInfo = new FileInfoBioRad(fileName, fileDir, FileBase.BIORAD); // dummy fileInfo\r\n fileInfo.setEndianess(endianess);\r\n if (zDim > 1) {\r\n imgExtents = new int [3];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n imgExtents[2] = zDim;\r\n }\r\n else {\r\n imgExtents = new int [2];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n }\r\n\r\n fileInfo.setExtents(imgExtents);\r\n if (byteFormat == 1) {\r\n dataType = ModelStorageBase.UBYTE;\r\n bufferSize = xDim*yDim;\r\n }\r\n else { // byteFormat == 0\r\n dataType = ModelStorageBase.SHORT;\r\n bufferSize = xDim*yDim;\r\n }\r\n /*else { // merged pseudocolor\r\n dataType = ModelStorageBase.ARGB;\r\n bufferSize = 4*xDim*yDim;\r\n }*/\r\n fileInfo.setDataType(dataType);\r\n\r\n if (one) {\r\n image = new ModelImage(dataType, new int[] {imgExtents[0], imgExtents[1]}, fileInfo.getFileName(), UI);\r\n zDim = 1;\r\n }\r\n else {\r\n image = new ModelImage(dataType, imgExtents, fileInfo.getFileName(), UI);\r\n }\r\n\r\n imgBuffer = new float[bufferSize];\r\n for (i = 0; i < zDim; i++){\r\n try {\r\n if (one && imgExtents.length > 2) {\r\n if (dataType == ModelStorageBase.UBYTE) {\r\n raFile.seek(imgExtents[2]/2*xDim*yDim);\r\n }\r\n else {\r\n raFile.seek(imgExtents[2]*xDim*yDim);\r\n }\r\n readBuffer(imgExtents[2]/2, imgBuffer);\r\n }\r\n else {\r\n readBuffer(i, imgBuffer); // Slice a time;\r\n }\r\n image.setFileInfo(fileInfo, i);\r\n }\r\n catch (IOException error){\r\n throw new IOException(\"FileTiff: read: \" + error);\r\n }\r\n image.importData(i*bufferSize, imgBuffer, false);\r\n } // for (i = 0; i < imageSlice; i++)\r\n\r\n raFile.close();\r\n progressBar.dispose();\r\n }\r\n catch (OutOfMemoryError error) {\r\n if (image != null) {\r\n image.disposeLocal();\r\n image = null;\r\n }\r\n byteBuffer = null;\r\n System.gc();\r\n throw error;\r\n }\r\n\r\n return image;\r\n }", "public static BufferedImage loadImage(String ref) {\n BufferedImage b1 = null;\n try {\n b1 = ImageIO.read(new File(ref));\n } catch (IOException e) {\n System.out.println(\"error loading the image: \" + ref + \" : \" + e);\n }\n return b1;\n }", "IMG createIMG();", "protected abstract Image loadImage();", "File resolveImage(Box box);", "Picture binaryComponentImage() throws Exception;", "public Label getPic(){\n //try {//getPic is only called if isPic is true, so side1 would contain picture path\n /*BufferedImage unsized = ImageIO.read(new File(side1));\n BufferedImage resized = resizeImage(unsized,275,250, unsized.getType());\n frontPic.setIcon(new ImageIcon(resized));*/\n\n\t\t\tImage image = new Image(new File(side1).toURI().toString());\n\t\t\tImageView iv = new ImageView(image);\n\t\t\tLabel imageLabel = new Label(\"Image\");\n\t\t\timageLabel.setGraphic(iv);\n\t\t\treturn imageLabel;\n /*} catch (IOException ex) {\n System.out.println(\"Trouble reading from the file: \" + ex.getMessage());\n }\n return frontPic;*/\n }", "private Image loadImage (String path) {\n\t\tImageIcon imageicon = new ImageIcon (path);\r\n\t\tImage newImage = imageicon.getImage();\r\n\t\treturn newImage;\r\n\t}", "private byte[] getImageBytes(File image){\n byte[] imageInByte = null;\n try{\n \n\tBufferedImage originalImage = \n ImageIO.read(image);\n \n\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\tImageIO.write( originalImage, \"png\", baos );\n\tbaos.flush();\n\timageInByte = baos.toByteArray();\n\tbaos.close();\n \n\t}catch(IOException e){\n\t\tSystem.out.println(e.getMessage());\n\t}finally{\n return imageInByte;\n }\n }", "public static Image getImage(String filename) \r\n \t{\r\n \r\n \t\tInputStream is = cl.getResourceAsStream(AA_RESOURCE_FILE_PATH + filename);\r\n \t\t\r\n \t\tif(is == null){\r\n \t\t\tSystem.out.println(\"Input stream is null\");\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\treturn (ImageIO.read(is));\r\n \t\t} catch (Exception e) {\r\n \t\t\tlog.error(\"An exception occurred while reading the file: \"+filename);\r\n \t\t\tlog.error(e.getMessage());\r\n \t\t\te.printStackTrace();\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "public void testRead() throws IOException\n {\n File file;\n Pic pic;\n\n file = new File(\"src/test/resources/pic/test.pic\");\n pic = Pic.read(new FileInputStream(file), 288, 128);\n assertNotNull(pic);\n assertEquals(new File(\"src/test/resources/pic/test.png\"), pic);\n }", "Imagem getImagem();", "Image createImage();", "private void readFile(){\n File file = new File(Environment.getExternalStorageDirectory()+\"/saved_images/profile.jpg\");\n myPictureForShow = BitmapFactory.decodeFile(file.getAbsolutePath());\n }", "java.lang.String getImage();", "public static BufferedImage readImage(String imageName) {\n\t\tBufferedImage image = null;\n\t\ttry {\n\t\t\tURL url = Main.class.getResource(\"/\"+imageName);\n\t\t\tString file = (url.getPath());\n\t\t\tSystem.out.println(url);\n\t\t\timage = ImageIO.read(new File(file));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"[Error in DisplayObject.java:readImage] Could not read image \" + imageName);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "public native double testyolo(String imgfile);", "public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }", "public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\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\treturn image;\n\t}", "private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}", "private Image getImage(String name) {\n InputStream in =\n getClass().getResourceAsStream(\"/canfield/resources/\" + name);\n try {\n return ImageIO.read(in);\n } catch (IOException excp) {\n return null;\n }\n }", "private BufferedImage getImage(String filename) {\n\t\ttry {\n\t\t\t// Grab the InputStream for the image.\n\t\t\tInputStream in = getClass().getResourceAsStream(filename);\n\t\t\t\n\t\t\t// Then read it in.\n\t\t\treturn ImageIO.read(in);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"The image was not loaded.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn null;\n\t}", "private void openCVImage(){\n Imgcodecs codec = new Imgcodecs();\n image = codec.imread(currentPhotoPath, Imgcodecs.IMREAD_COLOR);\n }", "public static com.jme.image.Image loadImage(InputStream fis, boolean flip, boolean exp32) throws\n IOException {\n byte red = 0;\n byte green = 0;\n byte blue = 0;\n byte alpha = 0;\n //open a stream to the file\n BufferedInputStream bis = new BufferedInputStream(fis, 8192);\n DataInputStream dis = new DataInputStream(bis);\n //Read the TGA header\n idLength = (short) dis.read();\n colorMapType = (short) dis.read();\n imageType = (short) dis.read();\n cMapStart = flipEndian(dis.readShort());\n cMapLength = flipEndian(dis.readShort());\n cMapDepth = (short) dis.read();\n xOffset = flipEndian(dis.readShort());\n yOffset = flipEndian(dis.readShort());\n width = flipEndian(dis.readShort());\n height = flipEndian(dis.readShort());\n pixelDepth = (short) dis.read();\n imageDescriptor = (short) dis.read();\n //Skip image ID\n if (idLength > 0)\n bis.skip(idLength);\n // Allocate image data array\n byte[] rawData = null;\n int dl;\n if ((pixelDepth == 32)||(exp32)) {\n rawData = new byte[width * height * 4];\n dl=4;\n } else {\n rawData = new byte[width * height * 3];\n dl=3;\n }\n int rawDataIndex = 0;\n \n // Faster than doing a 24-or-32 check on each individual pixel,\n // just make a seperate loop for each.\n if (pixelDepth == 24)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n if(dl==4) {\n // create an alpha channel\n rawData[rawDataIndex++] = (byte)255;\n }\n \n }\n }\n else if (pixelDepth == 32)\n for (int i = 0; i <= (height - 1); i++) {\n if(flip) rawDataIndex=(height-1-i)*width*dl;\n for (int j = 0; j < width; j++) {\n blue = dis.readByte();\n green = dis.readByte();\n red = dis.readByte();\n alpha = dis.readByte();\n rawData[rawDataIndex++] = red;\n rawData[rawDataIndex++] = green;\n rawData[rawDataIndex++] = blue;\n rawData[rawDataIndex++] = alpha;\n }\n }\n fis.close();\n //Get a pointer to the image memory\n ByteBuffer scratch = ByteBuffer.allocateDirect(rawData.length);\n scratch.clear();\n scratch.put(rawData);\n scratch.rewind();\n // Create the jme.image.Image object\n com.jme.image.Image textureImage = new com.jme.image.Image();\n if (dl == 4)\n textureImage.setType(com.jme.image.Image.RGBA8888);\n else\n textureImage.setType(com.jme.image.Image.RGB888);\n textureImage.setWidth(width);\n textureImage.setHeight(height);\n textureImage.setData(scratch);\n return textureImage;\n }", "public byte[] getImage(String file) throws Exception{\n byte[] bytes = getClass().getResourceAsStream(file).readAllBytes();\n return bytes;\n\n }", "public static Image getImage(String path) {\n\t\tString nomFichier = \"src/main/resources/images/\" + path;\n\t\tImage image = null;\n\t\ttry {\n\t\t\timage = new Image(new FileInputStream(nomFichier));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "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 static byte[] getImageBinary(File f) {\n BufferedImage bi;\n try {\n bi = ImageIO.read(f);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ImageIO.write(bi, \"jpg\", baos);\n byte[] bytes = baos.toByteArray();\n return bytes;\n //return encoder.encodeBuffer(bytes).trim();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public BufferedImage loadImage(String path){\n\t\ttry {\n\t\t\timage = ImageIO.read(getClass().getResource(path));\n\t\t\tSystem.out.println(\"Sprite Sheet Loaded\");\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "@Override\n public BufferedImage getImage(final Side side) throws IOException {\n if (side.equals(Side.White)) {\n File file = new File(\"src/main/resources/knight_white.png\");\n return ImageIO.read(file);\n }\n File file = new File(\"src/main/resources/knight_black.png\");\n return ImageIO.read(file);\n }", "static Bitmap getImage(byte[] image) {\n return BitmapFactory.decodeByteArray(image, 0, image.length);\n }", "WorldImage getImage();", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "public abstract Image getImage();", "public abstract Image getImage();", "public Image getSharp();", "public BufferedImage getImage(String fileName){\r\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\r\n\t\tInputStream input = classLoader.getResourceAsStream(fileName);\r\n\t\tBufferedImage image = null;\r\n\t\ttry {\r\n\t\t\timage = ImageIO.read(input);\r\n\t\t} catch (IOException e1) {\r\n\t\t\tSystem.out.println(\"invalid image file name\");\r\n\t\t}\r\n\t\t//System.out.println(image);\r\n\t\treturn image;\r\n\t}", "public synchronized BufferedImage image() {\n\t\tif (this.image == null) {\n\t\t\tString name;\n\t\t\tswitch (this) {\n\t\t\tcase INFO:\n\t\t\t\tname = \"info.png\"; // NOI18N\n\t\t\t\tbreak;\n\t\t\tcase WARNING:\n\t\t\t\tname = \"warning.png\"; // NOI18N\n\t\t\t\tbreak;\n\t\t\tcase FATAL:\n\t\t\t\tname = \"error.png\"; // NOI18N\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new AssertionError();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tthis.image = ImageIO.read(Severity.class.getResourceAsStream(name));\n\t\t\t} catch (final IOException ex) {\n\t\t\t\tthrow new IllegalArgumentException(ex);\n\t\t\t}\n\t\t}\n\t\treturn this.image;\n\t}", "private static Bitmap getImage(byte[] image) {\n /**\n * @brief convert from byte array to bitmap\n */\n return BitmapFactory.decodeByteArray(image, 0, image.length);\n }", "private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }", "private BufferedImage loadImage(File dat) {\n\t\tBufferedImage img = null;\n\n\t\tint orientation = -1;\n\t\ttry {\n\t\t\torientation = readExifData(dat);\n\t\t} catch (ImageReadException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\timg = ImageIO.read(dat); // Loads image to memory\n\t\t} catch (IOException e) {\n\t\t\t// error code\n\t\t\tSystem.out.println(\"Problem reading an image!\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\tBufferedImage newImage = null;\n\n\t\tif (orientation != -1) {\n\t\t\t// rotate image\n\n\t\t\tswitch (orientation) {\n\t\t\tcase 6:\n\t\t\t\t// rotate right for 90 degress\n\t\t\t\tnewImage = rotateRightFor90(img);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t// rotate left for 90 degress\n\t\t\t\tnewImage = rotateLeftFor90(img);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnewImage = img;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn img;\n\t\t}\n\n\t\treturn newImage;\n\t}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "public TailoredImage getImageFile(String filepath) throws IOException {\n\t\tBufferedImage source = ImageIO.read(new File(filepath));\n\t\treturn doProcess(source);\n\t}", "public static Try<BufferedImage> readBytes(byte[] data) {\n return Try.of(() -> Imaging.getBufferedImage(data))\n .logIfFailure(TAG, err -> String.format(\"failed to read image from data (%d bytes)\", data.length));\n }", "private Image makeAnImage(String s) throws IOException {\n //String imageName = s.substring(s.indexOf(\"\\\\(\") + 1, s.indexOf(\"\\\\)\"));\n String[] parts = s.split(\"\\\\(\");\n String imageName = parts[1].substring(0, parts[1].length() - 1);\n // load the image data into an java.awt.Image object.\n Image img = null;\n InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(imageName);\n try {\n img = ImageIO.read(is);\n } catch (IOException e) {\n System.out.println(\"Error: failed to load image\");\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n System.out.println(\"Failing closing the image\");\n }\n }\n }\n return img;\n }", "public static Mat imread(String filename)\n {\n\n Mat retVal = new Mat(imread_1(filename));\n\n return retVal;\n }", "public static BufferedImage getImage(String path) {\n File f = null;\n BufferedImage img = null;\n try{\n f = new File(path);\n if (!f.exists()) return null;\n boolean good = false;\n if (f.getName().toLowerCase().endsWith(\".png\") || f.getName().toLowerCase().endsWith(\".jpg\")) good = true;\n if (!good) return null;\n img = ImageIO.read(f);\n }catch(Exception e){\n return null;\n }\n return img;\n }", "private static native long imread_0(String filename, int flags);", "public Image readImage() throws IOException\n {\n int width = readInt();\n int height = readInt();\n int[] rgbData = new int[width*height];\n for (int ii = 0; ii < rgbData.length; ii++)\n {\n rgbData[ii] = readInt();\n }\n return Image.createRGBImage(rgbData, width, height, true);\n }", "public static Try<BufferedImage> readFile(String filePath) {\n return Files.readBytes(filePath).flatmap(Images::readBytes);\n }", "static Image bityNaObraz(String image) throws IOException\n {\n byte[] rysunek = DatatypeConverter.parseBase64Binary(image); \n BufferedImage img = ImageIO.read(new ByteArrayInputStream(rysunek));\n return img;\n }", "private BufferedImage readImageDataFromClasspath(String fileName)\n\t\t\tthrows IOException {\n\t\tInputStream in = this.getClass().getClassLoader().getResourceAsStream(\n\t\t\t\tfileName);\n\n\t\treturn ImageIO.read(in);\n\t}", "static public AppImage browseForImage() {\n // If there is no image ask the user to choose image from file:\n JFileChooser file_chooser = new JFileChooser();\n file_chooser.setAcceptAllFileFilterUsed(false);\n file_chooser.addChoosableFileFilter(new FileFilter() {\n public boolean accept(File file) {\n if (file.isDirectory()) return true;\n String extension = FileUtils.getFileExtension(file);\n return extension.equals(\"png\");\n }\n\n public String getDescription() {\n return \"Portable Network Graphics (PNG)\";\n }\n });\n int ret_value = file_chooser.showOpenDialog(App.instance);\n AppImage app_image = null;\n if (ret_value == JFileChooser.APPROVE_OPTION) {\n // Read the selected file and do scaling on it:\n File file = file_chooser.getSelectedFile();\n String path = file.getAbsolutePath();\n\n // Create the image and add it to cache:\n app_image = Resources.loadAppImage(path);\n addImage(app_image);\n writeRepository();\n }\n\n return app_image;\n }", "public static BufferedImage iconMaker(String s){\n BufferedImage buttonIcon;\n try{\n buttonIcon = ImageIO.read(new File(FILE_PATH + s));\n }catch(IOException e){\n buttonIcon = null;\n System.out.println(\"BooHOO\");\n }\n return buttonIcon;\n }", "public native void readImage(ImageInfo imageInfo) throws MagickException;", "public Image call() throws IOException;", "public static BufferedImage getBufferedImage(String name) {\n try {\n URL url = getURL(name);\n marg.util.Log.GlobalLogger.info(\"Loaded image from \"+ url);\n return ImageIO.read(url);\n } catch (Exception e) {\n e.printStackTrace();\n return new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);\n }\n }", "public WritableImage getImage(){\n\t\tWritableImage image = SwingFXUtils.toFXImage(BfImage, null);\r\n\t\treturn image;\r\n\t}", "private Bitmap translateImgToBitmap(String filepath){\n File imgFile = new File(filepath);\n\n if (imgFile.exists()) {\n Bitmap bitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n\n float imgScale = (float) bitmap.getHeight() / 1620;\n bitmap = Bitmap.createScaledBitmap(bitmap,\n Math.round(bitmap.getWidth() / imgScale),\n Math.round(bitmap.getHeight() / imgScale), true);\n\n return bitmap;\n\n } else {\n Toast.makeText(getApplicationContext(), \"Die Datei wurde nicht gefunden.\", Toast.LENGTH_SHORT).show();\n return null;\n }\n }", "public static Bitmap getBitmap(String path) {\n Bitmap bitmap = null;\n try {\n Log.i(\"FileManager\", \"GetBitmap: \" + path);\n FileInputStream imgIS = new FileInputStream(new File(path));\n BufferedInputStream bufIS = new BufferedInputStream(imgIS);\n bitmap = BitmapFactory.decodeStream(bufIS);\n Log.i(\"FileManager\", \"GetBitmap Finished: \" + bitmap);\n } catch (FileNotFoundException e) { //catch fileinputstream exceptions\n e.printStackTrace();\n } //trying to get wallpaper from display cycle node\n return bitmap;\n }", "int img(String path) {\n //TODO: is this correct?\n return this.renderEngine.b(path);\n }", "Picture identifyComponentImage() throws Exception;", "public BufferedImage getImage()\n\t{\n\t\tif (image == null)\n\t\t\tif (imagePath == null)\n\t\t\t\treturn null;\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedImage oimg = ImageIO.read(new File(imagePath));\n\t\t\t\t\timage = new BufferedImage(oimg.getWidth(), oimg.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\t\t\t\timage.getGraphics().drawImage(oimg,0,0,null);\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\treturn image;\n\t}", "public BufferedImage readImage(String id) {\n BufferedImage bufImg = null;\n try {\n PreparedStatement pstmt = conn.prepareStatement(\n \"SELECT photo FROM vehicles WHERE veh_reg_no = ?\");\n pstmt.setString(1, id);\n System.out.println(pstmt); // for debugging\n ResultSet rset = pstmt.executeQuery();\n // Only one result expected\n rset.next();\n // Read image via InputStream\n InputStream in = rset.getBinaryStream(\"photo\"); \n // Decode the inputstream as BufferedImage\n bufImg = ImageIO.read(in); \n } catch(Exception ex) {\n ex.printStackTrace();\n }\n return bufImg;\n }", "public static Image loadImage(String path) {\n File file = new File(path);\n String imagePath = file.getAbsolutePath();\n //Modify based on OS\n if (File.separatorChar == '\\\\') {\n // From Windows to Linux/Mac\n imagePath=imagePath.replace('/', File.separatorChar);\n imagePath = imagePath.replace(\"\\\\\", \"\\\\\\\\\");\n } else {\n // From Linux/Mac to Windows\n imagePath=imagePath.replace('\\\\', File.separatorChar);\n\n }\n \n //Add file: to work with JavaFX\n imagePath=\"file:\"+imagePath;\n\n return new Image(imagePath);\n }", "public byte[] bitmap();", "public byte[] Img2Bin (String path){\t \n\t\tByteArrayOutputStream bin = new ByteArrayOutputStream();\n\t\t\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(new File(path));\n\t\t\tImageIO.write(image, \"jpg\", bin);\n\t\t} catch (IOException e) {\n\t\t\tLOG.error(\"Img2Bin didn't succeed. Error: {}\",e);\n\t\t\treturn null;\n\t\t}\n\n\t return bin.toByteArray();\n\t}", "@Test\n\tpublic void testImageFromPaintNet() throws IOException, URISyntaxException {\n\t\tfinal String filePath = \"img_orientation/view_20170929_124415.jpg\";\n\t\tURL url = this.getClass().getClassLoader().getResource(filePath);\n\t\tFile imgFile = new File(url.toURI());\n\t\tlogger.debug(\"File '{}' exists = {}\", filePath, imgFile.isFile());\n\t\tBufferedImage bi = TrpImageIO.read(imgFile);\n\t\t\n\t\tif(bi instanceof RotatedBufferedImage) {\n\t\t\t//if we are here this is broken\n\t\t\tAssert.fail(\"Image was erroneously rotated!\");\n\t\t}\n\t}", "public Image getFlat();", "public Result getFromDrawable() throws Exception{\n\n // edit the following line with the desired resource you want to test\n Uri uri= Uri.parse((\"android.resource://cepheustheapp.com.cepheus/\"+ R.drawable.back));\n InputStream inputStream= getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(inputStream);\n if (bitmap == null)\n {\n // not a bitmap\n return null;\n }\n int width = bitmap.getWidth(), height = bitmap.getHeight();\n int[] pixels = new int[width * height];\n bitmap.getPixels(pixels, 0, width, 0, 0, width, height);\n bitmap.recycle();\n bitmap = null;\n RGBLuminanceSource source = new RGBLuminanceSource(width, height, pixels);\n BinaryBitmap bBitmap = new BinaryBitmap(new HybridBinarizer(source));\n MultiFormatReader reader = new MultiFormatReader();\n\n // result will hold the actual content\n Result result= reader.decode(bBitmap);\n\n\n return result;\n\n }", "public Image loadImage(String name) {\n String filename = \"images/\" + name;\n return new ImageIcon(filename).getImage();\n }", "public static FileInputStream returnImageBytes(String path){\n \n try {\n FileInputStream fis = null;\n File file = new File(path);\n fis = new FileInputStream(file);\n return fis;\n } catch (FileNotFoundException ex) {\n logger.appendnewLog(ex.getMessage());\n Logger.getLogger(Illneses.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "PImage getImage() {\n return _img;\n }", "public static Image loadPGM(String fileName) {\r\n Scanner scan = new Scanner(Image.class.getResourceAsStream(fileName));\r\n\r\n scan.nextLine(); // line P2\r\n scan.nextLine(); // line comment\r\n // read width\r\n int width = scan.nextInt();\r\n // read height \r\n int height = scan.nextInt();\r\n // read max gray level (not used)\r\n scan.nextInt(); \r\n // create an initially white image\r\n Image result = new Image(width, height); \r\n // rad pixels\r\n for (int x = 0; x < height; x++) {\r\n for (int y = 0; y < width; y++) {\r\n result.changeColorPixel(y, x, new GrayColor(scan.nextInt()));\r\n }\r\n }\r\n return result;\r\n }", "public MakeProfile(){\r\n try{\r\n i = ImageIO.read(new File(\"../images/New Profile.png\"));\r\n repaint();\r\n }\r\n catch(IOException e){\r\n }\r\n \r\n }", "public static Image getImage(String fileName) {\n Image image = null;\n try {\n image = ImageIO.read(new File(fileName));\n } catch (IOException ioe) {\n System.out.println(\"Error: Cannot open image:\" + fileName);\n JOptionPane.showMessageDialog(null, \"Error: Cannot open image:\" + fileName);\n }\n return image;\n }", "public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }", "public static BufferedImage load(String name) {\r\n\t\ttry {\r\n\t\t\tfinal BufferedImage org = ImageIO.read(Art.class.getResource(name));\r\n\t\t\tfinal BufferedImage res = new BufferedImage(org.getWidth(),\r\n\t\t\t\t\torg.getHeight(), BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tfinal Graphics g = res.getGraphics();\r\n\t\t\tg.drawImage(org, 0, 0, null, null);\r\n\t\t\tg.dispose();\r\n\t\t\treturn res;\r\n\t\t} catch (final Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public MyBMPFile() { \n\n }", "@Test\n\tpublic void testGetImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tassertNull(ip.getImage());\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"gray8-3x2-sub1.tif\");\n\t\t//assertNull(ip.img);\n\t\tassertNotNull(ip.getImage());\n\t}" ]
[ "0.71198857", "0.6865184", "0.6841495", "0.6652775", "0.66476834", "0.66429114", "0.6568374", "0.6568374", "0.6568374", "0.65114146", "0.64553976", "0.64227563", "0.6415649", "0.6399772", "0.6394905", "0.63753766", "0.63744247", "0.6370482", "0.6321469", "0.6312309", "0.6311759", "0.62983936", "0.6292703", "0.6254829", "0.6249781", "0.62461174", "0.6228422", "0.6226845", "0.62241864", "0.6223503", "0.6211152", "0.62007785", "0.6198859", "0.6192714", "0.6192051", "0.61681825", "0.6163174", "0.61382455", "0.6131711", "0.6118203", "0.61118484", "0.61026996", "0.60971284", "0.60923773", "0.6066698", "0.6053153", "0.60417527", "0.60410005", "0.6020113", "0.6016602", "0.6005149", "0.6004108", "0.6001492", "0.5995355", "0.5995355", "0.59953237", "0.5994513", "0.5987172", "0.59719765", "0.59698665", "0.5937296", "0.5933997", "0.59292656", "0.5919717", "0.59143287", "0.591173", "0.5910118", "0.5905313", "0.5902214", "0.5889844", "0.5885445", "0.5879122", "0.58774763", "0.5873918", "0.58605725", "0.5853281", "0.5849265", "0.5848687", "0.5847707", "0.5838604", "0.58381724", "0.58363616", "0.5830642", "0.5829718", "0.58119345", "0.5799629", "0.57837534", "0.57678634", "0.57497656", "0.5749015", "0.5737864", "0.5727512", "0.5725619", "0.57240474", "0.5718046", "0.5715248", "0.5704699", "0.57028884", "0.5700083", "0.5691085" ]
0.5881098
71
Cannot understand this solution.
public boolean containsNearbyDuplicate2(int[] nums, int k) { if(nums == null || nums.length <=1) return false; Set<Integer> set = new HashSet<Integer> (); for(int i=0; i< nums.length; i++) { if(i>k) set.remove(nums[i-k-1]); if(!(set.add(nums[i]))) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "public int m()\r\n/* 485: */ {\r\n/* 486:497 */ int i = 0;\r\n/* 487:498 */ for (int j = 0; j < this.b.length; j++) {\r\n/* 488:499 */ if ((this.b[j] != null) && ((this.b[j].b() instanceof ajn)))\r\n/* 489: */ {\r\n/* 490:500 */ int k = ((ajn)this.b[j].b()).c;\r\n/* 491:501 */ i += k;\r\n/* 492: */ }\r\n/* 493: */ }\r\n/* 494:504 */ return i;\r\n/* 495: */ }", "protected boolean func_70814_o() { return true; }", "public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }", "private void m50366E() {\n }", "public void solution() {\n\t\t\n\t}", "@Override\n public Integer reduceInit() { return 0; }", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public void method_4270() {}", "public abstract long mo9229aD();", "private void kk12() {\n\n\t}", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "public abstract int mo9754s();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public final void mo51373a() {\n }", "public abstract int numOfSameTypeNeighbourToReproduce();", "public amj h()\r\n/* 17: */ {\r\n/* 18: 41 */ if ((this.c < 9) && (this.c >= 0)) {\r\n/* 19: 42 */ return this.a[this.c];\r\n/* 20: */ }\r\n/* 21: 44 */ return null;\r\n/* 22: */ }", "public abstract C7982k4<E> m39518y();", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "private static void cajas() {\n\t\t\n\t}", "public abstract Object mo26777y();", "private SBomCombiner()\n\t{}", "@Nullable\r\n/* */ private static aej e(int ☃) {\r\n/* 272 */ aej aej1 = aej.a(☃);\r\n/* */ \r\n/* 274 */ return e.contains(aej1) ? aej1 : null;\r\n/* */ }", "public void mo38117a() {\n }", "public boolean e()\r\n/* 50: */ {\r\n/* 51:102 */ return this.a.size() > 45;\r\n/* 52: */ }", "public abstract Integer gethourNeed();", "public static void main(String[] args) throws ArrayIndexOutOfBoundsException{\n\n A aB = new B();\n A aC = new C();\n B bB= new B();\n B bC= new C();\n C cC = new C();\n\n\n if ( aC.summ(1,1)==2) {\n System.out.println(\"true\");\n }\n if ( bC.diff(1,2) ==1) {\n System.out.println(\"true\");\n }\n\n System.out.println(bB.pp);\n System.out.println(bB.pr);\n\n System.out.println(cC.pp);\n System.out.println(cC.pr);\n\n\n int[] i = {};\n Class<?> cl = Integer.class;\n System.out.println(cl);\n\n System.out.println(2|1);\n System.out.println(3^1);\n\n\n int[] array = new int[] {1, 2, 3};\n\n for(int a: array) {\n System.out.print(a + \" \");\n }\n\n\n List<Integer> intList = new ArrayList<Integer>();\n for (int index = 0; index < array.length; index++)\n {\n intList.add(array[index]);\n }\n\n for(int a: intList) {\n System.out.print(a + \" \");\n }\n\n\n\n\n // int u = -1;\n // VM -ea\n //assert (u > 0): \"U < 0\";\n\n }", "public int j()\r\n/* 60: */ {\r\n/* 61: 79 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 62: 80 */ if (this.a[i] == null) {\r\n/* 63: 81 */ return i;\r\n/* 64: */ }\r\n/* 65: */ }\r\n/* 66: 84 */ return -1;\r\n/* 67: */ }", "public boolean a()\r\n/* 598: */ {\r\n/* 599:597 */ return this.k;\r\n/* 600: */ }", "protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }", "@Override\n public int retroceder() {\n return 0;\n }", "public boolean func_145773_az() { return true; }", "public void k()\r\n/* 238: */ {\r\n/* 239:258 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 240:259 */ if (this.a[i] != null) {\r\n/* 241:260 */ this.a[i].a(this.d.o, this.d, i, this.c == i);\r\n/* 242: */ }\r\n/* 243: */ }\r\n/* 244: */ }", "private final int m28109e(int i) {\n return i + i;\n }", "static int size_of_inx(String passed){\n\t\treturn 1;\n\t}", "public int zzB() {\n return 0;\n }", "@Override public short getComplexity() {\n return 0;\n }", "public xm n()\r\n/* 274: */ {\r\n/* 275:287 */ if ((this.g == null) && (this.h != null) && (this.h.length() > 0)) {\r\n/* 276:288 */ this.g = this.o.a(this.h);\r\n/* 277: */ }\r\n/* 278:290 */ return this.g;\r\n/* 279: */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void challenge17() {\n\n\t}", "public abstract Integer mo36212o();", "public abstract long mo13681c();", "private static int m6083a(Object obj) {\n if (obj == null) {\n return 1;\n }\n if (obj == Undefined.f6689a) {\n return 0;\n }\n if (obj instanceof CharSequence) {\n return 4;\n }\n if (obj instanceof Number) {\n return 3;\n }\n if (obj instanceof Boolean) {\n return 2;\n }\n if (obj instanceof Scriptable) {\n if (obj instanceof NativeJavaClass) {\n return 5;\n }\n if (obj instanceof NativeJavaArray) {\n return 7;\n }\n if (obj instanceof Wrapper) {\n return 6;\n }\n return 8;\n } else if (obj instanceof Class) {\n return 5;\n } else {\n if (obj.getClass().isArray()) {\n return 7;\n }\n return 6;\n }\n }", "protected abstract Set method_1559();", "public void mo442d() {\n long j;\n long j2;\n int i;\n long j3;\n boolean z;\n C0245a[] aVarArr;\n int i2;\n int i3;\n C3683c<? super U> cVar = this.f472a;\n int i4 = 1;\n while (!mo443e()) {\n C0211f<U> fVar = this.f477f;\n long j4 = this.f482m.get();\n boolean z2 = j4 == Long.MAX_VALUE;\n if (fVar != null) {\n j = 0;\n while (true) {\n long j5 = 0;\n Object obj = null;\n while (true) {\n if (j4 == 0) {\n break;\n }\n Object e_ = fVar.mo386e_();\n if (!mo443e()) {\n if (e_ == null) {\n obj = e_;\n break;\n }\n cVar.onNext(e_);\n j++;\n j5++;\n j4--;\n obj = e_;\n } else {\n return;\n }\n }\n if (j5 != 0) {\n if (z2) {\n j4 = Long.MAX_VALUE;\n } else {\n j4 = this.f482m.addAndGet(-j5);\n }\n }\n if (j4 == 0 || obj == null) {\n break;\n }\n }\n } else {\n j = 0;\n }\n boolean z3 = this.f478g;\n C0211f<U> fVar2 = this.f477f;\n C0245a[] aVarArr2 = (C0245a[]) this.f481j.get();\n int length = aVarArr2.length;\n if (!z3 || ((fVar2 != null && !fVar2.mo384b()) || length != 0)) {\n if (length != 0) {\n i = i4;\n long j6 = this.f485p;\n int i5 = this.f486q;\n if (length <= i5 || aVarArr2[i5].f462a != j6) {\n if (length <= i5) {\n i5 = 0;\n }\n int i6 = i5;\n for (int i7 = 0; i7 < length && aVarArr2[i6].f462a != j6; i7++) {\n i6++;\n if (i6 == length) {\n i6 = 0;\n }\n }\n this.f486q = i6;\n this.f485p = aVarArr2[i6].f462a;\n i5 = i6;\n }\n int i8 = i5;\n z = false;\n int i9 = 0;\n while (true) {\n if (i9 >= length) {\n aVarArr = aVarArr2;\n break;\n } else if (!mo443e()) {\n C0245a aVar = aVarArr2[i8];\n Object obj2 = null;\n while (!mo443e()) {\n C0212g<U> gVar = aVar.f467f;\n if (gVar == null) {\n aVarArr = aVarArr2;\n i2 = length;\n } else {\n aVarArr = aVarArr2;\n i2 = length;\n long j7 = 0;\n while (j2 != 0) {\n try {\n obj2 = gVar.mo386e_();\n if (obj2 == null) {\n break;\n }\n cVar.onNext(obj2);\n if (!mo443e()) {\n j2--;\n j7++;\n } else {\n return;\n }\n } catch (Throwable th) {\n Throwable th2 = th;\n C0171b.m584b(th2);\n aVar.dispose();\n this.f479h.mo516a(th2);\n if (!this.f474c) {\n this.f483n.mo407a();\n }\n if (!mo443e()) {\n mo439b(aVar);\n i9++;\n i3 = i2;\n z = true;\n } else {\n return;\n }\n }\n }\n if (j7 != 0) {\n j2 = !z2 ? this.f482m.addAndGet(-j7) : Long.MAX_VALUE;\n aVar.mo433a(j7);\n }\n if (!(j2 == 0 || obj2 == null)) {\n aVarArr2 = aVarArr;\n length = i2;\n }\n }\n boolean z4 = aVar.f466e;\n C0212g<U> gVar2 = aVar.f467f;\n if (z4 && (gVar2 == null || gVar2.mo384b())) {\n mo439b(aVar);\n if (!mo443e()) {\n j++;\n z = true;\n } else {\n return;\n }\n }\n if (j2 == 0) {\n break;\n }\n int i10 = i8 + 1;\n i3 = i2;\n i8 = i10 == i3 ? 0 : i10;\n i9++;\n length = i3;\n aVarArr2 = aVarArr;\n }\n return;\n } else {\n return;\n }\n }\n this.f486q = i8;\n this.f485p = aVarArr[i8].f462a;\n j3 = j;\n } else {\n i = i4;\n j3 = j;\n z = false;\n }\n if (j3 != 0 && !this.f480i) {\n this.f483n.mo408a(j3);\n }\n if (z) {\n i4 = i;\n } else {\n i4 = addAndGet(-i);\n if (i4 == 0) {\n return;\n }\n }\n } else {\n Throwable a = this.f479h.mo515a();\n if (a != C0315e.f669a) {\n if (a == null) {\n cVar.onComplete();\n } else {\n cVar.onError(a);\n }\n }\n return;\n }\n }\n }", "public int s() {\r\n/* 247 */ return this.k;\r\n/* */ }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "private void m50367F() {\n }", "public void mo21877s() {\n }", "@Override\n\tpublic void challenge9() {\n\n\t}", "public void mo12628c() {\n }", "public abstract int numOfEmptyToReproduce();", "@Override\n\tpublic void challenge6() {\n\n\t}", "@Override\n\tpublic void challenge7() {\n\n\t}", "private final int m28110f(int i) {\n return i + i + 1;\n }", "public abstract Integer mo36210m();", "public void smell() {\n\t\t\n\t}", "public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }", "public abstract long mo20901UQ();", "@Override\n public void computeSatisfaction() {\n\n }", "public boolean b()\r\n/* 709: */ {\r\n/* 710:702 */ return this.l;\r\n/* 711: */ }", "public void mo21792Q() {\n }", "public abstract String mo13682d();", "public abstract Object mo1771a();", "private void level7() {\n }", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "public ho e_()\r\n/* 455: */ {\r\n/* 456:469 */ if (k_()) {\r\n/* 457:470 */ return new hy(d_());\r\n/* 458: */ }\r\n/* 459:472 */ return new hz(d_(), new Object[0]);\r\n/* 460: */ }", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "public int method_113() {\r\n return 0;\r\n }", "public void mo21787L() {\n }", "public void func_70295_k_() {}", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "public int method_6437() {\r\n return this.field_6227;\r\n }", "protected void mo3576c() {\n m9185a(this.this$0.b.getChampIterator());\n }", "private void poetries() {\n\n\t}", "static int getNumPatterns() { return 64; }", "public void func_70305_f() {}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "private void method_4318() {\r\n String[] var1;\r\n int var11;\r\n label68: {\r\n var1 = class_752.method_4253();\r\n class_758 var10000 = this;\r\n if(var1 != null) {\r\n if(this.field_3417 != null) {\r\n label71: {\r\n var11 = this.field_3417.field_3012;\r\n if(var1 != null) {\r\n if(this.field_3417.field_3012) {\r\n var10000 = this;\r\n if(var1 != null) {\r\n if(!this.field_2990.field_1832) {\r\n this.method_409(this.field_3404, class_1691.method_9334((class_1036)null), 10.0F);\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var10000.field_3417 = null;\r\n if(var1 != null) {\r\n break label71;\r\n }\r\n }\r\n\r\n var11 = this.field_3029 % 10;\r\n }\r\n\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 == 0) {\r\n float var13;\r\n var11 = (var13 = this.method_406() - this.method_405()) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var1 == null) {\r\n break label68;\r\n }\r\n\r\n if(var11 < 0) {\r\n this.method_4188(this.method_406() + 1.0F);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var10000 = this;\r\n }\r\n\r\n var11 = var10000.field_3028.nextInt(10);\r\n }\r\n\r\n if(var11 == 0) {\r\n float var2 = 32.0F;\r\n List var3 = this.field_2990.method_2157(class_705.class, this.field_3004.method_7097((double)var2, (double)var2, (double)var2));\r\n class_705 var4 = null;\r\n double var5 = Double.MAX_VALUE;\r\n Iterator var7 = var3.iterator();\r\n\r\n while(true) {\r\n if(var7.hasNext()) {\r\n class_705 var8 = (class_705)var7.next();\r\n double var9 = var8.method_3891(this);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n label43: {\r\n double var12 = var9;\r\n if(var1 != null) {\r\n if(var9 >= var5) {\r\n break label43;\r\n }\r\n\r\n var12 = var9;\r\n }\r\n\r\n var5 = var12;\r\n var4 = var8;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.field_3417 = var4;\r\n break;\r\n }\r\n }\r\n\r\n }", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }", "C7562b<C10403b, C10328a> mo25041a();", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public static int getOrigX() {\n return 1;\n }", "public int func_176881_a() {\n/* */ return this.field_176893_h;\n/* */ }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "private BigInteger[] factor(BigInteger i) {\n return null;\r\n }", "protected boolean func_70041_e_() { return false; }", "public int length() { return 1+maxidx; }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}", "public abstract int mo9797a();" ]
[ "0.60890526", "0.55879104", "0.55342734", "0.54540825", "0.5382938", "0.537863", "0.53701353", "0.5348977", "0.5345412", "0.53374535", "0.5332246", "0.53136253", "0.53135055", "0.5311541", "0.53065693", "0.52906686", "0.5286893", "0.5272328", "0.52581936", "0.52369773", "0.5236885", "0.5212372", "0.5180327", "0.5170348", "0.51637906", "0.5163649", "0.51446515", "0.51377994", "0.51307213", "0.51303685", "0.512744", "0.5124046", "0.5110959", "0.51106966", "0.51100975", "0.5106104", "0.5102894", "0.5102431", "0.50993085", "0.50971705", "0.50908285", "0.50895315", "0.5088242", "0.50845265", "0.5081556", "0.5079776", "0.5075105", "0.50749457", "0.5074685", "0.5066852", "0.5065787", "0.5061491", "0.5058882", "0.5055476", "0.5050478", "0.50495356", "0.5041969", "0.5035437", "0.50261974", "0.5022679", "0.50184983", "0.5014278", "0.5013812", "0.5008348", "0.5006376", "0.5001393", "0.50009215", "0.49900502", "0.4987371", "0.49854523", "0.49852288", "0.49847442", "0.49771902", "0.49747485", "0.4965406", "0.49644953", "0.49612993", "0.4959227", "0.49572888", "0.49571127", "0.49550182", "0.4954951", "0.49528614", "0.49517208", "0.49502638", "0.49478063", "0.49472305", "0.4946188", "0.49455896", "0.4944552", "0.49443752", "0.49440098", "0.49439514", "0.49427223", "0.49401012", "0.49390846", "0.4937514", "0.4933119", "0.49328968", "0.4932618", "0.49323732" ]
0.0
-1
Returns true if this is a simulation.
boolean isSimulation() { return simulation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSimMode() {\n return sim_mode;\n }", "public final boolean startSimulation() {\n\t\tboolean result = true;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tresult = result && exe.startSimulation();\n\t\t}\n\t\tsetRunning(true);\n\t\treturn result;\n\t}", "private Boolean simulationTerminee() {\n if (Evenements.size() != 0) \n return false;\n else\n return true;\n }", "public boolean isSimulaationFinsihed() {\n\t\tif (this.eventListInterface.getEventListSize() <= 0) {\n\t\t\tlogger.info(\"Simulation ends, no event in eventlist anymore.\");\n\t\t\treturn true;\n\t\t}\n\n\t\tif (0 < this.eventListInterface.getNextEvent().getSimulationTimeOfOccurence().compareTo(this.simulationEndTime)) {\n\t\t\tlogger.info(\"Simulation ends, current time = {}, simulation end time = {}.\",\n\t\t\t\t\tthis.eventListInterface.getNextEvent().getSimulationTimeOfOccurence(), this.simulationEndTime);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean getSimulate() {\n return this.simulate;\n }", "boolean hasSimspeed();", "@DISPID(26)\r\n\t// = 0x1a. The runtime will prefer the VTID if present\r\n\t@VTID(26)\r\n\tboolean simulated();", "boolean hasAdGroupSimulation();", "public boolean isStandalone() {\n if ((transmitters != null) && (transmitters.size() == 1)) {\n if (getTransmitterList().get(0).getMnemonic().equals(this.name)) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "boolean isMake();", "public boolean isSpectator()\n {\n NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(this.getGameProfile().getId());\n return networkplayerinfo != null && networkplayerinfo.getGameType() == GameType.SPECTATOR;\n }", "@Override\r\n\tpublic boolean runningSimulationSetLinkedObject() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean runningSimulationSetLinkedObject() {\n\t\treturn false;\r\n\t}", "boolean hasCampaignCriterionSimulation();", "public String getSimulationType() {\n return simSpec.getSimulationType();\n }", "public boolean hasTarget() { \n if (isReal) {\n return get(\"tv\") == 1; // cleaned return statement up\n } else {\n return hasTargetSim.getBoolean(false);\n }\n }", "public final boolean simulationHasProblems() {\n\t\tboolean result = false;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tif (exe.iveGotProblems()) {\n\t\t\t\tlog.error(mdl + \" is no longer running\");\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public boolean isMassengut() {\r\n\t\treturn massengut;\r\n\t}", "boolean hasAdGroupCriterionSimulation();", "public boolean hasSimspeed() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public SimulationType getSimType() { return this.simType; }", "public boolean Simbolo(){\n return (Mayuscula() || Minuscula());\n\n }", "public boolean hasSimspeed() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public final boolean isServer() {\n\t\treturn !world.isRemote;\n\t}", "public boolean isSingularMatrix() {\r\n try {\r\n return this.getDeterminant() == 0;\r\n } catch (InvalidMoveException e) {\r\n return false;\r\n }\r\n }", "public boolean isMovement() {\n return isMovementEvent;\n }", "public boolean isSession() {\n\t\treturn config.getBoolean(QuestConfigurationField.SESSION.getKey(), \n\t\t\t\t(boolean) QuestConfigurationField.SESSION.getDefault());\n\t}", "public boolean isScene() {\r\n\t\treturn scene;\r\n\t}", "public boolean shouldExecute()\n\t{\n\t\tif (this.entity.getAge() >= 100)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if (this.entity.getRNG().nextInt(120) != 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVec3d Vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);\n\n\t\t\tif (Vec3d == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.xPosition = Vec3d.xCoord;\n\t\t\t\tthis.yPosition = Vec3d.yCoord;\n\t\t\t\tthis.zPosition = Vec3d.zCoord;\n\t\t\t\tthis.leapTarget = Vec3d;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "public boolean isSpawnPoint() {\n return isSpawnPoint;\n }", "public Boolean isCurrentGeneration() {\n return this.currentGeneration;\n }", "public boolean isInteractionRoot()\n\t{\n\t\treturn this == model.getInteractionRoot();\n\t}", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}", "public boolean isServer() {\n\t\treturn true;\n\t}", "public boolean isStart() {\n\t\treturn start;\n\t}", "public boolean isTankRole() {\n\n return heroRole.equals(HeroRole.TANK);\n }", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public boolean isSandstone() {\n return this.type == Type.SANDSTONE;\n }", "public boolean isSimulateStyle() {\n return simulateStyle;\n }", "protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }", "public boolean isRandom(){\r\n\t\treturn isRandom;\r\n\t}", "public boolean isSpawn(Location loc) {\n\t\treturn RegionManager.get().hasTag(loc, \"spawn\");\n\t}", "public boolean isGoal() {\n return (man == 0);\n }", "public boolean isStart () {\n if (this.equals(SquareType.START))\n return true;\n else\n return false;\n }", "private boolean isAgentClass(Class<?> clazz) {\n if (clazz != null) {\n Method agentmain = getAgentMethod(clazz, \"agentmain\");\n Method premain = getAgentMethod(clazz, \"premain\");\n\n if (agentmain == null && premain == null) {\n return false;\n }\n\n Method agentMethod = agentmain != null ? agentmain : premain;\n\n int modifiers = agentMethod.getModifiers();\n return Modifier.isStatic(modifiers) && agentMethod.getReturnType().equals(Void.TYPE);\n }\n\n return false;\n }", "@Override\n\tpublic boolean hasRandomAnimation()\n\t{\n\t\treturn Config.MAX_MONSTER_ANIMATION > 0 && !(this instanceof L2GrandBossInstance);\n\t}", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isTest() {\n\t\treturn this.operation instanceof MagicCriterion;\n\t}", "public boolean isSign() {\n return this.type == Type.SIGN;\n }", "public boolean isScheduled(){\n //System.out.println(\"nextrun: \" + nextrun.getTime() + \" nu: \" + System.currentTimeMillis());\n if (nextrun != null){\n long next = nextrun.getTime();\n \n return next < System.currentTimeMillis();\n }else{\n //null => instance has never run before & should run asap\n return true;\n }\n }", "@Override\n\tpublic boolean shouldExecute() {\n\t\tif (!theEntity.isTamed())\n\t\t\treturn false;\n\t\telse if (theEntity.isInWater())\n\t\t\treturn false;\n\t\telse if (!theEntity.onGround)\n\t\t\treturn false;\n\t\telse {\n\t\t\tfinal EntityLivingBase var1 = theEntity.getOwner();\n\t\t\treturn var1 == null ? true\n\t\t\t\t\t: theEntity.getDistanceSqToEntity(var1) < 144.0D\n\t\t\t\t\t\t\t&& var1.getAITarget() != null ? false : isSitting;\n\t\t}\n\t}", "public boolean isMoving() {\n return this.movementComposer.isMoving();\n }", "public boolean isDetermined(PartialWorld w) {\n return observedVar.isDetermined(w);\n }", "public boolean isForGenere();", "protected boolean isFinished() {\n \treturn Robot.lift.isMotionMagicNearTarget() || totalTimer.get() > 5.0;\n }", "public void startSimulation();", "public boolean containsTimeSeries() {\n\t\t\n\t\tif (experiments_.size() < 1)\n\t\t\tthrow new RuntimeException(\"There are no experiments in this batch\");\n\t\t\n\t\tfor (int i=0; i<experiments_.size(); i++)\n\t\t\tif (TimeSeriesExperiment.class.isInstance(experiments_.get(i)))\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "boolean haveAnySpawn();", "public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}", "public boolean isPossibleSpectate() throws RemoteException {\n return mainScreenProvider.isPossibleSpectate();\n }", "public boolean isJam() {\n boolean jam = false;\n if (sensor_door.getDistance(DistanceUnit.CM) < 100) {\n jam = true;\n RobotLog.vv(\"jam?\", \"TRUE\");\n }\n return jam;\n }", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "public boolean isRun() {\n if (!isValid()) {\n return false;\n }\n else {\n if (tiles.get(0).getColour() == tiles.get(1).getColour()) {\n return true;\n } else {\n return false;\n }\n }\n }", "boolean step()\n {\n int width, height, x, y;\n\n // Check if food found.\n if (agar.foodCells[headSegment.x][headSegment.y] <= Agar.FOOD_CONSUMPTION_RANGE)\n {\n foundFood = true;\n }\n if (foundFood)\n {\n return(true);\n }\n\n // Step simulation?\n if (driver == DRIVER_TYPE.WORMSIM.getValue())\n {\n double dorsal = 1.0;\n double ventral = 1.0;\n switch (agar.currentFood)\n {\n case Agar.RED_FOOD:\n dorsal = 1.5;\n break;\n\n case Agar.GREEN_FOOD:\n dorsal = 1.08;\n break;\n\n case Agar.BLUE_FOOD:\n ventral = 1.06;\n break;\n }\n if (DORSAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE != -1.0)\n {\n dorsal = DORSAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE;\n }\n if (VENTRAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE != -1.0)\n {\n ventral = VENTRAL_SMB_MUSCLE_AMPLIFIER_OVERRIDE;\n }\n Wormsim.overrideSMBmuscleAmplifiers(dorsal, ventral);\n synchronized (wormsimLock)\n {\n Wormsim.step(0.0);\n }\n getSegmentSimPositions();\n }\n\n // Cycle segments.\n width = Agar.GRID_SIZE.width;\n height = Agar.GRID_SIZE.height;\n for (int i = 0; i <= NUM_BODY_SEGMENTS; i++)\n {\n Segment segment;\n if (i == 0)\n {\n segment = headSegment;\n }\n else\n {\n segment = bodySegments[i - 1];\n }\n\n int nx, ny, sx, sy, wx, wy, ex, ey;\n x = segment.x;\n y = segment.y;\n nx = x;\n ny = ((y + 1) % height);\n wx = x - 1;\n if (wx < 0) { wx += width; }\n wy = y;\n ex = ((x + 1) % width);\n ey = y;\n sx = x;\n sy = y - 1;\n if (sy < 0) { sy += height; }\n\n // Head segment?\n if (i == 0)\n {\n // Initialize sensors.\n int[] sensors = new int[headSegment.NUM_SENSORS];\n float dist = agar.foodCells[headSegment.x][headSegment.y];\n float d = 0.0f;\n int dir = CENTER;\n for (int j = 0; j < NUM_DIRECTIONS; j++)\n {\n switch (j)\n {\n case NORTHWEST:\n d = agar.foodCells[wx][ny];\n break;\n\n case NORTH:\n d = agar.foodCells[nx][ny];\n break;\n\n case NORTHEAST:\n d = agar.foodCells[ex][ny];\n break;\n\n case WEST:\n d = agar.foodCells[wx][wy];\n break;\n\n case CENTER:\n d = agar.foodCells[headSegment.x][headSegment.y];\n break;\n\n case EAST:\n d = agar.foodCells[ex][ey];\n break;\n\n case SOUTHWEST:\n d = agar.foodCells[wx][sy];\n break;\n\n case SOUTH:\n d = agar.foodCells[sx][sy];\n break;\n\n case SOUTHEAST:\n d = agar.foodCells[ex][sy];\n break;\n }\n if (d < dist)\n {\n dist = d;\n dir = j;\n }\n }\n sensors[0] = dir;\n sensors[1] = headSegment.response;\n\n // Cycle segment.\n headSegment.cycle(sensors);\n }\n else\n {\n // Cycle body segment.\n BodySegment bodySegment = bodySegments[i - 1];\n int[] sensors = new int[bodySegment.NUM_SENSORS];\n Segment priorSegment;\n if (i == 1)\n {\n priorSegment = headSegment;\n }\n else\n {\n priorSegment = bodySegments[i - 2];\n }\n x = priorSegment.x;\n y = priorSegment.y;\n int dir = -1;\n for (int j = 0; j < NUM_DIRECTIONS && dir == -1; j++)\n {\n switch (j)\n {\n case NORTHWEST:\n if ((x == wx) && (y == ny)) { dir = NORTHWEST; }\n break;\n\n case NORTH:\n if ((x == nx) && (y == ny)) { dir = NORTH; }\n break;\n\n case NORTHEAST:\n if ((x == ex) && (y == ny)) { dir = NORTHEAST; }\n break;\n\n case WEST:\n if ((x == wx) && (y == wy)) { dir = WEST; }\n break;\n\n case EAST:\n if ((x == ex) && (y == ey)) { dir = EAST; }\n break;\n\n case SOUTHWEST:\n if ((x == wx) && (y == sy)) { dir = SOUTHWEST; }\n break;\n\n case SOUTH:\n if ((x == sx) && (y == sy)) { dir = SOUTH; }\n break;\n\n case SOUTHEAST:\n if ((x == ex) && (y == sy)) { dir = SOUTHEAST; }\n break;\n }\n }\n if (dir == -1) { dir = CENTER; }\n sensors[0] = dir;\n sensors[1] = priorSegment.response;\n sensors[2] = bodySegment.response;\n bodySegment.cycle(sensors);\n\n // Mirror prior segment to avoid worm disintegration.\n if ((Math.abs(priorSegment.x2 - bodySegment.x2) > 1) ||\n (Math.abs(priorSegment.y2 - bodySegment.y2) > 1))\n {\n bodySegment.response = priorSegment.response;\n bodySegment.projectResponsePosition();\n }\n }\n }\n eventTime++;\n\n // Execute responses.\n for (int i = 0; i <= NUM_BODY_SEGMENTS; i++)\n {\n Segment segment;\n if (i == 0)\n {\n segment = headSegment;\n }\n else\n {\n segment = bodySegments[i - 1];\n }\n segment.setProjectedPosition();\n }\n placeWormOnAgar();\n return(false);\n }", "public boolean isMoving() {\n return moving;\n }", "protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}", "@Override\r\n\tpublic boolean isComputer() {\n\t\treturn false;\r\n\t}", "public boolean isRobot() {\n\t\treturn isRobot;\n\t}", "public boolean isAnimating() {\n\t\treturn animationTimer.isRunning();\n\t}", "public final boolean isSystem() {\n\t\treturn m_info.isSystem();\n\t}", "public boolean isStartState() {\r\n\t\treturn flow.getStartState() == this;\r\n\t}", "public static boolean isGAMEClass(Model m) {\r\n return m.getClass().getName().compareTo(\"game.neurons.GAMEnetwork\") == 0;\r\n }", "public static boolean isMultiSimDevice(Context context) {\n return false;\n }", "public boolean shouldExecute()\n {\n return !super.shouldExecute() ? false : (!this.theEntity.worldObj.getGameRules().getGameRuleBooleanValue(\"mobGriefing\") ? false : !this.field_151504_e.func_150015_f(this.theEntity.worldObj, this.entityPosX, this.entityPosY, this.entityPosZ));\n }", "public boolean isSmokes() {\n return smokes;\n }", "public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}", "public boolean isTrue(PartialWorld w) {\n return (observedValue.equals(observedVar.getValue(w)));\n }", "public boolean isUnit() {\n\t\tboolean unit = false;\n\t\tif(this.head == null){\n\t\t\treturn true;\n\t\t}\n\t\tif(Math.pow(this.head.factor, this.head.power) == 1.0){\n\t\t\tunit = true;\n\t\t}\n\t\treturn unit;\n\t}", "public boolean scriptGenerationAvailable() {\n return scriptHistory == null && simConfigFile != null && simSpec != null;\n }", "public boolean isIsSc() {\n\t\treturn isSc;\n\t}", "private boolean isOutputAsRealMin() {\n return outputAsRealMin;\n }", "public synchronized boolean isMotorStarted() {\n return isMotorStarted;\n }", "public synchronized boolean pause() {\n /*\n * check whether the simulation is running.\n * if yes, pause and return true to indicate that simulation was successfully paused.\n * else return false to indicate that the simulation is already paused\n * */\n if (!isPaused) {\n isPaused = true;\n if (log.isDebugEnabled()) {\n log.debug(\"Pause event simulation for uuid : \" + uuid);\n }\n return true;\n } else {\n return false;\n }\n }", "public boolean isAtmo() {\n return atmo;\n }", "public synchronized boolean isStarted() {\n\t\treturn State.STARTED.equals(state);\n\t}", "public boolean isCreateTestSuite() {\n\n return createTestSuite;\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}", "public boolean isTheBoss()\r\n\t{\r\n\t\treturn false;\r\n\t}", "boolean hasAgent();", "public boolean hasSyncNail() {\n for (final Nail nail : getNails()) {\n if (nail.getPropertyType().equals(PropertyType.SYNCHRONIZATION)) return true;\n }\n\n return false;\n }", "public boolean isRigid() {\n return rigid;\n }", "@Override\n\tpublic boolean isIsSingleMatch() {\n\t\treturn _esfTournament.isIsSingleMatch();\n\t}", "public boolean isterminal() {\n\t\tif(isTerminal)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean isHuman() {\r\n return human;\r\n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "public boolean isSessionValid() {\n\t\treturn stateMachine.getCurrent() instanceof SessionValid;\n\t}", "public boolean hasTSM() {\n for (Mounted m : getEquipment()) {\n if ((m.getType() instanceof MiscType) && m.getType().hasFlag(MiscType.F_TSM)) {\n return true;\n }\n }\n return false;\n }", "private boolean isMove() {\n return this.getMoves().size() != 0;\n }" ]
[ "0.7226539", "0.7111183", "0.690993", "0.676323", "0.65426916", "0.64859194", "0.6274558", "0.62583226", "0.6201632", "0.6196116", "0.6187635", "0.61706364", "0.6160343", "0.6160343", "0.60526043", "0.60168374", "0.5926742", "0.59250253", "0.5906164", "0.5869859", "0.5863725", "0.5859635", "0.58523905", "0.5843788", "0.57930493", "0.57863986", "0.57840693", "0.57714856", "0.57588935", "0.57349557", "0.57191485", "0.57010114", "0.56996673", "0.5690861", "0.5671187", "0.5641654", "0.5639294", "0.5625162", "0.561829", "0.5612657", "0.5612239", "0.5602963", "0.5602926", "0.5593084", "0.5589371", "0.55829805", "0.55729944", "0.55572355", "0.55549604", "0.5554186", "0.5550727", "0.55485046", "0.55417234", "0.55399984", "0.5533055", "0.5530157", "0.5514799", "0.54988885", "0.54940945", "0.54898727", "0.54892087", "0.5488896", "0.5485078", "0.5482594", "0.5480834", "0.5473843", "0.54716986", "0.54665357", "0.54622537", "0.5456281", "0.5451057", "0.5450016", "0.54489374", "0.5447746", "0.5446849", "0.5440468", "0.54381067", "0.5436467", "0.5434995", "0.54306024", "0.54303944", "0.5427655", "0.5426594", "0.5424658", "0.5418659", "0.5411743", "0.5409404", "0.54075", "0.5406866", "0.54058105", "0.53943133", "0.53938186", "0.5388104", "0.5384751", "0.5384009", "0.53813124", "0.5377631", "0.5372405", "0.537194", "0.53661376" ]
0.8291135
0
Clears all the values.
void clearValues() { percentMissing = "-1"; PICValue = "-1"; maf = "-1"; phenoDataSummary = "-1"; genoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + dataSummaryScriptName; phenoSummaryScript = sharedInformation.getWorkingDirectory() + scriptsRelativePath + phenoSummaryScriptName; enginePath = sharedInformation.getWorkingDirectory() + rEngineRelativePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\n values.clear();\n }", "public void clear() {\n\t\tif(this.values!=null){\n\t\t\tthis.values.clear();\n\t\t}\n\t}", "public void clear() {\n synchronized (LOCK) {\n myValues.clear();\n }\n }", "public void clear()\r\n {\r\n for (int i = 0; i < values.length; i++)\r\n keys[i] = null;\r\n size = 0;\r\n }", "private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}", "public final void clear() {\n for (int i = 0; i < _length; i++) {\n _data[i * SIZE + VALUE_OFFSET] = null;\n _algorithmData[i] = null;\n }\n _length = 0;\n }", "@Override\n public void resetAllValues() {\n }", "public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvarianceS.set(0);\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "public void clear()\n \t{\n \t\tint byteLength = getLengthInBytes();\n \t\tfor (int ix=0; ix < byteLength; ix++)\n value[ix] = 0;\n \t}", "public void clear() {\n\t\telements = 0;\n\t\tfor (int ix = 0; ix < keys.length; ix++) {\n\t\t\tkeys[ix] = null;\n\t\t\tvalues[ix] = null;\n\t\t}\n\t\tfreecells = values.length;\n\t\tmodCount++;\n\t}", "public void clearAll();", "public void clearAll();", "protected void resetValues() {\n synchronized (values) {\n values.removeAll(new ArrayList(values));\n }\n }", "public void clear() {\n this.data().clear();\n }", "public void clear(){\n\t\tclear(0);\n\t}", "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "public void clearAllData() {\n atoms.clear();\n connections.clear();\n lines.clear();\n radical = null;\n }", "public void clear () {\n\t\treset();\n\t}", "public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}", "void reset()\n {\n reset(values);\n }", "void clearAll();", "void clearAll();", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public void clear() {\n _sample.clear();\n _count = 0;\n _max = null;\n _min = null;\n _sum = BigDecimal.ZERO;\n _m = -1;\n _s = 0;\n }", "public void clear() {\n\t\t\r\n\t}", "public void clear()\n {\n }", "public void clear()\n\t{\n\t\tfor(DBColumn col : _RowData.values())\n\t\t\tcol.clear();\n\t\t\t\n\t\t_MetaData = null;\n\t\t_Parent = null;\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "public void clear() {\r\n\t\t//this method clears all the arrays and initiallizes them to 0.\r\n Arrays.fill(co,0);\r\n Arrays.fill(degree,0); \r\n Arrays.fill(sinc,0); \r\n Arrays.fill(sind,0); \r\n Arrays.fill(cosc,0); \r\n Arrays.fill(cosd,0); \r\n Arrays.fill(tanc,0); \r\n Arrays.fill(tand,0);\r\n cindex = 0;\r\n sinindex = 0;\r\n cosindex = 0;\r\n tanindex = 0; \r\n\t}", "public void clear() {\n doClear();\n }", "public void clear()\n {\n inputs.clear();\n outputs.clear();\n }", "public void clear() {\n doClear( false );\n }", "protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }", "public void clear()\r\n {\r\n otherValueMap.clear();\r\n }", "public final void clear() {\n clear(true);\n }", "public void clear()\n {\n keys.clear();\n comments.clear();\n data.clear();\n }", "private void clear() {\n }", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear() {\n sumX = 0d;\n sumXX = 0d;\n sumY = 0d;\n sumYY = 0d;\n sumXY = 0d;\n n = 0;\n }", "@Override\n\tpublic void clear() {\n\n\t\tDisplay.findDisplay(uiThread).syncExec(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tclearInputs();\n\t\t\t\tsetDefaultValues();\n\t\t\t}\n\t\t});\n\n\t}", "public void clear() {\n\n\t}", "public void clear() {\r\n items.clear();\r\n keys.clear();\r\n }", "@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}", "@Override\n public void clear() {\n for (int i = 0; i < this.size; i++) {\n this.data[i] = null;\n }\n\n this.size = 0;\n }", "public void clear()\r\n {\r\n result = null;\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n resultDoubles = null;\r\n }", "public void clear() {\n\n\t\tdata = null;\n\t\tnumRows = 0;\n\t\tnumCols = 0;\n\t\tsize = 0L;\n\n\t}", "@Override\n public void clear() {\n for (int i = 0; i < size; i++) {\n data[i] = null;\n }\n size = 0;\n }", "public void clear () {\n\n\t\tn_vars = 0;\n\t\tn_values = null;\n\t\tmin_probability = DEF_MIN_PROBABILITY;\n\n\t\tpeak_probability = 0.0;\n\t\tpeak_indexes = null;\n\t\ttotal_probability = 0.0;\n\t\tmarginal_probability = null;\n\t\tmarginal_mode_index = null;\n\t\tmarginal_peak_probability = null;\n\t\tmarginal_peak_indexes = null;\n\t\tmarginal_2d_probability = null;\n\t\tmarginal_2d_mode_index = null;\n\n\t\treturn;\n\t}", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public void clear() {\n }", "public void clear() {\r\n init();\r\n }", "public synchronized void clear()\n {\n clear(false);\n }", "public void clear() {\n }", "public void clear() {\n }", "@Override\n public void clear() {\n elements.clear();\n indexByElement.clear();\n }", "protected void clear() {\r\n setValue(getDefault());\r\n }", "@Override\n public void clear() {\n \n }", "public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}", "@Override\r\n\tpublic void clear() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}", "protected abstract void clearAll();", "public void clear() {\n\t\tint index = 0;\r\n\t\tsize = 0;\r\n\t\twhile (index < K.length) {\r\n\t\t\tif (K[index] != null) {\r\n\t\t\t\tK[index].clear();\r\n\t\t\t\tV[index].clear();\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "private void clearTemporaryData() {\n\n numbers.stream().forEach(n -> {\n n.setPossibleValues(null);\n n.setUsedValues(null);\n });\n }" ]
[ "0.8788741", "0.8329391", "0.8160038", "0.8029748", "0.7950717", "0.78669864", "0.7852638", "0.7843643", "0.7735642", "0.7735642", "0.7733899", "0.77278394", "0.77209175", "0.77209175", "0.77117217", "0.7703564", "0.77016765", "0.7693209", "0.7673", "0.76698726", "0.7648354", "0.7638157", "0.76276004", "0.76276004", "0.76184607", "0.7613508", "0.76015943", "0.758496", "0.7565187", "0.754797", "0.75439376", "0.75391495", "0.7531607", "0.7524352", "0.7499626", "0.7492427", "0.7484695", "0.7477069", "0.7468529", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.74671006", "0.7458298", "0.7452892", "0.7443984", "0.7442058", "0.743321", "0.74309576", "0.7429889", "0.74230504", "0.74210036", "0.7416517", "0.7415308", "0.7411563", "0.7409173", "0.7396271", "0.7371729", "0.7371729", "0.7371167", "0.7366924", "0.73645794", "0.73641986", "0.73629445", "0.73480713", "0.73480654", "0.73457086", "0.7336716", "0.7336716", "0.73214453", "0.73210585" ]
0.0
-1
Sets phenotype file, html file. Sets genotype file, html and csv file.
void setInputFile(String genoFile, String phenoFile) { this.genoFile = genoFile; this.phenoFile = phenoFile; this.genoHtmlName = Util.stripFileExtension(genoFile) + "_sum_" + new SimpleDateFormat("hhmmss").format(new Date()) + ".htm"; this.genoSummaryCsvName = PathConstants.summaryFilesMap.get(genoFile); this.phenoHtmlName = Util.stripFileExtension(phenoFile) + "_sum_" + new SimpleDateFormat("hhmmss").format(new Date()) + ".htm"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setFile() {\n\t}", "public void setFile(File file);", "public void setConfigFiles(String csv, String txt) {\n\t\tlayoutConfigFile = csv;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the layout file (.csv)\n\t\tsetupConfigFile = txt;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the setup file(.txt)\n\t}", "public void setFile(File f) { file = f; }", "protected void setField(HtmlElement element) throws IOException {\n\t\tString attributeValue = element.getAttribute(HtmlConstants.TYPE);\n\t\tif (!HtmlConstants.FILE.equals(attributeValue)) {\n\t\t\tthrow new StepFailedException(\"HTML input with id='\" + getHtmlId() + \"' is of type '\"\n\t\t\t\t+ attributeValue + \"' but should be '\" + HtmlConstants.FILE + \"'\", this);\n\t\t}\n\t\tfinal HtmlFileInput fileInput = (HtmlFileInput) element;\n\t\tfileInput.setValueAttribute(getFileName().getAbsolutePath());\n\t}", "@Override\n public void setFile(File f) {\n \n }", "void setNewFile(File file);", "public void setFileType(FileType typ) {\n fileType = typ;\n }", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "public void setFile(File file)\n {\n this.file = file;\n }", "public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }", "void setFile(String i) {\n file = i;\n }", "public void setFileType(TFileType type) {\n\n\t\tthis.type = type;\n\t}", "public interface FileReplacer {\n public void replaceTags(ArrayList<String> header, CSVRecord record, File resultFile);\n public void replaceTagsWithCoef(ArrayList<String> header, int headerIndex, double coefficient, CSVRecord record, File resultFile);\n\n public void replaceInOneDoc(ArrayList<String> header, CSVRecord record, File file, Table cellTable);\n}", "public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }", "public void setFile(File file) {\n this.file = file;\n }", "private void outputPageData(Webpage webpage, CSVPrinter html, CSVPrinter html5) {\n try {\n synchronized (html) {\n //Information for the global file\n ArrayList<String> pageInfo = new ArrayList<String>();\n pageInfo.add(webpage.getWARCname());\n pageInfo.add(webpage.getURI().toString());\n if(webpage.getOriginalURI() == null)\n pageInfo.add(\"N.D.\");\n else\n pageInfo.add(webpage.getOriginalURI().toString());\n pageInfo.add(\"\" + webpage.getNumHTMLelem());\n pageInfo.add(webpage.getDoctype());\n pageInfo.add(\"\" + webpage.getNumLinks());\n pageInfo.add(\"\" + webpage.getNumLinksInt());\n pageInfo.add(\"\" + webpage.getNumLinksBook());\n pageInfo.add(\"\" + webpage.getNumLinksExt());\n pageInfo.add(\"\" + webpage.getNumImages());\n pageInfo.add(\"\" + webpage.getNumComments());\n pageInfo.add(\"\" + webpage.getFileSize());\n pageInfo.add(\"\" + webpage.getSizeText());\n pageInfo.add(\"\" + webpage.getSizeElements());\n pageInfo.add(\"\" + webpage.getSizeComments());\n pageInfo.add(\"\" + webpage.getTextToElementsRatio());\n pageInfo.add(\"\" + webpage.getElementsToSizeRatio());\n pageInfo.add(\"\" + webpage.getTextToSizeRatio());\n pageInfo.add(\"\" + webpage.getCommentsToSizeRatio());\n pageInfo.add(\"\" + webpage.getNumErrors());\n pageInfo.add(\"\" + webpage.getNumWarnings());\n pageInfo.add(webpage.getResourceType());\n pageInfo.add(webpage.getHTTPCode());\n pageInfo.add(webpage.getContentType());\n pageInfo.add(webpage.getServer());\n pageInfo.add(webpage.getCharset());\n\n html.printRecord(pageInfo);\n html.flush();\n\n //If an HTML5 document, output to its specific file as well\n String doctype = webpage.getDoctype().toLowerCase();\n\n if (doctype.contains(\"<!doctype html>\")) {\n synchronized (html5) {\n html5.printRecord(pageInfo);\n html5.flush();\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void setSaveFile(File file)\n {\n \n }", "public void setFile(IFile file) {\n _file = file;\n }", "void setFileName( String fileName );", "public void setFile(String fileName)\n {\n }", "void setPropertiesFile(File file);", "void setFilePath(String filePath);", "public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}", "public void setFile(String file) {\r\n this.file = file;\r\n }", "public void setFileType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "private void setFileChoosers() {\n\t\t// sets default attributes for save file chooser\n\t\tsaveFileChooser = new JFileChooser();\n\t\tsaveFileChooser.setDialogType(JFileChooser.SAVE_DIALOG);\n\t\tsaveFileChooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tsaveFileChooser.setDialogTitle(\"Save As\");\n\t\tsaveFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t// sets default attributes for load file chooser\n\t\tloadFileChooser = new JFileChooser();\n\t\tloadFileChooser.setDialogType(JFileChooser.OPEN_DIALOG);\n\t\tloadFileChooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tloadFileChooser.setDialogTitle(\"Open\");\n\t\tloadFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t}", "public void setTemplate(MetaData mdTemplate) throws IOException;", "public void setClinicalRelevantVariants(Gel_BioInf_Models.File value) {\n this.clinicalRelevantVariants = value;\n }", "public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}", "public void setFileType(String fileType) {\r\n\t\tthis.fileType = fileType;\r\n\t}", "private void set_values(File f1){\n FileWriter writer= null;\n try{\n writer=new FileWriter(f1);\n writer.write(\"###################################################################################\\r\\n\"+\n \"This is the master file of the individual Student-\"+student_name+\"\\r\\n\"+\n \"##################################################################################\\r\\n\"+\n \"Name- \"+student_name+\"\\r\\n\"+\n \"Roll no- \"+student_rollno+\"\\r\\n\"+\n \"Gender- \"+student_gender+\"\\r\\n\"+\n \"Semester- 3\\r\\n\"+\n \"Subjects offered:-\\r\\n\"+\n \"(1)OOP\\r\\n\"+\n \"(2)DE\\r\\n\"+\n \"(3)DSA\\r\\n\"+\n \"*****************************************************************************\\r\\n\"+\n \"Quiz data\\r\\n\"+\n \"*****************************************************************************\\r\\n\"+\n \"Subject- OOP\\r\\n\"+\n \"List of Quizes taken with their marks\\r\\n\"+\n \"-----------------------------------------------------------------------------\\r\\n\"+\n \"Chap_1- \"+OOP[0]+\"\\r\\n\"+\n \"Chap_2- \"+OOP[1]+\"\\r\\n\"+\n \"Chap_3- \"+OOP[2]+\"\\r\\n\"+\n \"Chap_4- \"+OOP[3]+\"\\r\\n\"+\n \"-----------------------------------------------------------------------------\\r\\n\"+\n \"Subject- DE\\r\\n\"+\n \"List of Quizes taken with their marks\\r\\n\"+\n \"-----------------------------------------------------------------------------\\r\\n\"+\n \"Chap_1- \"+DE[0]+\"\\r\\n\"+\n \"Chap_2- \"+DE[1]+\"\\r\\n\"+\n \"Chap_3- \"+DE[2]+\"\\r\\n\"+\n \"-----------------------------------------------------------------------------\\r\\n\"+\n \"Subject- DSA\\r\\n\"+\n \"List of Quizes taken with their marks\\r\\n\"+\n \"-----------------------------------------------------------------------------\\r\\n\"+\n \"Chap_1- \"+DSA[0]+\"\\r\\n\"+ \n \"Chap_2- \"+DSA[1]+\"\\r\\n\"+\n \"Chap_3- \"+DSA[2]+\"\\r\\n\"+\n \"*****************************************************************************\\r\\n\"+\n \"Total marks- \"+total_marks+\"\\r\\n\"+\n \"Average- \"+average+\"\\r\\n\"+\n \"*****************************************************************************\\r\\n\");\n writer.close();\n }catch(IOException e){\n System.out.println(\"An error occured\");\n }\n }", "public void setTFileStorageType(TFileStorageType type) {\n\n\t\tthis.fileStorageType = type;\n\t}", "public void setupFiles() {\n File inputDataFile = new File(inputFileName);\n try {\n inputFile = new Scanner(inputDataFile);\n FileWriter outputDataFileOA = new FileWriter(outputFileNameOA);\n FileWriter outputDataFileLL = new FileWriter(outputFileNameLL);\n outputFileOA = new PrintWriter(outputDataFileOA);\n outputFileLL = new PrintWriter(outputDataFileLL);\n outputFileOA.println(\"Output from open addressing hash table:\");\n outputFileOA.println();\n outputFileLL.println(\"Output from linked list hash table:\");\n outputFileLL.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setFiletype(java.lang.String filetype) {\n this.filetype = filetype;\n }", "private void setTEMiosFromConfig(){\n\t\t\n\t\t//model I/O options\n\t\tTEM.runcht.califilein = config.califilein; //switch to read-in calibrated parameters from Jcalinput.txt\t\t\t\n\t\tTEM.runcht.califile = config.califile;\n\t\t\n\t\tTEM.runcht.usecalirestart = config.ccdfilein; //switch to read-in Env. driver for equilibrim-run from calirestart.nc \n\t\tTEM.runcht.outcalirestart = false; //only valid if 'usecalirestart' above is set to false\n\t\tTEM.runcht.ccdfile = config.ccdfile;\n\t\t\n\t\tTEM.runcht.outmodes.OSITER = config.OSITE;\n\t\tTEM.runcht.outmodes.ODAY = config.OSDLY;\n\t\tTEM.runcht.outmodes.OMONTH = config.OSMLY;\n\t\tTEM.runcht.outmodes.OYEAR = config.OSYLY;\n\t\tTEM.runcht.outmodes.OREGNER = config.OREGN;\t\t\t\t\t\n\t\n\t\t//plotters when NO output file\n\t\tTEM.runcht.GUIgraphic = config.OGRAPH;\n\t\tif (TEM.runcht.GUIgraphic) {\n\n\t\t\tbvplotter =new BioVariablePlotter();\t\t\t\n\t\t\tpvplotter =new PhyVariablePlotter();\n\t\t\t\n\t\t\tTEM.runcht.plotting.setPlotter(bvplotter);\n\t\t\tTEM.runcht.plotting.setPlotter2(pvplotter);\n\t\t\t\n\t\t\tif (config.OBGRAPH) {\n\t\t\t\tBioVariablePlotter.f.setVisible(true);\n\t\t\t} else {\n\t\t\t\tBioVariablePlotter.f.setVisible(false);\n\t\t\t}\n\t\t\tif (config.OPGRAPH) {\n\t\t\t\tPhyVariablePlotter.f.setVisible(true);\n\t\t\t} else {\n\t\t\t\tPhyVariablePlotter.f.setVisible(false);\n\t\t\t}\n\t\t}\n\n\t}", "public HTMLFile (URL url, String label) {\n this.inFile = null;\n inURL = url;\n inName = url.toString();\n commonConstruction();\n context.setType (label);\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setFile(String file) {\r\n\t\tthis.file = file;\r\n\t}", "public void setFileType(Integer fileType) {\n this.fileType = fileType;\n }", "void setFilePath(Path filePath);", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "public void setFiletype(String filetype) {\n this.filetype = filetype == null ? null : filetype.trim();\n }", "private void createHTMLFile(Webpage webpage) {\n String filepath = \"resources/tempHTML\" +Thread.currentThread().getName() +\".html\";\n\n try {\n //Create HTML file\n File file = new File(filepath);\n OutputStreamWriter fW = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\").newEncoder());\n fW.write(webpage.getHTML());\n fW.flush();\n fW.close();\n\n //Set HTML file size\n webpage.setFileSize(Utils.getFileSize(filepath));\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setFile(Object value) throws DmcValueException {\n ((MvwDefinitionDMO) core).setFile(value);\n }", "public void setNewFilePath(String newValue);", "public HTMLFile (URL url) {\n this.inFile = null;\n inURL = url;\n inName = url.toString();\n commonConstruction();\n }", "public void testSetType_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setType(value);\n\n\t\t\n\t}", "public void setFileType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public void fileSave()\n {\n try\n {\n // construct the default file name using the instance name + current date and time\n StringBuffer currentDT = new StringBuffer();\n try {\n currentDT = new StringBuffer(ConnectWindow.getDatabase().getSYSDate());\n }\n catch (Exception e) {\n displayError(e,this) ;\n }\n\n // construct a default file name\n String defaultFileName;\n if (ConnectWindow.isLinux()) {\n defaultFileName = ConnectWindow.getBaseDir() + \"/Output/RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n else {\n defaultFileName = ConnectWindow.getBaseDir() + \"\\\\Output\\\\RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setSelectedFile(new File(defaultFileName));\n File saveFile;\n BufferedWriter save;\n\n // prompt the user to choose a file name\n int option = fileChooser.showSaveDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n\n // force the user to use a new file name if the specified filename already exists\n while (saveFile.exists())\n {\n JOptionPane.showConfirmDialog(this,\"File already exists\",\"File Already Exists\",JOptionPane.ERROR_MESSAGE);\n option = fileChooser.showOpenDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n }\n }\n save = new BufferedWriter(new FileWriter(saveFile));\n saveFile.createNewFile();\n\n // create a process to format the output and write the file\n try {\n OutputHTML outputHTML = new OutputHTML(saveFile,save,\"Database\",databasePanel.getResultCache());\n outputHTML.savePanel(\"Performance\",performancePanel.getResultCache(),null);\n// outputHTML.savePanel(\"Scratch\",scratchPanel.getResultCache(),scratchPanel.getSQLCache());\n\n JTabbedPane scratchTP = ScratchPanel.getScratchTP();\n \n for (int i=0; i < scratchTP.getComponentCount(); i++) {\n try {\n System.out.println(\"i=\" + i + \" class: \" + scratchTP.getComponentAt(i).getClass());\n if (scratchTP.getComponentAt(i) instanceof ScratchDetailPanel) {\n ScratchDetailPanel t = (ScratchDetailPanel)scratchTP.getComponentAt(i);\n System.out.println(\"Saving: \" + scratchTP.getTitleAt(i));\n outputHTML.savePanel(scratchTP.getTitleAt(i), t.getResultCache(), t.getSQLCache());\n }\n } catch (Exception e) {\n // do nothing \n }\n }\n }\n catch (Exception e) {\n displayError(e,this);\n }\n\n // close the file\n save.close();\n }\n }\n catch (IOException e)\n {\n displayError(e,this);\n }\n }", "public void setFileType(String fileType) {\n this.fileType = fileType == null ? null : fileType.trim();\n }", "public void addDataformatToSendToHTTP(FileType type) {\r\n\t\tList<String> dataformatsToSystem;\r\n\t\tif(this.settings.containsKey(\"dataformatsToHTTP\")) {\r\n\t\t\tdataformatsToSystem = new ArrayList<String>(Arrays.asList(String.valueOf(this.settings.get(\"dataformatsToHTTP\")).split(\",\")));\r\n\t\t\tif(!dataformatsToSystem.contains(type.toString())) {\r\n\t\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\t}\r\n\t\t\tthis.settings.setProperty(\"dataformatsToHTTP\", String.join(\",\", dataformatsToSystem));\r\n\t\t} else {\r\n\t\t\tdataformatsToSystem = new ArrayList<>();\r\n\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\tthis.settings.setProperty(\"dataformatsToHTTP\", String.join(\",\", dataformatsToSystem));\r\n\t\t}\t\t\r\n\t\tthis.saveChanges();\r\n\t}", "@Override\r\n public void generateFiles(Language language, Filer filer, Properties properties) {\n yajco.fle.model.Language lang = YajcoModelToLocalModelTransformator.transform(language);\r\n\r\n try {\r\n Map<String, Object> params = new HashMap<>();\r\n params.put(\"generator\", this);\r\n params.put(\"package\", PACKAGE_NAME);\r\n params.put(\"printerPanelImplClassName\", PRINTER_PANEL_CLASS_NAME);\r\n params.put(\"language\", lang);\r\n\r\n for (Concept concept : lang.getConcepts()) {\r\n JavaFileObject jfo = filer.createSourceFile(PACKAGE_NAME + \".\" + concept.getName() + \"Panel\");\r\n try (InputStreamReader reader = new InputStreamReader(language.getClass().getResourceAsStream(TEMPLATE_PACKAGE + \"/\" + CONCEPT_TEMPLATE), \"utf-8\");\r\n Writer writer = new BufferedWriter(jfo.openWriter())) {\r\n VelocityContext context = new VelocityContext(params);\r\n context.put(\"concept\", concept);\r\n velocityEngine.evaluate(context, writer, \"\", reader);\r\n }\r\n }\r\n\r\n JavaFileObject jfo = filer.createSourceFile(PACKAGE_NAME + \".\" + PRINTER_PANEL_CLASS_NAME);\r\n try (InputStreamReader reader = new InputStreamReader(language.getClass().getResourceAsStream(TEMPLATE_PACKAGE + \"/\" + PRINTER_PANEL_TEMPLATE), \"utf-8\");\r\n Writer writer = new BufferedWriter(jfo.openWriter())) {\r\n VelocityContext context = new VelocityContext(params);\r\n context.put(\"printerClass\", yajco.generator.printergen.PrettyPrinterGenerator.PRINTER_CLASS_NAME);\r\n context.put(\"printerSubpackage\", yajco.generator.printergen.PrettyPrinterGenerator.PRINTER_PACKAGE);\r\n velocityEngine.evaluate(context, writer, \"\", reader);\r\n }\r\n\r\n } catch (IOException e) {\r\n throw new RuntimeException(\"Cannot generate output.\", e);\r\n }\r\n\r\n }", "public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }", "public void pageChanged(String inputDocument, String modelType, boolean documentTypeSelected)\n {\n \n if (inputDocument.endsWith(\".docx\") || inputDocument.endsWith(\".odt\")) //$NON-NLS-1$ //$NON-NLS-2$\n {\n isSpreadsheet = false;\n \n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDRegexOrStyle();\n RecognizedTree newTree = controller.getStylesAndRegex();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n \n boolean b = Constants.SYSML_EXTENSION.equals(modelType) || Constants.UML_EXTENSION.equals(modelType);\n \n descriptionComposite.setAttributeComboVisible(b);\n } \n else\n {\n isSpreadsheet = true;\n\n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDColumn();\n RecognizedTree newTree = controller.getColumns();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n }\n \n if (documentTypeSelected)\n {\n descriptionText = controller.getDescriptionEndText();\n descriptionRegex = controller.getDescriptionRegex();\n }\n \n updateWizard();\n \n if (inputDocument != null)\n {\n if (inputDocument.contains(\"file:\")) //$NON-NLS-1$\n {\n currentFileSystem = new File(URI.createURI(inputDocument).toFileString());\n controller.setCurrentFileSystem(currentFileSystem);\n }\n else if (inputDocument.contains(\"platform:\")) //$NON-NLS-1$\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.createURI(inputDocument).toPlatformString(true)));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n else\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(URI.createURI(inputDocument).toFileString()));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n }\n setDocumentFile(currentFileSystem);\n }", "public static void main(String[] args) {\n PdfFile pdfFile=new PdfFile(\"PDF File\");\n pdfFile.open();\n pdfFile.close();\n pdfFile.edit();\n WordFile wordFile=new WordFile(\"Word File\");\n wordFile.open();\n wordFile.close();\n wordFile.edit();\n JavaFile javaFile=new JavaFile(\"Java File\");\n javaFile.open();\n javaFile.close();\n javaFile.edit();\n\n }", "public void setGenero(Genero genero)\r\n/* 148: */ {\r\n/* 149:271 */ this.genero = genero;\r\n/* 150: */ }", "private void setContentType(String contentType) throws IOException {\n if (localEncoding !=\"\"){ return; } // Don't change Encoding Twice\n StringTokenizer tok = new StringTokenizer(contentType,\";\");\n if (tok.countTokens()<2){ return;}\n tok.nextToken();\n String var = tok.nextToken(\"=\");\n if (var.length()<1){ return; }\n if (var.charAt(0)==';'){ var = var.substring(1); }\n int j=0;\n for(int i=0; i<var.length();i++){\n if (var.charAt(i)==' '){ j++;} else { break;}\n }\n var = var.substring(j);\n if (!var.equalsIgnoreCase(\"charset\")){ return;}\n String charSet = tok.nextToken();\n if (charSet.equals(characterEncoding)){ return; } // Already correct Encoding\n if (inputStream == null){\n throw new IOException(\"HTML Parser called with Reader cannot change Encoding\");\n }\n if (! (inputStream instanceof OpenByteArrayInputStream) ){\n throw new IOException(\"HTML Parser not called with OpenByteArrayInputStream\");\n }\n OpenByteArrayInputStream obais = (OpenByteArrayInputStream) inputStream;\n byte[] buf = obais.getBuffer();\n int length = obais.getLength();\n int offset = obais.getOffset();\n reader.close();\n obais.close();\n obais = new OpenByteArrayInputStream(buf,offset,length);\n inputStream = obais;\n try {\n reader = new BufferedReader(new InputStreamReader(obais,charSet),1024);\n } catch (UnsupportedEncodingException e){\n Logging.warning(\"Unknown charset \"+charSet+\" parsing with default ISO-8859-1 charSet\");\n System.err.println(\"Unknown charset \"+charSet+\" parsing with default ISO-8859-1 charSet\");\n reader = new BufferedReader(new InputStreamReader(obais),1024);\n charSet = \"iso-8859-1\";\n }\n Logging.info(\"Changed Encoding to \"+charSet);\n System.err.println(\"Changed Encoding to \"+charSet);\n reset();\n characterEncoding = charSet;\n localEncoding = charSet;\n // We will restart reading the file from the beginning\n return;\n }", "private void settypeface() {\n }", "void setProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum productType);", "private static void setClonalSexRecGenomes(String haplotypeFile, String recombinationFile, String chromosomeDefinition, String sexInfoFile, boolean haploids)\n {\n if(! new File(haplotypeFile).exists()) throw new IllegalArgumentException(\"Haplotype file does not exist \"+haplotypeFile);\n if(recombinationFile!=null) throw new IllegalArgumentException(\"It is not allowed to provide a recombination file for simulation of clonal evolution\" + recombinationFile);\n if(sexInfoFile != null) throw new IllegalArgumentException(\"It is not allowed to provide a sex info file for simulations of clonal evolution \"+sexInfoFile);\n\n sexInfo=SexInfo.getClonalEvolutionSexInfo();\n\n DiploidGenomeReader dgr =new DiploidGenomeReader(haplotypeFile,sexInfo.getSexAssigner(),haploids,logger);\n SexedDiploids sd=dgr.readGenomes();\n if(sd.countMales()>0) throw new IllegalArgumentException(\"It is not allowed to specify male-haplotypes for clonal evolution, solely hermaphrodites or no sex is allowed\");\n if(sd.countFemales()>0) throw new IllegalArgumentException(\"It is not allowed to specify female-haplotypes for clonal evolution, solely hermaphrodites or no sex is allowed\");\n sexInfo.setHemizygousSite(sd.getDiploids().get(0).getHaplotypeA().getSNPCollection());\n\n ArrayList<Chromosome> chromosomes=sd.getDiploids().get(0).getHaplotypeA().getSNPCollection().getChromosomes();\n recombinationGenerator = new RecombinationGenerator(CrossoverGenerator.getDefault(), new RandomAssortmentGenerator(chromosomes,true));\n\n basePopulation=sd.updateSexChromosome(sexInfo);\n\n }", "protected void setInfoFile(String[] info){\n\n }", "public void setPlayFile(String file);", "public void setFile(DefaultStreamedContent file) {\n this.file = file;\n }", "public void setFile(PDFileSpecification f) {\n/* 409 */ this.stream.setItem(COSName.F, (COSObjectable)f);\n/* */ }", "public void setMime_type(String value)\r\n {\r\n getSemanticObject().setProperty(data_mime_type, value);\r\n }", "private void createGenotypes(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\t\t// And write back out in Flapjack format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"geno\")));\r\n\t\tout.write(\"# fjFile = GENOTYPE\");\r\n\t\tout.newLine();\r\n\r\n\t\t// Skip the first two lines; we'll just assume marker order...\r\n\t\tin.readLine(); in.readLine();\r\n\t\t// ...and use the data we already have from the map\r\n\t\tfor (Marker m: markers)\r\n\t\t\tout.write(\"\\t\" + m.name);\r\n\t\tout.newLine();\r\n\r\n\r\n\t\t// Now process each line\r\n\t\tint index = 0;\r\n\t\tString str = null;\r\n\t\twhile ((str = in.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (str.isEmpty())\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (index == 0)\r\n\t\t\t\tout.write(\"RP\");\r\n\t\t\telse if (index == 1)\r\n\t\t\t\tout.write(\"DP\");\r\n\t\t\telse\r\n\t\t\t\tout.write(\"RP[1]/DP-\" + index);\r\n\r\n\t\t\tfor (String allele: str.split(\",\"))\r\n\t\t\t\tout.write(\"\\t\" + allele);\r\n\r\n\t\t\tout.newLine();\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t}", "public void setFileTypes(String[] fileTypes);", "protected void setProperties(final UIComponent component) {\n\t\tsuper.setProperties(component); //set the default properties\n\t\tsetFileValue(component, UIInputFile.DIRECTORY_VAR, getDirectory()); //set the directory\n\t\tsetStringValue(component, UIInputFile.FILENAME_VAR, getFilename()); //set the filename\n\t}", "public void setFile(File file) {\n if (definerSet) {\n tooManyDefinitions();\n }\n definerSet = true;\n this.file = file;\n }", "private void importType(JTFFile file) {\n if (file.getType() != null) {\n if (typesService.exist(file.getType())) {\n file.getType().setId(typesService.getSimpleData(file.getType().getName()).getId());\n } else {\n typesService.create(file.getType());\n }\n\n file.getFilm().setTheType(file.getType());\n }\n }", "public void setMyFile(MyFile myFile) {\r\n\t\tthis.myFile = myFile;\r\n\t}", "void setStockFile(stockFilePT102.StockFileDocument.StockFile stockFile);", "public void setFile(File file) {\n\t\tif (file != null && !file.isEmpty()) {\n\t\t\tthis.file = file;\n\t\t} else {\n\t\t\tthis.file = null;\n\t\t}\n\t}", "public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) \n throws ProcessingException, SAXException, IOException\n { \n super.setup(resolver,objectModel,src,parameters);\n \n // If this page for editing an uploaded file's information\n // was requested, then we need to load EditFileStep instead!\n if(this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_BITSTREAM)\n {\n this.editFile = new EditFileStep();\n this.editFile.setup(resolver, objectModel, src, parameters); \n }\n else if(this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_POLICIES\n || this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_POLICIES_ERROR_SELECT_GROUP\n || this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_POLICIES_DUPLICATED_POLICY){\n this.editBitstreamPolicies = new EditBitstreamPolicies();\n this.editBitstreamPolicies.setup(resolver, objectModel, src, parameters);\n }\n else if(this.errorFlag==org.dspace.submit.step.AccessStep.STATUS_EDIT_POLICY\n || this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_POLICY_ERROR_SELECT_GROUP\n || this.errorFlag==org.dspace.submit.step.UploadWithEmbargoStep.STATUS_EDIT_POLICY_DUPLICATED_POLICY){\n this.editPolicy = new EditPolicyStep();\n this.editPolicy.setup(resolver, objectModel, src, parameters);\n }\n else\n {\n this.editFile = null;\n editBitstreamPolicies = null;\n editPolicy=null;\n }\n\n isAdvancedFormEnabled=ConfigurationManager.getBooleanProperty(\"webui.submission.restrictstep.enableAdvancedForm\", false);\n }", "public void setup_report() {\n try {\n output = new PrintWriter(new FileWriter(filename));\n } catch (IOException ioe) {}\n }", "public void setType(int type) {\n \t\tbrowserType = type;\n \t\tif (type == FILE_BROWSER) {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_fileLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_fileTitle);\n \t\t} else if (type == DIRECTORY_BROWSER) {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_directoryLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_directoryTitle);\n \t\t} else {\n \t\t\tdialogLabel = Messages.RemoteResourceBrowser_resourceLabel;\n \t\t\tsetTitle(Messages.RemoteResourceBrowser_resourceTitle);\n \t\t}\n \t}", "public HTMLFile (File inFile) {\n this.inFile = inFile;\n inName = inFile.toString();\n inURL = null;\n commonConstruction();\n }", "private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\n\t\t * \r\n\t\t * **/\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}", "@BeforeEach\n\tpublic void setUp2() throws IOException {\n\t\tpersistEntities(\"csv\", new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class },\n\t\t\t\tStandardCharsets.UTF_8.name());\n\t}", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void writeToCSV(String path) throws IOException, SQLException {\n\t\tWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n\t\t// Title\n\t\tout.write(\"pageId;title;earliest year;latest year;mean year;\");\n\t\t// IBM\n\t\tout.write(\n\t\t\t\t\"Anger;Disgust;Fear;Joy;Sadness;Analytical;Confident;Tentative;Openness;Conscientiousness;Extraversion;Agreeableness;Emotional Range;\");\n\t\t// LIWC\n\t\tout.write(\n\t\t\t\t\"LIWC;Word Count;Analytical thinking;Clout;Authentic;Emotional tone;Dictionary Words;Positive Emotion;Negative Emotion;Anxiety;Anger;Sadness;Tentative;Certainty;Power;Risk;Death;\");\n\t\tout.write(\"AlchemyTone;mixed;score;type;\");\n\t\tout.write(\"\\n\");\n\t\tfor (Page page : this.getExtractsFromDatabase()) {\n\t\t\tint pageId = page.getPageId();\n\t\t\tString title = page.getTitle();\n\t\t\tToneAnalysis ibmTone = page.getIbmTone();\n\t\t\tReceptivitiAnalysis liwcTone = page.getLiwcTone();\n\t\t\tDocumentSentiment docSentiment = page.getDocumentSentiment();\n\t\t\tint earliestYear = page.getEarliestYear();\n\t\t\tint latestYear = page.getLatestYear();\n\t\t\tint meanYear = 0;\n\t\t\tif (earliestYear == 0) {\n\t\t\t\tmeanYear = latestYear;\n\t\t\t} else {\n\t\t\t\tmeanYear = (earliestYear + latestYear) / 2;\n\t\t\t}\n\t\t\tif (ibmTone != null) {\n\t\t\t\tout.write(pageId + \";\" + title + \";\" + earliestYear + \";\" + latestYear + \";\" + meanYear + \";\");\n\t\t\t\tElementTone documentTone = ibmTone.getDocumentTone();\n\t\t\t\tList<ToneCategory> toneCategories = documentTone.getTones();\n\t\t\t\tfor (ToneCategory toneCategory : toneCategories) {\n\t\t\t\t\tList<ToneScore> toneScores = toneCategory.getTones();\n\t\t\t\t\tfor (ToneScore toneScore : toneScores) {\n\t\t\t\t\t\t// String name = toneScore.getName();\n\t\t\t\t\t\tdouble score = toneScore.getScore();\n\t\t\t\t\t\tout.write(String.valueOf(score).replace('.', ','));\n\t\t\t\t\t\tout.write(\";\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout.write(\";\");\n\n\t\t\t\tif (liwcTone != null) {\n\t\t\t\t\tDouble wordCount = liwcTone.getLiwcScores().getWc();\n\t\t\t\t\tDouble analyticalThinking = liwcTone.getLiwcScores().getAnalytic();\n\t\t\t\t\tDouble clout = liwcTone.getLiwcScores().getClout();\n\t\t\t\t\tDouble authentic = liwcTone.getLiwcScores().getAuthentic();\n\t\t\t\t\tDouble emotionalTone = liwcTone.getLiwcScores().getTone();\n\t\t\t\t\tDouble dictionaryWords = liwcTone.getLiwcScores().getDic();\n\n\t\t\t\t\tDouble posEmo = liwcTone.getLiwcScores().getCategories().getPosemo();\n\t\t\t\t\tDouble negEmo = liwcTone.getLiwcScores().getCategories().getNegemo();\n\t\t\t\t\tDouble anxiety = liwcTone.getLiwcScores().getCategories().getAnx();\n\t\t\t\t\tDouble anger = liwcTone.getLiwcScores().getCategories().getAnger();\n\t\t\t\t\tDouble sadness = liwcTone.getLiwcScores().getCategories().getSad();\n\t\t\t\t\tDouble tentative = liwcTone.getLiwcScores().getCategories().getTentat();\n\t\t\t\t\tDouble certainty = liwcTone.getLiwcScores().getCategories().getCertain();\n\t\t\t\t\tDouble power = liwcTone.getLiwcScores().getCategories().getPower();\n\t\t\t\t\tDouble risk = liwcTone.getLiwcScores().getCategories().getRisk();\n\t\t\t\t\tDouble death = liwcTone.getLiwcScores().getCategories().getDeath();\n\n\t\t\t\t\tout.write(wordCount + \";\");\n\t\t\t\t\tout.write(String.valueOf(analyticalThinking).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(clout).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(authentic).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(emotionalTone).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(dictionaryWords).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(posEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(negEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anxiety).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anger).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(sadness).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(tentative).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(certainty).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(power).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(risk).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(death).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\";\");\n\t\t\t\tif (docSentiment != null) {\n\t\t\t\t\tString mixed = docSentiment.getSentiment().getMixed();\n\t\t\t\t\tDouble score = docSentiment.getSentiment().getScore();\n\t\t\t\t\tString type = docSentiment.getSentiment().getType().toString();\n\t\t\t\t\tout.write(String.valueOf(mixed).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(score).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(type).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tSystem.out.println(\"Export finished.\");\n\n\t}", "void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}", "public void setSourceFile(File file){\n System.out.println(\"Set source file=\" + file.toString());\n this.file = file;\n }", "public void GenSetAnnotationONE(List<String> symb, String semsim, String ontology, String HCL,String exportfolder,String Rfile) throws Exception {\t\t\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\");\n\t\tDate date = new Date();\n\t\tString workspace = exportfolder+\"GSAn_\"+dateFormat.format(date)+\"/\";\n\n\t\tFile dossier = new File(workspace);\n\t\tif(!dossier.exists()){\n\t\t\tdossier.mkdirs();\n\t\t}\n\n\t\t\n\t\tStringBuffer plossb = new StringBuffer();\n\n\t\tplossb.append(\"SS\\tModule\\tCoverGenes\\tNumTerms\\tGNTotal\\n\");\n\t\t\n\t\t\tString sub = \"\";\n\t\t\tfor( String s: this.go.subontology.keySet()) {\n\t\t\t\tif(go.allStringtoInfoTerm.get(s).name.equals(ontology)) {\n\t\t\t\t\tsub= s;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tSystem.out.println(\"####### SubOntology : \" +sub );\n\t\t\t\tString statfolder = workspace;\n\n\t\t\t\tdossier = new File(statfolder);\n\t\t\t\tif(!dossier.exists()){\n\t\t\t\t\tdossier.mkdir();\n\t\t\t\t}\n\n\t\t\t\tSet<String> terminosinc = new HashSet<String>(this.goa.getTerms(symb, sub,go)); // Get terms to GOA with removed incomplete terms \n\n\t\t\t\tString export = statfolder+ this.go.allStringtoInfoTerm.get(sub).toName(); // url folder to save the information\n\n\t\t\t\tArrayList<String> listTerm = new ArrayList<String>(terminosinc); // change to list the terms set\n\n\t\t\t\twriteSimilarityMatrix M = new writeSimilarityMatrix(semsim);\n\t\t\t\t\n\t\t\t\tMap<String, Object> ss = M.similarityMethod(go, listTerm, ic);\n\t\t\t\tString[] tn = (String[]) ss.get(\"names\");\n\t\t\t\tDouble[][] tab = (Double[][]) ss.get(\"table\");\n\t\t\t\t\n\t\t\t\tFile f = new File( export+\"/SemanticMatrix/\");\n\t\t\t\tif(!f.exists()) {\n\t\t\t\t\tf.mkdirs();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tWrite.exportcsvONE(tn, tab, export+\"/SemanticMatrix/\"+semsim+\".csv\");\n\t\t\t\t\t\t\n\n\t\t\t\t//String[] methods = {\"DF\",\"Ganesan\",\"LC\",\"PS\",\"Zhou\",\"Resnik\",\"Lin\",\"NUnivers\",\"AIC\"};\n\t\t\t\t\n\t\t\t\tRepresentative.onemetricONE( ic,sub,semsim, HCL, new HashSet<String>(symb), export+\"/SemanticMatrix\", export, go, listTerm,this.goa,\n\t\t\t\t\t\ttailmin,RepCombinedSimilarity,precision,nbGeneMin,Rfile);\n\n\t\t\t\n\t\t\tfor(String t : this.go.allStringtoInfoTerm.keySet()) {\n\t\t\t\tthis.go.allStringtoInfoTerm.get(t).geneSet.clear();\n\t\t\t}\n//\t\t}\n\t\t\n\t\t\n\t}", "private void putDefaultInformation() throws FileNotFoundException, SQLException, IOException {\n staff_name = \"Sin informacion\";\n staff_surname = \"Sin informacion\";\n id_type = \"Sin informacion\";\n id_number = \"Sin informacion\";\n putProfPic(null);\n phone_number = \"Sin informacion\";\n mobile_number = \"Sin informacion\";\n email = \"Sin informacion\";\n birthdate = GBEnvironment.getInstance().serverDate();\n gender = \"Seleccione sexo\";\n }", "@Accessor(qualifier = \"singleFile\", type = Accessor.Type.SETTER)\n\tpublic void setSingleFile(final Boolean value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(SINGLEFILE, value);\n\t}", "public static void setFileType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, FILETYPE, value);\r\n\t}", "public void setFileUrl(String fileUrl);", "public HTMLFile (String inFileName) {\n inFile = new File(inFileName);\n inName = inFileName;\n inURL = null;\n commonConstruction();\n }", "public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }", "public void set(File file, String view, String attribute, Object value, boolean create) {\n/* 131 */ throw unsettable(view, attribute);\n/* */ }", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "File(String path, String type)\n {\n this.path=path;\n this.type=type;\n }", "void saveHtmFile(String htmFileName, String path) throws IOException\r\n \t{\r\n \t\tString filePath = path + \"/\" + htmFileName + \".html\";\r\n \t\tFileWriter out = new FileWriter( filePath );\r\n \t\tout.write(getTemplateContent());\r\n \t\tout.close();\r\n \t}", "@Override\n\tpublic boolean setFileType(int binaryFileType) {\n\t\treturn true;\n\n\t}", "private void openFileChooser(FileType type) {\r\n\t\ttry {\r\n\t\t\tJFileChooser fc = new JFileChooser(\"C:\\\\\");\r\n\t\t\tint choice = fc.showDialog(this.view, \"Add File\");\r\n\t\t\tif(choice == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\tFileModel model = new FileModel(fc.getSelectedFile(), type);\r\n\t\t\t\tif(Validation.isModelValid(model)) {\r\n\t\t\t\t\tFileData.saveFileModel(model);\r\n\t\t\t\t\tthis.updateColumnSelections(type);\r\n\t\t\t\t\tthis.setButtonEnabled(type);\r\n\t\t\t\t\tthis.loadFileNames();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void setEditedContent(CGFile file) {\n\n\t\t}", "public void put(final RequestHeader.FileType fileType, final String key, final String value) {\n if (fileType == FileType.JSON) putJSON(key, value == null ? \"\" : value);\n else if (fileType == FileType.XML) putXML(key, value == null ? \"\" : value);\n else putHTML(key, value == null ? \"\" : value);\n }", "public void setParameter(String name, String filename, InputStream is) throws IOException {\r\n Logging.logTime(\"setParameter begin (after new fileinput)\");\r\n boundary();\r\n writeName(name);\r\n write(\"; filename=\\\"\");\r\n write(filename);\r\n write('\"');\r\n newline();\r\n write(\"Content-Type: \");\r\n Logging.logTime(\"pre guessContentTypeFromName\");\r\n String type = URLConnection.guessContentTypeFromName(filename);\r\n if (type == null)\r\n type = \"application/octet-stream\";\r\n writeln(type);\r\n Logging.logTime(\"post guessContentTypeFromName\");\r\n newline();\r\n pipe(is, os);\r\n newline();\r\n }" ]
[ "0.5732431", "0.571782", "0.54588383", "0.54231316", "0.54090095", "0.5392194", "0.53911144", "0.5387264", "0.53231", "0.5294035", "0.5269852", "0.52580667", "0.52143097", "0.5151939", "0.5146113", "0.51459575", "0.51020277", "0.507303", "0.50713915", "0.5068812", "0.5048957", "0.50318736", "0.50006944", "0.49618405", "0.49426377", "0.49055177", "0.4883106", "0.4857084", "0.4851971", "0.48509178", "0.48504534", "0.48081803", "0.4805133", "0.47998896", "0.47919938", "0.47767362", "0.4758943", "0.47562963", "0.47537905", "0.47415838", "0.47404632", "0.47292355", "0.47282952", "0.47211123", "0.471747", "0.47173417", "0.46899566", "0.46823516", "0.46758533", "0.46682265", "0.46521744", "0.46515247", "0.46405903", "0.46360236", "0.46351072", "0.4630797", "0.4626793", "0.46256214", "0.4623685", "0.46102288", "0.46032086", "0.46027306", "0.46008584", "0.45991242", "0.45903185", "0.45880497", "0.4585113", "0.45821926", "0.4577179", "0.45738438", "0.45699814", "0.45655704", "0.45585477", "0.45557207", "0.45513895", "0.4551187", "0.45438567", "0.45332763", "0.45326942", "0.45243004", "0.451975", "0.45081082", "0.45038134", "0.45034516", "0.45006868", "0.44943595", "0.4491327", "0.44833183", "0.4482781", "0.44800305", "0.44773534", "0.4471322", "0.4469258", "0.44664744", "0.44655317", "0.44617394", "0.4459126", "0.44589388", "0.4456", "0.44555563" ]
0.6516527
0
constructor that is getting the fitting information
public ProductDbRepository(String dbUrl, String userName, String password) { this.dbUrl = dbUrl; this.userName = userName; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FitRealFunction() {\t\t\r\n\t}", "public ScaleInformation() {\n\t\tthis(0.0, 0.0, 800.0, 540.0, 800, 540);\n\t}", "protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "@Override\n public SignalSet getFitData() {\n return this.datFit;\n }", "public VibrationalStructureInfo() {\n }", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "protected Plot() {\r\n }", "public ExtractionParameters(){\n\t\tif (!subset){\n\t\t\tstartFrame = 1;\n\t\t}\n\t}", "public double[] getFitParameters() {\r\n\t\treturn a;\r\n\t}", "public Plot() {\r\n }", "protected void init() {\n \t\r\n ratios.put(1, 32.0f);\r\n ratios.put(2, 16.0f);\r\n ratios.put(3, 8.0f);\r\n ratios.put(4, 4.0f);\r\n ratios.put(5, 2.0f);\r\n ratios.put(6, 1.0f);\r\n }", "public MOData ( Individual program, int id ) {\n\n this.ID = id;\n this.program = program;\n\n int length = param.Parameters.FITNESS_FUNCTIONS.size();\n\n BufferedImage img = getImage();\n\n Response r = new Response(img);\n double fitn[];\n\n this.fitness = new double[length];\n this.raw = new double[length];\n this.ranks = new int[length];\n\n // Calculates fitnesses\n for ( int i = 0; i < length; i++ ) {\n FitnessFunction f =\n ((FitnessFunction)param.Parameters.FITNESS_FUNCTIONS.get(i));\n fitn = f.calculateFitness(r, img, param.Parameters.SOURCE);\n fitness[i] = fitn[0];\n raw[i] = fitn[1];\n }\n\n stats();\n \n }", "public Spectrumfile(HashMap aParams) {\r\n super(aParams);\r\n\r\n }", "protected void setupImpl()\n {\n hint(DISABLE_DEPTH_TEST);\n font = loadFont(\"Futura-CondensedExtraBold-200.vlw\");\n textFont(font, 200);\n mode = 0;\n\n // Mode 3\n w = width * 2;\n dx = (TWO_PI / period) * xspacing;\n yvalues = new float[w/xspacing];\n\n // Mode 5\n mod = loadImage(\"mod.png\");\n modSizes = new int[scaledBandLevels.length];\n }", "public Driver(){\n\t\tthis.D = Parameters.numberOfDocuments;\n\t\tthis.K = Parameters.numberOfTopics;\n\t\tthis.V = Parameters.sizeOfVocabulary;\n\n\t\tthis.oldAlpha = new double[this.K];\n\t\tthis.newAlpha = new double[this.K];\n\t\tthis.hessian = new double[this.K][this.K];\n\t\tthis.gradient = new double[this.K];\n\t}", "public Fitter() {\n this.alpha = -1.0; // reflection coefficient\n this.gamma = 2.0; // expansion coefficient\n this.beta = 0.5; // contraction coefficient\n this.maxError = 1.0E-10; // maximum error tolerance\n }", "public FeatureExtraction() {\n\t}", "public ExperimentInfo() { }", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "public Feeder() {\n beltMotor.configPeakOutputForward(1D/3D, 10);\n beltMotor.configPeakOutputReverse(-1D/3D, 10);\n ejectMotor.configPeakOutputForward(1, 10);\n ejectMotor.configPeakOutputReverse(-1, 10);\n\n beltMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);\n\n SmartDashboard.putNumber(\"Feeder.kBeltIntakeSpeed\", kBeltIntakeSpeed);\n SmartDashboard.putNumber(\"Feeder.kRollerIntakeSpeed\", kRollerIntakeSpeed);\n SmartDashboard.putNumber(\"Feeder.kBeltEjectSpeed\", kBeltEjectSpeed);\n SmartDashboard.putNumber(\"Feeder.kRollerEjectSpeed\", kRollerEjectSpeed);\n SmartDashboard.putNumber(\"Feeder.kInSensorMinDistance\", kInSensorMinDistance);\n SmartDashboard.putNumber(\"Feeder.kInSensorMaxDistance\", kInSensorMaxDistance);\n SmartDashboard.putNumber(\"Feeder.kOutSensorMinDistance\", kOutSensorMinDistance);\n SmartDashboard.putNumber(\"Feeder.kOutSensorMaxDistance\", kOutSensorMaxDistance);\n SmartDashboard.putNumber(\"Feeder.limitDistance\", limitDistance);\n }", "public FGDistanceStats()\r\n {\r\n \r\n }", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "private void getParameters() {\r\n\t\ttry {\r\n\t\t\tp_encoding = \"ISO-8859-1\";\r\n\t\t\tp_page_encoding = \"utf-8\";\r\n\t\t\tp_labels_data_file = \"resources/units/labels.txt\";\r\n\t\t\tp_multiplier_data_file = \"resources/units/muldata.txt\";\r\n\t\t\tp_category_data_file = \"resources/units/catdata.txt\";\r\n\t\t\tp_unit_data_file = \"resources/units/unitdata.txt\";\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treadDataFile(0, p_multiplier_data_file); //read data from external text file\r\n\t\treadDataFile(1, p_category_data_file); //read data from external text file\r\n\t\treadDataFile(2, p_unit_data_file); //read data from external text file\r\n\t\treadDataFile(3, p_labels_data_file); //read data from external text file\r\n\t}", "public void extractBatchSetupInfo(ChartInfo oInfo) throws ModelException {\n super.extractBatchSetupInfo(oInfo);\n \n int iNumSizeClasses = 0;\n float fSizeClassSize = 0;\n try { \n JTextField jField = (JTextField)DataGrapher.findNamedComponent(\n oInfo.m_jExtraOptions, NUMBER_SIZE_CLASS_NAME);\n Integer oNumSizeClasses = Integer.valueOf(jField.getText());\n jField = (JTextField)DataGrapher.findNamedComponent(oInfo.m_jExtraOptions, \n SIZE_CLASS_SIZE_NAME);\n Float oSizeClassSize = Float.valueOf(jField.getText());\n iNumSizeClasses = oNumSizeClasses.intValue();\n fSizeClassSize = oSizeClassSize.floatValue();\n }\n catch (java.lang.NumberFormatException oErr) {\n throw (new ModelException(ErrorGUI.BAD_DATA, \"Stand Table Request\", \n \"The value for number \" +\n \"of size classes or size class size is not a recognized number.\")); \n }\n\n if (iNumSizeClasses <= 0 || fSizeClassSize <= 0) {\n throw (new ModelException(ErrorGUI.BAD_DATA, \"Stand Table Request\", \n \"The values for number\" +\n \" of size classes or size class size must be greater than zero.\")); \n }\n\n m_iNumSizeClasses = iNumSizeClasses;\n m_fSizeClassSize = fSizeClassSize;\n \n JCheckBox jCheckBox = (JCheckBox)DataGrapher.findNamedComponent(\n oInfo.m_jExtraOptions, INCLUDE_LIVE_NAME);\n m_bIncludeLive = jCheckBox.isSelected();\n jCheckBox = (JCheckBox)DataGrapher.findNamedComponent(\n oInfo.m_jExtraOptions, INCLUDE_SNAGS_NAME);\n m_bIncludeSnags = jCheckBox.isSelected();\n\n //Make the size classes array\n mp_fSizeClasses = null;\n mp_fSizeClasses = new double [m_iNumSizeClasses];\n for (int i = 0; i < m_iNumSizeClasses; i++) {\n mp_fSizeClasses[i] = m_fSizeClassSize * (i + 1);\n } \n \n declareArrays();\n }", "public XYScatterGrapher()\n {\n\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public Steganography() {}", "private RegressionPrior() { \n /* empty constructor */\n }", "public UnivariateStatsData() {\n super();\n }", "public TbPdfInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "public void init(\n @ParamInfo(name=\"gBar_K in mS/mm^2\", options=\"value=0.36D\") double gBarK, \n @ParamInfo(name=\"E_K in mV\", options=\"value=-77.00D\")double eK, \n @ParamInfo(name=\"gBar_Na in mS/mm^2\", options=\"value=1.2D\") double gBarNa, \n @ParamInfo(name=\"E_Na in mV\", options=\"value=50.00D\") double eNa, \n @ParamInfo(name=\"gBar_L in mS/mm^2\", options=\"value=0.003D\") double gBarL, \n @ParamInfo(name=\"E_L in mV\", options=\"value=-54.387D\") double eL, \n @ParamInfo(name=\"Membrane capacity in uF/mm^2\", options=\"value=0.01D\") double cm) {\n this.gBarK = gBarK;\n this.eK = eK;\n this.gBarNa = gBarNa;\n this.eNa = eNa;\n this.gBarL = gBarL;\n this.eL = eL;\n this.cm = cm; \n \n }", "public PIInfo() {\n }", "protected void initModel() throws CommandLineFormatException, NullCoordinateException\n\t{\n\t\t\n\t\tfinal Var vdt = command.get(CNFTCommandLine.DT); //default dt\n\t\t\n\t\tcortical = new NeighborhoodMap(CORTICAL, \n\t\t\t\tnew SomUM(inputSpace, vdt, extendedFramedSpace)){\n\t\t\tpublic void compute() throws NullCoordinateException{\n\t\t\t\tsuper.compute();\n\t\t\t\tpotential.resetState();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tpotential = getPotential(vdt);\n\t\t\n\t\t\n\t\tcortical.addParameters(input,potential,command.get(CNFTCommandLine.LEARNING_RATE));\n\t\tNeighborhood neigh = new V4Neighborhood2D( extendedFramedSpace, new UnitLeaf((UnitParameter) cortical));\n\t\tneigh.setNullUnit(new ConstantUnit(new Var(0)));\n\t\t((NeighborhoodMap)cortical).addNeighboors(neigh);\n\t\t\n\t\t\n\t\tthis.root = cortical;\n\t\t\n\t\tcorticalPot = new Map(CORTICAL_POT, new Sum(vdt, extendedFramedSpace, new Leaf(cortical)));\n\t\tthis.addParameters(corticalPot);\n\t\t\n\t\t\n\n\t}", "public abstract void fit(BinaryData trainingData);", "private HyperplaneSubsets() {\n }", "public InfoDataIF() {\n initComponents();\n }", "public void fitParams (RJGUIController.XferFittingMod xfer) {\n\n\t\t// Get sequence-specific parameters\n\n\t\tRange aRange = xfer.x_aValRangeParam;\n\t\tint aNum = xfer.x_aValNumParam;\n\t\t//validateRange(aRange, aNum, \"a-value\");\n\t\tRange pRange = xfer.x_pValRangeParam;\n\t\tint pNum = xfer.x_pValNumParam;\n\t\t//validateRange(pRange, pNum, \"p-value\");\n\t\tRange cRange = xfer.x_cValRangeParam;\n\t\tint cNum = xfer.x_cValNumParam;\n\t\t//validateRange(cRange, cNum, \"c-value\");\n\t\t\t\t\t\n\t\tdouble mc = xfer.x_mcParam;\n\t\t\t\t\t\t\t\t\t\n\t\tdouble b = xfer.x_bParam;\n\n\t\t// Save the sequence-specific parameters for possible use in analyst options\n\n\t\tfetch_fcparams.seq_spec_params = new SeqSpecRJ_Parameters (\n\t\t\tb,\n\t\t\taRange.getLowerBound(),\n\t\t\taRange.getUpperBound(),\n\t\t\taNum,\n\t\t\tpRange.getLowerBound(),\n\t\t\tpRange.getUpperBound(),\n\t\t\tpNum,\n\t\t\tcRange.getLowerBound(),\n\t\t\tcRange.getUpperBound(),\n\t\t\tcNum\n\t\t);\n\n\t\t// Magnitude of completeness info\n\t\t\t\t\t\t\n\t\tdouble mCat;\n\n\t\tMagCompFn magCompFn;\n\n\t\t// If doing time-dependent magnitude of completeness\n\t\t\t\t\t\n\t\tif (xfer.x_timeDepMcParam) {\n\n\t\t\tdouble f = xfer.x_fParam;\n\t\t\t\t\t\t\n\t\t\tdouble g = xfer.x_gParam;\n\t\t\t\t\t\t\n\t\t\tdouble h = xfer.x_hParam;\n\t\t\t\t\t\t\n\t\t\tmCat = xfer.x_mCatParam;\n\n\t\t\tmagCompFn = MagCompFn.makePageOrConstant (f, g, h);\n\t\t\t\t\t\t\n\t\t\tcur_model = new RJ_AftershockModel_SequenceSpecific(get_cur_mainshock(), get_cur_aftershocks(), mCat, magCompFn, b,\n\t\t\t\t\txfer.x_dataStartTimeParam, xfer.x_dataEndTimeParam,\n\t\t\t\t\taRange.getLowerBound(), aRange.getUpperBound(), aNum,\n\t\t\t\t\tpRange.getLowerBound(), pRange.getUpperBound(), pNum,\n\t\t\t\t\tcRange.getLowerBound(), cRange.getUpperBound(), cNum);\n\n\t\t// Otherwise, time-independent magnitude of completeness\n\n\t\t} else {\n\t\t\t\t\t\t\n\t\t\tmCat = mc;\n\n\t\t\tmagCompFn = MagCompFn.makeConstant();\n\n\t\t\tcur_model = new RJ_AftershockModel_SequenceSpecific(get_cur_mainshock(), get_cur_aftershocks(), mc, b,\n\t\t\t\t\txfer.x_dataStartTimeParam, xfer.x_dataEndTimeParam,\n\t\t\t\t\taRange.getLowerBound(), aRange.getUpperBound(), aNum,\n\t\t\t\t\tpRange.getLowerBound(), pRange.getUpperBound(), pNum,\n\t\t\t\t\tcRange.getLowerBound(), cRange.getUpperBound(), cNum);\n\t\t}\n\n\t\t// Save the magnitude-of-completeness parameters for possible use in analyst options\n\n\t\tSearchMagFn magSample = aafs_fcparams.mag_comp_params.get_fcn_magSample();\t// the original value\n\t\tSearchRadiusFn radiusSample = fetch_fcparams.mag_comp_params.get_fcn_radiusSample();\n\t\tSearchMagFn magCentroid = aafs_fcparams.mag_comp_params.get_fcn_magCentroid();\t// the original value\n\t\tSearchRadiusFn radiusCentroid = fetch_fcparams.mag_comp_params.get_fcn_radiusCentroid();\n\n\t\tfetch_fcparams.mag_comp_params = new MagCompPage_Parameters (\n\t\t\tmCat,\n\t\t\tmagCompFn,\n\t\t\tmagSample.makeForAnalystMagCat (mCat),\n\t\t\tradiusSample,\n\t\t\tmagCentroid.makeForAnalystMagCat (mCat),\n\t\t\tradiusCentroid\n\t\t);\n\n\t\t// Make the Bayesian model if possible\n\t\t\t\t\t\n\t\tbayesianModel = null;\n\t\tif (genericModel != null) {\n\t\t\tif (RJ_AftershockModel_Bayesian.areModelsEquivalent(cur_model, genericModel))\n\t\t\t\tbayesianModel = new RJ_AftershockModel_Bayesian(cur_model, genericModel);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Could not create Bayesian model as sequence specifc and \"\n\t\t\t\t\t\t+ \"generic models are not equivalent\");\n\t\t}\n\n\t\t// Save the catalog parameters (we should already have these values)\n\n\t\tcat_dataStartTimeParam = xfer.x_dataStartTimeParam;\n\t\tcat_dataEndTimeParam = xfer.x_dataEndTimeParam;\n\t\tcat_mcParam = xfer.x_mcParam;\n\t\tcat_bParam = xfer.x_bParam;\n\n\t\treturn;\n\t}", "protected void initCoefficients() {\n\n\t\tString S = C + \": initCoefficients():\";\n\t\tif (D) {\n\t\t\tSystem.out.println(S + \"Starting\");\n\t\t}\n\n\t\t// Make the ShakeMap coefficients\n\t\tcoefficientsSM.clear();\n\t\t// Note that the coefficients in \"the APPENDIX\" that David Wald sent to me (Ned) on 8/27/07\n\t\t// assume that all logs in their equation are base-10 (in spite of their using \"ln\" for\n\t\t// two of the terms). Thus, thier B1, B2, and Sigma values need to be multiplied by 2.3025.\n\t\t// Also, since their units are gals their B1 needs to have ln(980) subtracted from it\n\t\t// (except for PGV).\n\t\t// PGA\n\t\tBJF_1997_AttenRelCoefficients coeffSM0 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tPGA_Param.NAME,\n\t\t\t\t-1, 2.408, 2.408, 2.408, 1.3171, 0.000, -1.757, -0.473, 760, 6.0,\n\t\t\t\t0.660, 0.328, 0.737, 0.3948, 0.836);\n\t\t// SA/0.00\n\t\tBJF_1997_AttenRelCoefficients coeffSM1 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tSA_Param.NAME + '/' + (new Double(\"0.00\")).doubleValue(),\n\t\t\t\t0.00, 2.408, 2.408, 2.408, 1.3171, 0.000, -1.757, -0.473, 760, 6.0,\n\t\t\t\t0.660, 0.328, 0.737, 0.3948, 0.836);\n\t\t// Note: no sigma values were available for those below (Vince needs to recompute them)\n\t\t// (those above came from Vince via personal communication)\n\t\t// therefore, I multiplied those above by ratio of the sigmas given in the table in\n\t\t// \"the APPENDIX\" David sent to me (Ned). These are labeled as \"Sigma\" in their table\n\t\t// with no further explanation; using the ratios seems reasonable.\n\t\t// SA/0.30\n\t\tBJF_1997_AttenRelCoefficients coeffSM2 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"0.30\")).doubleValue(),\n\t\t\t\t0.30, 0.835318, 0.835318, 0.835318, 1.71773, 0.000, -1.827, -0.608, 760,\n\t\t\t\t6.0,\n\t\t\t\t(0.842 / 0.836) * 0.660, (0.842 / 0.836) * 0.328,\n\t\t\t\t(0.842 / 0.836) * 0.737, (0.842 / 0.836) * 0.3948,\n\t\t\t\t(0.842 / 0.836) * 0.836);\n\t\t// SA/1.00\n\t\tBJF_1997_AttenRelCoefficients coeffSM3 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"1.00\")).doubleValue(),\n\t\t\t\t1.00, -1.82877, -1.82877, -1.82877, 2.20818, 0.000, -1.211, -0.974, 760,\n\t\t\t\t6.0,\n\t\t\t\t(0.988 / 0.836) * 0.660, (0.988 / 0.836) * 0.328,\n\t\t\t\t(0.988 / 0.836) * 0.737, (0.988 / 0.836) * 0.3948,\n\t\t\t\t(0.988 / 0.836) * 0.836);\n\t\t// SA/3.00 - actually these are BJF's 2-second values\n\t\tBJF_1997_AttenRelCoefficients coeffSM4 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"3.00\")).doubleValue(),\n\t\t\t\t3.00, -4.63102, -4.63102, -4.63102, 2.09305, 0.000, -0.848, -0.890, 760,\n\t\t\t\t6.0,\n\t\t\t\t(1.082 / 0.836) * 0.660, (1.082 / 0.836) * 0.328,\n\t\t\t\t(1.082 / 0.836) * 0.737, (1.082 / 0.836) * 0.3948,\n\t\t\t\t(1.082 / 0.836) * 0.836);\n\t\t// PGV - They actually give PGV coeffs so no scaling of 1-sec SA is needed.\n\t\tBJF_1997_AttenRelCoefficients coeffSM5 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tPGV_Param.NAME,\n\t\t\t\t-1, 5.1186, 5.1186, 5.1186, 1.70391, 0.000, -1.386, -0.668, 760, 6.0,\n\t\t\t\t(0.753 / 0.836) * 0.660, (0.753 / 0.836) * 0.328,\n\t\t\t\t(0.753 / 0.836) * 0.737, (0.753 / 0.836) * 0.3948,\n\t\t\t\t(0.753 / 0.836) * 0.836);\n\n\t\t// add these to the list\n\t\tcoefficientsSM.put(coeffSM0.getName(), coeffSM0);\n\t\tcoefficientsSM.put(coeffSM1.getName(), coeffSM1);\n\t\tcoefficientsSM.put(coeffSM2.getName(), coeffSM2);\n\t\tcoefficientsSM.put(coeffSM3.getName(), coeffSM3);\n\t\tcoefficientsSM.put(coeffSM4.getName(), coeffSM4);\n\t\tcoefficientsSM.put(coeffSM5.getName(), coeffSM5);\n\n\t\t// Now make the original BJF 1997 coefficients\n\t\tcoefficientsBJF.clear();\n\t\t// PGA\n\t\tBJF_1997_AttenRelCoefficients coeff0 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tPGA_Param.NAME,\n\t\t\t\t-1, -0.313, -0.117, -0.242, 0.527, 0.000, -0.778, -0.371, 1396, 5.57,\n\t\t\t\t0.431, 0.226, 0.486, 0.184, 0.520);\n\t\t// SA/0.00\n\t\tBJF_1997_AttenRelCoefficients coeff1 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tSA_Param.NAME + '/' + (new Double(\"0.00\")).doubleValue(),\n\t\t\t\t0.00, -0.313, -0.117, -0.242, 0.527, 0, -0.778, -0.371, 1396, 5.57,\n\t\t\t\t0.431, 0.226, 0.486, 0.184, 0.520);\n\t\t// SA/0.30\n\t\tBJF_1997_AttenRelCoefficients coeff2 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"0.30\")).doubleValue(),\n\t\t\t\t0.30, 0.598, 0.803, 0.7, 0.769, -0.161, -0.893, -0.401, 2133, 5.94,\n\t\t\t\t0.440, 0.276, 0.519, 0.048, 0.522);\n\t\t// SA/1.00\n\t\tBJF_1997_AttenRelCoefficients coeff3 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"1.00\")).doubleValue(),\n\t\t\t\t1.00, -1.133, -1.009, -1.08, 1.036, -0.032, -0.798, -0.698, 1406, 2.9,\n\t\t\t\t0.474, 0.325, 0.575, 0.214, 0.613);\n\t\t// SA/3.00 - actually these are BJF's 2-second values\n\t\tBJF_1997_AttenRelCoefficients coeff4 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\t\"SA/\" + (new Double(\"3.00\")).doubleValue(),\n\t\t\t\t3.00, -1.699, -1.801, -1.743, 1.085, -0.085, -0.812, -0.655, 1795, 5.85,\n\t\t\t\t0.495, 0.362, 0.613, 0.276, 0.672);\n\t\t// PGV - these are actually from 1-sec SA using the Newmark & Hall (1982). According to the ShakeMap docs this\n\t\t// scaling factor is PGV = (37.27*2.54)*SA1.0\n\t\t// The following formula is slightly more accurate (from Ken Campbell)\n\t\tdouble SA10toPGV = Math.log(981.0 / (2.0 * Math.PI * 1.65));\n\t\tBJF_1997_AttenRelCoefficients coeff5 = new BJF_1997_AttenRelCoefficients(\n\t\t\t\tPGV_Param.NAME,\n\t\t\t\t-1, -1.133 + SA10toPGV, -1.009 + SA10toPGV, -1.08 + SA10toPGV, 1.036,\n\t\t\t\t-0.032, -0.798, -0.698, 1406, 2.9, 0.474, 0.325, 0.575, 0.214, 0.613);\n\n\t\t// add these to the list\n\t\tcoefficientsBJF.put(coeff0.getName(), coeff0);\n\t\tcoefficientsBJF.put(coeff1.getName(), coeff1);\n\t\tcoefficientsBJF.put(coeff2.getName(), coeff2);\n\t\tcoefficientsBJF.put(coeff3.getName(), coeff3);\n\t\tcoefficientsBJF.put(coeff4.getName(), coeff4);\n\t\tcoefficientsBJF.put(coeff5.getName(), coeff5);\n\n\t}", "private void initiaLizeRequirements() {\n\n\t\ttry {\n\t\t\tstFoodDataEntry = cnFoodDataEntry.createStatement();\n\n\t\t\tString sql = \"select energysourceid, unit, conversionfactor from energysourcedetail where energysourceid in (select sourceid from energysource where energytypeid =\"\n\t\t\t\t\t+ FOOD + \") order by energysourceid asc\";\n\t\t\trsFoodDataEntry = stFoodDataEntry.executeQuery(sql);\n\n\t\t\tMap<String, Double> unitConversionF = null;\n\t\t\t// List<Map<String, Double>> listUnitConversionF;\n\t\t\tenergySourceDetail = new LinkedHashMap<Integer, Map<String, Double>>();\n\n\t\t\tint energysourceId;\n\t\t\tString unit;\n\t\t\tDouble coversionFactor;\n\n\t\t\twhile (rsFoodDataEntry.next()) {\n\t\t\t\tenergysourceId = rsFoodDataEntry.getInt(\"energysourceid\");\n\t\t\t\tunit = rsFoodDataEntry.getString(\"unit\");\n\t\t\t\tcoversionFactor = rsFoodDataEntry.getDouble(\"conversionfactor\");\n\n\t\t\t\tif (energySourceDetail.containsKey(energysourceId)) {\n\t\t\t\t\tenergySourceDetail.remove(energysourceId);\n\t\t\t\t} else {\n\t\t\t\t\tunitConversionF = new LinkedHashMap<String, Double>();\n\t\t\t\t}\n\t\t\t\tunitConversionF.put(unit, coversionFactor);\n\t\t\t\tenergySourceDetail.put(energysourceId, unitConversionF);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "SensorDescription(){\n\n }", "public void setup(){\r\n\t\t\r\n\r\n\t\tsuper.setup();\r\n\t\t\r\n\t\tparams = new String[] {\"numLocations\",\"numFirms\",\"timeHorizon\",\"enteringCosts\",\r\n\t\t\t\t \"reservationPrice\", \"productDifferentiation\",\r\n\t\t\t\t \"adjustEnteringCosts\",\r\n\t\t\t\t \"sdNoiseImitationKnowledge\",\r\n\t\t\t\t \"sdNoiseImitationConcept\",\r\n\t\t\t\t \"sigma\",\"discontFactor\",\"initialInnoEff\",\"fractionEffectivityImitators\",\r\n\t\t\t\t \"initialImiEff\",\"exitingCosts\",\"fractionEffectivityInnovators\",\r\n\t\t\t\t \"locationCosts\",\"isolatedLocation\", \"maxQualityConceptProgress\",\"heterogeneityMode\",\"randomAllocation\", \"numMontecarloRuns\",\r\n\t\t\t\t \"maxQualityConceptProgress\",\"rateLocationDecision\", \"marketEntryCosts\",\r\n\t\t\t\t \"marketEntryHazardRate\", \"parTimeToMarket\",\"ModelModeTimeToMarket\",\"scrapValueParameterInno\",\"scrapValueParameterImi\",\"strategyParameter\",\"targetNumFirms\"};\r\n\r\n\t\r\n\r\n\t\t\r\n\t\tif(graphOutput!=null)\r\n\t\t\tgraphOutput.dispose();\r\n\t\t\r\n\t\tif(graphPrice!=null)\r\n\t\t\tgraphPrice.dispose();\r\n\t\t\r\n\t\tif(graphQuality!=null)\r\n\t\t\tgraphQuality.dispose();\r\n\t\tif(graphNumFirms!=null)\r\n\t\t\tgraphNumFirms.dispose();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(graphFirmLocations!=null)\r\n\t\t\tgraphFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphEnteringCosts!=null)\r\n\t\t\tgraphEnteringCosts.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphAverageProbability!=null)\r\n\t\t\tgraphAverageProbability.dispose();\r\n\t\t\r\n\t\tif(graphTotalProfit!=null)\r\n\t\t\tgraphTotalProfit.dispose();\r\n\t\t\r\n\t\tif(graphClusteringCoefficient!=null)\r\n\t\t\tgraphClusteringCoefficient.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleOutput!=null)\r\n\t\tgraphSingleOutput.dispose();\r\n\t\t\r\n\t\tif(graphSinglePrice!=null)\r\n\t\tgraphSinglePrice.dispose(); \r\n\t\t\r\n\t\tif(graphSingleQuality!=null)\r\n\t\tgraphSingleQuality.dispose(); \r\n\t\t\r\n\t\tif(graphSingleFirmLocations!=null)\r\n\t\tgraphSingleFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphSingleProbability!=null)\r\n\t\t graphSingleProbability.dispose(); \r\n\t\t\r\n\t\tif(graphSinglelProfit!=null)\r\n\t\tgraphSinglelProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleQualityConcept!=null)\r\n\t\t\tgraphSingleQualityConcept.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphCumProfit!=null)\r\n\t\t\tgraphCumProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t \r\n\t if(dsurfList!=null){\r\n\t\t for(int i=0; i<dsurfList.size();i++){\r\n\t\t \t\t\r\n\t\t \t\tdsurfList.get(i).dispose();\r\n\t\t \r\n\t\t }\r\n\t}\r\n\t \r\n\t gridList = null;\r\n\t dsurfList = null;\r\n\t \r\n\t gridList = new ArrayList<Object2DGrid>() ;\r\n\t dsurfList\t= new\tArrayList<DisplaySurface>() ;\r\n\t \r\n\t \r\n\t dimX = ((int) Math.sqrt(numFirms))+5;\r\n\t dimY=dimX;\r\n\t \r\n\t \r\n\t \r\n\t if (surface != null)\r\n\t surface.dispose ();\r\n\t surface = null;\r\n\t \r\n\t surface = new DisplaySurface (this, \"Firm network\");\r\n\t registerDisplaySurface (\"Firm network\", surface);\r\n\t\t\r\n\t\t\r\n\t}", "public TransmissionCoefficientVisualiser()\n\t{\n\t\tsuper();\n\t\t\n\t\t// set to true for interactive version\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\t\t\n\t\t// set all parameters\n\t\t\n\t\trenderQuality = RenderQualityEnum.DRAFT;\n\t\t\n\t\taHat = new Vector3D(0, 0, 1);\n\t\tuHat = new Vector3D(1, 0, 0);\n\t\tvHat = new Vector3D(0, 1, 0);\n\t\tetaU = -0.2;\n\t\tetaV = -0.1;\n\t\tdeltaU = 0.6;\t// 0.2;\n\t\tdeltaV = 0.1;\t// -0.4;\n\t\tsigma1U = 1;\n\t\tsigma1V = 1;\n\t\tsigma2U = 1;\n\t\tsigma2V = 1;\n\t\t\n\t\talphaChoice =\n\t\t\t\tAlphaChoice.ZERO;\n//\t\t\t\tAlphaChoice.MANUAL;\n//\t\t\t\tAlphaChoice.OPTIMISED;\n\n\t\t// AlphaChoice.MANUAL parameters\n\t\talpha1U = 0;\n\t\talpha1V = 0;\n\t\talpha2U = -0.15;\t// -0.6;\n\t\talpha2V = -0.15;\t// -0.1;\n\n\t\tdouble distanceInFront = 2;\t// 0.8;\n\t\tapertureCentre =\n\t\t\t\tnew Vector3D(0, 0, 10-distanceInFront);\t// straight in front\n//\t\t\t\tnew Vector3D(1, 0, 10-distanceInFront);\t// a bit to the right\n//\t\t\t\tnew Vector3D(10, 0, 0);\t// 45 degrees off to the right\n\t\tcameraHorizontalFOVDeg = 2*MyMath.rad2deg(Math.atan(10./distanceInFront*Math.tan(MyMath.deg2rad(10))));\n\t\tbrightnessFactor = 1;\n\t\t\n\t\t// AlphaChoice.OPTIMISED parameters\n\t\tpointAtFOVCentre =\n\t\t\t\tnew Vector3D(0, 0, 8);\t// straight in front\n//\t\t\t\tapertureCentre;\t// always optimised for camera position\n//\t\t\t\tnew Vector3D(0, 0, -1000);\t// 45 degrees off to the right\n\t\tparallelityParameter = 0;\n\n\n\t\t\n\t\tSystem.out.println(\"TransmissionCoefficientVisualiser::TransmissionCoefficientVisualiser: F-numbers are as follows:\" +\n\t\t\t\t\"N_1u=\" + 1/sigma1U +\n\t\t\t\t\", N_1v=\" + 1/sigma1V +\n\t\t\t\t\", N_2u=\" + Math.abs(etaU)/sigma2U +\n\t\t\t\t\", N_2v=\" + Math.abs(etaV)/sigma2V\n\t\t\t);\n\t\t\n\t\t// boring parameters\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\n\t\t// for movie version\n\t\tnumberOfFrames = 50;\n\t\tfirstFrame = 0;\n\t\tlastFrame = numberOfFrames-1;\n\t\t\n\t\t// camera parameters are set in populateStudio() method\n\t\t\n\t\t// blur quality if test = false; make this better in the non-interactive version, as this is used to produce publication-quality images\n\t\t// standardCameraBlurQuality = (interactive?QualityType.GOOD:QualityType.SUPER);\t// this is the camera's blur quality if test=false\n\t\t\n\t\t// for interactive version\n\t\twindowTitle = \"Dr TIM's telescope-window transmission-coefficient visualiser\";\n\t\twindowWidth = 1200;\n\t\twindowHeight = 650;\n\t}", "public RngObject() {\n\t\t\n\t}", "public DataSet( int _height , int _width) throws FileNotFoundException {\n height = _height;\n width = _width;\n InitFile( \"src/com/algorithme/DataSet.txt\" );\n InitTargets();\n InitFeatures();\n System.out.println(\"Création de la DataSet\");\n }", "public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}", "public void init() {\n\t\tint totalFrequencia = 0;\n\t\tfor (Entry<String, Integer> clusterFrequencia : clustersFrequencia.entrySet()) {\n\t\t\ttotalFrequencia = totalFrequencia + clusterFrequencia.getValue();\n\t\t}\n\t\tsetTotalFrequencia(totalFrequencia);\n\t\t\n\t\t//atualiza a entropia\n\t\tDouble entropiaF = 0.0;\n\t\tfor (Entry<String, Integer> clusterFrequencia : clustersFrequencia.entrySet()) {\n\t\t\tDouble pxi = 1.0 * clusterFrequencia.getValue()/totalFrequencia;\n\t\t\tentropiaF = entropiaF + pxi * Math.log(pxi);\n\t\t}\n\t\tif (entropiaF != 0 )\n\t\t\tentropiaF = entropiaF * -1;\n\t\tsetEntropiaF(entropiaF);\n\t\t\n\t\t//atualiza o valor da formula\n\t\tDouble formulaScoreF = 1.0* Math.log10(totalFrequencia)/(entropiaF+1);\n\t\tsetFormulaScoreF(formulaScoreF);\n\t\t\n\t}", "@Override\r\n public void init(NegotiationSession negotiationSession, Map<String, Double> parameters) {\r\n super.init(negotiationSession, parameters);\r\n this.negotiationSession = negotiationSession;\r\n if (parameters != null && parameters.get(\"l\") != null) {\r\n learnCoef = parameters.get(\"l\");\r\n } else {\r\n learnCoef = 0.2;\r\n }\r\n learnValueAddition = 1;\r\n initializeModel();\r\n }", "private void sensorInformation(){\n\t\tthis.name = this.paramName;\n\t\tthis.version = this.paramVersion;\n\t\tthis.author = this.paramVersion;\n\t}", "@Override\n\tprotected void initialize() {\n\t\tnew ToolTipFrame( \t\t\t\n \t\t\t\"<html>\"+\n \t\t\t\"<br>If you have worked on a resized (reduced) version of source and \"+\n \t\t\t\"<br> of target image for time and memory purpose, \"+\n \t\t\t\"<br> the transfo computed from this reduced image will be rescale to fit the original size\" +\n \t\t\t\"<br> of your source and target images\"+\n \t\t\t\"<br><b> Source binning </b> is the reduced scale for source that you used to compute the transfo, \"+\n \t\t\t\"<br><b> Target binning </b> is the reduced scale for target that you used to compute the transfo, \"+\n \t\t\t\" <br>Example : you have processed reduced size source of 512*512 of a 2048x2048 original source file\"+\n \t\t\t\" <br>and a reduced size target of 512*512 of a 4096x4096 original target file\"+\n \t\t\t\" <br>Source binning will be 4 (2048/ 512) and target binning will be 8 (4096 / 512)\"+\n \t\t\t\"</html>\"\n \t\t\t);\n\n\t\tsource=new EzVarSequence(\"Select Source Image Full Size (will be transformed from xml file)\");\n\t\tString varName =\"Xml file containing list of transformation (computed on reduced images)\";\n\t\tif (source.getValue()!=null)\n\t\t\txmlFile=new EzVarFile(varName, source.getValue().getFilename());\n\t\telse\n\t\t\txmlFile=new EzVarFile(varName, ApplicationPreferences.getPreferences().node(\"frame/imageLoader\").get(\"path\", \".\"));\n\t\tsourcebinning= new EzVarInteger(\"Source Binning \",1, 100, 1);\n\t\ttargetbinning=new EzVarInteger(\"Target Binning \",1, 100, 1);\n\t\t\n\t\t\n\t\taddEzComponent(source);\n\t\taddEzComponent(xmlFile);\n\t\taddEzComponent(sourcebinning);\n\t\taddEzComponent(targetbinning);\n\t\t\n\t}", "private void prepare()\n {\n addObject(new TempoLimite(), 432, 207);\n addObject(new NumeroVidas(), 395, 278);\n\n Cliqueparajogar clique = new Cliqueparajogar();\n addObject(clique, getWidth()/2, getHeight()/2);\n\n Som som = new Som();\n addObject(som, getWidth() - 37, getHeight()-57);\n \n umMin ummin = new umMin();\n addObject(ummin,630,206);\n\n doisMin doismin = new doisMin();\n addObject(doismin,670,206);\n \n tresMin tresmin = new tresMin();\n addObject(tresmin,710,206);\n \n quatroMin quatromin = new quatroMin();\n addObject(quatromin,750,206);\n \n cincoMin cincomin = new cincoMin();\n addObject(cincomin,790,206);\n \n umaVida umavida = new umaVida();\n addObject(umavida,630,280);\n \n duasVidas duasvidas = new duasVidas();\n addObject(duasvidas,670,280);\n \n tresVidas tresvidas = new tresVidas();\n addObject(tresvidas,710,280);\n \n quatroVidas quatrovidas = new quatroVidas();\n addObject(quatrovidas,750,280);\n \n cincoVidas cincovidas = new cincoVidas();\n addObject(cincovidas,790,280);\n \n voltaratras voltar = new voltaratras();\n addObject(voltar, getWidth() -37, 428);\n }", "public CapteurEffetHall() {\n\t\t\n\t}", "public WeightingModel(){}", "static interface FittingFunction {\r\n\r\n /**\r\n * Returns the value of the function for the given array of parameter\r\n * values.\r\n */\r\n double evaluate(double[] argument);\r\n\r\n /**\r\n * Returns the number of parameters.\r\n */\r\n int getNumParameters();\r\n }", "public PQR() {}", "public PencilTool() {\n super();\n myPencil = new Path2D.Double(); \n }", "public ME_Model() {\n _nheldout = 0;\n _early_stopping_n = 0;\n _ref_modelp = null;\n }", "public void recalculateStats(){\n weight = .25f * (shaftMat.getParameter(\"Density\") * length + headMat.getParameter(\"Density\") * .4f);\n sharpness = headMat.getParameter(\"Malleability\") + 1f / headMat.getParameter(\"Durability\"); //Malleable objects can be sharp, as can fragile objects\n// fragility = 1f / (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n durability = (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n trueness = shaftMat.getParameter(\"Regularity\") + headMat.getParameter(\"Regularity\");\n// length = 2f;\n }", "public interface IFittedImage {\n \n /**\n * Gets the title of this image.\n * \n * @return title\n */\n public String getTitle();\n \n /**\n * Sets the color model used to display float values.\n * \n * @param colorModel \n */\n public void setColorModel(IndexColorModel colorModel);\n\n /**\n * Gets the associated histogram data object.\n * \n * @return\n */\n public HistogramDataGroup getHistogramData();\n\n /**\n * Begins a fit.\n */\n public void beginFit();\n\n /**\n * Ends a fit.\n */\n public void endFit();\n \n /**\n * Cancels a fit\n */\n public void cancelFit();\n\n /**\n * Updates the fitted parameters for a pixel.\n * \n * @param location\n * @param parameters\n */\n public void updatePixel(int[] location, double[] parameters);\n\n /**\n * Updates the fitted parameters for a pixel. The pixel is drawn\n * outsized at first.\n * \n * @param location\n * @param dimension\n * @param parameters\n */\n public void updateChunkyPixel(int[] location, int[] dimension, double[] parameters);\n\n /**\n * Recalculates the image histogram and resets the palette. Called \n * periodically during the fit.\n */\n public void recalcHistogram();\n\n /**\n * Redisplays the image after a LUT change.\n */\n public void redisplay();\n \n /**\n * Redisplays the image after masking.\n * \n * @param mask\n */\n public void redraw(Mask mask);\n\n /**\n * Given the array of fitted parameters, get the value for this image.\n * \n * @param parameters\n * @return \n */\n public double getValue(double[] parameters);\n}", "void fit(DataSet dataSet);", "public FrequencyAnalysis()\n {\n }", "@Override\n public void init(float[] data) {\n this.data = data;\n\n //\n shapeArr = new Rectangle2D.Float[data.length];\n colorArr = new Color[data.length];\n pointArr = new Point2D.Float[data.length];\n }", "private void init() throws IOException, ModelException{\r\n // Check if the input file should be convert to libSVM format\r\n if(this.reformatInputFile){\r\n reformatInputFile();\r\n this.inputFileName = this.inputFileName + \".svm\";\r\n }\r\n\r\n // Scale the training set\r\n if(this.scale){\r\n scale();\r\n }\r\n\r\n setProblem();\r\n checkParams();\r\n\r\n // Check if cross validation is needed\r\n if(this.crossValidation == 1){\r\n crossValidate();\r\n }\r\n // Goes to here only if you use SVMModel without project context\r\n else{\r\n train();\r\n }\r\n }", "public HarpData() throws ScadaAnnotationException {\n this.strTypId = null;\n this.strDevId = null;\n \n this.cfgDevice = new HarpConfig();\n \n this.datRaw = new WireHarp.DataRaw();\n this.datFit = new WireHarp.DataFit();\n \n this.sigFitAttrs = new WireHarp.FitAttrSet();\n }", "public Chart(double[][] result, double[][] observed){\n //Create a new Frame object\n final Frame f1 = new Frame(\"Model Fit\");\n\t//Set the Frame object size\t\n\tf1.setSize(600,400);\n //Add a window listener to the Frame to close it\n\tf1.addWindowListener(new WindowAdapter() {\n @Override\n\t\tpublic void windowClosing(WindowEvent we) {\n\t\t\tf1.dispose();\n\t\t}\n\t});\n \n //add in the code to create the chart\n //create a data object to hold the XY data\n DefaultXYDataset data = new DefaultXYDataset();\n //cycle through the origins\n for (int i = 0; i < observed.length; i++) {\n //create a two dimensional array to hold the observed and result\n double dataArray[][] = new double[2][observed[i].length];\n //put the observed data in element 0\n dataArray[0]=observed[i];\n //put the result data in element 1\n dataArray[1]=result[i];\n //add the data series with a unique name\n data.addSeries(\"Origin \"+i, dataArray);\n }\n\t//Create the chart with the correct title and axis names and data etc.\n\tJFreeChart chart = ChartFactory.createScatterPlot(\"Observed vs. Results\", \n\t\t\"Observed\", // x axis label\n\t\t\"Results\", // y axis label\n\t\tdata, // data\n\t\tPlotOrientation.VERTICAL, // orientation\n\t\ttrue, // legend\n\t\ttrue, // tooltips\n\t\tfalse // URLs\n\t);\n\t//get the plot area and format it to the desired colours\n\tXYPlot plot = (XYPlot) chart.getPlot();\n\tplot.setBackgroundPaint(Color.white);\n\tplot.setDomainGridlinePaint(Color.darkGray);\n\tplot.setDomainGridlinesVisible(true);\n\tplot.setRangeGridlinePaint(Color.black);\n\t\n\t// We're going to add some regression stuff here shortly.\n double[] coeffs = Regression.getOLSRegression(createTwoDArray(result, observed));\n\tLineFunction2D linefunction2d = new LineFunction2D(coeffs[0], coeffs[1]);\n\tXYDataset series2 = DatasetUtilities.sampleFunction2D(linefunction2d, 10, 50, 5, \"Linear Regression Line\");\n\tplot.setDataset(2, series2); \n\tXYLineAndShapeRenderer lineDrawer = new XYLineAndShapeRenderer(true, false);\n\tlineDrawer.setSeriesPaint(0, Color.BLACK);\n\tplot.setRenderer(2, lineDrawer);\n\t\n //create a chart panel to render to the screnn\n\tChartPanel chartPanel = new ChartPanel(chart);\n //add the chart panel to the frame\n\tf1.add(chartPanel);\n //set the frame to be visible\n\tf1.setVisible(true);\n }", "protected void initEqkRuptureParams() {\n\n\t\tmagParam = new MagParam(MAG_WARN_MIN, MAG_WARN_MAX);\n\n\t\tStringConstraint constraint = new StringConstraint();\n\t\tconstraint.addString(FLT_TYPE_UNKNOWN);\n\t\tconstraint.addString(FLT_TYPE_STRIKE_SLIP);\n\t\tconstraint.addString(FLT_TYPE_REVERSE);\n\t\tconstraint.setNonEditable();\n\t\tfltTypeParam = new FaultTypeParam(constraint,FLT_TYPE_UNKNOWN);\n\n\t\teqkRuptureParams.clear();\n\t\teqkRuptureParams.addParameter(magParam);\n\t\teqkRuptureParams.addParameter(fltTypeParam);\n\n\t}", "public FitMultiExponential() {\r\n\r\n // nPoints data points, 5 coefficients, and multiexponential fitting\r\n super(5, 5);\r\n xSeries = new double[5];\r\n ySeries = new double[5];\r\n \r\n bounds = 2; // bounds = 0 means unconstrained\r\n // bounds = 1 means same lower and upper bounds for\r\n // all parameters\r\n // bounds = 2 means different lower and upper bounds\r\n // for all parameters\r\n bl = new double[5];\r\n bu = new double[5];\r\n \r\n bl[0] = -Double.MAX_VALUE;\r\n bu[0] = Double.MAX_VALUE;\r\n for (int k = 0; k < (5 - 1)/2; k++) {\r\n \tbl[2*k+1] = -Double.MAX_VALUE;\r\n \tbu[2*k+1] = Double.MAX_VALUE;\r\n \tbl[2*k+2] = -Double.MAX_VALUE;\r\n \tbu[2*k+2] = 0.0;\r\n }\r\n\r\n // The default is internalScaling = false\r\n // To make internalScaling = true and have the columns of the\r\n // Jacobian scaled to have unit length include the following line.\r\n // internalScaling = true;\r\n // Suppress diagnostic messages\r\n outputMes = false;\r\n maxIterations = 5000;\r\n testData();\r\n }", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "public LInfSCBLens(){\n\tsuper();\n }", "public Pdf417lib() {\n\t\tsetDefaultParameters();\n\t}", "public void prepareModel() {\n //Since many models have different scale amplitudes, we calculate a uniform scale factor for the model\n setScaleFactor();\n //Since the 3ds file does not provide normal values, we must calculate them ourselves\n calculateNormals();\n //Finally we need to setup the buffers for drawing\n setupBuffers();\n }", "public ForecastCatalog () {\n\t\teqk_count = -1;\n\t\tlat_lon_depth_list = new long[1];\n\t\tlat_lon_depth_list[0] = 0L;\n\t\tmag_time_list = new long[1];\n\t\tmag_time_list[0] = 0L;\n\t}", "public AttributeDiscretization() {\n\n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "private void setupStuff() {\n\t\tm_seenNumbers = new double[featureArray.length][];\n\t\tm_Weights = new double[featureArray.length][];\n\t\tm_NumValues = new int[featureArray.length];\n\t\tm_SumOfWeights = new double[featureArray.length];\n\t\tfeatureTotals = new int[featureArray.length];\n\n\t\tfor (int i = 0; i < featureArray.length; i++) {\n\t\t\tm_NumValues[i] = 0;\n\t\t\tm_seenNumbers[i] = new double[100];\n\t\t\tm_Weights[i] = new double[100];\n\t\t}\n\n\t\t/*\n\t\t * initialize structures for probabilities of each class and of each\n\t\t * feature\n\t\t */\n\t\tclassCounts = new double[MLearner.NUMBER_CLASSES];\n\t\tprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tRealprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tfor (int i = 0; i < MLearner.NUMBER_CLASSES; i++) {\n\t\t\tfor (int j = 0; j < featureArray.length; j++) {\n\t\t\t\tif (featureArray[j]) {//only create if we are using that\n\t\t\t\t\t// feature\n\t\t\t\t\tprobs[i][j] = new HashMap();\n\t\t\t\t\tif (EmailInternalConfigurationWindow.isFeatureDiscrete(j)) {\n\t\t\t\t\t\tprobs[i][j].put(\"_default\", new Double(0));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclassCounts[i] = 0;\n\t\t}\n\n\t}", "public OpenGLModel() {\n\n\n\t}", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "public FullWaveformData() {\n\t\tchannelSampleArrayList = new ArrayList<>();\n\t\tdataSetArray = new DataSet[34];\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\tchannelSampleArrayList.add(new ArrayList<>());\n\t\t}\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\ttry {\n\t\t\t\tdataSetArray[i] = new DataSet(DataSetType.XYXY, WavePlot.getColumnNames());\n\t\t\t} catch (DataSetException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public BaseParameters(){\r\n\t}", "protected GeneralInfo(){\r\n \t\tsuper();\r\n \t}", "public void setGEM1ERFParams(GEM1ERF erf) {\n // set minimum magnitude\n /*\n * xxr: TODO: !!!type safety!!! apache's Configuration interface handles\n * a similar problem this way: Instead of defining one single method\n * like public void setParameter(String key, Object value) {...} there\n * is one method per type defined: setString(), setDouble(), setInt(),\n * ...\n */\n erf.setParameter(GEM1ERF.MIN_MAG_NAME, config\n .getDouble(ConfigItems.MINIMUM_MAGNITUDE.name()));\n // set time span\n TimeSpan timeSpan = new TimeSpan(TimeSpan.NONE, TimeSpan.YEARS);\n timeSpan.setDuration(config.getDouble(ConfigItems.INVESTIGATION_TIME\n .name()));\n erf.setTimeSpan(timeSpan);\n\n // params for area source\n // set inclusion of area sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_AREA_SRC_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_AREA_SOURCES.name()));\n // set rupture type (\"area source rupture model /\n // area_source_rupture_model / AreaSourceRuptureModel)\n erf.setParameter(GEM1ERF.AREA_SRC_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_AREA_SOURCE_AS.name()));\n // set area discretization\n erf.setParameter(GEM1ERF.AREA_SRC_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.AREA_SOURCE_DISCRETIZATION.name()));\n // set mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.AREA_SRC_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // params for grid source\n // inclusion of grid sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_GRIDDED_SEIS_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_GRID_SOURCES.name()));\n // rupture model\n erf.setParameter(GEM1ERF.GRIDDED_SEIS_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_GRID_SOURCE_AS.name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.GRIDDED_SEIS_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // params for fault source\n // inclusion of fault sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_FAULT_SOURCES_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_FAULT_SOURCE.name()));\n // rupture offset\n erf.setParameter(GEM1ERF.FAULT_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.FAULT_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_SURFACE_DISCRETIZATION.name()));\n // mag-scaling relationship\n erf.setParameter(GEM1ERF.FAULT_MAG_SCALING_REL_PARAM_NAME, config\n .getString(ConfigItems.FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.FAULT_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_MAGNITUDE_SCALING_SIGMA.name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.FAULT_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf.setParameter(GEM1ERF.FAULT_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.RUPTURE_FLOATING_TYPE.name()));\n\n // params for subduction fault\n // inclusion of fault sources in the calculation\n erf\n .setParameter(\n GEM1ERF.INCLUDE_SUBDUCTION_SOURCES_PARAM_NAME,\n config\n .getBoolean(ConfigItems.INCLUDE_SUBDUCTION_FAULT_SOURCE\n .name()));\n // rupture offset\n erf.setParameter(GEM1ERF.SUB_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.SUB_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_SURFACE_DISCRETIZATION\n .name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.SUB_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.SUB_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_SIGMA\n .name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.SUB_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf\n .setParameter(GEM1ERF.SUB_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.SUBDUCTION_RUPTURE_FLOATING_TYPE\n .name()));\n\n // update\n erf.updateForecast();\n }", "public ForecastCatalog () {\n\t\teqk_count = -1;\n\t\tlat_lon_depth_list = new long[1];\n\t\tlat_lon_depth_list[0] = 0L;\n\t\tmag_time_list = new long[1];\n\t\tmag_time_list[0] = 0L;\n\n\t\tset_standard_format();\n\t}", "private void initAreaImageFilm() {\n\n }", "public BufferVisualization() {\n initComponents();\n }", "public Drivetrain() {\n // Use inches as unit for encoder distances\n m_leftEncoder.setDistancePerPulse(initialDistancePerPulse);\n m_rightEncoder.setDistancePerPulse(initialDistancePerPulse);\n resetEncoders();\n }", "public SPIEL() \n {\n this( 800 , 600 , false , false , false );\n }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "abstract int estimationParameter1();", "public HMetis() {\n\t\tthis.init();\n\t}", "public MTPostEditDistanceReportGenerator()\n {\n\n }", "public ModelSourceFile() {\n\t\t\n\t}", "public InerDistributionDriftDetectionMethod (){\r\n \t//initialize();\r\n }", "public PlotDrawer() {\n\n\t}", "public RegistroSensor() \n {\n\n }", "public findDetectorPeaks(){\n super(\"findDetectorPeaks\");\n }", "public SensorData() {\n\n\t}", "public void initialize() {\n\n // Calculate the average unit price.\n calculateAvgUnitPrice() ;\n\n // Calculate the realized profit/loss for this stock\n calculateRealizedProfit() ;\n\n this.itdValueCache = ScripITDValueCache.getInstance() ;\n this.eodValueCache = ScripEODValueCache.getInstance() ;\n }", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "protected void initialize() {\n\n\t\tfinal int bucketStart = configuration.getGranularity().getMin();\n\t\tfinal int bucketEnd = configuration.getGranularity().getMax();\n\t\tfinal int step = configuration.getGranularity().getBucketSize();\n\t\tfinal IRasterLogic<T> logic = configuration.getLogic();\n\n\t\t// create the granularity raster data\n\t\tfor (int i = bucketStart; i <= bucketEnd; i += step) {\n\n\t\t\t// create the key for this row\n\t\t\tfinal RasterBucket bucket = new RasterBucket(i);\n\n\t\t\t/*\n\t\t\t * now lets create the array for the data of the BaseRaster. We can\n\t\t\t * calculate some values for the RasterFunctions already (i.e. the\n\t\t\t * static once).\n\t\t\t */\n\t\t\tfinal IRasterModelData bucketData = new BaseRasterModelData();\n\n\t\t\t/*\n\t\t\t * Now we will add a the data of the init RasterFunction which is\n\t\t\t * used by this BaseRaster\n\t\t\t */\n\t\t\tfor (final IRasterModelEntry e : model.getEntries()) {\n\t\t\t\te.initTo(bucketData);\n\n\t\t\t\tif (e.isInvariant()) {\n\n\t\t\t\t\t// execute the function\n\t\t\t\t\tfinal Object value = e.execute(modelId, configuration);\n\t\t\t\t\tbucketData.setValue(e.getName(), value);\n\t\t\t\t} else if (e.isDataInvariant()) {\n\t\t\t\t\tfinal Object intervalStart = logic.getBucketStart(bucket);\n\t\t\t\t\tfinal Object intervalEnd = logic.getBucketEnd(bucket);\n\n\t\t\t\t\t// execute the function\n\t\t\t\t\tfinal Object value = e.execute(modelId, configuration,\n\t\t\t\t\t\t\tintervalStart, intervalEnd);\n\t\t\t\t\tbucketData.setValue(e.getName(), value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdataCollection.put(bucket, bucketData);\n\t\t}\n\n\t\t// set the amount of data to 0\n\t\taddedModelData = 0;\n\t}" ]
[ "0.64309746", "0.61774", "0.5917338", "0.5824113", "0.58142984", "0.58049965", "0.5774969", "0.5744063", "0.5735137", "0.5695525", "0.5694665", "0.569052", "0.56773907", "0.56108195", "0.55986387", "0.55507493", "0.5531314", "0.55230665", "0.54800516", "0.5463136", "0.54622173", "0.5461885", "0.543973", "0.53998977", "0.53981596", "0.5383164", "0.5382902", "0.5379016", "0.53686166", "0.53682554", "0.5365786", "0.53639245", "0.53622484", "0.53579557", "0.5349423", "0.53386617", "0.5329942", "0.53239214", "0.5322398", "0.5321294", "0.5304571", "0.5303272", "0.5299416", "0.5293011", "0.5263839", "0.5260409", "0.52584594", "0.5256269", "0.5245928", "0.523542", "0.52348393", "0.52310365", "0.522573", "0.5224786", "0.5217935", "0.5214155", "0.52103835", "0.520682", "0.520551", "0.52049994", "0.52007824", "0.5194522", "0.51919824", "0.5183156", "0.51805544", "0.5176844", "0.5174182", "0.51679957", "0.5160769", "0.5156637", "0.5145363", "0.51453245", "0.5145309", "0.51376265", "0.51341945", "0.51336974", "0.5130179", "0.512542", "0.51181895", "0.5114894", "0.51147926", "0.51147467", "0.5113418", "0.5111469", "0.5110204", "0.51098686", "0.5101848", "0.5101573", "0.51010096", "0.5098175", "0.5097287", "0.50970775", "0.5096571", "0.5082238", "0.50807625", "0.5080211", "0.50733924", "0.50701004", "0.50672895", "0.50645965", "0.5058747" ]
0.0
-1
loading the productdataset from the DB with the specified id
@Override public Product selectById(int id) throws ProductRepositoryException { try (Connection conn = DriverManager.getConnection(dbUrl, userName, password)) { // statement with the parameter PreparedStatement stmt = conn.prepareStatement(QUERY_SELECT_BY_ID_STATEMENT); // setting every value for the parameter (begins with 1) stmt.setInt(1, id); // executing ResultSet result = stmt.executeQuery(); // throwing exception, when there is no more data-sets if (!result.next()) { throw new ProductRepositoryException("Product with ID" + id + " doesn't exist"); } Product entity = readProduct(result); return entity; } catch (Exception e) { System.err.println("Error loading a Product-dataset\n"); e.printStackTrace(); throw new ProductRepositoryException("Error loading a product dataset", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Product loadById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic IDataResult<Product> getById(int id) {\n\t\tvar product = productDao.getById(id);\n\t\tif (product.id == 0) {\n\t\t\treturn new ErrorDataResult<Product>(\"Böyle bir ürün bulunmuyor.\");\n\t\t}\n\t\treturn new SuccessDataResult<Product>(product);\n\t}", "Product getProductDetails(int idproduct) throws DataBaseException;", "public Product getProductByID(String id) {\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where id=?\";\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, id);\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n return new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return null;\r\n }", "public PosPrice load(Long id)throws DataAccessException\n {\n return load(PosPrice.class ,id);\n }", "public Cursor loadRecipe(int id){\r\n Cursor c = db.query(recipes.TABLENAME, new String[]{recipes.TITLE, recipes.IMAGE, recipes.INGREDIENTS, recipes.STEPS, recipes.TYPE, recipes.TIME, recipes.PEOPLE, recipes.IDRECIPE}, recipes.IDRECIPE + \"=\" + id, null, null, null, null);\r\n if (c != null) c.moveToFirst();\r\n return c;\r\n }", "private void loadDataset(int datasetId) {\r\n SelectionManager.Busy_Task(true, true);\r\n DivaClientService.registerMainDataset(datasetId,\r\n new AsyncCallback<DatasetInformation>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Selection_Manager.connError();\r\n }\r\n\r\n @Override\r\n public void onSuccess(DatasetInformation datasetInfos) {\r\n init = true;\r\n reload = false;\r\n loadingAnalysis(datasetInfos);\r\n }\r\n });\r\n }", "public MusicData load(Long id) throws MusicAppException;", "@Override\r\n\tpublic ProductRaw getById(int id) {\n\t\treturn productRawDao.selectByPrimaryKey(id);\r\n\t}", "public Product loadProductFromId(int productId) {\n ResultSet rs = database.getProduct(productId);\n Product newProduct = null;\n\n try {\n if (rs.next()) {\n newProduct = new Product(rs.getString(\"name\"), rs.getString(\"description\"), rs.getString(\"type\"), new Money(rs.getString(\"price\")), productId, rs.getBoolean(\"currentlyselling\"));\n } else {\n throw new NoSuchProductException(productId);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n if (newProduct == null) {\n throw new NoSuchProductException(productId);\n }\n return newProduct;\n }", "public void load(int p_id) {\n\t\tCachedRowSet l_rs;\n\t\tString sqlString;\n\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\n\t\t\tsqlString = \"SELECT * FROM country WHERE \" + \"countryid=\" + p_id;\n\t\t\tl_rs = m_db.runSQL(sqlString, stmt);\n\n\t\t\tif (l_rs.next()) {\n\t\t\t\t// Reset the object\n\t\t\t\tinitialise();\n\n\t\t\t\t// Setup the new data\n\t\t\t\tm_country_id = l_rs.getInt(\"countryid\");\n\t\t\t\tm_country_name = l_rs.getString(\"countryname\");\n\n\t\t\t}\n\t\t\tl_rs.close();\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in loadResource().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "Product getProductByID(Long id);", "ItoProduct selectByPrimaryKey(Integer id);", "public Product ProductDetail(int id){\n Product p = new Product();\n connect();\n ResultSet result = null;\n String sql = \"SELECT * FROM productos WHERE id_producto = ?\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, id);\n result = ps.executeQuery();\n if(result != null){\n p.setProductId(\"\"+result.getInt(\"id_producto\"));\n p.setProductDescription(result.getString(\"descripcion\"));\n p.setProductPresentation(result.getString(\"presentacion\"));\n p.setProductCuantity(result.getInt(\"cantidad\"));\n p.setProductPrice(result.getFloat(\"precio\"));\n p.setProductProvider(result.getInt(\"proveedor\"));\n }\n connect.close();\n return p;\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n return p;\n }", "public Product seekProduct(int id) throws Exception {\n\t\treturn this.dao.showOne(id);\r\n\t}", "Product selectByPrimaryKey(Long id);", "Product selectByPrimaryKey(Integer id);", "CptDataStore selectByPrimaryKey(String id);", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "@Override\n\tpublic Product getById(int id) throws SQLException {\n\t\treturn productDao.getById(id);\n\t}", "public DcSquadDO loadById(long id) throws DataAccessException;", "@Override\n\tpublic Product getProductByid(long id) {\n\t\treturn productDao.getProductByid(id);\n\t}", "@Override\n\tpublic Product findproduct(Integer id) {\n\t\t\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t Product product =null;\n\t\t\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product where id=?\");\n\t\t\tpst.setInt(1, id);\n\t\t\trs=pst.executeQuery();\n\t\t if(rs.next()) {\n\t\t \t product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t\n\t\t \t \n\t\t } \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t\treturn product;\n\t}", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}", "static public Product[] retrieve(int[] id) {\n\t\t\n\t\tProduct[] list = null;\n\t\t\n\t\treturn list;\n\t}", "@Override\r\n\tpublic Product getProductById(String productId, String filePath) {\r\n\t\treturn productDetailsRepository.getProductById(productId, filePath);\r\n\t}", "public Product findById(int id) {\n\t\tProduct p = null;\n\t\ttry (Connection c = JdbcUtil.getConnection()) {\n\t\t\tPreparedStatement s = c.prepareStatement(\"select * from product where product_id=?\");\n\t\t\ts.setInt(1, id);\n\t\t\tResultSet rs = s.executeQuery(); // 0 or 1 row as primary key is compared here\n\t\t\tif (rs.next()) {// rs.next() : moves cursor to first row\n\t\t\t\tp = mapRow(rs);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn p;\n\t}", "private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}", "@Override\n\tpublic Product getProduct(int id) {\n\t\treturn productDao.getProduct(id);\n\t}", "public Product get(String id);", "public void loadToCache(int dataType, int id) {\r\n\t\tsynchronized (queue) {\r\n\t\t\tfor (OnDemandData onDemandData = (OnDemandData) queue\r\n\t\t\t\t\t.getFront(); onDemandData != null; onDemandData = (OnDemandData) queue.getNext())\r\n\t\t\t\tif (onDemandData.dataType == dataType && onDemandData.ID == id)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\tOnDemandData onDemandData_1 = new OnDemandData();\r\n\t\t\tonDemandData_1.dataType = dataType;\r\n\t\t\tonDemandData_1.ID = id;\r\n\t\t\tonDemandData_1.incomplete = true;\r\n\t\t\tsynchronized (aClass19_1370) {\r\n\t\t\t\taClass19_1370.insertBack(onDemandData_1);\r\n\t\t\t}\r\n\t\t\tqueue.insertBack(onDemandData_1);\r\n\t\t}\r\n\t}", "NjProductTaticsRelation selectByPrimaryKey(String id);", "@Override\n @Transactional\n public Producto findById(long id) {\n return productoDao.findById(id);\n }", "public Product selectProduct(long id) {\n return entityManager.find(Product.class, id);\n }", "@Override\n\tpublic Product findProductById(Long id) {\n\t\treturn productDAO.findById(id).orElse(null);\n\t}", "public Product getProductById(final String id) \n\t{\n\n\t\treturn productDataDao.getProductById(id);\n\n\t}", "public Product getProductFromId(Integer prodId) throws BackendException;", "public DataSet findDataSet(Long id) {\n EntityManager em = getEntityManager();\n try {\n return em.find(DataSet.class, id);\n } finally {\n em.close();\n }\n }", "private Account loadDataFromDB(String id){\n if(mCurrentAccount == null){\n mCurrentAccount = getAccountDetailUC.execute(id);\n try {\n mLastSaveAccount = mCurrentAccount.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n }else{\n mCurrentAccount = getAccountDetailUC.execute(id);\n }\n return mCurrentAccount;\n }", "public OrderEntity LoadSingleOrder(int id) throws ClassNotFoundException, SQLException{\n\t\tOrderEntity o = new OrderEntity();\r\n\t\tConnectDB db = new ConnectDB();\r\n\t\tdb.connect();\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM cart WHERE ID = \" + id;\r\n\t\t\tResultSet rs = db.st.executeQuery(sql);\r\n\t\t\t//System.out.print(rs.getString(\"Username\"));\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\t\t\r\n\t\t\t\to.setId(rs.getInt(\"id\"));\r\n\t\t\t\to.setId_customer(rs.getInt(\"id_customer\"));\r\n\t\t\t\to.setTotal_price(rs.getInt(\"price_sum\"));\r\n\t\t\t\to.setAddress(rs.getString(\"address\"));\r\n\t\t\t\to.setDate(rs.getString(\"date_delivery\"));\r\n\t\t\t\to.setStatus(rs.getInt(\"status\"));\r\n\t\t\t\t\r\n\t\t\t\t//list.add(p);\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdb.st.close();\r\n\t\t\tdb.con.close();\r\n\t\t\t\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\treturn o;\r\n\t}", "@Override\n public ServiceCall<NotUsed, Product> getProductById(String id) {\n return request -> CompletableFuture\n .completedFuture(productRepository.getProduct(id));\n }", "Product findById(long id);", "T load(PK id);", "Product findProductById(Long id);", "@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }", "Product getProductById(Serializable productId);", "public Data getData(String repository,String id) {\n\n Data result = null;\n\n //Check if the repository is there\n if(doesDataExist(repository,id)){\n //Fetch the data\n result = storage.get(repository).get(id);\n }\n\n return result;\n }", "private Optional<DatasetVersion> fetchDatasetVersion(Long id) {\n return Optional.ofNullable(id)\n .map(datasetId -> this.datasetVersion = datasetVersionService.getById(datasetId));\n }", "ProductPricelistEntityWithBLOBs selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic Product getProduct(String id) {\n\t\treturn null;\r\n\t}", "public static Product selectProductId(int productID) throws SQLException{\r\n //ConnectionPool pool = ConnectionPool.getInstance();\r\n //Connection connection = pool.getConnection();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n }\r\n catch(ClassNotFoundException ex) {\r\n \r\n System.exit(1);\r\n }\r\n String URL = \"jdbc:mysql://localhost/phototest\";\r\n String USER = \"root\";\r\n String PASS = \"\";\r\n Connection connection = DriverManager.getConnection(URL, USER, PASS);\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n \r\n String query = \"SELECT * FROM photos \" + \"WHERE id = ?\";\r\n \r\n try{\r\n ps = connection.prepareStatement(query);\r\n ps.setInt(1, productID);\r\n rs = ps.executeQuery();\r\n if(rs.next())\r\n {\r\n Product p = new Product();\r\n p.setCode(rs.getString(\"id\"));\r\n p.setDescription(rs.getString(\"about\"));\r\n p.setImageURL(rs.getString(\"url\"));\r\n p.setPrice(rs.getDouble(\"price\"));\r\n p.setType(rs.getString(\"type\"));\r\n p.setTitle(rs.getString(\"title\"));\r\n p.setName(rs.getString(\"name\"));\r\n return p;\r\n }\r\n else{\r\n return null;\r\n }\r\n }\r\n catch(SQLException e){\r\n e.printStackTrace();\r\n return null;\r\n }\r\n finally\r\n {\r\n DBUtil.closeResultSet(rs);\r\n DBUtil.closePreparedStatement(ps);\r\n //pool.freeConnection(connection);\r\n }\r\n }", "CafeProduct getProductById(final Integer productId);", "void loadProducts(String filename);", "@Override\r\n\tpublic Product SelectById(int id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ProductVo selectOne(String id) {\n\t\treturn sqlSession.selectOne(\"product.selectOne\", id);\n\t}", "@Override\r\n\tpublic Product showOne(int id) throws Exception {\n\t\treturn this.dao.showOne(id);\r\n\t}", "public List loadsrc(int id) {\n\t\tSessionFactory sf = new Configuration().configure()\n\t\t\t\t.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\tQuery q = s.createQuery(\"from cat_vo where id='\" + id + \"'\");\n\t\tList ls = q.list();\n\t\treturn ls;\n\n\t}", "private void initdata() {\n\t\tProgressDialogUtil.showProgressDlg(this, \"加载数据\");\n\t\tProdDetailRequest req = new ProdDetailRequest();\n\t\treq.id = prodInfo.id+\"\";\n\t\tRequestParams params = new RequestParams();\n\t\ttry {\n\t\t\tparams.setBodyEntity(new StringEntity(req.toJson()));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew HttpUtils().send(HttpMethod.POST, Api.GETGOODSDETAIL, params, new RequestCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tT.showNetworkError(CommodityInfosActivity.this);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> resp) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tProdDetailResponse bean = new Gson().fromJson(resp.result, ProdDetailResponse.class);\n\t\t\t\tLog.e(\"\", \"\"+resp.result);\n\t\t\t\tif(Api.SUCCEED == bean.result_code && bean.data != null) {\n\t\t\t\t\tupview(bean.data);\n\t\t\t\t\tdatas = bean.data;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public Product getByID(int id) {\n if (!isValidID(id)) {\n System.out.println(\"Ese item no existe\");\n return null;\n }\n\n Product r = null;\n try {\n r = products[id].clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n return r;\n }", "@Transactional\n\tpublic Product getProductById(int id) {\n\n\t\tProduct product = hibernateTemplate.get(Product.class, id);\n\n\t\treturn product;\n\t}", "void loadData(String docId) {\n DataProvider.getInstance().getDocumentData(this, docId, new DataProvider.OnResponse<StorageItem>() {\r\n @Override\r\n public void execute(StorageItem data) {\r\n // This code executes when data is loaded from network\r\n // Load data to recycler view\r\n\r\n // TODO: Bringup preview of FileType.PDF\r\n switch (data.getFileType()) {\r\n case IMAGE:\r\n StorageUtils.loadImageFromUrl(DocDetails.this, docPreview, data.getFileUrl());\r\n break;\r\n\r\n default:\r\n docPreview.setImageResource(R.drawable.pdf_file);\r\n }\r\n\r\n docName.setText(data.getFileName());\r\n docDesc.setText(data.getFileDescription());\r\n docType.setText(data.getFileType().toString());\r\n docDate.setText(data.getTimestamp().toString());\r\n visibility.setText(data.getVisibility());\r\n\r\n // Task finished\r\n // Dismiss Snackbar\r\n if (snackbar.isShown())\r\n snackbar.dismiss();\r\n\r\n }\r\n }\r\n );\r\n }", "@Override\r\n\tpublic Product get(int id) {\n\t\treturn null;\r\n\t}", "public ActividadEntitie LoadActividadById(String id,SQLiteDatabase db){\r\n\r\n SQLiteDatabase database = getSqLiteDatabase(db,this.myDatabase);\r\n\r\n\t\tCursor cursor = database.query(ActividadTablaEntidad.nombre_tabla,\r\n\t\t new String[] {ActividadTablaEntidad.id,ActividadTablaEntidad.actividad_codigo,ActividadTablaEntidad.actividad_descripcion}, \r\n\t\t ActividadTablaEntidad.id + \"= ? \",\r\n\t\t\t\tnew String[] {id},null,null,ActividadTablaEntidad.actividad_codigo);\r\n\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\tActividadEntitie res = null;\r\n\t\t\r\n\t\tif (cursor != null ) {\r\n\t\t\t\r\n\t\t\tres = new ActividadEntitie();\r\n\t\t\t\r\n\t\t if (cursor.moveToFirst()) {\r\n\t \tres.set_codigoActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_codigo)));\r\n\t \tres.set_descripcionActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_descripcion)));\r\n\t \tres.set_id(cursor.getLong(cursor.getColumnIndex(CategoriaTablaEntidad.id)));\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\tif(cursor != null)\r\n cursor.close();\r\n\t\t\r\n\t\treturn res;\r\n\t}", "@Override\n public void loadDetailProductData() {\n mDetailPresenter.loadDetailProductData();\n }", "public void load(int id) throws InvalidIDException, SQLException {\r\n\t\t// Load the Project data first\r\n\t\tsuper.load(id);\r\n\t\t\r\n\t\t// Get our connection to the database.\r\n\t\tConnection conn = DBConnectionManager.getPrConnection();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry{\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\t// Our SQL statement\r\n\t\t\tString sqlStr = \"SELECT techGroups FROM tblTechnology WHERE projectID = \" + id;\r\n\r\n\t\t\t// Our results\r\n\t\t\trs = stmt.executeQuery(sqlStr);\r\n\r\n\t\t\t// No rows returned.\r\n\t\t\tif( !rs.next() ) {\r\n\t\t\t\tthrow new InvalidIDException(\"Loading Technology Project failed due to invalid Project ID.\");\r\n\t\t\t}\r\n\r\n\t\t\t// Populate the object from this row.\r\n\r\n\t\t\tString tmpStr;\r\n\t\t\ttmpStr = rs.getString(\"techGroups\");\r\n\t\t\tif(tmpStr == null || tmpStr.equals(\"\")) {\r\n\t\t\t\tthis.groups = null;\r\n\t\t\t} else {\r\n\t\t\t\tthis.groups = new HashSet();\r\n\t\t\t\tObject[] types = StringUtils.split(tmpStr, \",\");\r\n\t\t\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\t\t\tthis.groups.add(types[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trs.close();\r\n\t\t\trs = null;\r\n\t\t\t\r\n\t\t\tstmt.close();\r\n\t\t\tstmt = null;\r\n\t\t\t\r\n\t\t\tconn.close();\r\n\t\t\tconn = null;\r\n\t\t}\r\n\t\tcatch(SQLException e) { throw e; }\r\n\t\tcatch(InvalidIDException e) { throw e; }\r\n\t\tfinally {\r\n\r\n\t\t\t// Always make sure result sets and statements are closed,\r\n\t\t\t// and the connection is returned to the pool\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry { rs.close(); } catch (SQLException e) { ; }\r\n\t\t\t\trs = null;\r\n\t\t\t}\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry { stmt.close(); } catch (SQLException e) { ; }\r\n\t\t\t\tstmt = null;\r\n\t\t\t}\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry { conn.close(); } catch (SQLException e) { ; }\r\n\t\t\t\tconn = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public InputData getData(Integer id) {\n String SQL = \"SELECT * FROM world_bank WHERE idRecord_ID = ?\";\n InputData record = jdbcTemplate.queryForObject(SQL,\n new Object[] { id }, new DataMapper());\n return record;\n }", "Product getProductById(Integer productId);", "Product getProductById(Integer productId);", "Product getProductById(Integer productID);", "void viewProductById(long id);", "public ProductCompare getProductByID(String id) { //Must be int type because when saving to Session, it is still int\n String query = \"SELECT * FROM Product WHERE ProductID = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, id);\n rs = ps.executeQuery();\n while (rs.next()) {\n return (new ProductCompare(rs.getInt(\"ProductID\"),\n rs.getString(\"ProductName\"), \n rs.getString(\"Description\"),\n rs.getInt(\"SellPrice\"), \n rs.getString(\"imageLink\"),\n rs.getFloat(\"height\"),\n rs.getFloat(\"width\"),\n rs.getFloat(\"weight\")\n ));\n }\n } catch (Exception e) {\n }\n return null;\n }", "public Product getProduct(int id) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\r\n\t\tProduct product = (Product) session.get(Product.class, id);\r\n\t\treturn product;\r\n\t}", "public Product findProductById(Integer id) {\n\t\treturn null;\n\t}", "public PokeData getPokeDataPackageFromDatabase(int id, int loc)\n {\n System.out.println(\"Starting getPokeDataPackageFromDatabase(\" + id + \", \" + loc + \")\");\n \n return list_clientpokedata.get(id).getPokeData(loc);\n }", "public void load2() throws Exception {\n String query = \"select * from catalog_snapshot where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_item_id = '\" + this.fac_item_id + \"'\";\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setItemId( (int) rs.getInt(\"ITEM_ID\"));\n setFacItemId(rs.getString(\"FAC_ITEM_ID\"));\n setMaterialDesc(rs.getString(\"MATERIAL_DESC\"));\n setGrade(rs.getString(\"GRADE\"));\n setMfgDesc(rs.getString(\"MFG_DESC\"));\n setPartSize( (float) rs.getFloat(\"PART_SIZE\"));\n setSizeUnit(rs.getString(\"SIZE_UNIT\"));\n setPkgStyle(rs.getString(\"PKG_STYLE\"));\n setType(rs.getString(\"TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"PRICE\")));\n setShelfLife( (float) rs.getFloat(\"SHELF_LIFE\"));\n setShelfLifeUnit(rs.getString(\"SHELF_LIFE_UNIT\"));\n setUseage(rs.getString(\"USEAGE\"));\n setUseageUnit(rs.getString(\"USEAGE_UNIT\"));\n setApprovalStatus(rs.getString(\"APPROVAL_STATUS\"));\n setPersonnelId( (int) rs.getInt(\"PERSONNEL_ID\"));\n setUserGroupId(rs.getString(\"USER_GROUP_ID\"));\n setApplication(rs.getString(\"APPLICATION\"));\n setFacilityId(rs.getString(\"FACILITY_ID\"));\n setMsdsOn(rs.getString(\"MSDS_ON_LINE\"));\n setSpecOn(rs.getString(\"SPEC_ON_LINE\"));\n setMatId( (int) rs.getInt(\"MATERIAL_ID\"));\n setSpecId(rs.getString(\"SPEC_ID\"));\n setMfgPartNum(rs.getString(\"MFG_PART_NO\"));\n\n //trong 3-27-01\n setCaseQty(BothHelpObjs.makeZeroFromNull(rs.getString(\"CASE_QTY\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }", "public void fromDatabase(int id)\r\n\t{\t\t\r\n\t\tRationaleDB db = RationaleDB.getHandle();\r\n\t\tConnection conn = db.getConnection();\r\n\t\t\r\n\t\tStatement stmt = null; \r\n\t\tResultSet rs = null; \r\n\t\t\r\n\t\ttry {\r\n\t\t\tString findQuery; \r\n\t\t\t\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tfindQuery = \"SELECT name FROM \" +\r\n\t\t\t\"tradeoffs where id = \" + id;\r\n\t\t\t\r\n\t\t\trs = stmt.executeQuery(findQuery);\r\n\t\t\t\r\n\t\t\tif (rs.next())\r\n\t\t\t{\r\n\t\t\t\tString name = RationaleDBUtil.decode(rs.getString(\"name\"));\r\n\t\t\t\trs.close();\r\n\t\t\t\t\r\n\t\t\t\tfromDatabase(name);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tRationaleDB.reportError(ex, \"Tradeoff.fromDatabase(int)\", \"SQL error\");\r\n\t\t}\r\n\t\tfinally { \r\n\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic Product getProduct(String productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "@Override\n\tpublic boolean deleteProductData(int id) {\n\t\treturn dao.deleteProductData(id);\n\t}", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "@Override\r\n\tpublic Product getProduct(int productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "public T load(int id) {\n return this.session.load(this.type, id);\n }", "public objData getTestSet(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT TSDB_REFID, TSDB_SET_NAME, TST_REFID FROM TEST_SET_DB WHERE TSDB_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "@Override\n\t@Transactional(readOnly = true)\n\tpublic Producto finById(Long id) {\n\n\t\treturn productoDao.findById(id).orElse(null);\n\t}", "private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}", "public Data findById(Object id);", "@Override\r\n public Optional<Product> findbyId(Long id) {\r\n return productRepository.findById(id);\r\n }", "public ActiveRecord read(Object id) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(getTableName()).append(\" WHERE id = \").append(id);\n Row row = getAdapter().selectOne(sql.toString());\n if (row == null) throw new RecordNotFoundException(\"No record found with id \" + id);\n for (Column column : getColumns()) {\n String name = column.getName();\n Classes.setFieldValue(this, name, row.get(name));\n }\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n return this;\n }", "@Override\n\tpublic com.easybooking.model.BookedServices getDataById(int id) {\n\t\tcom.easybooking.model.BookedServices services = null;\n\t\tSessionFactory factory = HibernateUtil.getSesssionFactory();\n\t\tSession session = factory.openSession();\n\t\tsession.beginTransaction();\n\t\tservices = session.get(com.easybooking.model.BookedServices.class, id);\n\t\tsession.close();\n\t\tfactory.close();\n\t\treturn services;\n\t}", "@Override\n\tpublic ProductGalleries cariProductImage(String id) {\n\t\treturn this.productGaleryRepository.findById(Long.parseLong(id)).get();\n\t}", "@Override\r\n\tpublic HashMap<String, Object> selectProductById(String productId) {\n\t\tHashMap<String, Object> map = new HashMap<>();\r\n\t\tmap.put(\"product\", dao.selectProductById(productId));\r\n\t\tmap.put(\"optionList\", dao.selectOptionById(productId));\r\n\t\treturn map;\r\n\t}", "@Override\n public Product getProductById(long id, boolean retrieveAssociation) throws Exception\n {\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM Products WHERE productId = ?\");\n query.setLong(1, id);\n _da.setSqlCommandText(query);\n ResultSet productResult = _da.callCommandGetRow();\n if(productResult.next())\n return buildProduct(productResult, retrieveAssociation);\n\n return null;\n }", "@Override\n\tpublic Optional<Product> findById(Long id) {\n\t\t return productRepository.findById(id);\n\t}", "protected void loadData()\n {\n }", "@Override\n\tpublic UploadDF getById(Long id) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tUploadDF UploadDF = (UploadDF) session.get(UploadDF.class,id);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn UploadDF;\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "protected abstract void loadData();", "CatalogItem getItembyId(final Long id);", "public Grupo load(int id) {\n\t\tConnection conn = new ConnectionFactory().getConnection();\r\n\r\n\t\tString sqlComand = \"SELECT * FROM atividade WHERE id=?\";\r\n\r\n\t\tGrupo grupo = null;\r\n\r\n\t\ttry (PreparedStatement stm = conn.prepareStatement(sqlComand)) {\r\n\t\t\tstm.setInt(1, id);\r\n\r\n\t\t\tResultSet rs = stm.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tgrupo = new Grupo();\r\n\t\t\t\tProfessorDAO professorDAO = new ProfessorDAO();\r\n\r\n\t\t\t\tgrupo.setId((rs.getInt(\"id\")));\r\n\t\t\t\tgrupo.setNumero((rs.getInt(\"numero\")));\r\n\t\t\t\tgrupo.setNome((rs.getString(\"nome\")));\r\n\t\t\t\tgrupo.setProfessor((professorDAO.load(rs.getInt(\"orientador_id\"))));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn grupo;\r\n\t}", "@Override\n public void loadData(final List<Integer> allCommerceItemIds) {\n if (allCommerceItemIds.size() == 0) {\n return;\n }\n int pos = 0;\n // initiates the loading of items and their price via REST. Since each item must\n // be loaded in a single request, this loop loads the items in chunks (otherwise\n // we might have too many requests at once)\n while (pos < allCommerceItemIds.size()) {\n try {\n Log.i(TAG, \"loaded items: \" + mDatabaseAccess.itemsDAO().selectItemCount());\n Log.i(TAG, \"loaded item prices: \" +\n mDatabaseAccess.itemsDAO().selectItemPriceCount());\n // creates a \",\" separated list of item IDs for the GET parameter\n String ids = RestHelper.splitIntToGetParamList(allCommerceItemIds,\n pos, ITEM_PROCESS_SIZE);\n // all prices to the \",\" separated ID list.\n List<Price> prices = mCommerceAccess.getPricesWithWifi(ids);\n\n processPrices(prices);\n pos += ITEM_PROCESS_SIZE;\n\n // to prevent too many request at once, wait every 1000 processed items\n if (pos % ITEM_PROCESS_WAIT_COUNT == 0) {\n waitMs(TOO_MANY_REQUEST_DELAY_MS);\n }\n } catch (ResponseException ex) {\n Log.e(TAG, \"An error has occurred while trying to load the commerce data from the\" +\n \" server side!\",\n ex);\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load commerce data.\",\n ex);\n }\n }\n }" ]
[ "0.69698215", "0.6641738", "0.6530523", "0.65209115", "0.6465815", "0.6336231", "0.6316897", "0.6253307", "0.62455225", "0.61837244", "0.61828434", "0.6167618", "0.6126702", "0.6113478", "0.60810757", "0.606239", "0.6062314", "0.60394984", "0.60308903", "0.6023744", "0.598113", "0.5961801", "0.59568423", "0.595022", "0.59354085", "0.5926613", "0.5889608", "0.5887855", "0.58807904", "0.587175", "0.5863024", "0.58532894", "0.58485556", "0.5848141", "0.5843611", "0.5818437", "0.58169675", "0.581467", "0.58038336", "0.57931256", "0.57837605", "0.57775986", "0.5771738", "0.5767209", "0.5764488", "0.5753326", "0.5738649", "0.57366735", "0.5724223", "0.5721875", "0.57196206", "0.57190067", "0.5714878", "0.57029617", "0.5698641", "0.5695198", "0.56883466", "0.5682952", "0.5678031", "0.5667797", "0.56672215", "0.5642611", "0.5630653", "0.5628164", "0.5617835", "0.55998474", "0.559632", "0.5590677", "0.55904955", "0.55904955", "0.55898887", "0.5582659", "0.55646986", "0.5561679", "0.5557419", "0.55567724", "0.55466866", "0.5539564", "0.5539316", "0.55211365", "0.55178344", "0.55133694", "0.550936", "0.55051786", "0.5503477", "0.54951644", "0.54939", "0.54892623", "0.54889274", "0.54886985", "0.54831386", "0.54771364", "0.54587543", "0.5453279", "0.54512376", "0.54508615", "0.54463214", "0.5444778", "0.5443985", "0.5430942" ]
0.6554255
2
insert into products (quantity, name, description, price, entryDate, category_id)
@Override public int insertProduct(Product product) throws ProductRepositoryException { try (Connection conn = DriverManager.getConnection(dbUrl, userName, password)) { // creating statement, returns result-set with the key-values PreparedStatement stmt = conn.prepareStatement(INSERT_PRODUCT_STATEMENT, Statement.RETURN_GENERATED_KEYS); setCommonParameters(product, stmt); // executing the command, result is the count of the affected data-sets int rowAffected = stmt.executeUpdate(); if (rowAffected != 1) { System.out.println("No dataset involved with the insert ????"); throw new ProductRepositoryException("No dataset is involved with the insert."); } // when everything went right, getting the key ResultSet keys = stmt.getGeneratedKeys(); if (keys.next()) { int id = keys.getInt(1); System.out.printf("Object inserted with the new ID=%d\n", id); return id; } else { // shouldn't happen System.err.printf("Object inserted, new ID unknown!"); throw new ProductRepositoryException("The dataset was inserted but the ID couldn't be identified"); } } catch (SQLException e) { System.err.println("Error when inserting product datatset"); e.printStackTrace(); throw new ProductRepositoryException("Error inserting the product-datasetz", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "int insert(Product record);", "int insert(ItemCategory record);", "public void addCertainRow(String bookname, String ISBN, String author, String description,\n String quantity, String publisher, String category)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO material (bookname, ISBN, author, description, quantity, publisher, category) VALUES(\"\n +quotate(bookname)+\",\"\n +quotate(ISBN)+\",\"\n +quotate(author)+\",\"\n +quotate(publisher)+\",\"\n +quotate(quantity)+\",\"\n +quotate(publisher)+\",\"\n +quotate(category)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }", "void insert(Disproduct record);", "int insert(ItoProduct record);", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "int insertSelective(Product record);", "public static boolean insertCategory(productCategory product,ArrayList<String> attributes,String partNumber)\n {\n PreparedStatement stmt = null;\n\n try\n {\n String pstmt = \"INSERT INTO \" + product.categoryName.getValue() + constructValues(product,attributes,partNumber);\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n\n\n stmt.executeUpdate();\n\n return true;\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n\n return false;\n }", "public int insertItem(Item items, String category, Connection conn) {\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"insert into item_XXXX values(?,?,?,?,?)\");\r\n\t\t\tpstmt.setInt(1, items.getItemNo());\r\n\t\t\tpstmt.setString(2, items.getDescription());\r\n\t\t\tpstmt.setString(3, items.getCategory().toString());\r\n\t\t\tpstmt.setDouble(4, items.getPrice());\r\n\t\t\tpstmt.setInt(5, items.getQuantity());\r\n\t\t\tint count = pstmt.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "Product saveProduct (Long categoryId, Long productId);", "@Insert({\n \"insert into `category` (`cate_id`, `cate_name`)\",\n \"values (#{cateId,jdbcType=INTEGER}, #{cateName,jdbcType=VARCHAR})\"\n })\n int insert(Category record);", "public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}", "int insert(SmtOrderProductAttributes record);", "int insert(ScoreProduct record);", "private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }", "public void insertIntoCart(int NSBMID, String Rice,String Curry, int Quantity)\r\n {\r\n try \r\n {\r\n Date date = new Date(System.currentTimeMillis());\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO cart(NSBMID, date, Rice, Curry, Quantity) VALUES(\"+NSBMID+\",'\"+date+\"','\"+Rice+\"','\"+Curry+\"',\"+Quantity+\")\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n }", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "int insert(TbProductAttributes record);", "@Insert\n long insert(SpeciesCategory speciesCategory);", "int insertSelective(ItoProduct record);", "public void insertData(String Product_Name, String Product_Category, String Product_Description, String Product_Price) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(Database_Helper.COLUMN_2, Product_Name);\n contentValues.put(Database_Helper.COLUMN_3, Product_Category);\n contentValues.put(Database_Helper.COLUMN_4, Product_Description);\n contentValues.put(Database_Helper.COLUMN_5, Product_Price);\n long id = db.insert(Database_Helper.TABLE_NAME, null, contentValues);\n }", "int insertSelective(ItemCategory record);", "@Override\n public int insertProduct(Product product) throws Exception\n {\n if(product == null)\n return 0;\n\n PreparedStatement query = _da.getCon().prepareStatement(\"INSERT INTO Products (contactsKey, categoryKey, name, purchasePrice, salesPrice, rentPrice, countryOfOrigin, minimumStock) \" +\n \"VALUES (?, ?, ?, ?, ?, ?, ?, ?)\");\n\n query.setLong(1, product.getSupplier().getPhoneNo());\n query.setLong(2, product.getCategory().getCategoryId());\n query.setString(3, product.getName());\n query.setDouble(4, product.getPurchasePrice().doubleValue());\n query.setDouble(5, product.getSalesPrice().doubleValue());\n query.setDouble(6, product.getRentPrice().doubleValue());\n query.setString(7, product.getCountryOfOrigin());\n query.setLong(8, product.getMinimumStock());\n _da.setSqlCommandText(query);\n int rowsAffected = _da.callCommand();\n\n if(product.getProductData().size() > 0)\n {\n DBProductData dbProductData = new DBProductData();\n for(ProductData data : product.getProductData())\n rowsAffected += dbProductData.insertProductData(product.getId(), data);\n }\n\n return rowsAffected;\n }", "int insert(ItemStockDO record);", "int insert(ItemStockDO record);", "public static int insert(Item items)\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \n \"INSERT INTO item (Attribute, Name, Description,Price) \" +\n \"VALUES (?, ?, ?,?)\";\n try\n { \n ps = connection.prepareStatement(query);\n ps.setString(1, items.getAttribute());\n ps.setString(2, items.getItemname());\n ps.setString(3, items.getDescription());\n ps.setDouble(4, items.getPrice());\n return ps.executeUpdate();\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return 0;\n }\n finally\n {\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n } \n }", "int insert(CartDO record);", "@Override\n\tpublic void insert(Product product) {\n\t\tTransaction txTransaction = session.beginTransaction();\n\t\tsession.save(product);\n\t\ttxTransaction.commit();\n\t\tSystem.out.println(\"Product Inserted\");\n\t\t\n\t\t\n\t}", "Product addNewProductInStore(Product newProduct);", "@Override\n\tpublic void addProduct(Product product) throws DataBaseAccessException {\n\t\tLOGGER.debug(\"Inserting a single row into a database table\");\n\t\tLOGGER.info(\"values of product \" + product.getProductId());\n\t\tObject[] insert = new Object[] { product.getProductId(), product.getProductName(),\n\t\t\t\tproduct.getProductCategory() };\n\t\ttry {\n\t\t\tjdbcTemplate.update(INSERT_PRODUCT, insert);\n\t\t} catch (DataAccessException e) {\n\t\t\tthrow new DataBaseAccessException(\"unable to do the transaction \" + e);\n\t\t}\n\t}", "int insert(NjProductTaticsRelation record);", "public static boolean insert_prod(String ProdName, String catg,int cost,String owner,String Description) {\n\n String sql = \"INSERT INTO Product(ProdName,Category,Cost,Owner,Description,PackageID,Status) VALUES(?,?,?,?,?,?,?)\";\n try (\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.setString(1, ProdName);\n pstmt.setString(2, catg);\n pstmt.setInt(3, cost);\n pstmt.setString(4, owner);\n pstmt.setString(5, Description);\n pstmt.setString(6,\"\");\n pstmt.setString(7,\"0\");\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return false;\n }", "Product storeProduct(Product product);", "public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}", "@Override\n\tpublic int addproduct(Product product) {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\t\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"insert into product(category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time ) values(?,?,?,?,?,?,?,?,?,?,?)\");\n\t\n\t\t\t\n\t\t\t pst.setInt(1, product.getCategory_id());\n\t\t\t pst.setString(2, product.getName());\n\t\t\t pst.setString(3, product.getSubtitle());\n\t\t\t pst.setString(4, product.getMain_image());\n\t\t\t pst.setString(5, product.getSub_images());\n\t\t\t pst.setString(6, product.getDetail());\n\t\t\t pst.setBigDecimal(7, product.getPrice());\n\t\t\t pst.setInt(8, product.getStock());\n\t\t\t pst.setInt(9, product.getStatus());\n\t\t\t pst.setDate(10, new Date(product.getCreate_time().getTime()));\n\t\t\t pst.setDate(11, new Date(product.getUpdate_time().getTime()));\n\t\n\t\t\treturn pst.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t\t\n\t\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\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}\r\n\t}", "@Override\r\n\tpublic void insert(Product product) {\n\t\tproduct.setCreateDate(new Date());\r\n\t\tproductMapper.insert(product);\r\n\t}", "public void insertDBorder(String prodID, String quantity) {\r\n try {\r\n String sql = \"INSERT INTO EmpOrders (ProductID, QuantityNeeded) VALUES ('\" + prodID + \"', '\" + quantity + \"')\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }", "public boolean addProductToTable(Product product) {\r\n\t\tString sqlCommand = \"Insert Into ProductTable \\n\"\r\n\t\t\t\t+ \"(Barcode, Product_Name, Delivery_Time, Quantity_In_Store, Quantity_In_storeroom, Supplier_Name, Average_Sales_Per_Day, \"\r\n\t\t\t\t+ \"Location_In_Store, Location_In_Storeroom, Faulty_Product_In_Store,Faulty_Product_In_Storeroom, Category)\\n\" + \"values(\" \r\n\t\t\t\t+ \"?\"+ \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\"\r\n\t\t\t\t+ \"?\" + \",\" + \"?\" + \",\" + \"?\" + \")\";\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase);\r\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(sqlCommand)) {\r\n\t\t\tpstmt.setInt(1, product.getBarcodeProduct());\r\n\t\t\tpstmt.setString(2, product.getProductName());\r\n\t\t\tpstmt.setInt(3, product.getDeliveryTime());\r\n\t\t\tpstmt.setInt(4, product.getStoreQuantity());\r\n\t\t\tpstmt.setInt(5, product.getStoreroomQuantity());\r\n\t\t\tpstmt.setString(6, product.getSupplier());\r\n\t\t\tpstmt.setDouble(7, product.getAverageSalesPerDay());\r\n\t\t\tpstmt.setString(8, product.getStoreLocation());\r\n\t\t\tpstmt.setString(9, product.getStoreroomLocation());\r\n\t\t\tpstmt.setInt(10, product.getFaultyProductInStore());\r\n\t\t\tpstmt.setInt(11, product.getFaultyProductInStoreroom());\r\n\t\t\tpstmt.setInt(12, product.getCategoryID());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"addProductToTable: \"+e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static int insert(Product p) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO product (productCode, productName, catalogCategory, description, price, imageURL) \"\n + \"VALUES (?, ?, ?, ?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, p.getProductCode());\n ps.setString(2, p.getProductName());\n ps.setString(3, p.getCatalogCategory());\n ps.setString(4, p.getDescription());\n ps.setFloat(5, p.getPrice());\n ps.setString(6, p.getImageURL());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void executeQuery() {\n\n \n String query=\"insert into Cost (Date,Employee_Cost,Selling,Inventory_Cost,Wastage) values ('\"+date+\"','\"+Employee_Amount+\"','\"+Sale_total_amount+\"','\"+Inventory_total_Cost+\"','\"+Wastage_Cost+\"')\";\n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n // JOptionPane.showMessageDialog(null, e);\n\n }\n\n }", "int insertSelective(ItemStockDO record);", "void add(ProductCategory category);", "public void insertBillDrink(Bill billDrink) {\n\tString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\t\tps.setString(1, null);\n\t\t\tps.setInt(2, billDrink.getIdD());\n\t\t ps.setInt(3, billDrink.getIdE());\n\t\t\tps.setDouble(4, billDrink.getPrice());\n\t\t\tps.setString(5, billDrink.getSerialNumber());\n\t\t\tps.setDouble(6, billDrink.getTotal());\n\t\t\tps.execute();\n\t\t \n\t\t \n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\n}\n\t\n}", "void addProduct(Product product);", "public void insertOrder(Connection conn, String clientName, String productName, int orderedQuantity) {\n\tString sql = \"INSERT INTO javadbconnection.order(clientName,productName,quantity) Values(\" + clientName + \", \"+ productName + \", \"+ orderedQuantity+ \")\";\n\ttry {\n\tPreparedStatement stmt = conn.prepareStatement(sql);\n\tstmt.executeUpdate(sql);\n\t}catch (SQLException e) {\n\tSystem.err.println(e.getMessage()); \n\t\t}\n\t}", "int insertSelective(SmtOrderProductAttributes record);", "int insertSelective(ScoreProduct record);", "int insert(EquipmentOrder record);", "int insert(ProductPricelistEntityWithBLOBs record);", "public void insert(Product product) {\n this.products.add(product);\n }", "@Override\r\n\tpublic int insertProduct(Product product) {\n\t\treturn dao.insertProduct(product);\r\n\t}", "@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}", "int insertSelective(NjProductTaticsRelation record);", "public long addProductShoppingList(String name, int quality, double quantity, String unit) {\n long pid = addNewProduct(name);\n Cursor c = null;\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n if (pid == -1) {\n\n String[] args = new String[1];\n args[0] = name;\n c = db.rawQuery(\"SELECT * FROM Products WHERE pname=?\", args);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n pid=c.getInt(c.getColumnIndex(\"_id\"));\n c.moveToNext();\n }\n }\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_PID, (int) pid);\n cv.put(DBHelper.SHOPPINGLIST_QUALITY, quality);\n cv.put(DBHelper.SHOPPINGLIST_QUANTITY, quantity);\n cv.put(DBHelper.SHOPPINGLIST_UNIT, unit);\n\n long _id = db.insert(DBHelper.TABLE_SHOPPINGLIST, null, cv);\n\n if (_id > 0) {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: _id:\" + String.valueOf(_id) + \", pid:\" + String.valueOf(pid) + \", pname:\" + name);\n } else {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: pname:'\" + name + \"', But already in ShoppingList table.\");\n }\n db.close();\n return _id;\n }", "public void insert(Category record) throws SQLException {\r\n sqlMapClient.insert(\"CATEGORY.abatorgenerated_insert\", record);\r\n }", "public void insertDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"INSERT INTO EmpOrders VALUES ('\" + orderID + \"', '\"\r\n + prodID + \"', '\" + quantity + \"')\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }", "private void insertProduct() {\n\n Uri imageforDummyProductURI = Uri.parse(\"android.resource://com.ezyro.uba_inventory/drawable/img_audi_a3\");\n\n\n // Create a ContentValues objecURI\n ContentValues values = new ContentValues();\n values.put(ProductEntry.COLUMN_PRODUCT_NAME, \"ford\");\n values.put(ProductEntry.COLUMN_PRODUCT_UNIT_PRICE, 25000);\n values.put(ProductEntry.COLUMN_PRODUCT_QUANTITY, 1);\n values.put(ProductEntry.COLUMN_PRODUCT_IMAGE_PATH, String.valueOf(imageforDummyProductURI));\n values.put(ProductEntry.COLUMN_PRODUCT_CATEGORY_NAME,\"Car\");\n values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_ID,1);\n // values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_NAME, \"Audi\");\n // values.put(ProductEntry.COLUMN_PRODUCT_SUPPLIER_EMAIL, \"[email protected]\");\n\n Uri newUri = getContentResolver().insert(ProductEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }", "int insert(TbInvCategory record);", "int insertSelective(Category record);", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "public void addProduct(Product product);", "void insert(OrderPreferential record) throws SQLException;", "int insert(Goods record);", "int insertSelective(ProductPricelistEntityWithBLOBs record);", "@Insert({\n \"insert into order (id, orderid, \",\n \"name, price, userid)\",\n \"values (#{id,jdbcType=BIGINT}, #{orderid,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{userid,jdbcType=VARCHAR})\"\n })\n int insert(Order record);", "@Transactional\n public void addProductandParamsToDB(Product product, Params params, Category category) {\n product.setCategory(category);\n product.setParametr(params);\n paramsDaoSpring.insertToTable(params);\n productDaoImpl.insertToTable(product);\n logger.info(\"pramas, category and products have been inserted to DB\");\n }", "void insertSelective(Disproduct record);", "public void addProduct(Product product){\n // Adding new contact\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_PRODUCT_NAME, product.getName_product());\n values.put(IS_STRIKE_OUT, product.IsStrikeout());\n values.put(KEY_UUID_PRODUCT_NAME, String.valueOf(product.getId()));\n\n\n // Inserting Row\n db.insert(TABLE_PRODUCTS, null, values);\n Log.d(LOG_TAG_ERROR, \"addProduct OK \" + \" \" + product.getName_product() + \" \" + product.getId());\n\n db.close(); // Closing database connection\n }", "int insertProductTaskLog(ProductTaskLog productTaskLog);", "public int insert(Listing listing) throws SQLException;", "public int storeProduct(Product product){\n int rowsAffected = 0;\n connect();\n String sql = \"INSERT INTO productos VALUES(?,?,?,?,?,?,?)\";\n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, Integer.parseInt(product.getProductId()));\n ps.setString(2, product.getProductDescription());\n ps.setString(3, product.getProductPresentation());\n ps.setInt(4, product.getProductCuantity());\n ps.setFloat(5, product.getProductPrice());\n ps.setFloat(6, (product.getProductCuantity() * product.getProductPrice()));\n ps.setInt(7, product.getProductProvider());\n \n rowsAffected = ps.executeUpdate();\n connect.close();\n return rowsAffected;\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return rowsAffected;\n }", "int insertSelective(CartDO record);", "@Override\n\tpublic void insert(Category entitiy) {\n\n\t}", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();", "public boolean insertCategory(String category, int id){\r\n int numRowsInserted;\r\n String insertCategory = \"INSERT INTO Categories(category, productID)\" +\r\n \"VALUES(?,?)\";\r\n\r\n try {\r\n PreparedStatement categoryStatement = conn.prepareStatement(insertCategory);\r\n categoryStatement.setString(1, category);\r\n categoryStatement.setInt(2, id);\r\n numRowsInserted = categoryStatement.executeUpdate();\r\n\r\n }catch (SQLException e){\r\n return false;\r\n }\r\n\r\n return numRowsInserted == 1;\r\n }", "public static void insertProductToMarket(Supermarket market, Product product) throws SQLException {\r\n\t\tPreparedStatement statement = null;\r\n\t\tString market_name = market.getSuper_name();\r\n\t\tString product_name = product.getProduct_name();\r\n\t\tString product_company = product.getProduct_company();\r\n\t\tString product_category = product.getProduct_category();\r\n\t\ttry {\r\n\t\t\tString query = \"INSERT INTO CS_\"+market_name+\" (PRODUCT_NAME, PRODUCT_COMPANY, PRODUCT_PRICE, PRODUCT_EXIST, PRODUCT_CATEGORY) VALUES (?, ?, ?, ?, ?)\";\r\n\t\t\tstatement = JdbcCommon.connection.prepareStatement(query);\r\n\t\t\tstatement.setString(1,product_name);\r\n\t\t\tstatement.setString(2,product_company);\r\n\t\t\tstatement.setDouble(3,0);\r\n\t\t\tstatement.setBoolean(4,false);\r\n\t\t\tstatement.setString(5,product_category);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t} catch (SQLException e) {e.printStackTrace();}\t\t\r\n\t\tstatement.close();\r\n\t}", "@Insert\n long insertEggDaily(EggDaily eggDaily);", "public static void InsertTable(Supermarket supermarket, Vector<Product> products) throws SQLException {\r\n\t\tPreparedStatement statement = null;\r\n\t\tString market_name = supermarket.getSuper_name();\r\n\t\ttry {\r\n\t\t\tProduct current_product = new Product();\r\n\t\t\tfor(int i=0; i<products.size();i++) {\r\n\t\t\t\tcurrent_product = products.elementAt(i);\r\n\t\t\t\tString query = \"INSERT INTO CS_\"+market_name+\" (PRODUCT_NAME, PRODUCT_COMPANY, PRODUCT_PRICE, PRODUCT_EXIST, PRODUCT_CATEGORY) VALUES (?, ?, ?, ?, ?)\";\r\n\t\t\t\tstatement = JdbcCommon.connection.prepareStatement(query);\r\n\t\t\t\tstatement.setString(1,current_product.getProduct_name());\t\t\r\n\t\t\t\tstatement.setString(2,current_product.getProduct_company());\r\n\t\t\t\tstatement.setInt(3,0);\r\n\t\t\t\tstatement.setBoolean(4,false);\r\n\t\t\t\tstatement.setString(5, current_product.getProduct_category());\r\n\t\t\t\tstatement.executeUpdate();\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {e.printStackTrace();}\r\n\t\tstatement.close();\t\t\r\n\t}", "public void insertDelivery(Connection conn, String clientName, String clientAddress, String quantity, String totalPrice) {\n\t\tString sql = \"INSERT INTO javadbconnection.delivery(clientName,clientAddress,quantity,totalPrice) Values('\" + clientName + \"',\" + \"'\" + clientAddress + \"', \"+ quantity + \", \"+ totalPrice + \")\";\n\t\ttry {\n\t\tPreparedStatement stmt = conn.prepareStatement(sql);\n\t\tstmt.executeUpdate(sql);\n\t\t}catch (SQLException e) {\n\t\tSystem.err.println(e.getMessage()); \n\t\t\t}\n\t\t}", "int insert(DashboardGoods record);", "int insertSelective(TbProductAttributes record);", "public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "@Override\n\tpublic void insert(ExportProduct exportProduct) {\n\t\t\n\t}", "public void addProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(ShoppingListTable.KEY_TPNB, product.getTPNB());\n values.put(ShoppingListTable.KEY_NAME, product.getName());\n values.put(ShoppingListTable.KEY_DESCRIPTION, product.getDescription());\n values.put(ShoppingListTable.KEY_COST, product.getCost());\n values.put(ShoppingListTable.KEY_QUANTITY, product.getQuantity());\n values.put(ShoppingListTable.KEY_SUPER_DEPARTMENT, product.getSuperDepartment());\n values.put(ShoppingListTable.KEY_DEPARTMENT, product.getDepartment());\n values.put(ShoppingListTable.KEY_IMAGE_URL, product.getImageURL());\n values.put(ShoppingListTable.KEY_CHECKED, product.isChecked());\n values.put(ShoppingListTable.KEY_AMOUNT, product.getAmount());\n values.put(ShoppingListTable.KEY_POSITION, product.getAmount());\n\n db.insert(ShoppingListTable.TABLE_NAME, null, values);\n\n db.close();\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "int insertSelective(MEsShoppingCartDTO record);", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "public void addProduct(Product product) {\n entityManager.persist(product);\n }", "public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }", "int insertSelective(Goods record);", "int insert(SellType record);", "int insertSelective(TbInvCategory record);", "static int Insert(Long productId,BigDecimal productprice, ArrayList<Long> productname){\n\n\t\tint returnVal=1;\n\t\tdxm116130Product newProduct=null;\n\t\tif(productname.size()==0){\n\t\t\tdxm116130Product currProduct=productListOnID.get(productId);\n\t\t\tnewProduct=new dxm116130Product(productId,productprice,currProduct.getProductNames());\n\t\t}else{\n\t\t\tnewProduct=new dxm116130Product(productId,productprice,productname);\n\t\t}\n\t\t\n\t\tif(productListOnID.containsKey(productId)){\n\t\t\t\tDelete(productId.toString());\n\t\t\t\treturnVal=0;\n\t\t}\n\t\t\n\t\tproductListOnID.put(productId,newProduct);\n\t\tInsertNames(newProduct.getProductNames(),newProduct);\n\t\t\n\t\treturn returnVal;\n\t\t\n\t}", "@Override\n\tpublic void insertProduct(ProductVO dto) {\n\n\t}", "int insert(cskaoyan_mall_order_goods record);", "void addCatFood(Long catId, Long foodId);", "@Override\n\tpublic int insert(ProductDTO dto) {\n\t\treturn 0;\n\t}", "public void insert() throws SQLException;" ]
[ "0.71248055", "0.6793478", "0.6579579", "0.6523699", "0.6496463", "0.6493084", "0.6429776", "0.64149165", "0.6390943", "0.63887167", "0.63420486", "0.6331382", "0.6316138", "0.63052255", "0.62836605", "0.62826514", "0.6269748", "0.6258766", "0.6241371", "0.6232328", "0.6209325", "0.62075", "0.62005883", "0.6184759", "0.6177176", "0.6177176", "0.6174363", "0.61725205", "0.61581457", "0.61572087", "0.6156005", "0.61503834", "0.6130811", "0.61301595", "0.6128796", "0.61223316", "0.6095282", "0.6075476", "0.60737723", "0.60604113", "0.6054978", "0.60385966", "0.6037001", "0.6036307", "0.6024044", "0.60195297", "0.6006097", "0.60000193", "0.59955233", "0.59822786", "0.59796214", "0.5978157", "0.5976208", "0.59694004", "0.59667426", "0.5961494", "0.59527826", "0.5939932", "0.59218186", "0.59174037", "0.59135574", "0.5911654", "0.5903771", "0.5897255", "0.5895039", "0.5884269", "0.5878819", "0.5871059", "0.58682185", "0.5866936", "0.5865503", "0.5859628", "0.58574265", "0.5852048", "0.584696", "0.5843596", "0.58316284", "0.58311087", "0.5829939", "0.5826157", "0.5824891", "0.58214486", "0.5804122", "0.5802821", "0.57892543", "0.57886416", "0.5783024", "0.576147", "0.5759744", "0.57579243", "0.5756282", "0.5747791", "0.5735291", "0.57351416", "0.5724107", "0.5724078", "0.5717545", "0.571616", "0.5713968", "0.57034934", "0.5687365" ]
0.0
-1
order of the parameters: quantity, name, description, price, entryDate, category_id
private void setCommonParameters(Product product, PreparedStatement stmt) throws SQLException { // setting the name, first parameter, second parameter and etc. stmt.setInt(1, product.getQuantity()); stmt.setString(2, product.getName()); stmt.setString(3, product.getDescription()); stmt.setDouble(4, product.getPrice()); stmt.setDate(5, Date.valueOf(product.getEntryDate())); stmt.setInt(6, product.getCategoryId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }", "void createItem (String name, String description, double price);", "void add(ProductCategory category);", "Order placeOrder(Set<Item> menu){\n\t\tHashMap<Integer,Item> indexItemMap = new HashMap<Integer,Item>();\n\t\tint indexVal = 1; //initial index for HashMap\n\t\tfor(Item item:menu)\n\t\t{\n\t\t\tItem itemObject = new Item();\n\t\t\titemObject.setItemId(item.getItemId());\n\t\t\titemObject.setItemName(item.getItemName());\n\t\t\titemObject.setItemPrice(item.getItemPrice());\t\t\t\n\t\t\tindexItemMap.put(indexVal,itemObject);\n\t\t\tindexVal++; //incrementing the index to add items to HashMap\n\t\t}\n\t\tint maxIndex = indexVal-1;\n\n\t\t//creating empty list of ItemsOrdered \n\t\tList<ItemsOrdered> itemList = new ArrayList<ItemsOrdered>();\n\t\tScanner itemChoice = new Scanner(System.in);\n\t\tboolean startOrder = true;\n\t\twhile(startOrder)\n\t\t{ // validation of item no. entered by customer\n\t\t\tint index = -1; \n\t\t\twhile(index<0){\n\n\t\t\t\tSystem.out.println(\"Enter Item Id :\");\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t//index = Integer.parseInt(itemChoice.next());\n\t\t\t\t\tindex = itemChoice.nextInt();\n\t\t\t\t\tif(!(index>0&&index<=maxIndex))\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tSystem.out.println(\"Please Enter a valid id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tindex = -1;\n\t\t\t\t\tSystem.out.println(\"Please Enter a valid id\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t // validation of itemQuantity entered by customer\n\t\t\tint currentQuantity = -1;\n\t\t\twhile(currentQuantity<0){\n\n\t\t\t\tSystem.out.println(\"Enter quantity :\");\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t//quantity = Integer.parseInt(itemChoice.next());\n\t\t\t\t\tcurrentQuantity= itemChoice.nextInt();\n\t\t\t\t\tif(!(currentQuantity>0&&currentQuantity<50))\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentQuantity = -1;\n\t\t\t\t\t\tSystem.out.println(\"Please Enter a valid quantity\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tcurrentQuantity = -1;\n\t\t\t\t\tSystem.out.println(\"Please Enter a valid quantity\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//ItemsOrdered ordItem = indexItemMap.get(index);\n\t\t\t//System.out.println(\"Item is \"+ordItem.getItemName());\n \n\t\t\t\n\t\t\t//creating new ItemsOrdered object to store single item at a time from customer\n\t\t\tItemsOrdered itemsOrderedObject = new ItemsOrdered();\n\t\t\n\t\t\titemsOrderedObject.setItem(indexItemMap.get(index)); \n\n\t\t\t\n\t\t\tint previousQuantity=0; //itemQuanity initialized to 0\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"here\");\n\t\t\tfor(ItemsOrdered itemsOrdered: itemList)\n\t\t\t{\n\t\t\t\t//System.out.println(i.getItem().getItemId()+\" : \"+ordItem.getItemId());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(itemsOrdered.getItem().getItemId()==itemsOrderedObject.getItem().getItemId())\n\t\t\t\t{previousQuantity=itemsOrdered.getItemQuantity();\n\t\t\t\titemsOrdered.setItemQuantity(currentQuantity+previousQuantity);\n\t\t\t\t//System.out.println(\"Going here\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n//\t\t\tordItem.setItemQuantity(quantity+quant);\n\t\t\t\n\t\t\tif(previousQuantity==0)\n\t\t\t{\titemsOrderedObject.setItemQuantity(currentQuantity);\n\t\t\titemList.add(itemsOrderedObject);}\n//\t\t\t\n//\t\t\t\tordItem.setItemQuantity(quant+quantity);\n\t\t\t\n\t\t\t\n\n\t\t\tboolean continueOrder = true;\n\t\t\twhile(continueOrder)\n\t\t\t{\n\t\t\tSystem.out.println(\"Do you want to order more? (Y or N)\");\n\t\t\tString orderChoice = itemChoice.next();\n\n\t\t\tif(orderChoice.equalsIgnoreCase(\"y\") | orderChoice.equalsIgnoreCase(\"n\"))\n\t\t\t{\n\t\t\t\tif(!orderChoice.equalsIgnoreCase(\"y\")){\n\t\t\t\t\tstartOrder = false;\n\t\t\t\t\t//Display final list and Confirm order or cancel order\n\t\t\t\t\tSystem.out.println(\"Item Name\\tQuantity\\n\");\n\t\t\t\t\tfor(ItemsOrdered itemsOrdered: itemList){\n\t\t\t\t\t\tSystem.out.println(itemsOrdered.getItem().getItemName()+\"\\t\\t\"+itemsOrdered.getItemQuantity()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tboolean confirm = true;\n\t\t\t\t\twhile(confirm)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Press 'Y' to Confirm Order or 'N' to order again\");\n\t\t\t\t\t\torderChoice = itemChoice.next();\n\t\t\t\t\t\tif(orderChoice.equalsIgnoreCase(\"y\") | orderChoice.equalsIgnoreCase(\"n\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!orderChoice.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstartOrder = true; \n\t\t\t\t\t\t\t\titemList.clear();\n\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\tconfirm = false;\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\tSystem.out.println(\"Please Enter Valid Choice\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\tcontinueOrder= false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Please Enter Valid Input\");\n\t\t\t\t//Test.main(null);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\torder = new Order();\n\t\torder.setItems(itemList);\n\t\t//itemChoice.close();\n\t\treturn order;\n\t}", "public Product executeCRUD(HttpServletRequest request) throws SQLException {\n\t\t\n\t\tProduct product = new Product();\n\t String paramName;\n\t\tString paramValue;\n\t\t\n\t\tEnumeration<String> paramNames = request.getParameterNames();\n\t while(paramNames.hasMoreElements()) { \n\t\t \tparamName = paramNames.nextElement();\n\t\t paramValue = request.getParameter(paramName);\n\t\t switch (paramName) {\n\t\t \n\t\t case \"Id\" :\n\t\t \t product.setId(Integer.parseInt(paramValue));\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Name\" : \n\t\t \t\n\t\t \t if(!Utility.validateInput(paramValue)) {\n\t\t \t\t throw new IllegalArgumentException(\"Name is not a nullable field. Enter product name.\");\n\t\t } else {\n\t\t product.setName(paramValue);\n\t\t }\n \t\t break;\n \t\t \n\t \t case \"Price\" :\n\t \t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t \t throw new IllegalArgumentException(String.format(\"Price is not a nullable field. %s\", PRICE_ERROR)); \n\t \t }\n\t\t \tdouble price;\n\t\t \ttry {\n\t\t \t price = Double.parseDouble(paramValue);\n\t\t \t} catch (java.lang.NumberFormatException e) {\n\t\t \t \tthrow new java.lang.NumberFormatException(String.format(\"Invalid Entry: '%s'. %s\", paramValue, PRICE_ERROR));\n\t\t \t}\n\t\t \t if(!Utility.isPositive(price)) {\n\t\t \t\t throw new IllegalArgumentException(String.format(\"Invalid Entry: '%s'. Price must be positive.\", paramValue));\n\t\t \t} else {\n\t\t \t\tproduct.setPrice(Utility.twoDecimals(price));\n\t\t \t }\n\t\t break;\n\t\t \n\t \t case \"Weight\" :\n\t \t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t\t \t throw new IllegalArgumentException(String.format(\"Weight is not a nullable field. %s\", WEIGHT_ERROR));\n\t\t \t } \n\t \t \tdouble weight;\n\t\t \ttry {\n\t\t \t weight = Double.parseDouble(paramValue);\n\t\t \t } catch (java.lang.NumberFormatException e) {\n\t\t \t\tthrow new java.lang.NumberFormatException(String.format(\"Invalid Input: '%s'. %s\", paramValue, WEIGHT_ERROR));\n\t\t \t}\n\t\t \t if(!Utility.isPositive(weight)) {\n\t\t \t\t throw new IllegalArgumentException(String.format(\"Invalid input: '%s'. Weight must be positive. %s\", paramValue, WEIGHT_ERROR)); \n\t\t } else {\n\t\t product.setWeight(Utility.twoDecimals(weight));\n\t\t } \n\t\t break;\n\t\t \n\t\t case \"Code\" : \n\t\t \t\n\t\t \tif(!Utility.validateInput(paramValue)) {\n\t\t \t \tthrow new IllegalArgumentException(String.format(\"Code is not a nullable field. %s\", CODE_ERROR));\n\t\t \t} else if (!Utility.checkPattern(paramValue, CODE_PATERN)) {\n\t\t \t\tthrow new IllegalArgumentException(String.format(\"Invalid Entry: '%s'. %s\", paramValue, CODE_ERROR)); \n\t\t \t } else if(request.getParameter(\"update\") == null && dao.validateCode(Integer.parseInt(paramValue))) {\n\t\t \t throw new IllegalArgumentException(\"Duplicate code. A product with code '\" + paramValue + \"' already exists in the table. \"\n\t\t \t\t\t\t\t+ \"Check your poduct code and try again with a valid code.\");\n\t\t } else {\n\t\t \t\tproduct.setCode(Integer.parseInt(paramValue));\n\t\t }\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Manufacturer\" : \n\t\t \t\n\t\t \t product.setManufacturer(paramValue);\n\t\t \tbreak;\n\t\t \t\n\t\t case \"MadeIn\" : \n\t\t \t\n\t\t \t product.setMadeIn(paramValue);\n\t\t \tbreak;\n\t\t \t\n\t\t case \"Description\" : \n\t\t \t\n\t\t \tproduct.setDescription(paramValue);\n\t\t \tbreak;\n\t\t }\n\t\t}\n\t return product;\n\t}", "private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }", "public void submitOrder() {\n int price = quantity*5;\n displayPrice(price);\n }", "public void coolOrder() throws IOException{\n System.out.println(\"Enter price: \");\n\n BufferedReader bufferReader = new BufferedReader(new InputStreamReader(System.in));\n int price = Integer.parseInt(bufferReader.readLine());\n\n List<ClothingItem> items = ctrl.coolOrder(price);\n for (ClothingItem item : items) {\n System.out.println(item.toString());\n }\n\n }", "public Food (int id, String name, Seller seller, int price, FoodCategory category)\n {\n this.id=id;\n this.name=name;\n this.seller=seller;\n this.price=price;\n this.category=category;\n }", "private void orderItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "void all_Data_retrieve_Price_Asc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Price asc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t}", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "public void submitOrder(int quantity) {\n display(quantity);\n displayPrice(quantity * pintPrice);\n }", "public void addItems(double a, int b, String c, String d) {\n\t\tprice = a;\r\n\t\tquantity = b;\r\n\t\tname = c;\r\n\t\tpet = d;\r\n\t}", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "public long addProductShoppingList(String name, int quality, double quantity, String unit) {\n long pid = addNewProduct(name);\n Cursor c = null;\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n if (pid == -1) {\n\n String[] args = new String[1];\n args[0] = name;\n c = db.rawQuery(\"SELECT * FROM Products WHERE pname=?\", args);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n pid=c.getInt(c.getColumnIndex(\"_id\"));\n c.moveToNext();\n }\n }\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_PID, (int) pid);\n cv.put(DBHelper.SHOPPINGLIST_QUALITY, quality);\n cv.put(DBHelper.SHOPPINGLIST_QUANTITY, quantity);\n cv.put(DBHelper.SHOPPINGLIST_UNIT, unit);\n\n long _id = db.insert(DBHelper.TABLE_SHOPPINGLIST, null, cv);\n\n if (_id > 0) {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: _id:\" + String.valueOf(_id) + \", pid:\" + String.valueOf(pid) + \", pname:\" + name);\n } else {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: pname:'\" + name + \"', But already in ShoppingList table.\");\n }\n db.close();\n return _id;\n }", "@Override\n public void takeOrder(List<Item> restItem, int constID) {\n\n }", "private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }", "private static void orderItems()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\tboolean checkID = false;\r\n\t\tboolean checkQty = false;\r\n\t\twhile(checkID==false)\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tint id = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list does not contain the id of\r\n\t\t\t\titem ordered, add the ID of the item ordered and the quantity in the order list*/\r\n\t\t\t\tif(id<=menu.size() && id>0 && !orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\torderList.put(id, quantity);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\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/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list contains the id of item \r\n\t\t\t\tordered, retrieve existing quantity, add it up together and store the ID and the updated quantity in the order list*/\r\n\t\t\t\telse if(id<=menu.size() && id>0 && orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tint existingQty = orderList.get(id);\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\tint newQty = existingQty + quantity;\r\n\t\t\t\t\t\t\torderList.put(id, newQty);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\te.printStackTrace();\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\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Please enter a valid menu item!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid integer!\");\r\n\t\t\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public PriorityContractForActListForm() {\n\t\tsetSortBy(\"5 desc,2\");\n\t}", "public MenuItem(String name, String category, String description, double price){\n this.name = name;\n this.category = category;\n this.description = description;\n this.price = price;\n }", "public GroceryItemOrder(String name, int quantity, double pricePerUnit) {\n this.name = name;\n this.quantity = quantity;\n this.ppu = pricePerUnit;\n }", "public static void main(String[] arg) {\n\t\tItem item = null;;\r\n\t\tList<Item> itemList = new ArrayList<Item>();\r\n\t\t\r\n\t\titem = new Item(GlobalConstants.ULT_SMALL,1,new BigDecimal(24.90),\"\");\t\t\r\n\t\titemList.add(item);\t\t\r\n\t\titem = new Item(GlobalConstants.ULT_MEDIUM,2,new BigDecimal(29.90),\"\");\t\t\t\r\n\t\titemList.add(item);\t\r\n \t\titem = new Item(GlobalConstants.ULT_LARGE,3,new BigDecimal(44.90),\"\");\t\t\t\t\r\n\t\titemList.add(item);\r\n\t\titem = new Item(GlobalConstants.ONE_GB,1,new BigDecimal(9.90),\"\");\t\t\t\t\t\r\n\t\titemList.add(item);\r\n\t\t\r\n\t\tShoppingCartService cartService = new ShoppingCartService(itemList);\r\n\t\tcartService.processOrder();\r\n\t\tcartService.displayCart();\r\n\t\t \r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n txtName = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n CancelButton = new javax.swing.JButton();\n txtCategory = new javax.swing.JComboBox<>();\n jLabel7 = new javax.swing.JLabel();\n txtID = new javax.swing.JFormattedTextField();\n txtPrice = new javax.swing.JFormattedTextField();\n txtQuantity = new javax.swing.JFormattedTextField();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtDescription = new javax.swing.JTextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Product ID:\");\n\n jLabel2.setText(\"Name:\");\n\n jLabel3.setText(\"Description:\");\n\n jLabel4.setText(\"Category:\");\n\n jLabel5.setText(\"Price:\");\n\n jLabel6.setText(\"Quanitity in Stock:\");\n\n saveButton.setText(\"Save\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n CancelButton.setText(\"Cancel\");\n CancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CancelButtonActionPerformed(evt);\n }\n });\n\n txtCategory.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel7.setText(\"Product Editor\");\n\n txtDescription.setColumns(20);\n txtDescription.setRows(5);\n jScrollPane2.setViewportView(txtDescription);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jLabel2)\n .addComponent(jLabel1)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel3))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(62, 62, 62)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 421, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(txtName)\n .addComponent(txtCategory, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtID)\n .addComponent(txtPrice)\n .addComponent(txtQuantity))\n .addContainerGap())))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(saveButton, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)\n .addGap(55, 55, 55)\n .addComponent(CancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)\n .addGap(70, 70, 70))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtCategory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(txtQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(saveButton)\n .addComponent(CancelButton)))\n );\n\n pack();\n }", "private void appendCategoryParams(String categoryName, HttpUrl.Builder urlBuilder) {\n urlBuilder.addQueryParameter(\"generator\", \"categorymembers\")\n .addQueryParameter(\"gcmtype\", \"file\")\n .addQueryParameter(\"gcmtitle\", categoryName)\n .addQueryParameter(\"gcmsort\", \"timestamp\")//property to sort by;timestamp\n .addQueryParameter(\"gcmdir\", \"desc\")//in which direction to sort;descending\n .addQueryParameter(\"gcmlimit\", \"10\");\n }", "public void processRequest(String itemName, double itemPrice, Long orderId) {\n Item item = new Item(itemName, itemPrice);\n\n itemRepository.save(item);\n\n// System.out.println(item.toString());\n processQueue(item);\n }", "@Override\n protected Representation put(Representation entity) throws ResourceException {\n\n int itemId = Integer.parseInt(getAttribute(\"id\"));\n Form form = new Form(entity);\n System.err.println(form);\n //categories\n ArrayList<String> newCategories = new ArrayList<>();\n for (int i=0; i<form.size() ; i++){\n if(form.get(i).getName().contains(\"categories\")){\n System.err.println(form.get(i).getValue());\n newCategories.add(form.get(i).getValue());\n }\n }\n //check the values\n if ( form.getFirstValue(\"userId\") == null || form.getFirstValue(\"userId\").isEmpty()\n ||form.getFirstValue(\"name\") == null || form.getFirstValue(\"name\").equals(\"\")\n ||newCategories.isEmpty()\n ||form.getFirstValue(\"location\") == null || form.getFirstValue(\"location\").equals(\"\")\n ||form.getFirstValue(\"country\") == null || form.getFirstValue(\"country\").equals(\"\")\n ||form.getFirstValue(\"first_bid\") == null\n ||form.getFirstValue(\"end\") == null || form.getFirstValue(\"end\").equals(\"\")\n ||form.getFirstValue(\"description\") == null || form.getFirstValue(\"description\").equals(\"\")\n ){\n System.err.println(form);\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, \"missing or empty parameters\");\n }\n\n //extract the values\n long userId = Long.parseLong(form.getFirstValue(\"userId\"));\n String name = form.getFirstValue(\"name\");\n Float buyPrice;\n if(!(form.getFirstValue(\"buy_price\") == null || form.getFirstValue(\"buy_price\").isEmpty()))\n buyPrice = Float.parseFloat(form.getFirstValue(\"buy_price\"));\n else\n buyPrice = null;\n float firstBid = Float.parseFloat(form.getFirstValue(\"first_bid\"));\n String location = form.getFirstValue(\"location\");\n Double latitude = null;\n Double longitude = null;\n String country = form.getFirstValue(\"country\");\n DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n String end = LocalDateTime.parse(form.getFirstValue(\"end\")).format(myFormatObj).toString();//end time\n String description = form.getFirstValue(\"description\");\n\n if(form.getFirstValue(\"latitude\") == null || form.getFirstValue(\"latitude\").equals(\"\")\n ||form.getFirstValue(\"longitude\") == null || form.getFirstValue(\"longitude\").equals(\"\")){\n System.err.println(\"coordinates are not given.\");\n }\n else{\n latitude = Double.parseDouble(form.getFirstValue(\"latitude\"));\n longitude = Double.parseDouble(form.getFirstValue(\"longitude\"));\n }\n\n Item item;\n\n try{\n Optional<Item> itemOptional = itemDAO.getItemById(itemId);\n if(!itemOptional.isPresent()){\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, \"Item does not exist\");\n }\n item = itemOptional.get();\n if(!item.isRunning()){\n throw new ResourceException(Status.CLIENT_ERROR_EXPECTATION_FAILED, \"Auction is closed\");\n }\n if(item.getNumberOfBids()>0){\n throw new ResourceException(Status.CLIENT_ERROR_EXPECTATION_FAILED, \"Auction has bids and cannot be edited\");\n }\n\n item.setName(name);\n item.setBuyPrice(buyPrice);\n item.setFirstBid(firstBid);\n item.setCurrentBid(firstBid);\n item.setLocationName(location);\n item.setLatitude(latitude);\n item.setLongitude(longitude);\n item.setCountry(country);\n item.setEnd(end);\n item.setDescription(description);\n\n itemDAO.updateItem(item);\n\n List<String> oldCategories = item.getCategories();\n for (String c: oldCategories) {\n if(!newCategories.contains(c)){\n itemDAO.removeCategoryFromItem(item, c);\n }\n }\n for (String c: newCategories) {\n if(!oldCategories.contains(c)){\n itemDAO.addCategoryToItem(item, c);\n }\n }\n item.setCategories(newCategories);\n }\n catch (DataAccessException e){\n throw new ResourceException(Status.SERVER_ERROR_INTERNAL, \"item update in database failed\");\n }\n\n Map<String,Object> map = new HashMap<>();\n map.put(\"item\", item);\n\n return new JsonMapRepresentation(map);\n }", "public void addOrder(HashMap<Integer, Integer> orders, int manager_id, int orderMethod, Object userObject) {\n HashMap<Integer, Product> products = new HashMap<Integer, Product>();\n double order_totalprice = 0;\n double order_price = 0;\n try {\n DBConnect connectionTester = new DBConnect();\n connectionTester.testConnection();\n\n for (int product_id : orders.keySet()) {\n\n String sql = \"select * from product where idproduct = ?\";\n PreparedStatement prpStmt = connectionTester.connection.prepareStatement(sql);\n prpStmt.setInt(1, product_id);\n\n // Not only is information requested, information like the total price is also processed\n ResultSet result = prpStmt.executeQuery();\n while (result.next()) {\n int id_product = result.getInt(\"idproduct\");\n String product_name = result.getString(\"product_name\");\n double price = result.getDouble(\"price\");\n int in_stock = result.getInt(\"in_stock\");\n String amount = result.getString(\"amount\");\n int ordered_amount = orders.get(product_id);\n if (orderMethod == 2 || orderMethod == 3) {\n order_price = result.getDouble(\"price\") * ordered_amount;\n } else if (orderMethod == 1) {\n order_price = result.getDouble(\"price\") * ordered_amount - 0.10;\n }\n\n // Calling the builder to store the information in a class\n products.put(id_product, new Product.Builder(id_product)\n .productName(product_name)\n .productPrice(price)\n .productInStock(in_stock)\n .productAmount(amount)\n .productOrderedAmount(ordered_amount)\n .productOrderPrice(order_price)\n .build());\n order_totalprice = order_totalprice + order_price;\n }\n }\n\n } catch (SQLException err) {\n System.out.println(err.getMessage());\n }\n\n reviewOrder(products, order_totalprice, manager_id, orderMethod, userObject);\n }", "@Override\n public void onClick(View view) {\n\n addItem();\n recyclerAdapterHeader.swap(rowsCalculated(dataCategories));\n //all really bad practices, bound to be bugs\n }", "OrderedProduct(int quantity, String prodCode, String prodName, int prodSize, String prodVariety,\n double prodPrice) {\n this.quantity = quantity;\n this.prodCode = prodCode;\n this.prodName = prodName;\n this.prodSize = prodSize;\n this.prodVariety = prodVariety;\n this.prodPrice = prodPrice;\n }", "public void addFurniture() throws InvalidOrderException{\n try{\n String category = getRequestType().toLowerCase();\n int amount = getRequestNum();\n boolean invalid = true;\n // check that the furniture order is one of the four valid types with a valid corresponding category\n switch(getFurnitureRequest().toLowerCase()){\n case \"chair\":\n if(category.equals(\"kneeling\") || category.equals(\"task\") || category.equals(\"mesh\")\n || category.equals(\"executive\") || category.equals(\"ergonomic\")){\n invalid = false;\n break;\n }\n case \"desk\":\n if(category.equals(\"standing\") || category.equals(\"adjustable\") || category.equals(\"traditional\")){\n invalid = false;\n break;\n }\n case \"lamp\":\n if(category.equals(\"desk\") || category.equals(\"study\") || category.equals(\"swing arm\")){\n invalid = false;\n }\n break;\n case \"filing\":\n if(category.equals(\"small\") || category.equals(\"medium\") || category.equals(\"large\")){\n invalid = false;\n }\n break;\n }\n // check the amount order is greater than zero\n if(amount <= 0){\n invalid = true;\n }\n if(invalid){\n throw new InvalidOrderException();\n }\n\n Statement myStmt = dbConnect.createStatement();\n results = myStmt.executeQuery(\"SELECT * FROM \" + furnitureRequest + \" WHERE type = '\" + requestType + \"'\");\n // add all of same type of furniture request found in the database to a list\n while (results.next()){\n if(getFurnitureRequest().equalsIgnoreCase(\"Chair\")){\n foundFurniture.add(new Chair(results.getString(\"ID\"), results.getString(\"Type\"), results.getString(\"Legs\"),\n results.getString(\"Arms\"), results.getString(\"Seat\"), results.getString(\"Cushion\"), results.getInt(\"Price\")));\n continue;\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Desk\")){\n foundFurniture.add(new Desk(results.getString(\"ID\"), results.getString(\"Type\"), results.getString(\"Legs\"),\n results.getString(\"Top\"), results.getString(\"Drawer\"), results.getInt(\"Price\")));\n continue;\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Lamp\")){\n foundFurniture.add(new Lamp(results.getString(\"ID\"), results.getString(\"Type\"), results.getString(\"Base\"),\n results.getString(\"Bulb\"), results.getInt(\"Price\")));\n continue;\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Filing\")){\n foundFurniture.add(new Filing(results.getString(\"ID\"), results.getString(\"Type\"), results.getString(\"Rails\"),\n results.getString(\"Drawers\"), results.getString(\"Cabinet\"), results.getInt(\"Price\")));\n continue;\n }\n }\n myStmt.close();\n } catch(SQLException ex) {\n ex.printStackTrace();\n }\n }", "public static void main(final String[] args) {\n PriorityQueue<Map.Entry<String, Integer>> storage =\n new PriorityQueue<>(1, new DescendingByPriority());\n PriorityQueue<Map.Entry<String, Integer>> filledStorage =\n new PriorityQueue<>(1, new DescendingByPriority());\n AtStore Store = new AtStore();\n AtHome Home = new AtHome();\n\n // TODO ask the user if they want to add or remove products to the list (Home or sto\n filledStorage = Home.fillQueue(storage);\n\n while (filledStorage.size() >= 1) {\n Store.remove(filledStorage);\n }\n\n // Store.printReceipt();\n\n // TODO add an option to run without a price field\n\n // IF ADD\n // TODO create a prioritized queue that will act as the main data structure\n\n // TODO create a hashmap that can hold the value of each items\n // TODO when adding items to the prioritized queue ask for the priority and add to the queue\n // then ask the price and add the value to the hashmap\n // TODO ask user if they have a next item to add\n\n // TODO ask user if they want to add or remove products to the list\n // IF REMOVE\n // TODO state how many objects are in the Queue\n // TODO peek(?) the first object and get the price from the hashmap\n // TODO ask the user if they want to purchase this item at this price this trip\n // IF YES\n // TODO add the price from the hashmap to the total for this trip\n // TODO remove the item from the queue (should be done with the poll method)\n // TODO peek (?) the next item and repeat from line 19\n // IF NO\n // TODO leave item in the queue and move onto the next item? (would break abstraction)\n\n // TODO ask user if they have all the items they need (IF items still in list)\n // TODO print you are buing XX items for YY dollars\n\n // TODO loop back to line 8\n\n }", "Items(int quantidade,String nome,double preco){\n\t\tthis.qntd=quantidade;\n\t\tthis.produto = new Produto(nome,preco);\n\t}", "SortedSet<Recipe> findRecipesByCategory(MealCategory category) throws ServiceFailureException;", "public void addCertainRow(String bookname, String ISBN, String author, String description,\n String quantity, String publisher, String category)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO material (bookname, ISBN, author, description, quantity, publisher, category) VALUES(\"\n +quotate(bookname)+\",\"\n +quotate(ISBN)+\",\"\n +quotate(author)+\",\"\n +quotate(publisher)+\",\"\n +quotate(quantity)+\",\"\n +quotate(publisher)+\",\"\n +quotate(category)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }", "public HashMap<Long, Integer> getProductsToBeOrdered(int totalEntries) {\n HashMap<Long, Integer> listOfProducts = new HashMap<>();\n for (int i = 0; i < totalEntries; i++) {\n listOfProducts.put((long) getRandomNumber(0, 9999), getRandomNumber(1, 10));\n }\n return listOfProducts;\n }", "public static void main(String[] args) {\n\t\tProduct product1 =new Product(1,\"lenovo V14\",15000,\"16 GB Ram\",10);\n\t\t\n\t\tProduct product2 =new Product();\n\t\tproduct2.setId(2);\n\t\tproduct2.setName(\"Lenovo V15\");\n\t\tproduct2.setDetail(\"16 GB\");\n\t\tproduct2.setDiscount(10);\n\t\tproduct2.setUnitPrice(16000);\n\t\t\n\t\t\n\t\tProduct product3 =new Product();\n\t\tproduct3.setId(3);\n\t\tproduct3.setName(\"Lenovo V16\");\n\t\tproduct3.setDetail(\"32 GB\");\n\t\tproduct3.setDiscount(10);\n\t\tproduct3.setUnitPrice(19000);\n\n\t\tProduct[] products = {product1, product2, product3};\n\t\t\n\t\tfor (Product product : products) {\n\t\t\t\tSystem.out.println(product.getName());\n\t\t\t\tSystem.out.println(product.getUnitPriceAfterDiscount());\n\t\t\t}\n\t\t \n\t\tSystem.out.println(products.length);\n\t\t\n\t\tCategory category1 = new Category(1,\"Bilgisayar\");\n\t\tCategory category2 = new Category();\n\t\tcategory2.setId(2);\n\t\tcategory2.setName(\"yemek\");\n\t\t\n\t\tCategory[] categories = {category1,category2};\n\t\tfor (Category category : categories) {\n\t\t\tSystem.out.println(category.getName());\n\t\t\tSystem.out.println(category.getName());\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(category1.getName());\n\t\tSystem.out.println(category2.getName());\n\t\t\n\t\tProductManager productManager = new ProductManager();\n\t\tproductManager.addToCart(product1);\n\t\tproductManager.addToCart(product2);\n\t\tproductManager.addToCart(product3);\n\t}", "Item(String idIn, String nameIn, String retailIn, String qIn) {\r\n id = idIn;\r\n name = nameIn;\r\n retail = Double.parseDouble(retailIn);\r\n quantity = Integer.parseInt(qIn);\r\n /* Wartość zmiennej price zależąca od tego ile obecnie produktów jest w \r\n magazynie i jaki % zmiennej retail się wtedy przyjmuje */\r\n if (quantity > 400)\r\n price = retail * .5D;\r\n else if (quantity > 200)\r\n price = retail * .6D;\r\n else \r\n price = retail * .7D;\r\n /* Zaokrąglenie wartości price na dwa miejsca po przecinku (do najbliżej \r\n niższej liczby całkowitej */\r\n price = Math.floor( price * 100 + 0.5) / 100;\r\n }", "public HistoryEntryInventory(String itemName, Integer amount) {\n timestamp = new Date(); //Current time\n this.itemName = itemName;\n this.amount = amount;\n }", "public void addEntry(String itemName, double itemPrice, boolean addToCart, double itemQuantity) {\n ItemEntry entry = new ItemEntry(itemName, itemPrice, addToCart, itemQuantity);\n itemList.add(entry);\n }", "public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}", "private void addProductApi() throws JSONException {\n\n JSONObject header = new JSONObject();\n JSONObject params = new JSONObject();\n params.put(\"uuid\", AppCustomPreferenceClass.readString(Sell_Buy_Practice_Activity.this, AppCustomPreferenceClass.UserId, \"\"));\n params.put(\"category_id\", \"2\");\n params.put(\"practice_category\", categoryId);\n\n\n if (Category_name.equalsIgnoreCase(\"Others\")) {\n\n params.put(\"speciality\", \"others_speciality\");\n params.put(\"others_speciality_name\", edit_others.getText().toString());\n } else {\n params.put(\"speciality\", medicalSplId);\n params.put(\"others_speciality_name\", \"\");\n }\n if (Type.equalsIgnoreCase(\"Others\")) {\n params.put(\"practice_type\", \"others_practice\");\n params.put(\"others_practice_name\", edit_others_type.getText().toString());\n } else {\n params.put(\"practice_type\", prac_Id);\n params.put(\"others_practice_name\", \"\");\n }\n //params.put(\"practice_category\", categoryId);\n params.put(\"quantity\", edit_qty.getText().toString());\n if (AddressStr.equalsIgnoreCase(\"\")) {\n params.put(\"city\", city_id);\n params.put(\"country\", country_id);\n params.put(\"state\", state_id);\n\n// params.put(\"city\", \"\");\n// params.put(\"country\", \"\");\n// params.put(\"state\", \"\");\n params.put(\"address\", edit_street.getText().toString());\n } else {\n geoLocate();\n params.put(\"address\", AddressStr);\n params.put(\"city\", city_id);\n params.put(\"country\", country_id);\n params.put(\"state\", state_id);\n }\n params.put(\"contact_phone\", edit_contact_ph.getText().toString());\n params.put(\"contact_email\", edit_cont_email.getText().toString());\n params.put(\"house_street\", edit_street.getText().toString());\n params.put(\"practice_name\", edit_name.getText().toString());\n params.put(\"rooms\", edit_rooms.getText().toString());\n params.put(\"specific_locality\", edit_loc.getText().toString());\n params.put(\"practice_city_name\", \"\");\n params.put(\"land_length\", area_length.getText().toString());\n params.put(\"land_width\", area_width.getText().toString());\n params.put(\"total_area\", edit_tot_area.getText().toString());\n params.put(\"build_up_area\", edit_built_up_area.getText().toString() + \" \" + \"square\" + FeetTyp);\n params.put(\"price\", edit_price.getText().toString());\n params.put(\"description\", ed_status.getText().toString());\n //params.put(\"product_image\", profile_image);\n\n if (multipleImagesAl.size() == 0)\n params.put(\"product_image\", \"\");\n else\n params.put(\"product_image\", multipleImagesAl.toString().substring(1, multipleImagesAl.toString().length() - 1).replace(\" \", \"\"));\n\n params.put(\"latitude\", addressLat);\n params.put(\"longitude\", addressLog);\n\n\n header.put(\"Cynapse\", params);\n\n new AddPracticeProductApi(Sell_Buy_Practice_Activity.this, header) {\n @Override\n public void responseApi(JSONObject response) {\n super.responseApi(response);\n\n try {\n JSONObject header = response.getJSONObject(\"Cynapse\");\n String res_msg = header.getString(\"res_msg\");\n String res_code = header.getString(\"res_code\");\n\n if (res_code.equals(\"1\")) {\n final Dialog dialog = new Dialog(Sell_Buy_Practice_Activity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_msg_alert);\n //TODO: used to make the background transparent\n Window window = dialog.getWindow();\n window.setLayout(AbsListView.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.MATCH_PARENT);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n //TODO : initializing different views for the dialog\n TextView title = dialog.findViewById(R.id.title);\n TextView msg = dialog.findViewById(R.id.msg);\n ImageView close = dialog.findViewById(R.id.close);\n Button btnGotIt = dialog.findViewById(R.id.btnGotIt);\n //TODO :setting different views\n// title.setText(R.string.congrats);\n// msg.setText(R.string.publishedSuccessfully);\n title.setText(R.string.sent);\n\n if (categoryId.equalsIgnoreCase(\"1\")) {\n msg.setText(R.string.buy_req);\n } else if (categoryId.equalsIgnoreCase(\"2\")) {\n msg.setText(R.string.sell_req);\n\n } else {\n msg.setText(R.string.lease_req);\n }\n //msg.setText(R.string.request_sent);\n dialog.show();\n //TODO : dismiss the on btn click and close click\n btnGotIt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n //TODO : finishing the activity\n finish();\n }\n });\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n finish();\n }\n });\n// MyToast.toastLong(Sell_Buy_Practice_Activity.this, res_msg);\n// finish();\n } else {\n MyToast.toastLong(Sell_Buy_Practice_Activity.this, res_msg);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void errorApi(VolleyError error) {\n super.errorApi(error);\n }\n };\n }", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "protected Item(double amount, Category category, LocalDate date, String note) {\n this.amount = amount;\n setCategory(category);\n this.date = date;\n this.note = note;\n }", "protected ArrayList<Product> addProduct() {\r\n int productType;\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.print(\"\\n(1: Giyim)\\n\"+ \"(2: Gıda&Beslenme)\\n\" +\"(3: Kozmetik)\\n\");\r\n System.out.print(\"Lutfen urun tipini seciniz :\\n\");\r\n\r\n productType =scanner.nextInt();\r\n while (productType != 1 && productType != 2 && productType != 3 ) {\r\n\r\n System.out.println(\"Yanlis urun tipi secimi !\\nLutfen tekrar deneyiniz : \");\r\n productType =scanner.nextInt();\r\n }\r\n scanner.nextLine();\r\n\r\n String name, size, gender, tag, content;\r\n double price;\r\n int numberOfProduct;\r\n if(productType == 1){\r\n\r\n System.out.print(\"Urun adini giriniz --> \");\r\n name = scanner.nextLine();\r\n System.out.print(\"Urun fiyatini giriniz --> \");\r\n price = scanner.nextDouble();\r\n scanner.nextLine();\r\n System.out.print(\"Urun bedenini giriniz --> \");\r\n size = scanner.nextLine();\r\n System.out.print(\"Urun cinsiyetini giriniz --> \");\r\n gender = scanner.nextLine();\r\n System.out.print(\"Urun etiketini giriniz --> \");\r\n tag = scanner.nextLine();\r\n\r\n while (splitSize(tag) !=4){\r\n System.out.println(\"Eksik etiket inputu girdiniz, 4 etiket inputu giriniz\");\r\n tag = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun icerigini giriniz --> \");\r\n content = scanner.nextLine();\r\n while (splitSize(content) !=4) {\r\n System.out.println(\"Eksik icerik inputu girdiniz, 4 icerik inputu giriniz\");\r\n content = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun sayisini giriniz --> \");\r\n numberOfProduct = scanner.nextInt();\r\n\r\n Clothes clothes = new Clothes(name, price, size, gender, tag, content, numberOfProduct);\r\n\r\n ClothesList.add(clothes);\r\n allProducts.add(allProducts.size(),clothes);\r\n }\r\n else if(productType == 2){\r\n\r\n System.out.print(\"Urun adini giriniz --> \");\r\n name = scanner.nextLine();\r\n System.out.print(\"Urun fiyatini giriniz --> \");\r\n price = scanner.nextDouble();\r\n scanner.nextLine();\r\n System.out.print(\"Urun etiketini giriniz --> \");\r\n tag = scanner.nextLine();\r\n while (splitSize(tag) !=4){\r\n System.out.println(\"Eksik etiket inputu girdiniz, 4 etiket inputu giriniz\");\r\n tag = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun icerigini giriniz --> \");\r\n content = scanner.nextLine();\r\n while (splitSize(content) !=4){\r\n System.out.println(\"Eksik icerik inputu girdiniz, 4 icerik inputu giriniz\");\r\n content = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun sayisini giriniz --> \");\r\n numberOfProduct = scanner.nextInt();\r\n\r\n Nutrient nutrient = new Nutrient(name, price,tag,content, numberOfProduct);\r\n NutrientList.add(nutrient);\r\n allProducts.add(allProducts.size(),nutrient);\r\n }\r\n else if(productType == 3){\r\n\r\n System.out.print(\"Urun adini giriniz --> \");\r\n name = scanner.nextLine();\r\n System.out.print(\"Urun fiyatini giriniz --> \");\r\n price = scanner.nextDouble();\r\n scanner.nextLine();\r\n System.out.print(\"Urun cinsiyetini giriniz --> \");\r\n gender = scanner.nextLine();\r\n System.out.print(\"Urun etiketini giriniz --> \");\r\n tag = scanner.nextLine();\r\n while (splitSize(tag) !=4){\r\n System.out.println(\"Eksik etiket inputu girdiniz, 4 etiket inputu giriniz\");\r\n tag = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun icerigini giriniz --> \");\r\n content = scanner.nextLine();\r\n while (splitSize(content) !=4){\r\n System.out.println(\"Eksik icerik inputu girdiniz, 4 icerik inputu giriniz\");\r\n content = scanner.nextLine();\r\n }\r\n\r\n System.out.print(\"Urun sayisini giriniz --> \");\r\n numberOfProduct = scanner.nextInt();\r\n\r\n Cosmetics cosmetics = new Cosmetics(name, price,gender,tag, content, numberOfProduct);\r\n CosmeticsList.add(cosmetics);\r\n allProducts.add(allProducts.size(),cosmetics);\r\n }\r\n writeToCsv();\r\n return allProducts;\r\n }", "public static JSONObject categoryItemList(Integer categoryId) throws JSONException{\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\tJSONObject jsonObjectCategory = new JSONObject();\n\t\tJSONArray jsonArrayItems = new JSONArray();\n\t\ttry{\n\t\t\t/*String sqlCategory = \"select category_name,category_banner from food_category where category_id=?\";*/\n\t\t\tString sqlItemList = \"select fi.item_id,\"\n\t\t\t\t\t+\" fi.item_name,\"\n\t\t\t\t\t+\" \tfi.item_image,\"\n\t\t\t\t\t+\" fi.item_image_ws\"\n\t\t\t\t\t+\" \tfrom food_items fi,\"\n\t\t\t\t\t+\" \tfood_category fc\"\n\t\t\t\t\t+\" \twhere fc.category_id = fi.category_id AND \"\n\t\t\t\t\t+\"\tfi.category_id = ?\";\n\t\t\t/*SQlCategory:{\n\t\t\t \ttry {\t\n\t\t\t\t \t\tconnection = DBConnection.createConnection();\n\n\t\t\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlCategory);\n\t\t\t\t\t\t\tpreparedStatement.setInt(1, categoryId);\n\t\t\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\t\t\t\tjsonObjectCategory.put(\"category_name\",resultSet.getString(\"category_name\"));\n\t\t\t\t\t\t\t\tjsonObjectCategory.put(\"category_banner\",resultSet.getString(\"category_banner\"));\n\t\t\t\t\t\t\t}\n\t\t\t \t}catch(Exception e){\n\t\t\t \t\tSystem.out.println(e);\n\t\t\t \t}\n \t}*/\n\n\t\t\tSQlItems:{\n\t\t\t\ttry {\t\n\t\t\t\t\tconnection = DBConnection.createConnection();\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlItemList);\n\t\t\t\t\tpreparedStatement.setInt(1, categoryId);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\t\tJSONObject subitemJsonObject = new JSONObject();\n\t\t\t\t\t\tsubitemJsonObject.put(\"id\",resultSet.getString(\"item_id\"));\n\t\t\t\t\t\tsubitemJsonObject.put(\"name\",resultSet.getString(\"item_name\"));\n\t\t\t\t\t\tsubitemJsonObject.put(\"image\",resultSet.getString(\"item_image\"));\n\t\t\t\t\t\t//subitemJsonObject.put(\"image\",resultSet.getBytes(\"item_image_ws\"));\n\t\t\t\t\t\tjsonArrayItems.put(subitemJsonObject);\n\t\t\t\t\t}\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}finally{\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\t\tjsonObjectCategory.put(\"item_list\", jsonArrayItems);\t\n\t\treturn jsonObjectCategory;\n\n\t}", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public void setQuantity(String quantity) {\n this.quantity = quantity;\n }", "private String createOrderSummary(int price,boolean addWhippedCream,boolean addChocolate,String name){\n String priceMessage=\"Name :\"+name;\n priceMessage+=\"\\nadd whipped cream ? \"+addWhippedCream;\n priceMessage+=\"\\nadd chocolate ? \"+addChocolate;\n priceMessage+=\"\\nQuantity \"+quantity;\n priceMessage+=\"\\nTotal :$ \"+price;\n priceMessage+=\"\\nThank you!\";\n return priceMessage;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "private void totalQuantityInventory(String drugName, String expireDate) {\r\n\r\n\t\tPreparedStatement ps = null, ps2 = null;\r\n\t\tResultSet rs = null, rs2 = null;\r\n\t\tint qttyDemandedTotal2 = 0;\r\n\t\tString qry = \"Select quantity, batchNo, voucherNo, Re_Order_Qtty,category From drug_inventory where expiryDate=? and\"\r\n\t\t\t\t+ \" description=?\";\r\n\r\n\t\tString qry2 = \"SELECT SUM(quantityDemanded) as quantitd from counterdrugordertable \"\r\n\t\t\t\t+ \"where expiryDate=? AND drugNameOrder =?\";\r\n\r\n\t\ttry {\r\n\r\n\t\t\ttry {\r\n\t\t\t\tps = St_MaryConnection.getConnection().prepareStatement(qry);\r\n\t\t\t\tps.setString(1, expireDate);\r\n\t\t\t\tps.setString(2, drugName);\r\n\r\n\t\t\t\t//\r\n\t\t\t\tps2 = St_MaryConnection.getConnection().prepareStatement(qry2);\r\n\t\t\t\tps2.setString(1, expireDate);\r\n\t\t\t\tps2.setString(2, drugName);\r\n\t\t\t\trs2 = ps2.executeQuery();\r\n\r\n\t\t\t\twhile (rs2.next()) {\r\n\t\t\t\t\tqttyDemandedTotal2 = rs2.getInt(\"quantitd\");\r\n\t\t\t\t\tSystem.out.println(qttyDemandedTotal2);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (SQLException exc) {\r\n\t\t\t\tSystem.out.println(\"getting the remaining qtty from inventory table error\\n\" + exc);\r\n\t\t\t}\r\n\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tString batchNo = rs.getString(\"batchNo\");\r\n\t\t\t\tString voucherNo = rs.getString(\"voucherNo\");\r\n\t\t\t\tint qttyReamaining = rs.getInt(\"quantity\");\r\n\t\t\t\tString reOrderQ = rs.getString(\"Re_Order_Qtty\");\r\n\t\t\t\tString category = rs.getString(\"category\");\r\n\r\n\t\t\t\tinputLabel[2].setText(\"Re-Order Quantity:____________ \" + reOrderQ+\"____\");\r\n\t\t\t\tinputLabel[3].setText(\"Unit Of Issue:____________\" + category+\"____\");\r\n\r\n\t\t\t\tmodel2.addRow(new String[] { \"\" + (qttyDemandedTotal2 + qttyReamaining), \"\" + qttyReamaining, voucherNo,\r\n\t\t\t\t\t\tbatchNo });\r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException exc) {\r\n\t\t\tSystem.out.println(\"getting the remaining qtty from inventory table error\\n\" + exc);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "private static String constructValues(productCategory product,ArrayList<String> attributes,String partNumber)\n {\n //Since we will already have INSERT INTO *Category* we can start with the '('\n\n /* STMT: INSERT INTO *Category* */\n StringBuilder val = new StringBuilder(\" (\");\n\n /* STMT: INSERT INTO *Category* ( */\n\n val.append(product.categoryName.getValue());\n if(attributes.size() > 0)\n {\n val.append(\"_Part_Number,\");\n }\n else\n {\n val.append(\"_Part_Number\");\n }\n\n //the attributes array holds the names of\n //each column in the specified category table\n //here we add them all to the string in the\n //proper format\n for(int i=0; i<attributes.size(); i++)\n {\n attributes.set(i,attributes.get(i).replace(\" \",\"_\"));\n val.append(attributes.get(i));\n //If we are at the last attribute we\n //don't need to add the extra comma\n if(i != attributes.size()-1)\n {\n val.append(\",\");\n }\n\n }\n\n /* STMT: INSERT INTO *Category* (*All columns in table* */\n\n //Close the columns and start values\n val.append(\") VALUES ('\");\n\n /* STMT: INSERT INTO *Category* (*All columns in table*) VALUES (' */\n\n //Since attributes does not contain the part\n //number we have to add that separately\n val.append(partNumber);\n\n /* STMT: INSERT INTO *Category* (*All columns in table*) VALUES ('*PartNumber* */\n\n //It is possible that a product category can\n //have no attributes except the part number.\n //if this is the case make sure we don't add\n //the extra comma in the statement\n if(!attributes.isEmpty())\n {\n val.append(\"',\");\n }\n else\n {\n val.append(\"'\");\n }\n\n /* STMT: INSERT INTO *Category* (*All columns in table*) VALUES ('*PartNumber*', */\n\n\n //Now we can get the actual values for each column\n //by pulling the values from the productCategory\n //'product' object's 'attributes' array\n for(int i=0; i<product.attributes.size(); i++)\n {\n val.append(\"'\");\n val.append(product.attributes.get(i));\n //If we are at the last value make sure\n //we don't add the extra comma\n if(i != product.attributes.size()-1)\n {\n val.append(\"',\");\n }\n else\n {\n val.append(\"'\");\n }\n }\n\n /* STMT: INSERT INTO *Category* (*All columns in table*) VALUES ('*PartNumber*,'*All Values*' */\n\n //finally we close the statement\n val.append(\");\");\n\n /* STMT: INSERT INTO *Category* (*All columns in table*) VALUES ('*PartNumber*,'*All Values*'); */\n\n return val.toString();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(queryporder.querySum(0, 60));\n\t\tSystem.out.println(queryporder.queryName(\"郭靖\"));\n\t\tSystem.out.println(queryporder.queryAll());\n\t\t\n\t\t//List l = queryporder.queryAll();\n\t\t//List l = queryporder.querySum(0, 60);\n\t\tList l = queryporder.queryName(\"郭靖\");\n\t\tfor(Object o : l) {\n\t\t\tporder p = (porder)o;\n\t\t\tSystem.out.println(\n\t\t\t\tp.getId()+\",\"+\n\t\t\t\tp.getName()+\",\"+\n\t\t\t\tp.getProduct1()+\",\"+\n\t\t\t\tp.getProduct2()+\",\"+\n\t\t\t\tp.getProduct3()+\",\"+\n\t\t\t\tp.getSum()+\",\"+\n\t\t\t\tp.getDiscount()\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t}", "void all_Data_retrieve_Price_Desc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Price desc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "private void addProducts(ArrayList<String> rawData){\n\t\tfor(int i = 0; i < rawData.size(); i++) {\n\t\t\t// split row at every space and store in array temp\n\t\t\tString[] temp = rawData.get(i).split(\"\\\\s+\");\n\t\t\t\n\t\t\tString name = \"\";\n\t\t int quantity = 0;\n \t\tfloat price = 0;\n \t\tboolean imported = false;\n \n // quantity is always the first\n \t\tquantity = Integer.parseInt(temp[0]);\n \t\tprice = Float.parseFloat(temp[temp.length-1]);\n \t\t\n \t\t// don't need to check fist item (quantity) and last item (price)\n \t\tfor (int j=1; j<temp.length-2; j++){\n \t\t if (temp[j].equals(\"imported\")){\n \t\t imported = true;\n \t\t if (j == 1){ // leave imported at the begining \n \t\t name = name + temp[j] + \" \";\n \t\t } \n else{ // move it to the begining \n \t\t name = \"imported \"+name;\n \t\t }\n \t\t }\n \t\t else{\n \t\t name = name + temp[j] + \" \";\n \t\t }\n \t\t \n \t\t}\n \t\t// removes the last character in the name (the extra space)\n \t\tname = name.substring(0, name.length()-1);\n \t\t\n \t\tboolean notExempt = !productCategory.getExemptCategory(name);\n \t\t\n \t\tSystem.out.println(\"Product: \"+name+\" and its notExempt status is \"+notExempt+\", imported: \"+imported);\n \t\tfloat totalTax = tax.calcTax(quantity, price, notExempt, imported);\n \t\tcart.addProduct(name, quantity, price, imported, totalTax);\n\t\t}\n\t}", "Product(String name, int quantity, double price, double totalCost) {\n this.name = name;\n this.quantity = quantity;\n this.price = price;\n this.totalCost = totalCost;\n }", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "@Override\n\tpublic void cr_Order(String id, String name, String dizi, String date,\n\t\t\tFloat cost, int status, int type, String serilNumber) {\n\t\tConnection lianjie = super.lianjie();\n\t\tString sql=\"insert into easybuy_order values(null,?,?,?,?,?,?,?,?)\";\n\t\tPreparedStatement pr=null;\n\t\ttry {\n\t\t\tpr=lianjie.prepareStatement(sql);\n\t\t\tpr.setString(1, id);\n\t\t\tpr.setString(2, name);\n\t\t\tpr.setString(3, dizi);\n\t\t\tpr.setString(4, date);\n\t\t\tpr.setFloat(5, cost);\n\t\t\tpr.setInt(6, status);\n\t\t\tpr.setInt(7, type);\n\t\t\tpr.setString(8, serilNumber);\n\t\t\tpr.executeUpdate();\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\tsuper.guanbi(null, pr, lianjie);\n\t}", "@GetMapping(\"/add\") // @GetMapping = @RequestMapping with method=get\n\tpublic String getProductDetails(@RequestParam String name, @RequestParam String category,\n\t\t\t@RequestParam double price, @RequestParam(\"qty\") int quantity,\n\t\t\t@RequestParam(\"creation_date\") Date creationDate,Model map) \n\t//@RequestParam String name => request.getParameter(\"name\")\n\t//@RequestParam(\"qty\") int quantity => int quantity=Integer.parseInt(request.getParamter(\"qty\"))\n\t//def date format : mon/day/yr : SDF sdf=new SDF(\"MM/dd/yyyy\");\n\t//Date creationDate=sdf.parse(request.getParamter(\"creation_date\"));\n\t{\n\t\tSystem.out.println(\"in get product details \"+name+\" \"+price+\" created on \"+creationDate);\n\t\t//add product details in model attribute n share it with view.\n\t\tmap.addAttribute(\"product_details\",name+\":\"+category+\":\"+price+\" created on \"+creationDate);\n\t\treturn \"/product/show\";//actual view name reted by V.R : /WEB-INF/views/product/show.jsp\n\t}", "public Product(String categeory, String name, String description,int productSize, int packQuantity,\n double cost, double price, Business manufacturer) {\n this(categeory,name,description,packQuantity,cost,price,manufacturer);\n setProductSizeUnit(categeory); \n }", "public DataEntry(java.awt.Window parent, boolean modal, DaoInterface dao) {\n super(parent);\n super.setModal(modal);\n\n initComponents();\n this.dao = dao;\n txtCategory.setEditable(true);\n categoryHolder.updateItems(dao.getCategorys());\n txtCategory.setModel(categoryHolder);\n validation.addTypeFormatter(txtPrice, \"#0.00\", BigDecimal.class);\n validation.addTypeFormatter(txtQuantity, \"#0.00\", BigDecimal.class);\n validation.addTypeFormatter(txtID, \"#0\", Integer.class);\n \n txtID.setName(\"txtID\");\n txtDescription.setName(\"txtDescription\");\n txtName.setName(\"txtName\");\n txtCategory.setName(\"txtCategory\");\n txtPrice.setName(\"txtPrice\");\n txtQuantity.setName(\"txtQuantity\"); \n saveButton.setName(\"saveButton\");\n CancelButton.setName(\"CancelButton\");\n }", "public void addItems(Product product, JSpinner spinner, JLayeredPane pane, JTable table) throws IllegalArgumentException {\n int qty = (int) spinner.getValue(); //get the added quantity from table\n\n if (qty > 0) {\n if (qty <= product.getQuantity()) {\n for (int i = 0; i < qty; i++) {\n this.setRequestValue(getRequestValue() + product.getPrice()); //update request value\n requestItems.add(product);\n product.setQuantity(product.getQuantity() - 1); //update product in stock\n }\n } else {\n \tDefaultTableModel model = (DefaultTableModel) table.getModel();\n int rowCount = model.getRowCount();\n for (int i = rowCount - 1; i >= 0; i--) {\n \tmodel.removeRow(i);\n }\n table.setModel(model);\n \tJOptionPane.showMessageDialog(pane, \"There is not enough in stock.\");\n throw new IllegalArgumentException(\"There is not enough in stock\");\n }\n } else {\n throw new IllegalArgumentException(\"The amount has to be positive\");\n }\n }", "void createOrder(List<Product> products, Customer customer);", "public void insertData(String Product_Name, String Product_Category, String Product_Description, String Product_Price) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(Database_Helper.COLUMN_2, Product_Name);\n contentValues.put(Database_Helper.COLUMN_3, Product_Category);\n contentValues.put(Database_Helper.COLUMN_4, Product_Description);\n contentValues.put(Database_Helper.COLUMN_5, Product_Price);\n long id = db.insert(Database_Helper.TABLE_NAME, null, contentValues);\n }", "public void addNewItem(String n_itemCategory, String n_description, String n_itemName, String n_startPrice, \n\t\t\tString n_endDate, String n_userID) throws SQLException {\n\n\t\tConnection con = openDBConnection();\n\t\tCallableStatement callStmt = con.prepareCall(\" {call team1.POST_ITEM(?, ?, ?, ?, ?, ?)}\");\n\t\t\n\t\t/** Defines attributes to pass to the SQL Procedure - as well as some default values */\n\t\tcallStmt.setString(1, n_itemCategory);\n\t\tcallStmt.setString(2, n_description);\n\t\tcallStmt.setString(3, n_itemName);\n\t\tcallStmt.setString(4, n_startPrice);\n\t\tcallStmt.setString(5, n_endDate);\n\t\tcallStmt.setString(6, n_userID);\n\t\t\n\t\t/* Executes the Prepared Statement query */\n\t\tcallStmt.execute();\n\t\tcallStmt.close();\n\t}", "public void addWarehouseStock(String name, int amount);", "public void addNewProduct(String name, String metaTag, String model, double price, String category) {\r\n\t\t\r\n\t\t//clicking on add button\r\n\t\tthis.addNewBtn.click();\r\n\t\t\r\n\t\t//entering the name of product in the category name field\r\n\t\tthis.productName.sendKeys(name);\r\n\t\t\r\n\t\t//entering meta tag title for the product\r\n\t\tthis.metaTag.sendKeys(metaTag);\r\n\t\t\r\n\t\t//going to model tab\r\n\t\tthis.dataTabBtn.click();\r\n\t\t\r\n\t\t//entering model no\r\n\t\tthis.modelField.sendKeys(model);\r\n\t\t\r\n\t\t//entering price\r\n\t\tthis.priceField.sendKeys(String.valueOf(price));\r\n\t\t\r\n\t\t//going to links tab\r\n\t\tthis.linksTabBtn.click();\r\n\t\t\r\n\t\t//entering categories\r\n\t\tthis.categoriesField.sendKeys(category);\r\n\t\t\r\n\t\t//clicking on save button\r\n\t\tthis.saveBtn.click();\t\t\r\n\t}", "public Product(String name, double price, int quantity) {\r\n this.name = name;\r\n this.price = price;\r\n this.quantity = quantity;\r\n }", "private void addDishToList(String dsName, int amt, int dsPrice, String type) {\n int n, total;\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(DNAME, dsName);\n if ((n = table.addDish(dsName, amt, dsPrice, type,\n vip.getPhone(), vip.getName())) > amt) {\n Map<String, Object> tm = new HashMap<String, Object>();\n tm.put(DNAME, dsName);\n tm.put(AMOUNT, n - amt);\n mList.remove(tm);\n map.put(AMOUNT, n);\n mList.add(map);\n } else {\n map.put(AMOUNT, amt);\n mList.add(map);\n }\n total = vip.getConsumption() + amt * dishes.get(dsName).getPrice();\n vip.setConsumption(total);\n payBtn.setText(PAY + RMB + String.valueOf(total));\n adapter.notifyDataSetChanged();\n listChanged = true;\n }", "public ArrayList<String> getCategoryProducts(int category, int sortMethod) {\n ArrayList<String> filtered_results = new ArrayList<>();\n\n try {\n DBConnect connectionTester = new DBConnect();\n connectionTester.testConnection();\n String sql;\n\n String alphSql = \" order by product_name asc\";\n String stockSql = \" and in_stock = 0\";\n String stockAscSql = \" order by in_stock asc\";\n String baseSql = \"select idproduct, product_name, in_stock from product where category_idcategory = ?\";\n switch (sortMethod) {\n case 1:\n sql = baseSql + alphSql;\n break;\n case 2:\n sql = baseSql + stockSql;\n break;\n case 3:\n sql = baseSql + stockAscSql;\n break;\n default:\n sql = \"\";\n break;\n }\n PreparedStatement prpStmt = connectionTester.connection.prepareStatement(sql);\n prpStmt.setInt(1, category);\n ResultSet result = prpStmt.executeQuery();\n\n while (result.next()) {\n int product_id = result.getInt(\"idproduct\");\n String productname = result.getString(\"product_name\");\n int instock = result.getInt(\"in_stock\");\n\n String sqlresult = product_id + \". \" + productname + \" - in stock: \" + instock;\n filtered_results.add(sqlresult);\n }\n\n } catch (SQLException err) {\n System.out.println(err.getMessage());\n }\n\n return filtered_results;\n }", "public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }", "List<Product> getProductByCategory(String category) throws DataBaseException;", "public interface CategoryService {\n\n List<CategoryPack> findCategoryPackList();\n\n List<Category> findCategoryList(Integer start, Integer count);\n\n Integer findCategoryTotalNumber();\n\n CategoryPack selectCategoryById(Integer cid);\n\n void deleteCategoryById(Integer id);\n\n void addCategory(Category category);\n\n void updateCategory(Category category);\n}", "public void addItem(Product p) throws IOException, ClassNotFoundException {\n SortByName sortByName = new SortByName();\n Collections.sort(cartContents, sortByName.productSearch());\n\n int m = this.getQuantity(p);\n //check if in cart will exceed available amount\n if (p.getAvailableQuantity() > m)\n {\n cartContents.add(p);\n }\n saveCart();\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "private String createOrderSummary(int price, boolean addWhippedCream, boolean addChocolate ,String name)\n {\n if (addWhippedCream==true) price+= (numOfCufee) ;\n if (addChocolate == true ) price+=(2*numOfCufee) ;\n String priceMessage = \"Name: \"+name;\n priceMessage += \"\\nAdd whipped cream? \" + addWhippedCream;\n priceMessage += \"\\nAdd chocolate? \" + addChocolate;\n priceMessage += \"\\nQuantity: \" + numOfCufee;\n priceMessage += \"\\nTotal: $\" + price;\n priceMessage += \"\\nThank you!\";\n return priceMessage;\n }", "public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}", "private Product getProductByPostRequest(HttpServletRequest request) {\n String name = request.getParameter(\"name\");\n String brand = request.getParameter(\"brand\");\n int price = Integer.parseInt(request.getParameter(\"price\"));\n int quantity = Integer.parseInt(request.getParameter(\"quantity\"));\n return new Product(name, brand, price, quantity);\n }", "public void addItem(String nameMeal, String quantity, String idOrder) {\n\n\t\ttry {\n\n\t\t\torderDetails.insertNewOrderDetail(idOrder, quantity, nameMeal);\n\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\t}", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"jdbc:oracle:thin:@localhost:1521:XEPU\").createEntityManager();\n categoryQuery = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(\"SELECT c FROM Category c\");\n categoryList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : categoryQuery.getResultList();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n name = new javax.swing.JTextField();\n costPrice = new javax.swing.JTextField();\n sellingPrice = new javax.swing.JTextField();\n avaiable = new javax.swing.JTextField();\n add = new javax.swing.JButton();\n category = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Category\");\n\n jLabel2.setText(\"Name\");\n\n jLabel3.setText(\"Cost Price\");\n\n jLabel4.setText(\"Selling Price\");\n\n jLabel5.setText(\"Avaiable\");\n\n costPrice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n costPriceActionPerformed(evt);\n }\n });\n\n add.setText(\"Add\");\n add.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addActionPerformed(evt);\n }\n });\n\n category.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jButton1.setText(\"cancel\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(name, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)\n .addComponent(costPrice, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(category, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(sellingPrice)\n .addComponent(avaiable)\n .addGroup(layout.createSequentialGroup()\n .addComponent(add, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)\n .addComponent(jButton1)))))\n .addContainerGap(59, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(category, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(costPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(sellingPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(avaiable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(add)\n .addComponent(jButton1))\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void editProduct(int index, String description, String category, int quantity, int weight, int price, int stocknumber) {\t\t\n\t}", "public static String searchAddToCategory(HttpServletRequest request, HttpServletResponse response) {\n Delegator delegator = (Delegator) request.getAttribute(\"delegator\");\n String productCategoryId = request.getParameter(\"SE_SEARCH_CATEGORY_ID\");\n String fromDateStr = request.getParameter(\"fromDate\");\n Timestamp fromDate = null;\n String errMsg = null;\n\n try {\n fromDate = Timestamp.valueOf(fromDateStr);\n } catch (RuntimeException e) {\n Map<String, String> messageMap = UtilMisc.toMap(\"errDateFormat\", e.toString());\n errMsg = UtilProperties.getMessage(RESOURCE, \"productsearchevents.fromDate_not_formatted_properly\", messageMap,\n UtilHttp.getLocale(request));\n request.setAttribute(\"_ERROR_MESSAGE_\", errMsg);\n return \"error\";\n }\n\n try {\n boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);\n try (EntityListIterator eli = getProductSearchResults(request)) {\n if (eli == null) {\n errMsg = UtilProperties.getMessage(RESOURCE, \"productsearchevents.no_results_found_probably_error_constraints\",\n UtilHttp.getLocale(request));\n request.setAttribute(\"_ERROR_MESSAGE_\", errMsg);\n return \"error\";\n }\n\n GenericValue searchResultView = null;\n int numAdded = 0;\n while ((searchResultView = eli.next()) != null) {\n String productId = searchResultView.getString(\"mainProductId\");\n\n GenericValue pcm = delegator.makeValue(\"ProductCategoryMember\");\n pcm.set(\"productCategoryId\", productCategoryId);\n pcm.set(\"productId\", productId);\n pcm.set(\"fromDate\", fromDate);\n pcm.create();\n\n numAdded++;\n }\n Map<String, String> messageMap = UtilMisc.toMap(\"numAdded\", Integer.toString(numAdded));\n errMsg = UtilProperties.getMessage(RESOURCE, \"productsearchevents.added_x_product_category_members\", messageMap,\n UtilHttp.getLocale(request));\n request.setAttribute(\"_EVENT_MESSAGE_\", errMsg);\n } catch (GenericEntityException e) {\n Map<String, String> messageMap = UtilMisc.toMap(\"errSearchResult\", e.toString());\n errMsg = UtilProperties.getMessage(RESOURCE, \"productsearchevents.error_getting_search_results\", messageMap,\n UtilHttp.getLocale(request));\n Debug.logError(e, errMsg, MODULE);\n request.setAttribute(\"_ERROR_MESSAGE_\", errMsg);\n TransactionUtil.rollback(beganTransaction, errMsg, e);\n return \"error\";\n } finally {\n TransactionUtil.commit(beganTransaction);\n }\n } catch (GenericTransactionException e) {\n Map<String, String> messageMap = UtilMisc.toMap(\"errSearchResult\", e.toString());\n errMsg = UtilProperties.getMessage(RESOURCE, \"productsearchevents.error_getting_search_results\", messageMap, UtilHttp.getLocale(request));\n Debug.logError(e, errMsg, MODULE);\n request.setAttribute(\"_ERROR_MESSAGE_\", errMsg);\n return \"error\";\n }\n\n return \"success\";\n }", "public String order(int amount) {\n if (this._noOfItems < 1) {\n return \"\"; // return empty if nothing to check for\n }\n // The string to return\n String resultString = \"\";\n // stores the previous items' sum of quantitys\n int prevQuantity = 0;\n FoodItem prevItem = null;\n FoodItem currentItem = null;\n // for each item in stock, and an extra loop to check the last\n for (int i = 0; i <= this._noOfItems; i++) {\n if (i != this._noOfItems) {\n currentItem = this._stock[i];\n }\n if (i > 0) {\n // if not same item as previous OR after last item (means we are checking for last item)\n if (i == this._noOfItems || (currentItem.getName() != prevItem.getName() ||\n currentItem.getCatalogueNumber() != prevItem.getCatalogueNumber())) {\n // if the total amount of all sames is less than parameter amount\n if (prevQuantity < amount) {\n // add comma and space if nothing have been added yet\n if (!(resultString.length() == 0)) {\n resultString+=\", \";\n }\n // add name to string\n resultString += prevItem.getName();\n }\n // reset quantity, as the next to be checked (means, the current) is different\n prevQuantity = 0;\n }\n }\n // sum the quantities - have already resetted if last or different\n prevQuantity += currentItem.getQuantity();\n // anyway, set the next loop prev item to this loop current.\n prevItem = currentItem;\n }\n return resultString;\n }", "public void addToOrder()\n {\n\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n Popup.DisplayError(\"Must select donut type AND donut flavor.\");\n return;\n } else\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n if ( quantity == 0 )\n {\n Popup.DisplayError(\"Quantity must be greater than 0.\");\n return;\n } else\n {\n for ( int i = 0; i < quantity; i++ )\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n mainMenuController.getCurrentOrder().add(donut);\n }\n if ( quantity == 1 )\n {\n Popup.Display(\"Donuts\", \"Donut has been added to the current order.\");\n } else\n {\n Popup.Display(\"Donuts\", \"Donuts have been added to the current order.\");\n }\n\n\n donutTypeComboBox.getSelectionModel().clearSelection();\n flavorComboBox.getSelectionModel().clearSelection();\n quantityTextField.setText(\"0\");\n subtotalTextField.setText(\"$0.00\");\n }\n }\n\n\n }", "public void fillOrders(int totalEntries) {\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Date date = new Date();\n int getRandomUserId = getRandomNumber(0, 999);\n storeOperations.submitOrder(dateFormat.format(date), \"user_\" + getRandomUserId, \"password_\" + getRandomUserId, getProductsToBeOrdered(getRandomNumber(1, 10)));\n }\n }", "public long createntry(String date, String quantity, String capacity,String inout,String desci) {\n\t\tContentValues cv=new ContentValues();\n\t\tcv.put(Drum_date, date);\n\t\tcv.put(Drum_Capacity, capacity);\n\t\t\n\t\tcv.put(Drum_Quantity, Integer.parseInt(quantity));\n\t\tcv.put(Drum_inout, inout);\n\t\tcv.put(Drum_desci, desci);\n\t\treturn ourDatabase.insert(DATABASE_TABLE, null, cv);\n\t}", "public void addStoreStock(String name, int amount);", "public void setQuantidade(Integer quantidade) { this.quantidade = quantidade; }", "public VendingMachineDaoInMemImpl() {\n Item itemOne = new Item(1, \"Snickers\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),9);\n Item itemTwo = new Item(2, \"M&Ms\", new BigDecimal(1.50).setScale(2, RoundingMode.HALF_UP),2); \n Item itemThree = new Item(3, \"Pringles\", new BigDecimal(2.10).setScale(2, RoundingMode.HALF_UP),5);\n Item itemFour = new Item(4, \"Reese's\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP), 4);\n Item itemFive = new Item(5, \"Pretzels\", new BigDecimal(1.25).setScale(2, RoundingMode.HALF_UP), 9);\n Item itemSix = new Item(6, \"Twinkies\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 3);\n Item itemSeven = new Item(7, \"Doritos\", new BigDecimal(1.75).setScale(2, RoundingMode.HALF_UP), 11);\n Item itemEight = new Item(8, \"Almond Joy\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),0);\n Item itemNine = new Item(9, \"Trident\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 6);\n \n allItems.put(1, itemOne);\n allItems.put(2, itemTwo);\n allItems.put(3, itemThree);\n allItems.put(4, itemFour);\n allItems.put(5, itemFive);\n allItems.put(6, itemSix);\n allItems.put(7, itemSeven);\n allItems.put(8, itemEight);\n allItems.put(9, itemNine);\n }", "private static void createRecipe(int code, String name, int quantity ) {\n\t\tString sqlTotalkcal=\"select sum(kcal) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalcarb=\"select sum(carbohidrates) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalProt=\"select sum(Proteines) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalFat=\"select sum(Fat) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalSalt=\"select sum(Salt) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqltotalAllergen=\"select codeAllergen from allergenxingredients where codeIngredient in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\t\r\n\t\t//recuperar datos\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdouble kcal = dataRecovery(sqlTotalkcal);\r\n\t\t\tdouble carb = dataRecovery(sqlTotalcarb);\r\n\t\t\tdouble prot = dataRecovery(sqlTotalProt);\r\n\t\t\tdouble fat = dataRecovery(sqlTotalFat);\r\n\t\t\tdouble salt = dataRecovery(sqlTotalSalt);\r\n\t\t\tString aler = dataRecoveryAllergenList(sqltotalAllergen);\r\n\t\t\tcreateRecipeData(code, name, quantity, kcal, carb, prot, fat, salt, aler);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Hubo un error al crear la receta\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addProduct(ArticleInq artInq) {\n\t\tif (artInq != null) {\n\t\t\tdt.setVisibility(View.INVISIBLE);\n\t\t\tPriceInquiery priceInquiery = artInq.getPriceInquiery();\n\t\t\ttry {\n\n\t\t\t\tif (ArticleInq.IsProductFound) {\n\n\t\t\t\t\tpt.setText(CommonTask.toCamelCase(priceInquiery.text, \" \"));\n\t\t\t\t\tif (priceInquiery.text2 != null) {\n\t\t\t\t\t\tpt2.setText(priceInquiery.text2);\n\t\t\t\t\t}\n\t\t\t\t\tString[] vals = String.valueOf(priceInquiery.price)\n\t\t\t\t\t\t\t.replace('.', ':').split(\":\");\n\t\t\t\t\ttr.setText(vals[0]);\n\t\t\t\t\ttf.setText(vals[1].length() > 1 ? vals[1] : vals[1] + \"0\");\n\t\t\t\t\tft.setText(String.valueOf(priceInquiery.contents)\n\t\t\t\t\t\t\t+ priceInquiery.contentsdesc + \" (\"\n\t\t\t\t\t\t\t+ priceInquiery.priceperdesc + \"-pris\" + \" \"\n\t\t\t\t\t\t\t+ CommonTask.getString(priceInquiery.priceper)\n\t\t\t\t\t\t\t+ \")\");\n\t\t\t\t\tif (priceInquiery.getDiscount().quantity > 0) {\n\t\t\t\t\t\tDiscount dis = priceInquiery.getDiscount();\n\t\t\t\t\t\tdt.setText(String.valueOf(dis.quantity) + \" \"\n\t\t\t\t\t\t\t\t+ dis.text + \" \" + Math.round(dis.amount));\n\t\t\t\t\t\tdt.setVisibility(View.VISIBLE);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tpt.setText(getString(R.string.productError));\n\t\t\t\t\tpt2.setText(\"\");\n\t\t\t\t\ttr.setText(\"\");\n\t\t\t\t\ttf.setText(\"\");\n\t\t\t\t\tft.setText(\"\");\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tpt.setText(getString(R.string.productError));\n\t\t\t\tpt2.setText(\"\");\n\t\t\t\ttr.setText(\"\");\n\t\t\t\ttf.setText(\"\");\n\t\t\t\tft.setText(\"\");\n\t\t\t}\n\n\t\t\tproductDetailsLayOut.setVisibility(View.VISIBLE);\n\t\t\tproductDetailsLayOut.startAnimation(animTop);\n\t\t\t\n\t\t\tmHandler.postDelayed(mWaitRunnable, PRODUCT_DETAILS_DELAY_MS);\n\t\t\tai.setBackgroundDrawable(null);\n\t\t\tif (ArticleInq.IsProductFound) {\n\t\t\t\tBitmapDrawable image = getArticleImage(artInq.EAN);\n\t\t\t\tif (image != null) {\n\t\t\t\t\tai.setBackgroundDrawable(image);\n\t\t\t\t} else {\n\t\t\t\t\tCommonTask.setAsyncImageBackground(ai, artInq.EAN);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void findDishesByCategoryName3() {\n\n String categoryName = \"Vegan\";\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n\n criteria.setCategories(categories);\n criteria.setSearchBy(\"\");\n PageRequest pageable = PageRequest.of(0, 8, Sort.by(Direction.DESC, \"price\"));\n criteria.setPageable(pageable);\n\n Page<DishCto> result = this.dishmanagement.findDishesByCategory(criteria, categoryName);\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n\n }", "static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }", "public Inventory(String kodeWh,String kodeProd,double hargaProd,int jumlahProd){\n this.kodeWh=kodeWh;\n this.kodeProd=kodeProd;\n this.hargaProd=hargaProd;\n this.jumlahProd=jumlahProd;\n }" ]
[ "0.56970084", "0.5629307", "0.54393536", "0.5419488", "0.53789014", "0.5378132", "0.5370452", "0.53606033", "0.5359291", "0.5328486", "0.5311826", "0.5305654", "0.5281138", "0.5270961", "0.52497816", "0.5244984", "0.5234915", "0.5210214", "0.52085966", "0.51998514", "0.51864874", "0.51724046", "0.5169208", "0.51687175", "0.5164694", "0.51644605", "0.5162543", "0.5148717", "0.5145175", "0.51282173", "0.51256865", "0.51111126", "0.510945", "0.51072735", "0.5080725", "0.5075277", "0.50549215", "0.50462514", "0.50453603", "0.50350714", "0.502985", "0.50286764", "0.50286245", "0.5020909", "0.5015131", "0.500776", "0.5002262", "0.50009733", "0.5000421", "0.49791622", "0.49761543", "0.4974526", "0.49718645", "0.4971362", "0.49681404", "0.49675307", "0.49672592", "0.4966004", "0.49643686", "0.49561548", "0.4955671", "0.49549508", "0.49506706", "0.49483982", "0.49470648", "0.49425447", "0.4927389", "0.49199536", "0.4919926", "0.49185115", "0.49177763", "0.49173146", "0.49151573", "0.4906997", "0.4906282", "0.49022773", "0.48989338", "0.4896452", "0.4896452", "0.48945075", "0.48942563", "0.4893206", "0.4887595", "0.48850313", "0.48831156", "0.4880817", "0.48807847", "0.4880585", "0.48784086", "0.48759946", "0.4870843", "0.48591977", "0.48464394", "0.48448944", "0.4842671", "0.483763", "0.48356727", "0.4826681", "0.48264825", "0.482526", "0.4823204" ]
0.0
-1
The Voice Connector ID.
public void setVoiceConnectorId(String voiceConnectorId) { this.voiceConnectorId = voiceConnectorId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVoiceConnectorId() {\n return this.voiceConnectorId;\n }", "UUID getConnectorId();", "public String getConnectId() {\n return connectId;\n }", "java.lang.String getChannelId();", "public String getCallId();", "public String getCHANNEL_ID() {\n return CHANNEL_ID;\n }", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public String getCallIdentifier() {\n return callIdHeader.getCallId();\n }", "java.lang.String getProtocolId();", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "public String getProtocolId();", "public int getTalkTrackId()\n\t{\n\t\treturn talkTrackId;\n\t}", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();", "java.lang.String getConnectionId();", "java.lang.String getRecognitionId();", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n }\n }", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n }\n }", "public java.lang.String getConnectionId() {\n java.lang.Object ref = connectionId_;\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 connectionId_ = s;\n return s;\n }\n }", "public String getChannelId()\n {\n return channelId;\n }", "public UUID getCallId() {\n return callId;\n }", "@Override\n\tpublic List<String> getConnectorIds() {\n\t\treturn connectorIds;\n\t}", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "public String getConversationId(){\r\n\t\treturn conversationId;\r\n\t}", "public String getChannelId() {\n return channelId;\n }", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public static long getIdConnected(Context ctx) {\n\t\tSharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\treturn preferences.getLong(PreferenceConstants.ACCOUNT_ID, 0L);\n\t}", "public String getConnectionId() {\n return connectionId;\n }", "java.lang.String getRecognizerId();", "@Override\n public String provideCustomerConnectionId( )\n {\n return _signaleur.getGuid( );\n }", "private String getCurrentSpectrumId()\r\n\t{\r\n\t\treturn this.currentSpectrumId;\r\n\t}", "java.lang.String getConceptId();", "public java.lang.String getChannelId() {\n java.lang.Object ref = channelId_;\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 channelId_ = s;\n return s;\n }\n }", "public long getConversationID() {\n return conversationID;\n }", "public String id() {\n return definition.getString(ID);\n }", "public java.lang.String getChannelId() {\n java.lang.Object ref = channelId_;\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 channelId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getSid()\n\t{\n\t\treturn conferenceInfo.getAttribute(\"sid\");\n\t}", "public String getClientLibId() {\n return RcClientLib.CLIENT_LIB_ID;\n }", "public String getConnectionId() {\n return this.connectionId;\n }", "public String getWechatId() {\n return wechatId;\n }", "@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"7267xxxxxxxxxxxxxx\", value = \"Telnyx connection ID used in the call.\")\n @JsonProperty(JSON_PROPERTY_CONNECTION_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getConnectionId() {\n return connectionId;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"7267xxxxxxxxxxxxxx\", value = \"Telnyx connection ID used in the call.\")\n @JsonProperty(JSON_PROPERTY_CONNECTION_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getConnectionId() {\n return connectionId;\n }", "public int getCallId() {\n return this.mCallId;\n }", "public String assistantId() {\n return assistantId;\n }", "com.google.protobuf.ByteString\n getChannelIdBytes();", "public Integer getChannelid() {\n return channelid;\n }", "public interface IVoiceConnectionEvent extends IEvent {\n\n /**\n * @return the identifier of the voice connection the message got sent to\n */\n String getVoiceConnectionIdentifier();\n}", "com.google.protobuf.ByteString\n getConnectionIdBytes();", "com.google.protobuf.ByteString\n getConnectionIdBytes();", "com.google.protobuf.ByteString\n getConnectionIdBytes();", "@JsonGetter(\"voiceUriId\")\r\n public int getVoiceUriId ( ) { \r\n return this.voiceUriId;\r\n }", "int getReceiverid();", "public java.lang.String getCatalogId() {\n java.lang.Object ref = catalogId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n catalogId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public long connectionId()\n {\n return connectionId;\n }", "public long getConnectionId() {\n return connectionId;\n }", "public String getExternalId() {\n return externalId;\n }", "@Array({11}) \n\t@Field(19) \n\tpublic Pointer<Byte > ClientID() {\n\t\treturn this.io.getPointerField(this, 19);\n\t}", "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "@Override\n\tpublic String getConversationId() {\n\t\treturn null;\n\t}", "public StrColumn getRobotId() {\n return delegate.getColumn(\"robot_id\", DelegatingStrColumn::new);\n }", "public String getSurveyID()\n\t{\n\t\treturn _avTable.get( ATTR_SURVEY_ID ) ;\n\t}", "public String getConid() {\n return conid;\n }", "public String getVoiceProfileDomainId() {\n return this.voiceProfileDomainId;\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "public String getExternalId() {\n\t\treturn externalId;\n\t}", "int getSendid();", "public abstract String getConnectionId();", "public static String id()\n {\n return _id;\n }", "public java.lang.String getOA_ID() {\n return OA_ID;\n }", "public char get_WSID() {\r\n return (WSID_ANSWER);\r\n }", "@java.lang.Override\n public java.lang.String getCatalogId() {\n java.lang.Object ref = catalogId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n catalogId_ = s;\n return s;\n }\n }", "public synchronized String getProxyID() {\n \n return this.id;\n }", "public int getAudioSessionId() {\n\t\treturn mPlayer.getAudioSessionId();\n\t}", "private String getSpeakerId(Response response) {\n String location = response.getHeaderString(\"location\");\n return location.substring(location.lastIndexOf(\"/\") + 1);\n }", "java.lang.String getClientRecordId();", "public Integer getConferenceId() {\n return conferenceId;\n }", "java.lang.String getAoisId();", "public String getExternalId() {\n return this.externalId;\n }", "public String getIdDiscord() {\n\t\treturn idDiscord;\n\t}", "String getId(IApiComponent component) throws CoreException {\n StringBuffer buffer = new StringBuffer();\n //$NON-NLS-1$\n buffer.append(component.getSymbolicName()).append(\" \").append('(').append(component.getVersion()).append(')');\n return buffer.toString();\n }", "public String getWxOpenid() {\n return wxOpenid;\n }", "public int getID() {\n return graphConfig.getIndex();\n }", "public String getExternalID() {\r\n return this.externalID;\r\n }", "String getTheirPartyId();", "String getSubscriptionId();", "public String adapterId() {\n return this.adapterId;\n }", "public int getId() {\n\t\treturn config >> 8;\n\t}", "public long getConnectionId() {\n return connId;\n }", "protected String getDataSourceId() {\n return getDataSourceId(sourceComboBox);\n }", "public String clientId() {\n return clientId;\n }", "public String getComponentId();", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "Integer getRealmId();", "public String getPrefContactId() {\n return getContact().getUid();\n }", "public String getControlId() throws PixSourceException {\n\t\t\n\t\tSegment seg = getSegments().getByCodeAndIndex(MSA, 1);\n\t\tint fieldIndex = 1;\n\t\t\n\t\ttry {\n\t\t\treturn seg.forceField(fieldIndex).getAsString();\n\t\t} catch (HL7V2Exception e) {\n\t\t\tthrow new PixSourceException(e);\n\t\t}\n\t}", "public UUID faceId() {\n return this.faceId;\n }" ]
[ "0.8322801", "0.72954416", "0.65863734", "0.65018165", "0.63737744", "0.6192946", "0.60818005", "0.5973976", "0.5952102", "0.59504384", "0.59411097", "0.5935334", "0.59034693", "0.59034693", "0.59034693", "0.589197", "0.5881535", "0.5881535", "0.5881535", "0.5875012", "0.5875012", "0.5875012", "0.5854367", "0.58528703", "0.58217835", "0.58074373", "0.58056366", "0.57934386", "0.5781653", "0.57797784", "0.56966954", "0.56953514", "0.56947285", "0.56891423", "0.56736684", "0.56495523", "0.56193554", "0.56168616", "0.5602608", "0.5601978", "0.5601809", "0.5591256", "0.55861664", "0.55825776", "0.55777407", "0.55777407", "0.55751497", "0.55729824", "0.55727", "0.5570512", "0.5560696", "0.55525404", "0.55525404", "0.55525404", "0.55427665", "0.55354", "0.55313396", "0.5530426", "0.55238193", "0.5522507", "0.55202246", "0.5506332", "0.5503022", "0.5502353", "0.5486865", "0.5482558", "0.5467947", "0.54645896", "0.5463638", "0.54626", "0.54480124", "0.5445936", "0.54446733", "0.54444164", "0.5441524", "0.5440497", "0.54374343", "0.54321855", "0.5428029", "0.5424855", "0.54100865", "0.54095316", "0.5409318", "0.54063153", "0.5405764", "0.5403832", "0.54010683", "0.53996986", "0.53985596", "0.5397014", "0.53938085", "0.53855866", "0.53837997", "0.53814155", "0.5375561", "0.5374001", "0.53729844", "0.53728956", "0.53722996", "0.5368227" ]
0.63159895
5