query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Begin and ending date of task must fulfill the following conditions: The begin date must be after the current date. The begin date must before the ending date. They must not be equal.
public static boolean checkDateConstraints(Task task) { if (task.getBeginDate().before(new Date()) || task.getBeginDate().after(task.getEndingDate()) || task.getBeginDate().equals(task.getEndingDate())) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NoProxy\n @NoWrap\n public boolean inDateTimeRange(final String start, final String end) {\n if ((getEntityType() == IcalDefs.entityTypeTodo) &&\n getNoStart()) {\n // XXX Wrong? - true if start - end covers today?\n return true;\n }\n\n String evStart = getDtstart().getDate();\n String evEnd = getDtend().getDate();\n\n int evstSt;\n\n if (end == null) {\n evstSt = -1; // < infinity\n } else {\n evstSt = evStart.compareTo(end);\n }\n\n if (evstSt >= 0) {\n return false;\n }\n\n int evendSt;\n\n if (start == null) {\n evendSt = 1; // > infinity\n } else {\n evendSt = evEnd.compareTo(start);\n }\n\n return (evendSt > 0) ||\n (evStart.equals(evEnd) && (evendSt >= 0));\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "public static boolean verifyApplyDates(final String startDate, final String endDate) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n Date fromDate = sdf.parse(startDate);\n Date toDate = sdf.parse(endDate);\n Date curDate = new Date();\n if (!fromDate.after(curDate)) {\n System.out.println(\"Start Date must be greater than Current Date\");\n return false;\n } else if (!toDate.after(fromDate)) {\n System.out.println(\"End Date must be greater than Start Date\");\n return false;\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n return true;\n }", "private boolean isEventTask(TaskDate taskStartDate, TaskDate taskEndDate) {\n return taskStartDate != null && taskEndDate != null;\n }", "public void validateEndDateAndTime(String startDate, String endDate) {\n boolean isValid = false;\n if (!validateDateAndTime(startDate)) {\n isValid = validateDateAndTime(endDate); //End date can still be valid if start date isn't\n } else {\n if (validateDateAndTime(endDate)) {\n // If startDate is valid, then End date must be valid and occur after start date\n Calendar startCal = DateUtility.convertToDateObj(startDate);\n Calendar endCal = DateUtility.convertToDateObj(endDate);\n isValid = startCal.before(endCal);\n }\n }\n setEndDateAndTimeValid(isValid);\n }", "private boolean checkProjectTaskDates(Project pr)\n\t{\n\t\tfor(Task ts:taskManager.get(\"toInsert\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t}\n\t\tfor(Task ts:taskManager.get(\"toEdit\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\tArrayList<Task> tasks=null;\n\t\ttry \n\t\t{\n\t\t\ttasks=db.selectTaskforProjID(project.getProjectID());\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tErrorWindow wind = new ErrorWindow(e); \n\t\t\tUI.getCurrent().addWindow(wind);\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(Task ts:tasks)\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t }", "public static boolean isBetween(Date begin, Date curr, Date end) {\n if (begin.compareTo(curr) <= 0 && curr.compareTo(end) <= 0) {\n return true;\n }\n return false;\n }", "private boolean isDeadline(TaskDate taskEndDate) {\n return taskEndDate != null;\n }", "boolean hasBeginDate();", "boolean hasEndDate();", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateAfterEndDate() throws Exception {\n\t\t// switched end and start\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validEndDate, validStartDate);\n\t}", "private boolean checkStartDateBeforeEndDate(String startDate, String endDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n Date startingDate = null;\n try {\n startingDate = date.parse(startDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Date endingDate = null;\n try {\n endingDate = date.parse(endDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (startingDate.before(endingDate)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "@Test\n public void testCreateBookingReportJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-28\");\n LocalDate endDate = LocalDate.parse( \"2018-10-23\" );\n while ( currentDate.isBefore( endDate ) ) {\n BookingReportJob workerJob = new BookingReportJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 4 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 5 ); // dates are inclusive, +1\n }\n }", "public static boolean isInBetweenDates(LocalDate startingDate,LocalDate endingDate,LocalDate currentDate) {\n //compareTo is used to compare 2 dates\n if(currentDate.compareTo(startingDate) * currentDate.compareTo(endingDate) <0)\n {\n return true;\n }\n else\n {\n return false;\n }\n\n }", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "public void checkStartEndDate(String date1, String date2, DateTime dateTime)\n throws IllegalCommandArgumentException {\n String[] startDateArray = date1.split(dateOperator);\n String[] endDateArray = date2.split(dateOperator);\n \n int startDay = Integer.parseInt(startDateArray[0]);\n int endDay = Integer.parseInt(endDateArray[0]);\n if (dateTime.getStartDate().getDayOfMonth() != startDay ||\n dateTime.getEndDate().getDayOfMonth() != endDay) {\n throw new IllegalCommandArgumentException(\n Constants.FEEDBACK_INVALID_DATE, Constants.CommandParam.DATETIME);\n }\n }", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndWithStartDateAfterEndDate() throws Exception {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tbookingManagement.changeReservationEnd(res1.getId(), validStartDate);\n\t}", "private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }", "public boolean checkFutureOrCurrentDate()\n {\n boolean valid = this.check();\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n if (date != null\n &&\n (date.before(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future or in present date!\");\n\n return valid && false;\n }\n return valid;\n\n }", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "private boolean checkValidity(String startTime, String endTime) {\n\t\tDateFormat formatter = null;\n\t\tformatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tDate startDate = null;\n\t\tDate endDate = null;\n\t\ttry {\n\t\t\tstartDate = (Date)formatter.parse(startTime);\n\t\t\tendDate = (Date)formatter.parse(endTime);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif(startDate.getTime() >= endDate.getTime())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "boolean endDateAfter(String start, String end) {\n SimpleDateFormat ddMMyyyy = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n Calendar c = Calendar.getInstance();\n try {\n Date startDate = ddMMyyyy.parse(start);\n Date endDate = ddMMyyyy.parse(end);\n c.setTime(startDate);\n return startDate.compareTo(endDate) <= 0;\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Date\");\n }\n return true;\n }", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateInPast() throws Exception {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidStartDate, validEndDate);\n\t}", "@Test\n\tpublic static void invalid_create_Task_dueDate() {\n\t\tString login_testName = \"Valid Scenario- When all the data are valid\";\n\t\tString task_testName = \"Invalid Scenario- With Invalid Due date\";\n\t\tlog.info(\"Invalid Scenario- Create Task With invalid Due Date\");\n\t\t// report generation start\n\t\textentTest = extent\n\t\t\t\t.startTest(\"Invalid Scenario- Create Task With invalid duedate (Duedate will be valid from current date to next year)\");\n\n\t\tResponse response = HttpOperation\n\t\t\t\t.createAuthToken(PayLoads.createAuthToken_Payload(extentTest, auth_sheetName, auth_valid_testName));\n\t\tString authToken = ReusableMethods.Auth(extentTest, response);\n\n\t\t// response for login the user\n\t\tresponse = HttpOperation.loginUser(authToken, PayLoads.create_user_Payload(user_sheet, login_testName));\n\t\tlog.info(\"Response received for login\");\n\t\textentTest.log(LogStatus.INFO, \"Response received for login:- \" + response.asString());\n\n\t\t// get the User Token\n\t\tJsonPath jp = ReusableMethods.rawToJson(response);\n\t\tuserToken = jp.get(\"jwt\");\n\t\tlog.info(\"Received User Token:- \" + userToken);\n\t\textentTest.log(LogStatus.INFO, \"User Token:- \" + userToken);\n\n\t\t// Creating the Task response\n\t\tresponse = HttpOperation.create_Task(userToken, PayLoads.create_task_Payload(sheetName, task_testName));\n\n\t\tlog.info(\"Response received to create the task\");\n\t\textentTest.log(LogStatus.INFO, \"Response received to create the task:- \" + response.asString());\n\n\t\t// Assertion\n\t\tAssert.assertEquals(response.getStatusCode(), 406);\n\t\tlog.info(\"Assertion Passed!!\");\n\t\textentTest.log(LogStatus.INFO, \"HTTP Status Code:- \" + response.getStatusCode());\n\n\t}", "public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }", "private void validateDateRange(String startDateStr, String endDateStr) {\n Date startDate = null;\n Date endDate = null;\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n try {\n if ((startDateStr != null) && (endDateStr != null)) {\n startDate = dateFormat.parse(startDateStr);\n endDate = dateFormat.parse(endDateStr);\n \n if ((startDate != null) && (endDate != null) && (startDate.after(endDate))) {\n throw new IllegalArgumentException(\n \"The date range is invalid. Start date ('\" + startDateStr + \n \"') should be less than end date ('\" + endDateStr + \"').\"); \t\n }\n }\n }\n catch (ParseException e) {\n logger.warn(\"Couldn't parse date string: \" + e.getMessage());\n }\n \n }", "public static boolean validateRangeDate(String from, String to) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);\n if (validateDateFormat(from, DATE_FORMAT) && validateDateFormat(to, DATE_FORMAT)) {\n if (LocalDate.parse(from, formatter).isBefore(LocalDate.parse(to, formatter)) ||\n LocalDate.parse(from, formatter).isEqual(LocalDate.parse(to, formatter))) {\n return true;\n }\n }\n return false;\n }", "@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }", "public static String validateJobEndDate(Date startDate, Date endDate) {\n if (endDate.before(startDate)) {\n return \"End date cannot be before start date\";\n } else if (endDate.before(new Date())) {\n return \"End date cannot be before current date\";\n } else {\n return null;\n }\n }", "@Test\n public void equals_DifferentTimeRangeEnd_Test() {\n Assert.assertFalse(bq1.equals(bq4));\n }", "public void setValidUntil(Date validUntil);", "public boolean isValid() {\n\t\tboolean result;\n\t\tDate mySD = this.getStartDate();\n\t\tDate myED = this.getEndDate();\n\t\tTime myST = this.getStartTime();\n\t\tTime myET = this.getEndTime();\n\n\t\tif (myED.isBefore(mySD)) { //end is before start\n\t\t\tresult = false;\n\t\t} else if (myED.isEquals(mySD)) { //start and end same day\n\t\t\tif (myET.compareTo(myST) < 0) { //end time before start time\n\t\t\t\tresult = false;\n\t\t\t} else { result = true;\t}\n\t\t} else { result = true;\t}\n\n\t\treturn result;\n\t}", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }", "public Boolean checkPeriod( ){\r\n\r\n Date dstart = new Date();\r\n Date dend = new Date();\r\n Date dnow = new Date();\r\n\r\n\r\n\r\n // this part will read the openndate file in specific formate\r\n try (BufferedReader in = new BufferedReader(new FileReader(\"opendate.txt\"))) {\r\n String str;\r\n while ((str = in.readLine()) != null) {\r\n // splitting lines on the basis of token\r\n String[] tokens = str.split(\",\");\r\n String [] d1 = tokens[0].split(\"-\");\r\n String [] d2 = tokens[1].split(\"-\");\r\n \r\n int a = Integer.parseInt(d1[0]);\r\n dstart.setDate(a);\r\n a = Integer.parseInt(d1[1]);\r\n dstart.setMonth(a);\r\n a = Integer.parseInt(d1[2]);\r\n dstart.setYear(a);\r\n\r\n a = Integer.parseInt(d2[0]);\r\n dend.setDate(a);\r\n a = Integer.parseInt(d2[1]);\r\n dend.setMonth(a);\r\n a = Integer.parseInt(d2[2]);\r\n dend.setYear(a);\r\n\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"File Read Error\");\r\n }\r\n\r\n \r\n\r\n if ( dnow.before(dend) && dnow.after(dstart) )\r\n return true; \r\n\r\n return true;\r\n }", "@Test\n public void repeatingTask_CheckDateOfEndOfMonth_lastDayOfMonthDate() {\n int[] endOfMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n int[] endOfMonthLeapYear = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n RepeatCommand testRepeatCommand = new RepeatCommand(0, 1, RepeatCommand.MONTHLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(0);\n LocalDate eventDate = repeatEvent.getDate();\n\n int year = LocalDate.now().getYear();\n // Check if this year is a leap year\n if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {\n assertEquals(eventDate.getDayOfMonth(), endOfMonthLeapYear[eventDate.getMonthValue()]);\n } else {\n assertEquals(eventDate.getDayOfMonth(), endOfMonth[eventDate.getMonthValue()]);\n }\n }", "private void validateCalendar(Calendar calendarStart, Calendar calendarEnd) {\n validateInput(calendarStart, \"calendarStart must be not null\");\n validateInput(calendarEnd, \"calendarEnd must be not null\");\n\n if (calendarStart.after(calendarEnd)) {\n // making sure the start date is not greater than the end date.\n invalidInput(\"The Start date cannot be greater than the end date: startDate -> \" + calendarStart.getTime()\n + \", endDate -> \" + calendarEnd.getTime());\n }\n }", "@Test\r\n\tpublic void testInvalidEndDate() {\r\n\t\ttry {\r\n\t\t\tfinal BazaarManager manager = BazaarManager.newInstance();\r\n\t\t\tfinal Item item = manager.newItem(\"testInvalidEndDate\", \"testInvalidEndDate\", manager.findRootCategory());\r\n\t\t\tfinal Calendar startDate = Calendar.getInstance();\r\n\t\t\tstartDate.setWeekDate(2020, 2, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Calendar endDate = Calendar.getInstance();\r\n\t\t\tendDate.setWeekDate(2020, 1, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Bazaar bazaar = manager.newBazaar(item, startDate, endDate);\r\n\t\t\tbazaar.persist();\r\n\t\t}\r\n\t\tcatch (final BazaarExpiredException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\t\tcatch (final BazaarException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\r\n\t}", "private boolean validateTask(JTextField textFieldName,\r\n JTextField textFieldDescription,\r\n JFormattedTextField textFieldDueDate,\r\n JComboBox<Priority> comboPriority) {\r\n if (textFieldName.getText().equals(\"\") || textFieldDescription.getText().equals(\"\")\r\n || textFieldDueDate.getText().equals(\"\") || (comboPriority.getSelectedIndex() == -1)) {\r\n JOptionPane.showMessageDialog(null, \"Please Enter All Data!\");\r\n return false;\r\n }\r\n if (LocalDate.parse(textFieldDueDate.getText()).isBefore(LocalDate.now())) {\r\n JOptionPane.showMessageDialog(null, \"Enter a due date in the future!\");\r\n return false;\r\n }\r\n return true;\r\n }", "private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }", "public TestTask buildNonRecurringTaskWithStartDate() throws IllegalValueException {\n builder = new TaskBuilder();\n return builder.withName(\"non recurring\").withStartDate(\"11 oct 2016 11pm\")\n .withEndDate(\"12 oct 2016 11pm\").build();\n }", "public void checkEndDate(String endDate, DateTime dateTime)\n throws IllegalCommandArgumentException {\n int startDay = Integer.parseInt(endDate.split(dateOperator)[0]);\n if (dateTime.getEndDate().getDayOfMonth() != startDay) {\n throw new IllegalCommandArgumentException(\n Constants.FEEDBACK_INVALID_DATE, Constants.CommandParam.DATETIME);\n }\n }", "public void setBeginDate(Date beginDate) {\n this.beginDate = beginDate;\n if(this.beginDate.before(DateUtils.getToday())){\n this.beginDate = DateUtils.getToday();\n }\n //For new event or event with beginDate after endDate, set endDate after 30 minutes when beginDate change\n if(this.endDate == null || (this.endDate != null && !this.endDate.after(beginDate)))\n this.endDate = new Date(beginDate.getTime() + TimeUnit.MINUTES.toMillis(30));\n }", "private Tasks createDeadlineTaskForInputWithTime(Tasks task, String descriptionOfTask, String endDate, String endTime) {\n if (checkValidDate(endDate) && checkValidTime(endTime)) {\n Duration deadline = new Duration(endDate, endTime);\n task = new DeadlineTask(descriptionOfTask, deadline);\n }\n return task;\n }", "public boolean checkOverlappingTimes(LocalDateTime startA, LocalDateTime endA,\n LocalDateTime startB, LocalDateTime endB){\n return (endB == null || startA == null || !startA.isAfter(endB))\n && (endA == null || startB == null || !endA.isBefore(startB));\n }", "@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }", "private Tasks createDurationTaskForFullInputCommand(Tasks task, String descriptionOfTask, String startDate,\n String startTime, String endDate, String endTime) {\n if (checkValidDate(startDate) && checkValidDate(endDate) && checkValidTime(startTime) && checkValidTime(endTime)) {\n if (startDate.equals(endDate)) { //creates a Duration object using createDurationTaskForSameDayEvent\n task = createDurationTaskForSameDayEvent(task, descriptionOfTask, startDate, startTime, endTime);\n } else if (checkStartDateBeforeEndDate(startDate, endDate)) { //creates a Duration object for (start,start,end,end) if checkStartDateBeforeEndDate true\n Duration durationPeriod = new Duration(startDate, startTime, endDate, endTime);\n task = new DurationTask(descriptionOfTask, durationPeriod);\n } else { //creates a Duration object for (end,end,start,start) if checkStartDateBeforeEndDate false\n Duration durationPeriod = new Duration(endDate, endTime, startDate, startTime);\n task = new DurationTask(descriptionOfTask, durationPeriod);\n }\n }\n return task;\n }", "public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }", "public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showError(true, \"The start time can not be the same as the end time.\");\n return false;\n }\n startLDT = convertToTimeObject(startSpinner.getValue());\n endLDT = convertToTimeObject(endSpinner.getValue());\n startZDT = convertToSystemZonedDateTime(startLDT);\n endZDT = convertToSystemZonedDateTime(endLDT);\n\n if (!validateZonedDateTimeBusiness(startZDT)){\n return false;\n }\n if (!validateZonedDateTimeBusiness(endZDT)){\n return false;\n };\n return true;\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndNotFreeForNewEndDate() throws Exception {\n\t\tArrayList<String> facilityIDs = new ArrayList<String>();\n\t\tfacilityIDs.add(room1.getId());\n\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, facilityIDs, validStartDate,\n\t\t\t\tvalidEndDate);\n\t\t// make second reservation, so the booked facility is not free after first reservation\n\t\tdataHelper.createPersistedReservation(USER_ID, facilityIDs, validEndDate, dateAfterEndDate);\n\n\t\tbookingManagement.changeReservationEnd(res1.getId(), dateAfterEndDate);\n\t}", "private int isFormValid() {\n Calendar start = new GregorianCalendar(datePicker1.year, datePicker1.month, datePicker1.day, timePicker1.hour, timePicker1.minute);\n Calendar end = new GregorianCalendar(datePicker2.year, datePicker2.month, datePicker2.day, timePicker2.hour, timePicker2.minute);\n if (end.before(start))\n return ERR_START_AFTER_END;\n Switch onOffSwitch = (Switch) findViewById(R.id.toggBtn);\n if (!onOffSwitch.isChecked()) {\n long seconds = (end.getTimeInMillis() - start.getTimeInMillis()) / 1000;\n if (seconds > SECONDS_IN_A_DAY)\n return ERR_START_AFTER_END;\n }\n return NO_ERR;\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateLaterTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_3_TODAY, false);\r\n }", "private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }", "private Constraint scheduleTasksWithDueDates(ConstraintFactory factory) {\n return factory.from(TaskAssignment.class)\n .filter(TaskAssignment::isTaskAssignedWithDueDate)\n .rewardConfigurable(\"Schedule tasks with due dates\");\n }", "@Test\n public void testNoTopUpTasksDueAfterSchedWindow() throws Exception {\n\n // SETUP: Data Setup for running the Function\n EvtSchedDeadTable lEvtSchedDead =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:102:0:21\" ) );\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead.update();\n\n EvtSchedDeadTable lEvtSchedDead2 =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:500:0:23\" ) );\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead2.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 2 tasks with no deadline\n assertEquals( 2, iDataSet.getRowCount() );\n\n // loose task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assigned task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the Setup Changes\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ) );\n lEvtSchedDead.update();\n\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ) );\n lEvtSchedDead2.update();\n }", "@Test\n public void addRecord_can_read_TR_spanning_from_today_until_tomorrow() {\n DateTime start = new DateTime(today.getYear(), today.getMonthOfYear(), today.getDayOfMonth(), 12, 0);\n DateTime end = new DateTime(today.getYear(), today.getMonthOfYear(), today.getDayOfMonth() + 1, 12, 0);\n\n // when\n aggregatedDay.addRecord(aRecord(start, end, Rounding.Strategy.SIXTY_MINUTES_UP));\n\n // then: duration equals the hours covering today\n assertEquals(12, aggregatedDay.getDuration().getStandardHours());\n }", "@Test\n public void equals_DifferentTimeRangeStart_Test() {\n Assert.assertFalse(bq1.equals(bq3));\n }", "@Test\n public void testCurrentDayAll1() {\n long t1 = new DateTime(\"2015-10-10T10:10:00\").getMillis();\n long taskAId = taskService.createTaskByJobId(jobAId, t1, t1, TaskType.SCHEDULE);\n long taskBId = taskService.createTaskByJobId(jobBId, t1, t1, TaskType.SCHEDULE);\n\n DAGDependChecker checker = new DAGDependChecker(jobCId);\n Map<Long, JobDependStatus> jobDependMap = Maps.newHashMap();\n DependencyExpression dependencyExpression = new TimeOffsetExpression(\"cd\");\n DependencyStrategyExpression dependencyStrategy = new DefaultDependencyStrategyExpression(CommonStrategy.ALL.getExpression());\n JobDependStatus statusC2A = new JobDependStatus(jobCId, jobAId, dependencyExpression, dependencyStrategy);\n JobDependStatus statusC2B = new JobDependStatus(jobCId, jobBId, dependencyExpression, dependencyStrategy);\n jobDependMap.put(jobAId, statusC2A);\n jobDependMap.put(jobBId, statusC2B);\n checker.setJobDependMap(jobDependMap);\n\n long scheduleTime = new DateTime(\"2015-10-10T11:11:00\").getMillis();\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.updateStatus(taskAId, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.updateStatus(taskBId, TaskStatus.SUCCESS);\n Assert.assertEquals(true, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.deleteTaskAndRelation(taskAId);\n taskService.deleteTaskAndRelation(taskBId);\n }", "@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }", "@Test\n public void testStartAndEndDateChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n Calendar date = Calendar.getInstance();\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setStartDate(DateTimeUtil.getDateTime(date));\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setEndDate(DateTimeUtil.getDateTime(date));\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that dates has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.NEEDS_ACTION, CustomConsumers.ACTIONS);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment was rescheduled.\");\n }", "public Date getValidUntil();", "public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }", "private boolean checkStartTimeBeforeEndTime(String startTime, String endTime) {\n int startHour = Integer.parseInt(startTime.substring(0,2));\n int startMinute = Integer.parseInt(startTime.substring(2,4));\n int endHour = Integer.parseInt(endTime.substring(0,2));\n int endMinute = Integer.parseInt(endTime.substring(2,4));\n \n if (startHour < endHour) {\n return true;\n } else if (startHour > endHour) {\n return false;\n } else {\n if (startMinute < endMinute) {\n return true;\n } else {\n return false;\n }\n }\n }", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "@Test\n public void testValidateUpdateLifeTimeWithGoodDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(20000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(25000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "public void setValidFrom(Date validFrom);", "private Tasks createDurationTaskForSameDayEvent(Tasks task, String descriptionOfTask, String date, String startTime, String endTime) {\n if (checkValidDate(date) && checkValidTime(startTime) && checkValidTime(endTime)) {\n if (checkStartTimeBeforeEndTime(startTime, endTime)) {\n Duration durationPeriod = new Duration(date, startTime, date, endTime);\n task = new DurationTask(descriptionOfTask, durationPeriod);\n } else {\n Duration durationPeriod = new Duration(date, endTime, date, startTime);\n task = new DurationTask(descriptionOfTask, durationPeriod);\n }\n }\n return task;\n }", "@Test\n public void addRecord_can_read_TR_spanning_from_yesterday_until_today() {\n DateTime start = new DateTime(today.getYear(), today.getMonthOfYear(), today.getDayOfMonth() - 1, 12, 0);\n DateTime end = new DateTime(today.getYear(), today.getMonthOfYear(), today.getDayOfMonth(), 12, 0);\n\n // when\n aggregatedDay.addRecord(aRecord(start, end, Rounding.Strategy.SIXTY_MINUTES_UP));\n\n // then: duration equals the hours covering today\n assertEquals(12, aggregatedDay.getDuration().getStandardHours());\n }", "public static void main(String[] args) throws ParseException {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat sf = new SimpleDateFormat(pattern);\n Date yesterday = sf.parse(\"2016-12-11 23:59:59\");\n Date todayBegin = sf.parse(\"2016-12-12 00:00:00\");\n Date today1 = sf.parse(\"2016-12-12 00:00:01\");\n Date todayend = sf.parse(\"2016-12-12 23:23:59\");\n\n System.out.println(sf.format(yesterday) + \" is before \" + sf.format(todayBegin) + \":\" + yesterday.before(todayBegin));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(today1) + \":\" + todayBegin.before(today1));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(todayend) + \":\" + todayBegin.before(todayend));\n System.out.println(sf.format(today1) + \" is before \" + sf.format(todayend) + \":\" + today1.before(todayend));\n }", "@Test\n public void isValidDeadline() {\n assertFalse(Deadline.isValidDeadline(INVALID_0_JAN_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n\n // Valid deadline -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_2018.toString()));\n\n // Valid deadline for february -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_28TH_FEB_2018.toString()));\n\n // Invalid deadline for february in common year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_29TH_FEB_2018.toString()));\n\n // Valid deadline for february during leap year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_29TH_FEB_2020.toString()));\n\n // Invalid deadline for february during leap year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_30TH_FEB_2020.toString()));\n\n // Valid deadline for months with 30 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_30TH_APR_2018.toString()));\n\n // Invalid deadline for months with 30 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_31ST_APR_2018.toString()));\n\n // Valid deadline for months with 31 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_31ST_JAN_2018.toString()));\n\n // Invalid deadline for months with 31 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_2018.toString()));\n\n // Invalid month -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_13_2018.toString()));\n\n // Valid month -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_APR_2018.toString()));\n\n // Valid year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_9999.toString()));\n\n // Invalid year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_2017.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_10000.toString()));\n\n // Valid date without year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Invalid date without year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_WITHOUT_YEAR.toString()));\n }", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "private Tasks createDeadlineTaskForInputWithoutTime(Tasks task, String descriptionOfTask, String endDate) {\n if (checkValidDate(endDate)) {\n Duration deadline = new Duration(endDate, \"2359\");\n task = new DeadlineTask(descriptionOfTask, deadline);\n }\n return task;\n }", "public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.out.println(\"Date: \" + startDate.getValue());\n startDateCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Start Date should not be empty.\\n\");\n }\n\n if (!cronTime.getText().isEmpty()) {\n cronTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Cron Time should not be empty.\\n\");\n }\n// if (!dateFormat.getText().isEmpty()) {\n// dateFormatCheck = true;\n// } else {\n// execptionData.append((++exceptionCount) + \". Date Format should not be empty.\\n\");\n// }\n\n if (startDateCheck == true && cronTimeCheck == true) {\n schedularCheck = true;\n } else {\n schedularCheck = false;\n startDateCheck = false;\n cronTimeCheck = false;\n dateFormatCheck = false;\n }\n\n }", "private int beforeNowAfter(Date lectureDate, int start, int end){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()){\n return 0;\n }else if(lectureDate.getYear()>now.getYear()){\n return 2;\n }else{\n if(lectureDate.getMonth()<now.getMonth()){\n return 0;\n }else if(lectureDate.getMonth()>now.getMonth()){\n return 2;\n }else{\n if(lectureDate.getDate()<now.getDate()){\n return 0;\n }else if(lectureDate.getDate()>now.getDate()){\n return 2;\n }else{\n if(end==now.getHours()&&now.getMinutes()>15){ //Lectures end officially after 15min past the end hour.\n return 0;\n }else if(end<now.getHours()){\n return 0;\n }else if(start>now.getHours()){\n return 2;\n }else{\n return 1;\n }\n }\n }\n }\n }", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "boolean hasStartDate();", "@Test\n\tpublic void testValidateEndDate() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateEndDate(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateEndDate(\"Invalid value.\");\n\t\t\t\tfail(\"The end date was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\n\t\t\tMap<DateTime, String> dateToString = ParameterSets.getDateToString();\n\t\t\tfor(DateTime date : dateToString.keySet()) {\n\t\t\t\tAssert.assertEquals(date, SurveyResponseValidators.validateEndDate(dateToString.get(date)));\n\t\t\t}\n\t\t\t\n\t\t\tMap<DateTime, String> dateTimeToString = ParameterSets.getDateTimeToString();\n\t\t\tfor(DateTime date : dateTimeToString.keySet()) {\n\t\t\t\tAssert.assertEquals(date, SurveyResponseValidators.validateEndDate(dateTimeToString.get(date)));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean isInvoiceBetween(ContractsGrantsInvoiceDocument invoice, Timestamp fromDate, Timestamp toDate) {\r\n if (ObjectUtils.isNotNull(fromDate)) {\r\n if (fromDate.after(new Timestamp(invoice.getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis()))) {\r\n return false;\r\n }\r\n }\r\n if (ObjectUtils.isNotNull(toDate)) {\r\n if (toDate.before(new Timestamp(invoice.getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis()))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static String validateJobStartDate(Date startDate, Date endDate) {\n if (startDate.after(endDate)) {\n return \"Start date cannot be after end date\";\n } else if (startDate.before(new Date())) {\n return \"Start date cannot be before current date\";\n } else {\n return null;\n }\n }", "private void validationLocalDates(LocalDate startDate, LocalDate endDate) {\n\t\t\n\t\tif(startDate == null || endDate == null) {\n\t\t\tthrow new EmptyDateException();\n\t\t}\n\t\t\n\t\tif(startDate.compareTo(endDate) > 0) {\n\t\t\tthrow new LocalDatesTwoValidException(startDate, endDate);\n\t\t}\n\t}", "private static int compareEndTimes(TaskItem task1, TaskItem task2) {\n\t\tif (task1 instanceof FloatingTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else if (task1 instanceof DeadlinedTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t} else {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testIsExpiredToday_ExpirationDateTomorrow() {\r\n doTest(TEST_DATE_2_TOMORROW, TEST_DATE_1_TODAY, false);\r\n }", "boolean endTimeAfter(String start, String end) {\n SimpleDateFormat HHmm = new SimpleDateFormat(\"HH:mm\", Locale.UK);\n Calendar c = Calendar.getInstance();\n try {\n Date startTime = HHmm.parse(start);\n Date endTime = HHmm.parse(end);\n c.setTime(startTime);\n return startTime.compareTo(endTime) <= 0;\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Time\");\n }\n return true;\n }", "@Override\n public int compare(Task task1, Task task2) {\n return task1.getDate().compareTo(task2.getDate());\n }", "@Test\n public void testTopUpTasksOutsidePlanningYield() throws Exception {\n\n // SETUP: Data Setup for running the Function\n EvtSchedDeadTable lEvtSchedDead =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:500:0:23\" ) );\n lEvtSchedDead.setIntervalQt( 0.0 );\n lEvtSchedDead.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 3 tasks. Top-up task fall outsidte planning yield should\n // not be found\n assertEquals( 3, iDataSet.getRowCount() );\n\n iDataSet.addSort( \"sched_id\", true );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the setup changes\n lEvtSchedDead.setIntervalQt( 15000.0 );\n }", "@Override\r\n public int compareTo(Task t)\r\n { \r\n //information of task passed in\r\n String dateTime=t.dueDate;\r\n String[] dateNoSpace1=dateTime.split(\" \");\r\n String[] dateOnly1=dateNoSpace1[0].split(\"/\");\r\n String[] timeOnly1=dateNoSpace1[1].split(\":\");\r\n \r\n //information of task being compared\r\n String[] dateNoSpace=this.dueDate.split(\" \");\r\n String[] dateOnly=dateNoSpace[0].split(\"/\");\r\n String[] timeOnly=dateNoSpace[1].split(\":\");\r\n \r\n //compares tasks by...\r\n \r\n //years\r\n if(dateOnly1[2].equalsIgnoreCase(dateOnly[2])) \r\n { \r\n //months\r\n if(dateOnly1[0].equalsIgnoreCase(dateOnly[0]))\r\n {\r\n //days\r\n if(dateOnly1[1].equalsIgnoreCase(dateOnly[1]))\r\n {\r\n //hours\r\n if(timeOnly1[0].equalsIgnoreCase(timeOnly[0]))\r\n {\r\n //minutes\r\n if(timeOnly1[1].equalsIgnoreCase(timeOnly[1]))\r\n {\r\n //names\r\n if(this.taskName.compareTo(t.taskName)>0)\r\n { \r\n return -1;\r\n } \r\n else return 1;\r\n }\r\n //if minutes are not equal, find the soonest one\r\n else if(Integer.parseInt(timeOnly1[1])<Integer.parseInt(timeOnly[1]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if hours are not equal, find the soonest one\r\n else if(Integer.parseInt(timeOnly1[0])<Integer.parseInt(timeOnly[0]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if days are not equal, find the soonest one\r\n else if(Integer.parseInt(dateOnly1[1])<Integer.parseInt(dateOnly[1]))\r\n {\r\n return -1; \r\n }\r\n else return 1;\r\n }\r\n //if months are not equal, find the soonest one\r\n else if(Integer.parseInt(dateOnly1[0])<Integer.parseInt(dateOnly[0]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if years are not equal, find the soonest one \r\n else if(Integer.parseInt(dateOnly1[2])<Integer.parseInt(dateOnly[2]))\r\n {\r\n return -1;\r\n }\r\n else return 1;\r\n }", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "public static boolean updateTaskDate(Task task, LocalDate newDate){\n String previousName = task.getName(); // Get information of the task up for editing\n Color previousColor = task.getColor();\n try{\n String query = \"UPDATE TASK SET DATE = ? WHERE (NAME = ? AND COLOUR = ? AND DATE = ?)\";\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query);\n statement.setString(1, newDate.toString());\n statement.setString(2, previousName); // Add old values to the statement\n statement.setString(3, previousColor.toString());\n statement.setString(4, Calendar.selectedDay.getDate().toString());\n int result = statement.executeUpdate();\n return (result > 0);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }", "public boolean isDuring(LocalDateTime startTime, LocalDateTime endTime) {\n if (this.endTime.get().isBefore(startTime)\n || this.endTime.get().isEqual(startTime)) {\n return false;\n }\n\n return !(endTime.isBefore(this.startTime.get())\n || endTime.isEqual(this.startTime.get()));\n }", "private boolean validateEventEndDate(){\n //get event end date\n String eventEndDateInput = eventEndDateTV.getText().toString().trim();\n\n //if event end date == null\n if(eventEndDateInput.isEmpty())\n {\n eventEndDateTV.setError(\"Please set the end date for the event\");\n return false;\n }\n else{\n eventEndDateTV.setError(null);\n return true;\n }\n }", "@Test\n\tpublic void testSetEndDate() {\n\t\tassertNotEquals(calTest, initialJob.getEndDate());\n\t\tinitialJob.setEndDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getEndDate());\n\t}", "@Test\n public void testQuery() throws Exception {\n\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // There should be 4 rows\n MxAssert.assertEquals( \"Number of retrieved rows\", 4, iDataSet.getRowCount() );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 500 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n }", "@Test\n public void serialize_correct() {\n LocalDateTime taskTime = LocalDateTime.parse(\"25/08/2021 1200\", Task.INPUT_TIME_FORMAT);\n Task task = new DeadlineTask(\"Get help\", taskTime);\n task.markDone();\n assertEquals(\"Deadline,true,Get help,Aug 25 2021 - 12 00 PM\", task.serialize());\n }" ]
[ "0.6534165", "0.6417996", "0.6405388", "0.6394219", "0.6306654", "0.6293224", "0.6272373", "0.62482536", "0.62227917", "0.61811405", "0.61423516", "0.6067814", "0.6049352", "0.60107934", "0.5989312", "0.59881717", "0.59594333", "0.59484005", "0.5909604", "0.58867985", "0.5848609", "0.58469236", "0.58271843", "0.5808589", "0.5801242", "0.578688", "0.5758885", "0.5743401", "0.5735683", "0.5730394", "0.5715155", "0.57124937", "0.5707751", "0.5687338", "0.5684846", "0.5666766", "0.56504124", "0.56431264", "0.5635653", "0.56305206", "0.56083703", "0.5607742", "0.56018686", "0.55932176", "0.5576353", "0.55738544", "0.5573625", "0.55723596", "0.5570297", "0.5544474", "0.553987", "0.55376935", "0.5520103", "0.5517673", "0.5511896", "0.5500164", "0.54917455", "0.5485754", "0.54783714", "0.546479", "0.5455228", "0.54543537", "0.5452853", "0.5432609", "0.5422151", "0.5404425", "0.54029286", "0.53991824", "0.5393828", "0.539235", "0.5390505", "0.53853405", "0.5380063", "0.5379455", "0.5376205", "0.53653616", "0.53650814", "0.5358174", "0.53492844", "0.53455395", "0.53392935", "0.53372484", "0.5325396", "0.5321083", "0.5320537", "0.53190637", "0.53189754", "0.5315213", "0.5312079", "0.5306938", "0.528134", "0.5270757", "0.5268461", "0.52633256", "0.52593744", "0.5256106", "0.52453357", "0.5235626", "0.52341735", "0.5230311" ]
0.77395517
0
SubmitFiles constructor for the class
public SubmitFiles(CtrlPresenter ctrlPresenter){ vCtrlPresenter = ctrlPresenter; add(rootPanel); setTitle("Submit Files"); setSize(400,500); // We add a Listener to make the button do something selectClassroomsFileButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JFileChooser fc = new JFileChooser(); fc.setCurrentDirectory(new java.io.File("./data/import")); FileNameExtensionFilter filter = new FileNameExtensionFilter( "JSON Files", "json"); fc.setFileFilter(filter); int returnVal = fc.showOpenDialog(rootPanel); if(returnVal == JFileChooser.APPROVE_OPTION) { System.out.println("You chose to open this file: " + fc.getCurrentDirectory().getAbsolutePath()+ "/" + fc.getSelectedFile().getName()); classroomsFile = fc.getCurrentDirectory().getAbsolutePath()+ "/" + fc.getSelectedFile().getName(); selectClassroomsFileButton.setForeground(Color.green); } else { selectClassroomsFileButton.setForeground(Color.red); } } }); selectSubjectsFileButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JFileChooser fc = new JFileChooser(); fc.setCurrentDirectory(new java.io.File("./data/import")); FileNameExtensionFilter filter = new FileNameExtensionFilter( "JSON Files", "json"); fc.setFileFilter(filter); int returnVal = fc.showOpenDialog(rootPanel); if(returnVal == JFileChooser.APPROVE_OPTION) { System.out.println("You chose to open this file: " + fc.getCurrentDirectory().getAbsolutePath()+ "/" + fc.getSelectedFile().getName()); subjectsFile = fc.getCurrentDirectory().getAbsolutePath()+ "/" + fc.getSelectedFile().getName(); selectSubjectsFileButton.setForeground(Color.green); }else { selectClassroomsFileButton.setForeground(Color.red); } } }); nextbutton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { if (ctrlPresenter.setScenario(classroomsFile, subjectsFile)){ ctrlPresenter.selectConstraints(); }else{ setEnabled(false); setVisible(false); vCtrlPresenter.backToInit(); } } catch (Exception exc) { System.out.println(exc); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Uploader() {\n super();\n }", "public FileObject() {\n\t}", "public ActionFile() {\n }", "public CompleteMultipartUploadRequest() {}", "public FileUploadServlet() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public FileSet() {\n super();\n }", "protected YFiles(YAPIContext yctx, String func)\n {\n super(yctx, func);\n _className = \"Files\";\n //--- (generated code: YFiles attributes initialization)\n //--- (end of generated code: YFiles attributes initialization)\n }", "public SplitFile() {\n\t}", "public FileObjectFactory() {\n }", "public FileCreator() {\r\n initComponents();\r\n }", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "public UploadManager() {\n }", "public fileServer() {\n }", "public UploadSvl() {\r\n\t\tsuper();\r\n\t}", "public File() {\n }", "public FileUtility()\n {\n }", "public FileTest() {\n }", "public Files(String authToken){\n\t\tthis.authToken = authToken;\n\t}", "public UploadPDF() {\n }", "public FileBean() {}", "public UploadedFile() {\n date = new Date();\n }", "public FileUploadHelper() throws IOException {\n //For using dynamic path\n }", "public FileOpModel()\n\t{ \n\t\tthis(new ArrayList<>());\n\t}", "public Files files();", "private FileUtil() {\n \t\tsuper();\n \t}", "public FileServ() {\n\t\tsuper();\n\t}", "public FileReceiver(String filename) {\r\n _fileName = filename;\r\n }", "private FileManager() {}", "public SingleUploader() {\n this(null);\n }", "public UploadProjectAction() {\n\t\tsuper();\n\t}", "private FileUtility() {\r\n\t}", "public CvFile() {\n }", "public FileMergeSort() {\r\n }", "public MultipartHolder(List<File> files, MediaType fileMediaType, E payload) {\n\t\tthis.filesToSend = files;\n\t\tthis.payload = payload;\n\t\tthis.fileMediaType = fileMediaType;\n\t}", "public FileManager() {\n\t\t\n\t}", "public AppFile(AppFile aPar, WebFile aFile)\n{\n _parent = aPar; _file = aFile;\n}", "public PersistFile() {\n\n }", "public ExtractionWorker(String selectedFilePath, String username, String password, JTextArea infoTextArea, JButton fileSelectorButton){\n this.selectedFilePath = selectedFilePath;\n this.username = username;\n this.password = password;\n this.infoTextArea = infoTextArea;\n this.fileSelectorButton = fileSelectorButton;\n this.setProgress(10);\n }", "public FileUploadThreadHTTP(FileData[] filesDataParam,\n UploadPolicy uploadPolicy, JProgressBar progress) {\n super(filesDataParam, uploadPolicy, progress);\n uploadPolicy.displayDebug(\"Upload done by using the \"\n + getClass().getName() + \" class\", 40);\n // Name the thread (useful for debugging)\n setName(\"FileUploadThreadHTTP\");\n this.heads = new String[filesDataParam.length];\n this.tails = new String[filesDataParam.length];\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private FileUtil() {}", "protected FileMessage(MessageWireType wireId) {\n super(wireId);\n }", "public handleFileUpload() {\r\n\t\tsuper();\r\n\t}", "public FileNode() {\n\t}", "public sendFile_result(sendFile_result other) {\n }", "public Onlineupload() {\n initComponents();\n }", "public FileUploadService()\r\n\t{\r\n\t\tsetAccessKey(\"\");\r\n\t\tsetSecretKey(\"\");\r\n\t\tsetBucket(\"filehavendata\");\r\n\t\tdoRefreshConnection();\r\n\t}", "public MultiPart(){}", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "private FileEntry() {\n // intentionally empty\n }", "public FilesDatatype(String mime, String type) {\n\t\tsuper(Type.FILES, mime, type);\n\t}", "public SendFiles(String desIp) {\n this.init(desIp);\n }", "public filesMB() {\n }", "Path fileToUpload();", "public FileServer(){\n\t\tfilePath = new ConcurrentHashMap<String, String>();\n\t}", "public BrihaspatiProFile() {\n }", "public UploadForm() {\n initComponents();\n }", "public FileChooser(){\n super();\n }", "public FormDataManagement() {\n initComponents();\n }", "File(String fileName)\n {\n this.fileNameToFilterBy = fileName;\n }", "private FSArquivo(Construtor construtor) {\n nome = construtor.nome;\n tipoMedia = construtor.tipoMedia;\n base = construtor.base;\n prefixo = construtor.prefixo;\n sufixo = construtor.sufixo;\n }", "public CollectingFileToucher(String[] args)\n {\n super(args);\n mFiles = new ArrayList<File>();\n mFileFilter = new JavaSoftFileToucher(args);\n/*\n {\n public boolean accept(File inFile)\n {\n return true;\n }\n };\n*/\n }", "public FileControl( String fileName ) {\n this.fileName = fileName;\n }", "public AncFile() {\n }", "public FilePlugin()\n {\n super();\n \n //create the data directory if it doesn't exist\n File dataDir = new File(FilenameUtils.dataDir);\n if(!dataDir.exists()) FilePersistenceUtils.makeDirs(dataDir);\n }", "public InventarioFile(){\r\n \r\n }", "public OrFileFilter()\n {\n // Nothing to do\n }", "public FileInfo(File file) {\n this.file = file;\n }", "public SpecfileTaskHandler(IFile file, IDocument document) {\n \t\tsuper(file, document);\n \t}", "public UploadOperation(DropboxAccess srv, String f, long pid, long fid) {\n super(srv, pid, fid);\n file = new File(f);\n }", "private BlobFromFile() {\n }", "public UploadTest() {\n super();\n setMargin(false);\n this.addComponent(uploader);\n uploader.addListener((Upload.SucceededListener) this);\n\n\n }", "public CVSProcess() {\n }", "public WorkDataFile()\n\t{\n\t\tsuper();\n\t}", "public UploadOperation(DropboxAccess srv, File f, long pid, long fid) {\n super(srv, pid, fid);\n file = new File(f.getPath());\n }", "public Scouter(SynchronizedQueue<java.io.File> directoryQueue, java.io.File root) {\r\n this.root = root;\r\n this.directory_queue = directoryQueue;\r\n }", "public MultiPart(File content, String controlName, String mimeType, Map<String, String> headers, String charset,\n\t\t\tString fileName) {\n\t\tthis.content = content;\n\t\tthis.controlName = controlName;\n\t\tthis.mimeType = mimeType;\n\t\tthis.headers = headers;\n\t\tthis.charset = charset;\n\t\tthis.fileName = fileName;\n\t}", "public FileCount(int numFiles){\n this.numFiles = numFiles;\n }", "public Model(Controller controller)\r\n {\r\n // initialise instance variables\r\n setFiles(new ArrayList<>());\r\n setController(controller);\r\n }", "public synchronized void upload(){\n\t}", "public PublishFileSet(Path root) throws IOException {\n this.root = root;\n this.files = getFilesOnPath(root);\n }", "public FileCat(String file1, String file2) {\n this.file1 = file1;\n this.file2 = file2;\n extension = \".txt\";\n }", "FileData(String fileName, String contentType) {\n this.fileName = fileName;\n this.contentType = contentType;\n }", "public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.creationTime = 0;\n\t}", "public WorkDataFile(String filename)\n\t{\n\t\tsetFileName(filename);\n\t}", "public TarFile(File file) {\n this.file = file;\n }", "public Scouter(SynchronizedQueue<File> directoryQueue, File root ){\n this.m_DirectoryQueue = directoryQueue;\n this.f_Root = root;\n }", "public Driver() {\n setupFiles();\n }", "public HFile(HActivity act, HActivation task) {\n this.act = act;\n this.task = task;\n if (task != null) {\n task.files.add(this);\n } else if (act != null) {\n // activity only stores array of activity only files (templates, relations etc)\n act.files.add(this);\n }\n }", "public FileLines() {\r\n\t}", "File(String path, String type)\n {\n this.path=path;\n this.type=type;\n }", "public ClassFile(byte[] abClazz)\n {\n setBytes(abClazz);\n }", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public ShareFileHttpHeaders() {}", "public File_Delet() {\n\t\tsuper();\n\t}", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public DataInput( String filepath)\r\n {\r\n this.filepath = filepath;\r\n }", "public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }", "public Picture(String fileName)\n {\n // let the parent class handle this fileName\n super(fileName);\n }", "public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;" ]
[ "0.66980624", "0.6693121", "0.66284394", "0.66047996", "0.64634734", "0.6451717", "0.64515966", "0.6388944", "0.6303655", "0.6295451", "0.6293416", "0.62476355", "0.6246991", "0.6218941", "0.61767876", "0.61719537", "0.6162926", "0.6159029", "0.61432517", "0.6130411", "0.60939056", "0.60549045", "0.60361916", "0.60205454", "0.5993408", "0.5967611", "0.59669924", "0.59616005", "0.594699", "0.59382266", "0.5925157", "0.5924196", "0.59099025", "0.59060264", "0.5897045", "0.58764124", "0.5874361", "0.5872025", "0.58504415", "0.58451515", "0.5837122", "0.5835842", "0.5832623", "0.58234614", "0.58054376", "0.58045113", "0.5796266", "0.57698965", "0.5750167", "0.57349324", "0.57305086", "0.57062876", "0.56919634", "0.56887597", "0.56758595", "0.56757313", "0.56744754", "0.56702626", "0.56687003", "0.5658595", "0.5648999", "0.5636797", "0.5631661", "0.5630465", "0.56278026", "0.5621994", "0.561889", "0.56187326", "0.5603254", "0.55941963", "0.5585041", "0.55568004", "0.5542628", "0.5530847", "0.55278337", "0.55199075", "0.5512339", "0.550539", "0.5491409", "0.54860926", "0.546669", "0.54614097", "0.5459008", "0.54563075", "0.54561716", "0.54493", "0.54492754", "0.5436169", "0.54223615", "0.541337", "0.5412645", "0.5412538", "0.54086983", "0.5403665", "0.54032284", "0.5402065", "0.5402064", "0.54015803", "0.54015803", "0.5393014" ]
0.613461
19
list delegation information(delegation details page) eg.USA.jsp title & flag
public Picture getDelegationInfo(String delegation_name){ Connection conn = DBConnect.getConnection(); String sql = "select * from delegation_pic where type='common' and delegation_name = '" + delegation_name + "'"; Picture delegation = null; try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { delegation = new Picture(); delegation.setDelegation_name(rst.getString("delegation_name")); delegation.setPath(rst.getString("path")); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return delegation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getDelegationNames(){\t\t\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\tString sql = \"select delegation_name from delegation\";\r\n\t\tList<String> names = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\twhile(rst.next()) {\r\n\t\t\t\tnames.add(rst.getString(\"delegation_name\"));\r\n\t\t\t}\r\n\t\t\trst.close();\r\n\t\t\tpst.close();\r\n\t\t}catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n e.printStackTrace();\t\t\t\r\n\t\t}\r\n\t\treturn names;\r\n\t}", "public void listDoctors() {\n\n\t\ttry {\n\n\t\t\tList<Map<String, String>> doctorList = doctorDao.list();\n\n\t\t\tString did = \"DoctorId\";\n\t\t\tString dname = \"Doctor Name\";\n\t\t\tString speciality = \"Speciality\";\n\n\t\t\tSystem.out.printf(\"%10s%15s%15s\\n\", did, dname, speciality);\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\n\t\t\tfor (Map<String, String> aDoctor : doctorList) {\n\t\t\t\tSystem.out.printf(\"%10s%15s%15s\\n\", aDoctor.get(DoctorDao.ID), aDoctor.get(DoctorDao.NAME),\n\t\t\t\t\t\taDoctor.get(DoctorDao.SPECIALITY));\n\t\t\t}\n\n\t\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "public List<String> showPersonalDetails()\n {\n return userFan.showPersonalDetails();\n }", "public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "String pageDetails();", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void NameShow(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString find = request.getParameter(\"find\") == \"\" ? \"^^^^\" : request.getParameter(\"find\");\r\n\t\tSystem.out.println(find);\r\n\t\tint page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tList<Notice> list = service.selectByName(find);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"nameshow\", \"nameshow\");\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, resp);\r\n\t}", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "@GetMapping(\"/details\")\n public String goToPersonDetailsPage() {\n return PERSON_DETAILS.getPage();\n }", "void showPatients() {\n\t\t\t\n\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "@RequestMapping(value = \"/findAll_doctor.action\")\r\n\t\tpublic String findAll_doctor(HttpServletRequest request,Model model){\n\t model.addAttribute(\"DoctorList\", userService.findAll_doctor());\r\n\t\t\t\r\n\t\t\treturn \"list\";\r\n\t\t}", "public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}", "@RequestMapping(value = \"/retrieveInfo\", method = RequestMethod.GET)\n\tpublic ModelAndView retrievePatientsInfo() {\n\t\t\n\t\t\n\t\n\t\t\n\t\tlogger.info(\"Retrieve 1 :\");\n\t\t\n\t\t patientDetailsProcessor.retrieveInfoByEmailId();\n\t\t\n\t\treturn new ModelAndView(\"success\");\n\t}", "List<String> getResponsibleDoctorNames();", "List<String> getAttendingDoctorNames();", "public static void viewListOfRegistrants() {\n\t\tArrayList<Registrant> list_reg = getRegControl().listOfRegistrants();\r\n\t\tif (list_reg.size() == 0) {\r\n\t\t\tSystem.out.println(\"No Registrants loaded yet\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"List of registrants:\\n\");\r\n\t\t\tfor (Registrant registrant : list_reg) {\r\n\t\t\t\tSystem.out.println(registrant.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "String getPageFullName();", "private void getWalkinList(){\n sendPacket(CustomerTableAccess.getConnection().getWalkinList());\n \n }", "public void viewContactDetails() {\n wd.findElement(By.xpath(\"//tr/td[7]/a\")).click();\n }", "public static int PrintSearchList(NamingEnumeration sl, String dnbase) {\r\n\r\n int EntryCount = 0;\r\n if (sl == null) {\r\n return (EntryCount);\r\n } else {\r\n try {\r\n while (sl.hasMore()) {\r\n SearchResult si = (SearchResult) sl.next();\r\n EntryCount++;\r\n\r\n // *****************************\r\n // Formulate the DN.\r\n //\r\n String DN = null;\r\n if (dnbase.equals(\"\")) {\r\n DN = si.getName();\r\n } else if (!si.isRelative()) {\r\n DN = si.getName();\r\n } else if (si.getName().equals(\"\")) {\r\n DN = dnbase;\r\n } else {\r\n DN = si.getName() + \",\" + dnbase;\r\n }\r\n\r\n // ************************************\r\n // Is the DN from a deReference Alias?\r\n // If so, then we have a URL, we need\r\n // to remove the URL.\r\n //\r\n if (!si.isRelative()) {\r\n DN = extractDNfromURL(DN);\r\n }\r\n\r\n // ******************************************\r\n // Write out the DN.\r\n // Do not write out a JNDI Quoted DN.\r\n // That is not LDIF Compliant.\r\n //\r\n idxParseDN pDN = new idxParseDN(DN);\r\n if (pDN.isQuoted()) {\r\n System.out.println(\"dn: \" + pDN.getDN());\r\n } else {\r\n System.out.println(\"dn: \" + DN);\r\n }\r\n\r\n // Obtain Attributes\r\n Attributes entryattrs = si.getAttributes();\r\n\r\n // First Write out Objectclasses.\r\n Attribute eo = entryattrs.get(ObjectClassName);\r\n if (eo != null) {\r\n for (NamingEnumeration eov = eo.getAll(); eov.hasMore(); ) {\r\n System.out.println(eo.getID() + \": \" + eov.next());\r\n }\r\n } // End of check for null if.\r\n\r\n\r\n // Obtain Naming Attribute Next.\r\n if (!\"\".equals(pDN.getNamingAttribute())) {\r\n Attribute en = entryattrs.get(pDN.getNamingAttribute());\r\n if (en != null) {\r\n for (NamingEnumeration env = en.getAll(); env.hasMore(); ) {\r\n System.out.println(en.getID() + \": \" + env.next());\r\n }\r\n } // End of check for null if.\r\n } // End of Naming Attribute.\r\n\r\n\r\n // Finish Obtaining remaining Attributes,\r\n // in no special sequence.\r\n for (NamingEnumeration ea = entryattrs.getAll(); ea.hasMore(); ) {\r\n Attribute attr = (Attribute) ea.next();\r\n\r\n if ((!ObjectClassName.equalsIgnoreCase(attr.getID())) &&\r\n (!pDN.getNamingAttribute().equalsIgnoreCase(attr.getID()))) {\r\n for (NamingEnumeration ev = attr.getAll(); ev.hasMore(); ) {\r\n String Aname = attr.getID();\r\n Aname = Aname.toLowerCase();\r\n Object Aobject = ev.next();\r\n if (Aname.startsWith(UserPasswordName)) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n System.out.println(UserPasswordName + \": \" +\r\n \"********\");\r\n\r\n } else if (cnxidaXObjectBlob.equalsIgnoreCase(attr.getID())) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n String blob;\r\n blob = (String) Aobject;\r\n blob = blob.replace('\\n', ' ');\r\n int obloblen = blob.length();\r\n\r\n if (blob.length() > 64) {\r\n blob = blob.substring(0, 25) + \" ...... \" +\r\n blob.substring((blob.length() - 25));\r\n\r\n } // end of if.\r\n System.out.println(attr.getID() +\r\n \": \" + blob + \", Full Length:[\" + obloblen + \"]\");\r\n\r\n } else if (Aobject instanceof byte[]) {\r\n System.out.println(attr.getID() +\r\n \": [ Binary data \" + ((byte[]) Aobject).length + \" in length ]\");\r\n } else { // Show normal Attributes as is...\r\n System.out.println(attr.getID() +\r\n \": \" + Aobject);\r\n } // End of Else.\r\n\r\n } // End of Inner For Loop.\r\n } // End of If.\r\n } // End of Outer For Loop\r\n\r\n System.out.println(\"\");\r\n\r\n } // End of While Loop\r\n } catch (NamingException e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n return (-1);\r\n } catch (Exception e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n e.printStackTrace();\r\n return (-1);\r\n } // End of Exception\r\n\r\n } // End of Else\r\n\r\n return (EntryCount);\r\n\r\n }", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void displayUserDelegation() {\r\n userDelegationForm = new UserDelegationForm(mdiForm,true);\r\n userDelegationForm.display();\r\n }", "public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public void list() {\n // Sort by Last Name\n addressEntryList.sort(Comparator.comparing(AddressEntry::getLastName));\n\n // Iterate through AddressEntry and print out the data\n for (int i = 1; i <= addressEntryList.size(); i++) {\n System.out.print(i + \": \");\n System.out.println(addressEntryList.get(i-1).toString());\n }\n }", "private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }", "public void printList() {\n userListCtrl.showAll();\n }", "List<Map<String, Object>> listAccessprofileForSelect();", "public List<String> iterateProgramPageList();", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "List<Accessprofile> listAll();", "public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }", "public void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "private void show(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tInteger page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tint count = service.selectCount();\r\n\t\trequest.setAttribute(\"page\", page);\r\n\t\trequest.setAttribute(\"count\", count);\r\n\t\tList<Notice> list = service.selectAll((page - 1) * 5, 5);\r\n\t\trequest.setAttribute(\"list\", list);\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, response);\r\n\t}", "public void listSubscribers()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tId\\n\";\n\n\t\tList<Customer> customers = this.company.getSubs();\n\n\t\tfor(int i=0; i<customers.length(); i++)\n\t\t{\n\t\t\tstr += customers.get(i).getName() + \"\\t\" + customers.get(i).getSurname() + \"\\t\" + customers.get(i).getMail() + \"\\t\" + customers.get(i).getPassword() + \"\\t\" + customers.get(i).getId() + \"\\n\";\n\n\t\t}\n\t\t\n\t\tSystem.out.println(str);\n\n\n\t}", "public void outputInfo(){\n outputHeader();\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayInfo(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "public static int PrintSearchList(NamingEnumeration sl, String dnbase, boolean _NICE) {\r\n\r\n // ***************************************************\r\n // If not nice output, return the abridged version.\r\n if (!_NICE) {\r\n return (PrintSearchList(sl, dnbase));\r\n }\r\n\r\n int EntryCount = 0;\r\n if (sl == null) {\r\n return (EntryCount);\r\n } else {\r\n try {\r\n while (sl.hasMore()) {\r\n SearchResult si = (SearchResult) sl.next();\r\n EntryCount++;\r\n\r\n // *************************************\r\n // Formulate the DN.\r\n //\r\n String DN = null;\r\n if (dnbase.equals(\"\")) {\r\n DN = si.getName();\r\n } else if (!si.isRelative()) {\r\n DN = si.getName();\r\n } else if (si.getName().equals(\"\")) {\r\n DN = dnbase;\r\n } else {\r\n DN = si.getName() + \",\" + dnbase;\r\n }\r\n\r\n // ************************************\r\n // Is the DN from a deReference Alias?\r\n // If so, then we have a URL, we need\r\n // to remove the URL.\r\n //\r\n if (!si.isRelative()) {\r\n DN = extractDNfromURL(DN);\r\n }\r\n\r\n // ******************************************\r\n // Write out the DN.\r\n // Do not write out a JNDI Quoted DN.\r\n // That is not LDIF Compliant.\r\n //\r\n idxParseDN pDN = new idxParseDN(DN);\r\n if (pDN.isQuoted()) {\r\n System.out.println(\"dn: \" + pDN.getDN());\r\n } else {\r\n System.out.println(\"dn: \" + DN);\r\n }\r\n\r\n // Obtain Attributes\r\n Attributes entryattrs = si.getAttributes();\r\n\r\n // First Write out Objectclasses.\r\n Attribute eo = entryattrs.get(ObjectClassName);\r\n if (eo != null) {\r\n for (NamingEnumeration eov = eo.getAll(); eov.hasMore(); ) {\r\n System.out.println(eo.getID() + \": \" + eov.next());\r\n }\r\n } // End of check for null if.\r\n\r\n\r\n // Obtain Naming Attribute Next.\r\n if (!\"\".equals(pDN.getNamingAttribute())) {\r\n Attribute en = entryattrs.get(pDN.getNamingAttribute());\r\n if (en != null) {\r\n for (NamingEnumeration env = en.getAll(); env.hasMore(); ) {\r\n System.out.println(en.getID() + \": \" + env.next());\r\n }\r\n } // End of check for null if.\r\n } // End of Naming Attribute.\r\n\r\n\r\n // Finish Obtaining remaining Attributes,\r\n // in no special sequence.\r\n for (NamingEnumeration ea = entryattrs.getAll(); ea.hasMore(); ) {\r\n Attribute attr = (Attribute) ea.next();\r\n\r\n if ((!ObjectClassName.equalsIgnoreCase(attr.getID())) &&\r\n (!pDN.getNamingAttribute().equalsIgnoreCase(attr.getID()))) {\r\n for (NamingEnumeration ev = attr.getAll(); ev.hasMore(); ) {\r\n String Aname = attr.getID();\r\n Aname = Aname.toLowerCase();\r\n Object Aobject = ev.next();\r\n if (Aname.startsWith(UserPasswordName)) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n System.out.println(UserPasswordName + \": \" +\r\n \"********\");\r\n\r\n } else if (cnxidaXObjectBlob.equalsIgnoreCase(attr.getID())) {\r\n String blob;\r\n blob = (String) Aobject;\r\n System.out.println(attr.getID() +\r\n \": Data Length:[\" + blob.length() + \"]\");\r\n System.out.println(attr.getID() +\r\n \": \" + blob);\r\n\r\n } else if (Aobject instanceof byte[]) {\r\n System.out.println(attr.getID() +\r\n \": [ Binary data \" + ((byte[]) Aobject).length + \" in length ]\");\r\n } else { // Show normal Attributes as is...\r\n System.out.println(attr.getID() +\r\n \": \" + Aobject);\r\n } // End of Else.\r\n\r\n } // End of Inner For Loop.\r\n } // End of If.\r\n } // End of Outer For Loop\r\n\r\n System.out.println(\"\");\r\n\r\n } // End of While Loop\r\n } catch (NamingException e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n return (-1);\r\n } catch (Exception e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n e.printStackTrace();\r\n return (-1);\r\n } // End of Exception\r\n\r\n } // End of Else\r\n\r\n return (EntryCount);\r\n\r\n }", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address, long page) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), page);\n }", "public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\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} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\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\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}", "public void showSupplierList(){\n\t\tfor(int i = 0; i<supplierList.size();i++) {\n\t\t\tSystem.out.println(supplierList.get(i).getSupID()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getCompanyName()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getAddress()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getSaleRep());\n\t\t}\n\t}", "private static String getAgents(ArrayList<Agent> auth){\n String agents =\"\";\n try{\n Iterator<Agent> it = auth.iterator();\n int i = 1;\n while(it.hasNext()){\n Agent currAuth = it.next();\n String authorName = currAuth.getName(); //the name should be always there\n if(authorName==null || \"\".equals(authorName)){\n authorName = \"Author\"+i;\n i++;\n }\n if(currAuth.getURL()!=null &&!\"\".equals(currAuth.getURL())){\n agents+=\"<dd><a property=\\\"dc:creator schema:author prov:wasAttributedTo\\\" resource=\\\"\"+currAuth.getURL()+\"\\\" href=\\\"\"+currAuth.getURL()+\"\\\">\"+authorName+\"</a>\";\n }else{\n agents+=\"<dd>\"+authorName;\n }\n if(currAuth.getInstitutionName()!=null && !\"\".equals(currAuth.getInstitutionName()))\n agents+=\", \"+currAuth.getInstitutionName();\n agents+=\"</dd>\";\n } \n }catch(Exception e){\n System.out.println(\"Error while writing authors, their urls or their instititions.\");\n }\n return agents;\n }", "public void listarExamesDaDisciplina(){\r\n System.out.println(\"Docentes da disciplina\");\r\n for(int i=0;i<exames.size();i++){\r\n System.out.println(exames.get(i).getDisciplina().getNome());\r\n }\r\n }", "@Override\n public String getServletInfo() {\n return \"Create Blood Donation Reccord using JSP\";\n }", "@ResponseBody\n\t@RequestMapping(\"/showFullNameLikeTom\")\n\tpublic String showFullNameLikeTom() {\n\n\t\tString html = \"\";\n//\t\tfor (Employee emp : employees) {\n//\t\t\thtml += emp + \"<br>\";\n//\t\t}\n\n\t\treturn html;\n\t}", "@Override\n\tprotected String getListView() {\n\t\tthis.getRequest().setAttribute(\"typeList\",PhoneMemberEnum.values());\n\t\tthis.getRequest().setAttribute(\"useList\",PhoneMemberUseEnum.values());\n\t\tthis.getRequest().setAttribute(\"customerId\", ParamUtils.getParamValue(PhoneMemberUtil.CMCT_CUSOMETID));\n\t\tthis.getRequest().setAttribute(\"state\", \"UNUSE\");\n\t\tthis.getRequest().setAttribute(\"org\", SystemUtil.getCurrentOrg());\n\t\treturn \"cmct/phone/phoneUnMatchList\";\n\t}", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public KPAUIFindADoctorLandingPage openDoctorsAndLocationsPage(){\n getFindDocsAndLocationsLink().click();\n return new KPAUIFindADoctorLandingPage(driver);\n }", "@GetMapping(\"/listAllDirectors\")\n public String showAllDirectors(Model model) {\n\n// Director director = directorRepo.findOne(new Long(1));\n Iterable <Director> directorlist = directorRepo.findAll();\n\n model.addAttribute(\"alldirectors\", directorlist);\n return \"listAllDirectors\";\n }", "public final synchronized String list()\r\n { return a_info(true); }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, ClassNotFoundException, SQLException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n ResultSet rs = null;\n Statement st = null;\n Connection conn = null;\n String city1=request.getParameter(\"city\");\n \n try {\n int i=0;\n Class.forName(\"oracle.jdbc.OracleDriver\");\n conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.6.204:1521:xe\", \"dev\", \"dev123\");\n st = conn.createStatement();\n String str=\"select * from OWNER_DETAILS where CITY_NAME='\"+city1+\"'\";\n rs=st.executeQuery(str);\n out.println(\"<html><head><title>Your Organization Details</title></head><body background= \\\"Images/mh.png\\\" style=\\\"background-size:1400px 700px;background-repeat: no-repeat;\\\">\");\n out.println(\"<div align=center style='color:#FFFF00;' ><h2 >ORGANIZATIONS IN \"+city1.toUpperCase()+\" </h2></div>\");\n out.println(\" <a style='color:#00FF7F; font-size:20px' href=\\\"Selectcity.jsp\\\">Previous page</a>\");\n out.println(\"<style>table {border-collapse:collapse;width: 60%;}th, td {ext-align: left;padding: 8px}tr:nth-child(even){background-color:#7FFFD4}tr:nth-child(odd){background-color:#FFD700}th {background-color:#800080;color: white;}</style>\");\n out.println(\"<table border=2 align=center ><tr><th>Organization Name</th><th>Address</th><th>Phone Number</th><th>City</th><th>View Fare_Details/month</th>\");\n// st = conn.createStatement();\n// rs=st.executeQuery(\"select * from OWNER_DETAILS where CITY_NAME='\"+city1+\"'\");\n while(rs.next())\n {\n i++;\n String organizationname=rs.getString(\"HOTEL_NAME\");\n String address=rs.getString(\"ADDRESS\");\n String city=rs.getString(\"CITY_NAME\");\n String phno=rs.getString(\"PHONE_NUMBER\");\n String ORZ_ID=Integer.toString(rs.getInt(\"ORZ_ID\"));\n System.out.println(ORZ_ID);\n out.println(\"<tr><td>\");\n out.println(organizationname);\n out.println(\"</td><td>\");\n out.println(address);\n out.println(\"</td><td>\");\n out.println(phno);\n out.println(\"</td><td>\");\n out.println(city);\n out.println(\"</td><td>\");\n out.println(\"<a href='Fare_km.jsp?ORZ_ID=\"+ORZ_ID+\"'>View Fare_Details </a>\");\n out.println(\"</td></tr>\");\n }\n out.println(\"</table></body></html>\");\n if(i==0)\n {\n out.println(\"sorry this area no Organizatons\");\n }\n\n\n } finally { \n rs.close();\n st.close();\n conn.close();\n out.close();\n }\n }", "@Override\r\n\tpublic void showlist() {\n int studentid = 0;\r\n System.out.println(\"请输入学生学号:\");\r\n studentid = input.nextInt();\r\n StudentDAO dao = new StudentDAOimpl();\r\n List<Course> list = dao.showlist(studentid);\r\n System.out.println(\"课程编号\\t课程名称\\t教师编号\\t课程课时\");\r\n for(Course c : list) {\r\n System.out.println(c.getCourseid()+\"\\t\"+c.getCoursename()+\"\\t\"+c.getTeacherid()+\"\\t\"+c.getCoursetime());\r\n }\r\n \r\n\t}", "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\t\tList<Singer> singers = new ArrayList<>();\n\t\tsingers = serviceSinger.listar();\n\t\ttry {\n\t\t\tPrintWriter out = response.getWriter();\n\t\t\tfor(Singer singer : singers) {\n\t\t\t\tout.println(singer.getId() + \" || \" + singer.getFirst_name() + \" || \" \n\t\t\t\t\t\t+ singer.getLast_name() + \" || \" + singer.getBirth_date());\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public void printDetails() \r\n\t{\r\n\t\t// Print cells in path\r\n\t\tSystem.out.print(\"Path:\");\r\n\t\tfor(Cell c: path)\r\n\t\t\tSystem.out.print(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\t// Print path length\r\n\t\tSystem.out.println(\"\\nLength of path: \" + path.size());\r\n\t\t\r\n\t\t// Print visited cell amount\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\tSystem.out.println(\"Visited cells: \" + visitedCells + '\\n');\r\n\t}", "String getDoctorName();", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "public String listResearchers();", "public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LASTNAME);\n\n System.out.println(\"Name : \" + firstName + \" \" + lastName);\n }\n }", "@Override\n\tpublic void showCities() {\n\t\tArrayList<City> cities = Singleton.CityRegistDao().findAll();\n\t\tcityOptions = \"\";\n\t\tfor (City city : cities) {\n\t\t\tcityOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", city.getName(), city.getName());\n\t\t}\n\t\tSystem.out.println(cityOptions);\n\t}", "public void printModuleStudentInfo() {\t\r\n\tfor(int i =0; i<(StudentList.size()); i++) {\r\n\t\tStudent temp =StudentList.get(i);\r\n\t\tSystem.out.println(temp.getUserName());\r\n\t}\t\r\n}", "private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }", "private void fetchData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(hierarchyTitle);\r\n requesterBean.setFunctionType(GET_HIERARCHY_DATA);\r\n AppletServletCommunicator conn = new AppletServletCommunicator(connect,requesterBean);\r\n conn.send();\r\n ResponderBean responderBean = conn.getResponse();\r\n if(responderBean != null) {\r\n if(responderBean.isSuccessfulResponse()) {\r\n queryKey = hierarchyTitle;\r\n Hashtable htData = (Hashtable)responderBean.getDataObject();\r\n extractToQueryEngine(htData);\r\n }\r\n }else {\r\n //Server Error\r\n// throw new CoeusUIException(responderBean.getMessage(),CoeusUIException.ERROR_MESSAGE);\r\n }\r\n }", "@RequestMapping(\"page\")\n\tpublic String toList(HttpServletRequest request) {\n\t\trequest.setAttribute(\"listUsrSecurityView\", iUsrSecurityService.mySelectUserList());\n\t\trequest.setAttribute(\"listUsrInformation\", iUsrInformationService.list());\n\t\treturn \"/admin/usr/usrSecurity_list\";\n\t}", "@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}", "@RequestMapping(\"/showForm\")\n\t\tpublic String displayDetails(){\n\t\t\treturn \"mngt-page\";\n\t\t}", "@Override\r\n\tpublic String getPage() {\n\t\ttry {\r\n\t\t\tWriter wr = new OutputStreamWriter(\r\n\t\t\t\t\tnew FileOutputStream(OutputPath), \"utf-8\");\r\n\t\t\tList<String> colleges = IOUtil.read2List(\r\n\t\t\t\t\t\"property/speciality.properties\", \"GBK\");\r\n\t\t\tfor (String college : colleges) {\r\n\t\t\t\tfor (int i = 1; i < 10000; i++) {\r\n\t\t\t\t\tString html = getSeach(college, null, null, 1, i);\r\n\t\t\t\t\tif (html.equals(\"\")) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tDocument page = Jsoup.parse(html);\r\n\t\t\t\t\tElements authors = page.getElementsByAttributeValue(\r\n\t\t\t\t\t\t\t\"class\", \"listBox wauto clearfix\");\r\n\t\t\t\t\tfor (Element author : authors) {\r\n\t\t\t\t\t\tElement e = author.getElementsByAttributeValue(\"class\",\r\n\t\t\t\t\t\t\t\t\"xuezheName\").get(0);\r\n\t\t\t\t\t\tElement a = e.getElementsByAttributeValue(\"target\",\r\n\t\t\t\t\t\t\t\t\"_blank\").first();\r\n\t\t\t\t\t\tString name = a.text();\r\n\t\t\t\t\t\tString school = author.getElementsByAttributeValue(\r\n\t\t\t\t\t\t\t\t\"class\", \"f14\").text();\r\n\t\t\t\t\t\tString id = a.attr(\"href\");\r\n\t\t\t\t\t\tString speciallity = author\r\n\t\t\t\t\t\t\t\t.getElementsByAttributeValue(\"class\",\r\n\t\t\t\t\t\t\t\t\t\t\"xuezheDW\").first().text();\r\n\t\t\t\t\t\twr.write(school + \"\\t\" + id + \"\\t\" + speciallity\r\n\t\t\t\t\t\t\t\t+ \"\\r\\n\");\r\n\t\t\t\t\t\tSystem.out.println(i + \":\" + school);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twr.close();\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}\r\n\t\treturn null;\r\n\t}", "public void showHealthCarePersonaledata(){\n }", "private void printAllOwners(ArrayList<String> ownerList){\n for(int i = 0; i < ownerList.size(); i++){\n System.out.println(ownerList.get(i));\n }\n }", "public static void main_printList(){\n\n table.printApplicantTable();\n\n }", "public static void list_1_get() throws IOException{ \n\t\tlong current=0;\n\t\tlong start=System.currentTimeMillis();\n\t\tDocument doc=doc_get(\"http://www.yihaodian.com/product/listAll.do\"); \n\t\tif(doc!=null){\n\t\t\t\t\t\t\t\t\t //div>.allsort.sortwidth>div.fl>\n\t\t\t\t\t\t\t\t\t //div>.allsort.sortwidth>div.fr>\t\t\t\t\t\t\t\t\t\n\t\t\tElements links=doc.select(\"div>.allsort.sortwidth>div>div.alonesort\"); \n\t\t\tSystem.out.println(\"==========BEGIN================\");\n \n\t\t\tfor(Element link_alonesort:links){//get first class panel\n\t\t\t\tElements link_mt= link_alonesort.select(\"div.mt\");//first class property\n\t\t\t\t\n\t\t\t\t//----------\n\t\t\t\tSystem.out.println(\"-------------------------------------------------------------FIRST CLASS----------------------------------------------------------------------------\"); \n\t\t\t\tSystem.out.println(link_mt.text());\n\t\t\t\tTxtWriter.appendToFile(\"-------------------------------------------------------------FIRST CLASS----------------------------------------------------------------------------\",new File(\"File/idlist.txt\"));\n\t\t\t\tTxtWriter.appendToFile(link_mt.text(),new File(\"File/idlist.txt\"));\n\t\t\t\t//----------\n\t\t\t\t\n\t\t\t\tElements link_fores= link_alonesort.select(\"div.mc>dl\");\n\t\t\t\t/**BEGIN*******get second class panel**/\n\t\t\t\tfor(Element link_fore:link_fores){ \n\n\t\t\t\t\tElements link_dds=link_fore.select(\"dd\");\n\t\t\t\t\t/**BEGIN*******get second class panel**/\n\t\t\t\t\tfor(Element link_dd:link_dds){ \n\t\t\t\t\t\t\n\t\t\t\t\t\tElement link_dt=link_dd.parent().select(\"dt>a\").first();//second class property\n\t\t\t\t\t\t\n\t\t\t\t\t\t//----------\n\t\t\t\t\t\tSystem.out.println(\"---------------------------SECOND CLASS-------------------\");\n\t\t\t\t\t\tSystem.out.println(link_dt.text()); \n\t\t\t\t\t\tTxtWriter.appendToFile(\"---------------------------SECOND CLASS-------------------\",new File(\"File/idlist.txt\"));\n\t\t\t\t\t\tTxtWriter.appendToFile(link_dt.text()+\"---\"+link_dt.absUrl(\"href\"),new File(\"File/idlist.txt\"));\n\t\t\t\t\t\t//----------\n\t\t\t\t\t\t\n\t\t\t\t\t\tElements link_as=link_dd.select(\"em>span>a\"); //third class property \n\t\t\t\t\t\t/**BEGIN*******get third class panel**/\n\t\t\t\t\t\tfor(Element link_a:link_as){//get forth class panel\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//----------\n\t\t\t\t\t\t\tSystem.out.println(\"-------------------------------CLASS THREE BEGIN -------------------\"); \n\t\t\t\t\t\t\tSystem.out.println(link_a.text()+\"---\"+link_a.absUrl(\"href\")); //third class property \n\t\t\t\t\t\t\tTxtWriter.appendToFile(\"-------------------------------CLASS THREE BEGIN -------------------\",new File(\"File/idlist.txt\"));\n\t\t\t\t\t\t\tTxtWriter.appendToFile(link_a.text()+\"---\"+link_a.absUrl(\"href\"),new File(\"File/idlist.txt\"));\n\t\t\t\t\t\t\t//----------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint count=1;//count of page\n\t\t\t\t\t\t\tint repeat=0;//count of repeat items\n//\t\t\t\t\t\t\t/**版本三*/\n//\t\t\t\t\t\t\tString [] strListBackup = {};\n\t\t\t\t\t\t\tList<String> list=new ArrayList<String>();\n\t\t\t\t\t\t\twhile(true){ \n\t\t\t\t\t\t\t\tSystem.out.println(link_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"+String.valueOf(count)+\"-price-d0-f04-m1-rt0-pid-k/\");\n\t\t\t\t\t\t\t\tString [] strList=productsIdList_get(\n\t\t\t\t\t\t\t\t\t\tlink_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"\n\t\t\t\t\t\t\t\t\t\t+String.valueOf(count++)+\"-price-d0-f04-m1-rt0-pid-k/\"); \n\t\t\t\t\t\t\t\tSystem.out.println(list);//输出列表\n\t\t\t\t\t\t\t\tfor(int i=0;i<strList.length;i++){\n\t\t\t\t\t\t\t\t\tif(list.contains(String.valueOf(strList[i]))==false){\n\t\t\t\t\t\t\t\t\t\tlist.add(String.valueOf(strList[i]));\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\trepeat++;\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\tif(repeat>=50) //临界值\n\t\t\t\t\t\t\t\t\trepeat=0;\n\t\t\t\t\t\t\t\t\tbreak;\n\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//写入文件\n\t\t\t\t\t\t\t\tfor(int i=0;i<list.size()&&list.size()>0;i++){\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tTxtWriter.appendToFile(list.get(i),new File(\"File/idlist.txt\"));\n\t\t\t\t\t\t\t\t\t\tcurrent++;\n\t\t\t\t\t\t\t\t\t} catch (IOException e) { \n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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\tcurrent+=list.size();\n\t\t\t\t\t\t\t\tlist.clear();\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSet<String> set=new HashSet<String>();\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twhile(true){ \n//\t\t\t\t\t\t\t\t\n////\t\t\t\t\t\t\t\tSystem.out.println(link_a.absUrl(\"href\")+\"/b0/a-s1-v0-p\"\n////\t\t\t\t\t\t\t\t\t\t+String.valueOf(count)+\"-price-d0-f04-m1-rt0-pid-k/\"); \n////\t\t\t\t\t\t\t\thttp://www.yihaodian.com/ctg/s2/c5228-%E9%A5%AE%E7%94%A8%E6%B0%B4/b0/a-s1-v0-p2-price-d0-f04-m1-rt0-pid-k/\n//\t\t\t\t\t\t\t\tString [] strList=productsIdList_get( link_a.absUrl(\"href\")\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+\"b0/a-s1-v0-p\"\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+String.valueOf(count)\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+\"-price-d0-f04-m1-rt0-pid-k/\");\n//\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(strList));\n//\t\t\t\t\t\t\t\tfor(int i=0;i<strList.length;i++){\n//\t\t\t\t\t\t\t\t\tif(set.contains(strList[i])==false){\n//\t\t\t\t\t\t\t\t\t\tset.add(strList[i]);\n//\t\t\t\t\t\t\t\t\t}else{ \n//\t\t\t\t\t\t\t\t\t\trepeat++;\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\tif(repeat>=10){\n//\t\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t} \n//\t\t\t\t\t\t\tIterator<String> iterator=set.iterator();\n\n//\t\t\t\t\t\t\twhile(iterator.hasNext()){ \n//\t\t\t\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\t\t\t\tTxtWriter.appendToFile(iterator.next(),new File(\"File/idlist.txt\"));\n//\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n//\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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}\n//\t\t\t\t\t\t\tSystem.out.println(\"写入完成\");\n//\t\t\t\t\t\t\tset.clear();\n//\t\t\t\t\t\t\t\n//\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t/**版本一\n//\t\t\t\t\t\t\tfor(int i=1;i<50;i++){\n//\t\t\t\t\t\t\t\tSystem.out.println(\n//\t\t\t\t\t\t\t\t\t\tlink_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"\n//\t\t\t\t\t\t\t\t\t\t+String.valueOf(i)+\"-price-d0-f04-m1-rt0-pid-k/\");\n//\t\t\t\t\t\t\t\tString [] strList=productsIdList_get(\n//\t\t\t\t\t\t\t\t\t\tlink_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"\n//\t\t\t\t\t\t\t\t\t\t+String.valueOf(i)+\"-price-d0-f04-m1-rt0-pid-k/\");\n//\t\t\t\t\t\t\t\tfor(int j=0;j< strList.length;j++){\n//\t\t\t\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\t\t\t\tTxtWriter.appendToFile(strList[j],new File(\"File/idlist.txt\"));\n//\t\t\t\t\t\t\t\t\t} catch (IOException e) { \n//\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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\ttry {\n//\t\t\t\t\t\t\t\t\tThread.sleep(2000);\n//\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}*/\n//\t\t\t\t\t\t\t/**\n//\t\t\t\t\t\t\t * 版本二*/ \n//\t\t\t\t\t\t\tString [] strListBackup = {};\n//\t\t\t\t\t\t\twhile(true){ \n//\t\t\t\t\t\t\t\tSystem.out.println(link_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"+String.valueOf(count)+\"-price-d0-f04-m1-rt0-pid-k/\");\n//\t\t\t\t\t\t\t\tString [] strList=productsIdList_get(\n//\t\t\t\t\t\t\t\t\t\tlink_a.absUrl(\"href\")+\"b0/a-s1-v0-p\"\n//\t\t\t\t\t\t\t\t\t\t+String.valueOf(count)+\"-price-d0-f04-m1-rt0-pid-k/\");\n//\t\t\t\t\t\t\t\tcount++;\n//\t\t\t\t\t\t\t\tif(compareTo(strListBackup,strList)==false){//不相似\n//\t\t\t\t\t\t\t\t\tstrListBackup=strList;\n//\t\t\t\t\t\t\t\t}else{//相似\n//\t\t\t\t\t\t\t\t\tbreak;\n//\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\tfor(int i=0;i< strList.length;i++){\n//\t\t\t\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\t\t\t\tTxtWriter.appendToFile(strList[i],new File(\"File/idlist.txt\"));\n//\t\t\t\t\t\t\t\t\t\tcurrent++;\n//\t\t\t\t\t\t\t\t\t} catch (IOException e) { \n//\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\t\t\t} \n//\t\t\t\t\t\t\t\t} \n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\n//\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/**BEGIN*******get third class panel**/\n//\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t/**END********get second class panel*************/ \n//\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t\t/**END********get first class panel*************/ \n\t\t\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++\");\n//\t\t\t\tbreak;\n\t\t\t} \n\t\t\t//总数\n\t\t\tSystem.out.println(\"总数\"+current);\n\t\t\tTxtWriter.appendToFile(String.valueOf(current),new File(\"File/idlist.txt\"));\n\t\t\t//耗时\n\t\t\tlong end=System.currentTimeMillis();\n\t\t\tTxtWriter.appendToFile(\"耗时:\"+(end-start)+\"ms\",new File(\"File/idlist.txt\"));\n\t\t\tSystem.out.println(\"===========END==================\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Error\");\n\t\t}\n\t}", "java.lang.String getDetails();", "public void sendINFO(PrintWriter pw, GuardedDataset gds, ReqState rs) throws DAP2Exception, ParseException {\n\n if (_Debug)\n System.out.println(\"opendap.servlet.GetInfoHandler.sendINFO() reached.\");\n\n String responseDoc = null;\n ServerDDS myDDS = null;\n DAS myDAS = null;\n\n\n myDDS = gds.getDDS();\n myDAS = gds.getDAS();\n\n\n infoDir = rs.getINFOCache(rs.getRootPath());\n\n\n responseDoc = loadOverrideDoc(infoDir, rs.getDataSet());\n\n if (responseDoc != null) {\n if (_Debug)\n System.out.println(\"override document: \" + responseDoc);\n pw.print(responseDoc);\n } else {\n\n\n String user_html = get_user_supplied_docs(rs.getServerClassName(), rs.getDataSet());\n\n String global_attrs = buildGlobalAttributes(myDAS, myDDS);\n\n String variable_sum = buildVariableSummaries(myDAS, myDDS);\n\n // Send the document back to the client.\n pw.println(\"<html><head><title>Dataset Information</title>\");\n pw.println(\"<style type=\\\"text/css\\\">\");\n pw.println(\"<!-- ul {list-style-type: none;} -->\");\n pw.println(\"</style>\");\n pw.println(\"</head>\");\n pw.println(\"<body>\");\n\n if (global_attrs.length() > 0) {\n pw.println(global_attrs);\n pw.println(\"<hr>\");\n }\n\n pw.println(variable_sum);\n\n pw.println(\"<hr>\");\n\n pw.println(user_html);\n\n pw.println(\"</body></html>\");\n\n // Flush the output buffer.\n pw.flush();\n }\n\n }", "public abstract String showDetails();", "@Test\n\tpublic void listLocations(){\n\t\tList<Location> lists = locationService.queryLoctionsByLat(29.8679775, 121.5450105);\n\t\t//System.out.println(lists.size()) ;\n\t\tfor(Location loc : lists){\n\t\t\tSystem.out.println(loc.getAddress_cn());\n\t\t}\n\t}", "public void printList() {\n System.out.println(\"Disciplina \" + horario);\n System.out.println(\"Professor: \" + professor + \" sala: \" + sala);\n System.out.println(\"Lista de Estudantes:\");\n Iterator i = estudantes.iterator();\n while(i.hasNext()) {\n Estudante student = (Estudante)i.next();\n student.print();\n }\n System.out.println(\"Número de estudantes: \" + numberOfStudents());\n }", "public String printFileConsultationDetail() {\n String consultationDetail = \"\";\n for (String symptom : symptoms) {\n consultationDetail += symptom + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.SYMPTOM_DELIMITER;\n for (String diagnosis : diagnoses) {\n consultationDetail += diagnosis + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.DIAGNOSIS_DELIMITER;\n for (String prescription : prescriptions) {\n consultationDetail += prescription + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.PRESCRIPTION_DELIMITER;\n return consultationDetail;\n }", "public ArrayList<String> getAutorInformation(){\n // If there is no autor information\n if (indiceAutorInformation == -1){\n return null;\n }\n\n // Declare ArrayList\n ArrayList<String> autorInformation = new ArrayList<>();\n\n // Get information from third Child\n NodeList nList_name = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"family\");\n NodeList nList_IDNumber = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"identifier\");\n NodeList nList_personList = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"address\");\n NodeList nList_telecom = documentsEntrys.get(indiceAutorInformation).getElementsByTagName(\"telecom\");\n NodeList nList_creationDate = documentsEntrys.get(indiceMetaInformation).getElementsByTagName(\"date\"); // creation date is on the composition, the first <entry>, block\n\n //The arrayList contains information about residence of the autor\n // [0] => street\n // [1] => post code\n // [2] => city\n ArrayList<String> address = searchInterleavedHierarchy(nList_personList, \"line\");\n\n // get full name of author\n if(nList_name.getLength() != 0){\n autorInformation.add(0, ((Element) nList_name.item(0)).getAttribute(VALUE));\n } else {\n autorInformation.add(0, EMPTYSTRING);\n //logger.log(Level.INFO, \"The name of the author ist unknown!\");\n }\n\n // get life long doctor number\n String lifelongAutorNumber = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/LANR\", VALUE, VALUE);\n if(!util.String.isEmpty(lifelongAutorNumber)) {\n autorInformation.add(1, lifelongAutorNumber);\n } else {\n autorInformation.add(1, EMPTYSTRING);\n //logger.log(Level.INFO, \"The life long doctor number of the author is unknown!\");\n }\n\n // get street\n if(address.size() != 0) {\n autorInformation.add(2, address.get(0));\n } else {\n autorInformation.add(2, EMPTYSTRING);\n //logger.log(Level.INFO, \"The street of author is unknown!\");\n }\n\n // get post code\n if(address.size() >= 1) {\n autorInformation.add(3, address.get(1));\n } else {\n autorInformation.add(3, EMPTYSTRING);\n //logger.log(Level.INFO, \"The post code of author is unknown!\");\n }\n\n // get city\n if(address.size() >= 2) {\n autorInformation.add(4, address.get(2));\n } else {\n autorInformation.add(4, EMPTYSTRING);\n //logger.log(Level.INFO, \"The city of author is unknown!\");\n }\n\n // Get telephone number\n String telephoneNumber = util.XML.searchHierarchyByTagAndAttribute(nList_telecom, \"system\", VALUE,\"phone\", VALUE, VALUE);\n if(!util.String.isEmpty(telephoneNumber)) {\n autorInformation.add(5, telephoneNumber);\n } else {\n autorInformation.add(5, EMPTYSTRING);\n //logger.log(Level.INFO, \"The phone number of autor is unknown!\");\n }\n\n // Get eMail\n String eMail = util.XML.searchHierarchyByTagAndAttribute(nList_telecom, \"system\", VALUE, \"email\", VALUE, VALUE);\n if(!util.String.isEmpty(eMail)) {\n autorInformation.add(6, eMail);\n } else {\n autorInformation.add(6, EMPTYSTRING);\n //logger.log(Level.INFO, \"The eMail of autor is unknown!\");\n }\n\n // Get creation date\n if(nList_creationDate.getLength() != 0){\n autorInformation.add(7, ((Element) nList_creationDate.item(0)).getAttribute(VALUE));\n } else {\n autorInformation.add(7, EMPTYSTRING);\n //logger.log(Level.INFO, \"The creation date of bmp is unknown!\");\n }\n\n // get pharmacy ID\n String pharmacyID = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/IDF\", VALUE, VALUE);\n if(!util.String.isEmpty(pharmacyID)) {\n autorInformation.add(8, pharmacyID);\n } else {\n autorInformation.add(8, EMPTYSTRING);\n //logger.log(Level.INFO, \"The pharmacy ID is unknown!\");\n }\n\n // get hospital ID\n String hospitalID = util.XML.searchHierarchyByTagAndAttribute(nList_IDNumber, SYSTEM, VALUE, \"http://kbv.de/KIK\", VALUE, VALUE);\n if(!util.String.isEmpty(hospitalID)) {\n autorInformation.add(9, hospitalID);\n } else {\n autorInformation.add(9, EMPTYSTRING);\n //logger.log(Level.INFO, \"The hospital ID is unknown!\");\n }\n\n return autorInformation;\n }", "private void listaUsuario(HttpServletRequest req, HttpServletResponse resp) {\n\t\t\r\n\t}", "public void user_details()\n {\n\t boolean userdetpresent =userdetails.size()>0;\n\t if(userdetpresent)\n\t {\n\t\t //System.out.println(\"User details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"User details report is not present\");\n\t }\n }", "public List <Person> getDetails(List <Person> listOfPerson)\n\t{\n\t\tSystem.out.println(\"Enter the First Name of the Person you want the details of:\");\n\t\tString name = Utility.inputString();\t\n\t\tfor(int i = 0; i < listOfPerson.size(); i++)\n\t\t{\n\t\t\tif(listOfPerson.get(i).getFname().equals(name))\n\t\t\t{\n\t\t\t\tPerson temp = listOfPerson.get(i);\n\t\t\t\tSystem.out.println(temp.toString());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Person not found\");\n\t\t\t}\n\t\t}\n\t\treturn listOfPerson;\n\t}", "private static String showDetails (String name){\n\t\t//We find the user\n\t\tint position = findContact(name);\n\t\t//If not found, we return null\n\t\tif (position==-1)\n\t\t\treturn null;\n\t\t//We return the details invoking the toString method\n\t\telse\n\t\t\treturn contacts[position].toString();\n\t}", "public void list() {\r\n\t\tfor (String key : nodeMap.keySet()) {\r\n\t\t\tNodeRef node = nodeMap.get(key);\r\n\t\t\tSystem.out.println(node.getIp() + \" : \" + node.getPort());\r\n\t\t}\t\t\r\n\t}", "public void listAll(){\n /*\n for(int i=0;i<employeesList.size();i++){\n System.out.println(i);\n Employee employee=(Employee)employeesList.get(i);\n System.out.print(employeesList.get(i));\n */ \n \n \n //for used to traverse employList in order to print all employee's data\n for (int i = 0; i < employeesList.size(); i++) {\n System.out.println(\"Name: \" + employeesList.get(i).getName()); \n System.out.println(\"Salary_complement: \"+employeesList.get(i).getSalary_complement()); \n \n }\n \n \n }", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "public void vSwDscPageInfo(String browser) {\r\n\t\tvSwDscPgInfo(browser);\r\n\t\tfor (cnti = 0; cnti < swAppDscs.length; cnti++) {\r\n\t\t\tif (cnti > owners.length - 1) {\r\n\t\t\t\tvSwDSCOwner(swDscs[cnti], owners[cnti - 3]);\r\n\t\t\t\tselUtils.vColVal(\"swdsc_filetype_col_val_xpath\", swDscs[cnti],\r\n\t\t\t\t\t\tfileType[1]);\r\n\t\t\t} else {\r\n\t\t\t\tvSwDSCOwner(swDscs[cnti], owners[cnti]);\r\n\t\t\t\tselUtils.vColVal(\"swdsc_filetype_col_val_xpath\", swDscs[cnti],\r\n\t\t\t\t\t\tfileType[0]);\r\n\t\t\t}\r\n\t\t\tselUtils.vColVal(\"swdsc_token_col_val_xpath\", swDscs[cnti],\r\n\t\t\t\t\ttokenNo[cnti]);\r\n\t\t}\r\n\t}", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}" ]
[ "0.60456246", "0.59237874", "0.5862736", "0.58269584", "0.5746058", "0.5707793", "0.57006663", "0.5681669", "0.5679083", "0.5604543", "0.5596762", "0.55226815", "0.54814816", "0.53976375", "0.5389781", "0.5368173", "0.5356948", "0.5355108", "0.5334331", "0.53023934", "0.52932703", "0.5292772", "0.5292431", "0.52910924", "0.52530855", "0.5245681", "0.5241171", "0.5239892", "0.52393466", "0.52374154", "0.5237362", "0.52294755", "0.52210885", "0.5208272", "0.5197501", "0.5180895", "0.5178691", "0.5167143", "0.5159834", "0.5137379", "0.5127247", "0.5113015", "0.5109854", "0.51047236", "0.5103283", "0.50988805", "0.5074829", "0.50726634", "0.5040324", "0.50317186", "0.5021033", "0.5018061", "0.5015487", "0.50134724", "0.5011849", "0.50107574", "0.5005246", "0.49955046", "0.49882326", "0.498317", "0.49798173", "0.4963551", "0.49627355", "0.49610752", "0.49566218", "0.49556205", "0.49501565", "0.49475294", "0.49459666", "0.49383196", "0.49315375", "0.49307308", "0.4928865", "0.49274495", "0.492153", "0.49200013", "0.49173242", "0.4915866", "0.49100456", "0.49016884", "0.4894732", "0.48931065", "0.4886351", "0.4882881", "0.48776308", "0.48726648", "0.48712903", "0.486678", "0.4859676", "0.48557955", "0.48544496", "0.48544228", "0.48538658", "0.48508194", "0.4850366", "0.4837291", "0.48365977", "0.48363513", "0.483085", "0.48265377" ]
0.5131524
40
medal listList events that have won medals eg.USA.jsp
public List<String> getMedalList(String delegation_name){ List<String> list = new ArrayList<String>(); Connection conn = DBConnect.getConnection(); String sql = "select event_name,team_name as name,rank,type,T1.sports_name " + "from team_result T1 join event using(event_name) " + "where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '"+delegation_name+"' union " + "select event_name,athlete_name as name,rank,type,T1.sports_name " + "from individual_result T1 join event using(event_name)" + "where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '"+delegation_name+"'"; try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { list.add(rst.getString("event_name")); list.add(rst.getString("name"));//team name list.add(String.valueOf(rst.getInt("rank"))); list.add(rst.getString("type")); list.add(rst.getString("sports_name")); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "public MedicationEvents getMedicationEventsByTitle(MedicationEvents medicationEvents);", "private ArrayList<Event> getSemesterOneEvents(EventList eventList) throws PacException {\n ArrayList<Event> list = new ArrayList<>();\n for (int i = 0; i < eventList.list.size(); i++) {\n Event event = eventList.find(i);\n if (event.dateTimeIsParsed()) {\n if (event.getMonth() > 6) {\n list.add(event);\n }\n }\n }\n return list;\n }", "private void displayEvents(ArrayList<String> eventDescriptionList,\n ArrayList<ArrayList<String>> monthList, int maxNumberOfEvents) {\n for (int k = 0; k < maxNumberOfEvents; k++) {\n for (int j = 0; j < monthList.size(); j++) {\n if (!monthList.get(j).get(k).equals(\"\")) {\n eventDescriptionList.add(j, monthList.get(j).get(k));\n }\n }\n displayTable.printBodyOfSix(eventDescriptionList);\n eventDescriptionList = removePreviousElements(eventDescriptionList);\n }\n }", "@Override\n\tpublic List<Mood> moodList() {\n\t\tMoodDAO moodDAO = new MoodDAOimp();\n\t\treturn moodDAO.showMoods();\n\t}", "public String eventList() {\n\n\t\tString str = \"\";\n\t\tif(map.isEmpty()) {\n\t\t\tstr = \"No Events Scheduled Yet\";\n\t\t\treturn str;\n\t\t}\n\t\tstr = \"One Time Events: \\n\";\n\t\tstr = str + \"________________ \\n2020\\n\";\n\n\t\tfor(Map.Entry<LocalDate, ArrayList<Event>> entry: map.entrySet() ) {\n\n\t\t\tLocalDate currentDate = entry.getKey();\n\t\t\tArrayList<Event> list = map.get(currentDate);\n\t\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"EEEE MMMM dd\");\n\t\t\tDateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern(\"HH:mm a\");\n\t\t\tfor(int i = 0;i<list.size();i++) {\n\t\t\t\tEvent e = list.get(i);\n\t\t\t\tif(e.recurring == false) {\n\t\t\t\t\tstr = str + \" \"+formatter.format(currentDate) +\" \" + timeFormatter.format(e.sTime) + \" - \" + timeFormatter.format(e.eTime) + \" \" + e.name + \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//for recurring events, add this later\n\t\t/*\n\t\tstr = str + \"\\nRecurring Events:\\n\";\n\t\tstr = str + \"________________ \\n\";\n\t\tif(recurringEvents.size()==0) {\n\t\t\tstr = str + \"No Recurring Event Scheduled\\n\";\n\t\t\treturn str;\n\t\t}\n\t\tfor(int i = 0; i<recurringEvents.size(); i++) {\n\t\t\tEvent e = recurringEvents.get(i);\n\t\t\tstr = str + e.name +\"\\n\";\n\t\t\tstr = str + e.rdays + \" \" + e.sTime + \" \" + e.eTime + \" \" + e.recurringStartDate + \" \" + e.eDate +\"\\n\";\n\t\t}\n\t\t */\n\t\treturn str;\n\n\t}", "public ArrayList<MoodEvent> getMoodListAfterFilter(){\n return moodListAfterFilter;\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 MedicationEvents getMedicationEvents(int medicationEventsId);", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.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(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "public MainList getSummaryForcast() {\n\t\t\n\t\tMainList mainLists = new MainList();\n\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\n\t\tforcasts = forcastLists.stream().filter(p -> this.getFilterDuration(p.getDt_txt(), new Date()) == true).collect(Collectors.toList());\n\t\t\n\t\tmainLists.setListItem(forcasts);\n\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\n\t\treturn mainLists;\n\t}", "public void displayOnderwerpList() {\n List<Onderwerp> onderwerpList = winkel.getOnderwerpList();\n System.out.println(\"Kies een onderwerp: \");\n for (int i = 0; i < onderwerpList.size(); i++) {\n System.out.println((i + 1) + \". \" + onderwerpList.get(i));\n }\n }", "@RequestMapping(value = \"/events\", method = RequestMethod.GET)\r\n public ModelAndView showEvents() {\r\n ModelAndView mav = new ModelAndView(\"events\");\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n List<Event> events = dataAccessService.getEventsForUser(user, null);\r\n mav.addObject(\"events\", events);\r\n return mav;\r\n }", "private ArrayList<Event> getSemesterTwoEvents(EventList eventList) throws PacException {\n ArrayList<Event> list = new ArrayList<>();\n for (int i = 0; i < eventList.list.size(); i++) {\n Event event = eventList.find(i);\n if (event.dateTimeIsParsed()) {\n if (event.getMonth() > 0 && event.getMonth() < 7) {\n list.add(event);\n }\n }\n }\n return list;\n }", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "public void filterByMyMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "List<DenialReasonDto> showAll();", "public void filterByFoMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public List<WebElement> getEventInformation() {\n return driver.findElements(By.className(\"list_embedded\")).get(0).findElements(By.className(\"linked\"));\n }", "public void listGoods() {\n\t\tfor (String goodId : goods.keySet()) {\n\t\t\tBoolean value = goods.get(goodId).forSale();\n\t\t\tSystem.out.println(goodId + \" --> For sale: \" + value);\n\t\t}\n\t}", "public void filterByFoReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterFo.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public void filterByMyReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterMy.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "private static List<Event> filterEvents(List<Event> allEvents) {\n Set<String> myLocations = MainActivity.getPreferences()\n .getStringSet(LOCATIONS_INTEREST.get(), null);\n if (myLocations != null) {\n List<Event> result = new ArrayList<>();\n for (Event event : allEvents) {\n String location = event.getLocation().getName();\n if (myLocations.contains(location)) {\n result.add(event);\n }\n }\n return result;\n }\n return allEvents;\n }", "Collection<MovieEarned> moviesEarned();", "private void displayUrgent(ToDoList toDoList) {\n int i = 1;\n\n System.out.println(\"Urgent Items:\");\n\n for (Item item : toDoList.getItems()) {\n if (Integer.parseInt(item.getDaysBeforeDue()) <= 1) {\n Categories c = item.getCategory();\n System.out.println(i + \". \" + item.getTitle() + \" due in \" + item.getDaysBeforeDue() + \" days, \" + c);\n i++;\n }\n }\n }", "@Test\n\tpublic void testGetAvailableEvents() {\n\n\t\tArrayList<Object[]> showEvents = new ArrayList<Object[]>();\n\n\t\ttry {\n\t\t\trequest = new MockHttpServletRequest(\"GET\", \"/displayEvent.htm\");\n\t\t\t\n\t\t\tcontroller.getAvailableEvents(request, response);\t\t\n\t\t\t\n\t\t\tshowEvents = eventDao.showAllEvents();\n\t\t\t\n\t\t} catch (Exception exception) {\t\t\t\n\t\t\tfail(\"Exception\");\n\t\t}\n\t\tassertEquals(showEvents.size() > 0, true);\n\t}", "@Override\n public void showMedicineInfo(HttpServletRequest request, HttpServletResponse response) {\n List<Medicine> list = new ArrayList<Medicine>();\n try{\n String sql = \"select * from medicine_info\";\n System.out.println(sql);\n ResultSet rs = JDBCUtiles.query(sql);\n int pur_price, sale_price, validity;double discount;\n while (rs.next()){\n Medicine medicine = new Medicine();\n medicine.setMed_name(rs.getString(\"med_name\"));\n medicine.setMed_id(rs.getString(\"med_id\"));\n medicine.setMde_class(rs.getString(\"class\"));\n medicine.setFactor(rs.getString(\"factor\"));\n pur_price = Integer.parseInt(rs.getString(\"purchase_price\"));\n medicine.setPurchase_price(pur_price);\n sale_price = Integer.parseInt(rs.getString(\"sale_price\"));\n medicine.setSale_price(sale_price);\n validity = Integer.parseInt(rs.getString(\"validity\"));\n medicine.setValidity(validity);\n discount = Double.parseDouble(rs.getString(\"discount\"));\n medicine.setDiscount(discount);\n medicine.setImg_url(rs.getString(\"img_url\"));\n list.add(medicine);\n }\n\n request.setAttribute(\"list\",list);\n rs.close();\n JDBCUtiles.close();\n request.getRequestDispatcher(\"/medicinesM.jsp\").forward(request,response);\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public void awardMedals(){\n ArrayList<Competeable> podium = new ArrayList<>();\n Competeable winningAthletes = event.get(0);\n while( podium.size() < 3){\n for (Competeable competitor : event) {\n if(competitor.getSkillLevel() > winningAthletes.getSkillLevel())\n winningAthletes = competitor;\n }\n podium.add(winningAthletes);\n event.remove(winningAthletes);\n }\n podium.get(0).addMedal(MedalType.GOLD);\n podium.get(1).addMedal(MedalType.SILVER);\n podium.get(2).addMedal(MedalType.BRONZE);\n }", "public String showAllEvents() {\n String allEvents = \"\";\n for (Event e: events)\n {\n allEvents = allEvents + e.getName() + \"\\n\";\n }\n return allEvents;\n }", "public ArrayList<String> returnUrgentItems() {\n ArrayList<String> urgentItemNames = new ArrayList<>();\n\n if (toDoList.getItems().isEmpty()) {\n urgentItemNames.add(\"No More Tasks! Yay!!\");\n }\n\n int i = 1;\n for (Item item : toDoList.getItems()) {\n if (Integer.parseInt(item.getDaysBeforeDue()) <= 1) {\n Categories c = item.getCategory();\n urgentItemNames.add(i + \". \" + item.getTitle() + \" due in \" + item.getDaysBeforeDue() + \" days, \" + c);\n i++;\n }\n }\n\n return urgentItemNames;\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "public void listentry(ArrayList<HashMap<String, String>> Event_list){\n\n\t\t\t\tListAdapter adapter = new SimpleAdapter(getActivity(), Event_list, R.layout.funnel_list,\n\t\t\t\t\t\tnew String[] {VALUE1,KEY1,VALUE2}, new int[] {\n\t\t\t\t R.id.funnel_list_text,R.id.funnel_list_amount,R.id.funnel_list_time});\n\t\t \n\t\t\t\t\tthis.setListAdapter(adapter);\n\t\t\t \n\t\t\t\t\n\t\t\t\n \t\tListView lv = getListView();\n\t\t\n \t\t \t\t\t\t \n\t}", "public void displayAllEvents()\r\n {\r\n \r\n List<Event> list;\r\n \r\n list=fillArrayList();\r\n \r\n List list2=new ArrayList();\r\n list2.add(\"Id\");\r\n list2.add(\"Event name\");\r\n list2.add(\"Organizer\");\r\n list2.add(\"date\");\r\n list2.add(\"fees\");\r\n \r\n \r\n String output = \"\";\r\n output=\"Id \"+\"Event Name \"+\"Organizer \"+\"Date \"+\" Fees($)\"+\"\\n\";\r\n System.out.println();\r\n for(int i = 0; i<list.size(); i++){\r\n \r\n String everything2 = list.get(i).toString();\r\n\r\n output += everything2+\"\\n\"+\"\\n\"; \r\n }\r\n JOptionPane.showMessageDialog(null,output,\"AllEvents\",JOptionPane.INFORMATION_MESSAGE);\r\n allMenuClass.mainMenu();\r\n }", "List<Medicine> getAllMedicines();", "public void showAppointments()\n {\n System.out.println(\"=== Day \" + dayNumber + \" ===\");\n int time = START_OF_DAY;\n for(Appointment appointment : appointments) {\n System.out.print(time + \": \");\n if(appointment != null) {\n System.out.println(appointment.getDescription());\n }\n else {\n System.out.println();\n }\n time++;\n }\n }", "public void getEventByName()\r\n {\r\n \r\n boolean b=false;\r\n \r\n \r\n String output = \"\";\r\n output=\"Id \"+\"Event Name \"+\"Organizer \"+\"Date \"+\" Fees($)\"+\"\\n\"; \r\n \r\n \r\n List<Event> list2=new ArrayList();\r\n do{\r\n \r\n List<Event> list1=fillArrayList();\r\n \r\n \r\n String string=JOptionPane.showInputDialog(\"Enter Event Name to search Event by Name\");\r\n \r\n for(Event e:list1)\r\n {\r\n if(e.getName().equals(string))\r\n {\r\n list2.add(e);\r\n b=true;\r\n break;\r\n }\r\n else\r\n {\r\n \r\n b=false;\r\n }\r\n }\r\n if(!b)\r\n JOptionPane.showMessageDialog(null,\"Event \"+string+\" Does not exist! please try again\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n }while(!b);\r\n \r\n \r\n for(int i = 0; i<list2.size(); i++){\r\n \r\n String everything2 = list2.get(i).toString();\r\n\r\n output += everything2+\"\\n\"; \r\n }\r\n JOptionPane.showMessageDialog(null,output,\"Event\",JOptionPane.INFORMATION_MESSAGE);\r\n \r\n allMenuClass.userMenu();\r\n }", "void showPatients() {\n\t\t\t\n\t}", "List<ExamPackage> getListExpired();", "public void viewWaveDetails(){\n\t\ttry{\n\t\t\tdriver.switchTo().defaultContent();\n\t\t\tList<WebElement> listOfFrames = libManhattanCommonFunctions.getElementsByProperty(\"//iframe[contains(@id,'ext-gen')]\",\"XPATH\");\n\t\t\tdriver.switchTo().frame(listOfFrames.get(listOfFrames.size() - 1));\n\t\t\tThread.sleep(4000);\n\t\t\tWebElement wbWavesCheckbox = driver.findElement(By.id(\"checkAll_c0_dataForm:listView:dataTable\"));\n\t\t\twbWavesCheckbox.click();\n\t\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnView\"), \"ViewButton\");\n\t\t\tlibManhattanCommonFunctions.waitForElementClickable(\"//*[@name='statisticsTab']\", 12000);\n\t\t}catch(Exception e){\n\t\t\treport.updateTestLog(\"WavesPage Page\", \"Element Not Found\", Status.FAIL);\n\t\t} \n\t}", "private ArrayList<Event> getSemesterEvents(EventList eventList, int semester) throws PacException {\n ArrayList<Event> list;\n switch (semester) {\n case 1:\n list = getSemesterOneEvents(eventList);\n break;\n case 2:\n list = getSemesterTwoEvents(eventList);\n break;\n default:\n throw new PacException(EMPTY_EVENT_LIST_ERROR_MESSAGE);\n }\n return list;\n }", "public List<Embarcation> getAllDisponible(){\n\t\tSQLiteDatabase mDb = open();\n\t\tCursor cursor = mDb.rawQuery(\"SELECT * FROM \" + TABLE_NAME +\" WHERE \"+DISPONIBLE+\" = 1\", null);\n\t\t\n\t\tList<Embarcation> resultList = cursorToEmbarcationList(cursor);\n\t\t\n\t\tmDb.close();\n\t\t\n\t\treturn resultList;\n\t}", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "public static void displayPlurals(ArrayList<String> list){\r\n //Loops through the list\r\n for(String str:list){\r\n if(str.endsWith(\"s\"))\r\n System.out.print(str.toUpperCase() + \" \");\r\n }\r\n System.out.println();\r\n }", "java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();", "java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();", "public void viewDetailAllPlantCanHarvest() {\n\t\tint i = 1;\n\t\tint l = 0;//check Harvest\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\t\tl++;\n\t\t\t}\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\tif(!checkPlantCanHarvest()){\n\t\t\tSystem.out.println(\"No Plant\");\n\t\t}\n\t\telse{\n\t\tfor(Plant p : getListofplant()){\n\t\t\tif(p.canHarvest()){\n\t\t\tSystem.out.println( i + \" \" + p.viewDetail() + \" StatusWater : \" + p.getStatusWater()\n\t\t\t+ \" StatusHarvest : \" + p.getStatusHarvest());\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnMonday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnMonday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND mondayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND mondayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND mondayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n\n }", "@Given(\"^the list of mortgages matching the filter criterion are available$\")\r\n\t public void the_list_of_mortgages_matching_the_filter_criterion_are_available() {\r\n\t\t\t//Assertion for 5 yr Fixed new WebDriverWait(driver, 45); WebElement element8\r\n\t\t\tWebDriverWait wait18= new WebDriverWait(driver, 60);\r\n\t\t\twait18.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\".//tr[contains(@data-product-code, '131258')]\")));\r\n\t\t\tWebElement element8= driver.findElement(By.xpath(\".//tr[contains(@data-product-code, '131258')]\")); \r\n\t\t\t//element8.click();\r\n\t\t\tString name3 = element8.getText();\r\n\t\t\tString prdType3 =(name3.substring(0,10)); \r\n\t\t\tSystem.out.println(\"The Product Type is\" + name3.substring(0,10)); \r\n\t\t\tAssert.assertEquals(\"5 yr Fixed\", prdType3);\r\n\t }", "private void displayMonths(ArrayList<ArrayList<String>> monthList) {\n ArrayList<String> eventDescriptionList = initializeDescriptionList();\n int maxNumberOfEvents = getMaxNumberOfEvents(monthList);\n monthList = make2DArray(monthList, maxNumberOfEvents);\n displayEvents(eventDescriptionList, monthList, maxNumberOfEvents);\n\n }", "public List<TimeRange> getUnavailableTimesForAttendees(Collection<Event> events, Collection<String> listOfAttendees){\n List<TimeRange> unavailableTimes = new ArrayList<>();\n for(String attendee : listOfAttendees) {\n for(Event event : events) {\n Set<String> eventAttendees = event.getAttendees();\n if(eventAttendees.contains(attendee)) {\n unavailableTimes.add(event.getWhen());\n }\n }\n }\n return unavailableTimes;\n }", "protected void displayListView(ListView eventsList) {\n final ArrayAdapter adapter = new EventsAdapter(this, events);\n eventsList.setAdapter(adapter);\n eventsList.setVisibility(View.VISIBLE);\n }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnWednesday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnWednesday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND wednesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND wednesdayMeal IS \" +\n \"true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND wednesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "@Override\r\n\tpublic Map<String, Double> getFilmAttendance() {\n\t\tList<Film> films = filmDao.getAllFilms();\r\n\t\tMap<String, Double> result = new HashMap<String, Double>();\r\n\t\tfor(Film film:films){\r\n\t\t\tif(film.getTicketSold()==0){\r\n\t\t\t\tresult.put(film.getName(), (double) 0);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresult.put(film.getName(), (double) (Math.round((double)film.getTicketSold()/film.getTicketPrepared()*1000)/(double)10));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static boolean testDaoLireMedicament() {\n boolean ok = true;\n ArrayList<Medicament> lesMedicaments = new ArrayList<Medicament>();\n try {\n lesMedicaments = daoMedicament.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des medicaments\");\n for (Medicament unMedicament: lesMedicaments){\n System.out.println(unMedicament);\n }\n return ok;\n }", "@RequestMapping(value =\"/MedicalDetailsExcel\", method = RequestMethod.GET)\n\n\tpublic ModelAndView downLoadMedicalResults(HttpServletRequest request, HttpSession session) {\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\n\t\t\tList<RespondentBean> list = admindao.getMedicalDetails();\n\n\t\t\treturn new ModelAndView(\"MedicalDetailsExcel\", \"list\", list);\n\t\t}\n\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "public void viewListofHomes() {\n\t\ttry {\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to get list of homes\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to get list of homes\");\n\t\t}\n\t}", "ArrayList<HabitEvent> getHabitEvents();", "List<Hospital> listall();", "public void getShowRecord(List<MentalShowStruct> list) {\n/* 55 */ this.component.getRevertShowList(list);\n/* */ }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnThursday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnThursday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND thursdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND thursdayMeal IS \" +\n \"true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND thursdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "public boolean hasList() {\n return msgCase_ == 5;\n }", "public DefaultListModel<Person> getAllPeopleFromEventDLM(Event event)\r\n\t{\r\n\t\tDefaultListModel<Person> list = new DefaultListModel<Person>();\r\n\t\t\r\n\t\tfor(Person person : this.getAllPeopleFromEvent(event))\r\n\t\t\tlist.addElement(person);\r\n\t\t\r\n\t\treturn list;\r\n\t}", "@Override\n public List<IMedicine> getMedicine() {\n return medicineList;\n }", "public static ArrayList<HashMap<String, String>> getUnseenMessagesFromAppliance() {\r\n\t\tPrettyTime p = new PrettyTime();\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\r\n\t\ttry (Connection connection = Connect.getConnection();) {\r\n\t\t\t// Begin Stored Procedure -- Jeevan\r\n\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t.prepareCall(\"{CALL get_unseen_status_messages_from_appliance()}\");\r\n\t\t\tResultSet result = prepareCall.executeQuery();\r\n\t\t\t// End Stored Procedure\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\tmap.put(\"messageId\", String.valueOf(result.getInt(\"alarm_id\")));\r\n\t\t\t\tmap.put(\"messageFrom\", result.getString(\"appliance_GSMno\"));\r\n\t\t\t\tTimestamp dateTime = result.getTimestamp(\"alarm_time\");\r\n\t\t\t\tDate date = new Date(dateTime.getTime());\r\n\t\t\t\t// System.out.println(p.format((date)));\r\n\t\t\t\tmap.put(\"messageDate\", p.format((date)));\r\n\t\t\t\tmap.put(\"applianceId\", result.getString(\"appliance_id\"));\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\t\t\tresult.close();\r\n\t\t\tprepareCall.close();\r\n\t\t\tconnection.close();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}", "public List<Events> getAllSystemEventsListForAll();", "public List<Event> getEventsList() {\n List<Event> eventDetails = eventRepository.findAll();\n return eventDetails;\n }", "@RequestMapping(value = \"/medication/{id}\")\n public String medicationDetection(@PathVariable(\"id\") Integer visitId,Model model) {\n // Getting List of All diagnosis in System \n List<Medication> signedMedications=medicationService.getSignedMedications();\n List<Medication> unSignedMedications=medicationService.getUnSignedMedications();\n //// Model Attributes \n model.addAttribute(\"signedMedications\", signedMedications);\n model.addAttribute(\"unSignedMedications\", unSignedMedications);\n model.addAttribute(\"visitId\",visitId);\n // return View\n return PACKAGE_ROOT+\"prescriptions\";\n }", "public boolean hasList() {\n return msgCase_ == 5;\n }", "@RequestMapping(value = \"/all\", method = RequestMethod.GET)\r\n\t@PreAuthorize(\"hasRole('ROLE_MODERATOR')\")\r\n\tpublic String showAllItems(Model model) {\r\n\t\tList<WebItem> webItemList = new ArrayList<WebItem>();\r\n\r\n\t\twebItemList.addAll(webItemService.getWebItems(1000));\r\n\t\t//order webItems by descending createdate order\r\n\t\tCollections.sort(webItemList, new Comparator<WebItem>() {\r\n\t\t\t public int compare(WebItem o1, WebItem o2) {\r\n\t\t\t return o2.getCreateDate().compareTo(o1.getCreateDate());\r\n\t\t\t }\r\n\t\t});\r\n\r\n\t\tmodel.addAttribute(\"webItemList\", webItemList);\r\n\t\treturn \"webItemByUserView\";\r\n\t}", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "private void watched(boolean w){\n for (Movie temp:\n baseMovieList) {\n if(temp.isWatched() == w)\n movieList.add(temp);\n }\n }", "public static void showAllHouseNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.HOUSE);\n }", "public DefaultListModel<Event> getAllEventsFromDateDLM(Calendar date)\r\n\t{\r\n\t\tDefaultListModel<Event> eventsList = new DefaultListModel<Event>();\r\n\t\t\r\n\t\tArrayList<Event> list = this.getAllEventsFromDate(date);\r\n\t\tlist.sort(null);\r\n\t\t\r\n\t\tfor(Event event : list )\r\n\t\t{\t\t\t\r\n\t\t\teventsList.addElement(event);\r\n\t\t}\r\n\t\t\r\n\t\treturn eventsList;\r\n\t}", "@DISPID(7) //= 0x7. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n visiotool.IVEventList eventList();", "@Override\n\tpublic List<FestivalVO> festivalList() {\n\t\treturn sqlSession.selectList(\"com.project.app.festival.festivalList\");\n\t}", "@GetMapping(value = \"/medicalRecords\")\n\tpublic List<MedicalRecord> get() {\n\t\t\n\t\tlogger.info(\"The user requested the url : /medicalRecords with the GET method\");\n\t\t\n\t\tlogger.info(\"Httpstatus : \" + HttpStatus.OK + \", Message : Response received with success\");\n\n\t\treturn medicalRecordService.getAllMedicalRecords();\n\n\t}", "@Override\r\n\tpublic List<PolicyMastVO> getNowPolicyMastList() {\n\t\treturn policyMastDao.getNowPolicyMastList();\r\n\t}", "public List<Map<String, Object>> getStatisticsByStaff(String classify);", "public DefaultListModel<Event> getAllEventsFromDateWithPlaceDLM(Calendar date)\r\n\t{\r\n\t\tDefaultListModel<Event> eventsList = new DefaultListModel<Event>();\r\n\t\t\t\r\n\t\tArrayList<Event> list = this.getAllEventsFromDate(date);\r\n\t\tlist.sort(null);\r\n\t\t\r\n\t\tfor(Event event : list )\r\n\t\t{\r\n\t\t\tif (! event.getPlace().isEmpty())\r\n\t\t\t\teventsList.addElement(event);\r\n\t\t}\r\n\t\t\r\n\t\treturn eventsList;\r\n\t}", "public void displayEvents() {\n List<EventModel> day1List=new ArrayList<>();\n List<EventModel> day2List=new ArrayList<>();\n List<EventModel> day3List=new ArrayList<>();\n List<EventModel> day4List=new ArrayList<>();\n\n// noEventsPreRevels = findViewById(R.id.cat_pre_revels_no_events);\n noEventsDay1 = findViewById(R.id.cat_day_1_no_events);\n noEventsDay2 = findViewById(R.id.cat_day_2_no_events);\n noEventsDay3 = findViewById(R.id.cat_day_3_no_events);\n noEventsDay4 = findViewById(R.id.cat_day_4_no_events);\n\n if (mDatabase == null)\n return;\n\n RealmResults<ScheduleModel> scheduleResultsRealm = mDatabase.where(ScheduleModel.class).equalTo(\"catId\", cat_id).findAll().sort(\"startTime\");\n scheduleResults = mDatabase.copyFromRealm(scheduleResultsRealm);\n for (ScheduleModel schedule : scheduleResults) {\n// if (schedule.getIsRevels().contains(\"0\")) {\n// Log.d(TAG, \"displayEvents: PreRevels\");\n// EventDetailsModel eventDetails = mDatabase.where(EventDetailsModel.class).equalTo(\"eventID\", schedule.getEventID()).findFirst();\n// EventModel event = new EventModel(eventDetails, schedule);\n// preRevelsList.add(event);\n// } else {\n\n Log.d(TAG, schedule.toString());\n EventDetailsModel eventDetails = mDatabase.where(EventDetailsModel.class).equalTo(\"eventId\", schedule.getEventId()).findFirst();\n EventModel event = new EventModel(eventDetails, schedule);\n switch (event.getDay()) {\n case \"1\":\n day1List.add(event);\n break;\n case \"2\":\n day2List.add(event);\n break;\n case \"3\":\n day3List.add(event);\n break;\n case \"4\":\n day4List.add(event);\n break;\n }\n// }\n }\n// preRevelsEventSort(preRevelsList);\n eventSort(day1List);\n eventSort(day2List);\n eventSort(day3List);\n eventSort(day4List);\n\n// RecyclerView recyclerViewDayPreRevels = findViewById(R.id.category_pre_revels_recycler_view);\n// if (preRevelsList.isEmpty()) {\n// noEventsPreRevels.setVisibility(View.VISIBLE);\n// recyclerViewDayPreRevels.setVisibility(View.GONE);\n// } else {\n// recyclerViewDayPreRevels.setAdapter(new CategoryEventsAdapter(preRevelsList, this, getBaseContext(), false));\n// recyclerViewDayPreRevels.setNestedScrollingEnabled(false);\n// recyclerViewDayPreRevels.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n// }\n\n RecyclerView recyclerViewDay1 = findViewById(R.id.category_day_1_recycler_view);\n if(day1List.isEmpty()){\n noEventsDay1.setVisibility(View.VISIBLE);\n recyclerViewDay1.setVisibility(View.GONE);\n }\n else{\n recyclerViewDay1.setAdapter(new CategoryEventsAdapter(day1List, this, getBaseContext(), true, this));\n recyclerViewDay1.setNestedScrollingEnabled(false);\n recyclerViewDay1.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay2 = findViewById(R.id.category_day_2_recycler_view);\n if(day2List.isEmpty()){\n noEventsDay2.setVisibility(View.VISIBLE);\n recyclerViewDay2.setVisibility(View.GONE);\n }\n else{\n recyclerViewDay2.setAdapter(new CategoryEventsAdapter(day2List, this, getBaseContext(), true, this));\n recyclerViewDay2.setNestedScrollingEnabled(false);\n recyclerViewDay2.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay3 = findViewById(R.id.category_day_3_recycler_view);\n if(day3List.isEmpty()){\n noEventsDay3.setVisibility(View.VISIBLE);\n recyclerViewDay3.setVisibility(View.GONE);\n }\n else {\n recyclerViewDay3.setAdapter(new CategoryEventsAdapter(day3List, this, getBaseContext(), true, this));\n recyclerViewDay3.setNestedScrollingEnabled(false);\n recyclerViewDay3.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n\n RecyclerView recyclerViewDay4 = findViewById(R.id.category_day_4_recycler_view);\n if(day4List.isEmpty()){\n noEventsDay4.setVisibility(View.VISIBLE);\n recyclerViewDay4.setVisibility(View.GONE);\n }\n else {\n recyclerViewDay4.setAdapter(new CategoryEventsAdapter(day4List, this, getBaseContext(), true, this));\n recyclerViewDay4.setNestedScrollingEnabled(false);\n recyclerViewDay4.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n }\n }", "public ArrayList<Showing> getAllShowings() {\n return filmDisplay.getAllShowings();\n }", "public void showemplist() throws Exception {\n\t\t Log.info(\"*******started execution of showemplist() in TC_hrms_102***********\");\n\t\tActions action = new Actions(g.driver);\n\t\taction.moveToElement(g.driver.findElement(By.linkText(\"PIM\"))).perform();\n\t\tThread.sleep(3000);\n\t\t\n\t\t//clicking on addemployee submenu link\n\t\tg.driver.findElement(By.id(\"menu_pim_viewEmployeeList\")).click();\n\t\tThread.sleep(3000);\n\t\tSystem.out.println(\"Clicked on Employee List submenu\");\n\t\t Log.info(\"*******end of execution of showemplist() in TC_hrms_102***********\");\n\t}", "@Override\r\n\tpublic List<HomePack> queryOilList(Date start, Date end,\r\n\t\t\tList<String> station) {\n\t\tList<HomePack> list = homePageDao.queryOilList(start, end, station);\r\n\t\treturn list;\r\n\t}", "private List<Summit> visibleSummits(PanoramaParameters p) {\n ArrayList<Summit> visibleSummits = new ArrayList<>();\n for (Summit s : summits) {\n GeoPoint obsPos = p.observerPosition();\n double distanceToSummit = obsPos.distanceTo(s.position());\n double azimuthToSummit = obsPos.azimuthTo(s.position());\n double angularDistanceToSummit = angularDistance(azimuthToSummit, p.centerAzimuth());\n double maxD = p.maxDistance();\n\n // we check if the distance to the sumit is less than the\n // maxDistance and if the angularDistance between the observer and\n // the summit is less than the horizontal field of view divided by\n // two\n if (distanceToSummit <= maxD\n && abs(angularDistanceToSummit) <= p.horizontalFieldOfView()\n / 2.0) {\n ElevationProfile e = new ElevationProfile(cDEM, obsPos,\n azimuthToSummit, distanceToSummit);\n DoubleUnaryOperator f = PanoramaComputer.rayToGroundDistance(e,\n p.observerElevation(), 0);\n double summitElevation = -f.applyAsDouble(distanceToSummit);\n double slope = atan2(summitElevation, distanceToSummit);\n\n // we ckeck if the slope is in the vertical field of view\n if (abs(slope) <= p.verticalFieldOfView() / 2.0) {\n DoubleUnaryOperator f1 = rayToGroundDistance(e, p.observerElevation(), summitElevation / distanceToSummit);\n double rayToGround = firstIntervalContainingRoot(f1, 0,\n distanceToSummit, STEP);\n\n // if the distance with the rayToGround is bigger than\n // distance to sommit minus the tolerance we add the summit\n // to the list\n if (rayToGround >= distanceToSummit - TOLERANCE) {\n visibleSummits.add(s);\n }\n }\n }\n }\n\n visibleSummits.sort((a, b) -> {\n int yARounded = yRounded(a, p);\n int yBRounded = yRounded(b, p);\n if (yARounded == yBRounded) {\n return compare(b.elevation(), a.elevation());\n }\n return compare(yARounded, yBRounded);\n });\n return unmodifiableList(visibleSummits);\n }", "public void handleSidePanelListClick(Event event) {\n try {\n this.executeCommand(\"list e\");\n Index index = this.listPanel.getEventIndex(event);\n if (index == null) {\n this.executeCommand(\"list all e\");\n index = this.listPanel.getEventIndex(event);\n }\n assert index != null;\n this.executeCommand(\"view \" + index.getOneBased());\n } catch (CommandException | ParseException e) {\n logger.info(\"Invalid command: list e + view index\");\n resultDisplay.setFeedbackToUser(e.getMessage());\n }\n }", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "@When(\"Hotels List page has finished loading\")\n public void listpage_i_am_on_list_page() {\n listPage = new HotelsListPage(driver);\n listPage.check_page_title();\n }", "public List<String> getEligibleForAutoApproval(Date todayAtMidnight);", "public void eventsPublishedByPub() {\r\n int index = 1;\r\n System.out.println(\"Events published by this publisher: \");\r\n for (Event event : pubEvents) {\r\n System.out.println(index + \"->\" + event + \"\\n\");\r\n index++;\r\n }\r\n }", "public void findDefeated(){\n for(Enemy enemy: enemies){\n if(enemy.getCurrHP() <= 0 || enemy.isFriendly()){\n if (!defeated.contains(enemy)) {\n defeated.add(enemy);\n }\n }\n }\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public void listMeetingAnswers(String nameMeeting) throws MeetingException{\n \tif(this.thisAnswerExist(nameMeeting)==false){\n \t\tthrow new NoMeetingOrNoAnswers();\n \t}\n \tfor (Answer a : answers){\n \t\tif(a.getMeeting().getDescription().equals(nameMeeting)){\n \t\t\tif(a.getResult().equals(AttendingResult.yes) ){\n \t\t\t\tSystem.out.print(\"Attending to Meeting\");\n \t\t\t\tSystem.out.println(a);\n \t\t\t\tSystem.out.println();\n \t\t\t}else if(a.getResult().equals(AttendingResult.WantASpot)){\n \t\t\t\tSystem.out.print(\"In waiting list\");\n \t\t\t\tSystem.out.println(a);\n \t\t\t\tSystem.out.println();\n \t\t\t}else if(a.getResult().equals(AttendingResult.no)){\n \t\t\t\tSystem.out.print(\"No Attending to Meeting\");\n \t\t\t\tSystem.out.println(a);\n \t\t\t\tSystem.out.println();\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }", "List<MedicalRecord> getAllPatientMedicalRecords(HttpSession session, int patientId);", "@Override\r\n\tpublic List<SweetItem> showAllSweetItems() {\n\t\treturn null;\r\n\t}", "@Path(\"/showAll\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<EventData> getAllEvent() throws JSONException {\n\t\tString today_frm = DateUtil.getNow(DateUtil.SHORT_FORMAT_TYPE);\n\t\tList<Event> list = eventService.getEventsByType(today_frm,\n\t\t\t\tEventType.EVENTTODAY);\n\t\tList<EventData> d = null;\n\t\tif (null != list && list.size() > 0) {\n\t\t\td = getEventsByDateList(list);\n\t\t} else {\n\t\t\td = new ArrayList<EventData>();\n\t\t}\n\t\treturn d;\n\t}" ]
[ "0.55245894", "0.55192244", "0.55005586", "0.54906344", "0.545823", "0.5440552", "0.535931", "0.532291", "0.5271527", "0.52698123", "0.5208354", "0.5138998", "0.5117698", "0.50790185", "0.5024209", "0.5019719", "0.49940652", "0.4974806", "0.49714783", "0.49591935", "0.49314204", "0.48857784", "0.48748913", "0.4872144", "0.4867397", "0.48647174", "0.48619843", "0.4860846", "0.48602396", "0.48584184", "0.48583236", "0.48526043", "0.48478568", "0.48423296", "0.48336506", "0.4823371", "0.48174542", "0.48020983", "0.4800329", "0.47973874", "0.4783136", "0.4781015", "0.47671762", "0.47665945", "0.47604752", "0.4750596", "0.4747914", "0.47462276", "0.4745971", "0.4743639", "0.4739626", "0.47341117", "0.4732334", "0.47317928", "0.47300836", "0.47296405", "0.47273308", "0.4681855", "0.46734706", "0.46631855", "0.4648704", "0.4647493", "0.4638123", "0.46347535", "0.4630009", "0.4628218", "0.46224356", "0.46194378", "0.46131393", "0.46130496", "0.46126336", "0.46083283", "0.46033204", "0.45991293", "0.45942765", "0.4590981", "0.45907497", "0.4589704", "0.45863032", "0.458578", "0.45833868", "0.45806497", "0.45762622", "0.4576086", "0.45745745", "0.45727712", "0.4572679", "0.4572662", "0.45725495", "0.45714763", "0.45709682", "0.4569525", "0.45693064", "0.45633563", "0.45623353", "0.45609257", "0.45589137", "0.45556906", "0.4550032", "0.45499983" ]
0.5275828
8
medal listlist each record picture
public List<String> getListPic(String delegation_name){ List<String> list = new ArrayList<String>(); Connection conn = DBConnect.getConnection(); String sql = "select path,event_name,team_name,rank " + "from team_result join sports_pic using(sports_name) " + "where type='logo' and state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '" + delegation_name + "' union " + "select path,event_name,athlete_name,rank " + "from individual_result join sports_pic using (sports_name) " + "where type='logo' and state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '" + delegation_name + "'"; try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { String path = rst.getString("path"); list.add(path); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listPictures()\r\n {\r\n int index = 0;\r\n while(index >=0 && index < pictures.size()) \r\n {\r\n String filename = pictures.get(index);\r\n System.out.println(index + \": \"+ filename);\r\n index++;\r\n }\r\n }", "public List<CameraRecord> loadThumbnail();", "public void printPhotos() {\n\t\t//System.out.println(\"Loading photos: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.getUsers() != null) {\n\t\t\t//System.out.println(listOfPhotos);\n\t\t\tlistOfPhotos.clear();\n\t\t\tlistOfPhotos = FXCollections.observableArrayList();\n\t\t\tPhotoListDisplay.setItems(listOfPhotos);\n\t\t\t\n\t\t\tfor(Photo phot: AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum()) {\n\t\t\t\t//System.out.println(\"displaying photo\");\n\t\t\t\tString path = phot.getPathToPhoto(); \n\t\t\t\t//Pass to FileInputStream \n\t\t\t\tFileInputStream inputstream = null;\n\t\t\t\ttry {\n\t\t\t\t\tinputstream = new FileInputStream(path);\n\t\t\t\t} catch (FileNotFoundException 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\t//Instantiate an Image object \n\t\t\t\tImage image1 = new Image(inputstream);\n\t\t\t\t\n\t\t\t\t//Image image1 = photo.photo;\n\t\t\t\tImageView pic = new ImageView();\n\t\t\t\tpic.setFitWidth(340);\n\t\t\t\tpic.setFitHeight(180);\n\t\t\t\tpic.setImage(image1);\n\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\tphot.setImage(pic);\n\t\t\t\t//System.out.println(\"after adding: \" + listOfPhotos);\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"after if stmt: \" + listOfPhotos);\n\t\t\tPhotoListDisplay.setItems(listOfPhotos);\n\t\t\t\n\t\t\t//System.out.println(\"after setitems: \" + listOfPhotos);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//System.out.println(listOfPhotos);\n\t}", "public List<Pic> list() {\n\t\treturn picDao.list();\n\t}", "public List<Upfile> findLinerPic(Long itickettypeid);", "private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}", "private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }", "@Override\r\n public View getView(final int position, View convertView, ViewGroup parent) {\r\n\tView row = convertView;\r\n\tMedicalRecordHolder holder = null;\r\n\r\n\tif (row == null) {\r\n\t LayoutInflater inflater = ((Activity) context).getLayoutInflater();\r\n\t row = inflater.inflate(layoutResourceId, parent, false);\r\n\r\n\t holder = new MedicalRecordHolder();\r\n\r\n\t holder.imgRecords = (ImageView) row.findViewById(R.id.imgRecords);\r\n\t // holder.imgSecondPic = (ImageView) row.findViewById(R.id.imgSecondPic);\r\n\t holder.txtDoctorName = (TextView) row.findViewById(R.id.txtDoctorName);\r\n\t holder.txtHospitalName = (TextView) row.findViewById(R.id.txtHospitalName);\r\n\t holder.txtCreatedDate = (TextView) row.findViewById(R.id.txtCreatedDate);\r\n\t holder.imgDownload = (ImageView) row.findViewById(R.id.imgDownload);\r\n\t holder.imgRecordsType = (ImageView) row.findViewById(R.id.imgRecordsType);\r\n\t holder.imgRelationType = (ImageView) row.findViewById(R.id.imgRelationType);\r\n\r\n\t holder.txtDoctorName.setVisibility(View.GONE);\r\n\t holder.txtHospitalName.setVisibility(View.GONE);\r\n\r\n\t row.setTag(holder);\r\n\t} else {\r\n\t holder = (MedicalRecordHolder) row.getTag();\r\n\t}\r\n\r\n\tMedicalReportsInfo medicalRecordsInfo = medicalRecordsList.get(position);\r\n\tif (medicalRecordsInfo.getMedRecordMultiplePic() != null && medicalRecordsInfo.getMedRecordMultiplePic().size() > 0) {\r\n\t iSize = medicalRecordsInfo.getMedRecordMultiplePic().size();\r\n\t // for (int i = 0; i < iSize; i++) {\r\n\t\tif (iSize == 1) {\r\n\t\t imageLoader.displayImage(medicalRecordsInfo.getMedRecordMultiplePic().get(0), holder.imgRecords, options);\r\n\t\t holder.imgSecondPic.setVisibility(View.GONE);\r\n\t\t}\r\n\t\tif (iSize == 2) {\r\n\t\t holder.imgSecondPic.setVisibility(View.VISIBLE);\r\n\t\t imageLoader.displayImage(medicalRecordsInfo.getMedRecordMultiplePic().get(0), holder.imgRecords, options);\r\n\t\t imageLoader.displayImage(medicalRecordsInfo.getMedRecordMultiplePic().get(1), holder.imgSecondPic, options);\r\n\t\t}\r\n\r\n\t// }\r\n\t \r\n\t if (medicalRecordsInfo.getMedRecordRecordType() != null && medicalRecordsInfo.getMedRecordRecordType().equalsIgnoreCase(\"Prescription\")) {\r\n\t\tholder.imgRecordsType.setImageResource(R.drawable.prescription_icon);\r\n\t } else if (medicalRecordsInfo.getMedRecordRecordType() != null && medicalRecordsInfo.getMedRecordRecordType().equalsIgnoreCase(\"Reports\")) {\r\n\t\tholder.imgRecordsType.setImageResource(R.drawable.reports_icon);\r\n\t } else if (medicalRecordsInfo.getMedRecordRecordType() != null && medicalRecordsInfo.getMedRecordRecordType().equalsIgnoreCase(\"Bills\")) {\r\n\t\tholder.imgRecordsType.setImageResource(R.drawable.bill_icon);\r\n\t }\r\n\r\n\t if (medicalRecordsInfo.getMedRecordRelationType() != null && medicalRecordsInfo.getMedRecordRelationType().equalsIgnoreCase(\"MOM\")) {\r\n\t\tholder.imgRelationType.setImageResource(R.drawable.mom_icon);\r\n\t } else if (medicalRecordsInfo.getMedRecordRelationType() != null && medicalRecordsInfo.getMedRecordRelationType().equalsIgnoreCase(\"DAD\")) {\r\n\t\tholder.imgRelationType.setImageResource(R.drawable.dad_icon);\r\n\t }\r\n\r\n\t} else {\r\n\t holder.imgRecords.setImageResource(R.drawable.prescription_icon);\r\n\t}\r\n\tif (medicalRecordsInfo.getMedRecordDoctorName() != null && !medicalRecordsInfo.getMedRecordDoctorName().equalsIgnoreCase(\"\")\r\n\t\t&& !medicalRecordsInfo.getMedRecordDoctorName().equalsIgnoreCase(null)\r\n\t\t&& !medicalRecordsInfo.getMedRecordDoctorName().equalsIgnoreCase(\"null\")) {\r\n\t holder.txtDoctorName.setVisibility(View.VISIBLE);\r\n\t holder.txtDoctorName.setText(medicalRecordsInfo.getMedRecordDoctorName());\r\n\t}else{\r\n\t holder.txtDoctorName.setVisibility(View.GONE);\r\n\t}\r\n\tif (medicalRecordsInfo.getMedRecordHospitalName() != null && !medicalRecordsInfo.getMedRecordHospitalName().equalsIgnoreCase(\"\")\r\n\t\t&& !medicalRecordsInfo.getMedRecordHospitalName().equalsIgnoreCase(null)\r\n\t\t&& !medicalRecordsInfo.getMedRecordHospitalName().equalsIgnoreCase(\"null\")) {\r\n\t holder.txtHospitalName.setVisibility(View.VISIBLE);\r\n\t holder.txtHospitalName.setText(medicalRecordsInfo.getMedRecordHospitalName());\r\n\t}else{\r\n\t holder.txtHospitalName.setVisibility(View.GONE);\r\n\t}\r\n\tif (medicalRecordsInfo.getMedRecordRecordDate() != null && !medicalRecordsInfo.getMedRecordRecordDate().equalsIgnoreCase(\"\")\r\n\t\t&& !medicalRecordsInfo.getMedRecordRecordDate().equalsIgnoreCase(null)\r\n\t\t&& !medicalRecordsInfo.getMedRecordRecordDate().equalsIgnoreCase(\"null\")) {\r\n\t holder.txtCreatedDate.setText(medicalRecordsInfo.getMedRecordRecordDate());\r\n\t}\r\n\tholder.imgRecords.setOnClickListener(new OnClickListener() {\r\n\r\n\t @Override\r\n\t public void onClick(View v) {\r\n\t\tif (medicalRecordsList.get(position).getMedRecordMultiplePic() != null) {\r\n\t\t enlargImageDialog(position);\r\n\t\t}\r\n\t }\r\n\t});\r\n\tholder.imgDownload.setOnClickListener(new OnClickListener() {\r\n\r\n\t @Override\r\n\t public void onClick(View v) {\r\n\t\tif (medicalRecordsList.get(position).getMedRecordMultiplePic() != null) {\r\n\t\t try {\r\n\t\t\tif (medicalRecordsList.get(position).getMedRecordDoctorName() != null\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordDoctorName().equalsIgnoreCase(\"\")\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordDoctorName().equalsIgnoreCase(null)\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordDoctorName().equalsIgnoreCase(\"null\")) {\r\n\t\t\t \r\n\t\t\t if (checkDownloadedFileExist(medicalRecordsList.get(position).getMedRecordDoctorName(), medicalRecordsList.get(position)\r\n\t\t\t\t .getMedRecordCreatedDate())) {\r\n\t\t\t\tString fileName = Environment.getExternalStorageDirectory().getPath() + \"/MedRecords/\";\r\n\t\t\t\tToast.makeText(context, Utils.getCustomeFontStyle(context, context.getString(R.string.reportDownloadedAlready)+\" \"+fileName), Toast.LENGTH_LONG).show();\r\n\t\t\t } else {\r\n\t\t\t\t if(iSize == 1){\r\n\t\t\t\t new DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(0), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordDoctorName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t }else if(iSize == 2){\r\n\t\t\t\t\tnew DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(0), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordDoctorName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t\tnew DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(1), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordDoctorName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t }\r\n\r\n\t\t\t} else if (medicalRecordsList.get(position).getMedRecordHospitalName() != null\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordHospitalName().equalsIgnoreCase(\"\")\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordHospitalName().equalsIgnoreCase(null)\r\n\t\t\t\t&& !medicalRecordsList.get(position).getMedRecordHospitalName().equalsIgnoreCase(\"null\")) {\r\n\t\t\t if (checkDownloadedFileExist(medicalRecordsList.get(position).getMedRecordHospitalName(), medicalRecordsList\r\n\t\t\t\t .get(position).getMedRecordCreatedDate())) {\r\n\t\t\t\tString fileName = Environment.getExternalStorageDirectory().getPath() + \"/MedRecords/\";\r\n\t\t\t\tToast.makeText(context, Utils.getCustomeFontStyle(context, context.getString(R.string.reportDownloadedAlready)+\" \"+fileName), Toast.LENGTH_LONG).show();\r\n\t\t\t } else {\r\n\t\t\t\t if(iSize == 1){\r\n\t\t\t\t new DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(0), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordHospitalName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t }else if(iSize == 2){\r\n\t\t\t\t new DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(0), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordHospitalName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t new DownloadFile().execute(medicalRecordsList.get(position).getMedRecordMultiplePic().get(1), medicalRecordsList.get(position)\r\n\t\t\t\t\t\t.getMedRecordHospitalName(), medicalRecordsList.get(position).getMedRecordCreatedDate());\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t }\r\n\r\n\t\t\t}\r\n\r\n\t\t } catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t});\r\n\treturn row;\r\n }", "List<BufferedImage> listarHuellas(Integer fcdc_id) throws SQLException, IOException;", "public DisplayImages(List<MeasurementService.DataPoint> list, MeasurementService.DataPoint center){\n this.list = list;\n this.center = center;\n }", "public void showMediaList(){\r\n mediaView.showMediaList(getMediaList());\r\n }", "@SuppressWarnings(\"finally\")\n\t\tpublic List<redsbean> getpictures(List<reds> listreds) {\n\t\t\t SQLiteDatabase db=myopen.getReadableDatabase();\n\t\t\t Cursor c=null;\n\t\t\t int pictureid;\n\t\t\tint redsid;\n\t\t\tString imgurl;\n\t\t\tList<redsbean> listbean=new ArrayList<redsbean>();\n\t\t\t\tif(db.isOpen()){\n\t\t\t\t\ttry{\n\t\t\t\t\tdb.beginTransaction();\n\t\t\t\t\tfor(reds reds:listreds){\t\t\n\t\t\tList<picture> listp=new ArrayList<picture>();\n\t\t\t\t\tString sql=\"select * from picture where reds_id=?\";\n\t\t\t\t c=db.rawQuery(sql, new String[]{String.valueOf(reds.getReds_id())});\n\t\t\t\t if(c!=null&&c.getCount()>0){\n\t\t\t\t \tint i=2;\n\t\t\t\t\t\twhile(c.moveToNext()){\t\t\n\t\t\t\t\t\t pictureid=c.getInt(0);\n\t\t\t\t\t redsid=c.getInt(1);\n\t\t\t\t\t\t imgurl=c.getString(2);\n\t\t\t\t\t\tlistp.add(new picture(pictureid, redsid, imgurl));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.i(\"i\", i+\"\");\n\t\t\t\t\t\tredsbean redsbean=new redsbean(reds,listp);\n\t\t\t\t\t\tlistbean.add(redsbean );\n\t\t\t\t\t\tLog.i(\"listbean\", redsbean.getListmap().size()+\"\");\n\t\t\t\t\t\tLog.i(\"listbean\", redsbean.getReds().getReds_id()+\"\");\n\t\t\t\t}else{\n\t\t\t\t\tlistbean.add(new redsbean(reds,null));\n\t\t\t\t} \n\t\t\t\t }\n\t\t\t\t\tdb.setTransactionSuccessful();\n\t\t\t\t\t}finally{\n\t\t\t\t\t\tdb.endTransaction();\t\n\t\t\t\t\t\tdb.close();\t\n\t\t\t\t\t\tc.close();\t\n\t\t\t\t\t\tLog.i(\"number\", listbean.size()+\"\");\n\t\t\t\t\t\treturn listbean;\n\t\t\t\t\t}\t\n\t\t}\n\t\tdb.close();\n\t\treturn null;\n\t\t}", "private List<MediaFile> listHtml() {\n\t\tList<MediaFile> list = new ArrayList<MediaFile>(32);\n\t\treturn list;\n\t}", "public void prepareList()\n {\n listImg = new ArrayList<Drawable>();\n for(int i=0;i<n;i++)\n {\n \ta.moveToPosition(i);\n \tString immagine = a.getString(0);\n \tCaricaImmagine caricaImmagineAsync = new CaricaImmagine();\n \t\tcaricaImmagineAsync.execute(new String[]{immagine});\n }\n }", "List<Bitmap> getRecipeImgSmall();", "public List<HashMap<String, Object>> imgListSel() {\n\t\treturn sql.selectList(\"imageMapper.imgListSel\", null);\n\t}", "@Override\n public int getCount() {\n return mPictureList.size();\n }", "public void loadListView(ArrayList<LonelyPicture> picList){\n \t\n\t\t\t\t\n\n\t\t adapter = new ArrayAdapter<LonelyPicture>(getActivity().getApplicationContext(),\n\t\t android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, picList);\n\t\t \n\n\t\t picListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\t\t picListView.setAdapter(adapter);\n\t\t\n\t\t \n\t\t //picListView = (ListView) findViewById(R.id.picListView);\n\t\t//will this really work?\n\t\t\n\t\t\t picListView = (ListView) getActivity().findViewById(R.id.picListView);\n\t\t\t picListView.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\t\t\n\t\t\t\t public void onItemClick(AdapterView<?> a, View v, int i, long l){\n\t\t\t\t\t MainActivity.fetch = (LonelyPicture) picListView.getItemAtPosition(i);\n\t\t\t\t\tMainActivity.printList.add((LonelyPicture) picListView.getItemAtPosition(i));\n\t\t\t\t\tButton right = (Button) getActivity().findViewById(R.id.show_and_back_button);\n\t\t\t\t\tright.setEnabled(true);\n\t\t\t\t\tLog.e(\"From picListFragment--guid\", MainActivity.fetch.getGUID());\n\t\t\t\t\t\n\t\t\t\t }});\n\t\t \n }", "private void displayEntity(ArrayList<Entity> entities){\n for(Entity entity : entities)\n entity.printImage();\n }", "@Override\n public void showMedicineInfo(HttpServletRequest request, HttpServletResponse response) {\n List<Medicine> list = new ArrayList<Medicine>();\n try{\n String sql = \"select * from medicine_info\";\n System.out.println(sql);\n ResultSet rs = JDBCUtiles.query(sql);\n int pur_price, sale_price, validity;double discount;\n while (rs.next()){\n Medicine medicine = new Medicine();\n medicine.setMed_name(rs.getString(\"med_name\"));\n medicine.setMed_id(rs.getString(\"med_id\"));\n medicine.setMde_class(rs.getString(\"class\"));\n medicine.setFactor(rs.getString(\"factor\"));\n pur_price = Integer.parseInt(rs.getString(\"purchase_price\"));\n medicine.setPurchase_price(pur_price);\n sale_price = Integer.parseInt(rs.getString(\"sale_price\"));\n medicine.setSale_price(sale_price);\n validity = Integer.parseInt(rs.getString(\"validity\"));\n medicine.setValidity(validity);\n discount = Double.parseDouble(rs.getString(\"discount\"));\n medicine.setDiscount(discount);\n medicine.setImg_url(rs.getString(\"img_url\"));\n list.add(medicine);\n }\n\n request.setAttribute(\"list\",list);\n rs.close();\n JDBCUtiles.close();\n request.getRequestDispatcher(\"/medicinesM.jsp\").forward(request,response);\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public final void mo99820a(List<MyMediaModel> list) {\n if (C40173d.f104443a.mo99939a(this.f104225o)) {\n this.f104232v.setVisibility(8);\n } else if (C23477d.m77081a((Collection<T>) list)) {\n this.f104232v.setVisibility(8);\n } else {\n int size = list.size();\n this.f104232v.setVisibility(0);\n m128153a(size);\n int currentItem = this.f104236z.getCurrentItem();\n int i = this.f104193C;\n if (currentItem == this.f104222l) {\n i = this.f104194D;\n }\n if (size < i) {\n this.f104232v.setTextColor(getResources().getColor(R.color.a7b));\n this.f104232v.setClickable(false);\n } else {\n this.f104232v.setTextColor(getResources().getColor(R.color.a79));\n this.f104232v.setClickable(true);\n }\n this.f104218h.clear();\n this.f104218h.addAll(list);\n if (C40173d.f104443a.mo99939a(this.f104225o)) {\n this.f104232v.setVisibility(8);\n }\n }\n }", "private void showImageDetail() {\n }", "@Override\n\t public int getCount() {\n\t return listImg.size();\n\t }", "public ArrayList<Group> GetImageStorageMelanoma() {\n\t\tExListViewController selImagens = new ExListViewController();\n\t\treturn selImagens.SelectPicsOnMelanomaDirectory(CreateListFiles());\n\t}", "List<Photo> homePagePhotos();", "@Override\n public void displayImageList() {\n if (getChildFragmentManager().findFragmentById(R.id.image_list_container) == null) {\n getChildFragmentManager().beginTransaction()\n .add(R.id.image_list_container, ImageListFragment.newInstance())\n .commit();\n }\n\n // Remove image details fragment\n Fragment imageDetailsFragment = getChildFragmentManager().findFragmentById(R.id.image_details_container);\n if (imageDetailsFragment != null) {\n getChildFragmentManager().beginTransaction()\n .remove(imageDetailsFragment)\n .commit();\n }\n }", "public VentanaListado(DataBase db) {\r\n this.db=db;\r\n almacenes = new ArrayList<>();\r\n try { \r\n myImage = ImageIO.read(new File(\"imagenes/fondo2.jpg\"));\r\n } catch (IOException ex) {\r\n System.out.println(\"No se ha encontrado imagen\");\r\n }\r\n this.setContentPane(new ImagePanel(myImage));\r\n this.setTitle(\"Listado Almacenes\");\r\n this.setVisible(true);\r\n initComponents(); \r\n this.pack();\r\n this.setLocation(800, 100);\r\n this.setSize(350,250);\r\n }", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "public List<String> getimagenames() {\n List<String> arrimg=new ArrayList<String>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \" + TABLE_NAME +\" ORDER BY \" + POSITIONNO + \" ASC\" ,null);\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n String name = cursor.getString(cursor.getColumnIndex(IMGNAME));\n\n arrimg.add(name);\n cursor.moveToNext();\n }\n }\n\n return arrimg;\n }", "public String listImageNames() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(User user : userList) {\r\n\t\t\tsb.append(listImageNames(user.getName()) + \"\\n\");\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}", "@RequestMapping(value = \"/dashboard\")\r\n\tprotected String getAllPics(Model model) throws Exception {\r\n\t\tLOG.info(\" LOG User Dashboard from getAllPics controlller \");\r\n\t\tUser u = SecurityLibrary.getLoggedInUser();\r\n\t\tList<PictureUploadPojo> picsList = picsService.findAllPics(1);\r\n\t\tmodel.addAttribute(\"picsList\", picsList);\r\n\t\treturn \"dashboard\";\r\n\t}", "@Override\n public List<UltraSoundRecordBean> loadList(ResultSet rs) throws SQLException {\n List<UltraSoundRecordBean> list = new ArrayList<UltraSoundRecordBean>();\n while(rs.next()){\n list.add(loadSingle(rs));\n }\n return list;\n }", "public void initializeList() {\n listitems.clear();\n int medicationsSize = Medications.length;\n for(int i =0;i<medicationsSize;i++){\n Medication Med = new Medication(Medications[i]);\n listitems.add(Med);\n }\n\n }", "private void processImages(List<String> images) {\n setTitle(\"Showing images\");\n mImages = images;\n setListAdapter(new ImagesAdapter());\n }", "public ImageList() {\n\t\timageList = new ImageIcon[] { ImageList.BALLOON, ImageList.BANANA, ImageList.GENIE, ImageList.HAMSTER,\n\t\t\t\tImageList.HEART, ImageList.LION, ImageList.MONEY, ImageList.SMOOTHIE, ImageList.TREE, ImageList.TRUCK };\n\t}", "public static void generateImagesForStrcuture(PrintWriter printWriter, List<StructureDetailsTabDTO> structureDetailsTabDTOList) throws MolFormatException, IOException {\n\n\n for (StructureDetailsTabDTO structureTabDataReturn : structureDetailsTabDTOList) {\n\n /* if (!structureTabDataReturn.getSubSmiles.isEmpty() ){*/\n chemaxon.util.MolHandler mh1 = new chemaxon.util.MolHandler(structureTabDataReturn.getSubSmiles());\n System.out.println(\"file mol check\" + mh1);\n mh1.aromatize();\n chemaxon.struc.Molecule mol = mh1.getMolecule();\n mol.clean(2, null);\n mol.dearomatize();\n byte[] s1 = mol.toBinFormat(\"png:w250,h250,b32\");\n\n printWriter.write(Base64.encodeToString(s1));\n System.out.println(\"generate the image check\" + s1);\n /* }*/\n }\n\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "@Override\n\tpublic int getCount() {\n\t\treturn picInfoList.size();\n\t}", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "public PictureAdapter(List<Picture> pictures) {\n this.picture = pictures;\n }", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();", "public List<Articleimage> getArticleImageList(Article article){\n \n UrlGenerator urlGen = new UrlGenerator();\n String imageKeyIdTemp = urlGen.getNewURL();\n \n List<Articleimage> articleimageList = new ArrayList<>();\n Document doc = Jsoup.parse(article.getArtContent());\n Elements elements = doc.getElementsByTag(\"img\");\n \n \n for(int i=0; i< elements.size(); i++){ \n String artImagekeyid = String.valueOf(i)+imageKeyIdTemp;\n \n String artImgsrc=elements.get(i).attr(\"src\");\n String artImgalt=elements.get(i).attr(\"alt\");\n String artImgcssclass=elements.get(i).attr(\"class\");\n String artImgcssstyle=elements.get(i).attr(\"style\");\n \n Articleimage articleimage = new Articleimage( artImgsrc, artImgcssclass,\n \t\t\t artImgcssstyle, artImgalt, artImagekeyid);\n articleimageList.add(articleimage);\n }\n return articleimageList;\n }", "private List<String> getImages(SalonData salonData) {\n List<String> salonImages = new ArrayList<>();\n List<SalonImage> salonImage = salonData.getSalonImage();\n for (int i = 0; i < salonImage.size(); i++) {\n salonImages.add(salonImage.get(i).getImage());\n }\n return salonImages;\n }", "public By thumbnail(){\r\n\t\t return By.xpath(\"//ol[@class='thumbnails']/li\");\r\n\t}", "public void displayMedicines(Medicine med) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"ID\", \"|\", \"Generic Name\", \"|\", \"Brand Name\", \"|\", \"Type of Medicine\", \"|\", \"Price\", \"|\", \"Stock (Pieces)\\n\");\n System.out.printf(\"%s\", \"------------------------------------------------------------------------------------------------------------------------------------------------\\n\");\n for (int i = 0; i < med.getMedicineList().size(); i++) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s \\n\", med.getMedicineList().get(i).getId(), \"|\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\", med.getMedicineList().get(i).getMedicineType(), \"|\", med.getMedicineList().get(i).getPrice(), \"|\", med.getMedicineList().get(i).getStock());\n }\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"Generic Name\", \"|\", \"Brand Name\", \"|\",\"Type of Medicine\",\"|\", \"Price\",\"|\", \"Stock (Pieces)\\n\");\n// System.out.printf(\"%s\", \"-------------------------------------------------------------------------------------------------------------------------------\\n\");\n// for(int i=0; i<med.getMedicineList().size();i++){\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\",med.getMedicineList().get(i).getMedicineType(),\"|\", med.getMedicineList().get(i).getPrice(),\"|\", med.getMedicineList().get(i).getStock()+\"\\n\");\n// }\n }", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn pictures.length;\r\n\t\t}", "java.util.List<com.google.protobuf.ByteString> getImgDataList();", "public final void mo99835a(List<MyMediaModel> list) {\n int i;\n if (C23477d.m77081a((Collection<T>) list)) {\n i = 0;\n } else {\n i = list.size();\n }\n if (MvChoosePhotoActivity.this.f104228r < i) {\n MvChoosePhotoActivity.m128156a(\"choose_upload_content\");\n }\n MvChoosePhotoActivity.this.f104228r = i;\n MvChoosePhotoActivity.this.f104226p = list;\n MvChoosePhotoActivity.this.mo99820a(list);\n }", "@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}", "String getItemImage();", "public List<Medico> getAllMedicos() {\n List<Medico> medicos = new ArrayList<Medico>();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM medico\";\n pstm = con.prepareStatement(query);\n rs = pstm.executeQuery();\n while (rs.next()) {\n Medico medico = new Medico();\n medico.setId(rs.getInt(\"id_medico\"));\n medico.setArea(rs.getString(\"area\"));\n medico.setNombre(rs.getString(\"nombre\"));\n medico.setAp_pat(rs.getString(\"apell_pat\"));\n medico.setAp_mat(rs.getString(\"apell_mat\"));\n medico.setDireccion(rs.getString(\"direccion\"));\n medico.setEmail(rs.getString(\"email\"));\n medico.setTel(rs.getString(\"tel\"));\n medico.setHora_inc(rs.getString(\"hora_inic\"));\n medico.setHora_fin(rs.getString(\"hora_fin\"));\n medicos.add(medico);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return medicos;\n }", "public void addpixeltoList() {\n for (int i = 0; i < 100; i++) {\r\n pixellist.add(new humanpixel());\r\n }\r\n }", "private void initializeImageModels() {\n for(ImageModel model : GalleryFragment.listImageModel){\n imgList.add(model.getImagePath());\n }\n }", "private void galleryAddPic() {\n\t}", "@JsonProperty(\"imageDisplay\")\n public List<String> getImageDisplay() {\n return imageDisplay;\n }", "public LiveData<List<ImageModel>> getImageList()\n {\n return mImagesList;\n }", "public void buildImageList()\n {\n dialogables.clear();\n dialogables.add(new DialogableAdapter() {\n\n @Override\n public Uri getDialogueImageUri() {\n return Uri.parse(\"android.resource://group8.comp3900.year2014.com.bcit.dogsweater/drawable/plus\");\n }\n });\n\n // putting other profiles onto the gridview\n profileDataSource.open();\n List<Profile> Profiles = profileDataSource.getAllProfiles();\n for (final Profile profile: Profiles) {\n\n dialogables.add(new Dialogable<Profile>() {\n\n @Override\n public Profile getItem() { return profile; }\n\n @Override\n public long getItemId() { return profile.getId(); }\n @Override\n public String getDialogueTitle() {\n return profile.getName();\n }\n\n @Override\n public String getDialogueDescription() {\n return \"Hello I am a temp profile!\";\n }\n\n @Override\n public String getDialogueButtonText() {\n return \"SELECT THIS PROFILE\";\n }\n\n @Override\n public Uri getDialogueImageUri() {\n return profile.getImageURI();\n }\n\n @Override\n public String getNextScreen() {\n return \"group8.comp3900.year2014.com.bcit.dogsweater.StyleSelection\";\n }\n });\n }\n profileDataSource.close();\n notifyDataSetChanged();\n }", "public void setMultimediaList(List<Multimedia> multimediaList) {\n Log.d(\"Lista\",multimediaList.size()+\"\");\n this.multimediaList = multimediaList;\n }", "@Override\n public int getCount() {\n return pictureItemBeans.size();\n }", "public void showPile() {\n Nodo rounded = lastIn;\n while (rounded != null) {\n List += rounded.info + \"\\n\";\n rounded = rounded.next;\n }\n JOptionPane.showMessageDialog(null, List);\n List = \"\";\n }", "private void LoopData() {\n\t\tfor (int i = 0; i < drawable.length; i++) {\n\t\t\titems_list items_list = new items_list();\n\t\t\titems_list.setDrawable(getResources().getDrawable(drawable[i]));\n\t\t\titems_list.setLek(string[i]);\n\t\t\tlists.add(items_list);\n\t\t}\n\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn imagelist.length;\n\t}", "void onShowAllPreview(List<FileItem> fileItemList);", "@Override\n public int getItemCount() {\n return picture.size();\n }", "private static CopyOnWriteArrayList<String> getListOfImages(String username){\r\n\t\treturn getUser(username).getImageList();\r\n\t}", "List<Medicine> getAllMedicines();", "FaceListAdapter(Face[] detectionResult) {\n faces = new ArrayList<>();\n faceThumbnails = new ArrayList<>();\n mIdentifyResults = new ArrayList<>();\n\n if (detectionResult != null) {\n faces = Arrays.asList(detectionResult);\n for (Face face: faces) {\n try {\n // Crop face thumbnail with five main landmarks drawn from original image.\n faceThumbnails.add(ImageHelper.generateFaceThumbnail(\n mBitmap, face.faceRectangle));\n } catch (IOException e) {\n // Show the exception when generating face thumbnail fails.\n setInfo(e.getMessage());\n }\n }\n }\n }", "public void displayData(List<String> images, List<String> captions){\n dialog.dismiss();\n TravelList travelList = new TravelList();\n travelList.urls=images;\n travelList.captions=captions;\n getFragmentManager().beginTransaction()\n .add(R.id.fragment_container, travelList, \"travelFrag\")\n .addToBackStack(null)\n .commit();\n }", "@GetMapping(\"/shops/pictures/{id}\")\n\tpublic String getById(Model model, @PathVariable(name = \"id\") Long id) throws RecordNotFoundException {\n\t\t\n\t\tList<Picture> listPictures = (List<Picture>) pictureService.getById(id);\n\t\tmodel.addAttribute(\"listPIctures\", listPictures);\n\t\treturn \"list-pictures\";\n\t}", "@Override\n\tpublic List<MyMedia> getMediadetails(String username) {\n\t\treturn userDAO.getMediadetails(username);\n\t}", "public static List getAllImgs() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT imgUrl FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String imgUrl = result.getString(\"imgUrl\");\n polovniautomobili.add(imgUrl);\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public interface MenuThumbnailHandler {\n\n\n public void showMenuImage(ArrayList<String> images,int position);\n}", "private void prepareTheList()\n {\n int count = 0;\n for (String imageName : imageNames)\n {\n RecyclerUtils pu = new RecyclerUtils(imageName, imageDescription[count] ,images[count]);\n recyclerUtilsList.add(pu);\n count++;\n }\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "@Override\n\t\t\tpublic void onListAdapterCreated(ListAdapter adapter, View v, int position,\n ViewGroup viewGroup, ListEntry listEntry)\n\t\t\t{\n\t\t\t\tif(listEntry.imageList != null && listEntry.imageList.size() > 0)\n\t\t\t\t{\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tint randomIndex = rand.nextInt(listEntry.imageList.size());\n\t\t\t\t\t\n\t\t\t\t\tImageEntry imgEntry = listEntry.imageList.get(randomIndex);\n\t\t\t\t\tImageLoader loader = new ImageLoader(Tab3Fragment.this.getActivity(), Config.THUMB_PLACE_HOLDER);\n\t\t\t\t\t\n\t\t\t\t\tfinal ImageView imgThumb = (ImageView) v.findViewById(R.id.imgThumb1);\n\t\t\t\t\t// check if the bitmap is from server \n\t\t\t\t\t// or not using the flag IS_DATA_FROM_SERVER\n\t\t\t\t\tBoolean isHttp = imgEntry.photoImageThumbUrl.toLowerCase(Locale.getDefault()).contains(\"http://\");\n\t\t\t\t\tif(isHttp)\n\t\t\t\t\t{\n\t\t\t\t\t\tloader.DisplayImageWithTag(imgEntry.photoImageThumbUrl, imgThumb, 1);\n\t\t\t\t\t\tloader.setOnCacheListener(new OnCacheListener() \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onImageLoaded(ImageLoader loader, Bitmap bitmap, int tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tBitmap framedBitmap = ImageHelper.\n\t\t\t\t\t\t\t\t\t\tconvertBitmapWithFrame(Tab3Fragment.this.getActivity(), \n\t\t\t\t\t\t\t\t\t\t\t\tbitmap, Config.BORDER_THICKNESS_THUMB);\n\n\t\t\t\t\t\t\t imgThumb.setImageBitmap(framedBitmap);\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tBitmap bitmap = ImageHelper.getBitmapFromAsset(\n\t\t\t\t\t\t\t\tTab3Fragment.this.getActivity(), imgEntry.photoImageThumbUrl);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(bitmap != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBitmap framedBitmap = ImageHelper.\n\t\t\t\t\t\t\t\t\tconvertBitmapWithFrame(Tab3Fragment.this.getActivity(), bitmap, Config.BORDER_THICKNESS_THUMB);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\timgThumb.setImageBitmap(framedBitmap);\n\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\t\n\t\t\t\tTextView tvTitle = (TextView) v.findViewById(R.id.tvTitle);\n\t\t\t\ttvTitle.setText(listEntry.title);\n\t\t\t\t\n\t\t\t\tTextTint.tintTextView(Tab3Fragment.this.getActivity(), tvTitle, color);\n\t\t\t\t\n\t\t\t\tTextView tvAddress = (TextView) v.findViewById(R.id.tvAddress);\n\t\t\t\ttvAddress.setText(listEntry.address);\n\t\t\t\t\n\t\t\t}", "message.Figure.FigureData.FigureBase getFigureList(int index);", "public MultimediaList() {\n initComponents();\n chbMovie.setSelected(true);\n chbSeries.setSelected(true);\n chbLS.setSelected(true);\n setFiltered(new ArrayList());\n getDb().semiDeepCopy(getDb().getMultimedias(), filtered);\n setBounds(0, 0, 600, 500);\n setTable(getDb().getMultimedias());\n }", "@GetMapping(\"\")\n\tpublic void home(Model model) {\n\t\t\n\t\tList<ItemThumbnailVO> itemThumbnailList = itemService.getHomeItemThumbnailList();\n\n\t\t// List<ItemThumnailVO>\n//\t\tmodel.addAttribute(\"itemlist\", itemService.getAllItemList());\n//\t\tfor(int i=0; i<itemThumnailList.size();i++) {\n//\t\t\titemThumnailList.get(i).setG_id(galleryList.get(i).getG_id());\n//\t\t\titemThumnailList.get(i).setG_photo(galleryList.get(i).getG_photo());\n//\n//\t\t}\n\t\tlog.info(itemThumbnailList);\n\t\t// log.info(galleryList);\n\n\t\tmodel.addAttribute(\"itemThumbnailList\", itemThumbnailList);\n\t}", "public final void mo99835a(List<MyMediaModel> list) {\n int i;\n if (C23477d.m77081a((Collection<T>) list)) {\n i = 0;\n } else {\n i = list.size();\n }\n if (MvChoosePhotoActivity.this.f104229s < i) {\n MvChoosePhotoActivity.m128158b(list);\n }\n MvChoosePhotoActivity.this.f104229s = i;\n MvChoosePhotoActivity.this.f104227q = list;\n MvChoosePhotoActivity.this.mo99820a(list);\n }", "public void listImage() {\r\n\t\tGlobalValue.listFlags = new ArrayList<Integer>();\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_noname);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_brazil);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_croatia);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_mexico);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_cameroon);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_spain);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_netherland);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_chile);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_australia);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_colombia);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_ivory_coast);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_japan);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_greece);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_uruguay);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_costa_rica);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_england);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_italy);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_switzerland);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_ecuador);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_honduras);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_france);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_argentina);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_bosnia);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_iran);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_nigeria);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_germany);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_portugal);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_ghana);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_usa);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_belgium);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_algeria);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_russia);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_korea);\r\n\t\tGlobalValue.listFlags.add(R.drawable.icon_noname);\r\n\t}", "public List<PictureData> searchAllPicture(String pageID) {\n\t\treturn null;\n\t}", "public List<PictureData> searchAllPicture(String pageID) {\n\t\treturn null;\n\t}", "public void recordVictims(){\n\t\t\n\t\tfor (int i = 0; i < parts.size(); i++) {\n BodyPart joe = parts.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.red);\n g2d.fillRect(x,y,4,4);\n\t\t\t\t\t \n }\n\t\t\tfor (int i = 0; i < people.size(); i++) {\n BodyPart joe = people.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.cyan);\n g2d.fillRect(x,y,7,7);\n\t\t\t\t\t \n }\n\t}", "private void showList() {\n\n if(USE_EXTERNAL_FILES_DIR) {\n mList = mFileUtil.getFileNameListInExternalFilesDir();\n } else {\n mList = mFileUtil.getFileListInAsset(FILE_EXT);\n }\n mAdapter.clear();\n mAdapter.addAll(mList);\n mAdapter.notifyDataSetChanged();\n mListView.invalidate();\n}", "private void montaListaDeItensDeImagem(org.jsoup.nodes.Document doc, JSONArray description) {\n Elements images = doc.select(\"div\").select(\"img\");\n for (Element image : images) {\n JSONObject ijson = new JSONObject();\n ijson.put(\"type\", \"image\");\n ijson.put(\"content\", image.attr(\"src\"));\n description.put(ijson);\n }\n }", "@Override\n public List<IMedicine> getMedicine() {\n return medicineList;\n }", "public Map<Pair<ID, ID>, List<Image>> getBulletImages() {\n return bulletImages;\n }", "@Override\n public void onClick(View view) {\n bitmaps.clear();\n listMapKeys.clear();\n //determination of the number of photos\n nbPhotosToPrint=getNbPhotosToPrintByCategory(PhotoCategories.MALT_ADDUCTIONS);\n helper.retrieveSpacePhotoUrlDownloadsByPhotoCategories(PhotoCategories.MALT_ADDUCTIONS,idWorksite);\n }", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "private void loadMedia() {\n\t\tmt = new MediaTracker(this);\n\t\timage_topbar = getToolkit().getImage(str_topbar);\n\t\timage_return = getToolkit().getImage(str_return);\n\t\timage_select = getToolkit().getImage(str_select);\n\t\timage_free = getToolkit().getImage(str_free);\n\t\timage_message = getToolkit().getImage(str_message);\n\t\timage_tradition = getToolkit().getImage(str_tradition);\n\t\timage_laizi = getToolkit().getImage(str_laizi);\n\t\timage_head = getToolkit().getImage(str_head);\n\t\timage_headframe = getToolkit().getImage(str_headframe);\n\t\timage_headmessage = getToolkit().getImage(str_headmessage);\n\t\timage_help = getToolkit().getImage(str_help);\n\t\timage_honor = getToolkit().getImage(str_honor);\n\t\timage_beans = getToolkit().getImage(str_beans);\n\t\t\n\t\t\n\t\tmt.addImage(image_free, 0);\n\t\tmt.addImage(image_head, 0);\n\t\tmt.addImage(image_headframe, 0);\n\t\tmt.addImage(image_headmessage, 0);\n\t\tmt.addImage(image_help, 0);\n\t\tmt.addImage(image_honor, 0);\n\t\tmt.addImage(image_laizi, 0);\n\t\tmt.addImage(image_message, 0);\n\t\tmt.addImage(image_return, 0);\n\t\tmt.addImage(image_select, 0);\n\t\tmt.addImage(image_topbar, 0);\n\t\tmt.addImage(image_tradition, 0);\n\t\tmt.addImage(image_beans, 0);\n\t\t\n\t\t\n\t\ttry {\n\t\t\tmt.waitForAll();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Bitmap drawFaceRectanglesOnBitmap(Bitmap originalBitmap, Face[] faces) {\n Bitmap bitmap = originalBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Canvas canvas = new Canvas(bitmap);\n ListView listView = findViewById(R.id.listview1);\n emotions = new ArrayList<>();\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setStyle(Paint.Style.STROKE);\n paint.setColor(Color.RED);\n paint.setStrokeWidth(10);\n ArrayList<String> emotionStrings = new ArrayList<String>();\n if(faces != null) {\n for(int i = 0; i < faces.length; i++) {\n FaceRectangle faceRectangle = faces[i].faceRectangle;\n canvas.drawRect(faceRectangle.left, faceRectangle.top,faceRectangle.left + faceRectangle.width, faceRectangle.top + faceRectangle.height, paint);\n Emotion emotion = faces[i].faceAttributes.emotion;\n emotions.add(emotion);\n double e1 = emotion.surprise;\n double e2 = emotion.anger;\n double e3 = emotion.contempt;\n double e4 = emotion.disgust;\n double e5 = emotion.fear;\n double e6 = emotion.happiness;\n double e7 = emotion.neutral;\n double e8 = emotion.sadness;\n String s1 = \"Person \"+i+\": Surprise: \"+e1;\n String s2 = \"Person \"+i+\": Anger: \"+e2;\n String s3 = \"Person \"+i+\": Contempt: \"+e3;\n String s4 = \"Person \"+i+\": Disgust: \"+e4;\n String s5 = \"Person \"+i+\": Fear: \"+e5;\n String s6 = \"Person \"+i+\": Happiness: \"+e6;\n String s7 = \"Person \"+i+\": Neutral: \"+e7;\n String s8 = \"Person \"+i+\": Sadness: \"+e8;\n emotionStrings.add(s1);\n emotionStrings.add(s2);\n emotionStrings.add(s3);\n emotionStrings.add(s4);\n emotionStrings.add(s5);\n emotionStrings.add(s6);\n emotionStrings.add(s7);\n emotionStrings.add(s8);\n }\n }\n\n\n\n ArrayAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, emotionStrings);\n\n listView.setAdapter(adapter);\n\n return bitmap;\n }", "private void getWorkoutGalleryImagesFromDatabase(){\n ArrayList<ArrayList<Object>> data;\n\n for(int i = 0; i < mWorkoutIds.size(); i++) {\n data = mDbHelperWorkouts.getImages(mWorkoutIds.get(i));\n\n ArrayList<String> gallery = new ArrayList<String>();\n\n // If image gallery is not available for selected workout id,\n // add workout image to the gallery\n if(data.size() > 0) {\n // store data to arraylist variable\n for (int j = 0; j < data.size(); j++) {\n ArrayList<Object> row = data.get(j);\n gallery.add(row.get(0).toString());\n }\n }else{\n gallery.add(mWorkoutImages.get(i));\n }\n mWorkoutGalleries.put(mWorkoutIds.get(i), gallery);\n }\n }", "private void showUsersLikedMedia(ArrayList<Media> media) {\n if (media != null && media.size() > 0) {\n // Just a sanity check for now to make sure only 20 come back.\n int maxCount = media.size() < 20 ? media.size() : MAX_LIST_COUNT;\n List<Media> mediaSubLists = media.subList(0, maxCount);\n isFirstLoad = !isFirstLoad;\n mUsersLikedMediaFragment = ImagesGridViewFragment.newInstance(new ArrayList<>(mediaSubLists), mAccessToken, isDualPane, isFirstLoad);\n mUsersLikedMediaFragment.setMyUserFragment(this);\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.my_user_liked_media_frame_layout, mUsersLikedMediaFragment).commit();\n mLikedMediaLinearLayout.setVisibility(View.VISIBLE);\n } else {\n mLikedMediaLinearLayout.setVisibility(View.GONE);\n }\n\n isSyncingData = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n mUserLayout.setVisibility(View.VISIBLE);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n list = new ArrayList<Model>();\n for(DataSnapshot dataSnapshot1 :dataSnapshot.getChildren()){\n\n Model value = dataSnapshot1.getValue(Model.class);\n Model fire = new Model();\n String name = value.getDescription();\n String address = value.getTitle();\n String email = value.getImage();\n Log.e(\"asvdgs\",name);\n fire.setDescription(name);\n fire.setImage(email);\n fire.setTitle(address);\n list.add(fire);\n\n }\n\n }", "public void callView(final List<String> records4){\n\t\t \n\n\t\t setListAdapter(new ArrayAdapter<String>(this, R.layout.music,records4));\t \n\t\t \n\t\t listView = getListView();\t\n }", "public Iterable<MedicalRecord> list() {\n return medicalRecordList;\n }", "@Override\n\tpublic List<String> gif_image_list(String user_id) throws Exception {\n\t\treturn sqlSession.selectList(NAMESPACE + \".gif_image_list\", user_id);\n\t}", "public void getShowRecord(List<MentalShowStruct> list) {\n/* 55 */ this.component.getRevertShowList(list);\n/* */ }", "public void onItemImageClick(View view) {\r\n RecommendListAdapter listAdapter = new RecommendListAdapter(this,\r\n R.layout.search_row, itemList);\r\n \tString mediumURL = this.itemInfo.getMediumImageUrl();\r\n final String largeURL = mediumURL.replace(\"ex=128x128\", \"ex=300x300\");\r\n listAdapter.wrapZoomimage(view, largeURL);\r\n // sub_item_info = item_info;\r\n // getItemDetail(item_info.getItemCode(),item_info.getShopId(),item_info.getShopName());\r\n }" ]
[ "0.6701289", "0.6618815", "0.62307996", "0.6158802", "0.61379564", "0.6127788", "0.6091622", "0.605609", "0.59905934", "0.59709066", "0.5891439", "0.58572036", "0.5844668", "0.5840039", "0.5826217", "0.5803771", "0.57820666", "0.5712446", "0.5711835", "0.5698493", "0.56852245", "0.5653719", "0.56524646", "0.56194097", "0.5602134", "0.5573419", "0.55641013", "0.5563193", "0.55544364", "0.553469", "0.55133176", "0.5507858", "0.55017936", "0.54969037", "0.5461805", "0.5454893", "0.5431004", "0.543095", "0.5427842", "0.5424138", "0.5423812", "0.54000086", "0.5398565", "0.53822154", "0.5367389", "0.5359329", "0.5355574", "0.5354089", "0.5353413", "0.5352825", "0.5351381", "0.5347918", "0.5341686", "0.53413385", "0.5340322", "0.53321457", "0.5331142", "0.53288347", "0.5326431", "0.5321782", "0.532076", "0.5316836", "0.53145766", "0.5312794", "0.53083634", "0.53050476", "0.53001434", "0.52996516", "0.5299125", "0.5298022", "0.5283819", "0.5278515", "0.52758676", "0.52589655", "0.5251425", "0.5251158", "0.52470475", "0.524639", "0.52445066", "0.5242848", "0.5239903", "0.52397454", "0.52397454", "0.5237975", "0.5236284", "0.52110684", "0.5210745", "0.52103394", "0.5194966", "0.51931554", "0.51905304", "0.51835036", "0.5182441", "0.51794374", "0.5169204", "0.51687694", "0.51652807", "0.51632506", "0.51614356", "0.51609004" ]
0.56947887
20
list all sports that a delegation participates in eg.USA.jsp
public List<String> getSports(String name){ List<String> list = new ArrayList<String>(); Connection conn = DBConnect.getConnection(); String sql = "select sports_name from team where delegation_name= '" + name + "'"; try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { String team = rst.getString("sports_name"); list.add(team); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Sports> getAllSportsService() {\n\t\tList<Sports> list=new ArrayList<>();\n\t\tlist=(List<Sports>)repository.findAll();\n\t\tif(list.size()<1)\n\t\t\tthrow new RecordNotFoundException(\"No Sports present in the table Sports\");\n\t\tlogger.info(\"Size of the list after fetching all the records= \"+list.size());\n\t\treturn list;\n\t\t\n\t}", "private void showAvailableCourts()\n {\n Scanner in=new Scanner(System.in);\n try\n {\n \n \n Scanner sc= new Scanner(System.in); \n System.out.println(\"Enter the Sport Name u want to Play :\");\n System.out.println(\"Basketball\\nBadminton\" );\n String sportName = sc.nextLine();\n Sport s = sportsClub.findSport(sportName); \n if(s == null)\n {\n System.out.println(\"No Sport Found\");\n }\n else\n {\n System.out.println(\"=========Available List==========\");\n }\n for(Court co : s.getCourtList())\n {\n System.out.println(\"Court number :\" + co.getCourtId());\n } \n System.out.println(\"=====================================\");\n }\n \n catch(Exception e)\n {\n System.out.println(\"Exception\"+e);\n }\n}", "@Override\n\tpublic void sports() {\n\t\t\n\t}", "public static List<String> getSpainCoach() throws URISyntaxException, IOException {\n\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/77\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> nameOfSpainTeamCoach= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getRole().equals(\"COACH\")){\n\n nameOfSpainTeamCoach.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n continue;\n }\n\n }\n return nameOfSpainTeamCoach;\n }", "List<SportActivity> findAll();", "public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "List<T> membershipRoster(String membershipName);", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "List<T> membershipRoster(S membership);", "void getPeople();", "@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}", "private void NameShow(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString find = request.getParameter(\"find\") == \"\" ? \"^^^^\" : request.getParameter(\"find\");\r\n\t\tSystem.out.println(find);\r\n\t\tint page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tList<Notice> list = service.selectByName(find);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"nameshow\", \"nameshow\");\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, resp);\r\n\t}", "@Override\n\tpublic NurseBean[] nurselist(MemberBean member) {\n\t\treturn null;\n\t}", "public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }", "void viewStudents(Professor professor);", "private void listPlayer(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tList<Player> players = playerDbUtil.getPlayers();\n\n\t\t// adiciona o jogador no request attribute\n\t\trequest.setAttribute(\"PLAYER_LIST\", players);\n\n\t\t// envia para a jsp:list-players (view)\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/list-players.jsp\");\n\t\tdispatcher.forward(request, response);\n\t}", "public void showMemberBookings()\n {\n try\n {\n System.out.println(\"Please enter the memeber ID\");\n int memberId =sc.nextInt();\n Member mem = sportsClub.searchMember(memberId); \n \n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! Member is not found.\");\n }\n else\n {\n for(Booking bookingObj : mem.getBookings())\n {\n System.out.println(\"Booking made by \"+mem.getMemberName() +\" for \" + bookingObj.getBookingDate() + \" at \" + bookingObj.getBookingTime() + \" for \" + bookingObj.getBookingEndTime() + \" minutes on Court number \" + bookingObj.getCourt().getCourtId());\n\n }\n if(mem.getBookings().size()==0)\n System.out.println(\"Sorry! Currebtly no bookings done by the member \");\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Error\"+e);\n }\n\n }", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public static void fetchStudent(Session session) {\n\t\tQuery query = session.createQuery(\"from StudentEntity stud where stud.name=:name_to_be_passed_by_user\");\n\t\tquery.setParameter(\"name_to_be_passed_by_user\", \"Ram\");\n\t\tList studentResult = query.list();\n\t\t\n\t\tfor(Iterator iterator= studentResult.iterator();iterator.hasNext();) { \t\n\t\t\tStudentEntity student = (StudentEntity)iterator.next();\n\t\t\t\n\t\t\tSystem.out.println(student);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void getSport() {\n\t\tsp.mySport();\n\t}", "public void printList() {\n System.out.println(\"Disciplina \" + horario);\n System.out.println(\"Professor: \" + professor + \" sala: \" + sala);\n System.out.println(\"Lista de Estudantes:\");\n Iterator i = estudantes.iterator();\n while(i.hasNext()) {\n Estudante student = (Estudante)i.next();\n student.print();\n }\n System.out.println(\"Número de estudantes: \" + numberOfStudents());\n }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnTuesday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnTuesday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND tuesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND tuesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND tuesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "@Override\r\n\tpublic void showlist() {\n int studentid = 0;\r\n System.out.println(\"请输入学生学号:\");\r\n studentid = input.nextInt();\r\n StudentDAO dao = new StudentDAOimpl();\r\n List<Course> list = dao.showlist(studentid);\r\n System.out.println(\"课程编号\\t课程名称\\t教师编号\\t课程课时\");\r\n for(Course c : list) {\r\n System.out.println(c.getCourseid()+\"\\t\"+c.getCoursename()+\"\\t\"+c.getTeacherid()+\"\\t\"+c.getCoursetime());\r\n }\r\n \r\n\t}", "List<ScPartyMember> selectAll();", "public String listResearchers();", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n HttpSession session = request.getSession();\n\n List flowers = new ArrayList();\n flowers.add(\"Tulip\");\n flowers.add(\"Rose\");\n flowers.add(\"Daffodil\");\n flowers.add(\"Petunia\");\n flowers.add(\"Lily\");\n\n session.setAttribute(\"flowersList\", flowers);\n }", "private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }", "abstract public void showAllStudents();", "@RequestMapping(method = RequestMethod.GET, value = \"/teamsForUser\")\n public JSONArray getAllTeamsForUserPage() {\n return teamService.getAllTeamsForUser();\n }", "@Override\r\n public List<Professor> findAll() {\r\n return getEntityManager().createNamedQuery(\"Professor.findAll\",Professor.class).getResultList();\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\t\tList<Singer> singers = new ArrayList<>();\n\t\tsingers = serviceSinger.listar();\n\t\ttry {\n\t\t\tPrintWriter out = response.getWriter();\n\t\t\tfor(Singer singer : singers) {\n\t\t\t\tout.println(singer.getId() + \" || \" + singer.getFirst_name() + \" || \" \n\t\t\t\t\t\t+ singer.getLast_name() + \" || \" + singer.getBirth_date());\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@GetMapping(\"/showStudents\")\n public String showStudents(HttpSession session, Model model) {\n //Get a list of students from the controller\n List<Student_gra_84> students = studentDaoImpl.getAllStudents();\n\n\n //Add the results to the model\n model.addAttribute(\"students\", students);\n return \"showStudents\";\n }", "public String stats() throws IOException, ClassNotFoundException, SQLException{\n\t\t\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\tCookie[] checkTheCookie = request.getCookies();\n\t\tboolean isUser= false;\n\t\tif(checkTheCookie!=null){\n\t\t\tfor(Cookie cki: checkTheCookie){\n\t\t\t\tString name = cki.getName();\n\t\t\t\t\n\t\t\t\tif(name.equals(\"user\")){\n\t\t\t\t\tisUser=true;\n//\t\t\t\t\tSystem.out.println(cki.getValue());\n//\t\t\t\t\treq.setAttribute(\"email\", cki.getValue());\n//\t\t\t\t\trequest.setAttribute(\"email\", cki.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isUser){\n\t\t\tresponse.sendRedirect(\"/Struts2Sample/_football_login.jsp\");\n\t\t}\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection (\"jdbc:oracle:thin:@oracle.cise.ufl.edu:1521:orcl\",\"konyala\", \"YyAUFfpm2UkB!\");\n\t\tStatement stmt = conn.createStatement ();\n\t\t\n//\t\tResultSet rset = stmt.executeQuery (\"select TEAM_NAME from TEAM\");\n//\t\tResultSet rset = stmt.executeQuery (\"select team_name,won from team t, (select count(match_winner) as won,match.MATCH_WINNER from match natural join season where season_year = \"+year+\" group by match_winner) winners where winners.match_winner = t.team_id\");\n\t\tResultSet rset = stmt.executeQuery (\"select venue_id, venue_name from venue\");\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"venue_id\", rset.getString(1));\n\t\t\ttempJson.put(\"venue_name\", rset.getString(2));\n\t\t \tresJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resJson\", resJsonArray);\n\t\t\n\t\tString batbowl = request.getParameter(\"batbowl\");\n\t\tString team1 = request.getParameter(\"team1\");\n\t\tString team2 = request.getParameter(\"team2\");\n\t\tString venue = request.getParameter(\"venue\");\n\t\tString season = request.getParameter(\"season\");\n\t\tString winlose = request.getParameter(\"winlose\");\n\t\tif(winlose!=null && winlose.equals(\"1\")){\n\t\t\twinlose = team1;\n\t\t}\n\t\telse{\n\t\t\twinlose = team2;\n\t\t}\n\t\t\n\t\tif(batbowl==null || team1==null){\n\t\t\treturn \"success\";\n\t\t}\n\t\t\n\t\trset = stmt.executeQuery(\"select player.player_name,total_runs,fours,sixes from (select striker as player_id, sum(runs_scored) as total_runs,count(case runs_scored when 4 then 1 end) as fours,count(case runs_scored when 6 then 1 end) as sixes from (select * from player_match natural join match natural join team natural join ball_by_ball natural join batsman_scored natural join season natural join venue natural join country where ((team_1 = \"+team1+\" and team_2 = \"+team2+\") or (team_2 = \"+team1+\" and team_1 = \"+team2+\")) and match_winner = \"+winlose+\" and season_id = \"+season+\" and venue_id = \"+venue+\") group by striker) tr, player where player.PLAYER_ID = tr.player_id\");\n\t\t\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"player_name\", rset.getString(1));\n\t\t\ttempJson.put(\"total_runs\", rset.getString(2));\n\t\t\ttempJson.put(\"fours\", rset.getString(3));\n\t\t\ttempJson.put(\"sixes\", rset.getString(4));\n\t\t\tresStatJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resStatJson\", resStatJsonArray);\n\t\t\n\t\treturn \"successStats\";\n\t}", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "public static List<String> getAttackerFromEngland() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/66\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> attackerName= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getPosition().equals(\"Attacker\")&&squad.get(i).getNationality().equals(\"England\")){\n\n attackerName.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n\n\n }\n }\n return attackerName;\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 }", "@GetMapping(\"/listAllDirectors\")\n public String showAllDirectors(Model model) {\n\n// Director director = directorRepo.findOne(new Long(1));\n Iterable <Director> directorlist = directorRepo.findAll();\n\n model.addAttribute(\"alldirectors\", directorlist);\n return \"listAllDirectors\";\n }", "@RequestMapping(value = \"/room\", method = RequestMethod.GET)\n public ModelAndView listRoom() {\n List<Group> groups = userBean.getAllGroups();\n for (int i = 0; i < groups.size(); i++) {\n userBean.getGroupByStreamId(groups.get(1));\n }\n ModelAndView view = new ModelAndView(\"room\");\n // view.addObject(\"list\", room);\n // view.addObject(\"note\", rooms);\n //view.addObject(\"st\", streamGroups);\n return view;\n }", "private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }", "@RequestMapping(\"/playernames\")\n public List<String> getAllPlayerNames(){\n return playerService.getPlayerNames();\n }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnThursday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnThursday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND thursdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND thursdayMeal IS \" +\n \"true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND thursdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "public ArrayList getSchools();", "@RequestMapping(value = \"/staff/studentlist\")\n\tpublic ModelAndView listStudents(@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer pageSize, HttpSession session) {\n\t\tif (page == null) {\n\t\t\tpage = 0;\n\t\t}\n\t\t\n\t\t// TODO add: limit students by managed campus\n\t\tPagedListHolder<Student> resultList = (PagedListHolder<Student>) session.getAttribute(\"StaffController_studentList\");\n\t\tif (resultList == null) {\n\t\t\tresultList = new PagedListHolder<Student>(userService.getAllStudents());\n\t\t\tsession.setAttribute(\"StaffController_studentList\", resultList);\n\t\t\tif (pageSize == null) {\n\t\t\t\tpageSize = DEFAULT_PAGE_SIZE;\n\t\t\t}\n\t\t}\n\t\tif (pageSize != null) {\n\t\t\tresultList.setPageSize(pageSize);\n\t\t}\n\t\tresultList.setPage(page);\n\t\treturn new ModelAndView(\"staff/studentlist\", \"resultList\", resultList);\n\t}", "List<Hospital> listall();", "private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs names \r\n ArrayList<String> clubs = new ArrayList<>();\r\n \r\n // add names to list\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n clubs.add(profile.get(cName).toString());\r\n }\r\n \r\n Collections.sort(clubs);\r\n \r\n for (String name : clubs)\r\n \t logger.log(Level.INFO, name);\r\n \r\n displayOpen();\r\n }", "public List<String> getMedalList(String delegation_name){\r\n\t\t\tList<String> list = new ArrayList<String>();\r\n\t\t\tConnection conn = DBConnect.getConnection();\r\n\t\t\tString sql = \"select event_name,team_name as name,rank,type,T1.sports_name \"\r\n\t\t\t\t\t+ \"from team_result T1 join event using(event_name) \"\r\n\t\t\t\t\t+ \"where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '\"+delegation_name+\"' union \"\r\n\t\t\t\t\t+ \"select event_name,athlete_name as name,rank,type,T1.sports_name \"\r\n\t\t\t\t\t+ \"from individual_result T1 join event using(event_name)\"\r\n\t\t\t\t\t+ \"where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '\"+delegation_name+\"'\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\t\twhile(rst.next()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist.add(rst.getString(\"event_name\"));\r\n\t\t\t\t\tlist.add(rst.getString(\"name\"));//team name\r\n\t\t\t\t\tlist.add(String.valueOf(rst.getInt(\"rank\")));\r\n\t\t\t\t\tlist.add(rst.getString(\"type\"));\r\n\t\t\t\t\tlist.add(rst.getString(\"sports_name\"));\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\trst.close();\r\n\t\t\t\tpst.close();\r\n\t\t\t}catch (SQLException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t e.printStackTrace();\t\t\t\r\n\t\t\t}\r\n\t\t\treturn list;\t\t\r\n\t\t}", "public List<String> getMovies(String n)\n\t{\n\t\tList<String> movies_of_the_actor = new ArrayList<String>();\n\t\t//look through the movie list and check if actor n is present\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getCast().contains(n))\n\t\t\t//if yes add the movie title to the list\n\t\t\t{\n\t\t\t\tmovies_of_the_actor.add(temp_movie.getTitle());\n\t\t\t}\t\t\n\t\t}\t\t\n\t\t//return the list\n\t\treturn movies_of_the_actor;\n\t}", "@GetMapping\n\tpublic List<UniversityStaffMember> viewAllStaffs() {\n\t\tList<UniversityStaffMember> list = universityService.viewAllStaffs();\n\t\tif (list.size() == 0)\n\t\t\tthrow new EmptyDataException(\"No University Staff in Database.\");\n\t\treturn list;\n\t}", "public Coach(String name, Sport sport) {\n this.name=name;\n this.sport=sport;\n }", "private void showStudentCourses()\r\n {\r\n \tString courseResponse = \"\";\r\n \tfor(Course course : this.getDBManager().getStudentCourses(this.studentId))\r\n \t{\r\n \t\tcourseResponse += \"Course Faculty: \" + course.getCourseName() + \", Course Number: \" + String.valueOf(course.getCourseNum()) + \"\\n\";\r\n \t}\r\n \tthis.getClientOut().printf(\"SUCCESS\\n%s\\n\", courseResponse);\r\n \tthis.getClientOut().flush();\r\n }", "public void listNations(Player player) {\n\t\tplayer.sendMessage(ChatTools.formatTitle(\"Nations\"));\n\t\tArrayList<String> formatedList = new ArrayList<String>();\n\t\tfor (Nation nation : plugin.getTownyUniverse().getNations())\n\t\t\tformatedList.add(Colors.LightBlue + nation.getName() + Colors.Blue + \" [\" + nation.getNumTowns() + \"]\" + Colors.White);\n\t\tfor (String line : ChatTools.list(formatedList))\n\t\t\tplayer.sendMessage(line);\n\t}", "@RequestMapping(\"/programmers-list\")\n public List<Programmer> getProgrammerListMembers() {\n return programmerService.getProgrammersListMembers();\n\n }", "public void listDoctors() {\n\n\t\ttry {\n\n\t\t\tList<Map<String, String>> doctorList = doctorDao.list();\n\n\t\t\tString did = \"DoctorId\";\n\t\t\tString dname = \"Doctor Name\";\n\t\t\tString speciality = \"Speciality\";\n\n\t\t\tSystem.out.printf(\"%10s%15s%15s\\n\", did, dname, speciality);\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\n\t\t\tfor (Map<String, String> aDoctor : doctorList) {\n\t\t\t\tSystem.out.printf(\"%10s%15s%15s\\n\", aDoctor.get(DoctorDao.ID), aDoctor.get(DoctorDao.NAME),\n\t\t\t\t\t\taDoctor.get(DoctorDao.SPECIALITY));\n\t\t\t}\n\n\t\t\tSystem.out.println(\"-------------------------------------------------\");\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}", "@Override\r\n\tpublic List<MemberDTO> list() {\n\t\treturn session.selectList(NAMESPACE+\".list\");\r\n\t}", "public java.util.List<Campus> findAll();", "void showPatients() {\n\t\t\t\n\t}", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnWednesday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnWednesday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND wednesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND wednesdayMeal IS \" +\n \"true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND wednesdayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}", "public synchronized String list(String name) {\n\t\tString result = \"\";\n\t\tboolean found = false;\n\t\tfor (Record r : record) {\n\t\t\tif (r.student.equals(name)) {\n\t\t\t\tfound = true;\n\t\t\t\tresult = result + r.ID + \" \" + r.book + \"*\";\n\t\t\t}\n\t\t}\n\t\tif (!found) {\n\t\t\tresult = \"No record found for \" + name;\n\t\t}\n\t\treturn result;\n\t}", "public static List<Person> getPersonsListByPlanet(List<Person> personsList , String planet)\n\t{\n\t\tList<Person> filteredList = personsList.stream().filter(x ->x.getPlanetOfResidence().equalsIgnoreCase(planet)).collect(Collectors.toList());\n\t\treturn filteredList;\n\t}", "public List<Coach> findAll() {\n\t\treturn list(namedQuery(\"de.hummelflug.clubapp.server.core.Coach.findAll\"));\n\t}", "@RequestMapping(\"singer-list\")\n public String listSingers(Model model, @Param(\"search\") String search) {\n // List<Singer> singerList = singerService.listAllSingers();\n // model.addAttribute(\"singersList\", singerList);\n return viewPage(model, search, 1, \"name\", \"asc\");\n }", "@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnSocialEvent() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnSocialEvent\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND socialEvent IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND socialEvent IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND socialEvent IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "public static void userDisplay() {\n\n String nameList = \" | \";\n for (String username : students.keySet()) {\n nameList += \" \" + username + \" | \";\n\n\n }\n System.out.println(nameList);\n// System.out.println(students.get(nameList).getGrades());\n\n }", "@Override\r\n\tpublic ArrayList<ShoppingList> getAllShoppingListsByPerson(Person p) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}", "List<Seat> getSeatsWithState(int filmSessionId);", "public List<Professor> findAll();", "public static List<String> getAllTeams() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n TeamsPojo pojo = objectMapper.readValue(response.getEntity().getContent(),TeamsPojo.class);\n List<String> willBeReturned = new ArrayList<>();\n List<Teams> teams = pojo.getTeams();\n for (int i =0 ; i<teams.size();i++){\n willBeReturned.add(teams.get(i).getName());\n }\n\n\n return willBeReturned;\n }", "public void searchByState() {\n System.out.println(\"enter a name of state to fetch person data fro state :--\");\n String state = scanner.next();\n\n Iterator it = list.iterator();\n while (it.hasNext()) {\n Contact person = (Contact) it.next();\n if (state.equals(person.getState())) {\n List stream = list.stream().filter(n -> n.getCity().contains(state)).collect(Collectors.toList());\n System.out.println(stream);\n }\n }\n }", "private void searchSponsor() {\r\n String sponsorCode=null;\r\n try {\r\n CoeusSearch coeusSearch =\r\n new CoeusSearch(mdiForm, \"SPONSORSEARCH\",\r\n CoeusSearch.TWO_TABS_WITH_MULTIPLE_SELECTION );\r\n coeusSearch.showSearchWindow();\r\n javax.swing.JTable tblResultsTable = coeusSearch.getSearchResTable();\r\n if(tblResultsTable == null) return;\r\n int row = tblResultsTable.getSelectedRow();\r\n if(row!=-1){\r\n sponsorCode = (String)tblResultsTable.getValueAt(row, 0);\r\n sponsorCode = sponsorCode+\":\"+(String)tblResultsTable.getValueAt(row, 1);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(\"Please select a Sponsor\");\r\n }\r\n } catch (Exception exception) {\r\n exception.printStackTrace();\r\n }\r\n int startRow = 0;\r\n TreePath root = new TreePath(sponsorHierarchyTree.getModel().getRoot());\r\n // Find the path (regardless of visibility) that matches the\r\n // specified sequence of names\r\n TreePath path = findByName(sponsorHierarchyTree, sponsorCode);\r\n if(path == null) {\r\n CoeusOptionPane.showInfoDialog(\"The sponsor:\"+sponsorCode.substring(0,sponsorCode.indexOf(\":\"))+\" is not found in this hierarchy.\");\r\n sponsorHierarchyTree.collapsePath(root);\r\n sponsorHierarchyTree.setSelectionPath(root);\r\n return;\r\n }\r\n sponsorHierarchyTree.expandPath(root);\r\n sponsorHierarchyTree.expandPath(path);\r\n sponsorHierarchyTree.setSelectionPath(path);\r\n sponsorHierarchyTree.scrollRowToVisible(sponsorHierarchyTree.getRowForPath(path));\r\n }", "public List<StudyVO> listSubject(Criteria cri) {\n \n\t\t\t \n\tList<StudyVO> list =mapper.listSubject(cri);\n\tlogger.info(\"service계층에서list는\"+mapper.listSubject(cri));\n\tSystem.out.println(\"servicesubject:\"+cri);\n\treturn list;\n\t\n\t\n\n }", "public List<Player> selectByNationality(String nationality) throws Exception;", "java.util.List<People>\n getUserList();", "List<Player> findAllPlayers();", "List<Salesman> findAll();", "@GetMapping(\"/{id}\")\r\n public ResponseEntity<?> findAllStatsBySportId(@PathVariable long id) {\r\n List<SportStats> allSportsById = sportStatsService.findAllStatsBySportId(id);\r\n return new ResponseEntity<>(allSportsById, HttpStatus.OK);\r\n }", "public Set<Sportive> getAll(){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).collect(Collectors.toSet());\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tresponse.setContentType(\"text/html;charset=utf-8\");\n\t\tHttpSession session = request.getSession();\n\t\tMap<String, ArrayList<User>> stuMap = new LinkedHashMap<>();\n\t\tArrayList<User> e50 = new ArrayList<>();\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tUser st = new User();\n\t\t\tst.setName(\"小明\"+i);\n\t\t\tst.setAge(19);\n\t\t\tst.setGender(\"男\");\n\t\t\tst.setClassNum(\"1000010\"+i);\n\t\t\te50.add(st);\n\t\t}\n\t\tstuMap.put(\"e50\", e50);\n\t\t\n\t\tArrayList<User> e51 = new ArrayList<>();\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tUser st = new User();\n\t\t\tst.setName(\"小Liang\"+i);\n\t\t\tst.setAge(19);\n\t\t\tst.setGender(\"女\");\n\t\t\tst.setClassNum(\"1000020\"+i);\n\t\t\te51.add(st);\n\t\t}\n\t\tstuMap.put(\"e51\", e51);\n\t\n\t\tsession.setAttribute(\"stuMap\", stuMap);\n\t\tresponse.sendRedirect(\"/FirstWeb/ShowAllStudent.jsp\");\n\t\t//request.setAttribute(\"stuMap\", stuMap);\n\t//\trequest.getRequestDispatcher(\"/FirstWeb/ShowAllStudent.jsp\").forward(request, response);\n\t}", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void printTeamsInLeague(){\n for (T i : teams){\n System.out.println(i.getTeamName());\n }\n }", "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "@GetMapping(\"/listPeople\")\r\n public ModelAndView listPeople() {\r\n LOG.debug(\"listPeople\");\r\n ModelAndView mav = new ModelAndView(LIST_PEOPLE_VIEW);\r\n mav.addObject(\"people\", personService.getPeople());\r\n return mav;\r\n }", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public List getAllStu();", "public Campus fetchByname(java.lang.String name);", "public String DisplayStudents()\n\t{\t\n\t\tString studentList= \"\";\n\t\tint i=1; //the leading number that is interated for each student\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\tstudentList += i + \". \" + b.getStrNameFirst ( ) + \" \" + b.getStrNameLast () +\"\\n\";\n\t\t\ti++;\n\t\t}\n\t\treturn studentList= getCourseName() +\"\\n\" + getCourseNumber()+\"\\n\" + getInstructor()+ \"\\n\" + studentList;\n\t}", "@RequestMapping(value = \"/sc\", method = RequestMethod.GET)\n public ModelAndView listsc() {\n List<Group> groups = userBean.getAllGroups();\n List<WeekDay> weekDays = userBean.getAllWeekDay();\n ModelAndView view = new ModelAndView(\"sc\");\n // view.addObject(\"list\",list);\n view.addObject(\"group\", groups);\n view.addObject(\"week\", weekDays);\n return view;\n }", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "@Override \n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) \n\t\t\tthrows ServletException, IOException {\n \t//Initialize local variables\n\t\tString url = \"/Roster.jsp\";\n\t\tString teamID = request.getParameter(\"teamID\");\n\t\tServletContext ctx = getServletContext();\t\t\n\t\t\n\t\t//Attempt to get the entity manager factory, redirects to login page if no entity manager found\n\t\tgetEntityManagerFactory(request, response);\n\t\t\n\t\t//If connection to database exists, retrieve roster information from DAO object\n\t\tif(emf != null){\n\t\t\tLeagueDAO ldao = new LeagueDAO(emf);\n\t\t\tArrayList<Roster> forwardRosters = new ArrayList<Roster>();\n\t\t\tArrayList<Roster> defenceRosters = new ArrayList<Roster>();\n\t\t\tArrayList<Roster> goalieRosters = new ArrayList<Roster>();\n\t\t\tTeam team = new Team();\n\t\t\ttry {\n\t\t\t\t forwardRosters = ldao.getRosters(teamID, \"Left Wing\", \"Right Wing\", \"Centre\");\n\t\t\t\t defenceRosters = ldao.getRosters(teamID, \"Defence\");\n\t\t\t\t goalieRosters = ldao.getRosters(teamID, \"Goalie\");\n\t\t\t\t team = ldao.getTeam(teamID);\n\t\t\t} \n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//Set roster and team name to be displayed on jsp\n\t\t\trequest.setAttribute(\"forwardRosters\", forwardRosters);\n\t\t\trequest.setAttribute(\"defenceRosters\", defenceRosters);\n\t\t\trequest.setAttribute(\"goalieRosters\", goalieRosters);\n\t\t\trequest.setAttribute(\"team\", team);\n\t\t\tctx.getRequestDispatcher(url).forward(request, response);\n\t\t}\n\t}", "public void viewByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.nextLine();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(i));\n }", "public ArrayList<CollegeFootballTeam> getTeamList();", "@Transactional\n\tpublic List<Faculty> listAllFaculty() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<Faculty> criteriaQuery = builder.createQuery(Faculty.class);\n\t\tRoot<Faculty> root = criteriaQuery.from(Faculty.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<Faculty> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "@Override\r\n public List<Visitors> visfindAll() {\n return userMapper.visfindAll();\r\n }", "@GetMapping(\"/staff\")\n\tpublic List<Staff> getStuedents() {\n\t\treturn staffService.getStaffs();\n\t}" ]
[ "0.6321984", "0.5762401", "0.5755302", "0.5719504", "0.5646438", "0.5602418", "0.5516061", "0.5423669", "0.54071426", "0.5379345", "0.5345941", "0.5342602", "0.53085566", "0.5300181", "0.5293075", "0.5244483", "0.5222101", "0.5221205", "0.5216396", "0.51979566", "0.5194368", "0.5190642", "0.5170243", "0.51649016", "0.51545846", "0.51527506", "0.51475954", "0.5147521", "0.51457673", "0.5143255", "0.5131011", "0.51304376", "0.5126318", "0.51138407", "0.5112954", "0.5101218", "0.50762784", "0.50744647", "0.5073518", "0.50690866", "0.5062218", "0.50574917", "0.5055782", "0.5053963", "0.50518966", "0.5051025", "0.5050291", "0.5045271", "0.5044351", "0.50375426", "0.5033526", "0.5028183", "0.502812", "0.5016105", "0.5009179", "0.50067204", "0.49989235", "0.49970695", "0.4993153", "0.4990815", "0.49787685", "0.49783057", "0.49756196", "0.49680018", "0.49628758", "0.4959759", "0.49586663", "0.4955964", "0.49507934", "0.49465188", "0.4943577", "0.49392185", "0.49319497", "0.49297145", "0.49278697", "0.49276516", "0.49273327", "0.49219885", "0.4909944", "0.49018347", "0.4898964", "0.48924506", "0.48804855", "0.48748705", "0.48746327", "0.48745432", "0.48744822", "0.4873857", "0.4872191", "0.4865492", "0.48651627", "0.4862804", "0.48609784", "0.4860791", "0.48594216", "0.4859218", "0.4857259", "0.48571062", "0.48569214", "0.48559394" ]
0.65534157
0
Calculate the number of male and female athletes in a certain sport in a delegation eg.USA.jsp
public List<Integer> getMemAmount(String delegation_name,String sports_name){ List<Integer> list = new ArrayList<Integer>(); List<String> list2 = new ArrayList<String>(); Connection conn = DBConnect.getConnection(); String sql = "select count(athlete_name) as amount,sex from athlete where sports_name='" + sports_name + "' and delegation_name='" + delegation_name +"' group by sex order by sex"; try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { String amount = String.valueOf(rst.getInt("amount")); String sex = rst.getString("sex"); list2.add(amount); list2.add(sex); } if(list2.size()==0) { list.add(0); list.add(0); } else if(list2.size()==2) { if(list2.get(1).equals("Female")) { list.add(Integer.parseInt(list2.get(0))); list.add(0); }else { list.add(0); list.add(Integer.parseInt(list2.get(0))); } } else { list.add(Integer.parseInt(list2.get(0))); list.add(Integer.parseInt(list2.get(2))); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int numberOfFemale(){\n int female=0;\n for (int i=0;i<kangaroosInPoint.size();i++){\n if(kangaroosInPoint.get(i).getGender()=='F'){\n female++;\n } \n }\n return female;\n }", "@Override\r\n\tpublic int GenderCount(String gender) {\n\t\tint count = 0;\r\n\t\tfor (Map.Entry<String, MemberBean> entry : map.entrySet()) {\r\n\t\t\tif(entry.getValue().getGender().equals(gender)){\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getTotalStudentsInInstitute() {\n\t\tint noOfStudents = 0;\n\t\tList<Student> students;\n\t\tfor (Department dept : departments) {\n\t\t\tstudents = dept.getStudents();\n\t\t\tfor (Student s : students) {\n\t\t\t\tnoOfStudents++;\n\t\t\t}\n\t\t}\n\t\treturn noOfStudents;\n\t}", "int getStudentResponseCount();", "int getStudentCount();", "public String getCount() {\r\n \t\r\n \tBoolean anyAges = Boolean.FALSE;\r\n \tBoolean anyAssayTypes = Boolean.FALSE;\r\n \tint count = 0;\r\n \t\r\n \tfor (String age: ages) {\r\n \t\tif (age.endsWith(\"ANY\")) {\r\n \t\t\tanyAges = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \tfor (String type: assayTypes) {\r\n \t\tif (type.equals(\"ANY\")) {\r\n \t\t\tanyAssayTypes = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \t// No Restrictions on Ages or AssayTypes, count everything\r\n \tif (anyAssayTypes && anyAges) {\r\n \tcount = record.getPairs().size(); \t\t\r\n \t}\r\n \t\r\n \t// There are restrictions on ages only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAssayTypes) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String age: ages) {\r\n \t\t\t\tif (pair.getAge().equals(age)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t// There are restrictions on assayTypes only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAges) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tif (pair.getAssayType().equals(type)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \telse {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tfor (String age: ages) {\r\n \t\t\t\t\tif (pair.getAssayType().equals(type) && pair.getAge().equals(age)) {\r\n \t\t\t\t\t\tcount ++;\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}\r\n\r\n \treturn \"\" + count;\r\n \t\r\n }", "int getCountOfFemaleUsers(List<User> users);", "int getEducationsCount();", "public void totalBirths (FileResource fr) {\n int totalBirths = 0;\n int totalBoys = 0;\n int totalGirls = 0;\n \n //iterating over the CSV file\n for (CSVRecord rec : fr.getCSVParser(false)) {\n //getting the births number\n int numBorn = Integer.parseInt(rec.get(2));\n \n //updating total births number\n totalBirths += numBorn;\n \n //checking the sex, if M then increase boys count, else increase boys count\n if (rec.get(1).equals(\"M\")) {\n totalBoys += numBorn;\n }\n else {\n totalGirls += numBorn;\n }\n }\n System.out.println(\"total births = \" + totalBirths);\n System.out.println(\"female girls = \" + totalGirls);\n System.out.println(\"male boys = \" + totalBoys);\n }", "int getIndividualStamina();", "int getPersonInfoCount();", "int countByExample(WstatTeachingClasshourTeacherExample example);", "private int calculateTotal(boolean oneAnswer, boolean twoAnswer, boolean threeAnswer, boolean fourAnswer, String fiveAnswer, boolean sixAnswer) {\n int calculateTotal = 0;\n\n if (oneAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (twoAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (threeAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (fourAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (fiveAnswer.equalsIgnoreCase(\"Decatur Staleys\")) {\n calculateTotal = calculateTotal + 1;\n }\n if (sixAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n\n return calculateTotal;\n }", "public static int getNoOfHospitals(){\n return noOfHospitals;\n }", "private int getEducationalCount(){\n int count = 0;\n\n String whereClause = DbHelper.IS_EDUCATIONAL + \" = ?\";\n String[] whereArgs = new String[]{String.valueOf(true)};\n\n Cursor cursor = mDbHelper.getReadableDatabase().query(DbHelper.TABLE_NAME, null, whereClause, whereArgs, null, null, null);\n\n while(cursor.moveToNext()){\n count++;\n }\n\n return count;\n }", "int getGenderValue();", "int getDonatoriCount();", "int getGender();", "public String stats() throws IOException, ClassNotFoundException, SQLException{\n\t\t\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\tCookie[] checkTheCookie = request.getCookies();\n\t\tboolean isUser= false;\n\t\tif(checkTheCookie!=null){\n\t\t\tfor(Cookie cki: checkTheCookie){\n\t\t\t\tString name = cki.getName();\n\t\t\t\t\n\t\t\t\tif(name.equals(\"user\")){\n\t\t\t\t\tisUser=true;\n//\t\t\t\t\tSystem.out.println(cki.getValue());\n//\t\t\t\t\treq.setAttribute(\"email\", cki.getValue());\n//\t\t\t\t\trequest.setAttribute(\"email\", cki.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isUser){\n\t\t\tresponse.sendRedirect(\"/Struts2Sample/_football_login.jsp\");\n\t\t}\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection (\"jdbc:oracle:thin:@oracle.cise.ufl.edu:1521:orcl\",\"konyala\", \"YyAUFfpm2UkB!\");\n\t\tStatement stmt = conn.createStatement ();\n\t\t\n//\t\tResultSet rset = stmt.executeQuery (\"select TEAM_NAME from TEAM\");\n//\t\tResultSet rset = stmt.executeQuery (\"select team_name,won from team t, (select count(match_winner) as won,match.MATCH_WINNER from match natural join season where season_year = \"+year+\" group by match_winner) winners where winners.match_winner = t.team_id\");\n\t\tResultSet rset = stmt.executeQuery (\"select venue_id, venue_name from venue\");\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"venue_id\", rset.getString(1));\n\t\t\ttempJson.put(\"venue_name\", rset.getString(2));\n\t\t \tresJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resJson\", resJsonArray);\n\t\t\n\t\tString batbowl = request.getParameter(\"batbowl\");\n\t\tString team1 = request.getParameter(\"team1\");\n\t\tString team2 = request.getParameter(\"team2\");\n\t\tString venue = request.getParameter(\"venue\");\n\t\tString season = request.getParameter(\"season\");\n\t\tString winlose = request.getParameter(\"winlose\");\n\t\tif(winlose!=null && winlose.equals(\"1\")){\n\t\t\twinlose = team1;\n\t\t}\n\t\telse{\n\t\t\twinlose = team2;\n\t\t}\n\t\t\n\t\tif(batbowl==null || team1==null){\n\t\t\treturn \"success\";\n\t\t}\n\t\t\n\t\trset = stmt.executeQuery(\"select player.player_name,total_runs,fours,sixes from (select striker as player_id, sum(runs_scored) as total_runs,count(case runs_scored when 4 then 1 end) as fours,count(case runs_scored when 6 then 1 end) as sixes from (select * from player_match natural join match natural join team natural join ball_by_ball natural join batsman_scored natural join season natural join venue natural join country where ((team_1 = \"+team1+\" and team_2 = \"+team2+\") or (team_2 = \"+team1+\" and team_1 = \"+team2+\")) and match_winner = \"+winlose+\" and season_id = \"+season+\" and venue_id = \"+venue+\") group by striker) tr, player where player.PLAYER_ID = tr.player_id\");\n\t\t\n\t\twhile (rset.next ()){\n\t\t\tJSONObject tempJson = new JSONObject();\n\t\t\ttempJson.put(\"player_name\", rset.getString(1));\n\t\t\ttempJson.put(\"total_runs\", rset.getString(2));\n\t\t\ttempJson.put(\"fours\", rset.getString(3));\n\t\t\ttempJson.put(\"sixes\", rset.getString(4));\n\t\t\tresStatJsonArray.put(tempJson);\n\t\t}\n\t\trequest.setAttribute(\"resStatJson\", resStatJsonArray);\n\t\t\n\t\treturn \"successStats\";\n\t}", "public int getAdvisorCount();", "public static double totalcommision(int salesman_id) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tdouble total_amount = 0;\r\n\r\n\t\tString query = \"SELECT DISTINCT(appliance_name) AS apname ,(SELECT CountNumberAppliance(apname,\"\r\n\t\t\t\t+ salesman_id + \")) FROM appliance\";\r\n\t\tint count;\r\n\t\tString name;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tSystem.out.println(query);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tname = rs.getString(1);\r\n\t\t\t\tif (name.equalsIgnoreCase(\"5 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 5;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"10 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 15;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"15 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 35;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count <= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count <= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"20 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 75;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn total_amount;\r\n\t}", "public static double getGenderAvgWage(String g) throws Exception\r\n\t{\r\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\t\r\n\t\ttotalWage=0;\r\n\t\tcount=0;\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t/*if the gender is male, it takes the gross pay of that person, adds it to the total for male wages\r\n\t\t\tand also adds 1 to the male counter.*/\r\n\t\t\t//otherwise, adds it to the total for female wages and 1 to female counter.\r\n\t\t\tif(gen.equals(g))\r\n\t\t\t{\r\n\t\t\t\ttotalWage=gross+totalWage;\r\n\t\t\t\tcount+=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfs.close();\r\n\t\treturn totalWage/count;\r\n\t}", "public static long getTotalNumberOfPerson(List<Person> personsList , String planet)\n\t{\n\t\t\treturn personsList.stream().filter(x ->x.getPlanetOfResidence().equalsIgnoreCase(planet)).count();\n\t}", "private int numberOfStudents() {\n int sum = 0;\n for (int student : this.studentList) {\n sum += student;\n }\n return sum;\n }", "public int getFemale() {\n return female;\n }", "public void comingOfAge(Caldean du){\n if(du.isFemale())\n eligibleDuas.add(du);\n\n else\n eligibleDuises.add(du);\n\n System.out.println(\"coming of age\");\n System.out.println(eligibleDuas.size());\n}", "public int fight(Transformer transformer) {\n // If this is a special transformer\n if (name.equals(\"Optimus Prime\") || name.equals(\"Predaking\")) {\n // And other is a special transformer\n if (transformer.getName().equals(\"Optimus Prime\") || transformer.getName().equals(\"Predaking\"))\n return -2;\n return 1;\n }\n\n // If other is a special transformer\n if (transformer.getName().equals(\"Optimus Prime\") || transformer.getName().equals(\"Predaking\"))\n return -1;\n\n // Check courage and strength\n if (courage > transformer.courage + 3 && strength > transformer.strength + 2)\n return 1;\n if (courage < transformer.courage - 3 && strength < transformer.strength - 2)\n return 1;\n\n // Check skill\n if (skill > transformer.skill + 2)\n return 1;\n if (skill < transformer.skill - 2)\n return -1;\n\n // Check overall\n if (overall > transformer.overall)\n return 1;\n if (overall < transformer.overall)\n return -1;\n\n return 0;\n }", "public int gender()\r\n\t{\r\n\t\tif(male)\r\n\t\t\treturn 0;\r\n\t\treturn 1;\r\n\t}", "int countByExample(StudentCriteria example);", "int countByExample(HospitalTypeExample example);", "public Integer countGoals();", "int getStudentAge();", "public double getFemalePercentage() {\n double numberOfFemales = 0;\n int population = this.getPopulation();\n Iterator<Guppy> it = guppiesInPool.iterator();\n\n while (it.hasNext()) {\n Guppy currentGuppy = it.next();\n if (currentGuppy.getIsFemale()) {\n numberOfFemales++;\n }\n }\n return (population == 0) ? population : numberOfFemales / population;\n }", "public int getNumberOfNurse() {\n return numberOfNurse;\n }", "int countByExample(UserGiftCriteria example);", "int getAoisCount();", "public double getHeardPercentSports() {\n return heardPercentSports;\n }", "protected Double getCAProfessionnel() {\n List<Facture> facturesProfessionnel = this.factureProfessionnelList;\n Double ca = 0.0; \n for(Facture f : facturesProfessionnel )\n ca = ca + f.getTotalHT();\n \n return ca ; \n \n }", "public double findAvgWage() {\n int numLabourer = 0;\n double total = 0;\n \n for (int i = 0; i < staffList.length; i++) {\n if (staffList[i] instanceof Labourer) {\n total += ((Labourer) staffList[i]).getWage();\n numLabourer ++;\n }\n }\n \n return total/numLabourer;\n }", "public int getFishingSkill();", "int countByExample(LawPersonExample example);", "public void calculate()\n {\n \tVector<Instructor> instructors = instructorDB.getAllInstructors();\n \tSchedule schedule = AdminGenerating.getSchedule();\n \tsections = schedule.getAllSections();\n \n for (Instructor instructor : instructors) {\n calculateIndividual(instructor);\n }\n \n calculateOverall();\n }", "Object countTAlgmntBussRulesByTAlgmntSalesTeam(SearchFilter<TAlgmntSalesTeam> searchFilter);", "public int getHeightRoll() {\n\t\tint result = 0;\n\t\tRaces racesDropDownText = (Races) race.getSelectedItem();\n\t\tString stringDropDownText = (String) gender.getSelectedItem();\n\n\t\tif (racesDropDownText.equals(Races.DWARF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.DWARF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.DWARF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.ELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.ELF.getHeightDiceAmount(), Races.ELF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.ELF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.ELF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.GNOME)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.GNOME.getHeightDiceAmount(), Races.GNOME.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.GNOME.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.GNOME.getHeightDiceAmount(), Races.GNOME.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.GNOME.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFELF.getHeightDiceAmount(), Races.HALFELF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFELF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFELF.getHeightDiceAmount(), Races.HALFELF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFELF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFORC)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFORC.getHeightDiceAmount(), Races.HALFORC.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFORC.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFORC.getHeightDiceAmount(), Races.HALFORC.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFORC.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFLING)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFLING.getHeightDiceAmount(), Races.HALFLING.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFLING.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFLING.getHeightDiceAmount(), Races.HALFLING.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFLING.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HUMAN)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HUMAN.getHeightDiceAmount(), Races.HUMAN.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HUMAN.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HUMAN.getHeightDiceAmount(), Races.HUMAN.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HUMAN.getBaseMaleHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "int getIndividualDefense();", "public Integer costOfDepartment() {\n Integer total = 0;\n for (Manager manager :\n departmentHeads) {\n total += manager.costOfTeam();\n }\n return total;\n }", "public Integer getAdmSexual() {\n return admSexual;\n }", "private int getPersonTypeCountFromPassengers(final Collection<Passenger> passengers, final PersonType type)\r\n {\r\n final Set<PersonType> adultType = EnumSet.of(type);\r\n return PassengerUtils.getPersonTypeCountFromPassengers(passengers, adultType);\r\n }", "public static int countOfTeachers() {\n\n int count = 0;\n\n String sql = \"SELECT COUNT(teacher_id) AS count FROM teachers\";\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n count = set.getInt(\"count\");\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return count;\n }", "public int countEmployees(String g) {\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter number of males and females: \");\r\n\t\tint numOfMales = scan.nextInt();\r\n\t\tint numOfFemales = scan.nextInt();\r\n\t\t\r\n\t\tdouble sumOfClass=numOfMales+numOfFemales;\r\n\t\t\r\n\t\tdouble percentageOfmales = (numOfMales/sumOfClass)*100;\r\n\t\tdouble percentageOffemales = (numOfFemales/sumOfClass)*100;\r\n\t\t\r\n\t\tSystem.out.println(percentageOfmales);\r\n\t\tSystem.out.println(percentageOffemales);\r\n\t\t\r\n\t}", "public int getTotalVisited(){\n return this.getSea().countVisited();\n }", "int getStamina();", "int getAchieveInfoCount();", "int getSeasonShareCount();", "public static int getNumberOfStudents() {\n\t\treturn numberOfStudents;\n\t}", "public double lifeTables(boolean female,int age)\n{\n if(female)\n {\n if(age==1)\n return 837;\n else if(age<5)\n return 967;\n else if(age<10)\n return 992;\n else if(age<20)\n return 996;\n else if(age<30)\n return 992;\n else if(age<40)\n return 990;\n else if(age<50)\n return 988;\n else if(age<60)\n return 987;\n else if(age<70)\n return 970;\n else if(age<80)\n return 942;\n else if(age<90)\n return 812;\n //nobody makes it past ninety, sorry :/\n else\n return 0;\n }\n else\n {\n if(age==1)\n return 846;\n else if(age<5)\n return 980;\n else if(age<10)\n return 994;\n else if(age<20)\n return 995;\n else if(age<30)\n return 994;\n //30-49 has a very similar mortality rate\n else if(age<50)\n return 986;\n else if(age<60)\n return 983;\n else if(age<70)\n return 962;\n else if(age<80)\n return 925;\n else if(age<90)\n return 829;\n //nobody makes it past ninety, sorry :/\n else\n return 0;\n\n\n }\n}", "public int getMale() {\n return male;\n }", "private void calculateIndividual(Instructor instructor)\n {\n \tint score = 0;\n \tInstructor courseInstructor;\n \tCourse course;\n \t\n \tint prefNum = 0;\n \tint numCourses = 0;\n \t\n \tint timeNum = 0;\n \t\n \tList<CoursePreference> coursePrefs = instructor.getAllClassPrefs();\t\n \tArrayList<Day> timePrefs = instructor.getTimePrefs(); \n \t\n \tfor (Section section : sections) {\n \t\tcourseInstructor = section.getInstructor();\n \t\t\n \t\tif (courseInstructor.equals(instructor)) {\n \t\t numCourses++;\n \t\t course = section.getCourse();\n \t\t \n \t\t for (CoursePreference pref : coursePrefs) {\n \t\t\t if (pref.course.equals(course)) {\n \t\t\t\t prefNum += pref.preference / 5;\n \t\t\t }\n \t\t }\n \t\t}\n \t}\n \t\n \tif (numCourses > 0) {\n \t\tprefNum /= numCourses;\n \t\ttimeNum /= numCourses;\n \t}\n \t\n \tscore = 100 * (prefNum + timeNum) / 2;\n \t\n this.individualAnalytics.add(new AnalyticsRow(instructor.getName(), score));\n allScores.add(score);\n }", "public double getVentureChecklistPercent(Member member1) {\n\t\tdouble mapSubclassCount;\r\n\t\tdouble mySubclassCount;\r\n\t\tdouble percentCount;\r\n\t\tSl1 = \"SELECT COUNT(*) AS count FROM map_subclass WHERE mapClassID=?\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tsmt = conn.prepareStatement(Sl1);\r\n\t\t\tsmt.setString(1, member1.getSetPercent());\r\n\t\t\tSystem.out.println(\"getSetPercent()=\"+member1.getSetPercent());\r\n\t\t\trs1 = smt.executeQuery();\r\n\t\t\tif(rs1.next()){\t\r\n\t\t\t\tmapSubclassCount=rs1.getInt(\"count\");\r\n\t\t\t\tSystem.out.println(\"mapSubclassCount=\"+mapSubclassCount);\t\t\t\t\r\n\t\t\t\tSl2 = \"SELECT COUNT(*) AS count FROM venture_checklist WHERE mapClassID=? AND memberAccount =? \";\r\n\t\t\t\tsmt = conn.prepareStatement(Sl2);\r\n\t\t\t\tsmt.setString(1, member1.getSetPercent());\r\n\t\t\t\tsmt.setString(2, member1.getAccount());\r\n\t\t\t\trs2 = smt.executeQuery();\r\n\t\t\t\tif(rs2.next()){\t\r\n\t\t\t\t\tmySubclassCount=rs2.getInt(\"count\");\r\n\t\t\t\t\t//System.out.println(\"mySubclassCount=\"+mySubclassCount);\t\r\n\t\t\t\t\tpercentCount = mySubclassCount/mapSubclassCount;\r\n\t\t\t\t\t//System.out.println(\"percentCount=\"+(mySubclassCount/mapSubclassCount));\r\n\t\t\t\t\treturn percentCount;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsmt.executeQuery();\r\n\t\t\trs1.close();\r\n\t\t\trs2.close();\r\n\t\t\tsmt.close();\r\n \r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n \r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\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}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public String gender();", "@Query(\"select count(s)*1./(select count(s1)*1. from Sponsorship s1) from Sponsorship s where s.isActive='1'\")\n\tDouble ratioOfActiveSponsorships();", "public abstract int numOfBaby();", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "long countNameIdNameByIdPerson(int idPerson);", "public static int countFemale(Person[] list) throws NullPointerException{\n if (list == null) {\n throw new NullPointerException(\"Error!!! array cannot be null.\");\n } else{\n int count = 0;\n for (int i = 0; i< list.length; i++){\n if(list[i].getGeschlecht() == 'f'){\n count++;\n }\n }\n return count;\n }\n }", "int getAchievementsCount();", "public int getDepartedPassengerCount() {\n\t\tint total = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttotal += taxi.getTotalNrOfPassengers();\n\t\t}\n\t\treturn total;\n\t}", "public int getNumGruppoPacchetti();", "boolean hasHasGender();", "public int totalHabitantes() {\r\n\tIterator<Ciudad> it = ciudades.iterator();\r\n\tint totalhab = 0;\r\n\tint i = 0;\r\n\twhile(it.hasNext()) {\r\n\t\ttotalhab += it.next().getHabitantes();\r\n\t\t\r\n\t}\r\n\t return totalhab;\r\n\r\n }", "long countByExample(VisituserExample example);", "int getExperiencesCount();", "int getInterestsCount();", "boolean hasGender();", "boolean hasGender();", "public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }", "public void Senority(){\r\n\t\t\r\n\t\tif (age >= 65){\r\n\t\t\tSystem.out.println(\"\\nI'm a senior citizen\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"\\nI'm not old enough to be classified as a senior by Medicare!\");\r\n\t\t}\r\n\t}", "public int getAantalPeronen() {\n\t\treturn aantalPeronen;\n\t}", "protected int countUsers() \n\t{\n\t\tint result = -1;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(\"SELECT COUNT(lfm_username) FROM Persons;\");\n\t\t\tSystem.out.println(rs.toString());\n\t\t\tresult = rs.getInt(1);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tSystem.out.println(\"Something went wrong counting users from Persons\");\n\t\t}\n\t\treturn result;\n\t}", "long countByExample(SalGradeExample example);", "void printPetalCount() {\n\t\tprint(\"petalCout = \"+petalCount+\" S = \"+s);\r\n\t\t\r\n\t}", "public static double assocFile() {\n\t\tint assocCount = 0;\n\t\tdouble assocSalary = 0;\n\t\tString professor = \"Unknown\";\n\t\tdouble salary = 0.0;\n\t\topenURL(); //open dataset\n\t\twhile(input.hasNext()) {\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tsalary = input.nextDouble();\n\t\t\tif(professor.equals(\"associate\")) {\n\t\t\t\tassocSalary += salary;\n\t\t\t\tassocCount++;\t\t\t\n\t\t\t}\n\t\t\tprofessor = \"associate\";\n\t\t}\n\t\t//display associate professor total salary\n\t\tSystem.out.println(\"Total salary for \" + professor + \" professors is $\" + dF.format(assocSalary));\n\t\t\n\t\treturn assocSalary / assocCount;\n\t}", "public static CalculationResultMap genders(Collection<Integer> cohort, PatientCalculationContext context) {\n GenderDataDefinition def = new GenderDataDefinition(\"gender\");\n return MentalHealthConfigCalculationUtils.evaluateWithReporting(def, cohort, null, null, context);\n }", "private void calculateRating() {\n\t\tVisitor[] visitors = getVisitors();\n\t\tint max = 0;\n\t\tint act = 0;\n\t\tfor (Visitor visitor : visitors) {\n\t\t\tif(validRating(visitor)) {\n\t\t\t\tmax += 5;\n\t\t\t\tact += visitor.getRating();\n\t\t\t}\n\t\t}\n\t\tif(max != 0) {\n\t\t\trating = (1f*act)/(1f*max);\n\t\t}\n\t}", "public void doSth() {\n\t\tint countOfActorsNamedJoe = this.jdbcTemplate.queryForInt(\"select count(*) from t_actor where first_name = ?\"); \r\n\t\tSystem.out.println(\"Count of actors : \" + countOfActorsNamedJoe);\r\n\t}", "public double getLikePercentSports() {\n return likePercentSports;\n }", "public static int getNos() {\n\t\treturn numberOfStudents;\n\t}", "public static int getCountofPeople(){\n int training_set = 0;\n \n try (Connection con = DriverManager.getConnection(url, user, password)){\n String query = \"SELECT count(*) FROM \"+DATABASE_NAME+\".People;\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n if (rs.next()) {\n training_set = rs.getInt(1);\n }\n con.close();\n }catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return training_set;\n }", "public int countOfGenerations ();", "static int NumberOfThisRaceNames(HackSackFrame oParent,\n String sRace,boolean bMale, boolean bFemale,\n boolean bLast)\n {\n int nCount = 0;\n\n for (int i=0;i<oParent.lRandomNames.size();i++)\n {\n TableRandomName oR = (TableRandomName)oParent.lRandomNames.get(i);\n if (sRace.equalsIgnoreCase(oR.sRace) && (bLast == oR.bLast) &&\n ( (bMale && oR.bMale) ||\n (bFemale && oR.bFemale) ) )\n nCount++;\n }\n return nCount;\n }", "public List<Map<String, Object>> getStatisticsByStaff(String classify);", "public static double assistFile() {\n\t\tint assistCount = 0;\n\t\tdouble assistSalary = 0;\n\t\tString professor = \"Unknown\";\n\t\tdouble salary = 0.0;\n\t\topenURL(); //open dataset\n\t\twhile(input.hasNext()) {\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tsalary = input.nextDouble();\n\t\t\tif(professor.equals(\"assistant\")) {\n\t\t\t\tassistSalary += salary;\n\t\t\t\tassistCount++;\t\t\t\t\n\t\t\t}\n\t\t\tprofessor = \"assistant\";\n\t\t}\n\t\t//display assistant professor total salary\n\t\tSystem.out.println(\"Total salary for \" + professor+ \" professors is $\" + dF.format(assistSalary));\n\t\t\n\t\treturn assistSalary / assistCount;\n\t\t\n\t}", "public int getNumberofAns()\n\t{\n\t\treturn numAns;\t\n\t}", "int countByExample(AdminUserCriteria example);", "int countByExample(AdminUserCriteria example);", "public int ardiveis() {\n\t\tint result = 0;\n\t\tfor (EstadoAmbiente[] linha : this.quadricula) {\n\t\t\tfor (EstadoAmbiente ea : linha) {\n\t\t\t\tif(ea == EstadoAmbiente.CASA || ea == EstadoAmbiente.TERRENO){\n\t\t\t\t\tresult++;\t\t\t\t \n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "public Integer excerciseStateCount(Activity activity, ExerciseState state);", "int countByExample(ProSchoolWareExample example);" ]
[ "0.59984666", "0.5882973", "0.58253825", "0.57690984", "0.5752785", "0.5726873", "0.57232463", "0.57083315", "0.5559525", "0.5510687", "0.5505283", "0.55035615", "0.5406512", "0.5392275", "0.5377826", "0.53634673", "0.5362355", "0.5359886", "0.5307218", "0.529837", "0.52760607", "0.5256228", "0.5252136", "0.5222083", "0.5221002", "0.5170221", "0.51623964", "0.5138545", "0.5135664", "0.5135137", "0.5131268", "0.51206183", "0.5113998", "0.51088226", "0.5102232", "0.5098622", "0.5091345", "0.5088284", "0.5078519", "0.5062687", "0.5060671", "0.5059999", "0.5056211", "0.504295", "0.5041101", "0.50383437", "0.5033688", "0.5031193", "0.50197417", "0.5015631", "0.50154257", "0.49945208", "0.49877694", "0.49858576", "0.49828517", "0.49698424", "0.49659237", "0.49625793", "0.49588856", "0.49572903", "0.49497017", "0.49440196", "0.49205476", "0.49196136", "0.4916068", "0.4911082", "0.49066237", "0.48966262", "0.4894054", "0.48922285", "0.48865804", "0.48857683", "0.48848543", "0.48801947", "0.48731688", "0.48702705", "0.48702705", "0.4863363", "0.4861525", "0.48587522", "0.48567578", "0.4853035", "0.48507386", "0.48434663", "0.48432884", "0.48412234", "0.48388293", "0.48359644", "0.48343754", "0.48338225", "0.48162055", "0.4813448", "0.4812082", "0.4794627", "0.47934565", "0.4788246", "0.4788246", "0.4788081", "0.478582", "0.47824395" ]
0.5707668
8
get all delegation name that can skip to another page
public List<String> getDelegationNames(){ Connection conn = DBConnect.getConnection(); String sql = "select delegation_name from delegation"; List<String> names = new ArrayList<String>(); try { PreparedStatement pst = conn.prepareStatement(sql); ResultSet rst = pst.executeQuery(); while(rst.next()) { names.add(rst.getString("delegation_name")); } rst.close(); pst.close(); }catch (SQLException e) { // TODO: handle exception e.printStackTrace(); } return names; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSkipProfileNamePage( boolean skippable )\n\t{\n\t mSkipProfileNamePage = skippable;\t \n\t doSkipProfileNamePage( skippable );\n\t}", "String getPageFullName();", "List<String> getAttendingDoctorNames();", "public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address, long page) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), page);\n }", "public List<String> getProfilesToSkip()\n {\n return profilesToSkip;\n }", "public List<String> getMethodsToSkip()\n {\n return methodsToSkip;\n }", "public List<String> getPrivateDnsNames() {\n return getInstances(Running).stream().map(Instance::getPrivateDnsName).collect(Collectors.toList());\n }", "String getPageName();", "List<String> getResponsibleDoctorNames();", "abstract List<String> getForwarded();", "Map<String, String> getLeases(String page, String excludeUid);", "protected Collection<IRI> getNonCurrentGraphNames() {\n final IRI ext = getExtensionGraphName();\n return extensions.values().stream().map(iri -> iri.equals(ext) ? PreferUserManaged : iri).collect(toSet());\n }", "@Override\n\tprotected String getResponseXmlElementName() {\n\t\treturn XmlElementNames.GetDelegateResponse;\n\t}", "String getDisallowOutgoingCallsTitle();", "String getSkipExtension();", "String directsTo();", "public static String[] getAttributeNames()\n\t{\n\t\tList<String> attributeNames = new ArrayList<String>();\n\t\tfor ( PwdPolicy attr : PwdPolicy.values() )\n\t\t{\n\t\t\tattributeNames.add( attr.getAttribute() );\n\t\t}\n\t\tString[] result = attributeNames.toArray( new String[attributeNames.size()] );\n\t\tlogger.log( loglevel, \"Returning attribute names: \"+Arrays.toString(result) );\n\t\treturn result;\n\t}", "com.google.protobuf.ByteString getDelegatees(int index);", "public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);", "public String display_page_name_after_login() {\n\t\treturn driver.findElement(page_name_opened_after_login).getText();\n\t}", "public Call<ExpResult<List<DelegationInfo>>> getDelegations(MinterAddress address) {\n checkNotNull(address, \"Address can't be null\");\n\n return getInstantService().getDelegationsForAddress(address.toString(), 1);\n }", "java.util.List<com.google.protobuf.ByteString> getDelegateesList();", "public List<String> getNamesFromAllTab() {\n List<String> namesFromAllCategory = new ArrayList<>(getTexts(teamPageFactory.displayedEmployeeNames));\n if (namesFromAllCategory.isEmpty()) logger.error(\"ERROR: no employee names elements found\");\n return namesFromAllCategory;\n }", "String getDisabledBiometricsParentConsentTitle();", "public List<String> scrapDipartimenti() {\n return null;\n }", "@Override\r\n\tpublic void list_privateWithoutViewPrivate() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_privateWithoutViewPrivate();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic List<RecordReference> getOtherIdentifiers() {\n\t\t\t\treturn Collections.emptyList();\n\t\t\t}", "public List<Agent> listAgentByServicePoint(String exceptThisAgent, String servicePointName);", "boolean canBeSkipped();", "@Override\n\tprotected String getXmlElementName() {\n\t\treturn XmlElementNames.GetDelegate;\n\t}", "public Picture getDelegationInfo(String delegation_name){\t\t\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\tString sql = \"select * from delegation_pic where type='common' and delegation_name = '\" + delegation_name + \"'\";\r\n\t\tPicture delegation = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\twhile(rst.next()) {\r\n\t\t\t\tdelegation = new Picture();\r\n\t\t\t\tdelegation.setDelegation_name(rst.getString(\"delegation_name\"));\r\n\t\t\t\tdelegation.setPath(rst.getString(\"path\"));\r\n\t\t\t}\r\n\t\t\trst.close();\r\n\t\t\tpst.close();\r\n\t\t}catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n e.printStackTrace();\t\t\t\r\n\t\t}\r\n\t\treturn delegation;\r\n\t}", "@Override\r\n\tpublic String[] names() {\n\t\treturn new String[] {\"lifesteal\"};\r\n\t}", "protected abstract String getAllowedRequests();", "public List getDriverAbsentList() throws Exception ;", "@Override\n public boolean supportsRedirectDelegation() {\n return false;\n }", "@Override\n public boolean getAllowPrivateNameConflicts()\n {\n \treturn allowPrivateNameConflicts;\n }", "public List<String> getMedalList(String delegation_name){\r\n\t\t\tList<String> list = new ArrayList<String>();\r\n\t\t\tConnection conn = DBConnect.getConnection();\r\n\t\t\tString sql = \"select event_name,team_name as name,rank,type,T1.sports_name \"\r\n\t\t\t\t\t+ \"from team_result T1 join event using(event_name) \"\r\n\t\t\t\t\t+ \"where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '\"+delegation_name+\"' union \"\r\n\t\t\t\t\t+ \"select event_name,athlete_name as name,rank,type,T1.sports_name \"\r\n\t\t\t\t\t+ \"from individual_result T1 join event using(event_name)\"\r\n\t\t\t\t\t+ \"where T1.state='final' and (rank=1 or rank=2 or rank=3) and delegation_name = '\"+delegation_name+\"'\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\t\twhile(rst.next()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist.add(rst.getString(\"event_name\"));\r\n\t\t\t\t\tlist.add(rst.getString(\"name\"));//team name\r\n\t\t\t\t\tlist.add(String.valueOf(rst.getInt(\"rank\")));\r\n\t\t\t\t\tlist.add(rst.getString(\"type\"));\r\n\t\t\t\t\tlist.add(rst.getString(\"sports_name\"));\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\trst.close();\r\n\t\t\t\tpst.close();\r\n\t\t\t}catch (SQLException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t e.printStackTrace();\t\t\t\r\n\t\t\t}\r\n\t\t\treturn list;\t\t\r\n\t\t}", "public String getNotchianName();", "boolean isAutoSkip();", "public abstract List<String> getAdditionalAccessions();", "protected String getPageNavigation()\n {\n return \"\";\n }", "@Override\n\tpublic String getAdderName() {\n\t\treturn null;\n\t}", "Set<String> getSubjectHumanRedirects();", "@Override\r\n\tpublic void list_invalidParent() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_invalidParent();\r\n\t\t}\r\n\t}", "@Override\r\n public String storyName() {\r\n return \"Hide Delegate\";\r\n }", "protected SnapToHelper[] getDelegates() {\n return delegates;\n }", "public ArrayList<String> getDirectors() {\n\t\treturn directors;\n\t}", "void skip();", "public List<String> iterateProgramPageList();", "@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }", "public void loginWithPersonalDeviceWithSkip()\n\t{\n\t\tLog.info(\"======== Login With Verify Personal Device ========\");\n\t\t\n\t\tfor(WebElement e: selectSimNumberList) // Select any/all Sim and Number dropdowns\n\t\t{\n\t\t\te.click(); \n\t\t\tselectWithinList.get(1).click();\n\t\t}\n\t\tcontinueButton.click();\n\t\t// Wait until presence of Home page or Verify device Page \tor Verify Failed popup\n\t\t\n\t\tWebDriverWait wait= new WebDriverWait(driver,90);\t\t// 60 + 30 sec taken by try catch \n\t\ttry\n\t\t{\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\t\n\t\t\tGeneric.wait(2);\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\" Page is taking too much time to load , stopping execution\\n\"+e.getMessage());\n\t\t\t\n\t\t\t/*Log.info(\"======== Page taking too much time to load , trying to click on Lets Login by cancelling phone verification ========\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tverifyAbortButton.click();\n\t\t\t\tgotoHome();\t\n\t\t\t\treturn;\t\n\t\t\t}\n\t\t\tcatch(Exception e1)\n\t\t\t{\n\t\t\t\tAssert.fail(\" Page is taking too much time to load , stopping execution\\n\"+e1.getMessage());\n\t\t\t}*/\t\t\t\n\t\t}\t\t\t\n\t\t\n\t\t// ==== Handle Verify Phone Authentication failed alert ==== //\n\t\tif (checker.getText().toLowerCase().contains(\"ok\") && checker.getAttribute(\"resourceId\").contains(\"button2\"))\n\t\t{\n\t\t\tLog.info(\"======== Skipping Phone verification ========\");\n\t\t\tdriver.findElement(By.id(\"button2\")).click();\n\t\t\tskipDontAskCheckbox.click();\n\t\t\tcontinueButton.click();\t\n\t\t\tGeneric.wait(5);\n\t\t\treturn;\t// goto to VerifyDevice Page from verifyLogin() method\t\t\n\t\t}\t\t\t\n\t\tgotoHome();\t\t\n\t}", "List<String> getNodeNames()\n {\n return allNodes.values().stream().map(CommunicationLink::getName).collect(Collectors.toList());\n }", "public boolean skip() {\n return skip;\n }", "@Override\n\tpublic void skip() {\n\t}", "java.util.List<java.lang.String> getUnreachableList();", "public void setMethodsToSkip(List<String> methodsToSkip)\n {\n this.methodsToSkip = methodsToSkip;\n }", "@Override\n protected Set<InjectionPoint> getConfigPropertyInjectionPoints() {\n return super.getConfigPropertyInjectionPoints().stream().sorted((o1, o2) -> {\n if (o1.getMember().getName().equals(\"skip\")) {\n return -1;\n }\n return 0;\n }).collect(Collectors.toCollection(LinkedHashSet::new));\n }", "public String getUnreachableNodes()\n {\n return ssProxy.getUnreachableNodes();\n }", "@Override\n public Boolean skip(final ServerWebExchange exchange) {\n return false;\n }", "java.lang.String getDelegatorAddress();", "java.lang.String getDelegatorAddress();", "public Set<String> getNeverVisited() {\n Set<String> neverVisited = new TreeSet<String>();\n this.getNeverVisited(this, neverVisited, null);\n return neverVisited;\n }", "public List<String> getNoProfile() {\n return noProfile;\n }", "public String[] getNames(){\n \t\tString[] outStrings = new String[otherNames.length+1];\n \t\toutStrings[0] = this.name;\n\t\tfor(int i=1;i<otherNames.length;i++)\n \t\t\toutStrings[i] = this.otherNames[i-1];\n \t\treturn outStrings;\n \t}", "public String[] getOperationCallerNames ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"getOperationCallerNames\", true);\n $in = _invoke ($out);\n String $result[] = RTT.corba.COperationCallerNamesHelper.read ($in);\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return getOperationCallerNames ( );\n } finally {\n _releaseReply ($in);\n }\n }", "boolean getSkipMessage();", "public String getLists(String name){\n return \"\";\n }", "@Override\n public List<String> getNextMappings(NextGroup nextGroup) {\n return Collections.emptyList();\n }", "@Override\n public List<String> getNextMappings(NextGroup nextGroup) {\n return Collections.emptyList();\n }", "private boolean isSkippedProxyClass(Class<?> clazz) {\n for (Class<?> skipClazz : proxyClassesToSkip) {\n if (skipClazz.equals(clazz)) {\n return true;\n } else if (clazz.getSuperclass() != null) {\n boolean skipSuperClass = isSkippedProxyClass(clazz.getSuperclass());\n if (skipSuperClass) {\n return true;\n }\n }\n }\n return false;\n }", "public String[] getDirectiveNames ();", "public java.lang.Boolean getSkip() {\r\n return skip;\r\n }", "String pageDetails();", "public List<String> getPathwayNames()\r\n\t{\r\n\t\treturn null; //To change body of implemented methods use File | Settings | File Templates.\r\n\t}", "public abstract String[] names() throws TrippiException;", "protected HashSet getNoName(){\n return tester.noName;\n }", "java.util.List<org.landxml.schema.landXML11.NoPassingZoneDocument.NoPassingZone> getNoPassingZoneList();", "private void searchDelegateTo(String delegateeID) {\n delegationDefaultCreationScreen.delegationToField.sendKeys(delegateeID.substring(0, 4));\n hasLoadingCompleted();\n try {\n waitForElementById(delegateeID, 30, true).click();\n } catch (Exception e) {\n screenshot(SCREENSHOT_MSG_NO_RESULT_FOUND);\n throw new RuntimeException(ERROR_MSG_NO_RESULT_FOUND.replace(\"$1\", delegateeID));\n }\n }", "void registerSkippedElements(String URI, Set<String> skippedElements);", "private void removePrevNames(String name){\r\n\t\tif (prevNames.contains(name)){\r\n\t\t\tprevNames.remove(name);\r\n\t\t}\r\n\t}", "Vector<String> getNamesOfLinesInPreviousScan( boolean visibility);", "public abstract String getDnForPerson(String inum);", "public List<String> getIndirectFriends(String name) {\r\n\t\r\n\t ArrayList<String> indirectFriends = new ArrayList<String>();\r\n\tSet<String> uniqueIndirectFriends = new HashSet<String>();\r\n\t\r\n\t \r\n\t //Get the first level direct friends\r\n\t\r\n\t if(friendsCache.containsKey(name)){\r\n\t\t \r\n\t\t ArrayList<String> firstLevelFriends = friendsCache.get(name);\r\n\t\t \r\n\t\t //Traverse all first level friends and add to a uniqueIndirectFriends Set.\r\n\t\t for(int i=0;i<firstLevelFriends.size();i++){\r\n\t\t\tif(friendsCache.containsKey(firstLevelFriends.get(i))){\r\n\t\t\t\tuniqueIndirectFriends.addAll(friendsCache.get(firstLevelFriends.get(i)));\r\n\t\t\t}\r\n\t\t }\r\n\t\t \r\n\t\t //Now remove any first level friends that got added to this set\r\n\t\t for(String friend: uniqueIndirectFriends){\r\n\t\t\t if(firstLevelFriends.contains(friend) && !friend.equals(name)){\r\n\t\t\t\t // if first level friends already contain this value - then do nothing\r\n\t\t\t }else{ // Else add to the arralist that we are going to return back\r\n\t\t\t\t indirectFriends.add(friend);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t }\r\n\t \r\n return indirectFriends;\r\n }", "public abstract List<String> getPreFacesRequestAttrNames();", "public List<Agent> listAgentNotMappedwithDevice();", "public void loginWithoutPersonalDevice() {\n\t\t//new WebDriverWait(driver, 45).pollingEvery(1, TimeUnit.SECONDS).until(ExpectedConditions.visibilityOf(personalCheckbox));\n\t\twaitOnProgressBarId(45);\n\t\tif (pageTitle.getText().contains(\"Phone\")) {\n\n\t\t\tLog.info(\"======== Unchecking personal device ========\");\n\t\t\tpersonalCheckbox.click();\n\t\t\tLog.info(\"======== Selecting Dont ask again checkbox ========\");\n\t\t\tskipDontAskCheckbox.click();\n\t\t\tLog.info(\"======== Clicking on Skip button ========\");\n\t\t\tcontinueButton.click(); // Click on Skip , Skip=Continue\n\t\t}\n\t}", "public String getDN() {\n\t\treturn url.getDN();\n }", "@Override\n public Delegators getDelegators() { return delegators; }", "@Override\r\n\tpublic void list_validParentNoChildren() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_validParentNoChildren();\r\n\t\t}\r\n\t}", "String getPassportSeries();", "public String skipToken() {\n return this.skipToken;\n }", "String getDoctorName();", "public List<String> getDirectFriends(String name) {\r\n \t\t\r\n\t ArrayList<String> directFriends = new ArrayList<String>();\r\n\t \r\n\t if(friendsCache.containsKey(name)){\r\n\t\t directFriends.addAll(friendsCache.get(name));\r\n\t }\r\n\t // Traverse each friend's list to see if we find name, if we do, then enter the name in to direct friends name.\r\n//\t for(Map.Entry<String, ArrayList<String>> entry : friendsCache.entrySet()){\r\n//\t\t ArrayList<String> friends = entry.getValue();\r\n//\t\t if(friends.contains(name) && directFriends.contains(entry)){\r\n//\t\t\t directFriends.add(entry.getKey());\r\n//\t\t }\r\n//\t }\r\n//\t \r\n\t \r\n\t return directFriends;\r\n }", "@Override\n \t\t\t\tpublic Collection<String> getAttachedGraphNames() {\n \t\t\t\t\treturn null;\n \t\t\t\t}", "public List<String> getNotificationList() throws Exception {\r\n ArrayList<String> cache = new ArrayList<String>();\r\n for (DOMFace nr : getChildren(\"notification\", DOMFace.class)) {\r\n cache.add(nr.getAttribute(\"pagekey\"));\r\n }\r\n return cache;\r\n }", "@Override\n\tpublic String[] getOutsideOwners() {\n\t\treturn new String[0];\n\t}", "abstract protected String getNextName(String descriptor) throws Exception;", "public Urls getUrlsOrderedByName() {\n\t\treturn getUrls(\"name\", true);\n\t}", "public LinkedHashSet<String> getPrevNames(){\r\n\t\treturn prevNames;\r\n\t}", "public java.util.List<com.google.protobuf.ByteString>\n getDelegateesList() {\n return delegatees_;\n }" ]
[ "0.5061893", "0.5033344", "0.50054896", "0.5000412", "0.4992721", "0.49269682", "0.4892135", "0.48844832", "0.48616835", "0.48125544", "0.47692496", "0.4750192", "0.47401044", "0.47125375", "0.46832252", "0.46703687", "0.4608382", "0.45964837", "0.45964602", "0.45933834", "0.45785344", "0.4572099", "0.45716053", "0.45661727", "0.4562655", "0.45478648", "0.45392624", "0.4534586", "0.45282343", "0.4526661", "0.45140332", "0.45099306", "0.45049986", "0.45032564", "0.44889042", "0.4486032", "0.44850388", "0.44830075", "0.4478347", "0.44695035", "0.44577384", "0.44564348", "0.44489002", "0.44469216", "0.44441846", "0.44413826", "0.44353202", "0.44057894", "0.43988398", "0.4386283", "0.4382097", "0.43743163", "0.43701074", "0.43698314", "0.43677634", "0.43657172", "0.43654412", "0.43622127", "0.43608376", "0.4359947", "0.4359947", "0.43589604", "0.43405962", "0.433803", "0.43343237", "0.43343234", "0.43297863", "0.43273672", "0.43273672", "0.43246362", "0.43231955", "0.4321792", "0.4320429", "0.43196735", "0.43189853", "0.43160447", "0.43117392", "0.43111053", "0.4309509", "0.4307753", "0.43018717", "0.42995447", "0.4299535", "0.42984968", "0.42970273", "0.42858428", "0.4282351", "0.42817333", "0.42810205", "0.42746156", "0.4273811", "0.42723894", "0.42698145", "0.42696133", "0.4269371", "0.426609", "0.42620686", "0.42599744", "0.425949", "0.42557678" ]
0.5872283
0
Se inicializan las imagenes y el frame del movimiento
public A(){ super(); AtrEA = new GreenfootImage("AtrEA.png"); DerEA1 = new GreenfootImage("DerEA1.png"); DerEA2 = new GreenfootImage("DerEA2.png"); DerEA3 = new GreenfootImage("DerEA3.png"); FrtEA1 = new GreenfootImage("FrtEA1.png"); FrtEA2 = new GreenfootImage("FrtEA2.png"); FrtEA3 = new GreenfootImage("FrtEA3.png"); IzqEA1 = new GreenfootImage("IzqEA1.png"); IzqEA2 = new GreenfootImage("IzqEA2.png"); IzqEA3 = new GreenfootImage("IzqEA3.png"); animationE = 0; start = 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "public void prepareObjetivos(){\n\t\tfor( int x= 0 ; x < game.getAmountObjetivos();x++){\n\t\t\tObjetivo o = game.getObjetivo(x);\n\t\t\timage = o.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(o.getAncho(), o.getAlto(), Image.SCALE_SMOOTH);\n\t\t\to.setImage(new ImageIcon(temporal));\n\t\t}\n\t\t\n\t}", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}", "private void initAnimationArray() {\r\n\t\tanimationArr = new GObject[8];\r\n\t\tfor(int i = 1; i < animationArr.length; i++) {\r\n\t\t\tString fileName = \"EvilMehran\" + i + \".png\";\r\n\t\t\tanimationArr[i] = new GImage(fileName);\r\n\t\t}\r\n\t}", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "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 void init() {\n\t\tbg = new MyImg(\"gamepage/endgame/bg.png\");\n\t\tbut0 = new MyImg(\"paygame/qdbut.png\");\n\t\tbut1 = new MyImg(\"paygame/qxbut.png\");\n\t}", "public void prepareImagenes(){\n\t\tpreparePersonajes();\n\t\tprepareSorpresas();\n\t\tprepareObjetivos();\n\t\tprepareBloque();\n\t\t\n\t}", "public void init() {\n co=new boid_interface();\n \n\tString str = getParameter(\"fps\");\n\tint fps = (str != null) ? Integer.parseInt(str) : 10;\n\tdelay = (fps > 0) ? (1000 / fps) : 100;\n\n\tworld = getImage(getCodeBase(), \"../img/eye_horus.png\");\n\tbird= getImage(getCodeBase(), \"../img/bird.gif\");\n\t\n }", "public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\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}", "@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}", "public void InitParam(Bitmap[] bm, int vitesse, int intru, int laserColor) {\n screenSizeX = getResources().getDisplayMetrics().widthPixels;\n screenSizeY = getResources().getDisplayMetrics().heightPixels;\n\n //On recupere toutes nos images\n this.bm = bm;\n\n //On recupere la couleur du laser\n this.laserColor = laserColor;\n\n //Et celui qui est l'intru\n this.intru = intru;\n\n //On creer nos tableau avec comme longueur notre nombre d'images\n pathMeasure = new PathMeasure[this.bm.length];\n pathLength = new float[this.bm.length];\n pos = new float[this.bm.length][2]; // ici 2 positions, x et y\n animPath = new Path[this.bm.length];\n distance = new float[this.bm.length];\n resultBitmap = new Bitmap[this.bm.length];\n\n //On boucle pour instancier chaque objets de nos tableaux\n for(int j=0;j<this.bm.length;j++){\n\n animPath[j]= getRandomPath();\n pathMeasure[j] = new PathMeasure(animPath[j],false);\n pathLength[j] = pathMeasure[j].getLength();\n\n resultBitmap[j] = Bitmap.createBitmap(bm[j], 0, 0,\n bm[j].getWidth() - 1, bm[j].getHeight() - 1);\n }\n\n //On definit le pas\n step = vitesse;\n\n // On creer la matrice\n matrix = new Matrix();\n\n //Parametre dans le cas ou l'ecran est touché / pour les laser\n fired=false;\n touchedPosition = new float[2];\n distGaucheRest = new float[2];\n distGaucheRest[0]=0;\n distGaucheRest[1]=screenSizeY;\n fireGauchePas = new float[2];\n fireGauchePas[0]=0;\n fireGauchePas[1]=0;\n\n distDroitRest = new float[2];\n distDroitRest[0]=screenSizeX;\n distDroitRest[1]=screenSizeY;\n fireDroitPas = new float[2];\n fireDroitPas[0]=0;\n fireDroitPas[1]=0;\n\n //Au cas ou le vaiseau explose\n xplosed=false;\n countBeforeXplose=0;\n\n }", "private void initSprites(){\r\n try\r\n {\r\n spriteSheet = ImageIO.read (spriteSheetFile);\r\n }\r\n catch (IOException e)\r\n {\r\n System.out.println(\"SPRITE spritesheet not found\");\r\n } \r\n try\r\n {\r\n iconSheet=ImageIO.read(playerIconFile);\r\n }\r\n catch (IOException e)\r\n {\r\n System.out.println(\"PLAYERICON spritesheet not found\");\r\n } \r\n\r\n // saves images to array\r\n for(int i=0;i<3;i++){\r\n bomb[i]=new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB); \r\n bomb[i]=spriteSheet.getSubimage(i*32,6,32,32);\r\n }\r\n for(int i=0;i<4;i++){\r\n icons[i] = new BufferedImage(30,30,BufferedImage.TYPE_INT_ARGB);\r\n icons[i] = iconSheet.getSubimage(0, 31*i, 30, 30);\r\n }\r\n }", "private void init(){\n\t\tadd(new DrawSurface());\n\t\tsetTitle(\"Animation Exercise\");\n\t\tsetSize(640, 480);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "@SuppressWarnings(\"static-access\")\n\tprivate void init() {\n\t\tdisplay= new Display(title,width,height);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\n\t\t\n\t\t//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Declarare imagini~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n Assets.init();\n \n\t\tgameState= new GameState(this);\n\t\tgameStateAI= new GameStateAI(this);\n\t\tmenuState = new MenuState(this);\n\t\tsettingsState= new SettingsState(this);\n\t\tState.setState(menuState);\t\n\t\t\n\t\n\t}", "public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }", "private void init() {\n display = new Display(title, getWidth(), getHeight()); \n Assets.init();\n player = new Player(getWidth() / 2 - 50, getHeight() - 50, 100, 30, this);\n rayo = new Rayo(getWidth() / 2 - 10, player.y - player.height , 10, 30, 0, 0, this);\n borrego = new Borrego(-80, 60 , 50, 20, 0, 0, this);\n generateEnemies();\n generateFortalezas();\n bombas= new ArrayList<Bomba>();\n \n \n display.getJframe().addKeyListener(keyManager);\n }", "private void initAreaImageFilm() {\n\n }", "private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }", "public GameObject(String tag, Bitmap res, int x, int y, int columns, int rows)\n {\n super(GamePanel.sContext);\n //spritesheet = res;\n this.tag = tag;\n setX(x);\n setY(y);\n this.WIDTH = res.getWidth()/rows;\n this.HEIGHT = res.getHeight()/columns;\n bounds = new Rect(x, y, WIDTH, HEIGHT);\n int numframes = columns*rows;\n int sheet_index = 0;\n\n Bitmap[] image = new Bitmap[numframes];\n\n for (int col = 0; col < columns; col++)\n {\n for(int r = 0; r < rows; r++)\n {\n image[sheet_index] = Bitmap.createBitmap(res, r*WIDTH, col*HEIGHT, WIDTH, HEIGHT);\n\n System.out.println(image[sheet_index] + \",\" + image.length);\n sheet_index++;\n }\n }\n\n if(animate) {\n animation.setFrames(image);\n animation.setDelay(10);\n }\n startTime = System.nanoTime();\n }", "public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}", "private void createAndInitPictureFrame() {\r\n frame = new com.FingerVeinScanner.Frame(picture,picture2);\r\n\t\tthis.pictureFrame = frame.getFrame(); // Create the JFrame.\r\n\t\tthis.pictureFrame.setResizable(true); // Allow the user to resize it.\r\n\t\tthis.pictureFrame.getContentPane().\r\n\t\tsetLayout(new BorderLayout()); // Use border layout.\r\n\t\tthis.pictureFrame.setDefaultCloseOperation\r\n\t\t(JFrame.DISPOSE_ON_CLOSE); // When closed, stop.\r\n\t\tthis.pictureFrame.setTitle(picture.getTitle());\r\n\t\t//PictureExplorerFocusTraversalPolicy newPolicy =\r\n\t\t//\tnew PictureExplorerFocusTraversalPolicy();\r\n\t\t//this.pictureFrame.setFocusTraversalPolicy(newPolicy);\r\n\t}", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "public Celda(int x, int y) {\n this.x=x;\n this.y=y;\n this.tipo=CAMINO;\n this.celdaSelec =false;\n\n indexSprite = 0; //indice que corresponde a una subimagen de frente\n\n try {\n jugador = ImageIO.read(new File(\"images/jugador.png\"));\n obstaculo = ImageIO.read(new File(\"images/obstaculo.png\"));\n obstaculo20 = ImageIO.read(new File(\"images/obstaculo-2.png\"));\n obstaculo21 = ImageIO.read(new File(\"images/obstaculo-3.png\"));\n obstaculo22 = ImageIO.read(new File(\"images/obstaculo-4.png\"));\n obstaculo23 = ImageIO.read(new File(\"images/obstaculo-5.png\"));\n obstaculo24 = ImageIO.read(new File(\"images/obstaculo-6.png\"));\n obstaculo25 = ImageIO.read(new File(\"images/obstaculo-7.png\"));\n adversario = ImageIO.read(new File(\"images/adversario.png\"));\n recompensa = ImageIO.read(new File(\"images/recompensa.png\"));\n casa = ImageIO.read(new File(\"images/casa.png\"));\n\n imagenSprites = ImageIO.read(new File(\"images/sprite_jugador.png\"));\n imagenSpritesAdversario = ImageIO.read(new File(\"images/sprite_adversario.png\"));\n //creo una array de 4 x 1\n sprites = new BufferedImage[4 * 1];\n spritesAdversario = new BufferedImage[4 * 1];\n //lo recorro separando las imagenes\n for (int i = 0; i < 1; i++) {\n for (int j = 0; j < 4; j++) {\n sprites[(i * 4) + j] = imagenSprites.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA,PIXEL_CELDA, PIXEL_CELDA);\n spritesAdversario[(i * 4) + j] = imagenSpritesAdversario.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA, PIXEL_CELDA, PIXEL_CELDA);\n }\n }\n //adversario = spritesAdversario[indexSprite];\n } catch (IOException error) {\n System.out.println(\"Error: \" + error.toString());\n }\n }", "public Jugador(float x, float y, Colisiones colision, Main main,float wReescalado,float hReescalado) {\n this.x = x;\n this.y = y;\n this.colisiones=colision;\n this.main=main;\n this.wReescalado=wReescalado;\n this.hReescalado=hReescalado;\n rectangles=colisiones.getRect();//Obtengo el array de rectangulo en colisiones\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));//Asigno a texture el archivo png de mi personaje\n jugadorVista = \"\";//Agigno comillas a jugador vista\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());//Creo el rectangulo de mi jugador con las propiedades de texture\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);//Divido mi texture region en las partes indicadas para asignarlas a la matria\n //Los valores de la division de tpm equivalen al numero de filas y numero de columnas de mi png(En mi caso tengo 4 filas que son los diferentes movimientos y 4 columnas una para cada movimiento)\n //Ejemplo:Fila 1-->Movimiento a la derecha: Columna 1-->Quieto Columna -->Mueve un pie: Columna 3 --->Muevo el otro pie: Columna 4-->Vuelvo a estar quieto\n regions = new TextureRegion[4];//Asigno al array regions la longuitud por la que haya dividido en ancho my imagen\n for (int b = 0; b < regions.length; b++) {//Con este bucle voy cargando las imagenes y da la ilusion de que anda\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);//Inicializamos el constructor pasandole por parametros el tiempo que dura y el array\n tiempo = 0f;\n }\n }", "public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public void createImages(){\r\n\t\ttry {\r\n\t\t\timg_bg = Image.createImage(GAME_BG);\r\n\t\t\timg_backBtn = Image.createImage(BACK_BTN);\r\n\t\t\timg_muteBtn = Image.createImage(MUTE_BTN);\r\n\t\t\timg_resetBtn = Image.createImage(RESET_BTN);\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}\r\n\t}", "protected void carregaImagens() {\n Handler carregaImagensHandler = new Handler();\n\n // Envia a Runnable ao Handler simulando um carregamento assincrono depois de 1 segundo\n carregaImagensHandler.postDelayed(new Runnable() {\n public void run() {\n // Carregando primeira imagem\n ImageView altaIV = findViewById(R.id.iv_alta);\n altaIV.setImageResource(R.drawable.android_verde);\n\n // Carregando primeira imagem\n ImageView baixaIV = findViewById(R.id.iv_baixa);\n baixaIV.setImageResource(R.drawable.android_preto);\n }\n }, 1000);\n }", "private void init() {\n\n /*image = new BufferedImage(\n WIDTH, HEIGHT,\n BufferedImage.TYPE_INT_RGB//OR BufferedImage.TYPE_INT_ARGB\n );*/\n initImage();\n \n g = (Graphics2D) image.getGraphics();\n\n running = true;\n\n initGSM();\n \n gsm.setAttribute(\"WIDTH\", WIDTH);\n gsm.setAttribute(\"HEIGHT\", HEIGHT);\n gsm.setAttribute(\"CAMERA_X1\", 0);\n gsm.setAttribute(\"CAMERA_Y1\", 0);\n gsm.setAttribute(\"WORLD_X1\", 0);\n gsm.setAttribute(\"WORLD_Y1\", 0);\n\n }", "protected void init() {\n splashImg = new Texture(\"splash.png\");\n }", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "public JefeAvion() {\r\n\t\tsuper(2000, 2, new ImageIcon(url), 1275, 636);\r\n\t\trn = new Random();\r\n\t\tx = 400 - defaultWidth/2;\r\n\t\ty = - defaultHeight;\r\n\t\tdelay = 2;\r\n\t\tint cantTorretasDobles = 8;\r\n\t\tint cantTorretasSimples = 3;\r\n\t\tint cantTorretasInvisibles = 12;\r\n\t\tint cantTorretasGrandes = 6;\r\n\t\t\r\n\t\tString boundsDouble = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasDobles.txt\";\r\n\t\tString boundsSimple = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasSimples.txt\";\r\n\t\tString boundsInvisible = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasInvisibles.txt\";\r\n\t\tString boundsGrande = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasGrandes.txt\";\r\n\t\t\r\n\t\tinit = System.currentTimeMillis();\r\n\t\tcargarArchivoTorretas(boundsDouble, new FabricaTorretasDobles(), cantTorretasDobles);\r\n\t\tcargarArchivoTorretas(boundsSimple, new FabricaTorretasSimples(), cantTorretasSimples);\r\n\t\tcargarArchivoTorretas(boundsInvisible,new FabricaTorretasInvisibles(), cantTorretasInvisibles);\r\n\t\tcargarArchivoTorretas(boundsGrande,new FabricaTorretasGrandes(), cantTorretasGrandes);\r\n\t\tpuntaje = 500;\r\n\t\tsetearParametrosDefecto(2000, 2, 1275, 636);\r\n\t\t\r\n\t\t\r\n\t}", "public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "private void Initialize()\n {\n \tEcran = new Rectangle(Framework.gauche, Framework.haut, Framework.frameWidth\n\t\t\t\t- Framework.droite - Framework.gauche, Framework.frameHeight - Framework.bas\n\t\t\t\t- Framework.haut);\n\t\tCentreEcranX = (int)(Ecran.getWidth()/2);\n\t\tCentreEcranY = (int)(Ecran.getHeight()/2);\n\t\twidth = Ecran.getWidth();\n\t\theight = Ecran.getHeight();\t\t\n\t\tpH=height/768;\t\t\n\t\tpW=width/1366;\n\t\tObjets = new ArrayList<Objet>(); // Créer la liste chainée en mémoire\n\t\tMissiles = new ArrayList<Missile>(); // Créer la liste chainée en mémoire\n\t\tStations = new ArrayList<Station>(); // Créer la liste chainée en mémoire\n\t\tJoueurs = new ArrayList<Joueur>();\n\t\tlastTrajectoires = new ArrayList<Trajectoire>();\n\n\t\tDisposeAstres(Framework.niveauChoisi);\n\t\tstationCourante = Stations.get(0);\n\n\t\tetat = ETAT.PREPARATION;\n\t\tmouseClicked = mousePressed = mouseReleased = false;\n\t}", "private void init () \n\t{ \n\t\tbatch = new SpriteBatch();\n\t\tcamera = new OrthographicCamera(Constants.VIEWPORT_WIDTH,\n\t\t\tConstants.VIEWPORT_HEIGHT);\n\t\tcamera.position.set(0, 0, 0);\n\t\tcamera.update();\n\t\tcameraGUI = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH,\n\t\t\t\tConstants.VIEWPORT_GUI_HEIGHT);\n\t\tcameraGUI.position.set(0, 0, 0);\n\t\tcameraGUI.setToOrtho(true); // flip y-axis\n\t\tcameraGUI.update();\n\t\t\n\t\tb2debugRenderer = new Box2DDebugRenderer();\n\t}", "private void init()\n {\n btnTomarFotos = findViewById(R.id.imgbtnTomarFotosCP);\n btnSeleccionarFoto = findViewById(R.id.imgbtnBuscarFotosV);\n imgFotoMascota = findViewById(R.id.imgCreacionPerfiles);\n agregarEspecie = findViewById(R.id.imgbtnAgregarNuevaEspecie2);\n agregarRaza = findViewById(R.id.imgbtnAgregarNuevaRaza);\n spiEspecie = findViewById(R.id.spiEspecie);\n spiRaza = findViewById(R.id.spiRaza);\n edtFechaNaciento=findViewById(R.id.edtFechaNacimiento);\n rbtnHembra=findViewById(R.id.rbHembra);\n rbtnMacho = findViewById(R.id.rbMacho);\n rbgGrupoGenero =findViewById(R.id.rbgGrupoGenero);\n edtNombreMascota= findViewById(R.id.edtNombreMascota);\n rbtnMacho.setSelected(true);\n metodosImagenes =new MetodosImagenes(this);\n btnGuardar = findViewById(R.id.btnGuardarCP);\n edtNumeroChip =findViewById(R.id.edtNumeroChip);\n especie = \"\";\n fechaHora = new DateTime();\n\n arrayNombreRazas = new ArrayList<>();\n arrayNombreEspecies = new ArrayList<>();\n\n /** Se obtiene una instancia de la base de datos*/\n instanciaDB = SingletonDB.getDatabase(this);\n\n\n /** Se asigna al Spinner de raza un evento de escucha, un array con la list**/\n spiRaza.setOnItemSelectedListener(this);\n arrayNombreRazas.add(\"Seleccione raza\");\n startSpinnerValues(spiRaza,arrayNombreRazas,adaptadorRaza);\n\n /** Se asigna al Spinner de especie un evento de escucha, ademas se le agrega un adaptador con **/\n spiEspecie.setOnItemSelectedListener(this);\n arrayNombreEspecies.add(\"Seleccione especie\");\n startSpinnerValues(spiEspecie,arrayNombreEspecies,adaptadorEspecie);\n\n\n /**Obtemos datos del Intent y determinamos si es una actualizacion o una insercion, estos valores se optienen con el */\n intentValues= getIntent();\n accion=intentValues.getIntExtra(Constantes.TAG_ACCION,Constantes.GUARDAR);\n if(accion==Constantes.GUARDAR){\n disableSpinnerAndButton(spiRaza,agregarRaza);\n //Se carga la fecha por defecto que es la fecha actual\n dia=DateTime.diaDelMes;\n mes=DateTime.mes;\n anio=DateTime.anio;\n /**Asignamos una foto de perfil por defecto*/\n Glide.with(this)\n .load(R.drawable.default_credencial)\n .into(imgFotoMascota);\n }\n\n /** Acciones a realizar si se la opcion es actualizar*/\n else if(accion==Constantes.ACTUALIZAR)\n {\n\n /** Si es una actualización se debe parsear la fecha guadarda previamente para colocarla en variables de fecha\n * para dar formato y tomarla como fecha de refeencia*/\n String [] fecha=intentValues.getStringExtra(Constantes.TAG_FECHA_NACIENTO).split(\"-\");\n dia=Integer.parseInt(fecha[0]);\n mes= Integer.parseInt(fecha[1]);\n anio=Integer.parseInt(fecha[2]);\n /**Se valida si al actualizar tenia una foto, ser asi se muestra, de lo contrario se carga una imagen por defecto*/\n if(!intentValues.getStringExtra(Constantes.TAG_IMG_PATH).equals(\"\"))\n {\n File filePhoto = new File(metodosImagenes.getRootPath()+\"/\"\n +MetodosImagenes.PET_FOLDER+\"/\"+\n intentValues.getStringExtra(Constantes.TAG_IMG_PATH));\n Glide.with(this)\n .load(filePhoto)\n .into(imgFotoMascota);\n }\n else\n {\n /**Asignamos una foto de perfil por defecto*/\n Glide.with(this)\n .load(R.drawable.default_credencial)\n .into(imgFotoMascota);\n }\n\n\n\n /** Se optiene el nombre del genero y se valida para seleccionar el radio button Correcto\n * */\n String genero = instanciaDB.getGeneroDAO().\n getGenderById(intentValues.getIntExtra(Constantes.TAG_GENERO,Constantes.DEFAULT));\n if (genero.equals(\"Hembra\")) {\n rbgGrupoGenero.check(R.id.rbHembra);\n } else {\n rbgGrupoGenero.check(R.id.rbMacho);\n }\n\n edtNombreMascota.setText(intentValues.getStringExtra(Constantes.TAG_NOMBRE));\n edtNumeroChip.setText(intentValues.getStringExtra(Constantes.TAG_NUMERO_CHIP));\n\n /** Se optiene en nombre de la especie para seleccionarlo en el Spinner de especie, ya que este es\n * el valor guardado por el usuario*/\n raza= instanciaDB.getRazaDAO()\n .getNameRazaById(intentValues.getIntExtra(Constantes.TAG_RAZA,Constantes.DEFAULT));\n\n /** Se obtiene el nombre de la raza para seleccionarlo en el Spinner*/\n especie = instanciaDB.getSpeciesDAO()\n .getNameSpecieById(intentValues.getIntExtra(Constantes.TAG_ESPECIE,Constantes.DEFAULT));\n\n }\n edtFechaNaciento.setText(fechaHora.formatoFecha(dia,mes,anio));\n\n }", "private void initialize(int imageWidth, int imageHeight) {\r\n posX = 0;\r\n posY = 0;\r\n anchorX = frameWidth / 2;\r\n anchorY = frameHeight / 2;\r\n this.imageWidth = imageWidth;\r\n this.imageHeight = imageHeight;\r\n frame = 0;\r\n reversedImage = false;\r\n scale = 1.0;\r\n flip = 0;\r\n flipValue = 1;\r\n flipReposition = 0;\r\n tr = new AffineTransform();\r\n rotation(0);\r\n hitbox = new Hitbox(Hitbox.TYPE_CIRCLE, frameWidth / 2);\r\n }", "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "public Enemie(){\r\n \r\n r=new Random();\r\n try{\r\n \r\n //cargamos imagenes del barco, ambos helicopteros y damos valores\r\n imgHeli=ImageIO.read(new File(\"src/Images/1.png\"));\r\n imgHeli2=ImageIO.read(new File(\"src/Images/2.png\"));\r\n imgShip=ImageIO.read(new File(\"src/Images/barquito.png\"));\r\n imgBarril=ImageIO.read(new File(\"src/Images/barril.png\"));\r\n \r\n }catch(IOException ex){\r\n System.out.println(\"Imagen no encontrada.\");\r\n }\r\n //Generamos posiciones aleatorias\r\n Bx=(r.nextInt(260)+140);\r\n By=1;\r\n \r\n Bx2=(r.nextInt(260)+140);\r\n By2=1;\r\n \r\n Hx=(r.nextInt(260)+140);\r\n Hy=1;\r\n \r\n Hx2=(r.nextInt(260)+140);\r\n Hy2=1;\r\n //Cargamos altos y anchos para todas las imagenes\r\n Bwidth=imgShip.getWidth(null);\r\n Bheight=imgShip.getHeight(null);\r\n \r\n Bwidth2=imgBarril.getWidth(null);\r\n Bheight2=imgBarril.getHeight(null);\r\n \r\n Hwidth=imgHeli.getWidth(null);\r\n Hheight=imgHeli.getHeight(null);\r\n \r\n Hwidth2=imgHeli2.getWidth(null);\r\n Hheight2=imgHeli2.getHeight(null);\r\n \r\n }", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\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\tprotected void setup() {\n\t\tcarImg();\n\t\tsetResolution(Resolution.MSX);\n\t\tsetFramesPerSecond(100);\n\t\t\n\t\tbola = new Bola();\n\n\t\tbotoes();\n\n\t\tcriaBlocos();\n\n\t\tpaddle = new Paddle();\n\n\t\t\n\n\t}", "public void preparePersonajes(){\n\t\tfor( int x= 0 ; x < game.getAmountPersonajes();x++){\n\t\t\tPersonaje p = game.getPersonaje(x);\n\t\t\timage = p.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(p.getAncho(), p.getAlto(), Image.SCALE_SMOOTH);\n\t\t\tp.setImage(new ImageIcon(temporal));\n\t\t}\n\t}", "private void inizializzazione()\n {\n //Costruzione della Istanza display\n display = new Display(titolo,larghezza,altezza);\n \n /*Viene aggiunto il nostro gestore degli input da tastiera\n * alla nostra cornice.*/\n display.getCornice().addKeyListener(gestoreTasti);\n display.getCornice().addMouseListener(gestoreMouse);\n display.getCornice().addMouseMotionListener(gestoreMouse);\n display.getTelaGrafica().addMouseListener(gestoreMouse);\n display.getTelaGrafica().addMouseMotionListener(gestoreMouse);\n \n //Codice temporaneo per caricare la nostra immagine nel nostro programma\n /*testImmagine = CaricatoreImmagini.caricaImmagini(\"/Textures/Runner Stickman.png\");*/\n \n //Inizializzazione dell'attributo \"foglio\". Gli viene passato come parametro \n //\"testImmagine\" contenente l'immagine del nostro sprite sheet.\n /*foglio = new FoglioSprite(testImmagine);*/\n \n /*Inizializzazione della classe Risorse.*/\n Risorse.inizializzazione();\n \n maneggiatore = new Maneggiatore(this);\n /*Inizializzazione Camera di Gioco*/\n camera = new Camera(maneggiatore,0,0);\n \n /*Inizializzazione degli stati di gioco.*/\n statoMenu = new StatoMenù(maneggiatore);\n Stato.setStato(statoMenu);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n for( int i = 0; i < IMAGE_COUNT; i++)\n {\n images[i] = new GreenfootImage(\"frame_\" + i + \"_delay-0.06s.gif\");\n }\n \n setBackground(images [0]); \n \n }", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\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}", "private void initializeView() {\n InputStream is1 = getContext().getResources().openRawResource(+R.drawable.congratulations);\n mMovie1 = Movie.decodeStream(is1);\n InputStream is2 = getContext().getResources().openRawResource(+R.drawable.giffy3);\n mMovie2 = Movie.decodeStream(is2);\n InputStream is3 = getContext().getResources().openRawResource(+R.drawable.giffy4);\n mMovie3 = Movie.decodeStream(is1);\n InputStream is4 = getContext().getResources().openRawResource(+R.drawable.giphy1);\n mMovie4 = Movie.decodeStream(is4);\n }", "synchronized public void initGfx()\n {\n // Points for initial sprite placement\n Point p1, p2, p3;\n\n p1 = getMainPoint();\n p2 = getRandomMiniPoint();\n p3 = getRandomMiniPoint();\n\n // Reset score\n score = 0;\n\n // Reset text for score\n ((TextView)findViewById(R.id.the_score_label)).setText(\"SCORE: 0\");\n\n // Set main sprite\n ((GameBoard)findViewById(R.id.the_canvas)).setMainSprite(p1.x, p1.y);\n\n // Set mini sprites\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite(p2.x, p2.y);\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite2(p3.x, p3.y);\n\n // Set game over sprite to outside screen\n ((GameBoard) findViewById(R.id.the_canvas)).setOverSprite(-2000, -2000);\n\n // Enable reset button\n ((Button)findViewById(R.id.reset_button)).setEnabled(true);\n\n frame.removeCallbacks(frameUpdate);\n ((GameBoard)findViewById(R.id.the_canvas)).invalidate();\n frame.postDelayed(frameUpdate, FRAME_RATE);\n }", "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 void init()\n {\n\t Toolkit.getDefaultToolkit();\n \t\t\n \t\t//The following sets the int values\n \t\tx_pos = 125;\n \t\ty_pos = 120;\n \t\t\n \t\tx_speed = 5;\t//The x_ and y_speed values are only to be used when\n\t\ty_speed = 1; \t//the game is in gameplay mode (in other words, when\n \t\t\t\t\t\t//numClicks = 1)----\n \t\tlevel = 1;\n \t\t\n \t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\n \t\t\n \t\t//The following sets the images\n \t\ttitleScreen = getImage (getCodeBase (), \"images/PaperAirplane.GIF\");\n\t\t\n\t\tgameBkg1 = getImage (getCodeBase (), \"images/bricks.GIF\");\n\t\tgameBkg2 = getImage (getCodeBase (), \"images/bricks.GIF\");\n\t\tgameClouds1 = getImage (getCodeBase (), \"images/clouds.GIF\");\n\t\tgameClouds2 = getImage (getCodeBase (), \"images/clouds.GIF\");\n\t\t\n\t\tplaneAngle = new Image [11];\t//This sets the planeAngle array to\n\t\t\t\t\t\t\t\t\t\t//hold 11 elements\n\t\t//The following below sets a GIF for each of the elements in the\n\t\t//planeAngle array.\n\t\tplaneAngle [0] = getImage (getCodeBase (), \"images/planeLeft5.GIF\");\n\t\tplaneAngle [1] = getImage (getCodeBase (), \"images/planeLeft4.GIF\");\n\t\tplaneAngle [2] = getImage (getCodeBase (), \"images/planeLeft3.GIF\");\n\t\tplaneAngle [3] = getImage (getCodeBase (), \"images/planeLeft2.GIF\");\n\t\tplaneAngle [4] = getImage (getCodeBase (), \"images/planeLeft1.GIF\");\n\t\tplaneAngle [5] = getImage (getCodeBase (), \"images/planeDown.GIF\");\n\t\tplaneAngle [6] = getImage (getCodeBase (), \"images/planeRight1.GIF\");\n\t\tplaneAngle [7] = getImage (getCodeBase (), \"images/planeRight2.GIF\");\n\t\tplaneAngle [8] = getImage (getCodeBase (), \"images/planeRight3.GIF\");\n\t\tplaneAngle [9] = getImage (getCodeBase (), \"images/planeRight4.GIF\");\n\t\tplaneAngle [10] = getImage (getCodeBase (), \"images/planeRight5.GIF\");\n\t\t\n\t\tleftWall = getImage (getCodeBase (), \"images/leftWall.GIF\");\n\t\trightWall = getImage (getCodeBase (), \"images/rightWall.GIF\");\n\t\t\n\t\t//The following sets the audio\n\t\tlevelSong = getAudioClip (getCodeBase (), \"audio/level.au\");\n\t\thitWall = getAudioClip (getCodeBase (), \"audio/hitWall.au\");\n\t\topening = getAudioClip (getCodeBase (), \"audio/exitbike.au\");\n\t\tstageIntro = getAudioClip (getCodeBase (), \"audio/stageIntro.au\");\n\t\tstageSong = getAudioClip (getCodeBase (), \"audio/stageSong.au\");\n\t\t\n\t\t//The following sets up the GamePlay Classes\n\t\tw = new Wall [4];\t//sets the Wall array w to have 4 elements\n\t\t\n\t\tw[0] = new Wall (50, 200, 200, 50);\t //Is a platform located on the left\n\t\t\t\t\t\t\t\t\t\t\t //side of the screen.\n\t\tw[1] = new Wall (250, 450, 200, 50); //Is a platform located on the\n\t\t\t\t\t\t\t\t\t\t\t //right side of the screen.\n\t\tw[2] = new Wall (50, 700, 200, 50);\t //Is a platform located on the left\n\t\t\t\t\t\t\t\t\t\t\t //side of the screen.\n\t\tw[3] = new Wall (250, 950, 200, 50); //Is a platform located on the\n\t\t\t\t\t\t\t\t\t\t\t //right side of the screen.\n\t\t\n\t\tsW = new SideWall [4];\t//sets the SideWall array sW to have 4 elements\n\t\t\n\t\tsW[0] = new SideWall (0, 0, 50, 600);\t\t//Is the left wall\n\t\tsW[1] = new SideWall (450, 0, 50, 600);\t//Is the right wall\n\t\tsW[2] = new SideWall (0, 600, 50, 600);\t//Is the left wall\n\t\tsW[3] = new SideWall (450, 600, 50, 600);\t//Is the right wall\n\t\t\n\t\tscore = new Score ();\n\t\thighScore = new Score ();\n\t\t\n\t\ttime = new Timer ();\n\t\tbestTime = new Timer ();\n\t\t\n \t\tp = new PaperAirplane (x_pos, y_pos);\n\t\t\n\t\t//The following sets up the fonts\n\t\tfTitle = new Font (\"titleStyle\", Font.BOLD, 25);\n\t\tfPressAny = new Font (\"pressStartStyle\", Font.PLAIN, 12);\n\t\tfGameOver = new Font (\"gameOverStyle\", Font.ITALIC, 50);\n\t\tfScore = new Font (\"scoreStyle\", Font.BOLD, 15);\n\t\tfCreditNames = new Font (\"creditStyle\", Font.BOLD, 20);\n\t\t\n\t\t//The following sets up the coordinate arrays\n\t\txPoints = p.getXPoints ();\n\t\tyPoints = p.getYPoints ();\n }", "public static void load(){\r\n\t \ttry {\r\n\t \t\t// load and set all sprites\r\n\t\t\t\tsetBlueGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/blueGarbage.png\")));\r\n\t\t\t\tsetRank(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/rank.png\")));\r\n\t\t\t\tsetRedGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/redGarbage.png\")));\r\n\t\t\t\tsetYellowGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowGarbage.png\")));\r\n\t\t\t\tsetGreenGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/greenGarbage.png\")));\r\n\t\t\t\tsetBlueSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/blueSnakeBodyPart.png\")));\r\n\t\t\t\tsetRedSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/redSnakeBodyPart.png\")));\r\n\t\t\t\tsetYellowSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowSnakeBodyPart.png\")));\r\n\t\t\t\tsetGreenSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/greenSnakeBodyPart.png\")));\r\n\t\t\t\tsetHeart(ImageIO.read(classPath.getResourceAsStream(\"/images/heart.png\")));\r\n\t\t\t\tsetGameScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenBackground.png\")));\r\n\t\t\t\tsetGameScreenHeader(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenHeader.png\")));\r\n\t\t\t\tsetGameOver(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameOver.png\")));\r\n\t\t\t\tsetHitsOwnBody(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsOwnBody.png\")));\r\n\t\t\t\tsetHitsWall(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsWall.png\")));\r\n\t\t\t\tsetWrongColor(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/wrongColor.png\")));\r\n\t\t\t\tsetHelpScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpScreenBackground.png\")));\r\n\t\t\t \tsetWarningScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/warningScreenBackground.png\")));\r\n\t\t\t \tsetOkButton(ImageIO.read(classPath.getClass().getResource(\"/images/okButton.png\")));\r\n\t\t\t \tsetMenuScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/menuScreenBackground.png\")));\r\n\t\t\t\tsetStartButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/startButton.png\")));\r\n\t\t\t\tsetExitButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/exitButton.png\")));\r\n\t\t\t\tsetHelpButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpButton.png\")));\r\n\t\t\t\t\r\n\t \t} \r\n\t \tcatch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getStackTrace(), \"Erro ao carregar imagens\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\r\n\t\t\t}\t\r\n \t\r\n \t}", "private void buildSprites() {\n\t\tSpriteRotatable sprite = new SpriteRotatable(new Vec2f(0, 0), 1);\n\t\tsprite.setCentered(true);\n\t\tspriteManager.addSprite(sprite, \"avenger.png\");\n\t\tsprite.setVisible(true);\n\t\ttarget = new SpriteRotatable(new Vec2f(2, 2), 1);\n\t\ttarget.setCentered(true);\n\t\tspriteManager.addSprite(target, \"fighter.png\");\n\t\ttarget.setVisible(true);\n\n\t}", "private void inicializarAnimaciones(Array<String> rutaAnimaciones) {\n\n aspectoBasico = new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(0))));\n\n for (int i = 1; i < 6; i++) {\n if (rutaAnimaciones.get(i).contains(\"D\"))\n texturasDerecha.add(new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(i)))));\n else\n texturasIzquierda.add(new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(i)))));\n }\n\n animacionDerecha = new Animation(0.75f, texturasDerecha);\n animacionIzquierda = new Animation(0.75f, texturasIzquierda);\n }", "public void setImages(Bitmap[] images){\n this.images=images;\n currentFrame=0;\n startTime=System.nanoTime();\n }", "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "private void dibujarArregloCamionetas() {\n\n timerCrearEnemigo += Gdx.graphics.getDeltaTime();\n if (timerCrearEnemigo>=TIEMPO_CREA_ENEMIGO) {\n timerCrearEnemigo = 0;\n TIEMPO_CREA_ENEMIGO = tiempoBase + MathUtils.random()*2;\n if (tiempoBase>0) {\n tiempoBase -= 0.01f;\n }\n\n camioneta= new Camioneta(texturaCamioneta,ANCHO,60f);\n arrEnemigosCamioneta.add(camioneta);\n\n\n }\n\n //Si el vehiculo se paso de la pantalla, lo borra\n for (int i = arrEnemigosCamioneta.size-1; i >= 0; i--) {\n Camioneta camioneta1 = arrEnemigosCamioneta.get(i);\n if (camioneta1.sprite.getX() < 0- camioneta1.sprite.getWidth()) {\n arrEnemigosCamioneta.removeIndex(i);\n\n }\n }\n }", "@Override\n\tpublic void initGame() {\n\t\t\n\t\t//width = 480f;\n\t\t//height = 1000f;\n\t\t//scale = 100f;\n\t\t\n\t\tioManager.debugPrint();\n\t\t\n\t\t\n\t\t\n\t\treset();\n\t\t\n\t\t//scale = 1f;\n\t\t//width /= 100f;\n\t\t//height /= 100f;\n\t}", "private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }", "public void init(){\n\t\tfor (int x=0;x<7;x++){\n\t\t\ttop[x]=0;\n\t\t\tfor(int y=0;y<6;y++){\n\t\t\t\tgrid[x][y]=0;\n\t\t\t}\n\t\t}\n\t\tbufferImage= createImage(350,500);\n\t\tbufferGraphic= bufferImage.getGraphics();\n\t\tGraphics g = bufferGraphic;\n\t\tpaint(g);\n\t\t\n\t\taddMouseListener(new MouseInputAdapter() { \n\t\t\tpublic void mouseClicked(MouseEvent e) {\t\t\t\n\t\t\t\tGraphics g = bufferGraphic;\n\t\t\t\tint x=e.getX();\n\t\t\t\tint y=e.getY();\n\t\t\t\t\n\t\t\t\t//check for placement, check for winner\n\t\t\t\tif( y<=400 && y>=100){\n\t\t\t\t\t\tmarkspot(x);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\t\n\t}", "private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }", "public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }", "public CopyOfPlayer(){ //Loads and scales the images\n for (int i = 0; i < robotImages.length; i++){\n for (int j = 0; j < black.length; j++){\n robotImages[i][j].scale(300, 300);\n }\n }\n costume = PrefLoader.getCostume(); //Sets costume according to file\n setImage(robotImages[costume][2]);\n }", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }", "Scenes() {\n\n // Determines the length of the image arrays\n slideAmount = new int[sceneAmount];\n slideAmount[0] = 3;\n slideAmount[1] = 4;\n slideAmount[2] = 3;\n slideAmount[3] = 6;\n\n\n texts = new PImage[sceneAmount];\n SlideScene0 = new PImage[slideAmount[0]];\n SlideScene1 = new PImage[slideAmount[1]];\n SlideScene2 = new PImage[slideAmount[2]];\n SlideScene3 = new PImage[slideAmount[3]];\n\n //SlideScene4 = new PImage[slideAmount[4]];\n\n // Loads the border image\n border = loadImage(\"slideShow/border.png\");\n videoBackground = loadImage(\"slideShow/scene4/Background.PNG\");\n\n // Load in the text as images into the array\n for (int i = 0; i < sceneAmount; i++) {\n texts[i] = loadImage(\"text/text\" + i + \".png\");\n }\n\n // load the slideshow images into the array\n for (int d = 0; d < sceneAmount; d++) {\n for (int i = 0; i < slideAmount[d]; i++) {\n switch(d) {\n case 0:\n SlideScene0[i] = loadImage(\"slideShow/scene0/slide\" + i + \".png\");\n break;\n case 1:\n SlideScene1[i] = loadImage(\"slideShow/scene1/slide\" + i + \".png\");\n break;\n case 2:\n SlideScene2[i] = loadImage(\"slideShow/scene2/slide\" + i + \".png\");\n break;\n case 3:\n SlideScene3[i] = loadImage(\"slideShow/scene3/slide\" + i + \".png\");\n break;\n }\n }\n }\n }", "public visualizar_camas() {\n initComponents();\n }", "private void initialiseRobotImage(int x, int y) {\r\n\t\trobotImage = new RobotImageComponent(Constant.ROBOTIMAGEPATHS[this.getDirection()], Constant.ROBOTWIDTH, Constant.ROBOTHEIGHT);\r\n\t\tframe.add(robotImage);\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }", "public void actualizarFrame(float delta) {\n stateTime += delta;\n switch (estado) {\n case DERECHA:\n aspectoActual = (TextureRegion) animacionDerecha.getKeyFrame(stateTime, false);\n break;\n case IZQUIERDA:\n aspectoActual = (TextureRegion) animacionIzquierda.getKeyFrame(stateTime, false);\n break;\n default:\n aspectoActual = aspectoBasico;\n break;\n }\n }", "private void initialize() {\n this.board.addBoardChangeListener(this);\n\n this.layers = new ArrayList();\n this.bounds = new Rectangle();\n\n this.zoom = 1.0;\n this.zoomLevel = ZOOM_NORMALSIZE;\n this.affineTransform = new AffineTransform();\n\n this.loadTiles(board);\n this.setPreferredSize(new Dimension((board.getWidth() * 32),\n (board.getHeight() * 32)));\n\n bufferedImage = new BufferedImage((board.getWidth() * 32),\n (board.getHeight() * 32), BufferedImage.TYPE_INT_ARGB);\n\n this.antialiasGrid = true;\n this.gridColor = DEFAULT_GRID_COLOR;\n this.gridOpacity = 100;\n\n if (!this.layers.isEmpty()) {\n this.currentSelectedLayer = this.layers.get(0);\n }\n }", "public GUI(){\n lifeCount = new Picture[5];\n for(int i = 0; i < lifeCount.length; i++){\n lifeCount[i] = new Picture(SimpleGfxGrid.PADDINGX + 672,9, \"sprites/lives/LIFE\" +i+\".png\");\n }\n vaccine = new Picture[2];\n vaccine[0] = new Picture(SimpleGfxGrid.PADDINGX + 636,38,\"sprites/powerups/Vaccine.png\");\n vaccine[1] = new Picture(SimpleGfxGrid.PADDINGX + 637,72,\"sprites/powerups/Vaccine.png\");\n\n heart = new Picture(SimpleGfxGrid.PADDINGX + 636,7, \"sprites/lives/heart.png\");\n\n mask = new Picture(SimpleGfxGrid.PADDINGX + 637, 9, \"sprites/powerups/Mask.png\");\n mask.grow(5, 2);\n\n timerNum = new Picture[3][10];\n for(int i = 0; i < 3; i++){\n for(int j = 0; j<10; j++)\n timerNum[i][j] = new Picture(SimpleGfxGrid.PADDINGX + 690 + (36*i),64,\"sprites/numbers/num\"+j+\n \".png\");\n }\n }", "public StoneSummon() {\n// ArrayList<BufferedImage> images = SprssssssaasssssaddddddddwiteUtils.loadImages(\"\"\n createStones();\n\n }", "public Money (Bitmap res,int w, int h){\n\n x = 100;\n y = 100;\n dx = 30;\n spritesheet = res;\n height = h;\n width = w;\n row = 0;\n for (int i = 0; i < numbers; i++){\n imageMoney[i] = Bitmap.createBitmap(res, i*32 ,0,32,64);\n\n }\n\n randomize();\n\n\n //setBitmap(GamePanel.getArray().get(0),GamePanel.getArray().get(1));\n //name = \"King\";\n //spritesheet = BitmapFactory.decodeResource(getResources(), R.drawable.diamond);\n //y = GamePanel.HEIGHT;\n\n //number1 =res1;\n //number2 = res2;\n //startTime = System.nanoTime();\n }", "@Override\n public void init() {\n startCamera();\n }", "public void initialize() {\n\t\tImageIcon bg = new ImageIcon(\"bg.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"Hero1 Normal.png\");\n\t\tin1[1] = new ImageIcon(\"20ed.png\");\n\t\tin1[2] = new ImageIcon(\"50ed.png\");\n\t\tin1[3] = new ImageIcon(\"100ed.png\");\n\t\tin1[4] = new ImageIcon(\"200ed.png\");\n\t\tin1[5] = new ImageIcon(\"500ed.png\");\n\t\tin1[6] = new ImageIcon(\"Hero1 Att200.png\");\n\t\tin1[7] = new ImageIcon(\"Hero1 Att500.png\");\n\t\tin1[8] = new ImageIcon(\"Hero1 Defence01.png\");\n\t\tin1[9] = new ImageIcon(\"Hero1Defence02.png\");\n\t\tin1[10] = new ImageIcon(\"Hero1 to fire.png\");\n\t\tin1[11] = new ImageIcon(\"Hero1 die.png\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"20ed02.png\");\n\t\tin2[2] = new ImageIcon(\"50ed02.png\");\n\t\tin2[3] = new ImageIcon(\"100ed02.png\");\n\t\tin2[4] = new ImageIcon(\"200ed02.png\");\n\t\tin2[5] = new ImageIcon(\"500ed02.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"B1fire02.png\");\n\t\tinBullet1[1] = new ImageIcon(\"B1fire03.png\");\n\t\tinBullet1[2] = new ImageIcon(\"B1fire05.png\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\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 }", "void makeAvocado() {\n this.hungerDeltaPcrntArray.add(0.17f);\n this.speedDeltaPcrntArray.add(0.50f);\n this.pointsDeltaArray.add(600);\n this.imageLocationArray.add(\"avocado.png\");\n }", "public void prepareSorpresas(){\n\t\tfor( int x= 0 ; x < game.getAmountSorpresas();x++){\n\t\t\tSorpresa s = game.getSorpresa(x);\n\t\t\timage = s.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(s.getAncho(), s.getAlto(), Image.SCALE_SMOOTH);\n\t\t\ts.setImage(new ImageIcon(temporal));\n\t\t}\n\t}", "private void init() {\n display = new Display(title, getWidth(), getHeight());\n Assets.init();\n player = new Player(getWidth() / 2, getHeight() - 100, 1, 60, 40, this);\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 6; j++) {\n aliens.add(new Alien(150 + 50 * j, 50 + 50 * i, 1, 40, 40, this));\n }\n }\n display.getJframe().addKeyListener(keyManager);\n }", "public void atualizaJogo() {\n\t\t \t int[][] tabuleiro = new int[4][4];\n\t\t \t tabuleiro = jogo.getTabuleiro();\n\t\t \t \n\t\t \t for(int i = 0; i < 4; i++) {\n\t\t \t\t\tfor(int j = 0; j < 4; j++) {\n\t\t \t\t\t\tif(tabuleiro[i][j] == 0) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/0.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 4) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/4.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 8) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/8.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 16) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/16.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 32) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/32.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 64) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/64.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 128) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/128.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 256) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/256.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 512) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/512.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 1024) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/1024.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2048) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2048.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t }", "public TextureDisplay() {\n initComponents();\n\n setPreferredSize(new Dimension(size, size));\n\n backImg = createBackImg();\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 static void init() {\n\t\t// TODO Auto-generated method stub\n\t\tviewHeight = VIEW_HEIGHT;\n\t\tviewWidth = VIEW_WIDTH;\n\t\tfwidth = FRAME_WIDTH;\n\t\tfheight = FRAME_HEIGHT;\n\t\tnMines = N_MINES;\n\t\tcellSize = MINE_SIZE;\n\t\tnRows = N_MINE_ROW;\n\t\tnColumns = N_MINE_COLUMN;\n\t\tgameOver = win = lost = false;\n\t}", "public void startImage() {\r\n\t\tm_blocks = new Vector<BlockList>();\r\n\t\tm_feature.clear();\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tBlockList blockList = new BlockList();\r\n\t\t\tm_blocks.add(blockList);\r\n\t\t}\r\n\t}", "public void init() {\n setSize(466, 700); // Hago el applet de un tamaño 900, 500\n bAvanzaBloque = false;\n iNumBloques = 54; // Cantidad exacta para que se forme la figura\n iVidas = 3; // El jugador tendra 3 oportunidades\n iScore = 0; // El score empieza en 0\n iNivel = 1; // Empezara en el 1er nivel\n // La direccion que nos interesa es: false: Abajo true: Arriba.\n bDireccionY = false;\n // La direccion que nos interesa es: false: Izq. true: Dererecha\n bDireccionX = true;\n\n // El juego empieza pausado\n bPausado = true;\n // El juego no empieza hasta que el usuario lo desee\n bEmpieza = false;\n // El jugador no ha perdido\n bPerdio = false;\n\n // se obtiene la imagen para la barra\n URL urlImagenBarra = this.getClass().getResource(\"remolqueBB.png\");\n // se crea la barra tipo Objeto\n objBarra = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenBarra));\n // se posiciona la barra centrada en la parte de abajo\n objBarra.setX((getWidth() / 2) - (objBarra.getAncho() / 2));\n objBarra.setY(getHeight() - objBarra.getAlto());\n // se le asigna una velocidad de 9\n objBarra.setVelocidad(20);\n\n // se carga la imagen para el proyectil\n URL urlImagenProyectil\n = this.getClass().getResource(\"cristalAzulBB2.png\");\n // se crea al objeto Proyectil de la clase objeto\n objProyectil = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenProyectil));\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.setX((getWidth() / 2) - (objProyectil.getAncho() / 2));\n objProyectil.setY(objBarra.getY() - objProyectil.getAlto());\n // se le asigna una velocidad de 5\n objProyectil.setVelocidad(5);\n\n // se crea la lista de bloques a destruir\n lnkBloques = new LinkedList();\n // se llena y acomoda la lista de bloques\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n\n // se crea el sonido para el choque de con la barra\n socSonidoChoqueBarra = new SoundClip(\"ChoqueBarra.wav\");\n\n // se crea el sonido para el choque con los bloques\n socSonidoChoqueBloque = new SoundClip(\"ChoqueBloque.wav\");\n\n /* se le añade la opcion al applet de ser escuchado por los eventos\n /* del teclado */\n addKeyListener(this);\n }", "private void createCircleImages(){\n offScreenCircles = new Image[8];\n try {\n offScreenCircles[0] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleDown.png\"));\n offScreenCircles[1] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftDown.png\"));\n offScreenCircles[2] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeft.png\"));\n offScreenCircles[3] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftUp.png\"));\n offScreenCircles[4] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleUp.png\"));\n offScreenCircles[5] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightUp.png\"));\n offScreenCircles[6] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRight.png\"));\n offScreenCircles[7] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightDown.png\"));\n } catch (IOException ex) {\n System.out.println(\"Bild konnte nicht geladen werden!\");\n }\n activeOffScreenCircle = offScreenCircles[0];\n }", "public void setImage(Bloque[][] bloques, int f, int c,int l){\n\t\tThread hilo = new Thread(){ //Se crea el hilo para poder tener las esperas.\n @Override\n public synchronized void run(){\n try {\n\t \tif(l==2){ //recibe un entero(l) de acuerdo a la necesidad para dar el tiempo de espera, 2 para cuando las imagenes no son iguales. \n\t \t \t\tsleep(800);\n\t \t \t}else{\n\t \t \tif(l==3){ //recibe un entero(l) de acuerdo a la necesidad para dar el tiempo de espera,3 en caso de ser presionado el mismo boton\n\t \t \t\tsleep(20);\n\t \t \t}\n\t \t \t}\n\t \t\n\t \tfor(int i=10;i<140; i+=5){ //Se reduce el tamaņo del boton.\n\t \t\t bloques[f][c].setSize(new Dimension(150-i,150));\n\t \t\t sleep(5);\n\t \t }\n\t \t\n\t \tif(l==2||l==3){ //Quitar imagen.\n\t \t\tbloques[f][c].setIcon(null);\n\t \t \t}else{\n\t \t \t\tif(getTema()==1){ //Si el tema elegido fue motos va a ser igual a 1 \n\t\t\t\t\t\t\t\tImageIcon icon = new ImageIcon(getClass().getResource(\"/imagenes/\"+imagen+\".png\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbloques[f][c].setIcon(icon); //Pone la imagen.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\t\t\t\t\t\t\t\t\t\t\t\t //Si el tema elegido fue Lenguajes de programacion va a ser igual a 2 \n\t\t\t\t\t\t\t\tImageIcon icon = new ImageIcon(getClass().getResource(\"/imagenes/\"+imagen+imagen+\".png\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbloques[f][c].setIcon(icon); //Pone la imagen.\n\t\t\t\t\t\t\t}\n\t \t \t}\t\n\t\t\t\t\t\t\n\t\t\t\t\t for(int i=10;i<155; i+=5){//Devuelve el boton a su tamaņo normal.\n\t\t \t\t bloques[f][c].setSize(new Dimension(i,150));\n\t\t \t\t sleep(5);\n\t\t \t }\n \n } catch (InterruptedException ex) {\n\t ex.printStackTrace();\n }\n }\n\t\t};\n\t\thilo.start(); //Se inicia el hilo\n\t}", "public void initialiseAvatars() {\n\n\t\timage1 = null;\n\t\timage2 = null;\n\t\timage3 = null;\n\t\timage4 = null;\n\t\timage5 = null;\n\t\timage6 = null;\n\n\t\ttry {\n\t\t\timage1 = new Image(new FileInputStream(\"avatars/avatar1.png\"));\n\t\t\timage2 = new Image(new FileInputStream(\"avatars/avatar2.png\"));\n\t\t\timage3 = new Image(new FileInputStream(\"avatars/avatar3.png\"));\n\t\t\timage4 = new Image(new FileInputStream(\"avatars/avatar4.png\"));\n\t\t\timage5 = new Image(new FileInputStream(\"avatars/avatar5.png\"));\n\t\t\timage6 = new Image(new FileInputStream(\"avatars/avatar6.png\"));\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tav1.setImage(image1);\n\t\tav2.setImage(image2);\n\t\tav3.setImage(image3);\n\t\tav4.setImage(image4);\n\t\tav5.setImage(image5);\n\t\tav6.setImage(image6);\n\n\t}", "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 Initialize(BufferedImage image, double speed, int yPosition)\n {\n this.image = image;\n this.speed = speed;\n\n this.yPosition = yPosition;\n\n // We divide frame size with image size do that we get how many times we need to draw image to screen.\n int numberOfPositions = (Framework.frameWidth / this.image.getWidth()) + 2; // We need to add 2 so that we don't get blank spaces between images.\n xPositions = new double[numberOfPositions];\n\n // Set x coordinate for each image that we need to draw.\n for (int i = 0; i < xPositions.length; i++)\n {\n xPositions[i] = i * image.getWidth();\n }\n }", "public Animation(BufferedImage[] images, long millisPerFrame){\n\t\tthis.images=images;\n\t\tthis.millisPerFrame = millisPerFrame;\n\t\tlooping=true;\n\t\tstart();\n\t}", "private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }", "protected void setPic() {\n }", "public GameView() {\n this.astronautaImage = new Image(getClass().getResourceAsStream(\"/res/astronauta.gif\"));\n this.ovniImage = new Image(getClass().getResourceAsStream(\"/res/ovni1.png\"));\n this.ovni2Image = new Image(getClass().getResourceAsStream(\"/res/ovni1.png\"));\n this.ovnidestructibleImage = new Image(getClass().getResourceAsStream(\"/res/ovnidestructible.png\"));\n this.wallImage = new Image(getClass().getResourceAsStream(\"/res/wall.png\"));\n this.pistolaImage = new Image(getClass().getResourceAsStream(\"/res/pistola.png\"));\n this.alienEggImage = new Image(getClass().getResourceAsStream(\"/res/alienEgg.png\"));\n }" ]
[ "0.6735115", "0.665454", "0.6592497", "0.6542806", "0.6507725", "0.6497945", "0.6480201", "0.6454613", "0.6442867", "0.6424046", "0.6410572", "0.6275923", "0.6234174", "0.62243086", "0.62189025", "0.6201396", "0.619672", "0.61702734", "0.6154769", "0.6116175", "0.6114676", "0.6113479", "0.60942346", "0.6061198", "0.6058015", "0.6049729", "0.60356057", "0.6029687", "0.60274947", "0.601414", "0.60039073", "0.60014606", "0.5988331", "0.59882534", "0.5961798", "0.59603566", "0.5959905", "0.5944972", "0.5915664", "0.58978", "0.58890027", "0.58517265", "0.5848546", "0.5846914", "0.58451074", "0.58376426", "0.5804149", "0.57844377", "0.5764484", "0.5759521", "0.5757899", "0.5756922", "0.5754904", "0.57538325", "0.5751827", "0.5745964", "0.5743276", "0.5737529", "0.5737301", "0.57310057", "0.5724373", "0.57225394", "0.57160914", "0.57022077", "0.5695152", "0.56911695", "0.5683091", "0.5680203", "0.5677891", "0.5670792", "0.5667982", "0.5664792", "0.56547415", "0.5653305", "0.56526095", "0.5643334", "0.5640934", "0.5627619", "0.5625673", "0.5624872", "0.56152356", "0.5611024", "0.5610001", "0.56081057", "0.5606313", "0.5603784", "0.56022906", "0.56001675", "0.55998737", "0.55997723", "0.55894583", "0.55856055", "0.5572861", "0.5567082", "0.555815", "0.55550945", "0.5552665", "0.5544396", "0.55398315", "0.553506", "0.55280185" ]
0.0
-1
En el metodo act, se revisa el borde,la bandera de restaura, el frame de animacion y si aun deberia estar vivo el enemigo.
public void act() { check = borde(flag); if(check == true ) restaura(); moveRandom(move); if(animationE % 3 == 0){ checkanimation(); } animationE++; alive=checkfire(); if(alive == true){ enemyoff(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actualiza() {\n //Determina el tiempo que ha transcurrido desde que el Applet inicio su ejecución\n long tiempoTranscurrido = System.currentTimeMillis() - tiempoActual;\n \n //Guarda el tiempo actual\n \t tiempoActual += tiempoTranscurrido;\n \n //Actualiza la animación con base en el tiempo transcurrido\n if (direccion != 0) {\n barril.actualiza(tiempoTranscurrido);\n }\n \n \n //Actualiza la animación con base en el tiempo transcurrido para cada malo\n if (click) {\n banana.actualiza(tiempoTranscurrido);\n }\n \n \n \n \n //Actualiza la posición de cada malo con base en su velocidad\n //banana.setPosY(banana.getPosY() + banana.getVel());\n \n \n \n if (banana.getPosX() != 50 || banana.getPosY() != getHeight() - 100) {\n semueve = false;\n }\n \n if (click) { // si click es true hara movimiento parabolico\n banana.setPosX(banana.getPosX() + banana.getVelX());\n banana.setPosY(banana.getPosY() - banana.getVelY());\n banana.setVelY(banana.getVelY() - gravity);\n }\n \n if (direccion == 1) { // velocidad de las barrils entre menos vidas menor el movimiento\n barril.setPosX(barril.getPosX() - vidas - 2);\n }\n \n else if (direccion == 2) {\n barril.setPosX(barril.getPosX() + vidas + 2);\n }\n }", "public void act()\n {\n \n if (wait < 75)\n {\n wait = wait + 1;\n }\n \n \n \n \n \n \n if (wait == 75)\n {\n change();\n checkForBounce();\n checkForEdge();\n checkWin(); \n }\n \n \n }", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }", "public void act() // method act\n {\n moveBear(); //lakukan method movebear\n objectDisappear(); // lakukan method objeectDisappear\n }", "public void actualizarFrame(float delta) {\n stateTime += delta;\n switch (estado) {\n case DERECHA:\n aspectoActual = (TextureRegion) animacionDerecha.getKeyFrame(stateTime, false);\n break;\n case IZQUIERDA:\n aspectoActual = (TextureRegion) animacionIzquierda.getKeyFrame(stateTime, false);\n break;\n default:\n aspectoActual = aspectoBasico;\n break;\n }\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public void contartiempo() {\r\n\r\n\t\tif (activarContador) {\r\n\t\t//\tSystem.out.println(\"CONTADOR \" + activarContador);\r\n\t\t\tif (app.frameCount % 60 == 0) {\r\n\t\t\t\tcontador--;\r\n\t\t\t//\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\t\t\t//\tSystem.out.println(\"CONTADOR \" + contador);\r\n\t\t\t\tif (contador == 0) {\r\n\t\t\t\t\tcontador = 0;\r\n\t\t\t\t\tactivado = false;\r\n\t\t\t\t\tactivarContador = false;\r\n\t\t\t\t//\tSystem.out.println(\"CONTADOR \" + activarContador);\r\n\t\t\t\t//\tSystem.out.println(\"EFECTO \" + activado);\r\n\t\t\t\t\tplayer.setBoost(0);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }", "public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }", "@Override\n public void act(float delta) {\n }", "public void act() \n {\n gravity();\n animate();\n }", "public void act() {\n\t\tsuper.act();\n\t\t//Gracias www.trucoteca.com\n\t\tif(control && shift && n) {\n\t\t\tthis.x = Ventana.getInstancia().getBola().getX();\n\t\t}\n\t\t//Si quieres ser legal\n\t\telse {\n\t\tthis.x += this.vx;\n\t\t}\n\t\tif(this.x < 0)\n\t\t\tthis.x = 0;\n\t\tif(this.x > Stage.WIDTH - getWidth())\n\t\t\tx = Stage.WIDTH - getWidth();\n\t\t}", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "public void waitingFrames()\n\t{\n\t\tif(waitingFrames < framesToWait && action == false)\n\t\t{\n\t\t\twaitingFrames ++;\n\t\t}\n\t\telse if(waitingFrames == framesToWait && action == false)\n\t\t{\n\t\t\twaitingFrames = 0;\n\t\t\taction = true;\n\t\t\tspriteImageView.setImage(holdImage);\n\t\t\tswitch(getDirection())\n\t\t\t{\n\t\t\tcase \"UP\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 300, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"DOWN\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 0, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"LEFT\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 100, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"RIGHT\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 200, 100, 100));\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tswitch(getDirection())\n//\t\t\t{\n//\t\t\t\tcase \"UP\":\t\t\t\t\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+300,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"DOWN\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"LEFT\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+100,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"RIGHT\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+200,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tdefault: break;\n//\t\t\t}\n//\t\t\twalkingAnimation.play();\n\t\t}\n\t}", "public void mo5964b() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{0.0f, 0.3f, 0.5f, 0.7f, 0.9f, 1.0f}).setDuration(j).start();\n this.f5438qa.getMeasuredHeight();\n this.f5384D.getmImageViewHeight();\n C1413m.m6828a(27, this.f5389I);\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n this.f5384D.getmImageView().setImageResource(R.drawable.iqoo_buttonanimation);\n this.f5393M = (AnimationDrawable) this.f5384D.getmImageView().getDrawable();\n this.f5393M.start();\n duration.addListener(new C1300Wa(this));\n }", "public void act() {\n setImage(myGif.getCurrentImage());\n }", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "@Override\n\tpublic void onAnimationStart(Animator arg0) {\n\t\tif (mState.getState() != 0) {\n\t\t\tGBTools.GBsetAlpha(bv, 0.0F);\n\t\t\tbv.setState(mState.getState());\n\t\t\tbv.setPressed(false);\n\t\t}\n\t\tbv.bringToFront();\n\t\tmBoardView.invalidate();\n\t}", "public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\n }", "public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "@Override\r\n\tpublic void act(float delta) {\r\n\r\n\t\t// position\r\n\t\tsetSpritesPosition();\r\n\t\tif(previousHealth != g.i().playerHealth)\r\n\t\t\tcover.setScale((100f -g.i().playerHealth)/100f, 1f);\r\n\t\tstateTime += Gdx.graphics.getDeltaTime();\r\n\t\tcurrentFrame = healthBarAnimation.getKeyFrame(stateTime, true);\r\n\t\theroHealth.setRegion(currentFrame);\r\n\t\t\r\n\t\tpreviousHealth = g.i().playerHealth;\r\n\r\n\t}", "@Override\n public void actionPerformed(ActionEvent ae)\n {\n if (time < survivalTime && lives > 0)\n {\n updateTime();\n for (int i = 0; i < numFigs; i++)\n figures[i].hide();\n for (int i = 0; i < numFigs; i++)\n figures[i].move();\n for (int i = 0; i < numFigs; i++)\n figures[i].draw();\n playCollisionSound();\n }\n else\n {\n this.moveTimer.stop();\n for (int i = 0; i < this.numFigs; i++)\n figures[i].hide();\n if (lives > 0)\n {\n this.youWinLabel.setVisible(true);\n playYouWinSound();\n }\n else\n {\n this.gameOverLabel.setVisible(true);\n playGameOverSound();\n }\n }\n \n }", "@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "@Override\n\tpublic void run() {\n\t\t// TODO Auto-generated method stub\n\t\t\tThread ct = Thread.currentThread(); //captura la hebra en ejecucion\n\t try{\n\t \twhile (ct == animacion2) {\n\n\t Vector3d op = new Vector3d(.1,.05,.1);\n\t \t switch(acto)\n {\n case 0:\n a3dTrans.rotY(-Math.PI/1.80d);\n tras = new Vector3d(ax,ay,az);\n a3dTrans.setTranslation(tras);\n\n\n \t\t a3dTrans.setScale(op);\t\n \t\tobtrns.setTransform(a3dTrans);\n \t\tavance++; \n\n \t if(avance<=80)\n \t {\n ay += 0.0010;\n \n \t }\n \t else{\n \t\t acabe=1;\n \t\t }\n \t \n \t break;\n case 1:\n a3dTrans.rotY(-Math.PI/1.80d);\n\n tras = new Vector3d(ax,ay,az);\n a3dTrans.setTranslation(tras);\n\n\n \t\t a3dTrans.setScale(op);\t\n \t\tobtrns.setTransform(a3dTrans);\n \t\tavance++; \n\n \t acabe=0;\n \t if(avance<=80)\n \t {\n ay -= 0.0010;\n \n \t }\n \t else{\n \t\t acabe=1;\n\n \t\t }\n \t \n \t break;\n }\n \t \n\t \t \n\n \n\t Thread.sleep(delay); //Se espera un tiempo antes de seguir la ejecución\n\t \t}\n\t \t} catch (InterruptedException ex) {//Logger.getLogger(Cube3D.class.getName()).log(Level.SEVERE, null, ex);\t }\n\t \t\n\t }\n\t \n\t }", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "public void e()\n/* */ {\n/* 193 */ if (!this.g) {\n/* 194 */ AnimatorSet localAnimatorSet = new AnimatorSet();\n/* 195 */ localAnimatorSet.play(a(this.b)).with(b(this.c));\n/* 196 */ localAnimatorSet.setDuration(this.f).start();\n/* 197 */ this.c.setVisibility(View.VISIBLE);\n/* 198 */ this.g = true;\n/* */ }\n/* */ }", "public void mo5969f() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n duration.addListener(new C1298Va(this));\n }", "@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}", "public void act(){\n if(mainMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(mainMenu); \n }\n }\n if(pauseMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(pauseMenu); \n }\n }\n if(choiceMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(choiceMenu); \n }\n }\n if(actual == 1){\n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual2.png\");\n actual = 2;\n }\n }\n else if(actual == 2){\n nextPage.setImagine(\"sipka1\");\n prePage.setImagine(\"sipka0\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual3.png\");\n actual = 3;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual1.png\");\n actual = 1;\n }\n }\n else if(actual == 3){\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual4.png\");\n actual = 4;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual2.png\");\n actual = 2;\n }\n }\n else if(actual == 4){\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual5.png\");\n actual = 5;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual3.png\");\n actual = 3;\n }\n }\n else if(actual == 5){\n nextPage.setImage(new GreenfootImage(\"\", 0, null, null));\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual4.png\");\n actual = 4;\n }\n }\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\tt = new Tank(); //reinitializes all the varibles\n\t\t\t\t\tmoveframe.dispose(); \n\t\t\t\t\tpressed = false;\n\t\t\t\t\tcanbemoved = true;\n\t\t\t\t\tbombers.clear();\n\t\t\t\t\tif (numplanes == 1){//resets the bombers depending on the number of planes\n\t\t\t\t\t\tbombers.add(new Bomber());\n\t\t\t\t\t}\n\t\t\t\t\telse if (numplanes == 2){\n\t\t\t\t\t\tbombers.add(new Bomber());\n\t\t\t\t\t\tbombers.add(new Bomber(450,80));\n\t\t\t\t\t}\n\t\t\t\t\telse if (numplanes ==3){\n\t\t\t\t\t\tbombers.add(new Bomber(220,15));\n\t\t\t\t\t\tbombers.add(new Bomber(650,15));\n\t\t\t\t\t\tbombers.add(new Bomber(450,80));\n\t\t\t\t\t}\n\t\t\t\t\telse if (numplanes == 4){\n\t\t\t\t\t\tbombers.add(new Bomber(220,15));\n\t\t\t\t\t\tbombers.add(new Bomber(650,15));\n\t\t\t\t\t\tbombers.add(new Bomber(220,80));\n\t\t\t\t\t\tbombers.add(new Bomber(650,80));\n\t\t\t\t\t}\n\t\t\t\t\ttime.start();\t//restarts the timer\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}", "public void act()\n { \n if(returnTime.millisElapsed() > 1000) { //time count down every second\n time --;\n }\n \n if (time == 0) { \n bgm.stop();\n Greenfoot.stop();\n }\n \n showCredit();\n }", "@Override\n\tpublic boolean act(float delta) {\n\t\tif(!isRunning) return true;\n\t\t\n\t\t\n\t\treturn false;\n\t}", "public void mo5968e() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{-((float) C1413m.f5711i.getHeight()), 0.0f}).setDuration(240);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{0.0f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f}).setDuration(240);\n duration.start();\n duration2.start();\n long j = (long) 160;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5438qa, \"alpha\", new float[]{1.0f, 0.0f}).setDuration(j).start();\n duration.addListener(new C1302Xa(this));\n }", "private void selectFrame()\n\t{\n\t\t// Increment the animation frame\n\t\tif ((long) Game.getTimeMilli() - frameStart >= interval)\n\t\t{\n\t\t\tsetFrame(currFrame+1);\n\t\t}\n\t\t// Get the path to the current frame's image\n\t\tsetFramePath();\n\t\t// If the image frame doesn't exist...\n\t\tif (!GraphicsManager.getResManager().resExists(currFramePath))\n\t\t{\n\t\t\tif (isLooping())\n\t\t\t{\n\t\t\t\tsetFrame(1);\n\t\t\t\tsetFramePath();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisFinished = true;\n\t\t\t}\n\t\t}\n\t}", "public boolean act(long currentTime) {\n\t\tif(mEnded || mCanceled) return false;\n \tif(!canStartAfter()) return true;\n \t\n if (mStartTime == START_ON_FIRST_FRAME) {\n mStartTime = currentTime;\n }\n \n if (mStartTime == FINISH_ON_FIRST_FRAME) {\n mStartTime = currentTime - mStartOffset - mDuration;\n }\n\n final long startOffset = mStartOffset;\n final long duration = mDuration;\n float normalizedTime;\n if (duration != 0) {\n normalizedTime = ((float) (currentTime - (mStartTime + startOffset))) /\n (float) duration;\n } else {\n // time is a step-change with a zero duration\n \t// 기존 안드로이드 Animation 클래스에서는 startOffset이 빠졌는데 \n \t// 버그로 보인다. 그리고 하한값 0f를 -1f로 수정한다.\n normalizedTime = (currentTime < mStartTime + startOffset)? -1.0f : 1.0f;\n }\n\n final boolean expired = normalizedTime >= 1.0f;\n mMore = !expired;\n\n if (!mFillEnabled) normalizedTime = Math.max(Math.min(normalizedTime, 1.0f), 0.0f);\n\n if ((normalizedTime >= 0.0f || mFillBefore) && (normalizedTime <= 1.0f || mFillAfter)) {\n if (!mStarted) {\n \tfireActionStart();\n \tinitialize();\n mStarted = true;\n }\n\n if (mFillEnabled) normalizedTime = Math.max(Math.min(normalizedTime, 1.0f), 0.0f);\n\n if (mCycleFlip) {\n normalizedTime = 1.0f - normalizedTime;\n }\n\n final float interpolatedTime = getInterpolatedTime(normalizedTime);\n apply(interpolatedTime);\n }\n\n if (expired) {\n if (mRepeatCount == mRepeated) {\n if (!mEnded) {\n mEnded = true;\n if(!mFillAfter) restore();\n fireActionEnd();\n }\n } else {\n if (mRepeatCount > 0) {\n mRepeated++;\n }\n\n if (mRepeatMode == REVERSE) {\n mCycleFlip = !mCycleFlip;\n }\n\n mStartTime = START_ON_FIRST_FRAME;\n mMore = true;\n\n fireActionRepeat();\n }\n }\n \n /*if (!mMore && mOneMoreTime) {\n mOneMoreTime = false;\n return true;\n }*/\n\n return mMore;\n }", "@Override\n public void animate() {\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "@Override\n\tpublic boolean update(Animations obj) {\n\t\treturn false;\n\t}", "@Override\n public void run() {\n try {\n while (true) {\n frame.updateState();\n Thread.sleep(1000);\n }\n } catch (Exception e) {\n // e.printStackTrace();\n }\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "private void mostrarcamino(Estado act, Estado fin) {\r\n\t\tpasos = act.getProf(); // Variable para guardar la profundidad a la que se encuentra la solucion del laberinto\r\n\t\twhile (true) { // Con este bucle voy pintando el camino en la matriz con todos los padres de actual hasta que padre==null (estado_inicial)\r\n\t\t\tmatriz[act.getX() - 1][act.getY() - 1] = camino;\r\n\t\t\tact = act.getPadre();\r\n\t\t\tif (act.getPadre() == null) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void act() \n {\n // Add your action code here.\n contaP++;\n if(contaP == 25)\n {\n baja();\n contaP=0;\n }\n }", "private BufferedImage getCurrentAnimationFrame() {\n\t\treturn mainMenuAnimation.getCurrentFrame();\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n ensureVisibility(frameAnimation);\n\n //sets the background resource of the blank image view for the frame animation\n //to the resource that represents the animation.\n frameAnimation.setBackgroundResource(R.drawable.loading_animation);\n\n //extracts and AnimationDrawable from the image view.\n AnimationDrawable frameAnimationDrawable = (AnimationDrawable) frameAnimation.getBackground();\n\n // Starts the animation\n frameAnimationDrawable.start();\n }", "@Override\n public void act(float delta)\n {\n SCALE = PlayScreen.scale;\n\n if(actCount < 4)actCount++;\n\n dt=delta;\n if(!initialized)\n {\n mirror.setRotation(initRotation);\n\n dt = delta;\n positionChanged();\n\n if (hittime > (1.0 / 5.0))\n {\n if (hit >= 0) hit--;\n hittime = 0;\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n //setOrigin(mirror.getOriginX(), mirror.getOriginY());\n }\n\n if(initialized && hit>0)\n {\n positionChanged();\n\n if(hittime>=(1.0/5.0))\n {\n if(hit>0)hit--;\n hittime = 0;\n if (hit == 0)\n {\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n }\n\n }\n\n //Handles fading in/out of obstacle when triggered by a Toggle object\n if(fadeIn || fadeOut)\n {\n if(fadeIn)\n {\n if(mirror.getColor().a <0.95f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a + 1 * delta * 8 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, 1f);\n fadeIn = false;\n fadeOut = false;\n }\n }\n else\n {\n if(mirror.getColor().a >= 0.39f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a - 1 * delta * 15 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, Toggle.fadealpha);\n fadeIn = false;\n fadeOut = false;\n }\n }\n }\n\n\n\n\n if(!initialized)\n {\n initialized = true;\n }\n\n if(actCount<4){defineBody(); calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n if(poly.getRotation() != mirror.getRotation()){calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n super.act(delta);\n }", "boolean updateFrame() {\n counter++; // update the counter every time this method is called\n switch (currAnimation) {\n case STANDING:\n case CROUCHING:\n if (currFrame == 1) {\n if (counter > BLINK_TIME) {\n currFrame = 0; // open Kirby's eyes\n counter = 0;\n return true;\n } else {\n return false;\n }\n } else if (currFrame == 0 && counter > noBlinkPeriod) {\n currFrame = 1; // change to a blinking state (eyes closed)\n noBlinkPeriod = (int) (Math.random() * 750) + 50;\n counter = 0;\n return true;\n } else {\n currFrame = 0;\n return true;\n }\n case WALKING:\n case RUNNING:\n return nextFrame();\n case FLOATING:\n if (inAir) {\n return nextFrame();\n } else {\n dy = 0;\n if (rightKeyPressed || leftKeyPressed) {\n setAnimation(Animation.WALKING);\n } else {\n setAnimation(Animation.STANDING);\n }\n return true;\n }\n case FALLING:\n if (inAir) {\n if (currFrame < 6) { \n // 6 is the last frame of the falling animation\n return nextFrame(); \n } else { return false; }\n } else {\n dy = 0;\n if (downKeyPressed) {\n setAnimation(Animation.CROUCHING);\n currFrame = 0;\n } else if (rightKeyPressed || leftKeyPressed) {\n setAnimation(Animation.WALKING);\n } else {\n dx = 0;\n setAnimation(Animation.STANDING);\n }\n return true;\n }\n case SLIDING:\n if (counter > SLIDING_TIME) {\n dx = 0;\n if (downKeyPressed) {\n setAnimation(Animation.CROUCHING);\n } else if (rightKeyPressed || leftKeyPressed) {\n setAnimation(Animation.WALKING);\n } else {\n setAnimation(Animation.STANDING);\n }\n \n return true;\n } else { return false; }\n case ENTERING:\n if (currFrame < 3) {\n // 3 being the final frame of the ENTERING animation\n return nextFrame();\n } else if (currFrame == 3) {\n entered = true; // signal that Kirby has entered the door\n return false; // then return false, since the animation didn't change\n } else { return false; }\n default:\n return false;\n }\n }", "public static void changeFrame() {\r\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t// FireEvent sign = new FireEvent(j);\n\t\t\tSystem.out.println(diceResult + \" a\" + \"a's locaton:\"\n\t\t\t\t\t+ a.getLocation());\n\n\t\t\tif (conPlay % 2 == 0) {\n\t\t\t\tAIplay = false;\n\t\t\t\t// 用了转向卡时\n\t\t\t\tif (a.getDirection() == 1) {\n\t\t\t\t\tif (con2 >= diceResult) {\n\t\t\t\t\t\ttimer2.stop();\n\t\t\t\t\t\ta.setLocation(-diceResult);\n\t\t\t\t\t\tAIFireEvent sign = new AIFireEvent(a.getLocation(), a,\n\t\t\t\t\t\t\t\tb, AIplay);\n\t\t\t\t\t\tSystem.out.println(\"a.Position \" + a.getLocation());\n\t\t\t\t\t\tsign.setVisible(true);\n\t\t\t\t\t\tconPlay++;\n\t\t\t\t\t\tcon2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplayerAIcon.setBounds(p[i_f][0], p[i][1], p[i][2],\n\t\t\t\t\t\t\t\tp[i][3]);\n\t\t\t\t\t\ti_f--;\n\t\t\t\t\t\tif (i_f >= 38)\n\t\t\t\t\t\t\ti_f = i_f % 38;\n\t\t\t\t\t\tif (i_f < 0)\n\t\t\t\t\t\t\ti_f = i_f + 38;\n\t\t\t\t\t\tcon2++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// 没有用转向卡\n\t\t\t\telse {\n\t\t\t\t\tif (con2 >= diceResult) {\n\t\t\t\t\t\ttimer2.stop();\n\t\t\t\t\t\ta.setLocation(diceResult);\n\t\t\t\t\t\tAIFireEvent sign = new AIFireEvent(a.getLocation(), a,\n\t\t\t\t\t\t\t\tb, AIplay);\n\t\t\t\t\t\tSystem.out.println(\"a.Position \" + a.getLocation());\n\t\t\t\t\t\tsign.setVisible(true);\n\t\t\t\t\t\tconPlay++;\n\t\t\t\t\t\tcon2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplayerAIcon.setBounds(p[i][0], p[i][1], p[i][2],\n\t\t\t\t\t\t\t\tp[i][3]);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tif (i >= 38)\n\t\t\t\t\t\t\ti = i % 38;\n\t\t\t\t\t\tcon2++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // 玩家b的操作\n\t\t\telse {\n\t\t\t\tAIplay = true;\n\t\t\t\t// 没有使用转向卡\n\t\t\t\tif (b.getDirection() == 0) {\n\t\t\t\t\tif (con2 >= diceResult) {\n\t\t\t\t\t\ttimer2.stop();\n\t\t\t\t\t\tb.setLocation(diceResult);\n\t\t\t\t\t\tAIFireEvent sign = new AIFireEvent(\n\t\t\t\t\t\t\t\t(b.getLocation() + 19) % 38, b, a, AIplay);\n\t\t\t\t\t\tSystem.out.println(\"b.Position \"\n\t\t\t\t\t\t\t\t+ (int) ((b.getLocation() + 19)) % 38);\n\t\t\t\t\t\tsign.setVisible(true);\n\t\t\t\t\t\tconPlay++;\n\t\t\t\t\t\tcon2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (i2 >= 38)\n\t\t\t\t\t\t\ti2 = i2 % 38;\n\t\t\t\t\t\tplayerBIcon.setBounds(p[i2][0], p[i2][1], p[i2][2],\n\t\t\t\t\t\t\t\tp[i2][3]);\n\t\t\t\t\t\ti2++;\n\t\t\t\t\t\t// if (i2 >= 38)\n\t\t\t\t\t\t// i2 = i2 % 38;\n\t\t\t\t\t\tcon2++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tif (b.getDirection() == 1) {\n\n\t\t\t\t\tif (con2 >= diceResult) {\n\t\t\t\t\t\ttimer2.stop();\n\t\t\t\t\t\tb.setLocation(-diceResult);\n\t\t\t\t\t\tAIFireEvent sign = new AIFireEvent(\n\t\t\t\t\t\t\t\t(b.getLocation() + 19) % 38, b, a, AIplay);\n\t\t\t\t\t\tSystem.out.println(\"b.Position \"\n\t\t\t\t\t\t\t\t+ (int) ((b.getLocation() + 19)) % 38);\n\t\t\t\t\t\tsign.setVisible(true);\n\t\t\t\t\t\tconPlay++;\n\t\t\t\t\t\tcon2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplayerBIcon.setBounds(p[i2_f][0], p[i2_f][1],\n\t\t\t\t\t\t\t\tp[i2_f][2], p[i2_f][3]);\n\t\t\t\t\t\ti2_f--;\n\t\t\t\t\t\tif (i2_f >= 38)\n\t\t\t\t\t\t\ti2_f = i2_f % 38;\n\t\t\t\t\t\tif (i2_f < 0)\n\t\t\t\t\t\t\ti2_f = i2_f + 38;\n\t\t\t\t\t\tcon2++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static String _timeranimacion_tick() throws Exception{\nif (mostCurrent._imgmosquito.getLeft()>0 || mostCurrent._imgmosquito.getTop()>0) { \n //BA.debugLineNum = 338;BA.debugLine=\"imgMosquito.Left = imgMosquito.Left - 15\";\nmostCurrent._imgmosquito.setLeft((int) (mostCurrent._imgmosquito.getLeft()-15));\n //BA.debugLineNum = 339;BA.debugLine=\"imgMosquito.Top = imgMosquito.Top - 15\";\nmostCurrent._imgmosquito.setTop((int) (mostCurrent._imgmosquito.getTop()-15));\n }else {\n //BA.debugLineNum = 341;BA.debugLine=\"TimerAnimacion.Enabled = False\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 343;BA.debugLine=\"butPaso1.Visible = False\";\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 344;BA.debugLine=\"imgMosquito1.Left = -60dip\";\nmostCurrent._imgmosquito1.setLeft((int) (-anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (60))));\n //BA.debugLineNum = 345;BA.debugLine=\"imgMosquito1.Top = 50dip\";\nmostCurrent._imgmosquito1.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 346;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 347;BA.debugLine=\"TimerAnimacionEntrada.Initialize(\\\"TimerAnimacion\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.Initialize(processBA,\"TimerAnimacion_Entrada\",(long) (10));\n //BA.debugLineNum = 348;BA.debugLine=\"TimerAnimacionEntrada.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n };\n //BA.debugLineNum = 351;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "protected abstract void animate(int anim);", "public static String _timeranimacion_entrada_tick() throws Exception{\nif (mostCurrent._imgmosquito1.getLeft()<anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (220)) || mostCurrent._imgmosquito1.getTop()<anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (340))) { \n //BA.debugLineNum = 356;BA.debugLine=\"imgMosquito1.Left = imgMosquito1.Left + 20\";\nmostCurrent._imgmosquito1.setLeft((int) (mostCurrent._imgmosquito1.getLeft()+20));\n //BA.debugLineNum = 357;BA.debugLine=\"imgMosquito1.Top = imgMosquito1.Top + 20\";\nmostCurrent._imgmosquito1.setTop((int) (mostCurrent._imgmosquito1.getTop()+20));\n }else {\n //BA.debugLineNum = 359;BA.debugLine=\"TimerAnimacionEntrada.Enabled = False\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 364;BA.debugLine=\"butPaso1.Visible = False\";\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 365;BA.debugLine=\"butPaso2.Visible = True\";\nmostCurrent._butpaso2.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 366;BA.debugLine=\"butPaso3.Visible = False\";\nmostCurrent._butpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 367;BA.debugLine=\"butPaso4.Visible = False\";\nmostCurrent._butpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 368;BA.debugLine=\"lblLabelPaso1.Visible = True\";\nmostCurrent._lbllabelpaso1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 369;BA.debugLine=\"lblPaso2a.Visible = False\";\nmostCurrent._lblpaso2a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 370;BA.debugLine=\"lblPaso2b.Visible = False\";\nmostCurrent._lblpaso2b.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 371;BA.debugLine=\"lblPaso3.Visible = False\";\nmostCurrent._lblpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 372;BA.debugLine=\"lblPaso3a.Visible = False\";\nmostCurrent._lblpaso3a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 373;BA.debugLine=\"lblPaso4.Visible = False\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 374;BA.debugLine=\"imgPupas.Visible = False\";\nmostCurrent._imgpupas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 375;BA.debugLine=\"imgLarvas.Visible = False\";\nmostCurrent._imglarvas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 376;BA.debugLine=\"imgMosquito.Visible = False\";\nmostCurrent._imgmosquito.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 377;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 378;BA.debugLine=\"imgHuevos.Visible = True\";\nmostCurrent._imghuevos.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 379;BA.debugLine=\"lblEstadio.Visible = True\";\nmostCurrent._lblestadio.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 380;BA.debugLine=\"lblEstadio.Text = \\\"Huevo\\\"\";\nmostCurrent._lblestadio.setText(BA.ObjectToCharSequence(\"Huevo\"));\n //BA.debugLineNum = 381;BA.debugLine=\"utilidades.CreateHaloEffect(Activity, butPaso2,\";\nmostCurrent._vvvvvvvvvvvvvvvvvvvvv7._vvvvvvvvv3 /*void*/ (mostCurrent.activityBA,(anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(mostCurrent._activity.getObject())),mostCurrent._butpaso2,anywheresoftware.b4a.keywords.Common.Colors.Red);\n };\n //BA.debugLineNum = 384;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "@Override\r\n public void paint(Graphics g){\n if(ch.moveCountY == 1 && flag == false){ \r\n flag = true;\r\n animator = new Thread(this);\r\n animator.start();\r\n }\r\n \r\n super.paint(g);\r\n \r\n Graphics2D g2d = (Graphics2D) g;\r\n \r\n if(ch.v == 330){\r\n ch.mainC = img;\r\n }\r\n \r\n if(pos2 < -15){\r\n // g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n b.setBounds(pos2, 0, 995, 610);\r\n \r\n }\r\n \r\n if(pos <= -15){\r\n b.setBounds(pos2, 0, 995, 610);\r\n //g2d.drawImage(img_bg2 , pos2, 0 , null);\r\n \r\n }\r\n \r\n \r\n a.setBounds(pos, 0, 995, 610);\r\n g2d.drawImage(ch.getImage() , ch.getMoveX() , ch.v , null);\r\n g2d.drawImage(obs1.getImage() , obs1.getX() , obs1.getY() , null);\r\n g2d.drawImage(obs2.pic2 , obs2.getX() , obs2.getY() , null);\r\n \r\n }", "public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }", "private void m23259e() {\n boolean z;\n if (this.f19138f != null) {\n ValueAnimator valueAnimator = this.f19137e;\n if (valueAnimator != null) {\n z = valueAnimator.isStarted();\n this.f19137e.cancel();\n this.f19137e.removeAllUpdateListeners();\n } else {\n z = false;\n }\n this.f19137e = ValueAnimator.ofFloat(0.0f, ((float) (this.f19138f.f19131u / this.f19138f.f19130t)) + 1.0f);\n this.f19137e.setRepeatMode(this.f19138f.f19129s);\n this.f19137e.setRepeatCount(this.f19138f.f19128r);\n this.f19137e.setDuration(this.f19138f.f19130t + this.f19138f.f19131u);\n this.f19137e.addUpdateListener(this.f19133a);\n if (z) {\n this.f19137e.start();\n }\n }\n }", "protected abstract float getFrameTimeNormalAnimation();", "public final boolean mo76177bo(float f) {\n AppMethodBeat.m2504i(29821);\n C4990ab.m7419v(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"ashutest::on swipe %f, duration %d, resumeStatus %b\", Float.valueOf(f), Long.valueOf(320), Boolean.valueOf(this.ype.dxp()));\n if (cXe()) {\n ImageView imageView;\n boolean z;\n if (f == 0.0f && !this.mChattingClosed) {\n m89647Ns(0);\n imageView = (ImageView) this.iWA.getWindow().getDecorView().findViewById(2131820648);\n if (imageView != null) {\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[onSwipe] prepareView GONE no cache!\");\n imageView.setVisibility(8);\n imageView.setImageDrawable(null);\n }\n if (this.mChattingInAnim != null) {\n this.mChattingInAnim.cancel();\n }\n } else if (!(f != 1.0f || this.mChattingClosed || this.ypn.dBM())) {\n this.iWA.getWindow().setBackgroundDrawableResource(C25738R.color.f12273y9);\n imageView = (ImageView) this.iWA.getWindow().getDecorView().findViewById(2131820648);\n if (!(imageView == null || imageView.getVisibility() != 0 || imageView.getTag() == null)) {\n ((View) imageView.getTag()).setVisibility(0);\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[onSwipe] prepareView GONE\");\n imageView.setVisibility(8);\n }\n if (this.ypn.getContentView() == null || this.ypn.getContentView().getX() > 0.0f) {\n m89647Ns(0);\n } else {\n m89647Ns(8);\n }\n }\n if (this.ype.dxp()) {\n z = true;\n } else if (Float.compare(1.0f, f) > 0) {\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[onSwipe] return! consumedSuperCall:%s\", Boolean.FALSE);\n AppMethodBeat.m2505o(29821);\n return false;\n } else {\n z = false;\n }\n View findViewById = this.iWA.findViewById(2131820633);\n imageView = (ImageView) this.iWA.findViewById(2131820648);\n if (!(imageView == null || imageView.getVisibility() != 8 || imageView.getDrawable() == null || this.mChattingClosed || f == 1.0f || f == 0.0f)) {\n imageView.setVisibility(0);\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[onSwipe] !1 && !0 prepareView VISIBLE\");\n m89647Ns(8);\n }\n if (Float.compare(1.0f, f) <= 0) {\n C5587h.m8390s(findViewById, 0.0f);\n C5587h.m8390s(imageView, 0.0f);\n } else if (imageView == null || imageView.getDrawable() == null) {\n C5587h.m8390s(findViewById, ((((float) findViewById.getWidth()) / 2.5f) * (1.0f - f)) * -1.0f);\n } else {\n C5587h.m8390s(imageView, ((((float) imageView.getWidth()) / 2.5f) * (1.0f - f)) * -1.0f);\n }\n AppMethodBeat.m2505o(29821);\n return z;\n }\n AppMethodBeat.m2505o(29821);\n return true;\n }", "public void setFrame() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"setFrame\");\r\n\t\t\r\n\t\tif (state != GameState.STOPPED) {\r\n\t\t\ttry {\r\n\t\t\t\t// Wait for event\r\n\t\t\t\tif (state == GameState.PAUSED\r\n\t\t\t\t\t|| state == GameState.WAITING_FRAME) {\r\n\t\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\t\twait();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Wait between two frames\r\n\t\t\t\telse if (speed < CowSimulator.UNLIMITED_SPEED) {\r\n\t\t\t\t\tThread.sleep(period);\r\n\t\t\t\t}\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Game stopped during turn\r\n\t\tif (state == GameState.STOPPED) {\r\n\t\t\t// End game\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "public void msgAnimationHasBin()\n\t{\n\t\tprint(\"Gantry: I gots the bin!!!\");\n\t\tgantry_events.add(GantryEvents.GotBin);\n\t//\tlog.add(new LoggedEvent(\"msgAnimationHasBin sent from Server\"));\n\t\tstateChanged();\n\t}", "@Override\r\n public void run() {\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }", "@Override\n public void run() {\n AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();\n frameAnimation.start();\n }", "public void act() \r\n {\r\n move();\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationEnd(Animator arg0) {\n\t\t\t\t\t\t\t\tLog.v(\"Main activity\",\"animation ended\");\n\t\t\t\t\t\t\t\tisLeft=!isLeft;\n\t\t\t\t\t\t\t}", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "@Override\n protected void animStart() {\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_b);\n TampilGambar.startAnimation(animScale);\n suaraB.start();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tVariable animateVar = Variable\r\n\t\t\t\t\t\t.getVariable(Grapher2DConstants.Grapher2DAnimateFlag);\r\n\t\t\t\tValue oldAnimateValue = animateVar.evaluate();\r\n\t\t\t\tanimateVar.set(new BooleanValue(false));\r\n\r\n\t\t\t\t// save the script\r\n\t\t\t\tActionScriptSaveUtilities.promptUserToSaveScript();\r\n\r\n\t\t\t\t// restart animation if it was on before\r\n\t\t\t\tanimateVar.set(oldAnimateValue);\r\n\t\t\t}", "@Override\n public void run() {\n MaterialAnimator.animate(Transition.ZOOMOUT, btnFAB, 1000);\n btnFAB.setVisibility(Style.Visibility.HIDDEN);\n btnFAB.setOpacity(0);\n\n // Setting the visibility of the music panel\n musicPanel.setVisibility(Style.Visibility.VISIBLE);\n musicPanel.setOpacity(1);\n\n // Setting the music label with Bounce up animation\n lblMusic.setText(\"Pharell Williams / Love Yourself to Dance\");\n MaterialAnimator.animate(Transition.BOUNCEINUP, lblMusic, 1000);\n\n // Setting the image of the artist\n imgMusic.setUrl(\"http://thatgrapejuice.net/wp-content/uploads/2013/08/pharrell-williams-that-grape-juice.png\");\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n espacio esp=(espacio)getWorld();\r\n Actor act=getOneIntersectingObject(nave.class);//Cuando la nave tome el poder \r\n if(act!=null)\r\n {\r\n for(int i=1;i<=10;i++)//incrementa el poder mediante el metodo solo 1s disparos\r\n esp.poder.incrementar();\r\n getWorld().removeObject(this);\r\n Greenfoot.playSound(\"Poder.wav\");\r\n }\r\n \r\n }", "@Override\n public void act() {\n }", "public void render(SpriteBatch sb) {\n stateTime += Gdx.graphics.getDeltaTime();\n // Get current frame of animation for the current stateTime\n TextureRegion tr;\n if (isMovingLeft) tr = model.animations.get(\"left\").getKeyFrame(stateTime, true);\n else if (isMovingRight) tr = model.animations.get(\"right\").getKeyFrame(stateTime, true);\n else if (isMovingUp) tr = model.animations.get(\"up\").getKeyFrame(stateTime, true);\n else if (isMovingDown) tr = model.animations.get(\"down\").getKeyFrame(stateTime, true);\n else tr = model.animations.get(direction.name().toLowerCase()).getKeyFrame(2);\n sb.draw(tr, x, y, width, height);\n }", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "public void actionPerformed(ActionEvent ae){\n\t\ttarget.moveCameraBRU(target.getVVec().normalize(0.2f));\r\n\t\t// set V vec to 1.0 length\r\n\t\ttarget.getVVec().normalize(1.0f);\r\n\t}", "public static String _butpaso1_click() throws Exception{\nif (mostCurrent._imgmosquito.getVisible()==anywheresoftware.b4a.keywords.Common.True) { \n //BA.debugLineNum = 134;BA.debugLine=\"lblPaso4.Visible = False\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 135;BA.debugLine=\"TimerAnimacion.Initialize(\\\"TimerAnimacion\\\", 10)\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.Initialize(processBA,\"TimerAnimacion\",(long) (10));\n //BA.debugLineNum = 136;BA.debugLine=\"TimerAnimacion.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n }else {\n //BA.debugLineNum = 138;BA.debugLine=\"imgMosquito1.Left = -60dip\";\nmostCurrent._imgmosquito1.setLeft((int) (-anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (60))));\n //BA.debugLineNum = 139;BA.debugLine=\"imgMosquito1.Top = 50dip\";\nmostCurrent._imgmosquito1.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 140;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 141;BA.debugLine=\"TimerAnimacionEntrada.Initialize(\\\"TimerAnimacion\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.Initialize(processBA,\"TimerAnimacion_Entrada\",(long) (10));\n //BA.debugLineNum = 142;BA.debugLine=\"TimerAnimacionEntrada.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n };\n //BA.debugLineNum = 149;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\r\n protected boolean hasAnimation() {\r\n return true;\r\n }", "public void checkanimation(){ \n if(super.movecheck(flag) == 1)\n animationup();\n if( super.movecheck(flag)== 2)\n animationdown();\n if(super.movecheck(flag) == 3)\n animationleft();\n if(super.movecheck(flag)== 4)\n animationright(); \n }", "@Override\n\tpublic boolean performsBlockAnimation() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic final void beginAction() {\r\n\t\tframesPassed = 0;\r\n\t\trecentFrame = -1;\r\n\t\ttarget = getEntity().getAttackTarget();\r\n\t\tMinecraftForge.EVENT_BUS.post(new ActionSelectionEvent(this, getEntity()));\r\n\t\tresetAction();\r\n\t\tinitializeExecutionRandomness();\r\n\t\tbeginExecution();\r\n\t}", "public void act() \n {\n movement();\n }", "public abstract void animationReelFinished();", "@Override\n public void render(float delta) {\n // Faire clignoter le texte\n if (frame_count == 0) {\n sign = 1;\n } else if (frame_count == 60) {\n sign = -1;\n }\n frame_count += sign;\n layout.setText(font, \"Appuyez sur une touche pour commencer !\", new Color(1f, 1f, 1f, frame_count / 60f), layout.width, 0, false);\n\n batch.begin();\n // J'affiche le background\n batch.draw(background, 0, 0, background_width, background_height);\n //batch.end();\n\n // J'affiche soit le texte d'accueil, soit les boutons\n if (!triggered) {\n // J'affiche le texte centré\n font.draw(batch, layout, background_width * 0.5f - layout.width * 0.5f, 100);\n batch.end();\n }\n else {\n batch.end();\n // J'affiche la table de boutons\n //stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));\n stage.draw();\n\n }\n\n }", "@Override\n public void ejecutarFrame() {\n //INICIAMOS EL HILO\n try{\n Thread.sleep(250);\n }\n catch (InterruptedException ie){\n ie.printStackTrace();\n }\n\n //VAMOS CAMBIANDO EL COLOR DE LAS LETRAS DE LA PANTALLA DE INICIO\n colorLetra = colorLetra == Color.WHITE ? Color.LIGHT_GRAY : Color.WHITE;\n }", "@Override\r\n public void checkIfInFrame(Hero hero) {\r\n\r\n }", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public void blueTapped(View view){\n ImageView blue = (ImageView)findViewById(R.id.bluebulb);\n\n ImageView green = (ImageView)findViewById(R.id.greenbulb);\n //the above two lines is nothing but the visibility of image\n\n\n /* animation is avialble in blue . animate property, and i can set the alpha to zero, and i can set the duration\n that it should go from 1 to 0, here 1000 means 1 second\n\n */\n blue.animate().alpha(1).setDuration(1000);//alpha of blue should be one becuase blue is tapped\n green.animate().alpha(0).setDuration(1000);//alpha of green should be zero becuase blue is tapped\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() instanceof Timer) {\r\n if (animatedPos == canvas.size() - 1)\r\n animatedDir = -1;\r\n if (animatedPos == 0)\r\n animatedDir = 1;\r\n animatedPos += animatedDir;\r\n repaint();\r\n }\r\n }", "@Override\n\tpublic boolean performsAttackAnimation() {\n\t\tif (phase == AbyssalSirePhase.MAGIC_COMBAT && attack == AbyssalSireAttack.POISON) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override//captura todas las acciones de los botones y realiza la funcion de cada uno\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (e.getSource() == btnNuevaSimulacion ) {\n\t\t\t\tnuevaSimulacion();\n\t\t\t}else if(e.getSource()==btnComenzarSimulacion) {\n\t\t\t\tif(bandera ==false) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Establesca una rafaga de tiempo primero\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttiempo = Integer.parseInt(textRafaga.getText());\n\t\t\t\t\t\tif(tiempo<1||tiempo>10) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese un numero del 1 al 10\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tiniciaSimulacion();\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(Exception e2) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese un numero valido del 1 al 10\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(e.getSource()==btnEstablecerRafaga) {\n\t\t\t\tif(textRafaga.getText().isEmpty()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Establezca una rafaga de tiempo primero\");\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbandera = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }", "public void act() \n {\n CreatureWorld playerWorld = (CreatureWorld)getWorld();\n\n if( getHealthBar().getCurrent() <= 0 )\n {\n getWorld().showText(\"Charmander has fainted...\", getWorld().getWidth()/2, getWorld().getHeight()/2 + 26);\n Greenfoot.delay(30);\n }\n }", "public void act()\n {\n trackTime();\n showScore();\n \n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tnew Thread(new Runnable() {\r\n\t\t @Override\r\n\t\t\tpublic void run() {\r\n\t\t \tEmdeonBotFrame frame = new EmdeonBotFrame();\r\n\t\t }\r\n\t\t}).start();\r\n\t}" ]
[ "0.67298114", "0.6455255", "0.6200533", "0.61625886", "0.6135658", "0.6075414", "0.6058034", "0.6032862", "0.60009617", "0.5950013", "0.59374285", "0.5899711", "0.58688444", "0.58639354", "0.58617854", "0.5857713", "0.58244514", "0.5798448", "0.5776824", "0.57632047", "0.5759145", "0.5722614", "0.5689214", "0.5673398", "0.5664273", "0.5659058", "0.56441367", "0.5616454", "0.56073076", "0.56071526", "0.55900055", "0.55900055", "0.55766726", "0.5566941", "0.55562437", "0.55550176", "0.55303067", "0.5526522", "0.5525073", "0.5524061", "0.5513866", "0.55046487", "0.5500706", "0.54948205", "0.5491755", "0.54871", "0.5465268", "0.5465134", "0.54592013", "0.5440032", "0.5427425", "0.54273146", "0.541262", "0.54093295", "0.54076374", "0.5406922", "0.53957754", "0.538012", "0.53639376", "0.53638595", "0.5360901", "0.5355249", "0.534608", "0.53430337", "0.53345996", "0.53335124", "0.5331322", "0.5327255", "0.5317969", "0.5315336", "0.53103876", "0.5303852", "0.52983916", "0.5296085", "0.52908087", "0.5280065", "0.5277176", "0.5274898", "0.527463", "0.52745295", "0.5271984", "0.5265338", "0.52572614", "0.5254375", "0.5248895", "0.5246589", "0.5244949", "0.5242287", "0.5236486", "0.52344745", "0.5233814", "0.5227579", "0.5220726", "0.5219436", "0.5216744", "0.52165323", "0.5207995", "0.52067477", "0.5204861", "0.5203796" ]
0.6812469
0
Este metodo decodifica la direccion, para hacer la animacion respectiva
public void checkanimation(){ if(super.movecheck(flag) == 1) animationup(); if( super.movecheck(flag)== 2) animationdown(); if(super.movecheck(flag) == 3) animationleft(); if(super.movecheck(flag)== 4) animationright(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }", "@Override\n protected void animStart() {\n }", "private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }", "private void setFramePath()\n\t{\n\t\tcurrFramePath = location + \"/\" + currentSet + \"/\" + \"frame\"\n\t\t\t\t+ Integer.toString(currFrame) + \".png\";\n\t}", "public void cambiarDirec(int dir)\r\n\t{\r\n\t\t\tgrafico.setIcon(sprites.elementAt(dir).elementAt(0));\r\n\t}", "private void inicializarAnimaciones(Array<String> rutaAnimaciones) {\n\n aspectoBasico = new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(0))));\n\n for (int i = 1; i < 6; i++) {\n if (rutaAnimaciones.get(i).contains(\"D\"))\n texturasDerecha.add(new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(i)))));\n else\n texturasIzquierda.add(new Sprite(new Texture(Gdx.files.internal(rutaAnimaciones.get(i)))));\n }\n\n animacionDerecha = new Animation(0.75f, texturasDerecha);\n animacionIzquierda = new Animation(0.75f, texturasIzquierda);\n }", "public abstract String direcao();", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "public void playWinAnimation()\n {\n // MAKE A NEW PATH\n ArrayList<Integer> winPath = new ArrayList();\n \n // THIS HAS THE APPROXIMATE PATH NODES, WHICH WE'LL SLIGHTLY\n // RANDOMIZE FOR EACH TILE FOLLOWING THE PATH.\n winPath.add(getGameWidth() - 8*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 8*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n // START THE ANIMATION FOR ALL THE TILES\n for (int i = 0; i < stackTiles.size(); i++)\n {\n // GET EACH TILE\n MahjongSolitaireTile tile = stackTiles.get(i);\n \n // MAKE SURE IT'S MOVED EACH FRAME\n movingTiles.add(tile); \n \n // AND GET IT ON A PATH\n tile.initWinPath(winPath);\n }\n }", "private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }", "public abstract String getPath();", "public abstract String getPath();", "public void compDire(String pathDire) throws Exception;", "public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public void hacerAnimaciones(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case 'º':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[5][b];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n\n\n }", "@Override\n public void animate() {\n }", "public MenuDestinosOriente() {\n initComponents();\n setLocationRelativeTo(null);\n this.setExtendedState(MAXIMIZED_BOTH);\n String master = System.getProperty(\"user.dir\") + \"/src/imgpoe/menu.png\";\n System.out.println(\"master\" + master);\n this.setContentPane(new JLabel(new ImageIcon(master)));//añade una\n }", "public Animale getAnimaleACaso(){\n\t\tthrow new NotImplementedException();\r\n\t}", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Test\n\tpublic void animationTest() {\n\t\t\n\t\tMap<Direction, TimeAnimation> animationMap = Player.makePlayerAnimation(PlayerType.CAVEMAN.name(), \n\t\t\t\tPlayerState.IDLE, 1, 1, null);\n\t\t\n\t\t// Test setting idle animation to north\n\t\tarcher.setAnimation(animationMap.get(Direction.N));\n\t\t\n\t\t// Test setting idle animation to south\n\t\tarcher.setAnimation(animationMap.get(Direction.S));\n\t\t\t\t\n\t\t// Test setting idle animation to south west\n\t\tarcher.setAnimation(animationMap.get(Direction.SW));\n\t}", "private void setInitialAnim()\n {\n \n \n if(level.playerFacing == Direction.LEFT)\n {\t\n \tcurrentAnim = leftWalk;\n }\n else\n {\n \tcurrentAnim = rightWalk;\n }\n \n Image i = currentAnim.getCurrentFrame();\n width = i.getWidth();\n height = i.getHeight();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "public String getPath();", "public String getPath();", "public String getPath();", "protected abstract void animate(int anim);", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "private void animateDrawer(){\n int[] location = new int[2];\n int leftDelta;\n pageFontEl.getLocationOnScreen(location);\n if(switchState == \"off\"){\n leftDelta = 0;\n switchState = \"on\";\n } else{\n leftDelta = common.dip2px(HomeActivity.this, 130);\n switchState = \"off\";\n }\n pageFontEl.layout(leftDelta, 0, leftDelta + pageFontEl.getWidth(), 0 + pageFontEl.getHeight());\n }", "public Path getPath(String path,String nombreArchivo);", "Animation getStructure();", "public Animation get_anim(String anim_name) {\n\n\t\tArrayList<Integer> dur_list;\n\t\tArrayList<Image> image_list;\n\t\tswitch (anim_name) {\n\t\tcase \"fly\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"f1\"));\n\t\t\timage_list.add(get_image(\"f2\"));\n\t\t\timage_list.add(get_image(\"f3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tbreak;\n\t\tcase \"grub_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gr1\"));\n\t\t\timage_list.add(get_image(\"gr2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"grub_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gl1\"));\n\t\t\timage_list.add(get_image(\"gl2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"mario_run_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"ml1\"));\n\t\t\timage_list.add(get_image(\"ml2\"));\n\t\t\timage_list.add(get_image(\"ml3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_run_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mr1\"));\n\t\t\timage_list.add(get_image(\"mr2\"));\n\t\t\timage_list.add(get_image(\"mr3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mls\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mrs\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(anim_name));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t}\n\t\treturn new Animation(image_list, dur_list);\n\t}", "public void animationTrans() {\n float unitAngle;\n if (type == CIRCLE) {\n unitAngle = (float) 360 / defaultCount;\n } else {\n unitAngle = 45f;\n }\n final float oldAngle = mAngle;\n float nAngle = mAngle % actualAngle;\n float gapAngle = (float) (nAngle / unitAngle) - (int) (nAngle / unitAngle);\n\n final float willAngle;\n if (type == CIRCLE) {\n willAngle = (float) ((0.5 - gapAngle) * unitAngle);\n } else {\n if (gapAngle < 0.5) {\n willAngle = (float) ((0 - gapAngle) * unitAngle);\n } else {\n willAngle = (float) ((1 - gapAngle) * unitAngle);\n }\n }\n Animation a = new Animation() {\n\n @Override\n protected void applyTransformation(float interpolatedTime, Transformation t) {\n\n mAngle = oldAngle + willAngle * interpolatedTime;\n\n requestLayout();\n }\n\n @Override\n public boolean willChangeBounds() {\n return true;\n }\n };\n\n a.setDuration(200);\n startAnimation(a);\n }", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "public void setPathOrigin(int x, int y);", "@Override\n public void onAnimationStart(Animation arg0) {\n \n }", "private void movimientoGrafico(int direccion, int mov){\r\n\t\tfor(Icon i:sprites.elementAt(direccion)){\r\n\t\t\tswitch(direccion){\r\n\t\t\tcase 0:\r\n\t\t\t\tpos.setLocation(pos.getX()-mov,pos.getY());\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tpos.setLocation(pos.getX(), pos.getY()-mov);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tpos.setLocation(pos.getX()+mov,pos.getY());\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tpos.setLocation(pos.getX(),pos.getY()+mov);\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t \t\tgrafico.setIcon(i);\r\n\t\t \t\tgrafico.setBounds(pos.x ,pos.y,ancho,alto);\r\n\t\t \t\ttry {\r\n\t\t\t\t\tThread.sleep(velocidad/(sprites.elementAt(direccion).size()*2));\r\n\t\t\t\t} catch (InterruptedException 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}\r\n\t}", "@Override\n protected void animStop() {\n }", "public JuegoDragon() {\r\n//\t\tfile = new File(arg0)\r\n\t\tjugadorActual = new Jugador(\"Felipe\", 0);\r\n\t\tjugadorRaiz = null;\r\n\t\tprimerDragon = null;\r\n\t\tultimoDragon = null;\r\n\t\traizPodio = null;\r\n\t\tdatos = new ArrayList<Jugador>();\r\n\t\tnumDragones = 0;\r\n\t\tnivel = 0;\r\n\t\tfondo = \"img/fondo_P.gif\";\r\n\t\tcargarDatos();\r\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "public void paintComponent(Graphics g)\n{\n \n int X1,Y1,X2,Y2,X3,Y3,X4,Y4;\n\n int peso=1; // fattore di moltiplicazione per la dimensione delle aule\n int d; // distanza del bordo interno al rettangolo\n int dx; // distanza dal bordo asse x\n int dy; // distanza dal bordo asse y\n Color myColor;\n String strPiano;\n \n super.paintComponent(g);\n \n System.out.println(\"--------------------------\");\n System.out.println(\"AulaPanel: Entro in paintCompoment() \");\n \n /* \n *** disegna l'immagine di background con la planimetria dell'aula scelta\n */\n String strFilePlan = \"plan/\" + this.myAula.getNome()+ \".jpg\";\n System.out.println(\"leggo il file \"+ strFilePlan);\n \n //ClassLoader classloader = Thread.currentThread().getContextClassLoader();\n // ClassLoader classloader = Thread.currentThread().getContextClassLoader(); \n \n // File filePlan = new File (classloader.getResource(strFilePlan).getFile()); \n ClassLoader classloader = Thread.currentThread().getContextClassLoader(); \n \n InputStream filePlan = classloader.getResourceAsStream(strFilePlan);\n \n // File filePlan = new File (getClass().getClassLoader().getResource (strFilePlan).getFile()); \n \n // File filePlan = new File(strFilePlan);\n \n System.out.println(\"leggo il file della planimetria \"+ strFilePlan);\n \n \n /* \n *** disegna l'immagine di background con la immagine dell'aula scelta\n */\n String strFileImg = \"img/\" + this.myAula.getNome()+ \".jpg\";\n System.out.println(\"leggo il file \"+ strFileImg);\n \n\n // File fileImg = new File (getClass().getClassLoader().getResource (strFileImg).getFile());\n // File fileImg = new File (classloader.getResource(strFileImg).getFile()); \n InputStream fileImg = classloader.getResourceAsStream(strFileImg);\n \n // File fileImg = new File(strFileImg);\n \n System.out.println(\"leggo il file della immagine \"+ strFileImg);\n \n /* \n *** disegna l'immagine di background con la immagine dell'aula scelta\n */\n String strFileDati = \"dati/\" + this.myAula.getNome()+ \".jpg\";\n System.out.println(\"leggo il file \"+ strFileDati);\n \n // File fileDati = new File (classloader.getResource(strFileDati).getFile()); \n \n // File fileDati = new File (getClass().getClassLoader().getResource (strFileDati).getFile());\n \n // File fileDati = new File(strFileDati);\n \n InputStream fileDati = classloader.getResourceAsStream(strFileDati);\n \n System.out.println(\"leggo il file dati \"+ strFileDati);\n \n try\n { \n imgPlan=ImageIO.read(filePlan); \n imgImg=ImageIO.read(fileImg);\n imgDati=ImageIO.read(fileDati);\n \n int imgWPlan = imgPlan.getWidth(this);\n int imgHPlan = imgPlan .getHeight(this);\n \n int imgWImg = imgImg.getWidth(this);\n int imgHImg = imgImg.getHeight(this);\n \n int imgWDati = imgDati.getWidth(this);\n int imgHDati = imgDati.getHeight(this);\n \n System.out.println(\"image Plan Width= \"+ imgWPlan + \" Heigth=\"+imgHPlan);\n System.out.println(\"image Img Width= \"+ imgWImg + \" Heigth=\"+imgHImg);\n System.out.println(\"image Dati Width= \"+ imgWDati + \" Heigth=\"+imgHDati);\n \n this.setLayout(new BorderLayout());\n \n // g.drawImage(img, x, y, width, heigth, this); \n g.drawImage(imgPlan, 100, 0, 300, 300, this); \n g.drawImage(imgImg, 500, 0, 300, 300, this); \n g.drawImage(imgDati, 500, 400, 300, 300, this); \n System.out.println(\"dopo draw image\");\n }\n catch(IOException e)\n {\n imgPlan = null;\n imgImg = null;\n System.out.println(\"exception image\");\n }\n\n// disegna e colora l'aula indicata con i dati sonori\n \n g.setColor(Color.black); \n \n Polygon po = new Polygon();\n Polygon pc = new Polygon();\n \n dx = 200;\n dy = 200;\n int x1 = 100;\n int y1 = 400;\n \n X1 = x1;\n Y1 = y1;\n X2 = x1 + dx;\n Y2 = Y1;\n X3 = X2;\n Y3 = Y1+dy;\n X4 = X1;\n Y4 = Y3;\n \n po.addPoint(X1, Y1);\n po.addPoint(X2, Y2);\n po.addPoint(X3, Y3);\n po.addPoint(X4, Y4);\n \n // scrive il nome dell'aula\n g.setColor(Color.black);\n g.drawString(\"Aula:\"+this.myAula.getNome(),X1,Y1-5);\n String sPiano = \"piano:\" + Integer.valueOf(this.myAula.getPiano());\n g.drawString(sPiano,X1+150,Y1-5);\n \n// disegna il rettangolo esterno \n\n /* \n *** settaggio colore in base al tempo di riverbero\n */\n myColor = this.myAula.getColoreTr();\n g.setColor(myColor);\n g.fillPolygon(po);\n \n // disegna il rettangolo centrale \n \n d= (X2-X1) * 20 /100; // bordo interno del 20% \n \n if (X1 == X4) // aula dritta \n { \n pc.addPoint(X1+d, Y1+d);\n pc.addPoint(X2-d, Y2+d);\n pc.addPoint(X3-d, Y3-d);\n pc.addPoint(X4+d, Y4-d);\n }\n else // aula storta\n { \n pc.addPoint(X1+d/4, Y1+d+d/3);\n pc.addPoint(X2-d, Y2+d/2);\n pc.addPoint(X3, Y3-d);\n pc.addPoint(X4+d, Y4-d/2);\n }\n \n /* \n *** settaggio colore in base ai decibel\n */ \n myColor = this.myAula.getColoreDb();\n \n g.setColor(myColor);\n g.fillPolygon(pc);\n \n // disegna i bordi esterni dell'aula\n g.setColor(Color.black);\n g.drawPolygon(po);\n \n // disegna i bordi interni dell'aula\n \n g.setColor(Color.black);\n g.drawPolygon(pc);\n // scrive i dati sui decibel sonori al centro\n g.drawString(\"Decibel:\" + this.myAula.getDb(),X1+40,Y1+40);\n \n // scrive i dati sul tempo di riverbero al bordo\n g.drawString(\"T.Riverbero:\" + this.myAula.getTr(),X1+10,Y1+15); \n \n \n System.out.println(\"Esco da paintCompoment() \"); \n System.out.println(\"--------------------------\");\n }", "String getDir();", "public String getDir();", "protected abstract void animationLogicTemplate();", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "@Test\n public void SVGViewTest1() throws FileNotFoundException {\n AnimatorModel model;\n String filename = \"toh-3.txt\";\n Readable inFile = new FileReader(filename);\n\n AnimationBuilder<AnimatorModel> builder =\n new AnimationBuilderImpl();\n\n model = AnimationReader.parseFile(inFile, builder);\n SVGView view = new SVGView(model, filename, 1);\n assertEquals(\"<svg width=\\\"410\\\" height=\\\"220\\\" viewBox=\\\"145 50 555 270\\\" \"\n + \"version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"disk1\\\" x=\\\"190\\\" y=\\\"180\\\" width=\\\"20\\\" height=\\\"30\\\" fill=\\\"\"\n + \"rgb(0,49,90)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"x\\\" \"\n + \"from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"y\\\" \"\n + \"from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"249000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0,49,90)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk2\\\" x=\\\"167\\\" y=\\\"210\\\" width=\\\"65\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(6,247,41)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"217000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(6,247,41)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\"\"\n + \" attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk3\\\" x=\\\"145\\\" y=\\\"240\\\" width=\\\"110\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(11,45,175)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"153000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(11,45,175)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\"\"\n + \" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\", view.getViewState());\n }", "Path getPath();", "private void changeDirectory()\n {\n directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory\n\n if (directory != null) //if a valid directory was selected...\n {\n JFrame loading = new JFrame(\"Loading...\");\n Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);\n loading.setIconImage(icon);\n loading.setResizable(false);\n loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n loading.setSize(new Dimension(250,30));\n loading.setLocationRelativeTo(null);\n loading.setVisible(true);\n\n timeline.reset();\n timeline.setSlideDurationVisible(automated);\n timeline.setDefaultSlideDuration(slideInterval);\n\n m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents...\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Images\", spImages);\n \n m_AudioLibrary.resetAudio();\n m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Audio\", spAudio);\n\n loading.dispose();\n }\n }", "FsPath baseDir();", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "protected abstract String getResourcePath();", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t}", "void startAnimation();", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t}", "static void ex4() {\n\t\tSystem.out.println(\"subPath\");\n\t\t/*\n\t\t * this is a path within a path\n\t\t */\n\t\tString parent=\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\";\n\t\tString child=\"src/com/android/Examples.java\";\n\t\tPath fullPath=Paths.get(parent,child);\n\t\tSystem.out.println(fullPath);\n\t\tSystem.out.println(\"is this an absolute path \"+fullPath.isAbsolute());\n\t\t/*C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\n\t\t\\src\\com\\android\\Examples.java\n\t\t*/\n\t\t//this path has 10 elements, 9 folders and one file\n\t\t//the elements use array numbering, so these elements go from 0 to 9\n\t\tSystem.out.println(\"there are \"+fullPath.getNameCount()+\" elements in the path\");\n\t\t/*\n\t\t * subpath returns any relative subpath within the abseloute path\n\t\t * there are 10 elements in this path\n\t\t * so this path goes from index postion 0, up to index positiion 5, but DOES NOT include\n\t\t * index position 5, operates exact same way as the subString() method of the String\n\t\t * this creates the relative path\n\t\t * Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\n\t\t * subpath returns a relative path\n\t\t */\n\t\tSystem.out.println(\"subpath from 0 to 5 but not including 5 \"+fullPath.subpath(0, 5));\n\t\t/*\n\t\t * this starts at index position 3, which is the folder \"JavaProgrammer2019-20\"\n\t\t * and up to index position 7, but not including position 7, which will be the folder \"src\"\n\t\t */\n\t\tPath relPath=fullPath.subpath(3, 7);\n\t\t//prints off\n\t\t/*\n\t\t * JavaProgrammer2019-20\\->index postion 3\n\t\t * WorkSpace2\\ -> index position 4\n\t\t * F9.2InteractingWithPathAndFiles -> index position 5\n\t\t * \\src -> index position 6\n\t\t * index position 7 is NOT included\n\t\t */\n\t\tSystem.out.println(relPath);\n\t\tSystem.out.println(relPath.isAbsolute());//false as it's a relative path\n\t\t/*\n\t\t * this will print\n\t\t * C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\\n\t\t * JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\src\n\t\t */\n\t\tSystem.out.println(relPath.toAbsolutePath());\n\t\ttry {\n\t\t\t/*\n\t\t\t * if you attempt to access an element in a path by subpath that does not exist\n\t\t\t * you will get an IllegalArguementException\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 0 to 10 \"+fullPath.subpath(0, 10));//this wil compile, no exception\n\t\t\t//this will give us an illegalArugmenmt exception as this is out of bounds as only\n\t\t\t//10 elements in our path, so only goes UP TO 10, but numbering is 0 t0 9\n\t\t//\tSystem.out.println(\"subpath from 0 to 11 \"+fullPath.subpath(0, 11));\n\t\t\t/*\n\t\t\t * can't have an empty path or subpath, this is a empty path, so this will throw an\n\t\t\t * IllegalArguement exception as well\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 2 to 2 \"+fullPath.subpath(2, 2));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public Animation get_animation(Boolean enter) {\n if (Settings.get_user_language(this).equals(\"ar\")) {\n if (animation_direction)\n return MoveAnimation.create(MoveAnimation.LEFT, enter, DURATION);\n else\n return MoveAnimation.create(MoveAnimation.RIGHT, enter, DURATION);\n } else {\n if (animation_direction)\n return MoveAnimation.create(MoveAnimation.RIGHT, enter, DURATION);\n else\n return MoveAnimation.create(MoveAnimation.LEFT, enter, DURATION);\n }\n }", "private static void gestorMenu(String ruta) {\t\t\n\t\tFile f = new File (ruta);\n\t\t// establece el directorio padre\n\t\tString base = f.getPath();\n\t\truta = f.getPath();\n\t\t// Presenta por pantalla el menu del programa\n\t\tmostrarMenu();\n\t\t// Inicia el tiempo\n\t\tlong tiempoInicial = System.currentTimeMillis();\n\t\tMenu(ruta, base, tiempoInicial, 0);\n\t}", "java.lang.String getSrcPath();", "public abstract void animationStarted();", "Path getLocation();", "public void Retroceder(){\r\n \r\n anim.jPanelXRight(PanelLibroMayor.getX(),PanelLibroMayor.getX()+920, 1, 5, PanelLibroMayor);\r\n anim.jPanelXRight(PanelLibroDiario.getX(), PanelLibroDiario.getX()+920, 1, 5, PanelLibroDiario);\r\n anim.jPanelXRight(PanelBalanceComprobacion.getX(),PanelBalanceComprobacion.getX()+920, 1, 5, PanelBalanceComprobacion);\r\n anim.jPanelXRight(PanelEstadoResultados.getX(), PanelEstadoResultados.getX()+920, 1, 5, PanelEstadoResultados);\r\n anim.jPanelXRight(PanelBalanceGeneral.getX(),PanelBalanceGeneral.getX()+920, 1, 5, PanelBalanceGeneral);\r\n \r\n }", "public void setPath(Square finish) {\n // TODO\n \tpath = \"Found Nemo!\\n\" + \"Path from start to finish: \";\n \tString extnPAth = \"\";\n \twhile(finish != null) {\n \tSquare realSquare = sea.getSea()[finish.getRow()][finish.getCol()];\n \t\trealSquare.setFinalPath();\n \t\t//Add to stack\n \t\tstack.push(finish);\n \t\tfinish = finish.getPrevious();\n \t}\n \t\n \t//get start and add start\n \twhile(!stack.empty()) {\n \t\tSquare c = stack.pop();\n \t\textnPAth = extnPAth + \"[\" + c.getRow() + \",\" + c.getCol() + \"] \"; \n \t}\n\t\tpath = path + extnPAth;\n }", "public String getPath() {\n if (foundNemo) {\n return path;\n } else {\n path = \"Uh Oh!! Could not find Nemo!!\";\n return path;\n }\n }", "public String getLocationPath();", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "private void formMouseDragged(java.awt.event.MouseEvent evt) {\n if (getParent() != null) {\n //seta a localiza__o do estado enquanto _ arrastado\n int x = (int) getParent().getMousePosition().getX() - getWidth() / 2;\n int y = (int) getParent().getMousePosition().getY() - getHeight() / 2;\n\n //limite direito (x mais do que o painel)\n if (getX() + getWidth() > getParent().getWidth()) {\n x = getParent().getWidth() - getWidth() - 10;\n }\n //limite esquerdo x negativo\n if (getX() < 0) {\n x = 0; \n }\n //limite inferior (y mais do que o painel)\n if (getY() + getHeight() > getParent().getHeight()) {\n y = getParent().getHeight() - getHeight() - 2;\n }\n //limite superior y negativo\n if (getY() < 0) {\n y = 0; \n }\n estado.setXCentral(x);\n estado.setYCentral(y);\n setLocation(x, y);\n\n // coordenadas para desenho das transi__es enquanto ele _ arrastado\n if (isInicial) {\n estado.setXCentral(x + (larguraFlecha / 2) + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n } else {\n estado.setXCentral(x + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n }\n\n\n\n // repinta o container pai, fazendo com as transi__es sejam desenhadas\n getParent().repaint();\n\n }\n }", "private void setupWindowsAnimations() {\n }", "public String getResourcePath();", "void path(String path);", "void path(String path);", "private void loadAnimations() {\n loadImages(imagesFront, \"F\");\n loadImages(imagesLeft, \"L\");\n loadImages(imagesRight, \"R\");\n loadImages(imagesBack, \"B\");\n }", "@Override\r\n\tpublic void atacar(int dir) {\n\t\t\r\n\t}", "public void setAnimation() {\r\n\r\n // start outside the screen and move down until the clock is out of sight\r\n ObjectAnimator moveDown = ObjectAnimator.ofFloat(this, \"y\", -100, screenY + 100);\r\n AnimatorSet animSet = new AnimatorSet();\r\n animSet.play(moveDown);\r\n\r\n // Set duration to 4000 milliseconds\r\n animSet.setDuration(4000);\r\n\r\n animSet.start();\r\n\r\n }", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "@Override\n\tprotected void updateWanderPath() {\n\t}", "private JMenu createAnimationMenu() {\r\n\t\tJMenu animateMenu = new JMenu(\"Animation\");\r\n\t\tanimateMenu.setMnemonic('a');\r\n\t\tJMenuItem animationSettings = new JMenuItem(\"Animation Settings\");\r\n\t\tanimationSettings.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tExpressionConsoleModel.getInstance().enterExpression(\r\n\t\t\t\t\t\t\"edit(\" + Grapher2DConstants.Grapher2DAnimateFlag + \",\"\r\n\t\t\t\t\t\t\t\t+ Grapher2DConstants.TimeIncrement + \")\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t// animationSettings.setVisible(true);\r\n\t\tanimateMenu.add(animationSettings);\r\n\t\treturn animateMenu;\r\n\t}", "@Override\n public void start(Stage primaryStage) {\n \n tabPane = new TabPane();\n tree = new OwnTreeView(tabPane, new OwnTreeItem());\n tabs = new OwnTabs(tree,tabPane);\n areas = new OwnTextAreas(tree,tabPane);\n projects = new Projects();\n file = new OwnFile(areas,tabs,tree,projects);\n areas.setTabs(tabs);\n tabs.setAreas(areas);\n tree.setAreas(areas);\n tree.setTabs(tabs);\n\n //Creo un array de separadores de menuitems\n for (int i = 0; i < separate.length; i++) {\n separate[i] = new SeparatorMenuItem();\n }\n\n Point3D punto = new Point3D(0, 0, 1);\n\n //Panel que contiene todos los demás contenidos\n root = new BorderPane();\n root.autosize();\n root.setMaxHeight(BorderPane.USE_COMPUTED_SIZE);\n root.setMaxWidth(BorderPane.USE_COMPUTED_SIZE);\n root.setMinHeight(BorderPane.USE_COMPUTED_SIZE);\n root.setMinWidth(BorderPane.USE_COMPUTED_SIZE);\n root.setPrefHeight(BorderPane.USE_COMPUTED_SIZE);\n root.setPrefWidth(BorderPane.USE_COMPUTED_SIZE);\n root.setScaleX(1);\n root.setScaleY(1);\n root.setScaleZ(1);\n root.setRotationAxis(punto);\n\n //Barra principal con las pestañas de los menús\n bar = new MenuBar();\n bar.autosize();\n bar.setMaxHeight(MenuBar.USE_COMPUTED_SIZE);\n bar.setMaxWidth(MenuBar.USE_COMPUTED_SIZE);\n bar.setMinHeight(24);\n bar.setMinWidth(MenuBar.USE_COMPUTED_SIZE);\n bar.setPrefHeight(22);\n bar.setPrefWidth(1024);\n bar.setScaleX(1);\n bar.setScaleY(1);\n bar.setScaleZ(1);\n bar.setRotationAxis(punto);\n\n //Menús\n menuFile = new Menu(\"Archivo\");\n\n //MenuItems del menú \"Archivo\"\n open = new MenuItem(\"Abrir Ctrl+O\");\n open.getStyleClass().add(\"menuitem\");\n /**\n * Abre un archivo en un nuevo tab que crea y escribe el texto de dicho\n * archivo en el area correspondiente al tab seleccionado, que es el tab\n * creado. ATAJO : CTRL+0\n */\n open.setOnAction(_openFile = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n\n file.open();\n }\n });\n \n /*\n * Abre un proyecto seleccionado,con todas sus subcarpetas\n * y archivos llamando a la función abrirProyecto(explicada mas abajo)\n */\n openProject = new MenuItem(\"Abrir proyecto\");\n openProject.getStyleClass().add(\"menuitem\");\n openProject.setOnAction(_projectOpen = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n file.openProject();\n }\n });\n /**\n * Guarda un archivo, en el caso de que el archivo haya sido abierto y\n * ya existiese, se guardará en la dirección que le corresponda, en el\n * caso de que no existiese se llamará a la función guardarComo\n * guardandose en la dirección que se le indique. ATAJO : CTRL + S\n */\n save = new MenuItem(\"Guardar Ctrl+S\");\n save.getStyleClass().add(\"menuitem\");\n save.setOnAction(_saveFile = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n file.save();\n }\n });\n\n /**\n * Guarda un archivo en una dirección determinada, ya estuviese o no\n * creado el archivo, al realizar el guardado con otro nombre\n * actualizara el nombre del tab y el nombre que aparezca en el\n * TreeView.\n */\n saveAs = new MenuItem(\"Guardar Como...\");\n saveAs.getStyleClass().add(\"menuitem\");\n saveAs.setOnAction(_asSave = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n file.saveAs();\n }\n });\n\n /**\n * Cierra el programa JavEditor\n */\n close = new MenuItem(\"Cerrar\");\n close.getStyleClass().add(\"menuitem\");\n close.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n System.exit(0);\n }\n });\n\n /**\n * Abre una nueva pestaña para crear un nuevo archivo. ATAJO : CTRL+N\n */\n newTab = new MenuItem(\"Nuevo Archivo Ctrl+N\");\n newTab.getStyleClass().add(\"menuitem\");\n newTab.setOnAction(_tabNew = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n tabs.newTab(_isForOpen);\n }\n });\n \n\n /*\n * Cierra el tab que se encuentra seleccionado. Buscamos el tab seleccionado, y cuando lo encontramos\n * borramos del TreeView el nombre del archivo correspondiente con actualizarArbol, y eliminamos\n * la posición creada para la dirección del archivo, el area y el tab de las listas tabs y areas, \n * a parte de eliminarlo del tabPane ya que al ser un atajo no se realiza por defecto. ATAJO : CTRL+A\n */\n closeFile = new MenuItem(\"Cerrar Archivo Ctrl+T\");\n closeFile.getStyleClass().add(\"menuitem\");\n closeFile.setOnAction(_fileClose = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n String s;\n boolean noestab = false;\n OwnTextArea a = areas.seleccionarArea();\n if(areas.isModificated(a)){\n int n = JOptionPane.showConfirmDialog(null, \"Do you want save the file?\");\n if(n==JOptionPane.CANCEL_OPTION){\n return;\n }else if(n==JOptionPane.YES_OPTION){\n _asSave.handle(null);\n }\n }\n for(int i=0;i<tabs.size();i++){\n if(!tabs.get(i).isSelected()){\n continue;\n }else{\n tree.getItems().getChildren().remove(tabs.get(i).getTreeItem());\n tabPane.getTabs().remove(tabs.get(i));\n areas.remove(a);\n tabs.remove(tabs.get(i));\n break;\n }\n }\n }\n });\n\n /*\n * Cierra todos los tabs abiertos del programa, recorre todos los tabs del tabPane y los va eleminando\n * de la lista uno por uno, ademas, se borran las correspondientes direcciones de archivos guardadas y\n * las areas creadas para los tabs.Además se van borrando los nombres del TreeView\n */\n closeAll = new MenuItem(\"Cerrar Todo Ctrl+Q\");\n closeAll.getStyleClass().add(\"menuitem\");\n closeAll.setOnAction(_allClose = new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n int longitudTabPane = tabPane.getTabs().size();\n for (int i = 0; i < longitudTabPane; i++) {\n OwnTextArea a = areas.seleccionarArea();\n if(areas.isModificated(a)){\n int n = JOptionPane.showConfirmDialog(null, \"Do you want save the file?\");\n if(n==JOptionPane.CANCEL_OPTION){\n return;\n }else if(n==JOptionPane.YES_OPTION){\n _asSave.handle(null);\n }\n }\n if (tree.getItems().getChildren().size() > 0) {\n tree.getItems().getChildren().remove(0);\n }\n tabPane.getTabs().remove(0);\n }\n for (int i = 0; i < tabs.size(); i++) {\n tabs.remove(0);\n areas.remove(0);\n }\n }\n });\n menuFile.getItems().addAll(newTab, separate[0], open, openProject, save, saveAs, separate[1], closeFile, closeAll, separate[2], close);\n menuFile.getStyleClass().add(\"menu\");\n menuEdit = new Menu(\"Edición\");\n\n //Submenús de \"Edición\"\n undo = new MenuItem(\"Deshacer Ctrl+Z\");\n /*\n * Deshace la acción previa hecha\n */\n undo.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.undo();\n }\n });\n\n selectAll = new MenuItem(\"Seleccionar Todo Ctrl+A\");\n\n /*\n * Selecciona todo el texto del area del tab en el que se encuentra en el momento\n */\n selectAll.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.selectAll();\n }\n });\n\n deselect = new MenuItem(\"Deseleccionar\");\n /*\n * Deselecciona lo seleccionado previamente\n */\n deselect.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.deselect();\n }\n });\n\n cut = new MenuItem(\"Cortar Ctrl+X\");\n /*\n * Corta lo seleccionado, elimina de la pantalla lo seleccionado, almacenandolo en la variable seleccion\n * para su posible posterior pegado\n */\n cut.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.cut();\n }\n });\n\n copy = new MenuItem(\"Copiar Ctrl+C\");\n /**\n * Copia lo seleccionado, almacena dicha selección en la variable\n * seleccion para su posible posterior pegado\n */\n copy.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.copy();\n }\n });\n\n paste = new MenuItem(\"Pegar Ctrl+V\");\n /*\n * Añade al texto del area del tab seleccionado lo que se encuentra en la variable selección.\n */\n paste.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.paste(); \n }\n });\n\n delete = new MenuItem(\"Eliminar\");\n /*\n * Elimina lo seleccionado, a diferencia de cortar, este no guarda el texto en ninguna variable.\n */\n delete.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n OwnTextArea a = areas.seleccionarArea();\n a.delete();\n }\n });\n\n menuEdit.getItems().addAll(undo, separate[3], copy, cut, paste, delete, separate[4], selectAll,deselect);\n menuHelp = new Menu(\"Ayuda\");\n\n //Submenús de \"Ayuda\"\n about = new MenuItem(\"Sobre JavEditor\");\n\n /*\n * Abre una nueva ventana donde se da información de JavEditor\n */\n about.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent t) {\n Stage stage = new Stage();\n About sobre = new About();\n sobre.start(stage);\n }\n });\n\n menuHelp.getItems().addAll(about);\n menuPreferences = new Menu(\"Preferencias\");\n\n //SubMenús de \"Preferencias\"\n font = new MenuItem(\"Fuente\");\n menuPreferences.getItems().addAll(font);\n bar.getMenus().addAll(menuFile, menuEdit, menuPreferences, menuHelp);\n\n //TabPane\n \n tabPane.getStyleClass().add(\"tabpane\");\n tabPane.autosize();\n tabPane.setLayoutX(0);\n tabPane.setLayoutY(24);\n tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.ALL_TABS);\n tabPane.setMinHeight(TabPane.USE_COMPUTED_SIZE);\n tabPane.setMinWidth(TabPane.USE_COMPUTED_SIZE);\n tabPane.setPrefHeight(378);\n tabPane.setPrefWidth(600);\n tabPane.setScaleX(1);\n tabPane.setScaleY(1);\n tabPane.setScaleZ(1);\n tabPane.setRotationAxis(punto);\n tabPane.setPrefWidth(1024);\n\n //TreeView\n \n tree.createChilds();\n tree.setPrefHeight(20);\n tree.getStyleClass().add(\"tree-view\");\n \n \n //Si una tecla es pulsada se almacena el codigo en la lista codigoTeclas y si hay mas de 1\n //se realiza la comprobacion de las teclas pulsadas.\n root.setOnKeyPressed(new EventHandler<KeyEvent>() {\n @Override\n public void handle(KeyEvent event) {\n keyCodes.add(event.getCode());\n if (keyCodes.size() > 1) {\n comprobarTeclas();\n }\n }\n });\n //Si alguna tecla se suelta deja de ser pulsada se elimina de la lista\n root.setOnKeyReleased(new EventHandler<KeyEvent>() {\n @Override\n public void handle(KeyEvent event) {\n keyCodes.remove(event.getCode());\n }\n });\n\n //El panel de tabs y la barra de herramientas se añaden al panel root\n root.setLeft(tree);\n root.setTop(bar);\n root.setCenter(tabPane);\n \n \n Scene scene = new Scene(root);\n scene.getStylesheets().add(\"/JavEditor/JavEditor.css\");\n Image imagen = new Image(\"JavEditor/Images/Icono.gif\", 10, 10, false, false);\n primaryStage.getIcons().add(imagen);\n primaryStage.setTitle(\"JavEditor\");\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "public abstract void nextAnimationStep();", "private Animation inFromRightAnimation(){\r\n\t\tAnimation inFromRight = new TranslateAnimation(\r\n\t\tAnimation.RELATIVE_TO_PARENT, +1.0f,\r\n\t\tAnimation.RELATIVE_TO_PARENT, 0.0f,\r\n\t\tAnimation.RELATIVE_TO_PARENT, 0.0f,\r\n\t\tAnimation.RELATIVE_TO_PARENT, 0.0f);\r\n\t\tinFromRight.setDuration(350);\r\n\t\tinFromRight.setInterpolator(new AccelerateInterpolator());\r\n\t\treturn inFromRight;\r\n\t}", "public String pathToSave() {\n String path;\n File folder;\n do {\n System.out.print(\"Introduce la ruta en la que quieres guardar el fichero(separando directorios por guiones: directorio1-directorio2-directorio3): \");\n path = Utils.getString();\n path = String.valueOf(System.getProperty(\"user.dir\")).substring(0, 2) + \"\\\\\" + path.replace('-', '\\\\');\n folder = new File(path);\n if (!folder.exists()) {\n System.out.println(\"El directorio introducido no existe intentalo de nuevo...\");\n } else {\n if (!folder.isDirectory()) {\n System.out.println(\"Eso no es un directorio intentalo de nuevo...\");\n }\n }\n } while (!folder.exists() && !folder.isDirectory());\n return path;\n }", "Animation getShowAnimation();", "@Test\n public void testFromFile() throws IOException {\n Readable in = new FileReader(\"smalldemo.txt\");\n AnimationModel am = AnimationReader.parseFile(in, new Builder());\n StringBuilder sb = new StringBuilder();\n am.startAnimation();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"200 70 360 360\\\" version=\\\"1.1\\\" \"\n + \"xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"R\\\" x=\\\"200.00\\\" y=\\\"200.00\\\" width=\\\"50.00\\\" height=\\\"100.00\\\" fill=\\\"\"\n + \"rgb(255,0,0)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"500.0ms\\\" attributeName=\\\"\"\n + \"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" /><animate \"\n + \"attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"20000.0ms\\\" attributeName=\\\"x\\\" \"\n + \"from=\\\"200\\\" to=\\\"300\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"20000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"200\\\" to=\\\"300\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25500.0ms\\\" dur=\\\"9500.0ms\\\" \"\n + \"attributeName=\\\"width\\\" from=\\\"50\\\" to=\\\"25\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"15000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"300\\\" to=\\\"200\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"15000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"300\\\" to=\\\"200\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<ellipse id=\\\"C\\\" cx=\\\"500.00\\\" cy=\\\"100.00\\\" rx=\\\"60.00\\\" ry=\\\"30.00\\\" \"\n + \"fill=\\\"rgb(0,0,255)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"3000.0ms\\\" attributeName=\\\"\"\n + \"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" /><animate \"\n + \"attributeType=\\\"xml\\\" begin=\\\"10000.0ms\\\" dur=\\\"15000.0ms\\\" attributeName=\\\"cy\\\" \"\n + \"from=\\\"100\\\" to=\\\"280\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"cy\\\" from=\\\"280\\\" to=\\\"400\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0, 0, 255)\\\" to=\\\"rgb(0, 170, 85)\\\" \"\n + \"fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"5000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0, 170, 85)\\\" to=\\\"rgb(0, 255, 0)\\\" \"\n + \"fill=\\\"freeze\\\" />\\n\"\n + \"</ellipse>\\n\"\n + \"</svg>\", sb.toString());\n }", "private Animation<TextureRegion> createWalkingAnimation(MyCumulusGame game) {\n Texture walkingTexture = game.getAssetManager().get(\"bird.png\");\n TextureRegion[][] walkingRegion = TextureRegion.split(walkingTexture, walkingTexture.getWidth() / 3, walkingTexture.getHeight()/3);\n\n TextureRegion[] frames = new TextureRegion[2]; //todo change to accomodate any color of bird\n System.arraycopy(walkingRegion[0], 0, frames, 0, 2);\n\n return new Animation<TextureRegion>(FRAME_TIME, frames);\n }", "public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}", "public folderize() {\n }", "private synchronized Directory getDirectoryEmDisco() throws IOException{\r\n\t\tif(diretorioEmDisco == null){\r\n\t\t\tdiretorioEmDisco = FSDirectory.open(pastaDoIndice);\r\n\t\t}\r\n\t\t\r\n\t\treturn diretorioEmDisco;\r\n\t}", "public void setDireccionActual( double dir ) {\n\t\tif (dir > 360) dir = dir - 360;\r\n\t\t\tmiDireccionActual = dir;\r\n\t}", "public void playerAnimation(){\r\n \r\n switch (gif) {\r\n case 5:\r\n j= new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_1.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n ;\r\n break;\r\n case 15:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_2.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n break;\r\n case 20:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_3.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 35:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_4.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 45:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_5.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 55:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_6.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 65:\r\n // j= new ImageIcon(\"D:\\\\Netbeans\\\\Projects\\\\ProjectZ\\\\src\\\\shi_1.png\");\r\n // img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n // \r\n gif = 0;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }", "private Animation inFromRightAnimation() {\n\n Animation inFromRight = new TranslateAnimation(\n Animation.RELATIVE_TO_PARENT, +1.0f,\n Animation.RELATIVE_TO_PARENT, 0.0f,\n Animation.RELATIVE_TO_PARENT, 0.0f,\n Animation.RELATIVE_TO_PARENT, 0.0f );\n\n inFromRight.setDuration(200);\n inFromRight.setInterpolator(new AccelerateInterpolator());\n\n return inFromRight;\n\n }" ]
[ "0.5879184", "0.5836818", "0.5830699", "0.5794908", "0.57307714", "0.56934077", "0.56787485", "0.56160206", "0.54893345", "0.54890037", "0.5483786", "0.5483786", "0.5483168", "0.5442136", "0.5430623", "0.5430623", "0.5430623", "0.5430623", "0.5430623", "0.5427482", "0.5422257", "0.53605103", "0.53575164", "0.53445095", "0.53445095", "0.53445095", "0.53445095", "0.5333614", "0.5332144", "0.53215295", "0.53215295", "0.5298575", "0.5298575", "0.5298575", "0.5298353", "0.5280534", "0.5280534", "0.5275233", "0.52732325", "0.5260961", "0.52544", "0.52493554", "0.5220305", "0.52054554", "0.5203624", "0.5194907", "0.51943874", "0.5188379", "0.518287", "0.518287", "0.51474476", "0.5145835", "0.51410747", "0.5138156", "0.5135277", "0.5126433", "0.5120811", "0.5120665", "0.5115159", "0.5111044", "0.51104575", "0.5107254", "0.5107123", "0.5102209", "0.5098117", "0.5082061", "0.5076926", "0.50762177", "0.50689197", "0.5061353", "0.50549257", "0.5053201", "0.5045625", "0.5037471", "0.503741", "0.50332576", "0.50332576", "0.50235724", "0.5021838", "0.5021356", "0.50138", "0.50138", "0.50129986", "0.5004598", "0.50039345", "0.49966878", "0.4993847", "0.49915117", "0.49913928", "0.498754", "0.49862865", "0.4985391", "0.49836823", "0.49820387", "0.49808702", "0.4980692", "0.4980365", "0.4977779", "0.49772424", "0.49732158", "0.4971843" ]
0.0
-1
Imagen que restaura el enemigo
public void restaura(){ super.restauraE(); setImage("FrtEA1.png"); check = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "public String getImagen() {\n return imagen;\n }", "public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }", "private void ObtenerImagenUsuario(String nombre)\n {\n // Realizamos la obtención de la imagen\n ImageLoader.getInstance().loadImage(Helpers.URLImagenes(\"Usuarios/\" + nombre + \".jpg\"), new SimpleImageLoadingListener() {\n @Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n super.onLoadingComplete(imageUri, view, loadedImage);\n\n try {\n // Procesamos los bytes de la imagen recibida\n Bitmap imagen = loadedImage;\n\n try {\n // Guardamos la imagen\n FileOutputStream fOut = new FileOutputStream(Helpers.ImagenFotoPerfil(getActivity()));\n imagen.compress(Bitmap.CompressFormat.JPEG, 100, fOut);\n fOut.flush();\n fOut.close();\n } catch (IOException ioe) {\n }\n }\n catch (Exception ex) { }\n\n // Limpiamos la opción de espera\n m_Espera.dismiss();\n\n // Si tenemos el Google Play Services\n if (GCMRegistrar.checkPlayServices(getActivity()))\n // Registramos el ID del Google Cloud Messaging\n GCMRegistrar.registrarGCM(getActivity());\n\n // Cargamos los ofertas\n Helpers.LoadFragment(getActivity(), new Ofertas(), \"Ofertas\");\n }\n\n @Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n super.onLoadingFailed(imageUri, view, failReason);\n\n // Limpiamos la opción de espera\n m_Espera.dismiss();\n\n // Si tenemos el Google Play Services\n if (GCMRegistrar.checkPlayServices(getActivity()))\n // Registramos el ID del Google Cloud Messaging\n GCMRegistrar.registrarGCM(getActivity());\n\n // Cargamos los ofertas\n Helpers.LoadFragment(getActivity(), new Ofertas(), \"Ofertas\");\n }\n });\n }", "String getImage();", "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "java.lang.String getImage();", "public String obtenerContenidoImg() {\r\n Element elemento = doc.select(\"IMG\").first();\r\n //obtine lo siguiente a \"src\"\r\n String imagen = elemento.attr(\"src\");\r\n return imagen;\r\n }", "public Image meurt() {\n\t\t\tString str;//va contenir le nom de l'image\n\t\t\tImageIcon ico;//nom de la nouvelle instance de la methode ImageIcon\n\t\t\tImage img;//va etre egale a ico, et va retourner l'image voulu\n\t\t\t\n\t\t\tstr = \"/images/bouleDeFeu.png\";\n\t\t\tthis.compteurMort++;//on incremente un compteur\n\t\t\tif(this.compteurMort > 100) {//si le compteur arrive jusqu'a 100, mario meurt, \n\t\t\t\tstr = \"/images/mortDEMario.png\";//donc on change d'image\n\t\t\t\tthis.setY(this.getY() - 1);//fait monter l'image de la mort de mario vers le ciel\n\t\t\t}\n\t\t\tico = new ImageIcon(getClass().getResource(str));\n\t\t\timg = ico.getImage();\n\t\t\treturn img;\n\t\t}", "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == CODIGO_DE_SOLICITUD_IMAGEN\n && resultCode == RESULT_OK\n && data!=null\n && data.getData() != null){\n\n RutaArchivoUri = data.getData();\n try {\n //Convertimos a bitmap\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),RutaArchivoUri);\n //seteamos la imagen\n ImagenAgregarSerie.setImageBitmap(bitmap);\n\n }catch (Exception e){\n Toast.makeText(this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n }", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "public void ocultarMensaje(String msje, String fo, String nueFo){\n String mensaje, binario;\n Color color;\n int r,g,b;\n try{\n mensaje = lecturaArchivo(msje);\n binario = preparaMensaje(mensaje);\n BufferedImage image = sacaFoto(fo);\n int k = 0;\n for(int i = 0; i < image.getHeight(); i++)\n for(int j = 0; j < image.getWidth(); j++){\n color = new Color(image.getRGB(j, i));\n if(k <= binario.length()){\n String red = toBinary((byte) color.getRed());\n String green = toBinary((byte) color.getGreen());\n String blue = toBinary((byte) color.getBlue());\n red = reemplazarLSB(red, binario);\n green = reemplazarLSB(green, binario);\n blue = reemplazarLSB(blue, binario);\n r = Integer.parseInt(red ,2);\n g = Integer.parseInt(green ,2);\n b = Integer.parseInt(blue ,2);\n }else{\n r = color.getRed();\n g = color.getGreen();\n b = color.getBlue();\n }\n image.setRGB(j, i, new Color(r,g,b).getRGB());\n k+=3;\n }\n File output = new File(nueFo);\n ImageIO.write(image, \"png\", output);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la escritura de la imagen\");\n System.exit(1);\n }\n }", "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }", "@Override\n\tpublic boolean baseToImg() {\n\t\tList<Image> imgList = imageRepository.findAll();\n\t\tfor (Image img : imgList) {\n\t\t\tString base = img.getSource();\n\t\t\tFiles file = new Files(img.getSaegimId(), \"jpg\");\n\t\t\tfile = fileRepository.save(file);\n\t\t\tLong fileId = file.getId();\n\t\t\t\n\t\t\tBase64ToImgDecoder.decoder(base, dir + fileId + '.' + \"jpg\");\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic void carregar() {\n\t\tSystem.out.println(\"carregar imagem png\");\n\t\t\n\t}", "public void setImagen(String imagen) {\n this.imagen = imagen;\n }", "public Coloca_imagen(){\n \n \n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //O sea que, la accion que ejecuta el usuario es igual a seleccionar una imagen de la galeria\n // Y \"&&\" que la seleccion de la imagen se hizo bien\n if (requestCode == CODIGO_GALERIA && resultCode == RESULT_OK);\n try {\n //Esto nos va transformar la URI en este archivo que esta aqui colocado.\n ArchivoImagen = UtilidadFile.from(this,data.getData());\n //Para que la imagen cargue en uno de los recuadros de la interfaz grafica se hara\n //esta implementacion en la cual recibe la ruta de la imagen.\n imgpost1.setImageBitmap(BitmapFactory.decodeFile(ArchivoImagen.getAbsolutePath()));\n }catch (Exception ex){\n Log.d(\"ERROR\", \"Ha ocurrido un error \"+ ex.getMessage());\n }\n }", "private String ConvertImagenTexto(Bitmap imagenpro) {\n ByteArrayOutputStream espacio = new ByteArrayOutputStream();\n imagenpro.compress(Bitmap.CompressFormat.JPEG,100,espacio);\n byte[] imagen = espacio.toByteArray();\n String imagenAstring = Base64.encodeToString(imagen,Base64.DEFAULT);\n return imagenAstring;\n }", "private void botonImagen() {\n ImageIcon guardar = new ImageIcon(getClass().getResource(\"/Img/saveIcon.png\"));\n btnGuardar.setIcon(new ImageIcon(guardar.getImage().getScaledInstance(btnGuardar.getWidth(), btnGuardar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon eliminar = new ImageIcon(\"src/Img/Delete.png\");\n ImageIcon eliminar = new ImageIcon(getClass().getResource(\"/Img/Delete.png\"));\n btnEliminar.setIcon(new ImageIcon(eliminar.getImage().getScaledInstance(btnEliminar.getWidth(), btnEliminar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon regresar = new ImageIcon(\"src/Img/arrow.png\");\n ImageIcon regresar = new ImageIcon(getClass().getResource(\"/Img/arrow.png\"));\n btnRegresar.setIcon(new ImageIcon(regresar.getImage().getScaledInstance(btnRegresar.getWidth(), btnRegresar.getHeight(), Image.SCALE_SMOOTH)));\n \n //ImageIcon cancelar = new ImageIcon(\"src/Img/deleteIcon.png\");\n ImageIcon cancelar = new ImageIcon(getClass().getResource(\"/Img/deleteIcon.png\"));\n btnCancelar.setIcon(new ImageIcon(cancelar.getImage().getScaledInstance(btnCancelar.getWidth(), btnCancelar.getHeight(), Image.SCALE_SMOOTH)));\n\n }", "public Enemie(){\r\n \r\n r=new Random();\r\n try{\r\n \r\n //cargamos imagenes del barco, ambos helicopteros y damos valores\r\n imgHeli=ImageIO.read(new File(\"src/Images/1.png\"));\r\n imgHeli2=ImageIO.read(new File(\"src/Images/2.png\"));\r\n imgShip=ImageIO.read(new File(\"src/Images/barquito.png\"));\r\n imgBarril=ImageIO.read(new File(\"src/Images/barril.png\"));\r\n \r\n }catch(IOException ex){\r\n System.out.println(\"Imagen no encontrada.\");\r\n }\r\n //Generamos posiciones aleatorias\r\n Bx=(r.nextInt(260)+140);\r\n By=1;\r\n \r\n Bx2=(r.nextInt(260)+140);\r\n By2=1;\r\n \r\n Hx=(r.nextInt(260)+140);\r\n Hy=1;\r\n \r\n Hx2=(r.nextInt(260)+140);\r\n Hy2=1;\r\n //Cargamos altos y anchos para todas las imagenes\r\n Bwidth=imgShip.getWidth(null);\r\n Bheight=imgShip.getHeight(null);\r\n \r\n Bwidth2=imgBarril.getWidth(null);\r\n Bheight2=imgBarril.getHeight(null);\r\n \r\n Hwidth=imgHeli.getWidth(null);\r\n Hheight=imgHeli.getHeight(null);\r\n \r\n Hwidth2=imgHeli2.getWidth(null);\r\n Hheight2=imgHeli2.getHeight(null);\r\n \r\n }", "private void generarPNG(String nombre, String entrada) {\n try {\n String ruta = this.pathGuardado + \"/\" + nombre + \".dot\";\n File file = new File(ruta);\n // Si el archivo no existe es creado\n if (!file.exists()) {\n file.createNewFile();\n }\n FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(entrada);\n bw.close();\n// //Generar Imagen creada por .dot\n ControlTerminal controlTer = new ControlTerminal(ruta, this.pathGuardado + \"/\" + nombre + \".png\");\n controlTer.generarImagen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void desenhar() {\n\t\tSystem.out.println(\"desenhar imagem png\");\n\t\t\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 }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(resultCode == RESULT_OK){\n Bitmap imagem = null;\n try {\n switch (requestCode){\n case SELECAO_GALERIA:\n Uri localImage = data.getData();\n imagem = MediaStore.Images.Media.getBitmap(getContentResolver(), localImage);\n break;\n }\n if(imagem != null){\n //configuração da imagem em Bitmap\n imageView.setImageBitmap(imagem);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n imagem.compress(Bitmap.CompressFormat.JPEG, 70, baos);\n byte[] dadosImagem = baos.toByteArray();\n\n //referência para pasta no Storage\n final StorageReference imagemRef = storageReference\n .child(\"imagens\")\n .child(\"servicos\")\n .child(idUserLogado)\n .child(imagem + \"jpeg\");\n\n //upload dos bytes da imagem\n UploadTask uploadTask = imagemRef.putBytes(dadosImagem);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(NovoProdutoEmpresaActivity.this,\n \"Erro ao fazer o upload da imagem\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(NovoProdutoEmpresaActivity.this,\n \"Sucesso ao fazer o upload da imagem\", Toast.LENGTH_SHORT).show();\n }\n });\n\n //recupera o link de download da imagem\n Task<Uri> urlTask = uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()){\n throw task.getException();\n }\n return imagemRef.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n Uri downloadUri = task.getResult();\n\n //salva a url na string\n urlImagemSelecionada = downloadUri.toString();\n }\n }\n });\n\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }", "public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }", "public static void main(String[] args) {\n try {\n File image = new File(\"petite_image.png\");\n ImageSerializer serializer = new ImageSerializerBase64Impl();\n\n // Sérialization\n String encodedImage = (String) serializer.serialize(image);\n System.out.println(splitDisplay(encodedImage,76));\n\n // Désérialisation\n byte[] deserializedImage = (byte[]) serializer.deserialize(encodedImage);\n\n // Vérifications\n // 1/ Automatique\n assert (Arrays.equals(deserializedImage, Files.readAllBytes(image.toPath())));\n System.out.println(\"Cette sérialisation est bien réversible :)\");\n // 2/ Manuelle\n File extractedImage = new File(\"petite_image_extraite.png\");\n new FileOutputStream(extractedImage).write(deserializedImage);\n System.out.println(\"Je peux vérifier moi-même en ouvrant mon navigateur de fichiers et en ouvrant l'image extraite dans le répertoire de ce Test\");\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void salvaFoto(){\n\n try {\n\n File f = new File(Environment.getExternalStorageDirectory() +getResources().getString(R.string.folder_package)+ \"/\" +id_Familiar+ \".jpg\");\n\n if(f.exists()){ boolean deleted = f.delete();}\n\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, qualidade_image_profile, bytes);\n\n try {\n f.createNewFile();\n FileOutputStream fo = new FileOutputStream(f);\n fo.write(bytes.toByteArray());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n catch (Exception E){\n Log.e(\"error\",\"Erro ao carregar imagem\");\n }\n }", "private void prepararImagenYStorage() {\n mImageBitmap = null;\n\n //this.capturarFotoButton = (Button) findViewById(R.id.capturarFotoButton);\n// setBtnListenerOrDisable(\n// this.capturarFotoButton,\n// mTakePicSOnClickListener,\n// MediaStore.ACTION_IMAGE_CAPTURE\n// );\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {\n mAlbumStorageDirFactory = new FroyoAlbumDirFactory();\n } else {\n mAlbumStorageDirFactory = new BaseAlbumDirFactory();\n }\n }", "Imagem getImagem();", "public void cambiarImagenGrande(ImagenTemp it) {\n\t\t\n\t\t//TODO automatizar haciendo que el método directamente coloque la imagen escalada en el panel?\n\t\tImage imgtemp = VistaPrincipal.ponerImagenEscalada(it.getbImagen(), panelImagenGrande);\n\t\tlabelImagenGrande.setIcon(new ImageIcon(imgtemp));\n\t\tlabelImagenGrande.setBounds((int)(((float)panelImagenGrande.getWidth()/2) - ((float)imgtemp.getWidth(null))/((float)2)), (int)(((float)panelImagenGrande.getHeight()/2) - ((float)imgtemp.getHeight(null))/((float)2)),imgtemp.getWidth(null), imgtemp.getHeight(null));\n\t\t\n\t\t\n\t\t//Se rellenan los datos de la imagen seleccionada\n\t\tlabelNombre.setText(it.getNombre()+it.getExtension());\n\t\t\n\t\tLocalDate localDate = LocalDate.ofEpochDay(it.getFecha()/(1000*60*60*24));//TODO llevar esto a un método estático de VistaPrincipal si se repite\n\t\tlabelFecha.setText(localDate.getDayOfMonth() + \"/\" + localDate.getMonthValue() + \"/\" + localDate.getYear());\n\t\t\n\t\tlabelResolucion.setText(it.getbImagen().getWidth() + \" x \" + it.getbImagen().getHeight());\n\t\t\n\t\tString peso = it.getImagen().length()/1024 < 1000 ? (float)(it.getImagen().length()/1024) + \" kB\" : (int)(it.getImagen().length()/(1024*1024)) + \" MB\";\n\t\tlabelPeso.setText(peso);\n\t\t\n\t\t\n\t\t//Se rellenan las etiquetas\n\t\tpanelImagenEtiquetas.removeAll();\n\t\tfor(Etiquetas e : it.getArrayEtiquetas()) panelImagenEtiquetas.add(e);\n\t\tresultadosEste.revalidate();\n\t\tresultadosEste.repaint();\n\t\t\n\t}", "public static void anyadirRaco(Imagen imagen){\n HashSet<Imagen> imagenes;\n HashSet<Usuario> usuarios;\n Usuario usuario;\n\n usuario = buscarUsuario(imagen.getUidUser());\n imagenes = baseDatos.get(Tablas.Racons.name());\n usuarios = baseDatos.get(Tablas.Usuarios.name());\n imagenes.add(imagen);\n usuarios.add(usuario);\n baseDatos.put(Tablas.Racons.name(),imagenes);\n baseDatos.put(Tablas.Usuarios.name(),usuarios);\n }", "public void setImagen(String imagen) {\n\t\tthis.imagen = imagen;\n\t}", "public int getImage();", "private void pruebaGuardado() {\n try {\n BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2d = img.createGraphics();\n g2d.setColor(Color.RED);\n g2d.fillRect(25, 25, 50, 50);\n g2d.dispose();\n ImageIO.write(img, \"JPEG\", new File(\"D:\\\\LeapMotion\\\\foo.jpg\"));\n } catch (IOException ex) {\n Logger.getLogger(Nodo.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "private void cargarImagenWebService(String rutaImagen) {\n\n String url_lh = Globals.url;\n\n String urlImagen = \"http://\" + url_lh + \"/proyecto_dconfo_v1/\" + rutaImagen;\n urlImagen = urlImagen.replace(\" \", \"%20\");\n\n ImageRequest imageRequest = new ImageRequest(urlImagen, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap response) {\n iv_bank_prueba.setBackground(null);\n iv_bank_prueba.setImageBitmap(response);\n }\n }, 0, 0, ImageView.ScaleType.CENTER, null, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error al cargar la imagen\", Toast.LENGTH_SHORT).show();\n }\n });\n //request.add(imageRequest);\n VolleySingleton.getIntanciaVolley(getApplicationContext()).addToRequestQueue(imageRequest);\n }", "public String guardarImgPost(){\n \n File archivo=null;//Objeto para el manejo de os archivos\n InputStream in =null;//Objeto para el manejo del stream de datos del archivo\n //Se obtiene el codigo de usuario de la sesion actual\n String codUsuario=codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Se obtiene un codigo producto de la combinacion del codigo del usuario y de un numero aleatorio\n String codGenerado=new Utiles().generar(codUsuario);\n String extension=\"\";\n int i=0;\n //Extension del archivo ha subir\n extension=\".\"+FilenameUtils.getExtension(this.getObjImagen().getImagen().getFileName());\n \n \n try {\n //Pasa el buffer de datos en un array de bytes , finalmente lee cada uno de los bytes\n in=this.getObjImagen().getImagen().getInputstream();\n byte[] data=new byte[in.available()];\n in.read(data);\n \n //Crea un archivo en la ruta de publicacion\n archivo=new File(this.rutaImgPublicacion+codGenerado+extension);\n FileOutputStream out=new FileOutputStream(archivo);\n //Escribe los datos en el nuevo archivo creado\n out.write(data);\n \n System.out.println(\"Ruta de Path Absolute\");\n System.out.println(archivo.getAbsolutePath());\n \n //Cierra todas las conexiones\n in.close();\n out.flush();\n out.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n return \"none.jpg\";\n }\n //Retorna el nombre de la iamgen almacenada\n return codGenerado+extension;\n }", "public Image getBassClef();", "public void montarTela(){\n ControllerListener listener = new BaseControllerListener(){\n @Override\n public void onFinalImageSet(String id, Object imageInfo, Animatable animatable) {\n super.onFinalImageSet(id, imageInfo, animatable);\n }\n\n @Override\n public void onFailure(String id, Throwable throwable) {\n super.onFailure(id, throwable);\n }\n\n @Override\n public void onIntermediateImageFailed(String id, Throwable throwable) {\n super.onIntermediateImageFailed(id, throwable);\n }\n\n @Override\n public void onIntermediateImageSet(String id, Object imageInfo) {\n super.onIntermediateImageSet(id, imageInfo);\n }\n\n @Override\n public void onRelease(String id) {\n super.onRelease(id);\n }\n\n @Override\n public void onSubmit(String id, Object callerContext) {\n super.onSubmit(id, callerContext);\n }\n };\n\n String urlImagem = DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\");\n\n Uri uri = null;\n DraweeController dc = null;\n\n if(urlImagem.contains(\"https\")){\n uri = Uri.parse(DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n } else {\n uri = Uri.parse(\"https://tocaredev.azurewebsites.net\"+DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n }\n ivFotoPerfil.setController(dc);\n\n tvUsername.setText(DetalhesPaciente.paciente.getNome() + \" \" + DetalhesPaciente.paciente.getSobrenome());\n\n int idade = Util.retornaIdade(DetalhesPaciente.paciente.getDataNascimento());\n\n tvDataNascimento.setText(DetalhesPaciente.paciente.getDataNascimento() + \" (\" + idade + \")\");\n \n etAnamnese.setText(DetalhesPaciente.paciente.getProntuario().getAnamnese());\n etExameFisico.setText(DetalhesPaciente.paciente.getProntuario().getExameFisico());\n etPlanoTerapeutico.setText(DetalhesPaciente.paciente.getProntuario().getPlanoTerapeutico());\n etHipoteseDiagnostica.setText(DetalhesPaciente.paciente.getProntuario().getHipoteseDiagnostica());\n \n }", "@Override\n public void onActivityResult(int requestCode,int resultCode,Intent data)\n {\n alerta.dismiss();\n if(resultCode!=0)\n loading.abrir(\"Aguarde...\");\n\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case imagem_interna:\n if (resultCode == RESULT_OK) {\n Image img = new Image();\n ContentResolver cResolver = getContentResolver();\n Uri uri = data.getData();\n String[] projection = {MediaStore.Images.Media.DATA};\n Cursor cursor = cResolver.query(uri, projection, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(projection[0]);\n filepath = cursor.getString(columnIndex);\n cursor.close();\n\n File f64 = new File(filepath);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgArq);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n }\n break;\n\n case imagem_camera:\n if (resultCode == RESULT_OK)\n {\n Image img = new Image();\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n\n Uri uri = img.getImageUri(pesqAgendaUser.this, photo);\n File file = new File(img.getRealPathFromURI(pesqAgendaUser.this,uri));\n String pathImgCamera = file.getPath();\n File f64 = new File(pathImgCamera);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgCam);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n\n }\n break;\n\n default:\n loading.fechar();\n break;\n }//fim switch\n\n }", "protected void carregaImagens() {\n Handler carregaImagensHandler = new Handler();\n\n // Envia a Runnable ao Handler simulando um carregamento assincrono depois de 1 segundo\n carregaImagensHandler.postDelayed(new Runnable() {\n public void run() {\n // Carregando primeira imagem\n ImageView altaIV = findViewById(R.id.iv_alta);\n altaIV.setImageResource(R.drawable.android_verde);\n\n // Carregando primeira imagem\n ImageView baixaIV = findViewById(R.id.iv_baixa);\n baixaIV.setImageResource(R.drawable.android_preto);\n }\n }, 1000);\n }", "public void actualizarImagenConError() {\n\t\tentidadGrafica.actualizarImagenConError(this.valor);\n\t}", "private void enhanceImage(){\n }", "public void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }", "public Image getCrotchetRest();", "public Image getTrebleClef();", "@Generated(hash = 1786532268)\npublic synchronized void resetImagemOcorrencias() {\n imagemOcorrencias = null;\n}", "public static String guardarImagen(String ruta, BufferedImage imagen, String nombreImagen, int ancho, int alto) {\n\n\t\ttry {\n\t\t\tif (ancho != 0 && alto != 0)\n\t\t\t\timagen = redimencionarImagen(imagen, ancho, alto);\n\t\t\tFile img = new File(ruta + sep + nombreImagen + \".png\");\n\t\t\tImageIO.write(imagen, \"png\", img);\n\t\t\treturn img.getAbsolutePath();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}", "java.lang.String getImagePath();", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "public String getUrlImagen(){\n\t\treturn urlImagen;\n\t}", "@Override\n public String GetImagePart() {\n return \"coal\";\n }", "public Image getImagenI() {\n return animacion.getImagen().getImage();\n }", "public Bitmap espejo() {\n Bitmap bmp = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig());\n int pixel, red, green, blue, alpha;\n //Recorremos todos los pixeles de la imagen\n for (int i = 0; i < bitmap.getWidth(); i++) {\n for (int j = 0; j < bitmap.getHeight(); j++) {\n pixel = bitmap.getPixel(i, j);\n red = Color.red(pixel);\n green = Color.green(pixel);\n blue = Color.blue(pixel);\n alpha = Color.alpha(pixel);\n //Pixel a pixel invertimos sus posiciones y recreamos la imagen ya invertida\n bmp.setPixel(bitmap.getWidth() - i - 1, j, Color.argb(alpha, red, green, blue));\n }\n }\n return bmp;\n }", "String getImagePath();", "String getImagePath();", "public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }", "public String getImage() { return image; }", "public Image getImgMario() {return imgMario;}", "public void genPNGSoloUsuarios() {\n String entrada = genStrSoloUsuarios();\n generarPNG(\"usuarios\", entrada);\n }", "private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }", "@Test\n\tpublic void obtenerContenidoTest() {\n\t\tArchivo ar = new Imagen(\"test\", \"contenido\");\n\t\tassertEquals(\"contenido\", ar.obtenerContenido());\n\t}", "public ImageIcon devolverImagenButton(String src, String tipo, int escalax, int escalay) {\n ImageIcon imagen1 = new ImageIcon(getClass().getResource(\"/images/\" + src + \".\" + tipo));\n ImageIcon icon = new ImageIcon(imagen1.getImage().getScaledInstance(escalax, escalay, Image.SCALE_DEFAULT));\n return icon;\n }", "public Image creerImage() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\ttry {\r\n\t\t\t// Transfert de l image dans le buffer de bytes\r\n\t\t\tImageIO.write(monImage.getImage(), \"png\", baos);\r\n\t\t\t\r\n\t\t\t// Creation d une instance d Image iText\r\n\t\t\tImage image = Image.getInstance(baos.toByteArray());\r\n\t\t\treturn image;\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} catch (BadElementException 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 null;\r\n\t}", "public String getaImg() {\n return aImg;\n }", "public void ajouterImageSud(String chemin) {\r\n\t\tif (panneauSud != null)\r\n\t\t\tpanneauSud.ajouterImage(chemin);\r\n\t}", "public void pone_imagen(Image imagen) {\n if (imagen != null) {\n this.imagen = imagen;\n } else {\n this.imagen = null;\n }\n repaint();\n }", "@Override\n\tpublic String getImagePathBig() {\n\t\treturn null;\n\t}", "private void afficherImage() {\n\n //get the link of the storage reference of the user\n StorageReference st = stm.child(\"users/\" + auth.getCurrentUser().getUid());\n try {\n File localFile = File.createTempFile(\"image\", \"png\");\n st.getFile(localFile).addOnSuccessListener(taskSnapshot -> st.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n //load the picture in the activity\n Picasso.with(getActivity()).load(uri).into(image);\n }\n }));\n } catch (IOException e) {\n Log.e(getClass().getName(), e.toString());\n }\n\n\n }", "WorldImage getImage();", "public void setIdImagen(int idImagen) {\n this.idImagen = idImagen;\n }", "public void vaciarImagenGrande() {\n\t\tlabelImagenGrande.setIcon(null);\n\t\tlabelNombre.setText(\"\");\n\t\tlabelFecha.setText(\"\");\n\t\tlabelResolucion.setText(\"\");\n\t\tlabelPeso.setText(\"\");\n\t\tpanelImagenEtiquetas.removeAll();\n\t\tresultadosEste.revalidate();\n\t\tresultadosEste.repaint();\n\t\t//TODO comprobar si es necesario quitar la referencia de imagenTempActual\n\t\t\n\t}", "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 }", "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 }", "public void setFondoLeyenda() {\n URL url = getClass().getResource(\"/Imagenes/Leyenda.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }", "public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }", "public static String renombrarTempMessageKeyFile(String tempMessageKey, String messageKeyServidor, String type, Context miContext){\n String tipo = \"jpeg_base64\";\n String extension = \"\";\n String pathArchivo = \"\";\n String filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + miContext.getResources().getString(R.string.app_name) + \"/\";\n if(tipo.equalsIgnoreCase(type)){\n extension = \".jpg\";\n File photo = new File(filePath, tempMessageKey + extension);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap miImagen = BitmapFactory.decodeFile(photo.getAbsolutePath(), options);\n File file = new File(filePath, messageKeyServidor + extension );\n try {\n OutputStream output = new FileOutputStream(file);\n\n // Compress into png format image from 0% - 100%\n miImagen.compress(Bitmap.CompressFormat.JPEG, 100, output);\n output.flush();\n output.close();\n addImageToGallery(file.getAbsolutePath(), miContext);\n pathArchivo = file.getAbsolutePath();\n miContext.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, MediaStore.Images.ImageColumns.DATA + \"=?\" , new String[]{ photo.getAbsolutePath() });\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return pathArchivo;\n }", "@Override\n public void onClick(View view) {\n BitmapDrawable bitmapDrawable = (BitmapDrawable) imgHinh.getDrawable();\n Bitmap bitmap = bitmapDrawable.getBitmap();\n ByteArrayOutputStream byteArray = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArray);\n byte[] hinhAnh = byteArray.toByteArray();\n AnhcuatoiActivity.database.INSERT_AnhCuaToi(\n edtTen.getText().toString().trim(),\n edtMoTa.getText().toString().trim(),\n hinhAnh\n );\n Toast.makeText(AnhcuatoiActivity.this, \"Đã Thêm\", Toast.LENGTH_SHORT).show();\n }", "public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }", "public Image getQuaverRest();", "public void copiaImg() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString tipo = caminhoImagem.replaceAll(\".*\\\\.\", \"\");\r\n\t\t\tSystem.out.println(tipo);\r\n\t\t\tString l = caminhoImagem;\r\n\t\t\tString i = \"../MASProject/imagens/\" + idObra.getText() + \".\" + tipo;\r\n\t\t\tcaminhoImagem = i;\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileInputStream fisDe = new FileInputStream(l);\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileOutputStream fisPara = new FileOutputStream(i);\r\n\t\t\tFileChannel fcPara = fisDe.getChannel();\r\n\t\t\tFileChannel fcDe = fisPara.getChannel();\r\n\t\t\tif (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) {\r\n\t\t\t\tfcPara.close();\r\n\t\t\t\tfcDe.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t}\r\n\t}", "private void reanderImage(ImageData data) {\n \n }", "public void mostrarImagen(Image img){\n ImageIcon icono = new ImageIcon(img);\n jlImagen.setIcon(icono);\n }", "private void getImage() {\n StorageReference storageReference = FirebaseStorage.getInstance().getReference();\n StorageReference photoReference = storageReference.child(\"images/\" + globals.chosenProp);\n\n ImageView imageView = (ImageView) findViewById(R.id.ivImage);\n\n final long ONE_MEGABYTE = 1024 * 1024;\n photoReference.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n Bitmap bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageView.setImageBitmap(bmp);\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), \"No Such file or Path found!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "public static void anyadirImagen(String uidDiaFiesta,String uidEvento, Imagen imagen){\n HashSet<Imagen> imagenes;\n HashSet<DiaFiesta> diaFiestasHash;\n DiaFiesta diaFiesta;\n Evento evento;\n\n diaFiesta = buscarDiaFiesta(uidDiaFiesta);\n evento = buscarEvento(diaFiesta,uidEvento);\n imagenes = baseDatos.get(Tablas.Imagenes.name());\n imagenes.add(imagen);\n baseDatos.put(Tablas.Imagenes.name(),imagenes);\n }", "private static BufferedImage redimencionarImagen(BufferedImage imagen, int ancho, int alto) {\n\t\tImage img = imagen.getScaledInstance(ancho, alto, Image.SCALE_AREA_AVERAGING);\n\t\tBufferedImage bufferedImage = new BufferedImage(img.getWidth(null), img.getHeight(null),\n\t\t\t\tBufferedImage.TYPE_INT_ARGB);\n\t\tbufferedImage.getGraphics().drawImage(img, 0, 0, null);\n\t\treturn bufferedImage;\n\t}", "public static byte [] convertirFoto(String ruta){\n byte[] icono;\n try {\n File rut=new File(ruta);\n icono = new byte[(int)rut.length()];\n InputStream input = new FileInputStream(ruta);\n input.read(icono);\n } catch (Exception ex) {\n return null;\n }\n return icono;\n }", "private void aumentarPilha() {\n this.pilhaMovimentos++;\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}", "public VentanaImagen(String name) {\r\n\t \r\n\t\t String archivo = name;\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 800, 600);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.BLACK);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\tJLabel PATCH = new JLabel(\"\");\r\n\t\tPATCH.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tPATCH.setEnabled(false);\r\n\t\tPATCH.setBackground(Color.YELLOW);\r\n\t\tPATCH.setBounds(141, 11, 591, 20);\r\n\t\tPATCH.setText(archivo);\r\n\t\tcontentPane.add(PATCH);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Ubicacion:\");\r\n\t\tlblNewLabel.setForeground(Color.WHITE);\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblNewLabel.setIcon(null);\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblNewLabel.setBackground(Color.WHITE);\r\n\t\tlblNewLabel.setBounds(38, 11, 82, 20);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel VentanaEmergenteImagen = new JLabel(\"\");\r\n\t\tVentanaEmergenteImagen.setBounds(38, 58, 694, 437);\r\n\t\tImageIcon imagen = new ImageIcon(archivo);\r\n\t\tVentanaEmergenteImagen.setIcon(new ImageIcon(imagen.getImage().getScaledInstance(VentanaEmergenteImagen.getWidth(), VentanaEmergenteImagen.getHeight(), Image.SCALE_SMOOTH)));\r\n\t\tcontentPane.add(VentanaEmergenteImagen);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"SALIDA\");\r\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(349, 506, 91, 32);\r\n\t\tcontentPane.add(btnNewButton);\r\n\t}", "private File crearAchivoDeImagen() throws IOException {\n String fecha = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String nombreImagen = \"respaldo_\" + fecha + \"_\";\n File directorio = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File imagen = File.createTempFile(nombreImagen, \".jpg\", directorio);\n\n imagePath = imagen.getAbsolutePath();\n Log.d(\"Retrofit\",imagePath);\n return imagen;\n }", "public ImageIcon getFoto(){\r\n return (ImageIcon)beneficiario[5];\r\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 }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "public void actualizarImagen(String pImagen)\r\n\t{\r\n\t\tpanelTablero.actualizar(pImagen);\r\n\t}" ]
[ "0.69184875", "0.6889469", "0.6820424", "0.6631234", "0.66000414", "0.64976865", "0.649685", "0.6483342", "0.6466755", "0.64316845", "0.64057046", "0.6363608", "0.63489944", "0.63415563", "0.6341537", "0.6276593", "0.6272935", "0.62704253", "0.62298155", "0.6207974", "0.61683226", "0.6142887", "0.61127174", "0.61121744", "0.61080956", "0.61015934", "0.6086849", "0.60863525", "0.6080861", "0.6051085", "0.601152", "0.60073406", "0.6006821", "0.6006639", "0.6000688", "0.59999037", "0.5984545", "0.5983843", "0.5983446", "0.59770435", "0.5947124", "0.5938957", "0.5904304", "0.58882654", "0.5887372", "0.5876112", "0.586838", "0.58644015", "0.58593154", "0.5856562", "0.5847525", "0.58459276", "0.5844835", "0.58378774", "0.58343136", "0.5833818", "0.5820994", "0.5815571", "0.5804355", "0.5804355", "0.5804261", "0.579547", "0.5776035", "0.57684994", "0.5761669", "0.57435536", "0.5740219", "0.5735656", "0.5735247", "0.5734203", "0.57289356", "0.5728511", "0.5726757", "0.569548", "0.569363", "0.5687537", "0.5686219", "0.567686", "0.5667858", "0.5648272", "0.5646336", "0.5644447", "0.5644332", "0.56398976", "0.56396693", "0.56349957", "0.56322575", "0.56298685", "0.56261903", "0.5616153", "0.56156725", "0.56104237", "0.56085354", "0.55955446", "0.55941415", "0.5592313", "0.5592033", "0.55794066", "0.5579303", "0.5576772" ]
0.58894557
43
Remueve al enemigo del mundo
public void enemyoff(){ getWorld().removeObject(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }", "public int elimiarAlInicio(){\n int edad = inicio.edad;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=inicio.siguiente;\n }\n return edad;\n }", "public void alterarLeituristaMovimentoRoteiroEmpresa( Integer idRota, Integer anoMes, Integer idLeituristaNovo ) throws ErroRepositorioException;", "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "public void carroRemovido(){\n System.out.println(\"Su carro fue removido exitosamente\");\n }", "public void removerInicio() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n this.primeiro = this.primeiro.irParaProximo();\n this.total--;\n break;\n }\n }", "private synchronized void actualizarEnemigo(){\n\t\tcontadorE++;\n\t\tenemigo.mover(this.getWidth(), this.getHeight());\n\t\t\n\t\ttry{\n\t\t\tif(contadorE==100){\n\t\t\t\tenemigo.setAngulo(Math.random()*(2 * Math.PI));\n\t\t\t\tdisparosE[numDisparosE]=enemigo.dispara();\n\t\t\t\tnumDisparosE++;\n\t\t\t\tcontadorE=0;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<numDisparosE;i++){\n\t\t\t\t disparosE[i].mover(this.getWidth(), this.getHeight());\n\t\t\t\t \n\t\t\t\t if(disparosE[i].getVidaDisparo()<=0){\n\t\t\t\t\t eliminarDisparosE(i); \n\t\t\t\t\t i--; \n\t\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t\tif(enemigo.naveColisionE(nave)){\n\t\t\t\tanadirPuntos(enemigo.getPuntuacion());\n\t\t\t\tquitarVida();\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=0;j<numDisparos;j++){\n\t\t\t\tif(enemigo.disparoColisionE(disparos[j])){\n\t\t\t\t\t\n\t\t\t\t\tif(disparos[j]!=null){\n\t\t\t\t\t\teliminarDisparos(j);\n\t\t\t\t\t}\n\t\t\t\t\tanadirPuntos(enemigo.getPuntuacion());\n\t\t\t\t\tenemigo.setVivo(false);\n\t\t\t\t\tj=numDisparos;\n\t\t\t\t\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j=0;j<numDisparosE;j++){\n\t\t\t\tif(nave.recibirDisparo(disparosE[j])){\n\t\t\t\t\tif(disparos[j]!=null){\n\t\t\t\t\t\teliminarDisparos(j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tj=numDisparosE; \n\t\t\t\t\tj--;\n\t\t\t\t\n\t\t\t\t\tquitarVida();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {}\n\t}", "public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }", "public int obtenerSegundo() { return segundo; }", "public void anterior() {\n canalAtual--;\n televisao.mudarCanal(canalAtual);\n }", "private void resetLexeme(){\n\t\tcola = \"\";\n\t}", "@Override\n\tpublic String Undo() {\n\t\treturn \"Apagando la licuadora..........\" + receiver.turnOff();\n\t}", "public String turno(enemigo enem){\n\t\tString tur;\n\t\ttur=atacar(enem);\n\t\treturn tur;\n\t}", "public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void alterar(Entidade entidade);", "@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public void borrarZonaObjetivoAtaque() {\n\t\t\n\t}", "public void alterar(Edicao edicao) {\n\t\t\tconn = Conexao.getConexao();//conecta ao banco de dados\n\t\t\tsql = \"update edicao set edicaonumero = ?\";\n\t\t\t\n\t\t\ttry {\n\t\t\t\tps = conn.prepareStatement(sql);\n\t\t\t\t\n\t\t\t\tps.setInt(1, edicao.getEdicaonumero());\n\t\t\t\t\t\t\t\t\n\t\t\t\tps.execute(); //executa a acao\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Alterado com Sucesso !\");\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"erro no alterar\"+e.getMessage());\n\t\t\t}\n\t\t}", "public void recolheMao() {\n\t\tcartas[0].visible = false;\n\t\tfor (int i = 4; i <= 15; i++) {\n\t\t\tCartaVisual c = cartas[i];\n\t\t\tif ((c.top != topBaralho) || (c.left != leftBaralho)) {\n\t\t\t\tc.movePara(leftBaralho, topBaralho, 100);\n\t\t\t\tc.setCarta(null);\n\t\t\t\tc.descartada = false;\n\t\t\t\tcartasJogadas.remove(c);\n\t\t\t}\n\t\t}\n\t}", "public void afectarEnemigoArmado(EnemigoArmado e) {\n\t\te.daņar(daņo);\n\t\tif (e.getVida() <= 0) {\n\t\t\te.eliminar();\n\t\t}\n\t}", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void undoZug(int anzahlZuege) {\n\r\n\t}", "void actualizar(Prestamo prestamo);", "public int eliminarAlFinal(){\n int edad = fin.edad;\n if(fin==inicio){\n inicio=fin=null;\n }else{\n Nodo auxiliar=inicio;\n while(auxiliar.siguiente!=fin){\n auxiliar=auxiliar.siguiente;\n }\n fin=auxiliar;\n fin.siguiente=null;\n }\n return edad;\n }", "public void removerEncomendaInsumo(int insumoId){\t\t\n\t\tEncomenda_insumoController encomenda_insumoController = new Encomenda_insumoController();\n\t\tSystem.out.println(insumoId);\n\t\tencomenda_insumoController.setup();\n\t\tString resposta = encomenda_insumoController.delete(insumoId);\n\t\t\n\t\tencomendaController = new EncomendaController();\n\t\tencomendaController.setup();\t\t\t\n\t\t\n\t\tif(!resposta.equals(\"ok\")) {\n\t\t\texibirMsgErro(resposta);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgetAllEncomendas();\n\t}", "public void borrarZonaObjetivoMovimiento() {\n\t\t\n\t}", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "private static void atualizaContadorCodigos(ArrayList<Produto> produto) {\n int contadorAtual = produto.size() + 1;\n Produto.setContador(contadorAtual);\n }", "public static int turnoEnemigo(String enemigoRecibido){\n String enemigo; //variables locales a utilizar\n int ataqueEnemigo;\n Random aleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int inferior;\n int superior;\n \n enemigo=enemigoRecibido;//recibiendo al enemigo elegido por la funcion enemigos\n //comparando con los enemigos disponibles\n switch(enemigo){\n case \"Dark_Wolf\":{\n //ejecutando acciones del enemigo Dark\n inferior=10+nivel;\n superior=10+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo;//retornando el ataque de Dark\n }\n case \"Dragon\":{\n inferior=15+nivel; //ejecutando acciones del enemigo Dragon\n superior=15+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo; //retornando ataque del enemigo Dragon\n }\n default:{\n inferior=25+nivel; //ejecutando acciones del enemigo Golem\n superior=25+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo; //retornando ataque del enemigo Golem\n }\n }\n }", "public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }", "public void resetNuevoNombre()\r\n {\r\n this.nuevoNombre = null;\r\n }", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "public static String asignarNombres() {\n Scanner escaner = new Scanner(System.in);\n String nombrePrevioArreglo;\n int contador;\n boolean nombreEncontrado = true;\n\n System.out.println(\"Bienvenido Jugador\");\n System.out.println(\"Escribe tu nombre: \\n\");\n nombrePrevioArreglo = escaner.nextLine();\n //Volvemos a construir el string que adoptara los valores del mismo pero en mayusculas\n nombrePrevioArreglo = new String((mayusculas(nombrePrevioArreglo.toCharArray())));\n\n //Empezamos desde una condicion de inicio 1 para agrandar los nombres y asignarle el nombre a la posicion 0 como al punteo\n if (nombres.length == 1) {\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n nombres[0] = nombrePrevioArreglo;\n punteos[0] = 0;\n\n } else {\n //ciclo que trata de encontrar el nombre en el arreglo nombre\n for (contador = 0; contador < nombres.length; contador++) {\n if (nombrePrevioArreglo.equals(nombres[contador])) {\n nombreEncontrado = true;\n break;\n }\n nombreEncontrado = false;\n }\n /*Al no encontrar el nombre creamos dos arreglos mas (nombresAuxiliar y punteosAuxiliar) que serviran de almacenamiento tenporal mientras\n volvemos a crear el nuevo arreglo de los nombres les volvemos a colocar los datos que poseian mas el nombre nuevo\n */\n if (nombreEncontrado == false) {\n String[] nombresAuxiliar = new String[nombres.length];\n int[] punteosAuxiliar = new int[nombres.length];\n punteosAuxiliar = punteos;\n nombresAuxiliar = nombres;\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n for (contador = 0; contador < nombresAuxiliar.length; contador++) {\n nombres[contador] = nombresAuxiliar[contador];\n punteos[contador] = punteosAuxiliar[contador];\n }\n punteos[nombres.length - 2] = 0;\n nombres[nombres.length - 2] = nombrePrevioArreglo;\n }\n }\n //Regresa el nombre ya registrado\n return nombrePrevioArreglo;\n\n }", "public void restarPunto ( ) {\n\t\tif ( vida > 0 )\n\t\t\tvida--;\n\t}", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public void resetValor();", "public int rekisteroi() {\n this.tunnusNro = seuraavaNro;\n Tuote.seuraavaNro++;\n return tunnusNro;\n }", "public void hacerPedido(){\n this.sucursal.procesarPedido(this.pedido, this.id);\n this.pedido = new Integer[5];\n contadorPedido = 0;\n }", "public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void normaliza() {\n switch (o) {\n case SurEste:\n setPos(getX()+1, getY());\n o = OrientacionArista.NorOeste;\n break;\n case SurOeste: \n setPos(getX(), getY()+1);\n o = OrientacionArista.NorEste;\n break;\n case Oeste: \n setPos(getX()-1, getY()+1);\n o = OrientacionArista.Este;\n break;\n }\n }", "@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\n }", "public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "String ponerMarcaCongelado(final boolean esCongelado) {\n return esCongelado ? Constantes.MARCA_CONGELADO : \"\";\n\n }", "public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}", "public void subirNivelAtaque(){\n\tif(contadorNivel==5){\n\t nivelAtaque++;\n\t System.out.println(\"El ataque \"+obtenerNombreAtaque()+\" ha subido de nivel\");\n\t contadorNivel=0;\n\t dano+=5;\n\t} else {\n\t nivelAtaque=nivelAtaque;\n\t}\n }", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "@Generated\n public synchronized void resetComentario() {\n comentario = null;\n }", "@Override\n\tpublic String alterarAluno(String id, Aluno aluno) {\n\t\treturn null;\n\t}", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "public Ej_varclase1() {\n\t\t//contador++; \n\t\tcontador = contador + 1;\n\t\t\n\t}", "public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }", "public void inserirFinal(int elemento) {\n No novo = new No(elemento, null);\n No temp = ini;\n\n if (eVazia()) {\n ini = novo;\n } else {\n //Percorrer até chegar no ultimo Nó\n while (temp.getProximo() != null) {\n temp = temp.getProximo();\n }\n temp.setProximo(novo);\n }\n\n }", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "public void undo() {\n\t\tif (currentPlayer.getUndos() > 0) {\n\t\t\tcurrentPlayer.updateUndos();\n\t\t\t//System.out.println(\"Current Player's Undos!\" + currentPlayer.getUndos());\n\t\t\tturnEnd = false;\n\t\t\tmadeMove = false;\n\t\t\tboard = cloneForUndo;\n\t\t\t//printBoard();\n\t\t}\n\t}", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void ponerIngrediente( int ingrediente ){\n enter();\n ingredienteact = ingrediente;\n System.out.println(\"Estanquero: poniendo ingrediente \"+ingrediente);\n fumadores[ingrediente].signal();\n leave();\n }", "@Override\n\tpublic String frenar(int velocidad) {\n\t\tthis.velocidad-=velocidad;\n\t\tif (this.velocidad<0) {\n\t\t\tthis.velocidad=0;\n\t\t}\n\t\t\n\t\tString mensaje = \"Moto con velocidad actual de \"+this.velocidad;\n\t\tif (this.velocidad > VELOCIDAD_MAXIMA) {\n\t\t\tmensaje += \" y sigues superando la velocidad maxima\";\n\t\t}\n\t\treturn mensaje;\n\t}", "public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}", "@Override\n\tpublic MensajeBean actualiza(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.actualiza(nuevo);\n\t}", "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 Maquina() {\n savia = 0;\n reflejosLagrimas = 0;\n estado = false;\n }", "public void resetearContadores() {\n\t\treproducciones = 0;\n\t\tsuper.resetearreproducidas();\n\t}", "public void alterarVencimentoConta(Conta conta)\n\t\t\tthrows ErroRepositorioException;", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }", "public void undo() {\n\t\t\r\n\t}", "public void asignarClase(int clase);", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "public void removerContato() {\n\t\tSystem.out.println(\"Digite o número do contato que deseja remover: \");\n\t\tint numeroContato = scanner.nextInt();\n\t\tlistaDeContatos.remove(numeroContato);\n\t}", "private void removerFaltas(final String matricula) {\n firebase.child(\"Alunos/\" + matricula + \"/faltas\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long qtdAtual = (long) dataSnapshot.getValue();\n if (qtdAtual > 0) {\n firebase.child(\"Alunos/\" + matricula + \"/faltas\").setValue(qtdAtual - 1);\n\n if (alunoEncontrado == null) {\n Log log = new Log(matricula, 0);\n log.faltas(\"Remover\");\n } else {\n Log log = new Log(alunoEncontrado, 0);\n log.faltas(\"Remover\");\n }\n Toast.makeText(getContext(), \"Falta removida com sucesso.\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getContext(), \"Aluno possui 0 faltas.\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "public void moverAbajo() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, -1));\n }", "public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }", "public void moveM() {\r\n\t\tif (this.barcaIzq)\r\n\t\t\tthis.numMisioneros--;\r\n\t\telse\r\n\t\t\tthis.numMisioneros++;\r\n\r\n\t\tcambiarDeOrilla();\r\n\r\n\t}", "@Override\r\n\tpublic void alterar(Telefone vo) throws Exception {\n\t\t\r\n\t}", "void modificarSaldo(int cantidad){\n this.saldo = this.saldo + cantidad;\n }", "public void vaciar()\n {\n this.repositorio.clear();\n }", "public void asignarVida();", "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 }", "private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public void eliminarMarca(String nombreMarca) throws Exception {\n if (this.marcas.containsKey(nombreMarca)) {\r\n this.generarAuditoria(\"BAJA\", \"MARCA\", nombreMarca, \"\", GuiIngresar.getUsuario());\r\n this.marcas.remove(nombreMarca);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La marca no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void borrarTodo(){\n diccionario.clear();\n }", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "@Override\n\tpublic void emprestimo(Livros livro, Aluno usuario) {\n\t\t\n\t}", "private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void mueveJugador(Jugador uno) {\r\n\t\tuno.getKm().remove(uno);\r\n\t\tint nKilometro = uno.getKm().getnKilometro();\r\n\t\tfor(Kilometro k : kilometros)\r\n\t\t{\r\n\t\t\tif(k.getnKilometro() == (nKilometro + 1))\r\n\t\t\t{\r\n\t\t\t\tuno.setKm(k);\r\n\t\t\t\tk.add(uno);\r\n\t\t\t\tthis.update(this.getGraphics());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}" ]
[ "0.6701726", "0.6625262", "0.64574677", "0.63956577", "0.6379448", "0.63449347", "0.61688596", "0.61575586", "0.6154485", "0.6145954", "0.6123649", "0.60997134", "0.60926056", "0.609099", "0.60778916", "0.6040161", "0.6031936", "0.6022026", "0.6008507", "0.5998496", "0.59802824", "0.5971306", "0.59602696", "0.59466857", "0.5944486", "0.5937862", "0.593618", "0.59277153", "0.59191614", "0.591746", "0.5917423", "0.59064853", "0.5884456", "0.5876669", "0.5870184", "0.5867739", "0.58626163", "0.58519644", "0.58380723", "0.58332896", "0.5827497", "0.5826394", "0.5825794", "0.58198893", "0.58166856", "0.58142793", "0.5806108", "0.5784491", "0.57759", "0.57748", "0.5770211", "0.5755439", "0.5739129", "0.5736809", "0.5729698", "0.57168406", "0.5712225", "0.5700425", "0.56971425", "0.56743175", "0.5670892", "0.56673247", "0.5666102", "0.56648266", "0.5661673", "0.56615406", "0.5661431", "0.5657734", "0.5655105", "0.56537783", "0.5639544", "0.5634462", "0.56311136", "0.56273854", "0.5626937", "0.5625234", "0.562203", "0.56150335", "0.5614084", "0.5613396", "0.5612455", "0.56119645", "0.5607651", "0.5605618", "0.5603896", "0.56021523", "0.55984217", "0.5595188", "0.5588777", "0.55876595", "0.5587566", "0.5585801", "0.5585328", "0.5584539", "0.55830127", "0.5581661", "0.55777264", "0.55726147", "0.55721605", "0.55664986", "0.5560788" ]
0.0
-1
/ this method adds a given contact to our list if its not already present
public boolean add(Contact contact) { /* first we determine if the contact is already present */ boolean alreadyPresent = false; for (Contact c : contacts) { if (c.getContactID().equals(contact.getContactID())) { alreadyPresent = true; } } /* if the contact is not present then we add it, and return true */ if (!alreadyPresent) { contacts.add(contact); System.out.println("Contact Added Successfully!"); return true; } else { System.out.println("Contact already present"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addContact() {\n\t\tif (contactCounter == contactList.length) {\n\t\t\tSystem.err.println(\"Maximum contacts reached. \"\n\t\t\t\t\t\t\t\t+ \"No more contact can be added\");\n\t\treturn;\n\t\t}\n\t\t\n\t\treadContactInfo();\t\n\t}", "public boolean addNewContact(Contact contact){\n if(findContact(contact.getName()) >= 0){\n // recall, x >= 0, if x is true than x is in the index of contact\n // if false, x will return -1 meaning the same contact wasn't found\n System.out.println(\"Contact is already on file\");\n return false; //\n }\n myContacts.add(contact);\n return true;\n }", "private void addContact(Contact contact) {\n contactList.add(contact);\n System.out.println(\"contact added whose name is : \" + contact.getFirstName() + \" \" + contact.getLastName());\n\n }", "public void addContact(Contact contactToAdd)\n {\n for (Contact contact: mContacts)\n {\n if (contact.getEmail().equals(contactToAdd.getEmail()))\n {\n //exit if contact exists in the list\n return;\n }\n }\n mContacts.add(contactToAdd);\n }", "private static boolean addContact (String name){\n\t\t//If the contact is found, we donīt add it\n\t\tif (findContact(name)!=-1) return false;\n\t\t//Looking where to store the contact \n\t\tboolean added = false;\n\t\tfor (int ii=0; ii<contacts.length && !added; ii++){\n\t\t\t//We look for the first element that is null (empty position)\n\t\t\tif (contacts[ii]==null) {\n\t\t\t\tcontacts[ii]= new Contact(name);\n\t\t\t\tadded = true;\n\t\t\t}\n\t\t}\n\t\t//If added is still false it is because there are no empty positions\n\t\treturn added;\n\t}", "public static void addContact()\n {\n System.out.println(\"Enter your firstName : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++)\n {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName))\n {\n System.out.println(\"Name already exists. Try another name\");\n addPersons();\n break;\n }\n }\n\n System.out.println(\"Enter your lastName : \");\n String lastName = sc.nextLine();\n System.out.println(\"Enter your address : \");\n String address = sc.nextLine();\n System.out.println(\"Enter your city : \");\n String city = sc.nextLine();\n System.out.println(\"Enter your state : \");\n String state = sc.nextLine();\n System.out.println(\"Enter your zipCode : \");\n String zip = sc.nextLine();\n System.out.println(\"Enter your phoneNo : \");\n long phoneNo = sc.nextLong();\n System.out.println(\"Enter your emailId : \");\n String email = sc.nextLine();\n Contact contact = new Contact(firstName, lastName, address, city, state, zip, phoneNo, email);\n list.add(contact);\n }", "public void addContact() throws IOException {\n\t\t\n\t\tContact contact = Contact.getContact();\n\t\twhile (checkPhone(contact.getPhone()) != -1) {\n\t\t\tSystem.out.println(\"Phone already exits. Please input again!\");\n\t\t\tcontact.setPhone(getString(\"phone\"));\n\t\t}\n\t\tlist.add(contact);\n\t\tSystem.out.println(\"---Added\");\n\t}", "public void addContact(Contact contact) {\n\t\tif (!isContactExist(findContact(contact.getName()))) {\n\t\t\tcontacts.add(contact);\n\t\t\tSystem.out.println(\"Contact added\");\n\t\t}\n\t\telse System.out.println(\"Contact already exists\");\n\t}", "@Override\n public void addContact(User contact) {\n contacts.add(contact);\n\n // overwrite the whole list of contacts in the file\n writeToFile();\n }", "protected void add(Contact contact) throws IllegalArgumentException {\n\t\t// Concatenate my lists.\n\t\tsuper.add(contact);\n\t}", "@Override\n\tpublic String addContact(Contact contact) {\n\t\treturn null;\n\t}", "public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }", "void addContact(String name, String number);", "void addContact(String name,String number);", "@Override\n public void onClick(View v) {\n String name = nameEditText.getText().toString();\n String phoneNumber = phoneEditText.getText().toString();\n\n //create a Contact Object to add\n Contact contact1 = new Contact(name, phoneNumber);\n\n //add contact1 object to database\n int temp = 0;\n for (Contact contact : contacts) {\n if (contact.getName().equals(name) && contact.getPhoneNumber().equals(phoneNumber)){\n Toast.makeText(MainActivity.this, \"This contact does exists\", Toast.LENGTH_SHORT).show();\n temp = 1;\n break;\n }\n if (contact.getName().equals(name)) {\n replaceContact(contact1);\n temp = 1;\n break;\n }\n }\n if (temp == 0) {\n addContact(contact1);\n }\n }", "public void addContacts() {\r\n\t\t\r\n\t\t\r\n\t}", "public void addContact(Contact contact){\n\n Contact qContact = contactRepository.findByNameAndLastName(contact.getName(), contact.getLastName());\n\n if(qContact != null ){\n qContact.getPhones().addAll(contact.getPhones());\n contact = qContact;\n }\n contactRepository.save(contact);\n }", "public boolean addContact(Contact c)\n {\n if (!c.addAppointment(this))\n return false;\n \n invitedPeople.add(c);\n return true;\n }", "public void addContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Add Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.printf(\"%nFirst Name: \");\n\t\tString firstName = s.next();\n\t\tSystem.out.printf(\"%nLast Name: \");\n\t\tString lastName = s.next();\n\t\tSystem.out.printf(\"%nPhone Number: \");\n\t\tString phoneNumber = s.next();\n\t\tSystem.out.printf(\"%nEmail Address: \");\n\t\tString emailAddress = s.next();\n\t\tSystem.out.printf(\"%nCompany: \");\n\t\tString company = s.next();\n\t\tBusinessContact b = new BusinessContact(firstName, lastName,\n\t\t\t\tphoneNumber, emailAddress, company);\n\t\tcontacts.add(b);\n\t}", "public static void addContact ( LinkedList contactsList ) { \n\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's first and last name: \" ); // prompt\n\t\tString [ ] firstAndLastName = CheckInput.getString( ).split( \" \" ); // split the name into first and last\n\t\tString firstName = firstAndLastName [ 0 ]; // assign\n\t\tString lastName = firstAndLastName [ 1 ];\n\t\tSystem.out.print ( \"Enter the contact's phone number: \" );\n\t\tString phoneNumber = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's address: \" );\n\t\tString address = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's city: \" );\n\t\tString city = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's zip code: \" );\n\t\tString zip = CheckInput.getString( );\n\t\tcontactsList.add ( new Contact ( firstName, lastName, phoneNumber, address, city, zip ) );\n\t\t// adds to the LinkedList a new contact with the user given information\n\t\tSystem.out.print ( \"\\n\" );\n\t}", "public boolean updateContactList(String contactId, String userId){\n Organizer og = (Organizer)idToPerson.get(userId);\n if(!og.getContactList().contains(contactId)) { // checking if they are not currently a contact\n og.addContact(contactId);\n return true;\n }\n return false;\n }", "public void addContacts(List<Contact> contactList){\n for(Contact contact:contactList){\n addContact(contact);\n }\n }", "public void addContact(Contact contact) {\n if (contact != null) {\n this.contacts.add(contact);\n }\n }", "public org.hl7.fhir.Contact addNewContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Contact target = null;\n target = (org.hl7.fhir.Contact)get_store().add_element_user(CONTACT$6);\n return target;\n }\n }", "@Override\r\n\tpublic boolean addContact(ContentResolver contentResolver, ContactInfo cInfo) {\r\n\t\tif(cInfo != null \r\n\t\t\t\t&& cInfo.getDisplayName() != null \r\n\t\t\t\t&& cInfo.getPhoneNumber() != null) {\r\n\t\t\t//Add name\r\n\t\t\tContentValues values = new ContentValues();\r\n\t\t\tvalues.put(People.NAME, cInfo.getDisplayName());\r\n\t\t\tUri uri = contentResolver.insert(People.CONTENT_URI, values);\r\n\t\t\tLog.d(\"ANDROID\", uri.toString());\r\n\t\t\t\r\n\t\t\t//Add Number\r\n\t\t\tUri numberUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY);\r\n\t\t\tvalues.clear();\r\n\t\t\tvalues.put(Phones.TYPE, Phones.TYPE_MOBILE);\r\n\t\t\tvalues.put(People.NUMBER, cInfo.getPhoneNumber());\r\n\t\t\tcontentResolver.insert(numberUri, values);\r\n\t\t\treturn true;\r\n\t\t}\t\t\r\n\t\treturn false;\r\n\t}", "void addContact(String name, int number)\r\n\t{\r\n\t\t\r\n\t\tContact a = new Contact(number,name);\r\n\t\tthis.add(a);\r\n\t}", "public void addContact(String id) {\r\n\t\tif (!contacts.contains(id)) {\r\n\t\t\tcontacts.add(id);\r\n\t\t}\r\n\t}", "public void add(message contact) {\n chats.add(contact);\n notifyItemChanged(chats.size() - 1);\n }", "public void contact_add(contact contact){\n \t\n \tif (contact.type_get() == contact.TYPE_PERSON) {\n \t\tcontact check_contact = contact_get_person_by_address(contact.address_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t} else {\n \t\tcontact check_contact = contact_get_group_by_address_and_group(contact.address_get(), contact.group_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t}\n \t\n \t// 1. get reference to writable DB\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_CONTACT_ADDRESS, contact.address_get());\n \tvalues.put(KEY_CONTACT_NAME, contact.name_get());\n \tvalues.put(KEY_CONTACT_TYPE, contact.type_get());\n \tvalues.put(KEY_CONTACT_KEYSTAT, contact.keystat_get());\n \tif (contact.type_get() == contact.TYPE_GROUP)\n \t\tvalues.put(KEY_CONTACT_MEMBERS, contact.members_get_string());\n \tvalues.put(KEY_CONTACT_LASTACT, contact.time_lastact_get());\n \tvalues.put(KEY_CONTACT_UNREAD, contact.unread_get());\n \tvalues.put(KEY_CONTACT_GROUP, contact.group_get());\n\n \t// 3. insert\n \tdb.insert(TABLE_CONTACT, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }", "public void addContactItem(Contact cItem) {\n if (!hasContact(cItem)) {\n return;\n }\n // Update visual list\n contactChanged(cItem, true);\n }", "@Override\r\n\tpublic void addContact(Contact contact) {\n\t\tsuper.save(contact);\r\n\t}", "public void addContact() {\n System.out.println(\"enter a number to how many contacts you have to add\");\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n\n for (int i = 1; i <= number; i++) {\n Contact person = new Contact();\n System.out.println(\"you can countinue\");\n System.out.println(\"enter your first name\");\n String firstName = scanner.next();\n if (firstName.equals(person.getFirstName())) {\n try {\n throw new InvalidNameException(\"duplicate name\");\n } catch (InvalidNameException e) {\n e.printStackTrace();\n }\n } else {\n person.setFirstName(firstName);\n }\n System.out.println(\"enter your last name\");\n String lastName = scanner.next();\n person.setLastName(lastName);\n System.out.println(\"enter your address :\");\n String address = scanner.next();\n person.setAddress(address);\n System.out.println(\"enter your state name\");\n String state = scanner.next();\n person.setState(state);\n System.out.println(\"enter your city :\");\n String city = scanner.next();\n person.setCity(city);\n System.out.println(\"enter your email\");\n String email = scanner.next();\n person.setEmail(email);\n System.out.println(\"enter your zip :\");\n int zip = scanner.nextInt();\n person.setZip(zip);\n System.out.println(\"enter your contact no\");\n int mobile = scanner.nextInt();\n person.setPhoneNo(mobile);\n list.add(person);\n }\n System.out.println(list);\n }", "public static void addContact() {\n boolean isBadEmail = true;\n boolean keepLooping = true;\n myScanner.nextLine();\n System.out.println(\"Input contact first name: \\t\");\n String firstName = myScanner.nextLine();\n firstName = firstName.substring(0,1).toUpperCase() + firstName.substring(1).toLowerCase();\n System.out.println(\"Input contact last name: \\t\");\n String lastName = myScanner.nextLine();\n lastName = lastName.substring(0,1).toUpperCase() + lastName.substring(1).toLowerCase();\n String email = \"\";\n do {\n System.out.println(\"Input contact email: \\t\");\n email = myScanner.nextLine();\n if(email.contains(\"@\") && email.contains(\".\")) {\n isBadEmail = false;\n } else {\n System.out.println(\"Please input a proper email address.\");\n }\n } while (isBadEmail);\n String phone = \"\";\n do {\n System.out.println(\"Input contact ten digit phone number without any special characters: \\t\");\n try {\n long phoneNumber = Long.valueOf(myScanner.next());\n if(Long.toString(phoneNumber).length() == 10) {\n keepLooping = false;\n phone = Long.toString(phoneNumber);\n }\n } catch(Exception e) {\n System.out.println(\"Invalid input.\");\n }\n } while(keepLooping);\n Contact newContact = new Contact(firstName, lastName, phone, email);\n contactList.add(newContact.toContactString());\n System.out.println(\"You added: \" + newContact.toContactString());\n writeFile();\n }", "public boolean add(AdressEntry e) {\r\n if (addressEntryList.contains(e)) {\r\n System.out.println(\"Record already exists!!\");\r\n System.out.println(addressEntryList.get((addressEntryList.indexOf(e))));\r\n System.out.println();\r\n return false;\r\n } else {\r\n addressEntryList.add(e);\r\n addressEntryList.sort(Comparator.comparing(AdressEntry::getLastName));\r\n System.out.print(\"Thank you the following contact has been added to your address book:\\n \");\r\n System.out.println(e);\r\n }\r\n System.out.println();\r\n return true;\r\n }", "public void add() {\n\t\ttry (RandomAccessFile raf = new RandomAccessFile(\"Address.dat\", \"rw\")) // Create RandomAccessFile object\n\t\t{\n\t\t\traf.seek(raf.length()); // find index in raf file\n\t\t\t // # 0 -> start from 0\n\t\t\t // # 1 -> start from 93 (32 + 32 + 20 + 2 + 5 + '\\n')\n\t\t\t // # 2 -> start from 186 (32 + 32 + 20 + 2 + 5 + '\\n') * 2\n\t\t\t // # 3 -> start from 279 (32 + 32 + 20 + 2 + 5 + '\\n') * 3\n\t\t \twrite(raf); // store the contact information at the above position\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IndexOutOfBoundsException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void addContact(String on_cloudkibo, String lname, String phone, String uname, String uid, String shareddetails,\r\n \t\tString status) {\r\n\r\n\r\n ContentValues values = new ContentValues();\r\n //values.put(Contacts.CONTACT_FIRSTNAME, fname); // FirstName\r\n //values.put(Contacts.CONTACT_LASTNAME, lname); // LastName\r\n values.put(Contacts.CONTACT_PHONE, phone); // Phone\r\n values.put(\"display_name\", uname); // UserName\r\n values.put(Contacts.CONTACT_UID, uid); // Uid\r\n values.put(Contacts.CONTACT_STATUS, status); // Status\r\n values.put(Contacts.SHARED_DETAILS, shareddetails); // Created At\r\n values.put(\"on_cloudkibo\", on_cloudkibo);\r\n\r\n // Inserting Row\r\n try {\r\n// if(getContactName(phone) != null){\r\n// SQLiteDatabase db = this.getWritableDatabase();\r\n// db.update(Contacts.TABLE_CONTACTS,values,\"phone='\"+phone+\"'\",null);\r\n// db.close();\r\n// }else{\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n db.replace(Contacts.TABLE_CONTACTS, null, values);\r\n db.close();\r\n// }\r\n } catch (android.database.sqlite.SQLiteConstraintException e){\r\n Log.e(\"SQLITE_CONTACTS\", uname + \" - \" + phone);\r\n ACRA.getErrorReporter().handleSilentException(e);\r\n }\r\n // Closing database connection\r\n }", "public void AddContact(View view){\n Utils.Route_Start(ListContact.this,Contato.class);\n // Notificar, para atualizar a lista.\n\n }", "public static void editContact() {\n System.out.println(\"Enter first name: \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName)) {\n list.remove(i);\n addContact();\n } else {\n System.out.println(\"No data found in Address Book\");\n }\n }\n }", "public static void addContacts(ContactFormData formData) {\n long idValue = formData.id;\n if (formData.id == 0) {\n idValue = ++currentIdValue;\n }\n Contact contact = new Contact(idValue, formData.firstName, formData.lastName, formData.telephone);\n contacts.put(idValue, contact);\n }", "public void insert(Contact c);", "public void addEntry(AddressEntry contact) {\r\n insertAlphabeticalOrder(contact);\r\n }", "public void addContact(ContactBE contact) {\n ContentValues values = getContentValues(contact);\n mDatabase.insert(ContactTable.NAME, null, values);\n }", "public void addContacts(Contact contact) {\n SQLiteDatabase db = dbOpenHelper.getReadableDatabase();\n ContentValues values = new ContentValues();\n\n values.put(KEY_FNAME, contact.getFName());\n values.put(KEY_POTO, contact.getImage());\n\n\n db.insert(TABLE_CONTACTS, null, values);\n db.close();\n }", "public void addContact(Contact contact) {\n SQLiteDatabase db = null;\n try {\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n //values.put(KEY_ID, contact.getID()); // Contact ID id identity\n values.put(KEY_DEVICE_ID, contact.getDeviceID()); // Contact DeviceID\n values.put(KEY_DISPLAY_WIDTH, contact.getDisplayWidth()); // Contact DisplayWidth\n values.put(KEY_DISPLAY_HEIGHT, contact.getDisplayHeight()); // Contact DisplayHeight\n values.put(KEY_SURNAME, contact.getSurname()); // Contact Surname\n values.put(KEY_IP, contact.getIP()); // Contact IP\n values.put(KEY_HOST_NAME, contact.getHostName()); // Contact hostName\n values.put(KEY_AVATAR, contact.getAvatar()); // Contact Avatar\n values.put(KEY_OSTYPE, contact.getOSType()); // Contact OSType\n values.put(KEY_VER_NO, contact.getVersionNumber()); // Contact versionNumber\n values.put(KEY_PH_NO, contact.getPhoneNumber()); // Contact PhoneNumber\n values.put(KEY_SERVICE_NAME, contact.getServiceName()); // Contact ServiceName\n values.put(KEY_IS_ONLINE, contact.getOnline()?1:0); // Contact PhoneNumber\n\n // Inserting Row\n db.insert(TABLE_CONTACT, null, values);\n }catch (Exception e){\n Log.e(TAG,\"addContact:\"+e.getMessage());\n throw e;\n }finally {\n if(db!= null && db.isOpen())\n db.close(); // Closing database connection\n }\n\n }", "public boolean containsContact(Contact c);", "private static boolean addPhone(String name, int phone) {\n\t\t//We find the user\n\t\tint position = findContact(name);\n\t\tif (position==-1) return false;\n\t\telse {\n\t\t\t//Maybe the user has this phone already\n\t\t\tboolean added = contacts[position].addNumber(phone);\n\t\t\treturn added;\n\t\t}\n\t}", "public static void addContact(Contact contact)\n\t{\t\t\n\t\ttry(PrintWriter file = new PrintWriter(new BufferedWriter(new FileWriter(\"contacts.txt\", true)))) {\n\t\t file.println(contact.getName().toUpperCase() + \"##\" + contact.getPhone().toUpperCase());\n\t\t}catch (Exception ex) {}\n\t}", "public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }", "public void addMoreContacts(List<Contact> newContacts) {\n mContacts.addAll(newContacts);\n submitList( new ArrayList(mContacts)); // DiffUtil takes care of the check\n }", "public void addContactPeupler(IContact contact) {\n\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"*******************je suis dans addContact peupler *******************************************\");\n\t\t\tsessionFactory.getCurrentSession().save(contact);\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private int findContact(Contact contact) {\n return this.myContacts.indexOf(contact); //If exists in the ArrayList, will return 0 or greater. If not, will return a number less than 0.\n }", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "public static Collection add() {\n\t\tString firstName, lastName, address, city, state, phoneNo, email; // Attributes to be added\n\t\tlong zipCode;\n\n\t\t// asking user input\n\t\tSystem.out.println(\"Please enter details to be added.\");\n\t\tSystem.out.print(\"First Name: \");\n\t\tfirstName = sc.next();\n\t\tSystem.out.print(\"Last Name: \");\n\t\tlastName = sc.next();\n\n\t\t// Checking for duplicates\n\t\tif (record.stream().anyMatch(obj -> obj.firstName.equals(firstName))\n\t\t\t\t&& record.stream().anyMatch(obj -> obj.lastName.equals(lastName))) {\n\t\t\tSystem.out.println(\"This contact already existes. Resetting\");\n\t\t\tadd();\n\t\t\treturn null;\n\t\t}\n\n\t\tSystem.out.print(\"Address: \");\n\t\taddress = sc.next();\n\t\tSystem.out.print(\"City: \");\n\t\tcity = sc.next();\n\t\tSystem.out.print(\"State: \");\n\t\tstate = sc.next();\n\t\tSystem.out.print(\"ZipCode: \");\n\t\tzipCode = sc.nextLong();\n\t\tSystem.out.print(\"Phone No.: \");\n\t\tphoneNo = sc.next();\n\t\tSystem.out.print(\"Email: \");\n\t\temail = sc.next();\n\n\t\t// saving as new entry\n\t\tCollection entry = new Collection(firstName, lastName, address, city, state, zipCode, phoneNo, email);\n\t\tperson_cityMap.put(city, entry);\n\t\tperson_cityMap.put(state, entry);\n\t\treturn entry; // returning entry to main\n\t}", "void addContact(Contact contact) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, contact.get_name()); // Contact Name\n values.put(KEY_AUDIOS, contact.get_audios());\n values.put(KEY_CONTENTS, contact.get_contents());\n values.put(KEY_CAPTURED_IMAGE, contact.get_captured_image());\n values.put(KEY_DELETE_VAR, contact.get_delelte_var());\n values.put(KEY_GALLERY_IMAGE, contact.get_gallery_image());\n values.put(KEY_PHOTO, contact.get_photo());\n values.put(KEY_RRECYCLE_DELETE, contact.get_recycle_delete());\n\n // Inserting Row\n db.insert(TABLE_CONTACTS, null, values);\n //2nd argument is String containing nullColumnHack\n db.close(); // Closing database connection\n }", "public void updateContact() {\r\n\t\tSystem.out.println(\"enter the name of the contact whose details are to be updated\");\r\n\t\tString name = scanner.nextLine();\r\n\t\tContact existing = service.getContact(name); //get the existing contact details from service<-dao\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"1. keep the same address\\n2. update the address\");\r\n\t\tint choice = Integer.parseInt(scanner.nextLine());\r\n\t\tString address;\r\n\t\tif(choice==1) {\r\n\t\t\taddress=existing.getAddress();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new address\");\r\n\t\t\taddress = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t//mobile number updation\r\n\t\tSystem.out.println(\"1. keep the same mobile number(s)\\n2. add new mobile number\\n3.remove existing added number\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString mobileNumber[];\r\n\t\t\r\n\t\t//if the user wants to keep same mobile number(s)\r\n\t\tif(choice==1) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to add a new mobile number to already existing \r\n\t\telse if(choice==2) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter new mobile number\");\r\n\t\t\tString newNumber = scanner.nextLine();\r\n\t\t\tif(numberList.contains(newNumber)) {\r\n\t\t\t\tSystem.out.println(\"the number is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.add(newNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to remove some number from existing numbers\r\n\t\telse {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter mobile number to remove\");\r\n\t\t\tString removingNumber = scanner.nextLine();\r\n\t\t\tif(!numberList.contains(removingNumber)) {\r\n\t\t\t\tSystem.out.println(\"no such mobile number exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.remove(removingNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the profile picture\r\n\t\tSystem.out.println(\"1. keep the same image\\n2. update the image\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString imageReference;\r\n\t\tif(choice==1) {\r\n\t\t\timageReference=existing.getImageReference();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new image path\");\r\n\t\t\timageReference = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the date of birth\r\n\t\tSystem.out.println(\"1. keep the same date of birth\\n2. update the date of birth\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tLocalDate dateOfBirth;\r\n\t\tif(choice==1) {\r\n\t\t\tdateOfBirth=existing.getDateOfBirth();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new date of birth\");\r\n\t\t\tdateOfBirth = LocalDate.parse(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the email - same logic as that of updating mobile number\r\n\t\tSystem.out.println(\"1. keep the same email Id(s)\\n2. add new email Id\\n3.remove existing email Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString email[];\r\n\t\tif(choice==1) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t}\r\n\t\telse if(choice==2) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter new email Id\");\r\n\t\t\tString newEmail = scanner.nextLine();\r\n\t\t\tif(emailList.contains(newEmail)) {\r\n\t\t\t\tSystem.out.println(\"the email is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.add(newEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter email to remove\");\r\n\t\t\tString removingEmail = scanner.nextLine();\r\n\t\t\tif(!emailList.contains(removingEmail)) {\r\n\t\t\t\tSystem.out.println(\"no such email exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.remove(removingEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//updating the group id \r\n\t\tSystem.out.println(\"1. keep the same group Id\\n2. update the group Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tint groupId;\r\n\t\tif(choice==1) {\r\n\t\t\tgroupId = existing.getGroupId();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new group Id\");\r\n\t\t\tshowGroups(service); \t\t\t\t\t//this is static method which shows the available groups\r\n\t\t\tgroupId = Integer.parseInt(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t//setting up the contact object \r\n\t\tContact updated = new Contact(name, address, mobileNumber, imageReference, dateOfBirth, email, groupId);\r\n\t\t\r\n\t\t//calling the service update method which calls the DAO to update the contact\r\n\t\tint rowsEffected = service.updateExistingContact(existing, updated);\r\n\t\tSystem.out.println(rowsEffected+\" row(s) updated\");\r\n\t\t\r\n\t}", "public void add (String nameComp) {\n if(!contains(nameComp))\n listWantedCompany.add(nameComp);\n }", "public void edit_contact_list(String old_contact, String new_contact)\n {\n String[] current_data = read();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n PrintWriter writer = new PrintWriter(dir);\n\n for (int i = 0; i < current_data.length; i++)\n {\n String line = current_data[i];\n if (line != null && !line.contains(old_contact))\n {\n writer.println(line);\n }\n }\n writer.println(new_contact);\n writer.close();\n }catch (Exception ex)\n {\n //debug2(\"write_contact_list failure\");\n }\n }", "public void addRecipient(){\n //mRATable.insert();\n }", "public static void fillList ( LinkedList contactsList ) {\n\t\ttry { // needed to read in files\n\t\t\tScanner read = new Scanner ( new File ( \"contacts.txt\" ) );\n\t\t\tdo {\n\t\t\t\tString [ ] contactData = read.nextLine ( ).split ( \",\" ); // create an array to have the 0. first name, 1. last name, 2. phone, 3. address, 4. city, 5. zip stored\n\t\t\t\tcontactsList.add ( new Contact ( contactData [ 0 ], contactData [ 1 ], contactData [ 2 ], contactData [ 3 ], contactData [ 4 ], contactData [ 5 ] ) ); \n\t\t\t\t// add the new contact with values to set to to the LinkedList\n\t\t\t} while ( read.hasNextLine ( ) ); // as long as there is another line to read in\n\t\t} catch ( FileNotFoundException fnf ) {\n\t\t\tSystem.out.println ( \"File was not found\" );\n\t\t}\n\t}", "public static void addContacts(final Context context, final String parseId){\n // Remove from server\n // get the default preference list\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n // get current user's contact list\n ParseQuery<ParseObject> query = ParseQuery.getQuery(context.getString(R.string.test_parse_class_key));\n String objectId = prefs.getString(context.getString(R.string.user_id_key), \"\");\n query.getInBackground(objectId, new GetCallback<ParseObject>() {\n public void done(ParseObject user_profile, ParseException e) {\n if (e == null) {\n // convert the json contact list to String set\n JSONArray contactsJSONList = user_profile.getJSONArray(context.getString(R.string.user_contacts_key));\n if (contactsJSONList != null) {\n user_profile.put(context.getString(R.string.user_contacts_key), contactsJSONList.put(parseId));\n user_profile.saveInBackground();\n }\n }\n }\n });\n }", "private boolean isContactExist(String name) {\n boolean existance;\n existance = contactList.stream()\n .anyMatch(personElement ->\n personElement.getFirstName().equals(name) ||\n personElement.getLastName().equals(name));\n return existance;\n }", "public boolean addContact(Usuario user1, String contactName) {\n\t\tif (user1 == null)\n\t\t\tif (currentUser != null)\n\t\t\t\tuser1 = currentUser;\n\t\t\telse\n\t\t\t\treturn false;\n\t\tUsuario user2 = null;\n\t\ttry {\n\t\t\tuser2 = CatalogoUsuarios.getInstance().getUser(contactName);\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (user2 != null) {\n\t\t\tif (user1.hasContact(user2.getId()))\n\t\t\t\treturn false;\n\t\t\tint msgId = messageDAO.createMessageList();\n\t\t\tList<Mensaje> messageList = messageDAO.getMessageList(msgId);\n\t\t\t// adds user2 as a contact in user1\n\t\t\tint newId = Id.generateUniqueId();\n\t\t\tContacto contact1 = new ContactoIndividual(newId, msgId, user2.getId(), user2.getName(), user2.getPicture(),\n\t\t\t\t\tuser2.getPhone());\n\t\t\tcontact1.setMessages(messageList);\n\t\t\tcontactDAO.registerContact(contact1);\n\t\t\tuser1.addContact(contact1);\n\t\t\tuserCatalog.modifyUser(user1);\n\t\t\t// adds the user1 as a contact in user2\n\t\t\tnewId = Id.generateUniqueId();\n\t\t\tContacto contact2 = new ContactoIndividual(newId, msgId, user1.getId(), user1.getName(), user1.getPicture(),\n\t\t\t\t\tuser1.getPhone());\n\t\t\tcontact2.setMessages(messageList);\n\t\t\tcontactDAO.registerContact(contact2);\n\t\t\tuser2.addContact(contact2);\n\t\t\tuserCatalog.modifyUser(user2);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean addEmployeeToBillToLocation(Employee emp, String name, String street) {\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tfor(int j = 0; j < companyDirectory.get(i).getLocations().size(); j++) {\r\n\t\t\t\tif(companyDirectory.get(i).getLocations().get(j) instanceof BillTo &&\r\n\t\t\t\tcompanyDirectory.get(i).getName().equals(name) && \r\n\t\t\t\tcompanyDirectory.get(i).getLocations().get(j).getAddress1().equals(street) ) {\r\n\t\t\t\t\treturn companyDirectory.get(i).getLocations().get(j).getEmployees().add(emp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void add(Savable savable) {\n\t\tif (savable instanceof Contact) {\n\t\t\tContact contact = (Contact)savable;\n\t\t\tthis.contacts.put(contact.getId(), contact);\n\t\t}\n\t}", "public void assignAddingContact(final boolean val) {\n addingContact = val;\n }", "public Builder addContactList(com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addContactList(com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addContactList(com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addContactList(com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(value);\n }\n return this;\n }", "public void addContact(String firstName, String lastName,\n\t\t\tString phoneNumber, String emailAddress, String company) \n\t{\n\t\tBusinessContact b = new BusinessContact(firstName, lastName,\n\t\t\t\tphoneNumber, emailAddress, company);\n\t\tcontacts.add(b);\n\t}", "public static void addRecords() {\n\t\t\n\t\ttry {\n\t\t\twhile(fileInput.hasNextLine()) {\n\t\t\t\t// get user input to add contact to list. \n\t\t\t\tSystem.out.print(\"\\n\\nEnter contact first name: \");\t\n\t\t\t\tString firstName = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact last name: \");\n\t\t\t\tString lastName = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact phone number: \"); \n\t\t\t\tString phoneNumber = input.next();\n\t\t\t\tSystem.out.print(\"\\nEnter contact email address: \");\n\t\t\t\tString email = input.next();\n\t\t\t\t\n\t\t\t\tString[] contactInfo = { firstName, lastName, phoneNumber, email };\n\t\t\t\t\n\t\t\t\tList<String> newInput = Arrays.asList(contactInfo);\n\t\t\t\tSystem.out.printf(\"Unsorted array elements: %s%n\", list);\n\t\t\t\t\n\t\t\t\tCollections.sort(list); // sort ArrayList\n\t\t\t\tSystem.out.printf(\"Sorted array elements: %s%n\", list);\n\t\t\t\t\n\t\t\t\t// output new record to file.\n\n\t\t}\n\t\tcatch (FormatterClosedException f) {\n\t\t\tSystem.err.println(\"Error writing to file. Terminating.\"); break;\n\t\t}\n\t\tcatch (NoSuchElementException e) {\n\t\t\tSystem.err.println(\"Invalid input. Please try again.\");\n\t\t\tinput.nextLine(); // discard input so user can try again. \n\t\t}\n\t\t\t\n\t\tSystem.out.println(\"Enter another contact? 0 for no, 1 for yes: \");\n\t\tswitch(input.nextInt()) {\n\t\t\tcase 0: moreInput = false; break;\n\t\t\tcase 1: moreInput = true; break;\n\t\t}\n\t\t\t\n\t\t\t\n\t\t} // end while. \n\n\t\tSystem.out.println();\n\t}", "public void testAddContact() throws NotExistsException {\n\t\tContact contact = new Contact();\n\t\tcontact.setName(\"Jack Sparrow\");\n\t\tcontact.setMobilePhone(\"0438200300\");\n\t\tcontact.setHomePhone(\"03 12345678\");\n\t\tcontact.setWorkPhone(\"03 98765432\");\n\n\t\t// create\n\t\tString newContactId = contactService.addContact(addrBook1, contact).getId();\n\n\t\t// read\n\t\tcontact = contactService.getContactById(newContactId);\n\n\t\t// assert\n\t\tassertEquals(1, contactService.getContacts(addrBook1).size());\n\t\tassertEquals(\"Jack Sparrow\", contact.getName());\n\t\tassertEquals(\"0438200300\", contact.getMobilePhone());\n\t\tassertEquals(\"03 12345678\", contact.getHomePhone());\n\t\tassertEquals(\"03 98765432\", contact.getWorkPhone());\n\t}", "public void addContacts() {\r\n\t\tList<String> numberList= new ArrayList<String>();\r\n\t\tList<String> emailList= new ArrayList<String>();\r\n\t\tSystem.out.println(\"enter the contact name \");\r\n\t\tString name = scanner.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"enter the contact address \");\r\n\t\tString address = scanner.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"enter the contact mobile Number \");\r\n\t\tString number = scanner.nextLine();\r\n\t\tnumberList.add(number);\r\n\t\t\r\n//allowing user to add one or more contact numbers\r\n\t\tString choice=null;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Do you want to add more Number?\");\r\n\t\t\tSystem.out.println(\"yes or no?\");\r\n\t\t\tchoice=scanner.nextLine();\r\n\t\t\tif(choice.equalsIgnoreCase(\"yes\")) {\r\n\t\t\t\tSystem.out.println(\"enter the mobile number\");\r\n\t\t\t\tnumber = scanner.nextLine();\r\n\t\t\t\tnumberList.add(number);\r\n\t\t\t}\r\n\t\t}while(choice.equalsIgnoreCase(\"yes\"));\r\n\t\t\r\n\t\tString[] mobileNumber = numberList.toArray(new String[0]);\r\n\t\t\r\n\t\t\r\n\r\n\t\tSystem.out.println(\"choose the profile picture\");\r\n\t\tString imageReference = scanner.nextLine();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"enter your date of birth as yyyy-MM-dd\");\r\n\t\tString strDateOfBirth = scanner.nextLine();\r\n\t\tLocalDate dateOfBirth = LocalDate.parse(strDateOfBirth);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"enter the contact email Id \");\r\n\t\tString email = scanner.nextLine();\r\n\t\temailList.add(email);\r\n\t\t\r\n\t\t\r\n//allowing user to add one or more email ids\r\n\t\tchoice=null;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Do you want to add more email Id?\");\r\n\t\t\tSystem.out.println(\"yes or no?\");\r\n\t\t\tchoice=scanner.nextLine();\r\n\t\t\tif(choice.equalsIgnoreCase(\"yes\")) {\r\n\t\t\t\tSystem.out.println(\"enter the email Id\");\r\n\t\t\t\temail = scanner.nextLine();\r\n\t\t\t\temailList.add(email);\r\n\t\t\t}\r\n\t\t}while(choice.equalsIgnoreCase(\"yes\"));\r\n\t\t\r\n\t\tString emailArray[]= emailList.toArray(new String[0]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"select the group you want to add the contact to\");\r\n\t\tshowGroups(service);\r\n\t\tint groupId = Integer.parseInt(scanner.nextLine());\r\n\t\t\r\n\t\t//setting up the contact object with the user defined details\r\n\t\tContact contact = new Contact(name, address, mobileNumber, imageReference, dateOfBirth, emailArray, groupId); \r\n\t\t\r\n\t\t//calling the addContact service which in turn calls add method of DAO\r\n\t\tint rowsAdded = service.addContact(contact);\r\n\t\tSystem.out.println(rowsAdded+\" rows added \");\r\n\t}", "@Override\n\tpublic void add(CelPhone phone) {\n\t\t\n\t}", "public void updateListView() {\n listView = findViewById(R.id.list_view);\n contactList = new ArrayList<>();\n Cursor cursor = db.getAllContacts();\n\n if (cursor.getCount() == 0) {\n contactListAdaptor.clear();\n contactListAdaptor.notifyDataSetChanged();\n Toast.makeText(this, \"No contacts added!\", Toast.LENGTH_SHORT).show();\n } else {\n while (cursor.moveToNext()) {\n Pair<String, String> contact = new Pair<>(cursor.getString(1), cursor.getString(2));\n contactList.add(contact);\n }\n contactListAdaptor = new ContactListAdaptor(this, contactList, this);\n listView.setAdapter(contactListAdaptor);\n }\n }", "@Override\n public Contact addContact(String firstName, String secondName, String fathersName,\n String mobilePhoneNumber, String homePhoneNumber,\n String homeAddress, String email, long userId) {\n\n Contact contact = new Contact(firstName, secondName, fathersName, mobilePhoneNumber,\n homePhoneNumber, homeAddress, email, userRepository.findOne(userId));\n\n contactRepository.save(contact);\n return null;\n }", "public void addEntry(AddressBookEntry entry) {\n addressList.add(entry);\n }", "public static void updateContact ( LinkedList contactsList ) { \n\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's first and last name: \" ); // prompt\n\t\tString [ ] firstAndLastName = CheckInput.getString ( ).split( \" \"); // split the input into an array for first and last name\n\t\tString firstName = firstAndLastName [ 0 ];\n\t\tString lastName = firstAndLastName [ 1 ];\n\t\tint index = contactsList.search ( firstName, lastName ); // returns the index of the use target\n\t\tif ( index >= 0 ) { // if it's not negative, which would mean the target doesn't exist\n\t\t\tint menuChoice = dispAndGetMenu ( 4 ); // display submenu 4 and get choice of which category to change\n\t\t\tSystem.out.print ( \"\\n\" + \"Set it to: \");\n\t\t\tif ( menuChoice == 1 ) { // change the category corresponding to the user's choice\n\t\t\t\tcontactsList.get( index + 1 ).setFirst ( CheckInput.getString ( ) ); \n\t\t\t} else if ( menuChoice == 2 ) {\n\t\t\t\tcontactsList.get( index + 1).setLast ( CheckInput.getString ( ) );\n\t\t\t} else if ( menuChoice == 3 ) {\n\t\t\t\tcontactsList.get( index + 1 ).setPhone ( CheckInput.getString ( ) );\n\t\t\t} else if ( menuChoice == 4 ) {\n\t\t\t\tcontactsList.get( index + 1 ).setAddress ( CheckInput.getString ( ) );\n\t\t\t} else if ( menuChoice == 5 ) {\n\t\t\t\tcontactsList.get( index + 1 ).setCity ( CheckInput.getString ( ) );\n\t\t\t} else {\n\t\t\t\tcontactsList.get( index + 1 ).setZip ( CheckInput.getInt ( ) );\n\t\t\t}\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t}\n\t}", "public void addContact(String tel, String corr){\n\t\n\t\tif(!emergencia_esta_Ocupado[0]){\n\t\t\taddView(0,tel,corr);\n\t\t}else if(!emergencia_esta_Ocupado[1]){\n\t\t\taddView(1,tel,corr);\n\t\t}\n\t}", "public void llenarContactos() {\n\t\t SharedPreferences prefs = getSharedPreferences(\"MisPreferenciasTrackxi\",Context.MODE_PRIVATE);\n String telemer = prefs.getString(\"telemer\", null);\n String correoemer = prefs.getString(\"correoemer\", null);\n String telemer2 = prefs.getString(\"telemer2\", null);\n String correoemer2 = prefs.getString(\"correoemer2\", null);\n \n\t\taddContact(telemer,correoemer);\n\n\t\tif(telemer2!=null){\n\t\t\taddContact(telemer2,correoemer2);\n\t\t}\n\t}", "public void addContact(String name, String number) {\n\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"./src/data/contactInfo.text\", true));\n\t\t\twriter.write(name);\n\t\t\twriter.write(\" | \");\n\t\t\twriter.write(number);\n\t\t\twriter.write(\" |\");\n\t\t\twriter.newLine();\n\t\t\twriter.close();\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addContact(Contact contact) {\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_ID, contact.get_id());\n\t\tvalues.put(KEY_USER_FIRST_NAME, contact.getFirst_name());\n\t\tvalues.put(KEY_USER_LAST_NAME, contact.getLast_name());\n\t\tvalues.put(KEY_USER_NAME, contact.getUser_name());\n\t\tvalues.put(KEY_USER_PWD, contact.getPwd());\n\t\tvalues.put(KEY_USER_CONFIRMPWD, contact.getConfirm_pwd());\n\t\tvalues.put(KEY_PH_NO, contact.getPhone_number());\n\t\tvalues.put(KEY_GENDER, contact.getGenderValue());\n\t\tvalues.put(KEY_ADDR_ONE, contact.getAddr_1());\n\t\tvalues.put(KEY_ADDR_TWO, contact.getAddr_2());\n\t\tvalues.put(KEY_CITY, contact.getCity());\n\t\tvalues.put(KEY_STATE, contact.getState());\n\t\tvalues.put(KEY_ZIP, contact.getZipcode());\n\t\tvalues.put(KEY_DOB, contact.getDob());\n\n\t\t// Inserting Row\n\t\tmSqLiteDatabase.insert(USERDETAILS_TABLE, null, values);\n\t\t// mSqLiteDatabase.close(); // Closing database connection\n\t}", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "private void addFriendList(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFriendListIsMutable();\n friendList_.add(value);\n }", "public void addContact(Addendance_DB_Model contact) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_COMP_ID, contact.get_CompId()); // Addendance_DB_Model Name\n\t\tvalues.put(KEY_DATETIME, contact.get_DateTime());\n\t\tvalues.put(KEY_EMP_ID,contact.get_EmpId());\n\t\tvalues.put(KEY_IBEACON_ID,contact.get_IbeaconId());// Addendance_DB_Model Phone\n\t\tvalues.put(KEY_Status,contact.getStatus());\n\t\tvalues.put(KEY_Latitude,contact.getLatit());\n\t\tvalues.put(KEY_Longitude,contact.getLogni());\n\t\t// Inserting Row\n\t\tdb.insert(TABLE_CONTACTS, null, values);\n\t\tdb.close(); // Closing database connection\n\t}", "public void addContact(String name, String number, String picture){\r\n theContacts.put(name, new Details());\r\n theContacts.get(name).addDetails(number, picture);\r\n }", "public abstract boolean ContainsContactObjects();", "public Builder addContactList(\n int index, com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(index, value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addContactList(\n int index, com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(index, value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addContactList(\n int index, com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(index, value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(index, value);\n }\n return this;\n }", "public Builder addContactList(\n int index, com.ubtrobot.phone.PhoneCall.Contact value) {\n if (contactListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureContactListIsMutable();\n contactList_.add(index, value);\n onChanged();\n } else {\n contactListBuilder_.addMessage(index, value);\n }\n return this;\n }", "com.spirit.crm.entity.ClienteContactoIf addClienteContacto(com.spirit.crm.entity.ClienteContactoIf model) throws GenericBusinessException;", "org.apache.xmlbeans.XmlObject addNewContactMeans();", "public synchronized boolean addReceiver( IReceiveMessage receiver, \n Object name )\n {\n if ( receiver == null )\n {\n System.out.println(\"Warning: null receiver in \"\n + center_name + \" MessageCenter.addReceiver()\");\n return false;\n }\n\n if ( name == null )\n {\n System.out.println(\"Warning: null message name in \"\n + center_name + \" MessageCenter.addReceiver()\");\n return false;\n }\n\n synchronized( lists_lock )\n {\n Vector<IReceiveMessage> list = receiver_table.get( name );\n if ( list == null )\n {\n list = new Vector<IReceiveMessage>();\n receiver_table.put( name, list );\n }\n\n boolean already_in_list = false;\n int i = 0;\n while ( i < list.size() && !already_in_list )\n {\n if ( list.elementAt(i) == receiver )\n already_in_list = true;\n i++;\n }\n\n if ( already_in_list )\n {\n System.out.println(\"Warning: receiver already in list in \"\n + center_name + \" MessageCenter.addReceiver()\");\n }\n else\n list.add( receiver );\n }\n\n return true;\n }", "public boolean checkContacts() \n\t{\n\t\tif (this.contacts.size() < 1) \n\t\t{\n\t\t\tSystem.out.printf(\"%nNo Contacts Stored%n\");\n\t\t\treturn false;\n\t\t} else \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "private PageAction getAddToContactsAction() {\n return new PageAction() {\n @Override\n public void run() {\n final Transfer transfer = data.getTransfer();\n if(transfer != null && transfer.getBasicMember() != null) { \n contactService.saveContact(transfer.getBasicMember().getId(), new BaseAsyncCallback<Contact>() {\n @Override\n public void onSuccess(Contact result) {\n Parameters params = new Parameters();\n params.add(ParameterKey.ID, result.getMember().getId());\n params.add(ParameterKey.SAVE, true);\n Navigation.get().go(PageAnchor.CONTACT_DETAILS, params);\n } \n }); \n } \n }\n @Override\n public String getLabel() { \n return messages.addToContacts();\n } \n };\n }", "public void loadContactListToView(){\r\n\t\ttry {\r\n\t\t\tclientView.clearContactList();\r\n\t\t\tHashMap <Long, String> contactList = userModel.getContactList().getClReader().getContactList();\r\n\t\t\tIterator iter = contactList.entrySet().iterator();\r\n\t\t\tMap.Entry <Long, String> pair;\r\n\t\t\tint i =0;\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSystem.out.println(i++);\r\n\t\t\t\tpair = (Map.Entry <Long, String>)iter.next();\r\n\t\t\t\t\tclientView.addNewUserToContactList(pair.getValue()+\" \"+pair.getKey());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tclientView.showMsg(\"Contact list can't be loaded\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean addCard(VentraCard card){\n \tboolean isExist = true;\n \t\n \tfor(int i=0; i<allCards.size(); i++ ) {\n \t\tif(card.getCardNumber() == allCards.get(i).getCardNumber()\n \t \t&& card.getPhoneNumber().equals(allCards.get(i).getPhoneNumber())) {\n \t\t\tisExist = false;\n \t\t}\t\n \t}\n \tif(isExist == true) { // if(isExist)\n \t\tallCards.add(card);\t\n \t\treturn true;\n \t}\n \t\n return false;\n }", "public void addAddress(String name,String phone,String email,String company,String lover,String child1,String child2){\n\t\t//Refresh the address book\n\t\tthis.loadAddresses();\n\t\t\n\t\tAddress address=null;\n\t\tfor(Iterator<Address> iter=addresses.iterator();iter.hasNext();){\n\t\t\tAddress temp=iter.next();\n\t\t\tif(temp.getName().trim().equals(name.trim())){\n\t\t\t\t//Found the existed address!\n\t\t\t\taddress=temp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (address == null) {\n\t\t\t//Create new address\n\t\t\taddress = new Address(new Date(), name, phone, email, company, lover, child1, child2);\n\t\t\taddresses.add(address);\n\n\t\t\t// Save to database\n\t\t\ttry {\n\t\t\t\torg.hibernate.Session session = sessionFactory.getCurrentSession();\n\t\t\t\tsession.beginTransaction();\n\t\t\t\tsession.save(address);\n\t\t\t\tsession.getTransaction().commit();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Can't save the message to database.\" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\t//Update the address\n\t\t\taddress.setPhone(phone);\n\t\t\taddress.setEmail(email);\n\t\t\taddress.setCompany(company);\n\t\t\taddress.setLover(lover);\n\t\t\taddress.setChild1(child1);\n\t\t\taddress.setChild2(child2);\n\t\t\tthis.updateAddress(address);\n\t\t}\n\t}", "@Override\r\n\tpublic void addContact(String key, Contact c) {\r\n\t\tTrieNode t = this.root;\r\n\t\tint start = 0;\r\n\t\t//travel trie till you end up on the empty node or key gets exhausted.\r\n\t\twhile(start < key.length() && t!= null && t.getChilds().containsKey(key.charAt(start))){\r\n\t\t\tt = t.getChilds().get(key.charAt(start));\r\n\t\t\tstart ++;\r\n\t\t}\r\n\t\tif(start < key.length()){\r\n\t\t\twhile(start < key.length()){\r\n\t\t\t\tTrieNode newT = new TrieNode();\r\n\t\t\t\tt.getChilds().put(key.charAt(start), newT);\r\n\t\t\t\tt = newT;\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//now add contact to the last trie node\r\n\t\tt.getContacts().add(c);\r\n\t}" ]
[ "0.76639724", "0.76398534", "0.7561159", "0.75073755", "0.7428177", "0.7394034", "0.72175145", "0.720647", "0.71162504", "0.69973284", "0.69655114", "0.69214123", "0.6918025", "0.6915426", "0.69088763", "0.6895937", "0.67449176", "0.6731576", "0.67272395", "0.6705164", "0.663545", "0.6634685", "0.6629798", "0.66208345", "0.6617019", "0.6583845", "0.65816814", "0.65617144", "0.6514504", "0.65102154", "0.64700544", "0.6452109", "0.6372791", "0.63512146", "0.63079286", "0.6299865", "0.62886137", "0.62597954", "0.6236416", "0.62079424", "0.6201321", "0.6200291", "0.6076712", "0.607502", "0.6057899", "0.6049524", "0.60311526", "0.6025167", "0.59676874", "0.5931874", "0.5928958", "0.59094477", "0.5902813", "0.5899605", "0.58951527", "0.589021", "0.5884227", "0.5883681", "0.5858919", "0.58509004", "0.5849202", "0.5838129", "0.5825229", "0.5812515", "0.5808041", "0.5798778", "0.5798778", "0.5798778", "0.5798778", "0.57775885", "0.57488793", "0.57460105", "0.5736562", "0.57297754", "0.5727695", "0.5701472", "0.5690708", "0.5687419", "0.568066", "0.56774366", "0.5676574", "0.56701744", "0.5658648", "0.56546754", "0.56533647", "0.5646998", "0.5633836", "0.56300575", "0.56300575", "0.56300575", "0.56300575", "0.5623726", "0.56233364", "0.56199664", "0.5611715", "0.5596472", "0.5595952", "0.55936915", "0.55769956", "0.5574104" ]
0.7735046
0
/ this method remove a contact with given contactId if present in our list
public boolean remove(String contactID) { for (Contact c : contacts) { if (c.getContactID().equals(contactID)) { contacts.remove(c); System.out.println("Contact removed Successfully!"); return true; } } System.out.println("Contact not present"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean removeContact(String id) {\n\t\treturn false;\n\t}", "public boolean removeContact(Contact c);", "public static void deleteContactObj(long id) {\n System.out.println(id);\n contactList.clear();\n Contact deleteMe = null;\n for(Contact contact : contactObjList) {\n if(contact.getId() == id) {\n deleteMe = contact;\n }\n }\n System.out.println(\"You deleted: \" + deleteMe.toContactString());\n contactObjList.remove(deleteMe);\n for(Contact contactObj : contactObjList) {\n contactList.add(contactObj.toContactString());\n }\n }", "public void removeContact(Contact c)\n {\n if(invitedPeople.contains(c))\n invitedPeople.remove(c);\n }", "public void removeContact() {\r\n int selection = getContactSelection().getMinSelectionIndex();\r\n Statement stmt = null;\r\n try {\r\n rowSet.absolute(selection+1);\r\n Connection con = rowSet.getConnection();\r\n stmt = con.createStatement();\r\n String sql = \"delete from \" + CONTACTS_TABLE + \" where \" + CONTACTS_KEY + \" = \" + rowSet.getObject(CONTACTS_KEY);\r\n stmt.executeUpdate(sql);\r\n rowSet.execute();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n } finally {\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "void deleteContact(String id, int position);", "public void removeEntry(AddressEntry contact) {\r\n contacts.remove(contact);\r\n }", "public static void removeContactAndSync(final Context context, final String parseId){\n String[] selectionArgs = {parseId};\n context.getContentResolver().delete(ContactContract.ContactEntry.CONTENT_URI, ContactProvider.sParseIDSelection, selectionArgs);\n\n // Remove from server\n // get the default preference list\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n // get current user's contact list\n ParseQuery<ParseObject> query = ParseQuery.getQuery(context.getString(R.string.test_parse_class_key));\n String objectId = prefs.getString(context.getString(R.string.user_id_key), \"\");\n query.getInBackground(objectId, new GetCallback<ParseObject>() {\n public void done(ParseObject user_profile, ParseException e) {\n if (e == null) {\n // convert the json contact list to String set\n JSONArray contactsJSONList = user_profile.getJSONArray(context.getString(R.string.user_contacts_key));\n Set<String> contactsSet = new HashSet<String>();\n if (contactsJSONList != null) {\n for (int i = 0; i < contactsJSONList.length(); i++) {\n try {\n contactsSet.add(contactsJSONList.getString(i));\n } catch (JSONException JSONe) {\n Log.d(LOG_TAG, \"Problem getting contact list set: \" + JSONe.toString());\n }\n }\n contactsSet.remove(parseId);\n user_profile.put(context.getString(R.string.user_contacts_key), new JSONArray(contactsSet));\n user_profile.saveInBackground();\n }\n }\n }\n });\n }", "public void removeContact() {\r\n\t\tSystem.out.println(\"enter the name of the contact you want to delete?\");\r\n\t\tString name = scanner.nextLine();\r\n\t\tint rowsEffected = service.removeContact(name);\r\n\t\tSystem.out.println(rowsEffected+\" row was removed\");\r\n\t}", "@Test\n\tpublic void shoudRemoveContact(){\n\t\tContact contact = new Contact().setFirstName(\"tester\").setLastName(\"test\");\n\t\tapp.getContactHelper().createContact(contact);\n\t\t//Removing the contact\n\t\tapp.getContactHelper().removeFirstContact();\n\t\tapp.getContactHelper().checkContactRemoved();\n\n\t}", "public void delContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Delete Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tthis.contacts.remove(index - 1);\n\t\tshowContactIndex();\n\t}", "public void deleteContact(Address address){\n Address address2 = SearchContact(address.getFirstName(),address.getLastName());\r\n if (address2 != null) {\r\n contact.remove(address2);\r\n }\r\n else {\r\n System.out.println(\"Does not exist\");\r\n }\r\n }", "@Override\n\tpublic void removeEmpContactDetail(int id) {\n\t\tEmpContactDetail ecd = (EmpContactDetail) template.get(EmpContactDetail.class, new Integer(id));\n\t\tif (null != ecd) {\n\t\t\ttemplate.delete(ecd);\n\t\t}\n\t}", "@Override\r\n\tpublic void delContact(Contact contact) {\n\t\tsuper.delete(contact);\r\n\t}", "public void testRemoveContact() throws DaoException {\n\t\tContact contact = new Contact();\n\t\tcontact.setName(\"Jack Sparrow\");\n\t\t// create\n\t\tString contactId = contactService.addContact(addrBook1, contact).getId();\n\t\t// assert\n\t\tassertEquals(1, contactService.getContacts(addrBook1).size());\n\t\t// remove\n\t\tcontactService.deleteContact(contactId);\n\t\t// assert\n\t\tassertEquals(0, contactService.getContacts(addrBook1).size());\n\n\t}", "public static void removeContact ( LinkedList contactsList, int menuChoice ) { \n\t\tif ( menuChoice == 1 ) { // if they chose to remove contact by first and last name\n\t\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's first name and last name: \" ); // prompt\n\t\t\tString [ ] firstAndLastName = CheckInput.getString( ).split( \" \" ); // split into first and last\n\t\t\tString firstName = firstAndLastName [ 0 ]; // assign\n\t\t\tString lastName = firstAndLastName [ 1 ];\n\t\t\tcontactsList.remove ( firstName, lastName ); // remove with the given first and last\n\t\t} else if ( menuChoice == 2 ) { // if by index\n\t\t\tSystem.out.print ( \"\\n\" + \"Enter an index 1 - \" + contactsList.size ( ) + \":\" ); // prompt given the range \n\t\t\tint index = CheckInput.getIntRange ( 1, contactsList.size ( ) ); // make sure within range\n\t\t\tcontactsList.remove ( index - 1 ); // -1 because user will put in 1, when computer means 0\n\t\t}\n\t\tSystem.out.print ( \"\\n\" );\n\t}", "public void deleteContact() {\n Intent intent = getIntent(); //start the intent\n try {\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //try to delete contact from the database\n String delnum = intent.getStringExtra(\"delete_number\");\n Contacts.list.remove(Integer.parseInt(delnum));\n Contacts.listindex.remove(Integer.parseInt(delnum)); //delete it from the list of database id's and the listView\n Contacts.adapter.notifyDataSetChanged(); //update the list view\n }catch(NumberFormatException e){ //if we cant find the entry in the list\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //just delete the contact from the database\n }\n Intent Newintent = new Intent(viewContacts.this, Contacts.class); // start an intent to go back to contacts\n onActivityResult(1, RESULT_OK, Newintent); //start activity\n finish();\n }", "@Override\n\tpublic void removeEmpContactDetail(int id) {\n\t\tthis.empContactDetailDAO.removeEmpContactDetail(id);\n\n\t}", "public void remove(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name from where you want to delete the contact\");\n\t\tString addressBookName = obj.next();\n\t\tlog.info(\"Enter the person name whose contact you want to delete\");\n\t\tString name = obj.next();\n\t\tPersonInfo p = addressBook.getContactByName(addressBookName, name);\n\t\tif (p == null) {\n\t\t\tlog.info(\"No such contact exists\");\n\t\t} else {\n\t\t\taddressBook.removeContact(addressBookName, p);\n\t\t\tlog.info(\"Details of \" + name + \" removed\");\n\t\t}\n\t}", "public void deleteContact(@NotNull Long id) {\n Contact contact = contactRepo.findById(id)\n .orElseThrow(() -> new ContactNotFoundException(id));\n contactRepo.delete(contact);\n }", "public boolean updateContactList(String contactId, String userId){\n Organizer og = (Organizer)idToPerson.get(userId);\n if(!og.getContactList().contains(contactId)) { // checking if they are not currently a contact\n og.addContact(contactId);\n return true;\n }\n return false;\n }", "public static void deleteContact() {\n System.out.println(\"Enter first name : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName)) {\n list.remove(i);\n } else {\n System.out.println(\"No data found\");\n }\n }\n }", "@Transactional\n\tpublic Partner removeContactDetailByPartnerId(long id, ContactDetail contactDetail) {\n\t\treturn null;\n\t}", "public void eraseContact(View v)\n {\n appState.firebaseReference.child(receivedPersonInfo.uid).removeValue();\n }", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "@Override\n\tpublic void remove(Savable savable) {\n\t\tif (savable instanceof Contact) {\n\t\t\tContact contact = (Contact)savable;\n\t\t\tthis.contacts.remove(contact.getId());\n\t\t}\n\t}", "public void deleteContact(String contactToRemove) {\n\t\ttry {\n\t\t\tFile inputFile = new File(\"./src/data/contactInfo.text\");\n\t\t\tFile tempFile = new File(\"./src/data/myTempFile.txt\");\n\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"./src/data/myTempFile.txt\"));\n\n\t\t\tString Line;\n\n\t\t\t//need break so that when it compiles it overrides the format correctly\n\n\t\t\twhile ((Line = reader.readLine()) != null) {\n\t\t\t\tif (!Line.toLowerCase().contains(contactToRemove.toLowerCase())) {\n\t\t\t\t\twriter.write(Line + \"\\n\"); // The line separator isn't always \\n, e.g. on windows it is \\r\\n. But aside from that, System.lineSeparator(); does absolutely nothing.\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.close();\n\t\t\treader.close();\n\t\t\tboolean successful = tempFile.renameTo(inputFile);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void deleteContact(UUID id) {\n mDatabase.delete(ContactTable.NAME,\n ContactTable.Cols.UUID + \" = ?\",\n new String[] {id.toString()});\n }", "public void removeByCompanyId(long companyId);", "@Override\n\tpublic void deleteById(int id) throws Exception {\n\t\tupdate(\"delete from contact where id = ?\", new Object[] { id });\n\t}", "public static void deleteContact(String user, long id) {\n Contact contact = Contact.find().byId(id);\n UserInfo userInfo = UserInfo.find().where().eq(\"email\", user).findUnique();\n userInfo.getContacts().remove(contact);\n userInfo.save();\n contact.setUserInfo(null);\n contact.delete();\n }", "@Override\n\tpublic void deletContact(Integer cid) {\n\t\tcontactRepositeries.update(\"N\", cid);\n\t}", "void eraseContact(String name) \r\n\t\t{\r\n\t\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t\t{\r\n\t\t\t String n = this.get(i).getContactName();\r\n\t\t\t \r\n\t\t\t\tif(n.equalsIgnoreCase(name))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(n);\r\n\t\t\t\t\tCalendar.deleteEventBycontact(this.get(i));\r\n\t\t\t\t\tthis.remove(i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public boolean deleteContact(List<Integer> ids) {\n\t\tif (ids == null || ids.size() == 0)\n\t\t\treturn false;\n\t\tif (ids.contains(currentContact.getId()))\n\t\t\tcurrentContact = null;\n\t\tList<Contacto> contacts = currentUser.getContacts().stream()\n\t\t\t\t.filter(c -> ids.contains(c.getId()) && (c instanceof ContactoIndividual)).collect(Collectors.toList());\n\t\tcontacts.stream().forEach(c -> {\n\t\t\tdeleteContact(c);\n\t\t});\n\t\treturn true;\n\t}", "public PotentialCustomer planToRemovePotentialCustomerContactListWithContactTo(\n PotentialCustomer potentialCustomer, String contactToId, Map<String, Object> options)\n throws Exception {\n // SmartList<ThreadLike> toRemoveThreadLikeList = threadLikeList.getToRemoveList();\n // the list will not be null here, empty, maybe\n // getThreadLikeDAO().removeThreadLikeList(toRemoveThreadLikeList,options);\n\n MultipleAccessKey key = new MultipleAccessKey();\n key.put(PotentialCustomerContact.POTENTIAL_CUSTOMER_PROPERTY, potentialCustomer.getId());\n key.put(PotentialCustomerContact.CONTACT_TO_PROPERTY, contactToId);\n\n SmartList<PotentialCustomerContact> externalPotentialCustomerContactList =\n getPotentialCustomerContactDAO().findPotentialCustomerContactWithKey(key, options);\n if (externalPotentialCustomerContactList == null) {\n return potentialCustomer;\n }\n if (externalPotentialCustomerContactList.isEmpty()) {\n return potentialCustomer;\n }\n\n for (PotentialCustomerContact potentialCustomerContactItem :\n externalPotentialCustomerContactList) {\n potentialCustomerContactItem.clearContactTo();\n potentialCustomerContactItem.clearPotentialCustomer();\n }\n\n SmartList<PotentialCustomerContact> potentialCustomerContactList =\n potentialCustomer.getPotentialCustomerContactList();\n potentialCustomerContactList.addAllToRemoveList(externalPotentialCustomerContactList);\n return potentialCustomer;\n }", "public void removeByid_(long id_);", "public boolean deleteContact(Contacto contact) {\n\t\t// deletes current contact on null invocation\n\t\tif (contact == null) {\n\t\t\tif (currentContact == null)\n\t\t\t\treturn false;\n\t\t\tcontact = currentContact;\n\t\t\tcurrentContact = null;\n\t\t}\n\t\tUsuario user = userCatalog.getUser(contact.getUserId());\n\t\tOptional<Contacto> result = user.getContacts().stream().filter(c -> c.getUserId() == currentUser.getId())\n\t\t\t\t.findFirst();\n\t\tif (!result.isPresent())\n\t\t\treturn false;\n\t\tmessageDAO.deleteMessageList(contact.getMsgId());\n\t\tcontactDAO.deleteContact(result.get());\n\t\tcontactDAO.deleteContact(contact);\n\t\tuser.removeContact(result.get());\n\t\tcurrentUser.removeContact(contact);\n\t\tuserCatalog.modifyUser(user);\n\t\tuserCatalog.modifyUser(currentUser);\n\t\treturn true;\n\t}", "private void removeContactFromRoster(RosterEntry entryToBeRemoved) {\r\n\t\ttry {\r\n\t\t\tMainService.mService.connection.getRoster().removeEntry(entryToBeRemoved);\r\n\t\t} catch (XMPPException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n protected void executeRemove(final String requestId, DSRequest request, final DSResponse response)\n {\n JavaScriptObject data = request.getData();\n final ListGridRecord rec = new ListGridRecord(data);\n ContactDTO testRec = new ContactDTO();\n // copyValues(rec, testRec);\n testRec.setId(rec.getAttributeAsInt(contactIdField.getName()));\n service.remove(testRec, new AsyncCallback<Void>()\n {\n @Override\n public void onFailure(Throwable caught)\n {\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n SC.say(\"Contact Delete\", \"Contact has not been deleted!\");\n }\n\n @Override\n public void onSuccess(Void result)\n {\n ListGridRecord[] list = new ListGridRecord[1];\n // We do not receive removed record from server.\n // Return record from request.\n list[0] = rec;\n response.setData(list);\n processResponse(requestId, response);\n SC.say(\"Contact Delete\", \"Contact has been deleted!\");\n }\n });\n }", "private void deleteContact() throws SQLException {\n clsContactsTableModel mModel = (clsContactsTableModel) tblContacts.getModel();\n //Get the entire contact details.\n clsContactsDetails mContactsDetails = mModel.getContactDetails(this.pSelectedRow);\n \n switch (JOptionPane.showInternalConfirmDialog(this, \"Do you really want to delete the contact '\" + mContactsDetails.getFirstName() + \" \" + mContactsDetails.getLastName() + \"'?\", \"Delete contact?\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n if (this.pModel.deleteContact(mID)) {\n this.pSelectedRow = -1;\n fillContactsTable();\n selectContact();\n }\n break;\n }\n }", "public static void editContact() {\n System.out.println(\"Enter first name: \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName)) {\n list.remove(i);\n addContact();\n } else {\n System.out.println(\"No data found in Address Book\");\n }\n }\n }", "public void deleteOne(ContactModelClass contactModelClass) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, \"id = ?\", new String[] { String.valueOf(contactModelClass.getId()) });\n db.close();\n }", "protected void delete(int id) {\n\n log.info(\"CompaniesContactsBean => method : delete()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContacts ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"contact.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n CompaniesContactsEntity companiesContactsEntity;\n\n try {\n companiesContactsEntity = findById(id);\n } catch (EntityNotFoundException exception) {\n log.warn(\"Code ERREUR \" + exception.getErrorCodes().getCode() + \" - \" + exception.getMessage());\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n EntityManager em = EMF.getEM();\n em.getTransaction();\n\n EntityTransaction tx = null;\n try {\n tx = em.getTransaction();\n tx.begin();\n companiesContactsDao.delete(em, companiesContactsEntity);\n tx.commit();\n log.info(\"Delete ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.error(\"Delete Error\");\n } finally {\n em.clear();\n em.close();\n }\n }", "public boolean deleteContact(ContentResolver contentResolver, ContactInfo cInfo) {\r\n\t\tlong id = Integer.parseInt(cInfo.get_ID());\r\n\t\tUri uri = ContentUris.withAppendedId(People.CONTENT_URI, id);\r\n\t\tint rowsDeleted = contentResolver.delete(uri, null, null);\r\n\t\t\r\n\t\tif(rowsDeleted >= 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public boolean deleteContact(long rowId)\n {\n return db.delete(DATABASE_TABLE,KEY_ROWID + \"=\" + rowId,null) >0;\n }", "void remove(int id);", "public boolean deleteContact(long rowId)\n {\n return db.delete(DATABASE_TABLE, KEY_ROWID + \"=\" +rowId, null) > 0;\n }", "void removeIdFromList(Integer mCanalId);", "public int deleteContact(int personId) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(FeedEntry.COLUMN_TITLE, personId);\r\n\r\n int todo_id = db.delete(FeedEntry.TABLE_NAME, \"_id=\" + personId, null);\r\n\r\n return todo_id;\r\n }", "public void delete(Contact contact ) {\n\n mRepository.delete(contact);\n }", "public void setContactId(String contactId) {\n this.contactId = contactId;\n }", "public boolean deletePeople(Long id);", "void remove(Long id);", "void remove(Long id);", "void setContactId(long contactId) {\n\t\tthis.contactId = contactId;\n\t}", "public void setContactId(java.lang.String contactId) {\r\n this.contactId = contactId;\r\n }", "public void removeConcert(long concertId){\n ArrayList<Concert> tempConcertList = cloneConcertList();\n for(Concert concert: tempConcertList){\n if(concert.getId() == concertId){\n concertList.remove(concert);\n }\n }\n }", "boolean removeObject(String id);", "public void deleteUlIdPerson()\r\n {\r\n this._has_ulIdPerson= false;\r\n }", "boolean remove (I id);", "void remove(String id);", "void remove(String id);", "void remove(String id);", "public void delete_contact(String contact, SupplierCard supplier) {\n supplier_dao.delete_contact(contact, supplier);\n }", "@RequestMapping(\"/deleteContact\")\n\tprivate ResponseEntity<String> deleteContact(@RequestParam int id) {\n\t\t\n\t\tc_service.deleteContact(id);\n\t\t\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (c_service.getContactById(id) == null) {\n\t return new ResponseEntity<String>(responseHeaders, HttpStatus.NO_CONTENT); \n\t }\n\t else return new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n\t}", "@Transactional\n\tpublic Partner removeContactDetail(Partner partner, ContactDetail contactDetail) {\n\t\treturn null;\n\t}", "public void unsetContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CONTACT$6, 0);\n }\n }", "public void cancelFileTransferNotificationWithContact(\n String contact) {\n Logger.d(TAG,\n \"cancelFileTransferNotificationWithContact() entry with the contact \"\n + contact);\n int size = mFileInvitationInfos.size();\n Logger.d(\n TAG,\n \"cancelFileTransferNotificationWithContact() mFileInvitationInfos size is \"\n + size);\n for (int i = 0; i < size; i++) {\n if (contact.equals(mFileInvitationInfos.get(i).mContact)) {\n Logger.d(\n TAG,\n \"cancelFileTransferNotificationWithContact() find the relavent contact\");\n mFileInvitationInfos.remove(i);\n updateFileTansferNotification(null);\n break;\n }\n }\n Logger.d(TAG,\n \"cancelFileTransferNotificationWithContact() exit\");\n }", "public void eraseContact(View v)\n {\n appState.firebaseReference.child(receivedPersonInfo.uid).removeValue();\n finish();\n Intent intent=new Intent(this, MainActivity.class);\n startActivity(intent);\n\n }", "public String deleteContactPerson() {\n this.contactPersonService.deleteBy(this.id);\n return SUCCESS;\n }", "public void removeItem(int id);", "public void removePerson(int id) {\n\t\tsynchronized (this) {\n\t\t\tfor (int i = 0; i < people.size(); i++) {\n\t\t\t\tif (people.get(i).getId() == id) {\n\t\t\t\t\tpeople.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setContactId(Long contactId) {\n this.contactId = contactId;\n }", "public void removeComposer(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), COMPOSER, value);\r\n\t}", "private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }", "public Builder removeContactList(int index) {\n if (contactListBuilder_ == null) {\n ensureContactListIsMutable();\n contactList_.remove(index);\n onChanged();\n } else {\n contactListBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeContactList(int index) {\n if (contactListBuilder_ == null) {\n ensureContactListIsMutable();\n contactList_.remove(index);\n onChanged();\n } else {\n contactListBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeContactList(int index) {\n if (contactListBuilder_ == null) {\n ensureContactListIsMutable();\n contactList_.remove(index);\n onChanged();\n } else {\n contactListBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeContactList(int index) {\n if (contactListBuilder_ == null) {\n ensureContactListIsMutable();\n contactList_.remove(index);\n onChanged();\n } else {\n contactListBuilder_.remove(index);\n }\n return this;\n }", "public void removeCustomer(int id) {\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] != null && customers[i].getID() == id) {\r\n customers[i] = null;\r\n return;\r\n }\r\n }\r\n System.err.println(\"Could not find a customer with id: \" + id);\r\n }", "@Override\n\tpublic void remove(int id) {\n\t}", "private static Document removeIDfromList(Document doc, String id) {\n NodeList participantsList = doc.getElementsByTagName(\"participant\");\n for (int x = 0; x < participantsList.getLength(); x++) {\n Element participant = (Element) participantsList.item(x);\n String idValue = participant.getAttribute(\"id\");\n if (idValue.equalsIgnoreCase(id)) {\n System.out.println(\"Id \" + participant.getAttribute(\"id\") + \" will be removed\");\n MessageDialog.getInstance().addLine(\"Id \" + participant.getAttribute(\"id\") + \" will be removed\");\n participant.getParentNode().removeChild(participant);\n doc.normalize();\n return doc; //No need to go further\n }\n }\n return doc;\n }", "boolean remove(String elementId);", "boolean removeObject(PointLatLng point, String id);", "@Override\n\tpublic void remove(int id) {\n\n\t}", "public void remove(Integer id) {\n\t\t\r\n\t}", "@Transactional\n\tpublic void deleteContact(Set<String> contactsEmails) {\n\t\tSet<User> contacts = new HashSet<>();\n\t\tfor (String email : contactsEmails) {\n\t\t\tUser contactUser = userDao.findUserByEmail(email);\n\t\t\tcontacts.add(contactUser);\n\t\t}\n\t\tgetCurrentUser().getContacts().removeAll(contacts);\n\t}", "public static void removeStudent(ArrayList<Student> sList,String id){\n\t\tint found=0;\n\t\tfor(int i=0;i<sList.size();i++){\n\t\t\tif(sList.get(i).getId().equals(id)){\n\t\t\t\tSystem.out.println(\"Student with ID \"+id+\" is deleted.\");\n\t\t\t\tsList.remove(i); found=1; break;\n\t\t\t}\n\t\t}\n\t\tif(found==0){System.out.println(\"No such student is found.\");}\n\t}", "public void removeACustomer(long id) {\r\n\t\tSystem.out.println(\"\\nRemoving the customer: \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tCustomer2 customer = em.find(Customer2.class, id);\r\n\t\tif(customer == null){\r\n\t\t\tSystem.out.println(\"\\nNo such customer with id: \" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nCustomer info: \" + customer);\r\n\t\tem.remove(customer);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public void remove(Integer id) {\n\r\n\t}", "public void removeByTodoId(long todoId);", "@Override\n public void deleteAddress(Integer id) {\n Session currentSession = entityManager.unwrap(Session.class);\n Query<Library> libraryQuery = currentSession.createQuery(\"FROM Library l WHERE l.address.addressID = :id\");\n libraryQuery.setParameter(\"id\", id);\n List<Library> libraryList = libraryQuery.getResultList();\n List<Integer> libraryIDs = libraryList.stream().map(Library::getLibraryID).collect(Collectors.toList());\n\n // Remove the address reference of any library with this address\n if (!libraryIDs.isEmpty()) {\n Query<Library> libraryAddressQuery = currentSession.createQuery(\"UPDATE Library set address.addressID = null \" +\n \"WHERE id IN :libraryIDs\");\n libraryAddressQuery.setParameter(\"libraryIDs\", libraryIDs);\n libraryAddressQuery.executeUpdate();\n }\n\n // Get list of members who use this address\n Query<Member> memberQuery = currentSession.createQuery(\"FROM Member m WHERE m.address.addressID = :id\");\n memberQuery.setParameter(\"id\", id);\n List<Member> memberList = memberQuery.getResultList();\n List<Integer> memberIDs = memberList.stream().map(Member::getMemberID).collect(Collectors.toList());\n\n // Remove the address reference of any member with this address\n if (!memberIDs.isEmpty()) {\n Query<Library> memberAddressQuery = currentSession.createQuery(\"UPDATE Member set address.addressID = null \" +\n \"WHERE id IN :memberIDs\");\n memberAddressQuery.setParameter(\"memberIDs\", memberIDs);\n memberAddressQuery.executeUpdate();\n }\n\n // Delete the address\n Query addressQuery = currentSession.createQuery(\"DELETE FROM Address a WHERE a.addressID = :id\");\n addressQuery.setParameter(\"id\", id);\n addressQuery.executeUpdate();\n }", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void removeInterpretedBy(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), INTERPRETEDBY, value);\r\n\t}", "@Override\n\tpublic void deleteByMobileId(int mobileId) {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tint id = dto[i].getMobileId();\n\t\t\tif (id == mobileId) {\n\t\t\t\tSystem.out.println(\"condition is true \");\n\t\t\t\tSystem.out.println(dto[i]);\n\t\t\t\tdto[i] = null;\n\t\t\t\tSystem.out.println(\"data deleted \");\n\t\t\t}\n\n\t\t}\n\t\tfor(int i=0;i<dto.length;i++) {\n\t\t\tSystem.out.println(dto[i]);\n\t\t}\n\t}", "private void removeExpiredContacts() {\n int numContactsExpired = 0;\n Date dateToday = new Date();\n for (Iterator<User> it = contacts.iterator(); it.hasNext();) {\n User contact = it.next();\n Date contactExpiryDate = contact.getContactExpiryDate();\n if (dateToday.after(contactExpiryDate) || DateUtils.isToday(contactExpiryDate.getTime())) {\n boolean result = SharedPrefsUtils.removeTravelContact(context, contact);\n if (result) {\n it.remove();\n numContactsExpired++;\n }\n }\n }\n if (numContactsExpired > 0) {\n Toast.makeText(context, \"Removed \" + numContactsExpired + \" expired contacts\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic Account deleteAccount(Integer id) {\n\t\tint index = 0;\n\t\tfor(Account acc:accountList) {\n\t\t\tif(acc.returnAccountNumber().compareTo(id) == 0 ) {\n\t\t\t\taccountList.remove(index);\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "void removeMemberById(final String accountId);", "@Override\n\tpublic boolean removeMember(String name, String phone) {\n\t\treturn false;\n\t}", "public void delParticipant (int idParticipant){\n for (Participant participant :lesParticipants){\n if (participant.getIdParticipant()==idParticipant){\n lesParticipants.remove(participant);\n } \n }\n }" ]
[ "0.7290936", "0.7283283", "0.71086156", "0.7040351", "0.6844179", "0.6604555", "0.6603744", "0.6528472", "0.65054667", "0.65048516", "0.6437541", "0.6413307", "0.63854444", "0.6382676", "0.626898", "0.62303185", "0.6203175", "0.6193855", "0.6187095", "0.6179154", "0.61629903", "0.6138942", "0.6123075", "0.61221844", "0.6109119", "0.60944164", "0.60817415", "0.60568666", "0.6014064", "0.60126436", "0.60061276", "0.59761775", "0.595463", "0.5942469", "0.5921163", "0.5896697", "0.58906084", "0.586906", "0.5850811", "0.58306473", "0.5804971", "0.5804003", "0.57890606", "0.57759994", "0.576605", "0.5740863", "0.57394075", "0.57148707", "0.56917876", "0.56657326", "0.56374216", "0.5624604", "0.5620701", "0.5620701", "0.561555", "0.56120056", "0.561157", "0.5606942", "0.56059146", "0.55991983", "0.5596616", "0.5596616", "0.5596616", "0.5576913", "0.55626214", "0.5555678", "0.5528593", "0.552502", "0.55064285", "0.55059016", "0.55008686", "0.5497533", "0.5493695", "0.5465484", "0.54548484", "0.5449766", "0.5449766", "0.5449766", "0.5449766", "0.5448116", "0.5445272", "0.54431653", "0.54420376", "0.5438573", "0.54385674", "0.54327327", "0.5430498", "0.5423762", "0.541621", "0.5399444", "0.5390909", "0.53881556", "0.5388083", "0.53852147", "0.53837353", "0.5375542", "0.537348", "0.5367662", "0.5364306", "0.5360692" ]
0.74691343
0
/ This is a GetMethod(Http) is used to check the authorization of Name and Password from Database. Method : loginAdmin Type : Admin parameters: the adminName and adminPassword is of String type Returns : the object of Admin Author : Alok Dixit Date : 25/09/2020 Version : 1.0
@Override public Admin loginAdmin(String adminName, String adminPassword){ Admin admin = adminRepository.findAdminByAdminName(adminName); if (!(admin.getAdminPassword().equals(adminPassword) && admin.getAdminName().equals(adminName))) { throw new AdminNotFoundException( "Admin with AdminName [" + adminName + "] and password [" + adminPassword + "] not found"); } else { return admin; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Admin adminLogin(Admin admin) {\n\t\tString sql = \"select * from admin where adminName = ? and adminPwd = ?\";\n\t\tAdmin admin1 = (Admin) JDBCUtil.executeQueryOne(sql, new adminMapping(), admin.getAdminName(),admin.getAdminPwd());\n\t\tif(admin1 != null){\n\t\t\treturn admin1;\n\t\t}\n\t\treturn null;\n\t}", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "public Admin getAdminByLogin(String login);", "public String adminlogin() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\n\t\t//Query to select user account where email and password entered by the user\n\t\tQuery q = em\n\t\t\t\t.createQuery(\"SELECT u FROM AdminAccount u WHERE u.email = :email AND u.password = :pass\");\n\t\tq.setParameter(\"email\", email);\n\t\tq.setParameter(\"pass\", password);\n\t\ttry {\n\t\t\tAdminAccount user = (AdminAccount) q.getSingleResult();\n\t\t\tif (email.equalsIgnoreCase(user.getEmail())\n\t\t\t\t\t&& password.equals(user.getPassword())) {\t//If passwords match,\n\t\t\t\n\t\t\t\t HttpSession session = Util.getSession();\t//create session\n\t\t session.setAttribute(\"email\", email);\n\t\t\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\taddMessage(new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"Invalid credentials entered!\", null));\n\t\t\treturn \"failure\";\n\n\t\t} catch (Exception e) {\n\t\t\taddMessage(new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"System error occured. Contact system admin!\", null));\n\t\t\treturn \"systemError\";\n\t\t}\n\t}", "@Override\r\n\tpublic Admins getAdminLogin(String aname, String apwd) {\n\t\treturn adi.adminLogin(aname, apwd);\r\n\t}", "public boolean adminAccess (String password) throws PasswordException;", "public Admin getAdminByEmailAndPassword(String email, String password){\r\n \r\n Admin admin=null;\r\n \r\n try {\r\n \r\n String query=\"from Admin where adminEmail =:e and adminPassword =:p\"; \r\n \r\n Session session=this.factory.openSession();\r\n Query q=session.createQuery(query);\r\n q.setParameter(\"e\", email);\r\n q.setParameter(\"p\", password);\r\n admin=(Admin)q.uniqueResult();\r\n session.close();\r\n \r\n } catch (HibernateException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n \r\n \r\n \r\n return admin;\r\n \r\n \r\n }", "public Admin doRetrieveAdmin(String email, String password) {\n try {\n PreparedStatement ps = conn.prepareStatement(\" SELECT * FROM user \"\n + \"WHERE TRIM(LOWER(email)) = TRIM(?) AND TRIM(password) = TRIM(?) AND user_type = 2\");\n ps.setString(1, email);\n ps.setString(2, password);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n Admin a = new Admin();\n a.setEmail(rs.getString(1));\n a.setName(rs.getString(2));\n a.setSurname(rs.getString(3));\n a.setSex(rs.getString(\"sex\").charAt(0));\n a.setPassword(rs.getString(5));\n a.setUserType(rs.getInt(6));\n return a;\n }\n return null;\n } catch (SQLException e) {\n System.out.println(\"doRetrieveAdmin: error while executing the query\\n\" + e);\n throw new RuntimeException(e);\n }\n }", "@Action(value = \"adminLogin\", results = { @Result(name = \"success\", location = \"/success.jsp\") })\r\n\tpublic String login() throws IOException {\r\n\t\tString userName = RequestUtil.getParam(request, \"username\", \"\");\r\n\t\tString password = RequestUtil.getParam(request, \"password\", \"\");\r\n\t\tresponse.reset();\r\n\t\tresponse.setCharacterEncoding(\"utf-8\");\r\n\t\tif (\"admin\".equals(userName) && \"admin\".equals(password)) {\r\n\t\t\tresponse.getWriter().print(\"{success:'true',msg:'登录成功'}\");\r\n\t\t\tif (null == user)\r\n\t\t\t\tuser = new LoginUser();\r\n\t\t\tuser.setUsername(userName);\r\n\t\t\tuser.setPassword(password);\r\n\t\t\trequest.getSession()\r\n\t\t\t\t\t.setAttribute(Contants.SESSION_USER_ADMIN, user);\r\n\t\t\tOnlineUser.getInstance().addUser(user, 1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tresponse.getWriter().print(\"{success:'false',msg:'登录失败'}\");\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Admin getAdminByLoginNameAndPassword(int parseInt) {\n\t\tString hql = \"from Admin a where a.id=?\";\n\t\tList<Admin> al = getHibernateTemplate().find(hql,parseInt);\n\t\treturn al.isEmpty()||al==null?null:al.get(0);\n\t}", "public Admin login(Admin admin) {\n\t\t\n\t\treturn adminDao.select(admin);\n\t}", "@Override\r\n\tpublic boolean doLogin(Admin admin) {\n\t\tSession session=sessionFactory.openSession();\r\n\t\tQuery query=\r\n\t\t\t\tsession.createQuery(\"select o from Admin o where o.Email=:email and o.password=:password\");\r\n\t\tquery.setParameter(\"email\", admin.getEmail());\r\n\t\tquery.setParameter(\"password\", admin.getPassword());\r\n\t\tList<Admin> adminList=query.list();\r\n\t\t\r\n\t\tif(adminList.isEmpty())\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\treturn true;\r\n\t}", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "public Admin findLoginAdmin(String adminEmail, String adminPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\n\t\tQuery<Admin> query = session.createQuery(\"from Admin where admin_email=:email and admin_passwd=:passwd\");\n\t\tquery.setParameter(\"email\", adminEmail);\n\t\tquery.setParameter(\"passwd\", adminPassword);\n\t\tAdmin admin = query.uniqueResult();\n\t\t// System.out.print(admin.getPerson().getRealName());\n\t\ttran.commit();\n\t\tsession.close();\n\t\treturn admin;\n\t}", "@RequestMapping(value = \"/admin_login\")\r\n public String adminLogin(@ModelAttribute(\"AdminLogCommand\") Admin a, HttpSession session) {\r\n if (a.getEmail().trim() == null || a.getPassword().trim() == null) {\r\n return \"redirect: /admin_login_page?msg=field missing\";\r\n }\r\n Admin admin = adminService.loginAdmin(a.getEmail(), a.getPassword());\r\n System.out.println(\"admin obj : \" + admin);\r\n if (admin != null) {\r\n addAdminInSession(admin, session);\r\n return \"redirect: admin_dashboard\";\r\n }\r\n return \"redirect: admin_login_page?msg=invalid credentials\";\r\n }", "public Admin findLoginAdmin(String AdminTelephone, String adminPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\n\t\tQuery<Admin> query = session.createQuery(\"from Admin where admin_phone=:phone and admin_pwd=:passwd\");\n\t\tquery.setParameter(\"phone\", AdminTelephone);\n\t\tquery.setParameter(\"passwd\", adminPassword);\n\t\tAdmin admin = query.uniqueResult();\n\t\t// System.out.print(admin.getPerson().getRealName());\n\t\ttran.commit();\n\t\tsession.close();\n\t\treturn admin;\n\t}", "@Override//查询数据\r\n\tpublic AdminSession GetAdmin(String adminname) {\n\t\tString GetAdminIDsql = \"select * from Admin where UserName=?\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement pStatement=this.connection.prepareStatement(GetAdminIDsql);\r\n\t\t\tpStatement.setString(1, adminname);\r\n\t\t\tResultSet rSet=pStatement.executeQuery();\r\n\t\t\tif (rSet.next()) {\r\n\t\t\t\tAdminSession adminSession = new AdminSession(rSet.getInt(\"ID\"), rSet.getString(\"UserName\"));\r\n\t\t\t\treturn adminSession;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public List<Authentication> getLoginCredentials(String username,String password) {\n // select * from administrators where adminID='Admin1' and password='123456';\n String loginQuery = \"SELECT * FROM administrators WHERE adminID = ? and password = ?\";\n return loginTemplate.query(loginQuery, (rs, rowNum) -> {\n Authentication authentication = new Authentication();\n authentication.setPassword(rs.getString(\"password\"));\n authentication.setUsername(rs.getString(\"adminID\"));\n\n System.out.println(authentication);\n return authentication;\n\n }, username,password\n );\n }", "Login.Req getLoginReq();", "@Override\n\tpublic AdminDetails checkAdmin(String email, String password) {\n\t\tfor (AdminDetails checkAdmin : Repository.ADMIN_DETAILS) {\n\t\t\tif ((checkAdmin.getEmailId().equalsIgnoreCase(email)) && (checkAdmin.getPassword().equals(password))) {\n\t\t\t\treturn checkAdmin;\n\t\t\t}\n\t\t}\n\t\tthrow new AirlineException(\"Invalid Credentials\");\n\t}", "public String Login(String email,String pass)\r\n {\n\r\nArrayList<User> arrayList=new ArrayList<User>();\r\n arrayList=selectionfromuser();\r\n\r\n for (int i=0;i<arrayList.size();i++)\r\n {\r\n if(arrayList.get(i).getEmail().equals(email)&&(arrayList.get(i).getPassword().equals(pass)))\r\n {System.out.println(\"email db: \"+arrayList.get(i).getEmail());\r\n System.out.println(\"email: \"+email);\r\n System.out.println(\"PASS db: \"+arrayList.get(i).getPassword());\r\n System.out.println(\"pass: \"+pass);\r\n System.out.println(\"type db\"+arrayList.get(i).getType());\r\n\r\n if (arrayList.get(i).getType().equals(\"ADMIN\")) {\r\n return \"ADMIN\";\r\n } else {\r\n if ((arrayList.get(i).getType()).equals(\"CITOYEN\"))\r\n {\r\n return \"CITOYEN\";\r\n } else {\r\n if ((arrayList.get(i).getType()).equals(\"RESPONSABLE\"))\r\n return \"RESPONSABLE\";\r\n }\r\n }\r\n }\r\n\r\n }\r\n return \"\";\r\n }", "void legeAn(String login, String name, String password, boolean isAdmin, String email);", "public Admin getAdminByLoginNameAndPassword(String adminLoginName,\n\t\t\tString adminPassword) {\n\t\tString hql=\"from Admin i where i.adminName=? and i.adminPassword=?\";\n\t\tObject[] parm={adminLoginName,adminPassword};\n\t\tList l=getHibernateTemplate().find(hql,parm);\n\t\treturn l.isEmpty()||l==null? null:(Admin)l.get(0);\n\t}", "public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }", "protected Response login() {\n return login(\"\");\n }", "public interface AdminService {\n\n /**\n *根据管理员账号获取管理员信息\n * @author zhou_wb\n * @version 1.0\n * @date 2017年5月15日\n */\n Admin findLoginDtoByAccount(String account);\n\n /**\n * 添加管理员\n */\n HttpStatus add(String adminUser,Admin admin) throws JsonProcessingException;\n\n /**\n * 添加角色\n */\n Admin addRole(String adminUser,Admin admin);\n\n /**\n * 获取所有管理员信息\n */\n List<Admin> getAll();\n}", "java.lang.String getAdmin();", "public static List<Admin> getAdmin() {\r\n\t\t//conn = DBConnection.getConnection();\r\n\t\t\r\n\r\n\t\tAdmin admin = null;\r\n\t\tList<Admin> listOfproducts = new ArrayList<Admin>();\r\n\r\n\t\ttry {\r\n\t\t\tStatement statement = conn.createStatement();\r\n\t\t\tResultSet resultSet = statement.executeQuery(getAllQuery);\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t//User user = new User();\r\n\t\t\t\tint adminId = resultSet.getInt(1);\r\n\t\t\t\tString adminname = resultSet.getString(2);\r\n String adminpassword = resultSet.getString(3);\r\n\r\n\t\t\t\tadmin.setAdminid(adminId);\r\n\t\t\t\tadmin.setAdminname(adminname);\r\n\t\t\t\tadmin.setAdminpassword(adminpassword);\r\n\r\n\t\t\t\tlistOfproducts.add(admin);\r\n\t\t\t}\r\n\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\r\n\t\treturn listOfproducts;\r\n\r\n\t}", "@POST\n\t@Path(\"/login\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response loginUser(@Context HttpServletRequest request,LoginObject loginInput){\n\t\tAdminLogins adminLogins = adminLoginsDao.findAdminLoginsByEmail(loginInput.getUsername());\n\t\tif(adminLogins == null){\n\t\t\treturn Response.status(Response.Status.NOT_FOUND).\n\t\t\t\t\tentity(\"User doesn't exist: \" + loginInput.getUsername()).build();\n\t\t}\n\n boolean matched = false;\n try{\n \tString reqPass = loginInput.getPassword();\n \t\tString saltStr = loginInput.getUsername().substring(0, loginInput.getUsername().length()/2);\n \t\tString originalPassword = reqPass+saltStr;\n \tmatched = SCryptUtil.check(originalPassword,adminLogins.getAdminPassword());\n } catch (Exception e){\n \treturn Response.status(Response.Status.UNAUTHORIZED).\n\t\t\t\t\tentity(\"Incorrect Password\").build();\n }\n\n\t\tif(matched){\n\t\t\ttry {\n\t\t\t\tJSONObject jsonObj = new JSONObject();\n\t\t\t\tTimestamp keyGeneration = new Timestamp(System.currentTimeMillis());\n\t\t\t\tTimestamp keyExpiration = new Timestamp(System.currentTimeMillis()+15*60*1000);\n\t\t\t\tadminLogins.setLoginTime(keyGeneration);\n\t\t\t\tadminLogins.setKeyExpiration(keyExpiration);\n\t\t\t\tadminLoginsDao.updateAdminLogin(adminLogins);\n\t\t\t\tString ip = request.getRemoteAddr();\n\t\t\t\tJsonWebEncryption senderJwe = new JsonWebEncryption();\n\t\t\t\tsenderJwe.setPlaintext(adminLogins.getEmail()+\"*#*\"+ip+\"*#*\"+keyGeneration.toString());\n\t\t\t\tsenderJwe.setAlgorithmHeaderValue(KeyManagementAlgorithmIdentifiers.DIRECT);\n\t\t\t\tsenderJwe.setEncryptionMethodHeaderParameter(ContentEncryptionAlgorithmIdentifiers.AES_128_CBC_HMAC_SHA_256);\n\t\t\t\t\n\t\t\t\tString secretKey = ip+\"sEcR3t_nsA-K3y\";\n\t\t\t\tbyte[] key = secretKey.getBytes();\n\t\t\t\tkey = Arrays.copyOf(key, 32);\n\t\t\t\tAesKey keyMain = new AesKey(key);\n\t\t\t\tsenderJwe.setKey(keyMain);\n\t\t\t\tString compactSerialization = senderJwe.getCompactSerialization();\n\t\t\t\tjsonObj.put(\"token\", compactSerialization);\n\t\t\t\tAdministrators admin = administratorsDao.findAdministratorByEmail(loginInput.getUsername());\n\t\t\t\tjsonObj.put(\"id\", admin.getAdministratorNeuId());\n\t\t\t\t\n\t\t\t\treturn Response.status(Response.Status.OK).\n\t\t\t\t\t\tentity(jsonObj.toString()).build();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR).\n\t\t\t\t\t\tentity(\"Internal Server Error\").build();\n\t\t\t}\n\t\t}else{\n\t\t\treturn Response.status(Response.Status.UNAUTHORIZED).\n\t\t\t\t\tentity(\"Incorrect Password\").build();\n\t\t}\n\t}", "@Test\n public void t01_buscaAdmin() throws Exception {\n Usuario admin;\n admin = usuarioServico.login(\"administrador\", \".Ae12345\");\n assertNotNull(admin);\n }", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "public UserDTO login(String mail,String password){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlLogin);\r\n preSta.setString(1, mail);\r\n preSta.setString(2, password);\r\n ResultSet rs = preSta.executeQuery();\r\n if(rs.next()){\r\n UserDTO user = new UserDTO();\r\n user.setEmail(rs.getString(\"Email\"));\r\n user.setPassword(rs.getString(\"Pass\"));\r\n user.setRole(rs.getInt(\"RoleId\"));\r\n user.setUserId(rs.getInt(\"UserId\"));\r\n return user;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error =\"thong tin dang nhap sai\";\r\n return null;\r\n }", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "public interface AdminDao {\n public Admin queryOneByNameAndPassword(Admin admin);\n}", "public int login(String username, String password) {\n try {\n con = (Connection) DriverManager.getConnection(url, this.usernamel, this.passwordl);\n String sql; // TODO add your handling code here:\n sql = \"SELECT Name,Password,Emptype FROM user WHERE Username=?\";\n pst = (PreparedStatement) con.prepareStatement(sql);\n pst.setString(1, username);\n rs = pst.executeQuery();\n if (rs.next()) {\n /*System.out.println(rs.getString(1));\n System.out.println(rs.getString(2));\n System.out.println(rs.getString(3));*/\n\n if (password.equals(rs.getString(2)) && \"Admin Staff\".equals(rs.getString(3))) {\n //JOptionPane.showMessageDialog(null, \"password is correct , admin\");\n return 1;\n } else if (password.equals(rs.getString(2)) && \"Regular Staff\".equals(rs.getString(3))) {\n //JOptionPane.showMessageDialog(null, \"password is correct , regular\");\n return 2;\n } else {\n JOptionPane.showMessageDialog(null, \"Wrong Password..!\");\n return 3;\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Wrong Username..!\");\n return 4;\n\n }\n\n } catch (SQLException | HeadlessException e) {\n //System.out.println(e);\n JOptionPane.showMessageDialog(null, \"Network Error..!\");\n return 5;\n } finally {\n try {\n if (pst != null) {\n pst.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception e) {\n }\n\n }\n }", "@POST\r\n @Path(\"clientLogin\")\r\n @Consumes(MediaType.APPLICATION_JSON)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String adminlogin(employee e) {\n \tcheckuser obj=new checkuser();\r\n \t\r\n \tString y=obj.checkclient(e.username,e.password);\r\n \tSystem.out.println(\"from main\"+e.username+e.password);\r\n \tif(y!=\"\")\r\n \t{\r\n \t\tglobal.client_id=y;\r\n \t\treturn\t\"{\\\"Status\\\": {\\\"code\\\": \\\"200\\\",\\\"Status\\\": \\\"success\\\",\\\"displayMessage\\\": \\\"success\\\", \\\"debugMessage\\\": \\\"success\\\"},\\\"data\\\": {\\\"client_id\\\": \\\"1\\\",\\\"login_type\\\":\\\"client\\\"}}\";\r\n \t\t\r\n \t\t\r\n \t\t//return \"{\\\"code\\\": \\\"200\\\",\\\"Status\\\": \\\"success\\\",\\\"displayMessage\\\": \\\"success\\\",\\\"debugMessage\\\": \\\"success\\\"}}\";\r\n \t\t//return\" [{ \"+\"code\"+\": \"+\"200\"+\", \"+\"Status\"+\": \"+\"success\"+\",\"+\"displayMessage\"+\": \"+\"success\"+\", \"+\"debugMessage\"+\": \"+\"success\"+\" }]\";\r\n \t\t\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn \"{\\\"Status\\\":{\\\"code\\\": \\\"400\\\",\\\"Status\\\": \\\"failed\\\",\\\"displayMessage\\\": \\\"failed\\\",\\\"debugMessage\\\": \\\"failed\\\"}}\";\r\n }\r\n \t\r\n \r\n }", "@Test\n\tpublic void adminLogin()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"1234\", ClientType.ADMIN);\n\t\tAssert.assertNotNull(af);\n\t}", "@Test\n\tpublic void adminLogin2()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"4321\", ClientType.ADMIN);\n\t\tAssert.assertNull(af);\n\t}", "@GET\n\t@Path(\"/login\")\n\tpublic Response login(@QueryParam(\"user\") String user,@QueryParam(\"pass\") String pass) throws ClassNotFoundException, SQLException, InterruptedException, URISyntaxException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t// Connect to a database\n\t\tConnection con= DriverManager.getConnection(\"jdbc:mysql://localhost/ecs\",\"root\",\"\");\n\t\tStatement stmt=con.createStatement();\n\t\tString query = \"SELECT * FROM user_profiles WHERE User_Nam='\"+user+\"' AND Secret_Key='\"+pass+\"';\";\n\t\tResultSet rs = stmt.executeQuery(query) ;\n\t\tString s=\"\";\n\t\tif(rs.next()){\n\t\t\ts=\"Login successful\";\n\t\t\ttry {\n\t\t java.net.URI location = new java.net.URI(\"../adminHome.html\");\n\t\t throw new WebApplicationException(Response.temporaryRedirect(location).build());\n\t\t } catch (URISyntaxException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n\t\telse\n\t\t\ts=\"Login Failed\";\n\t\treturn Response.status(200).entity(s).build();\n\t}", "private String login() throws AxisFault {\n APIManagerConfiguration config = ServiceReferenceHolder.getInstance().\n getAPIManagerConfigurationService().getAPIManagerConfiguration();\n String user = config.getFirstProperty(APIConstants.API_GATEWAY_USERNAME);\n String password = config.getFirstProperty(APIConstants.API_GATEWAY_PASSWORD);\n String url = config.getFirstProperty(APIConstants.API_GATEWAY_SERVER_URL);\n\n if (url == null || user == null || password == null) {\n throw new AxisFault(\"Required API gateway admin configuration unspecified\");\n }\n\n String host;\n try {\n host = new URL(url).getHost();\n } catch (MalformedURLException e) {\n throw new AxisFault(\"API gateway URL is malformed\", e);\n }\n\n AuthenticationAdminStub authAdminStub = new AuthenticationAdminStub(\n ServiceReferenceHolder.getContextService().getClientConfigContext(),\n url + \"AuthenticationAdmin\");\n ServiceClient client = authAdminStub._getServiceClient();\n Options options = client.getOptions();\n options.setManageSession(true);\n try {\n authAdminStub.login(user, password, host);\n ServiceContext serviceContext = authAdminStub.\n _getServiceClient().getLastOperationContext().getServiceContext();\n String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);\n return sessionCookie;\n } catch (RemoteException e) {\n throw new AxisFault(\"Error while contacting the authentication admin services\", e);\n } catch (LoginAuthenticationExceptionException e) {\n throw new AxisFault(\"Error while authenticating against the API gateway admin\", e);\n }\n }", "@WebMethod(operationName = \"findByLogin\")\r\n public Administrateur findByLogin(@WebParam(name = \"loginAdmin\") String loginAdmin) {\r\n return ejbRef.findByLogin(loginAdmin);\r\n }", "private void login(String username,String password){\n\n }", "String getLoginapiavgrtt();", "@GetMapping(\"/user\")\n public User login(@RequestParam String username, @RequestParam String password) { return userDataTierConnection.login(username,password); }", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "public void login() throws ClassNotFoundException, SQLException {\n\t\tConnectionManager con=new ConnectionManager();//connection manager\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the username\");\r\n\t\tString name=s.next();\r\n\t\tSystem.out.println(\"Enter the password\");\r\n\t\tString pass=s.next();\r\n\t\tint flag=0;\r\n\t\tStatement st=con.getConnection().createStatement();\r\n\t\tResultSet set=st.executeQuery(\"select * from adminlogin\"); \r\n\t\twhile(set.next()) {\r\n\t\t\t//to display the values\r\n\t\t\tString name1=set.getString(1);\r\n\t\t\tString pw1=set.getString(2);\r\n\t\t\r\n\t\tif(name1.contentEquals(name)&& pass.contentEquals(pw1)) \r\n\t\t\tflag=1;\r\n\t\t}\r\n\t\tif(flag==1) {\r\n\r\n\t\t\tSystem.out.println(\"Admin login successful\");\r\n\t\t\tadminlogin ad=new adminlogin();\r\n\t\t\tad.option();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Sorry..!! Incorrect details.\\nLogin again\\n\");\r\n\t\t}\r\n\t\t\t\r\n\t\tHotelmanagement first=new Hotelmanagement();\r\n\t\tfirst.choice();\r\n\t}", "public interface AdminServiceI {\n Admin LoginCheck(String adminName, String adminPassword);\n\n}", "@Given ( \"I am logged into iTrust2 as an Admin\" )\r\n public void loginAsAdmin () {\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( \"admin\" );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n }", "@Override\r\n\tpublic Map<Boolean, String> login(String email, String pwd) {\r\n\t\tlogger.debug(\"**AdminService: login() method started**\");\r\n\t\tMap<Boolean, String> result = new HashMap<>();\r\n\t\t// calling findByEmail() method to get Entity obj\r\n\t\tAppAccountEntity entity = appAccRepository.findByEmail(email);\r\n\r\n\t\t// checking entity whether with that email any record found or not\r\n\t\tif (entity != null) {\r\n\t\t\t// check password by decrypting it\r\n\t\t\tString decrptPass = PasswordUtils.decrypt(entity.getPassword());\r\n\r\n\t\t\tif (pwd.equals(decrptPass)) {\r\n\t\t\t\tif (entity.getActiveSw().equals(AppConstants.ACTIVE_SW)) {\r\n\t\t\t\t\tif (entity.getRole().equals(AppConstants.ADMIN)) {\r\n\t\t\t\t\t\t// returning login flag as true and result message as admin\r\n\t\t\t\t\t\tresult.put(true, AppConstants.ADMIN);\r\n\t\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\t\tlogger.info(\"**AdminService: login success with admin\");\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// returning login flag as true and result message as caseWorker\r\n\t\t\t\t\t\tresult.put(true, AppConstants.CASE_WORKER);\r\n\t\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\t\tlogger.info(\"**AdminService: login success with caseworker\");\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// returning login flag as false and result message as Account is not Active,\r\n\t\t\t\t\t// For Query Contact IES Admin\r\n\t\t\t\t\tresult.put(false, AppConstants.ACCOUNT_DE_ACTIVATE_MSG);\r\n\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\tlogger.info(\"**AdminService: login failure account deactive\");\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// returning login flag as false and result message as Invalid Credentials\r\n\t\t\t\tresult.put(false, AppConstants.INVALID_CREDENTIALS);\r\n\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\tlogger.info(\"**AdminService: login failure invalid credential\");\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// returning login flag as false and result message as Invalid Credentials\r\n\t\t\tresult.put(false, AppConstants.INVALID_CREDENTIALS);\r\n\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\tlogger.info(\"**AdminService: login failure invalid credential\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "UserEntity getUserEntity(String username, String password, boolean isAdmin);", "public String auth (String id,String token){\n if (token.equals(\"ripcpsrlro3mfdjsaieoppsaa\")){\n return \"admin\";\n }\n else {\n Document query = new Document();\n query.put(\"id\", id);\n MongoCursor<Document> cursor = Security.find(query).iterator();\n if (cursor==null || !cursor.hasNext()) {\n System.out.println(\"here fails !\");\n System.out.println(cursor.hasNext());\n return \"none\";\n }\n else {\n Document c = cursor.next();\n String tnp = c.get(\"token\").toString();\n String admin = c.get(\"admin\").toString();\n if (tnp.equals(token)){\n if (admin.equals(\"true\")){\n return \"admin\";\n }\n else return \"user\";\n }\n else return \"none\";\n }\n }\n //return \"none\";\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n boolean adminExists = false;\n PrintWriter out = response.getWriter();\n try {\n String adminExistsSQL = \"SELECT * FROM admin\";\n PreparedStatement stmt = conn.prepareStatement(adminExistsSQL);\n rs = stmt.executeQuery();\n //If there is a result there must be an admin\n if (rs.next()) {\n adminExists = true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n }\n //Send the admin a login page\n if (adminExists) {\n String logonTable = \"<!DOCTYPE html>\\n\"\n + \"<html>\\n\"\n + \" <head>\\n\"\n + \" <title>Log into Admin Portal</title>\\n\"\n + \" <meta charset=\\\"UTF-8\\\">\\n\"\n + \" <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n\"\n + \" <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"css/loginStyle.css\\\" />\\n\"\n + \" </head>\\n\"\n + \" <body>\\n\"\n + \" <h1> Administrator Log In</h1>\\n\"\n + \" <div class='left'></div>\\n\"\n + \" <div class='right'></div>\\n\"\n + \" <div class=\\\"SignIn fadeInRight\\\">\\n\"\n + \"\\n\"\n + \" <form action='LoginAdmin' method='POST'>\\n\"\n + \" <h2 style='padding-left: 175px;'> name</h2> \\n\"\n + \" <label>\\n\"\n + \" <input type='text' name='username'/>\\n\"\n + \" </label>\\n\"\n + \" <br>\\n\"\n + \" <h2 style='padding-left: 160px;'>password</h2> \\n\"\n + \" <label>\\n\"\n + \" <input type='password' name='password'/> \\n\"\n + \" </label>\\n\"\n + \" <label>\\n\"\n + \" <input type='hidden' name='loginAttempt' value ='loginAttempt'/>\\n\"\n + \" </label>\\n\"\n + \" <br><br>\\n\"\n + \" <div class='submit'>\\n\"\n + \" <input type='submit' />\\n\"\n + \" </div>\\n\"\n + \"\\n\"\n + \" </form>\\n\"\n + \" </div>\\n\"\n + \"\\n\"\n + \"\\n\"\n + \" </body>\\n\"\n + \"</html>\\n\"\n + \"\";\n\n out.println(logonTable);\n //If there is no admin, send a sign up page\n } else {\n String signUpAdmin = \"<!DOCTYPE html>\\n\"\n + \"<html>\\n\"\n + \" <head>\\n\"\n + \" <title>Add an Admin</title>\\n\"\n + \" <meta charset=\\\"UTF-8\\\">\\n\"\n + \" <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n\"\n + \" <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"css/loginStyle.css\\\" />\\n\"\n + \" </head>\\n\"\n + \" <body>\\n\"\n + \" <h1> User this form to create a username and password for admin </h1>\\n\"\n + \" <div class='left'></div>\\n\"\n + \" <div class='right'></div>\\n\"\n + \" <div class=\\\"SignIn fadeInRight\\\">\\n\"\n + \"\\n\"\n + \" <form action='SignUp' method='POST'>\\n\"\n + \" <h2 style='padding-left: 175px;'> name</h2> \\n\"\n + \" <label>\\n\"\n + \" <input type='text' name='username'/>\\n\"\n + \" </label>\\n\"\n + \" <br>\\n\"\n + \" <h2 style='padding-left: 160px;'>password</h2> \\n\"\n + \" <label>\\n\"\n + \" <input type='password' name='password'/> \\n\"\n + \" </label>\\n\"\n + \" <br><br>\\n\"\n + \" <div class='submit'>\\n\"\n + \" <input type='submit' />\\n\"\n + \" </div>\\n\"\n + \"\\n\"\n + \" </form>\\n\"\n + \" </div>\\n\"\n + \"\\n\"\n + \"\\n\"\n + \" </body>\\n\"\n + \"</html>\\n\"\n + \"\";\n\n out.println(signUpAdmin);\n }\n }", "@GET\n @Path(\"/admin\")\n public String isAdmin() {\n return ResponseUtil.SendSuccess(response, \"\\\"isAdmin\\\":\\\"\" + SessionUtil.isAdmin(request) + \"\\\"\");\n }", "public String execute(){\n\t\t /*LoginDAO loginDAO=new LoginDAO();\n\t\t LoginDTO loginDTO=loginDAO.getLoginUserInfo(loginUserId, loginPassword);\n\n\t\t\tsession.put(\"admin_flg\", loginDTO.getAdminFlg());*/\n\t\t\treturn SUCCESS;\n\t}", "public interface AdminController {\n\n Admin login(Admin admin) throws SQLException;\n\n List<Admin> listAdmin(String adminName, String adminRole) throws SQLException;\n\n int addAdmin(Admin admin) throws SQLException;\n\n boolean delete(Long id) throws SQLException;\n\n boolean updateAdmin(Admin admin) throws SQLException;\n}", "public interface AdminDAO {\n boolean login(String mail, String password) throws SQLException;\n}", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "public interface AdminDao extends BaseDao{\n\n /**\n * 根据用户名查询该用户信息\n * @param admin\n * @return\n */\n public Admin findAdminByName(Admin admin);\n}", "@GetMapping(\"/{id}\")\n public Optional<Admin> getAdmin(@PathVariable int id){\n return adminService.getAdmin(id);\n }", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(message);\n\n ModelAndView model = new ModelAndView();\n model.addObject(\"search\", new SearchDto());\n model.setViewName(\"admin\");\n return model;\n }", "@Override\n\tpublic MemberDTO login(String id, String passwd) {\n\t\treturn adminDao.login(id, passwd);\n\t}", "public interface AdminService {\n\n /**\n * 用户列表查询\n * @param admin\n * @return\n */\n public List<Admin> queryadmin(Admin admin);\n\n int deladmin(Admin admin);\n}", "@RequestMapping(value = \"/login\", method = GET)\r\n\tpublic String login() {\r\n\t\treturn \"admin/login\";\r\n\t}", "public String login2(String name,String password){\n\t\tString result = \"\";\n\t\ttry{\n\t\t\tresultSet = statement.executeQuery(\"select userType from User where username='\"+name+\"' and password='\"+password+\"'\");\n\t\t\tresult = \"\";\n\t\t\tif(!resultSet.next()){\n\t\t\t\treturn \"null\";\n\t\t\t}\n\t\t\tint tmp = resultSet.getInt(1);\n\t\t\tif(0==tmp){\n\t\t\t\treturn \"admin\";\n\t\t\t} else if(1==tmp){\n\t\t\t\treturn \"volunteer\";\n\t\t\t} else if(2==tmp){\n\t\t\t\treturn \"student\";\n\t\t\t} else{\n\t\t\t\treturn \"sponsor\";\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e1){\n\t\t\tSystem.out.println(\"SQL Exception.\");\n\t\t\te1.printStackTrace();\n\t\t} catch (Exception e2){\n\t\t\tSystem.out.println(\"I hope this doesn't happen\");\n\t\t\te2.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic AdminDTO login(AdminloginDTO login) {\n\t\treturn adao.login(login);\n\t}", "public User getUser(String userName, String password);", "RequestResult loginRequest() throws Exception;", "public RestaurantDetails getRestaurantDetails(String userName, String password);", "@GET\n\t@Path(\"/custLogin\")\n\tpublic Response custLogin(@QueryParam(\"user\") String user,@QueryParam(\"pass\") String pass) throws ClassNotFoundException, SQLException, InterruptedException, URISyntaxException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t// Connect to a database\n\t\tConnection con= DriverManager.getConnection(\"jdbc:mysql://localhost/ecs\",\"root\",\"\");\n\t\tStatement stmt=con.createStatement();\n\t\tString query = \"SELECT * FROM cust_master WHERE cust_username ='\"+user+\"' AND cust_pwd='\"+pass+\"';\";\n\t\tResultSet rs = stmt.executeQuery(query) ;\n\t\tString s=\"\";\n\t\tif(rs.next()){\n\t\t\ts=\"Login successful\";\n\t\t\ttry {\n\t\t java.net.URI location = new java.net.URI(\"../custHome.jsp?custId=\"+rs.getInt(\"cust_id\"));\n\t\t throw new WebApplicationException(Response.temporaryRedirect(location).build());\n\t\t } catch (URISyntaxException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n\t\telse\n\t\t\ts=\"Login Failed\";\n\t\treturn Response.status(200).entity(s).build();\n\t}", "public String getAdminUserName() {\n return adminUserName;\n }", "public String signin() {\n \t//System.out.print(share);\n \tSystem.out.println(username+\"&&\"+password);\n String sqlForsignin = \"select password from User where username=?\";\n Matcher matcher = pattern.matcher(sqlForsignin);\n String sql1 = matcher.replaceFirst(\"'\"+username+\"'\");//要到数据库中查询的语句\n select();\n DBConnection connect = new DBConnection();\n List<String> result = connect.select(sql1);//查询结果\n if (result.size() == 0) return \"Fail1\";\n \n if (result.get(0).equals(password)){\n \tsession.setAttribute( \"username\", username);\n \treturn \"Success\";\n }\n else return \"Fail\";\n }", "public boolean login() {\n\n\t con = openDBConnection();\n\t try{\n\t pstmt= con.prepareStatement(\"SELECT ID FROM TEAM5.CUSTOMER WHERE USERNAME =? AND PASSWORD=?\");\n pstmt.clearParameters();\n pstmt.setString(1,this.username);\n pstmt.setString(2, this.password);\n\t result= pstmt.executeQuery();\n\t if(result.next()) {\n\t \t this.setId(result.getInt(\"id\")); \n\t \t this.loggedIn = true; \n\t }\n\t return this.loggedIn;\n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t return false;\n\t }\n\t }", "@Override\n public Token login(String _username, String _password,\n HttpServletRequest _request) throws AuthException {\n return new Token(this.config.getAdminToken(), null);\n }", "@RequestMapping(value = \"/{username}/{password}\", method= RequestMethod.GET)\n @ResponseBody\n public ResponseEntity<HashMap<String,String>> login (@PathVariable(\"username\") String username,\n @PathVariable(\"password\") String password) throws ParseException {\n\n respMap = new HashMap<>();\n httpStatus = HttpStatus.OK;\n Timestamp startTime = getTimeStamp();\n User user = userRepo.findByEmailAddress(username);\n\n if (user != null) { // yes user with this username exists\n\n if (user.getPassword().equals(password)) {\n if ( user.getApproved()) {\n respMap.put(\"message\", user.getType() + \" User \" + user.getFirstname() + \" with id \" + user.getUserid() + \" is logged in!\");\n respMap.put(\"userType\", user.getType());\n\n respMap.put(\"name\", user.getFirstname());\n respMap.put(\"httpStatus\", \"\" + HttpStatus.OK);\n respMap.put(\"startTime\", \"\" + startTime);\n respMap.put(\"userId\", \"\" + user.getUserid());\n respMap.put(\"success\", \"\" + 1);\n } else {\n respMap.put( \"message\" , \"Account has not been approved .. check with Administrator\");\n respMap.put( \"success\" , \"0\");\n message = \"Account has not been approved .. check with Administrator\";\n }\n\n } else { // password incorrect\n respMap.put( \"message\" , \"Username : [\" + username + \"] or password : [\" + password + \"] incorrect\");\n respMap.put( \"success\" , \"0\");\n message = \"Username or password incorrect\";\n }\n } else { // username not found\n respMap.put( \"message\" , \"Username : [\" + username + \"] or password : [\" + password + \"] incorrect\");\n respMap.put( \"success\" , \"\"+0);\n respMap.put(\"httpStatus\", \"\"+ HttpStatus.OK);\n\n }\n\n\n\n return new ResponseEntity<>(respMap, httpStatus);\n }", "public String login(LoginRequest loginRequest) throws SQLException{\n String sql = \"SELECT user_password FROM user WHERE user_phone = '\"\n + loginRequest.getUserName()+\"';\";\n Statement statement = connection.createStatement();\n ResultSet resultSetLogin = statement.executeQuery(sql);\n while (resultSetLogin.next()){\n if (loginRequest.getPassword().equals(resultSetLogin.getString(\"user_password\")) == true){\n return \"Login success\";\n } else return \"Password khong chinh xac\";\n } return \"Login failure\";\n }", "public JSONObject loginUser(String name, String pwd, String type,\n\t\t\tHttpServletRequest request) {\n\t\tPomsUsersManagement user = userManagement.selectByUnamePwd(name, pwd);\n\t\tJSONObject json = new JSONObject();\n\t\tHttpSession session = request.getSession();\n\t\tString selType=type;\n\t\tif (user == null) {\n\t\t\tjson.put(\"utype\", -1);\n\t\t\treturn json;\n\t\t} else {\n\t\t\tboolean test = false; // 记录是否有相应的权限\n\t\t\tList<PomsRolesUsersRela> ps = roleUserReal.selectByUserId(user\n\t\t\t\t\t.getId());\n\t\t\tif (user.getId().equals(\"1\")) {\n\t\t\t\ttest = true;\n\t\t\t} else {\n\t\t\t\tfor (PomsRolesUsersRela p : ps) {\n\t\t\t\t\tList<PomsRoleModuleAction> setrm = moduleAction\n\t\t\t\t\t\t\t.selectByRAId(p.getRoleId());\n\t\t\t\t\tsession.setAttribute(\"loginUserModule\", setrm);// 登录用户该角色的模块\n\t\t\t\t\tfor (PomsRoleModuleAction rm : setrm) {\n\t\t\t\t\t\tPomsModulesManagement pmm = modulesManagement\n\t\t\t\t\t\t\t\t.selectByPrimaryKey(rm.getMmId());\n\t\t\t\t\t\tif (pmm.getMmModuleProperty() != null\n\t\t\t\t\t\t\t\t&& pmm.getMmModuleProperty().equals(type)) {// 发现有进入某个模块的权利\n\t\t\t\t\t\t\ttest = true;\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}\n\t\t\t}\n\t\t\tif (test) { // 判断是否有权限进入所选择的系统\n\t\t\t\tjson.put(\"utype\", 0);\n\t\t\t\tString url = \"\";\n\t\t\t\t// 修改url , 将进入各个系统正确的路径赋予 url.\n\t\t\t\tif (type.equals(\"3\") && test) {// 进入采集系统\n\t\t\t\t\turl = \"index-qz\";\n\t\t\t\t\tselType=\"3\";\n\t\t\t\t} else if ((type.equals(\"1\")||type.equals(\"6\")||type.equals(\"7\")) && test) { // 运维\n\t\t\t\t\turl = \"index-yw\";\n\t\t\t\t\tselType=\"1\";\n\t\t\t\t} else if ((type.equals(\"2\") || type.equals(\"9\")||type.equals(\"5\")||type.equals(\"4\")||type.equals(\"10\")) && test) { // 监测\n\t\t\t\t\turl = \"index\";\n\t\t\t\t}\n\t\t\t\tList<PomsModulesManagement> modules = getModules(user.getId(),\n\t\t\t\t\t\tselType, \"0\");\n\t\t\t\tsession.setAttribute(\"loginUser\", user); // 登陆的用户\n\t\t\t\tsession.setAttribute(\"loginUserRole\", ps);// 登录的角色\n\t\t\t\tsession.setAttribute(\"loginType\", type);\n\t\t\t\tsession.setAttribute(\"loginMenu\", modules); // 用户的菜单\n\t\t\t\tsession.setAttribute(\"loginDate\", new SimpleDateFormat(\n\t\t\t\t\t\t\"yyyy年MM月dd日 E\").format(new Date()));\n\n\t\t\t\tjson.put(\"url\", url);\n\t\t\t\treturn json;\n\t\t\t} else {\n\t\t\t\tjson.put(\"utype\", -2);\n\t\t\t\treturn json;\n\t\t\t}\n\t\t}\n\t}", "java.lang.String getNewAdmin();", "public String login() throws Exception {\n System.out.println(user);\n return \"toIndex\" ;\n }", "public UserModel getAuthUser(String userId, String password, String type) {\r\n\t\tmethodname = \"getAuthUser\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tUserModel user = null ;\r\n\t\tuser = authDao.getAuthUser(userId,password,type) ; \r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn user ;\r\n\t}", "public boolean login(String Usuario, String Password)\n {\n try\n {\n PreparedStatement pstm = null; \n ResultSet rs = null;\n String query = \"SELECT ID_User FROM Usuario WHERE username = ? AND password = ? AND status = ?\";\n pstm = con.prepareStatement(query);\n pstm.setString(1, Usuario);//convertir a String el parametro Usuario\n pstm.setString(2, Password);//convertir a String el parametro Password\n pstm.setBoolean(3, true);//convertir a boolean \n rs = pstm.executeQuery();//ejecutar el query \n if(rs.next())\n {\n return true;\n }else{\n return false;\n }\n }catch(Exception ex)\n {\n ex.printStackTrace();\n return false;\n }\n }", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "@GetMapping(\"/api/v1/login\")\n public String login() {\n return \"Success\";\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "@org.junit.Test\r\n\tpublic void login() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"LoginServlet?action=login\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info\", \"jitl\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info2\", \"admin\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info3\", \"admin\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}", "EmployeeMaster authenticateUser(int employeeId, String password);", "@GetMapping(\"/\")\n\tpublic ResponseEntity<Object> getAdministrator(HttpServletRequest request){\n\t\tAdministrator admin = service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession()));\n\t\tif(admin == null) return new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\tMappingJacksonValue mappedAdmin = new MappingJacksonValue(admin);\n\t\tmappedAdmin.setFilters(new SimpleFilterProvider().addFilter(Administrator.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"email\", \"name\")));\n\t\treturn new ResponseEntity<>(mappedAdmin, HttpStatus.OK);\n\t}", "com.bingo.server.msg.REQ.LoginRequest getLogin();", "protected void login() {\n\t\t\r\n\t}", "public Integer logIn(String u_name, String u_pw){\n //find entry with u_name = this.u_name\n //probably not so safe\n //getting user with index 0 because getUserFromUsername returns List\n User user = userDao.getUserFromUsername(u_name).get(0);\n //print at console\n LOGGER.info(\"User: \" + user);\n //returns integer 1 if user.get_pw equals to this.pw or 0 if not\n if (user.getU_Pw().equals(u_pw)){\n return user.getU_Id();\n }else{\n return 0;\n }\n }", "public static void main(String[] args) {\n Login l = new Login();\n if(l.checkLogin(\"admin\", \"12345\")){\n List<Login> ll = Login.UserLogin(\"admin\", \"12345\");\n System.out.println(\"เข้าสู่ระบบสำเร็จ\");\n System.out.println(ll);\n }\n else{\n System.out.println(\"พาสเวิร์ดหรือชื่อผู้ใช้ผิด\");\n }\n }", "@Override\r\n\tpublic LoginBean verifyUserLogin(String uname, String pass) {\r\n\t\tLoginBean loginBean= new LoginBean();\r\n\t\tString sql = \"select userId,userName,password from Login where userName = ? and password=? \";\r\n\t\t loginBean= template.queryForObject(sql,\r\n\t\t\t\t\tnew Object[] { uname, pass },\r\n\t\t\t\t\tnew BeanPropertyRowMapper<LoginBean>(LoginBean.class));\r\n\t\t return loginBean;\r\n\t\t\r\n\t}", "public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }", "public String login() {\r\n String ruta = \"\";\r\n UsuarioDAO usuDAO = new UsuarioDAO();\r\n if (usuDAO.Login(this) != null) {\r\n ruta = FN.ruta(\"menu\");\r\n Empresa em = new Empresa();\r\n em.setEmpresa(\"2101895685\");\r\n em.setRazonSocial(\"Tibox SRL\");\r\n em.setDireccion(\"MiCasa\");\r\n SSU.sEmpresa(em);\r\n SSU.sUsuario(this);\r\n }\r\n return ruta;\r\n }", "public interface AdminService {\n\n\n Admin select_adminById(int admin_id);\n}", "public AuthToken loginUser(){\n return null;\n }", "@Override\n\tpublic String login2(MemberDTO mdto) {\n\t\treturn adminDao.login2(mdto);\n\t}", "Admin selectByName(String adminName);", "public abstract User login(User data);", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tPrintWriter out=response.getWriter();\r\n\t\tString id=request.getParameter(\"id\");\r\n\t\tString password=request.getParameter(\"password\");\r\n\t\t\r\n\t\tAdminBean bean=new AdminBean();\r\n\t\tbean.setId(id);\r\n\t\tbean.setPassword(password);\r\n\t\t\r\n\t\tHttpSession session=request.getSession(); \r\n session.setAttribute(\"uname\",id); \r\n \r\n\t\t\r\n\t\tInterface i=new Implementation();\r\n\t\tint result=i.adminLogin(bean);\r\n\t\t\r\n\t\tif(result==0)\r\n\t\t{\r\n\t\t\t response.setContentType(\"text/html\"); \r\n\t\t\t\tout.println(\"<html>\");\r\n\t\t\r\n\t\t\t\tout.println(\"<body> \");\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tout.println(\"<center><h2>Invalid ID or Password...<a href=admin.html> Try again</a><h2></center>\");\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tout.println(\"</body></html>\");\r\n\t\t}\r\n\t\telse if(result==1)\r\n\t\t{\r\n\t\t\tresponse.sendRedirect(\"admin_welcome.jsp\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}" ]
[ "0.69022894", "0.68155277", "0.67970866", "0.6724882", "0.6592637", "0.6592154", "0.658111", "0.65603685", "0.6549765", "0.65212363", "0.65193504", "0.6512761", "0.64888436", "0.64888436", "0.64688015", "0.64658225", "0.6464857", "0.64274395", "0.64233667", "0.64084256", "0.6340544", "0.6334083", "0.6324549", "0.631745", "0.62984747", "0.6288939", "0.6285592", "0.6279456", "0.625924", "0.62554216", "0.62503576", "0.6241446", "0.62316906", "0.62295693", "0.6221916", "0.6219247", "0.6218823", "0.62187713", "0.6214043", "0.6212884", "0.62033683", "0.61945534", "0.61854607", "0.6170863", "0.6147639", "0.61274815", "0.6110178", "0.60685146", "0.60641426", "0.6063868", "0.6056082", "0.60533696", "0.6037414", "0.6037064", "0.60228086", "0.6020294", "0.6016376", "0.59997034", "0.59967303", "0.5996423", "0.5991927", "0.59872377", "0.5977019", "0.5968553", "0.59518296", "0.5937679", "0.5928668", "0.5914926", "0.59115976", "0.588905", "0.5874141", "0.58682954", "0.58656913", "0.58607954", "0.5853053", "0.5852318", "0.58439255", "0.58438367", "0.584053", "0.5837295", "0.58344126", "0.5832677", "0.58224165", "0.5822393", "0.58201116", "0.5815792", "0.5812307", "0.58102906", "0.58087605", "0.58080506", "0.58079237", "0.5805592", "0.5802429", "0.5800327", "0.57915133", "0.57913005", "0.57892305", "0.5783406", "0.5759545", "0.5757802" ]
0.6720754
4
/ This is a GetMethod(Http) used to get the Admin Details using Admin Id from Database. Method : getAdmin Type : Admin parameters: the adminId is of String type Returns : the object of Admin Author : Alok Dixit Date : 25/09/2020 Version : 1.0
@Override public Admin getAdmin(String adminId) { if(!adminRepository.existsById(adminId)) throw new AdminNotFoundException("User with id "+adminId+" Not Found"); return adminRepository.getOne(adminId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/{id}\")\n public Optional<Admin> getAdmin(@PathVariable int id){\n return adminService.getAdmin(id);\n }", "@Override\r\n\tpublic List<Admin> getAdminDetails() {\n\t\tList<Admin> admin =dao.getAdminDetails();\r\n return admin;\r\n\t}", "@Override\r\n\tpublic List<Admin> getAdminDetails(String ID) {\n\t\tSession session=sessionFactory.openSession();\r\n\t\tQuery query=\r\n\t\t\t\tsession.createQuery(\"from Admin\");\r\n\t\t\r\n\t\t\r\n\t\tList<Admin> adminList=query.list();\r\n\t\tif(adminList.isEmpty())\r\n\t\t\tSystem.out.println(\"List Passed\"+adminList.toString());\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Not empty \"+adminList.get(0));\r\n\t\t\r\n\t\treturn adminList;\r\n\t}", "@Override\n\tpublic Admin getAdminById(Long adminId) {\n\t\treturn (Admin) getSession().get(Admin.class, adminId);\n\t}", "public static List<Admin> getAdmin() {\r\n\t\t//conn = DBConnection.getConnection();\r\n\t\t\r\n\r\n\t\tAdmin admin = null;\r\n\t\tList<Admin> listOfproducts = new ArrayList<Admin>();\r\n\r\n\t\ttry {\r\n\t\t\tStatement statement = conn.createStatement();\r\n\t\t\tResultSet resultSet = statement.executeQuery(getAllQuery);\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t//User user = new User();\r\n\t\t\t\tint adminId = resultSet.getInt(1);\r\n\t\t\t\tString adminname = resultSet.getString(2);\r\n String adminpassword = resultSet.getString(3);\r\n\r\n\t\t\t\tadmin.setAdminid(adminId);\r\n\t\t\t\tadmin.setAdminname(adminname);\r\n\t\t\t\tadmin.setAdminpassword(adminpassword);\r\n\r\n\t\t\t\tlistOfproducts.add(admin);\r\n\t\t\t}\r\n\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\r\n\t\treturn listOfproducts;\r\n\r\n\t}", "java.lang.String getAdmin();", "@GET(\"administrators/{id}\")\n Call<User> getUser(\n @retrofit2.http.Path(\"id\") Integer id\n );", "@Override\n\tpublic Response getAnswerAdmin(GetAnswerAdminRequest getAnswerAdminRequest)\n\t\t\tthrows CustomAdminException {\n\t\tGetAnswerAdminResponseList resp =new GetAnswerAdminResponseList();\n\t\t\n\t\tresp = serviceHelper.getAnswerAdmin(getAnswerAdminRequest);\n \n\t\tif (resp == null) {\n\t\t\t// Empty JSON Object - to create {} as notation for empty resultset\n\t\t\tJSONObject obj = new JSONObject();\t\t\t\n\t\t\treturn CDSOUtils.createOKResponse(obj.toString());\n\t\t} else {\n\t\t\treturn CDSOUtils.createOKResponse(resp);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic Admin getAdminById(int id) {\n\t\treturn ar.getOne(id);\n\t}", "@Override//查询数据\r\n\tpublic AdminSession GetAdmin(String adminname) {\n\t\tString GetAdminIDsql = \"select * from Admin where UserName=?\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement pStatement=this.connection.prepareStatement(GetAdminIDsql);\r\n\t\t\tpStatement.setString(1, adminname);\r\n\t\t\tResultSet rSet=pStatement.executeQuery();\r\n\t\t\tif (rSet.next()) {\r\n\t\t\t\tAdminSession adminSession = new AdminSession(rSet.getInt(\"ID\"), rSet.getString(\"UserName\"));\r\n\t\t\t\treturn adminSession;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Test\n public void getAdminsTest() throws ApiException {\n String scope = null;\n AdminResponse response = api.getAdmins(scope);\n\n // TODO: test validations\n }", "public Admin queryOneAdmin(Admin admin);", "public String getAdminId() {\n return adminId;\n }", "public String getAdminId() {\n return adminId;\n }", "public interface AdminService {\n\n\n Admin select_adminById(int admin_id);\n}", "Admin selectByPrimaryKey(Integer adminId);", "@Override\n\tpublic AdminEntity getAdmin(int adminID) {\n\t\treturn null;\n\t}", "public abstract T findById(K id, Boolean isAdmin) throws ServiceException;", "Admin selectByPrimaryKey(Integer adminid);", "public interface AdminDao extends BaseDao{\n\n /**\n * 根据用户名查询该用户信息\n * @param admin\n * @return\n */\n public Admin findAdminByName(Admin admin);\n}", "@Override\n\tpublic Admin getAllAdminByid(int id) {\n\t\tString hql=\"from Admin a where a.id=?\";\n\t\tList<Admin> l=getHibernateTemplate().find(hql,id);\n\t\treturn l.isEmpty()||l==null ? null:l.get(0);\n\t}", "public String getAdminid() {\r\n return adminid;\r\n }", "Admin selectByName(String adminName);", "public Admin getAdminByid(int id) {\n\t\treturn adminMapper.selectAdminByid(id);\n\t\t//return admins;\n\t}", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "public String getAdminCode(){\n return this.adminCode;\n }", "public interface AdminService {\n\n /**\n *根据管理员账号获取管理员信息\n * @author zhou_wb\n * @version 1.0\n * @date 2017年5月15日\n */\n Admin findLoginDtoByAccount(String account);\n\n /**\n * 添加管理员\n */\n HttpStatus add(String adminUser,Admin admin) throws JsonProcessingException;\n\n /**\n * 添加角色\n */\n Admin addRole(String adminUser,Admin admin);\n\n /**\n * 获取所有管理员信息\n */\n List<Admin> getAll();\n}", "@GetMapping(\"/all\")\n public List<Admin> getAll(){\n return adminService.getAll();\n }", "@Override\n\tpublic Admin getAdminByLoginNameAndPassword(int parseInt) {\n\t\tString hql = \"from Admin a where a.id=?\";\n\t\tList<Admin> al = getHibernateTemplate().find(hql,parseInt);\n\t\treturn al.isEmpty()||al==null?null:al.get(0);\n\t}", "public static List<AdminDetails> list() {\n\t\treturn null;\r\n\t}", "@GET\n @Path(\"/admin\")\n public String isAdmin() {\n return ResponseUtil.SendSuccess(response, \"\\\"isAdmin\\\":\\\"\" + SessionUtil.isAdmin(request) + \"\\\"\");\n }", "@GetMapping(\"/\")\n\tpublic ResponseEntity<Object> getAdministrator(HttpServletRequest request){\n\t\tAdministrator admin = service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession()));\n\t\tif(admin == null) return new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\tMappingJacksonValue mappedAdmin = new MappingJacksonValue(admin);\n\t\tmappedAdmin.setFilters(new SimpleFilterProvider().addFilter(Administrator.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"email\", \"name\")));\n\t\treturn new ResponseEntity<>(mappedAdmin, HttpStatus.OK);\n\t}", "public int getAdmin() {\n return admin;\n }", "public interface AdminService {\n\n /**\n * 用户列表查询\n * @param admin\n * @return\n */\n public List<Admin> queryadmin(Admin admin);\n\n int deladmin(Admin admin);\n}", "public interface AdminDao {\n public Admin queryOneByNameAndPassword(Admin admin);\n}", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(message);\n\n ModelAndView model = new ModelAndView();\n model.addObject(\"search\", new SearchDto());\n model.setViewName(\"admin\");\n return model;\n }", "public Admin getAdminByEmailAndPassword(String email, String password){\r\n \r\n Admin admin=null;\r\n \r\n try {\r\n \r\n String query=\"from Admin where adminEmail =:e and adminPassword =:p\"; \r\n \r\n Session session=this.factory.openSession();\r\n Query q=session.createQuery(query);\r\n q.setParameter(\"e\", email);\r\n q.setParameter(\"p\", password);\r\n admin=(Admin)q.uniqueResult();\r\n session.close();\r\n \r\n } catch (HibernateException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n \r\n \r\n \r\n return admin;\r\n \r\n \r\n }", "@GetMapping(\"/indexAdmin\")\n public String indexAdmin() {\n return \"indexAdmin\";\n }", "@Override\n\tpublic List<Admin> getAdmins() {\n\t\treturn ar.findAll();\n\t}", "public int getAdminId() {\n\t\treturn adminId;\n\t}", "void doGetAdminInfo() {\n\t\tlog.config(\"doGetAdminInfo()...\");\n\t\tthis.rpcService.getAdminInfo(new AsyncCallback<DtoAdminInfo>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tString errorMessage = \"Error when getting admin info! : \" + caught.getMessage();\n\t\t\t\tlog.severe(errorMessage);\n\t\t\t\tgetAdminPanel().setActionResult(errorMessage, ResultType.error);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(DtoAdminInfo adminInfo) {\n\t\t\t\tlog.config(\"getAdminInfo() on success - \" + adminInfo.getListLogFilenames().size() + \" logs filenames.\");\n\t\t\t\tgetAdminPanel().setAdminInfo(adminInfo);\n\t\t\t}\n\t\t});\n\t}", "@GetMapping(path=\"/getone\")\r\n\tpublic @ResponseBody Optional<MyClass> getOneAdmin(@RequestParam Integer id) {\n\t\treturn classRepository.findById(id);\r\n\t}", "@GetMapping(\"/admin\")\n public String adminindex(){\n\n return \"adminindex\";\n }", "public interface IAdminDao {\n\n public Admin getAdminByName(String name);\n\n}", "com.google.protobuf.ByteString\n getAdminBytes();", "@RequestMapping(path = \"/delAdmin/{id}\")\n public String delAdmin(HttpServletRequest request, @Value(\"删除帐号、员工信息\") String type,@PathVariable(\"id\") String id){\n adminService.delAdmin(id);\n// empService.delEmp(admin.getId()); //这个是根据编号删除,我们要根据帐号删除\n\n empService.delEmpByAdminID(id);\n\n //日志\n addlog(request,type);\n return \"redirect:/adminList/1\";\n }", "public Admin getAdminByLogin(String login);", "public String getAdminUserName() {\n return adminUserName;\n }", "@GET\n\t@RequestMapping(value = \"/admin\")\n\t@Secured(value = { \"ROLE_ADMIN\" })\n\tpublic String openAdminMainPage() {\n\t\t\n\t\treturn \"admin/admin\";\n\t}", "public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Administrator[] getAllAdmin() {\n\t\ttry {\n\t\t\tConnection conn = DbConnections.getConnection(DbConnections.ConnectionType.POSTGRESQL);\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from public.administrator\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tList<Administrator> adminList = new ArrayList<Administrator>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tint idUser = rs.getInt(\"id_user\");\n\t\t\t\tString nume = rs.getString(\"nume\");\n\t\t\t\tString prenume = rs.getString(\"prenume\");\n\t\t\t\t\n\t\t\t\tadminList.add(new Administrator(id, idUser, nume, prenume));\n\t\t\t}\n\t\t\tDbConnections.closeConnection(conn);\n\t\t\treturn adminList.toArray(new Administrator[adminList.size()]);\n\t\t} catch (SQLException e) {\n\t\t\treturn null;\n\t\t}\n\n\t}", "java.lang.String getNewAdmin();", "public Admin doRetrieveAdmin(String email, String password) {\n try {\n PreparedStatement ps = conn.prepareStatement(\" SELECT * FROM user \"\n + \"WHERE TRIM(LOWER(email)) = TRIM(?) AND TRIM(password) = TRIM(?) AND user_type = 2\");\n ps.setString(1, email);\n ps.setString(2, password);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n Admin a = new Admin();\n a.setEmail(rs.getString(1));\n a.setName(rs.getString(2));\n a.setSurname(rs.getString(3));\n a.setSex(rs.getString(\"sex\").charAt(0));\n a.setPassword(rs.getString(5));\n a.setUserType(rs.getInt(6));\n return a;\n }\n return null;\n } catch (SQLException e) {\n System.out.println(\"doRetrieveAdmin: error while executing the query\\n\" + e);\n throw new RuntimeException(e);\n }\n }", "public static ArrayList<Admin> getLockedAdmin() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_LOCKED_ADMINS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Admin> adminBloccati = (ArrayList<Admin>) rpp.parameters[0];\n\t\treturn adminBloccati;\n\t}", "public interface AdminController {\n\n Admin login(Admin admin) throws SQLException;\n\n List<Admin> listAdmin(String adminName, String adminRole) throws SQLException;\n\n int addAdmin(Admin admin) throws SQLException;\n\n boolean delete(Long id) throws SQLException;\n\n boolean updateAdmin(Admin admin) throws SQLException;\n}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\r\n\tpublic List<Admins> getQueryAdminAll() {\n\t\treturn adi.queryAdminAll();\r\n\t}", "public String getAdminUser() {\n return adminUser;\n }", "@Override\n\tpublic Admin adminLogin(Admin admin) {\n\t\tString sql = \"select * from admin where adminName = ? and adminPwd = ?\";\n\t\tAdmin admin1 = (Admin) JDBCUtil.executeQueryOne(sql, new adminMapping(), admin.getAdminName(),admin.getAdminPwd());\n\t\tif(admin1 != null){\n\t\t\treturn admin1;\n\t\t}\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\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 admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Admin findLoginAdmin(String adminEmail, String adminPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\n\t\tQuery<Admin> query = session.createQuery(\"from Admin where admin_email=:email and admin_passwd=:passwd\");\n\t\tquery.setParameter(\"email\", adminEmail);\n\t\tquery.setParameter(\"passwd\", adminPassword);\n\t\tAdmin admin = query.uniqueResult();\n\t\t// System.out.print(admin.getPerson().getRealName());\n\t\ttran.commit();\n\t\tsession.close();\n\t\treturn admin;\n\t}", "public Administrator[] getAllAdmin()\n {\n return admin;\n }", "@RequestMapping(value=\"/admin\", method=RequestMethod.GET)\r\n\tpublic String getAdminPage(Model model) {\r\n\t\treturn \"admin\";\r\n\t}", "public int getCod_admin() {\r\n return cod_admin;\r\n }", "PlatformAdminRoleUser selectByPrimaryKey(@Param(\"roleId\") String roleId, @Param(\"adminId\") String adminId);", "List<UserDisplayDto> findeAdmins();", "@Transactional(readOnly = true) \n public Administrator findOne(Long id) {\n log.debug(\"Request to get Administrator : {}\", id);\n Administrator administrator = administratorRepository.findOne(id);\n return administrator;\n }", "List<Admin> selectByExample(AdminExample example);", "@RequestMapping(value=\"/admin\" , method= RequestMethod.GET)\n\tpublic String adminPage(ModelMap model) { \n\t\t\n\t\tmodel.addAttribute(\"user\",getUserData());\n\t\treturn\"admin\";\n\t}", "public java.lang.String getAdmin() {\n java.lang.Object ref = admin_;\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 admin_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getAdmin() {\n java.lang.Object ref = admin_;\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 admin_ = s;\n return s;\n }\n }", "@Override\r\n\tpublic List<HashMap<String, String>> getGeunTaeAdminList(HashMap<String, String> params) {\n\t\treturn sqlsession.selectList(\"GeuntaeMgnt.getGeunTaeAdminList\",params);\r\n\t}", "public static void retrocedi_admin(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}", "@Override\n\tpublic List<UsuariosEntity> findAdmin(){\n\t\treturn (List<UsuariosEntity>) iUsuarios.findAdmin();\n\t}", "public Admin findLoginAdmin(String AdminTelephone, String adminPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\n\t\tQuery<Admin> query = session.createQuery(\"from Admin where admin_phone=:phone and admin_pwd=:passwd\");\n\t\tquery.setParameter(\"phone\", AdminTelephone);\n\t\tquery.setParameter(\"passwd\", adminPassword);\n\t\tAdmin admin = query.uniqueResult();\n\t\t// System.out.print(admin.getPerson().getRealName());\n\t\ttran.commit();\n\t\tsession.close();\n\t\treturn admin;\n\t}", "public String getAdminName() {\n return adminName;\n }", "public String getAdminName() {\n return adminName;\n }", "@RequiresPermissions(\"test:test\")\n\t @RequestMapping(\"/admin2\")\n\t public String admin2(Model model) {\n\t \t//当前用户凭证\n\t\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\t\tList<Seller> sellerList = sellerService.getsel(principal.getSellerId());\n\t\t\tmodel.addAttribute(\"seller\",sellerList.get(0));\n\t\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n\t return \"index管理员\";\n\t\n\t }", "public void setAdminId(int adminId) {\n\t\tthis.adminId = adminId;\n\t}", "@ApiOperation(value=\"get方法測式\", notes=\"取得會員資料\")\n @RequestMapping(value=\"getMethod\",method=RequestMethod.GET)\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Success\", response = String.class),\n @ApiResponse(code = 401, message = \"Unauthorized\"),\n @ApiResponse(code = 403, message = \"Forbidden\"),\n @ApiResponse(code = 404, message = \"Not Found\"),\n @ApiResponse(code = 500, message = \"Failure\")})\n public String getMember(@ApiParam(value = \"name that need to be updated\", required = true) @RequestParam String memberId) {\n System.out.println(\"==memberId===>\"+memberId);\n return memberId;\n }", "public Admin createAdmin(){\n\t\ttry {\n\t\t\treturn conn.getAdmin();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "AdminKeys getAdminKeys();", "Optional<TenantSuperAdminDTO> findOne(Long id);", "public String getAdminname() {\n return adminname;\n }", "@Query(\"select ad from AccountDetail ad where ad.role = 'USER'\")\n List<AccountDetail> getAllAdminAccounts();", "@Override\n\tpublic List<Basicunit> selectAllforadmin() {\n\t\treturn basicDAOManager.selectAllforadmin();\n\t}", "@Override\r\n\tpublic Integer findAdminPassword(Admin admin) {\n\t\treturn adminMapper.findAdminPassword(admin);\r\n\t}", "@Override\r\n\tpublic Admins getAdminLogin(String aname, String apwd) {\n\t\treturn adi.adminLogin(aname, apwd);\r\n\t}", "public Admin getAdminByLoginNameAndPassword(String adminLoginName,\n\t\t\tString adminPassword) {\n\t\tString hql=\"from Admin i where i.adminName=? and i.adminPassword=?\";\n\t\tObject[] parm={adminLoginName,adminPassword};\n\t\tList l=getHibernateTemplate().find(hql,parm);\n\t\treturn l.isEmpty()||l==null? null:(Admin)l.get(0);\n\t}", "UserEntity getUserEntity(String username, String password, boolean isAdmin);", "@Override\n\tpublic List<?> selectBoardAdminList() {\n\t\treturn eduBbsDAO.selectBoardAdminList();\n\t}", "public interface AdminService {\n Admin query(Admin admin);\n}", "public String getAdminUsername() {\n\treturn adminUsername;\n}", "@Query(\"select a from Account a where a.role = 'Admin'\")\n List<Account> getAllAdmins();", "public URI getAdminURL() {\n return adminURL;\n }", "static public int getADMIN() {\n return 1;\n }", "public String getIsAdmin() {\n return isAdmin;\n }", "public Long getAdminRoleId() {\n\t\treturn this.adminRoleId;\n\t}", "@Override\r\n\tpublic AdminRole getAdminRole(int roleid) {\n\t\treturn adminRoleDao.selectByPrimaryKey(roleid);\r\n\t}", "public Administrator getAdmin(int index)\n {\n return admin[index];\n }" ]
[ "0.7548399", "0.7146941", "0.7090182", "0.6907241", "0.68164396", "0.6792782", "0.6740624", "0.67188424", "0.6698061", "0.6611399", "0.6540875", "0.64863104", "0.6463316", "0.6463316", "0.645147", "0.6402441", "0.64018345", "0.6394915", "0.63859993", "0.637118", "0.63624775", "0.6345005", "0.6339195", "0.63377404", "0.63370645", "0.6334186", "0.62806416", "0.6280144", "0.6239244", "0.6213009", "0.620812", "0.62000656", "0.61800814", "0.61779165", "0.61702204", "0.6131895", "0.6087906", "0.60864747", "0.6077836", "0.60528624", "0.604966", "0.6041335", "0.6020975", "0.5999638", "0.597128", "0.5959748", "0.5953434", "0.5938103", "0.59300095", "0.59263116", "0.5922041", "0.59142286", "0.59070855", "0.5906802", "0.5905289", "0.58954364", "0.5879959", "0.5869555", "0.58587366", "0.5856307", "0.58433956", "0.5842477", "0.58363616", "0.5833392", "0.5817262", "0.5813717", "0.58131516", "0.58110744", "0.58023185", "0.57854986", "0.57813793", "0.57760495", "0.5766372", "0.5756708", "0.57367676", "0.5735687", "0.5735687", "0.57312566", "0.5714426", "0.57054895", "0.56905115", "0.5674036", "0.5670417", "0.5668684", "0.56142694", "0.5610055", "0.56050396", "0.5583195", "0.55704325", "0.5568153", "0.5561432", "0.55567145", "0.5555847", "0.55376655", "0.5532742", "0.5528371", "0.5518465", "0.55176735", "0.5506704", "0.55065966" ]
0.702596
3
/ This is a DeleteMethod(Http) used to delete the Admin Details using Admin Id from Database. Method : deleteAdmin Type : Boolean parameters: the adminId is of String type Returns : Boolean Author : Alok Dixit Date : 25/09/2020 Version : 1.0
@Override public boolean deleteAdmin(String adminId) { if (!adminRepository.existsById(adminId)) throw new AdminNotFoundException("Customer with id " + adminId + " Not Found"); adminRepository.deleteById(adminId); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteAdmin(Long idAdmin);", "@DeleteMapping(\"/{id}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public boolean deleteAdmin(@PathVariable int id){\n return adminService.deleteAdmin(id);\n }", "@RequestMapping(path = \"/delAdmin/{id}\")\n public String delAdmin(HttpServletRequest request, @Value(\"删除帐号、员工信息\") String type,@PathVariable(\"id\") String id){\n adminService.delAdmin(id);\n// empService.delEmp(admin.getId()); //这个是根据编号删除,我们要根据帐号删除\n\n empService.delEmpByAdminID(id);\n\n //日志\n addlog(request,type);\n return \"redirect:/adminList/1\";\n }", "@Override\r\n\tpublic int deleteAdmin(int adminid) {\n\t\treturn administratorDao.deleteByPrimaryKey(adminid);\r\n\t}", "int deleteByPrimaryKey(Integer adminId);", "public static int deleteUser(int adminId) {\r\n\t\t//conn = DBConnection.getConnection();\r\n\t\tPreparedStatement statement;\r\n\t\ttry {\r\n\r\n\t\t\tstatement = conn.prepareStatement(deleteQuery);\r\n\t\t\tstatement.setInt(1, adminId);\r\n\t\t\tint rowsUpdated = statement.executeUpdate();\r\n\t\t\tif (rowsUpdated == 1)\r\n\t\t\t\treturn 1;\r\n\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 0;\r\n\t}", "@Override\r\n\tpublic String delete() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(admin.getAdminAccount());\r\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doDelete(paramList)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"ɾ³ý\");\r\n\t\treturn SUCCESS;\r\n\t}", "int deleteByPrimaryKey(Integer adminid);", "int deleteByPrimaryKey(@Param(\"roleId\") String roleId, @Param(\"adminId\") String adminId);", "int deleteByExample(AdminExample example);", "@Override\n\tpublic String deleteAdminById(int id) {\n\t\tar.deleteById(id);\n\t\treturn \"Admin with id: \" + id + \" was deleted.\";\n\t}", "@Override\n\tpublic boolean delete(Administrateur admin) {\n\t\ttry\n\t\t{\n\t\t\topenCurrentSessionWithTransaction();\n\t\t\tgetCurrentSession().delete(admin);\n\t\t\tcloseCurrentSessionWithTransaction();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public abstract void adminDeleteVM(int userId, String uuid);", "@PostMapping(path = \"/delete\", produces = \"application/json\")\n public @ResponseBody\n String deleteUser(@RequestBody TaiKhoan user) {\n // Admin admin = mAdminDao.findByToken(token);\n //if (admin != null) {\n TaiKhoan tk = mTaiKhoanDao.findByTentkAndSdt(user.getTentk(), user.getSdt());\n if (tk != null) {\n mTaiKhoanDao.delete(tk);\n return AC_DELETE_SUCESS;\n } else return AC_DELETE_NO_SUCESS;\n //} else return AC_DELETE_NO_SUCESS;\n }", "@ApiImplicitParams({\n @ApiImplicitParam(name = \"userId\", value = \"用户 ID\", dataType = \"int\",required = true, paramType = \"query\")\n })\n @GetMapping(value={\"/delAdminUser\"})\n public ResponseBean<Void> delAdminUser(\n @RequestParam(value = \"userId\") Integer userId\n ) {\n return userService.delAdminUser(userId);\n }", "@DeleteMapping(\"/\")\n\tpublic ResponseEntity<Object> deleteAdministrator(HttpServletRequest request){\n\t\tAdministrator admin = service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession()));\n\t\tservice.delete(admin);\n\t\treturn new ResponseEntity<>(HttpStatus.OK);\n\t}", "@Test\n\tpublic void testAdminDelete() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"temp\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(06, \"temp\", 00001, 0, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Deleted\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to delete account as admin\", testResult);\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Administrator : {}\", id);\n administratorRepository.delete(id);\n }", "int deleteByExample(AdminUserCriteria example);", "int deleteByExample(AdminUserCriteria example);", "@Override\r\n\tpublic int applyuseradminDelete(int id) {\n\t\treturn applyseradminDao.applyuseradminDelete(id);\r\n\t}", "@Nullable\n public DelegatedAdminCustomer delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "@Override\n protected String requiredDeletePermission() {\n return \"admin\";\n }", "@Override\r\n\t@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\r\n\tvoid delete(Long id);", "int deleteByExample(AdminTabExample example);", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "@Test\n @DisplayName(\"delete returns 403 when user is not admin\")\n void delete_Returns403_WhenUserIsNotAdmin() {\n Anime savedAnime = animeRepository.save(AnimeCreator.createAnimeToBeSaved());\n devDojoRepository.save(USER);\n \n ResponseEntity<Void> animeResponseEntity = testRestTemplateRoleUser.exchange(\n \"/animes/admin/{id}\",\n HttpMethod.DELETE,\n null,\n Void.class,\n savedAnime.getId()\n );\n\n Assertions.assertThat(animeResponseEntity).isNotNull();\n \n Assertions.assertThat(animeResponseEntity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);\n }", "public void removeAdminRight(Admin admin) throws ServiceException{\n }", "@Override\n\t@Action(\"delete\")\n\t@LogInfo(optType=\"删除\")\n\tpublic String delete() throws Exception {\n\t\ttry {\n\t\t\tString str=sampleManager.deleteEntity(deleteIds);\n\t\t\tStruts2Utils.getRequest().setAttribute(LogInfo.MESSAGE_ATTRIBUTE, \"删除数据:单号:\"+str);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\trenderText(\"删除失败:\" + e.getMessage());\n\t\t\tlog.error(\"删除数据信息失败\",e);\n\t\t}\n\t\treturn null;\n\t}", "private ArrayList<String> doDelete(){\n \t\tUserBean user = (UserBean) Util.loadDataFromLocate(this.getContext(), \"user\");\n \t\tString mobile = user.getPhone();\n \t\tString password = user.getPassword();\n \n \t\tjson = \"\";\n //\t\tString apiName = \"ad_delete\";\n \t\tArrayList<String> list = new ArrayList<String>();\n \t\tlist.add(\"mobile=\" + mobile);\n \t\tString password1 = Communication.getMD5(password);\n \t\tpassword1 += Communication.apiSecret;\n \t\tString userToken = Communication.getMD5(password1);\n \t\tlist.add(\"userToken=\" + userToken);\n \t\tlist.add(\"adId=\" + detail.getValueByKey(GoodsDetail.EDATAKEYS.EDATAKEYS_ID));\n \t\tlist.add(\"rt=1\");\n \t\t\n \t\treturn list;\t\t\n \t}", "@DELETE\n\tResponse delete();", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TenantSuperAdmin : {}\", id);\n tenantSuperAdminRepository.deleteById(id);\n }", "public void delete() throws Exception{\n\t\tm_service = new DistrictService();\n\t\tString deleteId = \"3751~`~`~`~@~#\";\n\t\tDecoder objPD = new Decoder(deleteId);\n\t\tString objReturn = m_service.delete(objPD);\n\t\tSystem.out.println(objReturn);\n\t}", "@Override\n\tpublic void deleteByname(String adminname) {\n\t\tSettingMapper.deleteByname(adminname);\n\t}", "@Override\n\tpublic boolean deleteAdminUnitEntityForDraft(Integer slc,Integer adminUnitCode, int entityType) throws Exception {\n\t\treturn organizationDAO.deleteAdminUnitEntityForDraft(slc, adminUnitCode, entityType);\n\t}", "@Override\n\tpublic boolean deleteAdminUnitLevel(Integer slc, Integer adminUnitCode,\n\t\t\tint entityType) throws Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn organizationDAO.deleteAdminUnitLevel(slc, adminUnitCode, entityType);\n\t}", "@Override\r\n\tpublic int deleteByPrimaryKey(Integer id) {\n\t\treturn adminUserMapper.deleteByPrimaryKey(id);\r\n\t}", "@Override\r\n\tpublic void adminSelectDelete() {\n\t\t\r\n\t}", "@Test\n\tpublic void test04_05_DeleteADisabledUserByAdministrator() {\n\t\tinfo(\"Test 4: Delete a disabled user by administrator\");\n\t\tString name=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tcreateNewUser();\n\t\tdisableUser();\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open User Management\n\t\t*Step Description: \n\t\t\t- Log in as admin.\n\t\t\t- Go to Administration \n\t\t\t-\n\t\t\t-> Community \n\t\t\t-\n\t\t\t-> Manage Community.\n\t\t\t- Choose the tab \"User Management\".\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- The list of users is displayed: enabled and disabled\n\t\t\t- The column \"Action\" is displayed with 2 icons: Edit and Delete.*/\n\t\tuserAndGroup.goToEditUserInfo(username);\n\t\tuserAndGroup.editUserInfo_AccountTab(\"\", \"\",name, \"\");\n\t\t\n\t\t/*Step number: 2\n\t\t*Step Name: Step 2: Delete a disabled user\n\t\t*Step Description: \n\t\t\t- From a Disabled user, click on the icon \"Delete\".\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- The disabled user is removed from the list*/ \n\t\tuserAndGroup.deleteUser(username);\n\t}", "@PreAuthorize(\"hasAnyRole('ADMIN')\") // PERMISSÃO APENAS DO ADMIN\n\t@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> delete(@PathVariable Integer id) {\n\t\tservice.delete(id);\n\t\treturn ResponseEntity.noContent().build(); // RESPOSTA 204\n\t}", "@PostMapping(\"/adminDeleteUsers\")\n public String adminDeleteUsers(@RequestParam(required = false, value=\"deleteList\") Integer[] deleteList, Model model){\n String nextPage = \"adminUserList\";\n\n if (deleteList != null && deleteList.length > 0){\n for (Integer userId : deleteList) {\n User user = userRepo.findById(userId).get();\n if (user != null){\n List<Watching> watchings = watchingRepo.findByUser(user);\n if (watchings != null){\n for (Watching watch : watchings) {\n watchingRepo.delete(watch);\n }\n }\n List<Show> shows = showRepo.findByUser(user);\n if (shows != null){\n for (Show show : shows) {\n watchings = watchingRepo.findByShow(show);\n if (watchings != null){\n for (Watching watch : watchings) {\n watchingRepo.delete(watch);\n }\n }\n showRepo.delete(show);\n }\n }\n userRepo.delete(user);\n }\n }\n }\n model.addAttribute(\"userList\", userRepo.findAll());\n return nextPage;\n }", "@DeleteMapping(\"/{userId}\")\n @PreAuthorize(\"hasAnyAuthority('ADMIN','MANAGER')\")\n public void delete(@PathVariable(value=\"userId\") int userId){\n userService.delete(userData,userId);\n }", "@Test\n\t@WithMockCustomUser(username = \"admin\")\n\tpublic void deleteRecipeAsAdmin() throws Exception {\n\t\tRecipe recipe = recipeBuilder(1L);\n\n\t\twhen(recipeService.findById(1L)).thenReturn(recipe);\n\t\twhen(userService.findAll()).thenReturn(new ArrayList<>());\n\t\tdoAnswer(invocation -> null).when(recipeService).deleteById(1L);\n\n\t\tmockMvc.perform(post(\"/recipes/1/delete\"))\n\t\t\t\t.andExpect(authenticated())\n\t\t\t\t.andExpect(flash().attributeExists(\"flash\"))\n\t\t\t\t.andExpect(status().is3xxRedirection())\n\t\t\t\t.andExpect(redirectedUrl(\"/recipes\"));\n\n\t\tverify(recipeService).findById(any(Long.class));\n\t\tverify(userService).findAll();\n\t\tverify(recipeService).deleteById(any(Long.class));\n\t}", "@Override\r\n\tpublic ResponseEntity<String> deleteEmployee(int employeeId,String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\t\r\n\t\tResponseEntity<String> responseEntity=new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\r\n\t\t\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\t\tUser userAdmin=session.get(User.class, authtable.getUser().getEmpId());\r\n\t\t\tif(userAdmin.getUsertype().equals(\"Admin\")){\r\n\t\t\t\tUser user = session.get(User.class, employeeId);\r\n\t\t\t\tif(user!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* delete from user_skill */\r\n\t\t\t\t\tString sql = \"delete FROM user_skill WHERE user_employeeId = :employee_id\";\r\n\t\t\t\t\tSQLQuery query = session.createSQLQuery(sql);\r\n\t\t\t\t\tquery.setParameter(\"employee_id\", user.getEmpId() );\r\n\t\t\t\t\tquery.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* delete from authtable */\r\n\t\t\t\t\tString hql = \"delete FROM authtable where employeeId= :empId\" ;\r\n\t\t\t\t\tQuery query2 = session.createQuery(hql);\r\n\t\t\t\t\tquery2.setInteger(\"empId\", user.getEmpId());\r\n\t\t\t\t\tquery2.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* delete from operations table */\r\n\t\t\t\t\thql = \"delete FROM operations where employeeId= :empId\" ;\r\n\t\t\t\t\tquery2 = session.createQuery(hql);\r\n\t\t\t\t\tquery2.setInteger(\"empId\", user.getEmpId());\r\n\t\t\t\t\tquery2.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t/* delete from user */\r\n\t\t\t\t\tsession.delete(user);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* delete from usercredential */\r\n\t\t\t\t\tsession.delete(user.getUserCredential());\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* entry in operation table */\r\n\t\t\t\t\tOperationImpl operationImpl= new OperationImpl();\r\n\t\t\t\t\toperationImpl.addOperation(session, userAdmin, \"Deleted Employee \"+user.getName());\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.OK);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.UNAUTHORIZED);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tresponseEntity=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn responseEntity;\r\n\t\t}\r\n\t}", "public String deleteEmployee(EmployeeDetails employeeDetails);", "@Test\n\tpublic void deleteByAdministratorTest() throws ParseException {\n\t\t\n\t\tSystem.out.println(\"-----Delete announcement by administrator test. Positive 0 to 1, Negative 2 to 4.\");\n\t\t\n\t\tObject testingData[][]= {\n\t\t\t\t//Positive cases\n\t\t\t\t{\"announcement1-1\", \"admin\", null},\n\t\t\t\t{\"announcement1-2\", \"admin\", null},\n\t\t\t\t\n\t\t\t\t//Negative cases\n\t\t\t\t//Without announcement\n\t\t\t\t{null, \"admin\", NullPointerException.class},\n\t\t\t\t//Without user\n\t\t\t\t{\"announcement2-1\", null, IllegalArgumentException.class},\n\t\t\t\t//With not admin\n\t\t\t\t{\"announcement2-1\", \"user1\", IllegalArgumentException.class}\n\t\t\t\t};\n\t\t\n\t\t\n\t\tfor (int i = 0; i< testingData.length; i++) {\n\t\t\ttemplateDeleteByAdministratorTest(\n\t\t\t\t\ti,\n\t\t\t\t\t(Integer) this.getEntityIdNullable((String) testingData[i][0]),\n\t\t\t\t\t(String) testingData[i][1],\n\t\t\t\t\t(Class<?>) testingData[i][2]\n\t\t\t\t\t);\n\t\t}\n\t}", "int deleteByExample(JindouyunRoleExample example);", "public static void deleteUserByUsernameForAdmin(String username){\n\n adminServices.deleteUserByUsername(username);\n\n // boolean deleted = adminServices.deleteUserByUsername(username);\n//\n// if (deleted){\n//\n// System.out.println(\"Der Employee mit der Username:\"+ username +\"wurde gelöscht.\");\n// }else {\n//\n// System.out.println(\"Der Employee mit der Username:\"+ username +\"wurde nicht gelöscht.\");\n// }\n }", "@RolesAllowed(\"admin\")\n @DELETE\n public Response delete() {\n synchronized (Database.users) {\n User user = Database.users.remove(username);\n if (user == null) {\n return Response.status(404).\n type(\"text/plain\").\n entity(\"User '\" + username + \"' not found\\r\\n\").\n build();\n } else {\n Database.usersUpdated = new Date();\n synchronized (Database.contacts) {\n Database.contacts.remove(username);\n }\n }\n }\n return Response.ok().build();\n }", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "public void delete(ClientePk pk) throws ClienteDaoException;", "public void delete(long setId) throws ServerException;", "public interface AdminService {\n\n public Admin selectByPrimaryKey(int id);\n\n public int delete(int id);\n}", "@PreAuthorize(\"hasAuthority('ADMIN')\")\n // curl -i --request DELETE -u tim:Dial0gicRots! http:/localhost:8080/dist/delete/425\n // @PreAuthorize(\"hasAuthority('ROLE_ADMIN')\")\n @DeleteMapping(\"delete/{id}\")\n public ResponseEntity<Void> deleteDistance(@PathVariable(\"id\") Integer id) {\n log.info(\"deleteDistance\");\n distanceService.deleteDistance(id);\n return new ResponseEntity<Void>(HttpStatus.NO_CONTENT);\n }", "Boolean delete(HttpServletRequest request, Long id);", "public int deleteByExample(TbAdminMenuExample example) {\n int rows = getSqlMapClientTemplate().delete(\"tb_admin_menu.ibatorgenerated_deleteByExample\", example);\n return rows;\n }", "@Delete({\n \"delete from A_USER_ROLE\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "void deleteUser(String deleteUserId);", "public ResponseTranslator delete() {\n setMethod(\"DELETE\");\n return doRequest();\n }", "int logicalDeleteByExample(@Param(\"example\") DashboardGoodsExample example);", "@DeleteMapping(\"/DeleteEmployee/{empId}\")\r\n public String deleteEmployee(@PathVariable String empId) {\r\n return admin.deleteEmployeeService(empId);\r\n }", "int deleteByExample(T00RolePostExample example);", "int deleteByExample(EpermissionDOExample example);", "int deleteByExample(GroupRightDAOExample example);", "public static int delete(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from t_user where id=?\"); \n ps.setInt(1,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "@Override\n\tpublic boolean DeleteAbilityBbsByAdmin(AbilityBbs ability) {\n\t\treturn abilityDao.DeleteAbilityBbsByAdmin(ability);\n\t}", "@Override\r\n public void logoutAdmin() throws Exception {\n \r\n }", "@Override\r\n public void logoutAdmin() throws Exception {\n \r\n }", "public boolean delete(String username, int menuId);", "public String destroy() {\n performDestroy();\n //recreatePagination();\n //recreateModel();\n return \"ListAdmin\";\n }", "@DeleteMapping(\"/delete/{id1}\")\n public ResponseEntity<Apiresponse> delete( @PathVariable int id1 ){\n\n try{\n service.delete(id1);\n logger.info(\"Controller delete method Response received deleted successfully \");\n\n return new ResponseEntity<Apiresponse>( new Apiresponse(\"200\" ,\"success\" ,\"Succesfully deleted\" ) , HttpStatus.OK ) ;\n }\n catch (Exception e){\n\n logger.info( \" Controller delete method Exception thrown from service \" +e.getMessage());\n\n return new ResponseEntity<Apiresponse>( exception(e.getLocalizedMessage() ) , HttpStatus.BAD_REQUEST) ;\n }\n\n }", "boolean deleteSchoolMasterDetail(SchoolMasterVo vo);", "public int deleteAdministratorAccessGroup(Integer administratorAccessGroupId, Integer noOfChanges,\n\t\t\tInteger auditorId) {\n\t\tStringBuffer sql = new StringBuffer(deleteAdministratorAccessGroupSQL.toString());\n\t\t// Replace the parameters with supplied values.\n\t\tUtilities.replace(sql, auditorId);\n\t\tUtilities.replaceAndQuote(sql, new Timestamp(new java.util.Date()\n\t\t\t\t.getTime()).toString());\n\t\tUtilities.replace(sql, administratorAccessGroupId);\n\t\tUtilities.replace(sql, noOfChanges);\n\t\treturn UpdateHandler.getInstance().update(getJdbcTemplate(),\n\t\t\t\tsql.toString());\n\t}", "public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}", "public void delete(User user)throws Exception;", "public int deleteById(long formId) throws DataAccessException;", "@GetMapping(value = \"/deleteUser\", params = \"userId\")\n public String deleteUser(HttpServletRequest request, @RequestParam(\"userId\") int theId){\n if(request.isUserInRole(\"ROLE_ADMIN\")){ //is the logged user admin\n User user = accountService.getUser(theId);\n if(user.getGrantedAuthorities().contains(new SimpleGrantedAuthority(\"ROLE_ADMIN\"))){ //is he trying to delete admin\n return \"redirect:users\"; //yes, admin trying to delete admin, redirect him\n }\n accountService.deleteUser(theId); //the admin is not deleting himself, allow him to delete anyone else he wants\n return \"redirect:users\";\n }\n CustomUserDetails userDetails = (CustomUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n if(userDetails.getId() == theId){// is the logged user authorized to delete the account he wants to\n accountService.deleteUser(theId); //yes, he can delete himself, allow him\n new SecurityContextLogoutHandler().logout(request, null, null);\n return \"redirect:users\"; //no, he is not, return him to main page\n }else return \"redirect:users\";\n }", "private Delete() {}", "private Delete() {}", "public void delete()\n {\n call(\"Delete\");\n }", "void deleteAveria(Long idAveria) throws BusinessException;", "public HttpStatus deleteById(Long postId);", "int deleteByExample(UUserRoleExample example);", "@DeleteMapping(\"\")\n @PreAuthorize(\"hasRole('admin')\")\n @ApiOperation(value = \"Delete items from product by name (Admin only)\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Entity deleted.\"),\n @ApiResponse(code = 401, message = \"The user does not have valid authentication credentials for the target resource.\"),\n @ApiResponse(code = 403, message = \"User does not have permission (Authorized but not enough privileges)\"),\n @ApiResponse(code = 404, message = \"The requested resource could not be found.\"),\n @ApiResponse(code = 500, message = \"Server Internal Error at executing request.\")\n })\n @ApiImplicitParam(name = \"body\", dataTypeClass = ProductEntityDeleteRequestBody.class)\n public ResponseEntity<String> deleteEntityFromProduct(@RequestBody LinkedHashMap body) {\n SecurityContextHolder.getContext().setAuthentication(null);\n try{\n // Query database using Data Access Object classes.\n //DbResult dbResult = new Delete().deleteProductByName(name.toUpperCase());\n DbResult dbResult = new Delete().deleteEntityFromProduct(body);\n if (dbResult.isEmpty()) return new ResponseEntity(\"Item not found.\", HttpStatus.NOT_FOUND);\n // Dao Delete class will return result field as true and a null exception field or a non-empty exception\n // field containing an exception and a null result field.\n // To avoid checking a null result field as a boolean which needs two checks, we check once the exception field.\n if(dbResult.getException() != null) {\n return new ResponseEntity(dbResult.getException().getMessage(), HttpStatus.OK);\n }\n if(dbResult.getResult(Boolean.class)){\n return new ResponseEntity(\"Item deleted.\", HttpStatus.OK);\n }\n else{\n // Return something unexpected.\n Exception exception = new Exception(dbResult.getResult().toString());\n throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, exception.getMessage(), exception);\n }\n }\n catch (Exception exc) {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, exc.getMessage(), exc);\n }\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "@Test\n public void deleteId() throws Exception {\n Role role = create(new Role(\"roleName\"));\n\n //Attempt to remove from the database with delete request\n try {\n mvc.perform(MockMvcRequestBuilders.delete(\"/auth/roles/{id}\", UUIDUtil.UUIDToNumberString(role.getUuid()))\n .header(\"Authorization\", authPair[0])\n .header(\"Function\", authPair[1])\n )\n .andExpect(status().isOk());\n } catch (Exception e) {\n remove(role.getUuid());\n throw e;\n }\n\n //Check if successfully removed from database\n try {\n //Remove from database (above get function should have thrown an error if the object was no longer in the database)\n remove(role.getUuid());\n fail(\"DELETE request did not succesfully delete the object from the database\");\n } catch (ObjectNotFoundException e) {\n //Nothing because the object is no longer present in the database which is expected\n }\n }", "int deleteByExample(SysRoleDOExample example);", "public Long delete(Long hoppyId) throws DataAccessException;", "public void delete(Privilege pri) throws Exception {\n\t\tCommandUpdatePrivilege com=new CommandUpdatePrivilege(AuthModel.getInstance().getUser(),pri);\r\n\t\tClient.getInstance().write(com);\r\n\t\tObject obj=Client.getInstance().read();\r\n\t\tif(obj instanceof Command){\r\n\t\t\tdirty=true;\r\n\t\t\tlist=this.get(cond);\r\n\t\t\tthis.fireModelChange(list);\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tthrow new Exception(\"Delete Customer failed...\"+list);\r\n\t}", "int deleteByExample(UsercontrollerRoleExample example);", "void deleteTrackerAdminRequests(final Integer id);", "public String deleteAdminDetails(String identifier) {\n\t\treturn null;\r\n\t}", "@DELETE\n @Secured({Role.ROLE_ADMIN})\n @Produces(MediaType.APPLICATION_JSON)\n public Response deleteDeveloper(\n @DefaultValue(\"\") @QueryParam(\"devid\") UUID devId) {\n ApiResult result = this.adminLogic.deleteDev(devId);\n return result.getResponse(this.serializer).build();\n }", "@Override\n\tprotected UnlockDoc httpDelete(String type, String id, UnlockDoc doc) {\n\t\treturn null;\n\t}", "@Override\n public Boolean delete(Long clientId) {\n memberRoleMapper.deleteMemberRoleByMemberIdAndMemberType(clientId, \"client\");\n\n int isDelete = clientMapper.deleteByPrimaryKey(clientId);\n if (isDelete != 1) {\n throw new CommonException(\"error.client.delete\");\n }\n return true;\n }", "@Override\r\n\tpublic boolean delete(String email, String pw) {\n\t\treturn jdbcTemplate.update(\"delete s_member where email=?,pw=?\", email,pw)>0;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String sqlManagedInstanceName, Context context);", "public static int doDelete(String id) {\n int status = 0;\n try {\n // pass the id on the URL line\n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\" + \"//\"+id);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"DELETE\");\n status = conn.getResponseCode();\n String output = \"\";\n String response = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream())));\n while ((output = br.readLine()) != null) {\n response += output; \n }\n conn.disconnect(); \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return status;\n }", "int logicalDeleteByExample(@Param(\"example\") ZhuangbeiInfoExample example);", "boolean delete(Long id, Class<T> type);" ]
[ "0.8029755", "0.76879984", "0.73206186", "0.72921795", "0.7261442", "0.72170615", "0.7204106", "0.70806086", "0.69864714", "0.690735", "0.6740851", "0.6699166", "0.65258515", "0.64875686", "0.6480856", "0.6472155", "0.63627946", "0.63523054", "0.6327988", "0.6327988", "0.62419105", "0.62329245", "0.619105", "0.6168227", "0.615977", "0.6098657", "0.6083983", "0.6066613", "0.602667", "0.60071075", "0.5989386", "0.5983484", "0.59731585", "0.59643793", "0.5937", "0.5920071", "0.5917022", "0.59128255", "0.59029853", "0.5860173", "0.58585536", "0.5857766", "0.5856885", "0.5793637", "0.5791852", "0.57850176", "0.5774516", "0.5756325", "0.57516414", "0.5745587", "0.573415", "0.5708618", "0.5690281", "0.5681891", "0.56750137", "0.56587917", "0.56576365", "0.565624", "0.56498694", "0.56487095", "0.5644568", "0.5626805", "0.5623112", "0.56166816", "0.5614273", "0.5610346", "0.5608676", "0.5608676", "0.5603284", "0.55982393", "0.55917543", "0.55906284", "0.5589785", "0.5586431", "0.55851954", "0.55841744", "0.55837834", "0.5581919", "0.5581919", "0.5581688", "0.55799603", "0.55695754", "0.55675894", "0.55656517", "0.55635756", "0.55570424", "0.5553693", "0.55522925", "0.5550348", "0.5548219", "0.5548118", "0.55452704", "0.5535096", "0.5530331", "0.5529328", "0.5528209", "0.55249804", "0.5523978", "0.5523117", "0.551829" ]
0.72379565
5
/ This method is used to add new test
@Override public TestEntity addTest(TestEntity test) { test = testDao.save(test); return test; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void addItem() {\n\n }", "@Test\n void addItem() {\n }", "@Override\n\tpublic MedicalTest addTest(MedicalTest test) {\n\tString testId=generateTestId();\n\ttest.setTestId(testId);\n\tMedicalTestUtil.checkPresenceOfTest(test);\n\t\n\t\treturn testDao.save(test);\n\n\t}", "@Override\n\tpublic Test addTest(Test onlineTest) throws UserException {\n\t\treturn null;\n\t}", "public Test addTest(Test testEntity) {\n\t\tTest testEntity2=testRepository.save(testEntity);\n\t\treturn testEntity2;\n\t}", "private Test addTest(PrismRule rule, Test lastTest, Test newTest) {\n\n if (rule.m_test == null) {\n rule.m_test = newTest;\n } else {\n lastTest.m_next = newTest;\n }\n return newTest;\n }", "@Test\n public void testAdd(){\n }", "@Test\n public void addTest(){\n \n Assert.assertTrue(p1.getName().equals(\"banana\"));\n Assert.assertTrue(c1.getEmail().equals(\"[email protected]\"));\n \n }", "public void addTest(String name, ITimed test) {\n\t\ttests.add(new Test(name, test));\n\t}", "@Test\n void addTask() {\n }", "@Test\n\t public void testAdd() {\n\t\t TestSuite suite = new TestSuite(RecommendationModelTest.class, AnalysisModelTest.class);\n\t\t TestResult result = new TestResult();\n\t\t suite.run(result);\n\t\t System.out.println(\"Number of test cases = \" + result.runCount());\n\n\t }", "@Test\n public void testAdd() {\n }", "@Test\n public void testAdd() {\n }", "@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }", "@Test\n public void addition() {\n\n }", "public void addTest(TestEntity testEntity) {\n testEntities.add(testEntity);\n testEntity.setTestSuiteEntity(this);\n }", "@Test\n public void addTimeTest() {\n // TODO: test addTime\n }", "public void testAdd() {\n\t\tString input = \"add \\\"a new task\\\" 10/10/2015 flag\";\n\t\tString actual = operation.processOperation(input);\n\t\tString expected =\"a new task has been added sucessfully\";\n\t\tassertEquals(expected,actual);\n\t}", "@Test\r\n\tpublic void testAdd() {\n\t\tint num1=10;int num2=20;\r\n\t\t\r\n\t\t//Test here:\r\n\t\t//assertEquals(30, ClientMain.add(num1,num2));\r\n\t\t\r\n\t\t\r\n\t}", "public void testAddEntry(){\n }", "@Test\r\n public void testAddition() {\n }", "@FXML\n\tvoid addNewTest(MouseEvent event) {\n\t\ttry {\n\t\t\taddNewTest = FXMLLoader.load(getClass().getResource(Navigator.ADDING_NEW_TEST.getVal()));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tGeneralUIMethods.loadPage(contentPaneAnchor, addNewTest);\n\t}", "@Test\n\tpublic void saveTest(){\n\t\t\n\t}", "void add(String prompt, UIFormTest test);", "@Test\n public void testAddACopy() {\n }", "@Test\n public void insertUserTest(){\n }", "@Test\n public void testHistory(){\n\n userService.insertHistory(\"kaaksd\",\"------sdas\");\n }", "@Test\n public void addContacts() {\n }", "@Test\n\tpublic void testInsertObj() {\n\t}", "public AddTester(String canvasID) {\n super(\"ADD\", canvasID);\n }", "public void testAdd() {\n System.out.println(\"add\");\n String key = \"\";\n Object value = null;\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.add(key, value);\n assertEquals(expResult, result);\n }", "@Test\r\n void addUser() throws Exception, IOException {\r\n }", "public void testAdd() {\r\n assertEquals(0, list.size());\r\n list.add(\"A\");\r\n assertEquals(1, list.size());\r\n list.add(\"B\");\r\n assertEquals(2, list.size());\r\n assertEquals(\"B\", list.get(1));\r\n\r\n }", "@Test\n\tvoid testOnAddToOrder() {\n\t}", "@Test\n public void autocreateLesson() throws Exception{\n\n }", "@Test\r\n\tpublic void testAddNote() throws Exception {\r\n\t\tyakshaAssert(currentTest(), \"true\", exceptionTestFile);\r\n\t}", "@Test\n public void addRole(){\n }", "@TestProperties(name = \"5.2.4.22 press add test, when no test is selected\")\n\tpublic void testAddTestWithNoTestSelected() throws Exception{\n\t\tjsystem.launch();\n\t\tString scenarioName = jsystem.getCurrentScenario();\n\t\tScenarioUtils.createAndCleanScenario(jsystem, scenarioName);\n\t\tjsystem.addTest(\"testShouldPass\", \"GenericBasic\", true);\n\t\tjsystem.moveCheckedToScenarioTree();\n\t\tjsystem.play();\n\t\tjsystem.waitForRunEnd();\n\t\tjsystem.checkNumberOfTestsPass(1);\n\t\tjsystem.checkNumberOfTestExecuted(1);\n\t}", "@Test\n public void addItem() {\n //TODO 1,2\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).check(matches(isDisplayed()));\n\n //TODO 3,4,5,6\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).perform(typeText(\"user\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newPasswordEditText)).perform(typeText(\"pass\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).check(matches(isDisplayed()));\n\n //TODO 7,8\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).check(matches(isDisplayed()));\n\n // TODO 9,10\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).perform(typeText(\"ziemniaki\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabSave)).perform(click());\n\n // TODO 11\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.text)).check(matches(withText(\"ziemniaki\")));\n }", "@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }", "@PostMapping(value = \"/add\", produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<ServiceResult> insertTest(@RequestBody Test test) {\n return new ResponseEntity<ServiceResult>(testService.insertTest(test), HttpStatus.OK);\n }", "@Test\n public void addTest() {\n BinaryTree testTree = new BinaryTree();\n ComparableWords word=new ComparableWords(\"prueba\",\"test\",\"test\");\n assertNull(testTree.root);\n testTree.add(word);\n assertNotNull(testTree.root);\n }", "@Test\n public void add() {\n\n collection.add(\"test\");\n assertEquals(collection.getLast(),\"test\");\n }", "@Test\n public void testSelectByNew() throws Exception{\n }", "@Test\n\tpublic void testAdd() {\n\t\t\n\t\ttestStructure.add(\"Dog\", 5);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"zebra\", 3);\n\t\ttestStructure.add(\"horse\", 5);\n\n\t\t\n\t\tSystem.out.println(testStructure.showAll());\n\t\tassertEquals(\"[dog: 1, 5\\n, horse: 5\\n, zebra: 3\\n]\", testStructure.showAll().toString());\n\t\t\n\t}", "public void testAddExistingInfo() {\r\n TAG = \"testAddExistingInfo\";\r\n setUpOpTest();\r\n solo.clickOnActionBarItem(R.id.create_operation);\r\n solo.waitForActivity(OperationEditor.class);\r\n solo.enterText(3, OP_TP);\r\n for (int i = 0; i < OP_AMOUNT.length(); ++i) {\r\n solo.enterText(4, String.valueOf(OP_AMOUNT.charAt(i)));\r\n }\r\n solo.clickOnImageButton(tools.findIndexOfImageButton(R.id.edit_op_third_parties_list));\r\n solo.clickOnButton(solo.getString(R.string.create));\r\n solo.enterText(0, \"Atest\");\r\n solo.clickOnButton(solo.getString(R.string.ok));\r\n solo.waitForView(ListView.class);\r\n assertEquals(1, solo.getCurrentViews(ListView.class).get(0).getCount());\r\n solo.clickOnButton(solo.getString(R.string.create));\r\n solo.enterText(0, \"ATest\");\r\n solo.clickOnButton(solo.getString(R.string.ok));\r\n assertNotNull(solo\r\n .getText(solo.getString(fr.geobert.radis.R.string.item_exists)));\r\n }", "@Test\n public void testAddTablet() {\n System.out.println(\"addTablet\");\n Tablet tb = new Tablet(\"T005\", \"tablet005\", 0,0);\n DBTablet instance = new DBTablet();\n boolean expResult = true;\n boolean result = instance.addTablet(tb);\n assertEquals(expResult, result);\n }", "public void incrementerTest() {\n\t\tthis.nbTests++;\n\t}", "@Test\r\n \t public void testAddnewCourse() {\r\n \t \tLoginpg loginPage = new Loginpg();\r\n \t \tloginPage.setUsernameValue(\"admin\");\r\n \t \tloginPage.setpassWordValue(\"myvirtualx\");\r\n \t \tloginPage.clickSignin();\r\n \t \t\r\n \t \tCoursepg coursePage= new Coursepg();\r\n \t \tcoursePage.clickCourse().clickNewCourse().typeNewCourseName(\"selenium\").clickSubmit();\r\n \t\r\n \t }", "protected void addTestToList(Object... itemsToAdd) {\n \t\n \tTestClassListModel currentListModel = (TestClassListModel) DragAndDropDestination.getModel();\n \t\n \tboolean testWasAdded = false;\n \t\n \tfor (Object itemToAdd : itemsToAdd) {\n \t\t\n\t \tif (itemToAdd instanceof String) {\n\t \t\t\n\t \t\tString currentItem = (String) itemToAdd;\n\t \t\t\n\t \t\tif (testInstantiator.isDynamic(currentItem)) {\n\t \t\t\t\n\t \t\t\tSystem.out.print(currentItem);\n\t \t\t\t\n\t \t\t\tcurrentListModel.addTest(\n\t \t\t\t\ttestInstantiator.instanceByName(\n\t \t\t\t\t\tcurrentItem, GroupOfTests.class\n\t \t\t\t\t)\n\t \t\t\t);\n\t \t\t\ttestWasAdded = true;\n\t \t\t} else {\n\t\t \t\tClass<?> itemToAddClass = testInstantiator.forName((String) itemToAdd);\n\t\t \t\tcurrentListModel.addTest(itemToAddClass);\n\t\t \t\ttestWasAdded = true;\n\t \t\t}\n\t \t}\n\t\n\t \tif (\n\t \t\t\t// Make sure it is a Class object, before casting it in one of \n\t \t\t\t// the next two tests\n\t \t\t\t//\n\t \t\t\t(itemToAdd instanceof Class) \n\t \t\t\t&& (\n\t \t\t\t\t// Test, if itemToAdd is a class which is a testcase or a\n\t \t\t\t\t// GroupOfTests.\n\t \t\t\t\t//\n\t \t\t\t\t(EnsTestCase.class.isAssignableFrom((Class) itemToAdd))\n\t \t\t\t || \n\t \t\t\t (GroupOfTests.class.isAssignableFrom((Class) itemToAdd))\n\t \t\t\t)\n\t \t) {\n\t \t\tcurrentListModel.addTest((Class) itemToAdd);\n\t \t\ttestWasAdded = true;\n\t \t\t//DragAndDropDestination.revalidate();\n\t \t}\n \t}\n\n \tif (testWasAdded) {\n\n \t\t// If something was added, repaint the list.\n\n\t // The next two lines should not be done like this. It should be \n\t // possible to just run this to make the changes in the JList take \n\t // effect. Unfortunately this does not happen.\n\t // \n\t //DragAndDropDestination.repaint();\n\t\n\t TestClassListModel newListModel = new TestClassListModel(currentListModel.getGroupOfTests()); \n\t DragAndDropDestination.setModel(newListModel);\n\t \n \t} else {\n \t\t\n \t\t// If nothing was added, an exception is thrown.\n \t\t//\n \t\tthrow new RuntimeException(\"Couldn't add any of the objects \"+ itemsToAdd.toString() +\" to the list of tests to be run!\");\n \t\t\n \t}\n }", "private int createNewTest(String testName) {\r\n\t\tint newTestId = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tPreparedStatement pStat = dbConnection.prepareStatement(\"insert into tests (name) VALUES (?)\", Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tpStat.setString(1, testName);\r\n\t\t\tpStat.execute();\r\n\r\n\t\t\tResultSet rs = pStat.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tnewTestId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tpStat.close();\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn newTestId;\r\n\t}", "@Test\n public void addToIncreaseCount() {\n testList.add(42);\n assertEquals(1, testList.count());\n }", "@Test\n\tvoid testAdd() {\n\t\tint result = calculator.add(1,3);//act\n\t\tassertEquals(4,result);//assert//customized the failed message \"Test failed\"\n\t}", "@Test\n public void addSellerTest(){\n }", "@Test\n\tpublic void testSave() {\n\t}", "@Test\n public void testAddToWaitList() throws Exception {\n }", "@Test\r\n\tpublic void addNew() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\t\r\n\t\tString content = \"{\\r\\n\" + \r\n\t\t\t\t\" \\\"id\\\": 3,\\r\\n\" + \r\n\t\t\t\t\" \\\"name\\\": \\\"TF1\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"team\\\": \\\"DECEPTICON\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"strength\\\": 8,\\r\\n\" + \r\n\t\t\t\t\" \\\"intelligence\\\": 9,\\r\\n\" + \r\n\t\t\t\t\" \\\"speed\\\": 2,\\r\\n\" + \r\n\t\t\t\t\" \\\"endurance\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"rank\\\": 7,\\r\\n\" + \r\n\t\t\t\t\" \\\"courage\\\": 5,\\r\\n\" + \r\n\t\t\t\t\" \\\"firepower\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"skill\\\": 10\\r\\n\" + \r\n\t\t\t\t\"}\";\r\n\t\t\r\n\t\tmockMvc.perform(post(\"/transformers/\").contentType(MediaType.APPLICATION_JSON).content(content.getBytes(\"UTF-8\")))\r\n\t\t\t\t.andExpect(status().isCreated())\r\n\t\t\t\t.andExpect(content().contentTypeCompatibleWith(\"application/json\"))\r\n\t\t\t\t;\r\n\t\tassertEquals( 1, tr.count());\r\n\t\t\r\n\t}", "public void testAddTrials() {\n exp = new Experiment(\"10\");\n TrialCount trial1 = new TrialCount(\"109\", new GeoLocation(0.0, 0.0), new Profile());\n TrialCount trial2 = new TrialCount(\"110\", new GeoLocation(1.0, 1.0), new Profile());\n ArrayList<Trial> trials = new ArrayList<>();\n trials.add(trial1);\n trials.add(trial2);\n exp.addTrials(trials);\n\n assertEquals(\"addTrials does not work\", \"109\", exp.getTrial(\"109\").getId());\n assertEquals(\"AddTrials does not work\", \"110\", exp.getTrial(\"110\").getId());\n }", "@Test\r\n public void testAdd() {\r\n System.out.println(\"add\");\r\n int one = 6;\r\n int two = 5;\r\n JUnitAssert instance = new JUnitAssert();\r\n int expResult = 11;\r\n int result = instance.add(one, two);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testAddCar() {\n\n }", "@Test\n public void testAddUser_User01() {\n System.out.println(\"addUser\");\n User user = new User(\"test\", \"[email protected]\");\n boolean result = sn10.addUser(user);\n assertTrue(result);\n }", "@Test\n\tpublic void addPointsByListTest(){\n\t}", "@Test\r\n public void testRegisterNewUser() {\r\n System.out.println(\"registerNewUser\");\r\n String newName = \"Admin4\";\r\n String newPassword1 = \"4441\";\r\n String newPassword2 = \"4441\";\r\n String rights = \"A\";\r\n Users instance = new Users();\r\n instance.registerNewUser(newName, newPassword1, newPassword2, rights);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testAddProduct() {\n }", "@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }", "@Test\r\n\tpublic void addEmployeeTestCase1() {\n\t\tEmployee employee1 = new Employee();\r\n\t\temployee1.name = \"JosephKuruvila\";\r\n\t\temployee1.role = \"Software Developer\";\r\n\t\temployee1.employeeID = \"Jose2455\";\r\n\t\temployee1.email = \"[email protected]\";\r\n\t\temployee1.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee1.gender = \"Male\";\r\n\t\temployee1.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee1.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee1);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}", "private void addtest(String receive, String status) throws Exception {\n\t\tSystem.out.println(\"Enter the test name:\");\n\t\tString testName = sc.nextLine();\n\t\tSystem.out.println(receive + \" receive\");\n\n\t\tif (status.equals(\"e\")) {\n\n\t\t\ttry {\n\t\t\t\taddPatientTestConn.testDetailsByEmail(receive, testName);//DatabaseConn\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tSystem.out.println(\"Want to add more tests [YES/NO]\");\n\t\t\tString yesNO = sc.nextLine();\n\t\t\tif (yesNO.equals(\"YES\")) {\n\t\t\t\taddtest(receive, \"e\");\n\t\t\t}\n\t\t\tif (yesNO.equals(\"NO\")) {\n\t\t\t\tSystem.out.println(\"Test details are successfully saved\");\n\t\t\t\ttestDetails();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\n\t\telse if (status.equals(\"p\")) {\n\n\t\t\ttry {\n\t\t\t\taddPatientTestConn.testDetailsByPhone(receive, testName);\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\t;\n\n\t\t\tSystem.out.println(\"Want to add more tests [YES/NO]\");\n\t\t\tString yesNO = sc.nextLine();\n\t\t\tif (yesNO.equals(\"YES\")) {\n\t\t\t\taddtest(receive, \"p\");\n\t\t\t}\n\t\t\tif (yesNO.equals(\"NO\")) {\n\t\t\t\tSystem.out.println(\"Test details are successfully saved\");\n\t\t\t\ttestDetails();\n\t\t\t\t// System.exit(0);\n\t\t\t}\n\n\t\t}\n\t}", "public void testADDWithData() throws Exception {\n String data =\"Some words about Helen of Troy\";\n doAdd(data, null);\n }", "@Test\r\n\tpublic void testAdd() {\r\n\t\tlist.add(new Munitions(23, 24, \"cuprum\"));\r\n\t\tAssert.assertEquals(16, list.size());\r\n\t\tAssert.assertTrue(list.get(15).equals(new Munitions(23, 24, \"cuprum\")));\r\n\t}", "public void testAddTrial() {\n exp = new Experiment(\"10\");\n TrialCount trial = new TrialCount(\"109\", new GeoLocation(0.0, 0.0), new Profile());\n exp.addTrial(trial);\n assertEquals(\"addTrial does not work\", \"109\", exp.getTrial(\"109\").getId());\n assertEquals(\"addTrial does not work\", null, exp.getTrial(\"109\").getProfile().getId());\n }", "@Test\n public void testInsert() throws Exception {\n\n }", "@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }", "@Test\n\tpublic void testAddRecipe(){\n\t\t\n\t\ttestingredient1.setName(\"Peanut Butter\");\n\t\ttestingredient2.setName(\"Jelly\");\n\t\ttestingredient3.setName(\"Bread\");\n\t\t\n\t\t\n\t\tingredients.add(testingredient1);\n\t\tingredients.add(testingredient2);\n\t\tingredients.add(testingredient3);\n\t\t\n\t\ttestRecipe.setName(\"PB and J\");\n\t\ttestRecipe.setDescription(\"A nice, tasty sandwich\");\n\t\ttestRecipe.setIngredients(ingredients);\n\t\t\n\t\ttest2.saveRecipe(testRecipe);\n\t\t//test2.deleteRecipe(testRecipe);\n\t}", "@Test\r\n\tpublic void addUpcomingTuitionTest() {\n\t\tassertNotNull(\"Check if there is valid UTuition arraylist to add to\", UTuition);\r\n\t\t//Given an empty list, after adding UpcomingTuition, the size of the list become 1 - normal\r\n\t\t//The UpcomingTuition just added is as same as the ut1\r\n\t\tManageStudentTuition.updateStudentUpcomingTuition(UTuition, ut1);\r\n\t\tassertEquals(\"Check that UpcomingTuition arraylist size is 1\", 1, UTuition.size());\r\n\t\tassertSame(\"Check that New Upcoming Tuition is added\", ut1, UTuition.get(0));\r\n\t\t//Add another UpcomingTuition. Test the size of the UpcomingTuition list is 2? - normal\r\n\t\t//The UpcomingTuition just added is as same as the ut2\r\n\t\tManageStudentTuition.updateStudentUpcomingTuition(UTuition, ut2);\r\n\t\tassertEquals(\"Check that UpcomingTuition arraylist size is 2\", 2, UTuition.size());\r\n\t\tassertSame(\"Check that New Upcoming Tuition is added\", ut2, UTuition.get(1));\r\n\t\t\r\n\t}", "public void storeStartTestDetail(TestEntry test, File dirPath) throws Exception {\n // Fortify Mod: make sure that dirPath is a legal path\n if( dirPath != null ) {\n TEPath tpath = new TEPath(dirPath.getAbsolutePath());\n if( ! tpath.isValid() ) \n throw new IllegalArgumentException(\"TEPath error on path \" + dirPath.getAbsolutePath());\n }\n // Check recording enable\n if (dirPath != null && A_TRUE.equals(System.getProperty(RECORD))) {\n //Check test No\n if (TECore.testCount != 0) {\n JSONObject objBeforeTest = new JSONObject();\n objBeforeTest.put(NAME, test.getName());\n objBeforeTest.put(RESULT, \"\");\n // write the data into file in form of json\n OutputStreamWriter writerBefore = new OutputStreamWriter(\n new FileOutputStream(dirPath.getAbsolutePath() + Constants.TEST_RESULTTXT, true), UT_F8);\n try (BufferedWriter fbwBefore = new BufferedWriter(writerBefore)) {\n fbwBefore.write(objBeforeTest.toString());\n fbwBefore.newLine();\n fbwBefore.close();\n }\n } else {\n //update test no\n TECore.testCount = TECore.testCount + 1;\n // update test name\n TECore.nameOfTest = test.getName();\n }\n }\n }", "public void addDiagnosticTest(DiagnosticTest dTest) {\n\t\tthis.getDiagnosticTests().add(dTest);\n\t}", "@Test\n void editTask() {\n }", "@Test\n @DisplayName(\"Test for add employee to employee arrayList if correct\")\n public void testAddEmployeeTrue(){\n assertEquals(\"test\",department.getEmployees().get(0).getFirstName());\n assertEquals(\"test\",department.getEmployees().get(0).getLastName());\n assertEquals(\"test\",department.getEmployees().get(0).getPersonNumber());\n }", "@Test\r\n public void testAgregar() {\r\n System.out.println(\"agregar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.agregar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test// to tell jUnit that method with @Test annotation has to be run. \n\tvoid testAdd() {\n\t\tSystem.out.println(\"Before assumption method: Add Method\");\n\t\tboolean isServerUp = false;\n\t\tassumeTrue(isServerUp,\"If this method ran without skipping, my assumption is right\"); //Eg: This is used in occasions like run only when server is up.\n\t\t\n\t\tint expected = 2;\n\t\tint actual = mathUtils.add(0, 2);\n\t\t//\t\tassertEquals(expected, actual);\n\t\t// can add a string message to log \n\t\tassertEquals(expected, actual,\"add method mathUtils\");\n\t}", "@Test\n\tpublic void testAddHomework() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class1\", 2017, \"HW1\");\n\t\tassertTrue(this.instructor.homeworkExists(\"Class1\", 2017, \"HW1\"));\n\t}", "@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"[email protected]\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}", "@Test\n public void addMovie_test() {\n theater.getMovies().add(\"Love Actually\");\n String expected = \"Love Actually\";\n String actual = theater.getMovies().get(4);\n Assert.assertEquals(expected,actual);\n }", "@Test\n public void testAddMine() throws Exception {\n Mine.addMine(9, 9);\n assertEquals(\"success\", Mine.addMine(9, 9));\n\n }", "@Test\n public void testAddItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input).init(tracker);;\n\n for (Item item : tracker.getAll()) {\n if (item != null) {\n Assert.assertEquals(item.getName(), name);\n }\n }\n\n }", "@Test\n public void testAddWordToList() throws Exception {\n System.out.println(\"addWordToList\");\n String permalink = testList.getPermalink();\n WordListApi.addWordToList(token, permalink, \"test\");\n }", "@Override\n\tpublic TestDeValidation addTestValidation(TestDeValidation test) {\n\t\tthrow new RuntimeException(\"Méthode nom implémentée\");\n\t}", "@RequestMapping(\"/{datasetid}/add\")\n public String addQATest(QATest qatest,\n @PathVariable(\"datasetid\") String datasetId,\n RedirectAttributes redirectAttributes) {\n String testtype = qatest.getTestType();\n if (testtype.trim().equals(\"\")) {\n redirectAttributes.addFlashAttribute(\"message\", \"test type cannot be empty\");\n return \"redirect:view\";\n }\n\n qatest.setDatasetId(datasetId);\n qaTestService.save(qatest);\n redirectAttributes.addFlashAttribute(\"message\", \"QA test added\");\n return \"redirect:view\";\n }", "@Test\r\n public void testAddNumber() {\r\n System.out.println(\"addNumber\");\r\n nc1.addNumber(n1);\r\n newarr_test1.add(n1);\r\n assertEquals(newarr_test1, nc1.ncarr);\r\n \r\n }", "@RequestMapping(value = \"/addQuestionToTestTeacher/{testId}\",method = RequestMethod.POST)\n\tpublic Test addQuestionToTest(@PathVariable(\"testId\") int testid ,@RequestBody List<Questions> questionList){\n\t\tTest test = testDao.gettestStatus(testid);\n\t\tif(test!=null) {\n\t\t\tList<Questions> availableQuestions = (List<Questions>) test.getQuestions();\n\t\t\tif(availableQuestions.size()>0) {\n\t\t\t\tavailableQuestions.addAll(questionList);\n\t\t\t}else {\n\t\t\t\ttest.setQuestions(questionList);\n\t\t\t}\n\t\t\ttest = testDao.updateTest(test);\n\t\t}\n\t\t\n\t\treturn test;\n\t}", "public void testAdd() throws TeamException, CoreException {\n IProject project = createProject(\"testAdd\", new String[] { });\n // add some resources\n buildResources(project, new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" }, false);\n // add them to CVS\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO));\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE));\n }", "@Test\n public void testNewEntity() throws Exception {\n\n }", "public void createTestCase(String testName) {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (testName == null || testName.isEmpty()) {\r\n\t\t\tthrow new ConfigurationException(\"testName must not be null or empty\");\r\n\t\t}\r\n\t\t\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tJSONObject testJson = getJSonResponse(Unirest.post(url + TESTCASE_API_URL)\r\n\t\t\t\t\t.field(\"name\", testName)\r\n\t\t\t\t\t.field(\"application\", applicationId));\r\n\t\t\ttestCaseId = testJson.getInt(\"id\");\r\n\t\t} catch (UnirestException | JSONException e) {\r\n\t\t\tthrow new SeleniumRobotServerException(\"cannot create test case\", e);\r\n\t\t}\r\n\t}", "@Test\n public void addArticle(){\n User user = userDao.load(3);\n Article article = new Article();\n article.setUser(user);\n// article.setTitle(\"1896\");\n articleDao.add(article);\n }", "public void insertTestCase(String path){\n\t\t\n\t\tif(MainWindow.getCasePath().isEmpty()){\n\t\t\tConsoleLog.Message(\"Test case not selected\"); \n\t\t}else{\n\t\t\tTestCaseSettingsData data = controller.readSettingsData(path);\n\t\t\tgetSelectedPanel().insertTestCaseToTable(data);\n\t\t\tgetSelectedPanel().clearResults();\n\t\t}\n\t}", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@api(\"Addition\")\r\n @TestCase(\"This test is for validating Addition of two numbers|Add 3 to 2|Result should be 5\")\r\n @Test\r\n public void hello() {\r\n AddClass ac = new AddClass();\r\n int actual = ac.add(2, 3);\r\n assertEquals(6, actual);\r\n }", "@Test\n\tpublic void test(){\n\t}", "public void onTestSuccess(ITestResult tr) {\n\t\ttest= extent.createTest(tr.getName());//create new entry in the report\n\t\ttest.log(Status.PASS, MarkupHelper.createLabel(tr.getName(), ExtentColor.GREEN));//send the passed info to the report with green color highlighted\n\t}" ]
[ "0.74247456", "0.74094844", "0.73830676", "0.7192446", "0.7157384", "0.70946616", "0.7069211", "0.70683026", "0.703884", "0.70308465", "0.69203544", "0.6915428", "0.6915428", "0.69006234", "0.68842804", "0.68756455", "0.67170477", "0.6696939", "0.66883636", "0.6684227", "0.6655003", "0.6632492", "0.6587379", "0.656978", "0.65499383", "0.6513701", "0.65102154", "0.6499487", "0.6496109", "0.6490303", "0.6474071", "0.6448954", "0.6441824", "0.642039", "0.6409576", "0.64026165", "0.6396203", "0.63647956", "0.6348666", "0.63410497", "0.6339563", "0.6335279", "0.6322664", "0.63146436", "0.6314142", "0.6308165", "0.63032603", "0.6301135", "0.62967116", "0.6286429", "0.6282723", "0.6270612", "0.6266445", "0.6263839", "0.6256612", "0.62470084", "0.62330705", "0.62253845", "0.6221166", "0.6209901", "0.62092066", "0.62041616", "0.6195219", "0.618922", "0.6183971", "0.61763686", "0.6168927", "0.6168494", "0.6165892", "0.61463594", "0.6131088", "0.61293364", "0.6128912", "0.6127196", "0.6123402", "0.61169505", "0.6114499", "0.6106782", "0.61041725", "0.61031616", "0.61016893", "0.6100286", "0.60998285", "0.6093266", "0.609242", "0.60903835", "0.6088892", "0.6087154", "0.608347", "0.60830796", "0.6081965", "0.6076609", "0.60724056", "0.6071693", "0.60708517", "0.6069413", "0.6063506", "0.6055694", "0.60548353", "0.605206" ]
0.7420699
1
/ This method is used to update existing test
@Override public TestEntity updateTest(BigInteger testId, TestEntity test) { boolean exists = testDao.existsById(testId); if (exists) { test = testDao.save(test); return test; } throw new TestNotFoundException("Test not found for id="+testId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Test update(TestData testData, Test test);", "@Test\n public void update() {\n }", "@Test\r\n public void testUpdate() {\r\n }", "@Test\n public void testUpdate() {\n\n }", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\n void testUpdateGoalie() {\n\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Test @Ignore\n\tpublic void testUpdate() {\n\t\tlog.info(\"*** testUpdate ***\");\n\t}", "@Test\n\tpublic void testUpdateTask() {\n\t}", "@Test\r\n public void testUpdate() {\r\n assertTrue(false);\r\n }", "private void updateTestTarget(TestTarget testTarget) {\r\n\t\tif (getDbContext().update(TESTTARGET).set(TESTTARGET.PATH, testTarget.getPath())\r\n\t\t\t\t.set(TESTTARGET.FILE_NAME, testTarget.getFileName()).set(TESTTARGET.NAME, testTarget.getName())\r\n\t\t\t\t.where(TESTTARGET.ID.eq(testTarget.getId())).execute() != 1) {\r\n\t\t\tmLogger.error(\"Failed to update package:\" + testTarget);\r\n\t\t} else {\r\n\t\t\tmLogger.debug(\"Test package updated:\" + testTarget);\r\n\t\t}\r\n\t}", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "public Boolean update(Test c) \n\t{\n\t\t\n\t\treturn true;\n\t}", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "@Test\n public void updatePage() {\n }", "public void updateWithTestStats() {\n\t\tBasicDBObject updateQuery = new BasicDBObject(); \n\t\tBasicDBObject fieldSets = new BasicDBObject(); \n\t\tfieldSets.put(\"numFailedTests\", numFailedTests); \n\t\tfieldSets.put(\"numPassedTests\", numPassedTests); \n\t\tfieldSets.put(\"testSuiteName\", testSuiteName); \n\t\tfieldSets.put(\"testEndTime\", testEndTime); \n\t\tupdateQuery.put( \"$set\", fieldSets); \n\t\tappendData(updateQuery);\n\t}", "@Test\n @Commit\n public void dynamicUpdateContent(){\n }", "@Test \n\tpublic void testUpdateSetting() throws Exception\n\t{\n\t}", "@Test\n void updateSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n\n String name = \"Edited name\";\n boolean check = false;\n String description = \"edited description\";\n\n if (result != null) {\n testEntity.setName(name);\n testEntity.setCheck(check);\n testEntity.setDescription(description);\n instance.update(testEntity);\n\n Optional<TestEntity> optionalTestEntity = instance.getById(TestEntity.class, testEntity.getId());\n assertTrue(optionalTestEntity.isPresent());\n\n if (optionalTestEntity.isPresent()) {\n TestEntity entity = optionalTestEntity.get();\n\n assertEquals(entity.getName(), name);\n assertEquals(entity.getDescription(), description);\n assertEquals(entity.isCheck(), check);\n } else {\n fail();\n }\n } else {\n fail();\n }\n }", "@Test\npublic void testUpdateResult() throws Exception { \n//TODO: Test goes here... \n}", "public Test updatedTestByID(Test testEntity, int id) {\n\t\ttestEntity.setTest_id(id);\n\t\t\n\t\treturn testRepository.save(testEntity);\n\t}", "@Override\n\tpublic MedicalTest modifyTest(MedicalTest test) {\n\n\t\tMedicalTestUtil.checkPresenceOfTest(test);\n return testDao.save(test);\n\t}", "@Test\n public void test2Update() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.update(spec2,\"teleinformatica\"),1); \n }", "@Test\n public void lastUpdateTest() {\n // TODO: test lastUpdate\n }", "@Test\n public void update() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(1, 0, 6, \"GUI\");\n Student s2 = new Student(1,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(1, 1, \"prof\", 10, \"Irelevant\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repo.update(s2);\n repot.update(t2);\n repon.update(n2);\n assert repo.findOne(1).getGrupa()==221;\n assert repot.findOne(1).getDeadline()==8;\n assert repon.findOne(\"11\").getFeedback()==\"Irelevant\";\n\n }\n catch (ValidationException e){\n }\n }", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "@Test\n public void testUpdateCar() {\n\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Title t = new Title();\r\n t.setIsbn(\"test\");\r\n t.setTitle(\"aaaaaaaaaaaaaaaaaa\");\r\n t.setAuthor(\"kkkkkkkkkkkkkk\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.update(t);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void test() throws Exception{\n update(\"update user set username=? where id=?\",\"wangjian\",\"4\");\n }", "@Test\n public void updateDecline() throws Exception {\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n @WithMockUser(username=\"supervisor_admin\",roles={\"PM\",\"ADMIN\"})\n public void shouldUpdateAssessmentRubric() throws Exception {\n\n // Creating Rubric object using test values\n String rubricTitle = \"test_rubric_title\";\n int rubricRank = 4;\n boolean rubricIsEnabled = true;\n\n AssessmentRubric rubricObject = new AssessmentRubric();\n rubricObject.setTitle(rubricTitle);\n rubricObject.setStarting_date_time(LocalDateTime.now());\n rubricObject.setEnd_date_time(LocalDateTime.now());\n rubricObject.setEnabled(rubricIsEnabled);\n rubricObject.setRank(rubricRank);\n\n rubricObject.setRubricType(getMockTestRubricType());\n rubricObject.setLearningProcess(getMockTestLearningProcess());\n\n // Creating process JSON\n byte[] rubricJSON = this.mapper.writeValueAsString(rubricObject).getBytes();\n\n // invoke Create\n MvcResult resultInsert = mvc.perform(post(BASE_URL).content(rubricJSON)\n .contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isCreated())\n .andExpect(jsonPath(\"$.title\", is(rubricTitle)))\n .andExpect(jsonPath(\"$.rank\", is(rubricRank)))\n .andExpect(jsonPath(\"$.enabled\", is(rubricIsEnabled)))\n .andReturn();\n\n\n AssessmentRubric rubricUpdatable = this.mapper.readValue(resultInsert.getResponse().getContentAsByteArray(), AssessmentRubric.class);\n // Update the inserted AssessmentRubric\n rubricUpdatable.setTitle(rubricTitle +\" updated\");\n rubricUpdatable.setRank(rubricRank +1 );\n rubricUpdatable.setEnabled(!rubricIsEnabled);\n\n rubricJSON = this.mapper.writeValueAsString(rubricUpdatable).getBytes();\n\n // UPDATE: Operation\n MvcResult resultUpdate = mvc.perform(put(BASE_URL+\"/\"+rubricUpdatable.getId())\n .content(rubricJSON)\n .contentType(MediaType.APPLICATION_JSON)\n .accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\").exists())\n .andExpect(jsonPath(\"$.title\", is(rubricTitle +\" updated\")))\n .andExpect(jsonPath(\"$.rank\", is(rubricRank + 1)))\n .andExpect(jsonPath(\"$.enabled\", is(!rubricIsEnabled)))\n .andReturn();\n\n\n }", "@Test\n void updateSuccess() {\n String newEventName = \"Coffee meeting\";\n Event eventToUpdate = (Event)genericDao.getById(5);\n eventToUpdate.setName(newEventName);\n genericDao.saveOrUpdate(eventToUpdate);\n Event retrievedEvent = (Event)genericDao.getById(5);\n assertEquals(eventToUpdate, retrievedEvent);\n }", "@Test\n public void updateContact() {\n }", "@Test\n public void testUpdate() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n \n disciplineTest.setName(\"matiere_test2\");\n \n result = disciplineDao.update(disciplineTest);\n \n disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "@Override\r\n\tpublic FyTestRecord update(FyTestRecord testRecord) {\n\t\tUpdater u = new Updater(testRecord);\r\n\t\treturn testRecordDao.updateByUpdater(u);\r\n\t}", "private void updateTestEnd() {\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tPreparedStatement pStat = dbConnection.prepareStatement(\"UPDATE runs set `id_status`=?,`time_end`=now() where `id_run` =?\");\r\n\t\t\tpStat.setInt(1, Conf.getTestStatus());\r\n\t\t\tpStat.setInt(2, Conf.getRunId());\r\n\t\t\tpStat.execute();\r\n\t\t\tpStat.close();\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "@Test\n void editTask() {\n }", "@Test\n void updateSuccess() {\n String newFirstName = \"Artemis\";\n User userToUpdate = (User) dao.getById(1);\n userToUpdate.setFirstName(newFirstName);\n dao.saveOrUpdate(userToUpdate);\n User userAfterUpdate = (User) dao.getById(1);\n assertEquals(newFirstName, userAfterUpdate.getFirstName());\n }", "@Test\n public void testUpdateItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if(item != null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // update first item\n\n String action2 = \"1\";\n\n String name3 = \"updated task\";\n String desc3 = \"updated desc\";\n String create3 = \"46754\";\n\n Input input3 = new StubInput(new String[]{action2, id, name3, desc3, create3, yes});\n new StartUI(input3).init(tracker);\n\n Item foundedItem = tracker.findById(id);\n\n Assert.assertEquals(name3, foundedItem.getName());\n\n }", "@Test\n void updateTest() {\n admin.setSurname(\"Rossini\");\n Admin modifyied = adminJpa.update(admin);\n assertEquals(\"Rossini\", modifyied.getSurname());\n }", "public void testCmdUpdate() {\n\t\ttestCmdUpdate_taskID_field();\n\t\ttestCmdUpdate_taskName_field();\n\t\ttestCmdUpdate_time_field();\n\t\ttestCmdUpdate_priority_field();\n\t}", "@Test\n void updateSuccess() {\n RunCategory categoryToUpdate = (RunCategory) dao.getById(2);\n categoryToUpdate.setCategoryName(\"New Name\");\n dao.saveOrUpdate(categoryToUpdate);\n RunCategory categoryAfterUpdate = (RunCategory) dao.getById(2);\n assertEquals(categoryToUpdate, categoryAfterUpdate);\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@Test\n public void refresh() throws Exception {\n }", "@Test\npublic void testUpdateAStudentInformation() {\n//TODO: Test goes here...\n System.out.println(StudentDao.updateAStudentInformation(1006, \"6\", 99, 99, 99));\n}", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test @Ignore\n\tpublic void testSQLUpdate() {\n\t\tlog.info(\"*** testSQLUpdate ***\");\n\t}", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n\tpublic void saveTest(){\n\t\t\n\t}", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n String doc = \"\";\r\n String xml = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.update(doc, xml);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public Object modifyTest(TestCreateDTO testCreateDTO) {\n\t\tTest test = testMapper.selectByPrimaryKey(testCreateDTO.getId());\n\t\tif(test.getStatus() || test.getStartTime() <= System.currentTimeMillis())\n\t\t\treturn ResultDTO.errorOf(CustomizeErrorCode.TEST_IS_STARTED);\n\t\tPaper paper = paperMapper.selectByPrimaryKey(testCreateDTO.getPaperId());\n\t\tif(paper ==null ) {\n\t\t\tthrow new CustomizeException(CustomizeErrorCode.PAPER_NOT_FOUND);\n\t\t}\n\t\tpaper.setStatus(true);\n\t\tpaperMapper.updateByPrimaryKey(paper);\n\t\ttest.setDuration(testCreateDTO.getDuration().getTime());\n\t\ttest.setStartTime(testCreateDTO.getStartTime().getTime());\n\t\ttest.setEndTime(test.getStartTime()+test.getDuration());\n\t\ttest.setModifyTime(System.currentTimeMillis());\n\t\ttest.setPaperId(testCreateDTO.getPaperId());\n\t\ttest.setName(testCreateDTO.getName());\n\t\ttestMapper.updateByPrimaryKey(test);\n\t\tnotifyService.createNotify(test,ReceiverEnum.USER_OF_TEST, MessageTypeEnum.MODIFY_TEST);\n\t\treturn null;\n\t}", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "@Test\n void saveOrUpdateSuccess() {\n String newRoleName = \"readOnly\";\n UserRoles toUpdate = (UserRoles) genericDao.getById(3);\n toUpdate.setRoleName(newRoleName);\n genericDao.saveOrUpdate(toUpdate);\n UserRoles retrievedRole = (UserRoles) genericDao.getById(3);\n assertEquals(newRoleName, retrievedRole.getRoleName());\n log.info(\"update role success test\");\n\n }", "@Test\n public void updateAccept() throws Exception {\n\n }", "@SmallTest\n public void testUpdate() {\n int result = -1;\n if (this.entity != null) {\n Settings settings = SettingsUtils.generateRandom(this.ctx);\n settings.setId(this.entity.getId());\n\n result = (int) this.adapter.update(settings);\n\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKXml() throws Exception {\n\t}", "@Test\n public void updateAll_501() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n addMOToDb(2);\n addMOToDb(3);\n\n Workflow mo = new Workflow();\n\n // PREPARE THE TEST\n // Nothing to do\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\", mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(501, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n }", "@Override\n\tpublic int update(TestPoEntity entity) {\n\t\treturn 0;\n\t}", "@Test\n public void testUpdateLocation() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n loc1.setLocationName(\"Poppas House\");\n\n locDao.updateLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_1_updateExistDept() throws Exception {\n Department d = d_1;\n d.setDescription(\"修改部门1描述\");\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())));\n }", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "@Test\n public void testUpdateExample() throws Exception{\n MvcResult result = this.mockMvc.perform(get(\"/api/example/{id}\",50))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n // Parses it\n Example example = convertFromJson(result.getResponse().getContentAsString(), Example.class);\n \n // Change name value\n example.setName(\"Test 27\");\n\n // Updates it and checks if it was updated\n this.mockMvc.perform(put(\"/api/example\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(convertToJson(example)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.name\", equalTo(\"Test 27\")));\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test\n\tpublic void testSaveOrUpdateDriverUpdate() throws MalBusinessException{\t\n\t\tfinal long drvId = 203692;\n\t\tfinal String FNAME = \"Update\";\n\t\tfinal String LNAME = \"Driver Test\";\n\t\tfinal String PHONE_NUMBER = \"554-2728\";\n\t\t\n\t\tDriver driver;\n\t\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\tdriver.setDriverForename(FNAME);\n\t\tdriver.setDriverSurname(LNAME);\t\t\n\t\tdriver.getDriverAddressList().get(0).setAddressLine1(\"111\");\t\n\t\tdriver.getPhoneNumbers().get(0).setNumber(PHONE_NUMBER);\n\t\tdriver = driverService.saveOrUpdateDriver(driver.getExternalAccount(), driver.getDgdGradeCode(), driver, driver.getDriverAddressList(), driver.getPhoneNumbers(), userName, null);\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\t\n assertEquals(\"Update driver first name failed \", driver.getDriverForename(), FNAME);\t\n\t\tassertEquals(\"Update driver last name failed \", driver.getDriverSurname(), LNAME);\t\t\n\t\tassertEquals(\"Update driver phone number failed \", driver.getPhoneNumbers().get(0).getNumber(), PHONE_NUMBER);\t\t\n\t}", "@Test\n public void updatedAtTest() {\n // TODO: test updatedAt\n }", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity pojoEntity = factory.manufacturePojo(EspecieEntity.class);\n pojoEntity.setId(entity.getId());\n especieLogic.updateSpecies(pojoEntity.getId(), pojoEntity);\n EspecieEntity resp = em.find(EspecieEntity.class, entity.getId());\n Assert.assertEquals(pojoEntity.getId(), resp.getId());\n Assert.assertEquals(pojoEntity.getNombre(), resp.getNombre());\n }", "@Test\n public void updateTest11() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "@Override\n\tpublic TestDeValidation updateTestValidation(TestDeValidation test) {\n\t\tthrow new RuntimeException(\"Méthode nom implémentée\");\n\t}", "@Test\n public void updateTest2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }", "@Test\r\n\tpublic void update() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\tTransformer tf = new Transformer( null, \"Soundwave\", Team.DECEPTICON, 8, 9, 2, 6, 7, 5, 6, 10); \r\n\t\ttf = tr.save(tf);\r\n\t\tint id=tf.getId();\r\n\t\t\r\n\t\tString content = \"{\\r\\n\" + \r\n\t\t\t\t\" \\\"id\\\": 3,\\r\\n\" + \r\n\t\t\t\t\" \\\"name\\\": \\\"TF1\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"team\\\": \\\"DECEPTICON\\\",\\r\\n\" + \r\n\t\t\t\t\" \\\"strength\\\": 8,\\r\\n\" + \r\n\t\t\t\t\" \\\"intelligence\\\": 9,\\r\\n\" + \r\n\t\t\t\t\" \\\"speed\\\": 2,\\r\\n\" + \r\n\t\t\t\t\" \\\"endurance\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"rank\\\": 7,\\r\\n\" + \r\n\t\t\t\t\" \\\"courage\\\": 5,\\r\\n\" + \r\n\t\t\t\t\" \\\"firepower\\\": 6,\\r\\n\" + \r\n\t\t\t\t\" \\\"skill\\\": 1\\r\\n\" + \r\n\t\t\t\t\"}\";\r\n\t\t\r\n\t\tmockMvc.perform(put(\"/transformers/\" + id ).contentType(MediaType.APPLICATION_JSON).content(content.getBytes(\"UTF-8\")))\r\n\t\t\t\t.andExpect(status().isCreated())\r\n\t\t\t\t.andExpect(content().contentTypeCompatibleWith(\"application/json\"))\r\n\t\t\t\t;\r\n\t\t\r\n\t\tTransformer res = tr.findById(id).get();\r\n\t\tassertEquals( \"TF1\", res.getName());\r\n\t\tassertEquals( 1, res.getSkill());\r\n\t\t\r\n\t}", "@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }", "void updatedProperty(TestResult tr, String name, String value);", "@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateQuejaTest() {\n QuejaEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n\n newEntity.setId(entity.getId());\n\n quejaPersistence.update(newEntity);\n\n QuejaEntity resp = em.find(QuejaEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getName(), resp.getName());\n }", "@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Test\n public void editProfileTest() {\n }", "@Test\n public void editRecipe_ReturnsTrue(){\n testDatabase.addRecipe(testRecipe);\n testRecipe.setTitle(\"TestRecipe Updated\");\n testRecipe.setServings(1.5);\n testRecipe.setPrep_time(15);\n testRecipe.setTotal_time(45);\n testRecipe.setFavorited(true);\n listOfCategories.clear();\n listOfCategories.add(recipeCategory);\n testRecipe.setCategoryList(listOfCategories);\n listOfIngredients.clear();\n recipeIngredient.setUnit(\"tbsp\");\n recipeIngredient.setQuantity(1.5);\n recipeIngredient.setDetails(\"Brown Sugar\");\n listOfIngredients.add(recipeIngredient);\n testRecipe.setIngredientList(listOfIngredients);\n listOfDirections.clear();\n listOfDirections.add(recipeDirection1);\n testRecipe.setDirectionsList(listOfDirections);\n\n assertEquals(\"editRecipe - Returns True\", true, testDatabase.editRecipe(testRecipe));\n }", "@Test\n public void updateBlock() throws Exception {\n\n }", "@Test\n public void updateWorkflow_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n Integer id = addMOToDb(2).getId();\n addMOToDb(3);\n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"New My_Workflow\");\n mo.setDescription(\"New Description of my new workflow\");\n mo.setRaw(\"New Workflow new content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\" + id.toString(), mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }", "@Test \n\tpublic void edit() \n\t{\n\t\tassertTrue(true);\n\t}", "@Test\n\tvoid update() {\n\t\tfinal UserOrgEditionVo userEdit = new UserOrgEditionVo();\n\t\tuserEdit.setId(\"flast1\");\n\t\tuserEdit.setFirstName(\"FirstA\");\n\t\tuserEdit.setLastName(\"LastA\");\n\t\tuserEdit.setCompany(\"ing\");\n\t\tuserEdit.setMail(\"[email protected]\");\n\t\tfinal List<String> groups = new ArrayList<>();\n\t\tgroups.add(\"dig rha\");\n\t\tuserEdit.setGroups(groups);\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tresource.update(userEdit);\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"flast1\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\tfinal UserOrgVo user = tableItem.getData().get(0);\n\t\tAssertions.assertEquals(\"flast1\", user.getId());\n\t\tAssertions.assertEquals(\"Firsta\", user.getFirstName());\n\t\tAssertions.assertEquals(\"Lasta\", user.getLastName());\n\t\tAssertions.assertEquals(\"ing\", user.getCompany());\n\t\tAssertions.assertEquals(\"[email protected]\", user.getMails().get(0));\n\t\tAssertions.assertEquals(1, user.getGroups().size());\n\t\tAssertions.assertEquals(\"DIG RHA\", user.getGroups().get(0).getName());\n\n\t\t// Rollback attributes\n\t\tuserEdit.setId(\"flast1\");\n\t\tuserEdit.setFirstName(\"First1\");\n\t\tuserEdit.setLastName(\"Last1\");\n\t\tuserEdit.setCompany(\"ing\");\n\t\tuserEdit.setMail(\"[email protected]\");\n\t\tuserEdit.setGroups(null);\n\t\tresource.update(userEdit);\n\t}", "@Test\n @IfProfileValue(name = \"dept-test-group\", values = {\"all\",\"role\",\"update-role\"})\n public void _4_4_1_updateExistRole() throws Exception {\n\n String _id = r_2.getId().toString();\n r_2.setDescription(\"修改角色测试\");\n log.debug(\"_4_4_1_updateExistRole:{}\",json(r_2));\n this.mockMvc.perform(put(PATH_PREFIX_v1+\n r_2.getCompany()+\n \"/departments/\"+\n r_2.getCompany()+\n \"/roles/\"+\n _id)\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(r_2)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(_id)))\n .andExpect(jsonPath(\"$.description\",is(r_2.getDescription())));\n }", "@Test\n\tpublic void updateTask() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}", "@Test\n void updateSuccess() {\n String Vin = \"1111111111111111X\";\n Car carToUpdate = carDao.getById(1);\n carToUpdate.setVin(Vin);\n carDao.saveOrUpdate(carToUpdate);\n Car retrievedCar = carDao.getById(1);\n assertEquals(carToUpdate, retrievedCar);\n }", "public void testUpdate() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t\n\t\t\t// update\n\t\t\tassertEquals(1, ServerParameterTDG.update(\"paramName\", \"some description\", \"other value\"));\t\n\t\t\t\n\t\t\t// update again\n\t\t\tassertEquals(1, ServerParameterTDG.update(\"paramName\", \"some other description\", \"and another value\"));\t\n\t\t\t\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\t\n\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void updateTest() {\n reservation3.setId(13L);\n reservation3.setReserveDate(LocalDate.now().plusDays(2));\n reservationService.update(reservation3);\n Mockito.verify(reservationDao, Mockito.times(1)).update(reservation3);\n }", "@Test\n\t@Override\n\tpublic void testUpdateObjectWrongIdXml() throws Exception {\n\t}", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "public void updateTestStep(String teststep,ExtentReports r,ExtentTest l,WebDriver driver)\n\t{\n\t\tcurrentTestStep=teststep;\n\n\t}", "@Test\n\tpublic void testSave() {\n\t}", "@Test\n public void updateTest3() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }" ]
[ "0.78166884", "0.77446425", "0.7658585", "0.7646798", "0.73784554", "0.73001045", "0.72839713", "0.72301555", "0.71591556", "0.71322125", "0.69639844", "0.6932387", "0.69083184", "0.6869059", "0.68537945", "0.6795353", "0.6791361", "0.67671406", "0.6766624", "0.67633975", "0.67575145", "0.67559105", "0.6699115", "0.6694335", "0.6693123", "0.6659246", "0.6648128", "0.66435933", "0.6627285", "0.6610403", "0.6586969", "0.65755177", "0.6531591", "0.65294033", "0.65260446", "0.6482333", "0.64759034", "0.6466753", "0.64582634", "0.6429976", "0.64107263", "0.6410225", "0.6406815", "0.64057887", "0.64014184", "0.63792616", "0.63748866", "0.635845", "0.6350379", "0.63478374", "0.63462573", "0.63255185", "0.6322731", "0.6318913", "0.6309981", "0.6296955", "0.6269631", "0.62678134", "0.6265866", "0.6264102", "0.6259136", "0.6256188", "0.62543833", "0.62483436", "0.62332094", "0.6230184", "0.62283343", "0.6225946", "0.62204486", "0.6216914", "0.62168235", "0.62151647", "0.62148416", "0.62071913", "0.6204217", "0.6203482", "0.6202748", "0.6200324", "0.61969686", "0.6190709", "0.6188392", "0.6185896", "0.6178483", "0.61661464", "0.6165904", "0.6163043", "0.6141568", "0.6125914", "0.6115399", "0.6103651", "0.60976344", "0.6096035", "0.60896075", "0.6088404", "0.6081372", "0.6080556", "0.6076141", "0.60716176", "0.60698885", "0.6068909" ]
0.7205868
8
/ This method is used to delete existing test
@Override public TestEntity deleteTest(BigInteger testId) { TestEntity test = findById(testId); testDao.delete(test); return test; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testDelete(){\n\t}", "@Test\n void delete() {\n }", "@Test\n void delete() {\n }", "public void delTestByID(int id) {\n\t\ttestRepository.deleteById(id);\n\t\t\n\t}", "@Override\n\tpublic Test deleteTest(BigInteger testId) throws UserException {\n\t\treturn null;\n\t}", "@Test\n void deleteItem() {\n }", "@Test\n public void shouldDeleteAllDataInDatabase(){\n }", "@Test\n public void testFeedBackDelete(){\n }", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "@Test\n void deleteList() {\n }", "private void clearOneTest() {\n corpus.clear();\n Factory.deleteResource(corpus);\n Factory.deleteResource(learningApi);\n controller.remove(learningApi);\n controller.cleanup();\n Factory.deleteResource(controller);\n }", "@Test\n public void delete() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Student s2 = new Student(2,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(2,2,\"prof\", 3, \"cv\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repot.delete(2);\n repo.delete(2);\n repon.delete(\"22\");\n assert repo.size() == 1;\n assert repot.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }", "public void testSearchDeleteCreate() {\n doSearchDeleteCreate(session, \"/src/test/resources/profile/HeartRate.xml\", \"HSPC Heart Rate\");\n }", "public void removeTestCase(){\n\t\tgetSelectedPanel().removeSelectedTestCase(); \n\t}", "@Test\n void removeItem() {\n\n }", "private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }", "@Test\n void removeTask() {\n }", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "@Test\n void removeItem() {\n }", "@Test\n public void deleteContact() {\n }", "@Override\n\tpublic boolean removeTest(String testId) {\n\t\tOptional<MedicalTest> optional = testDao.findById(testId);\n\t\tif (optional.isPresent()) {\n\t\t\tMedicalTest test = optional.get();\n\t\t\ttestDao.delete(test);\n\t\t\treturn true;\n\t\t}\n\t\tthrow new MedicalTestNotFoundException(\"Test Id not found\");\n\t}", "@After\n\tpublic void tearDown() {\n\t\theroRepository.delete(HERO_ONE_KEY);\n\t\theroRepository.delete(HERO_TWO_KEY);\n\t\theroRepository.delete(HERO_THREE_KEY);\n\t\theroRepository.delete(HERO_FOUR_KEY);\n\t\theroRepository.delete(\"hero::counter\");\n\t}", "@Test\n public void test5Delete() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.delete(\"telecomunicaciones\"),1);\n }", "@Test\n public void deleteTemplateTest() throws IdfyException, Exception {\n UUID id = UUID.randomUUID();\n api.deleteTemplate(id);\n }", "@Before\n @After\n public void deleteTestTransactions() {\n if (sessionId == null) {\n getTestSession();\n }\n\n // No test transaction has been made yet, thus no need to delete anything.\n if (testTransactionId != null) {\n given()\n .header(\"X-session-ID\", sessionId)\n .delete(String.format(\"api/v1/transactions/%d\", testTransactionId));\n }\n\n if (clutterTransactionId != null) {\n given()\n .header(\"X-session-ID\", sessionId)\n .delete(String.format(\"api/v1/transactions/%d\", clutterTransactionId));\n }\n }", "protected void tearDown() {\r\n (new File(dest, \"RenameFieldTest.java\")).delete();\r\n (new File(dest, \"UsesFieldTest.java\")).delete();\r\n (new File(dest, \"InheritFieldTest.java\")).delete();\r\n (new File(root + \"\\\\XDateChooser.java\")).delete();\r\n }", "@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }", "@Test\r\n\tpublic void testDeleteNote() throws Exception {\r\n\t\tyakshaAssert(currentTest(), \"true\", exceptionTestFile);\r\n\t}", "@Test\n public void testRemoveACopy() {\n }", "@AfterClass\n\tpublic static void cleanIndex() {\n\t\tEntityTest et = new EntityTest(id, \"EntityTest\");\n\t\tRedisQuery.remove(et, id);\n\t}", "@AfterEach\n public void tearDown() {\n try {\n Statement stmtSelect = conn.createStatement();\n String sql1 = (\"DELETE FROM tirocinio WHERE CODTIROCINIO='999';\");\n stmtSelect.executeUpdate(sql1);\n String sql2 = (\"DELETE FROM tirocinante WHERE matricola='4859';\");\n stmtSelect.executeUpdate(sql2);\n String sql3 = (\"DELETE FROM enteconvenzionato WHERE partitaIva='11111111111';\");\n stmtSelect.executeUpdate(sql3);\n String sql4 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql4);\n String sql5 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql5);\n conn.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }", "private void delete(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.typeText(0, searchTerm);\n\n //Make sure the experiment shows up\n assertTrue(solo.waitForText(description));\n\n //Click on experiment\n solo.clickOnText(description);\n\n //Click on more tab\n solo.waitForView(R.id.subscribe_button_experiment);\n solo.clickOnText(\"More\");\n\n //Click on unpublish button\n solo.clickOnView(solo.getView(R.id.delete_experiment_button));\n }", "@After\n public void tearDown() throws Exception {\n testInstance = null;\n }", "@Transactional\n\tpublic boolean deleteEntryTest(EntryTest entryTest) {\n\n\t\tgetSession().delete(entryTest);\n\t\treturn true;\n\t}", "@Override\n protected void tearDown() throws Exception {\n m_TestHelper.deleteFileFromTmp(\"regression.arff\");\n\n super.tearDown();\n }", "@Test\n @Ignore\n public void testDelete_Identifier() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(identifier);\n assertFalse(instance.exists(identifier));\n }", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "@Test\n public void testDeleteBySsoId() {\n System.out.println(\"deleteBySsoId\");\n try {\n String ssoId = \"sam\";\n\n userRepo.removeByFirstName(\"Sam\");\n AppUser result = userRepo.findBySsoId(ssoId);\n assertNull(result);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "int deleteByExample(CrawlTestExample example);", "@After\n public void deleteAfterwards() {\n DBhandlerTest db = null;\n try {\n db = new DBhandlerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n db.deleteTable();\n }", "@Test\n public void testUpdateDelete() {\n\n Fichier fichier = new Fichier(\"\", \"test.java\", new Date(), new Date());\n Raccourci raccourci = new Raccourci(fichier, \"shortcut vers test.java\", new Date(), new Date(), \"\");\n\n assertTrue(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n\n fichier.delete();\n\n assertFalse(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n }", "@Test\n public void testDeleteMember() throws Exception {\n }", "public void deleteAllRealTestCode() {\n\n\t myDataBase.delete(\"tbl_TestCode\", \"TestCode\" + \" != ?\",\n\t new String[] { \"1\" });\n\t }", "@Test\n\tpublic void testSupprimer() {\n\t\tprofesseurServiceEmp.supprimer(prof);\n\t}", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Override\n\tpublic boolean deleteTestValidation(TestDeValidation test) {\n\t\tthrow new RuntimeException(\"Méthode nom implémentée\");\n\t}", "@Test\n\tpublic void test_delete_user_success(){\n template.delete(REST_SERVICE_URI + \"/\" + getLastUser().getId() + ACCESS_TOKEN + token);\n }", "@Override\n public void tearDown() {\n testEngine = null;\n }", "@Test\n public void testDeleteTeacher() {\n System.out.println(\"deleteTeacher\");\n School instance = new School();\n instance.setTeachers(teachers);\n instance.setTeacherClass(teacherClass);\n\n assertFalse(instance.deleteTeacher(teacher));\n System.out.println(\"PASS with a teacher currently teaching a class\");\n\n assertTrue(instance.deleteTeacher(teacher3));\n teachers.remove(teacher3.getId());\n assertEquals(teachers, instance.getTeachers());\n System.out.println(\"PASS with a teacher currently not teaching any classes\");\n\n System.out.println(\"PASS ALL\");\n }", "@BeforeClass\n public static void clean() {\n DatabaseTest.clean();\n }", "@Test\n public void testDelete() throws Exception {\n System.out.println(\"delete\");\n Connection con = ConnexionMySQL.newConnexion();\n int size = Inscription.size(con);\n Timestamp timestamp = stringToTimestamp(\"2020/01/17 08:40:00\");\n Inscription result = Inscription.create(con, \"[email protected]\", timestamp);\n assertEquals(size + 1, Inscription.size(con));\n result.delete(con);\n assertEquals(size, Inscription.size(con));\n }", "@After\n public void tearDown() {\n addressDelete.setWhere(\"id = \"+addressModel1.getId());\n addressDelete.execute();\n\n addressDelete.setWhere(\"id = \"+addressModel2.getId());\n addressDelete.execute();\n\n addressDelete.setWhere(\"id = \"+addressModel3.getId());\n addressDelete.execute();\n\n\n personDelete.setWhere(\"id = \"+personModel1.getId());\n personDelete.execute();\n\n personDelete.setWhere(\"id = \"+personModel2.getId());\n personDelete.execute();\n\n personDelete.setWhere(\"id = \"+personModel3.getId());\n personDelete.execute();\n\n cityDelete.setWhere(\"id = \"+cityModel1.getId());\n cityDelete.execute();\n\n cityDelete.setWhere(\"id = \"+cityModel2.getId());\n cityDelete.execute();\n }", "@Test\n public void deletion() {\n repo.addDocument(\"test1\", \"{\\\"test\\\":1}\", \"arthur\", \"test version 1\", false);\n repo.addDocument(\"test1\", \"{\\\"test\\\":2}\", \"arthur\", \"this is version 2\", false);\n repo.removeDocument(\"test1\", \"arthur\", \"removal\");\n\n String result = repo.getDocument(\"test1\");\n assertTrue(result == null);\n\n }", "@After\n public void tearDown() {\n\t\trepository.delete(dummyUser);\n System.out.println(\"@After - tearDown\");\n }", "int deleteByExample(TResearchTeachExample example);", "@After\r\n public void tearDown() {\r\n try {\r\n Connection conn=DriverManager.getConnection(\"jdbc:oracle:thin:@//localhost:1521/XE\",\"hr\",\"hr\");\r\n Statement stmt = conn.createStatement();\r\n stmt.execute(\"DELETE FROM Packages WHERE Pkg_Order_Id=-1\");\r\n stmt.execute(\"DELETE FROM Packages WHERE Pkg_Order_Id=-2\");\r\n } catch (Exception e) {System.out.println(e.getMessage());}\r\n }", "@Test\n public void delete() {\n auctionService.restTemplate = mockRestTemplate;\n auctionService.delete(1);\n verify(mockRestTemplate).delete(testOneUrl);\n }", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "@Test\n void deleteSuccess() {\n\n UserDOA userDao = new UserDOA();\n User user = userDao.getById(1);\n String orderDescription = \"February Large Test-Tshirt Delete\";\n\n Order newOrder = new Order(orderDescription, user, \"February\");\n user.addOrder(newOrder);\n\n dao.delete(newOrder);\n List<Order> orders = dao.getByPropertyLike(\"description\", \"February Large Test-Tshirt Delete\");\n assertEquals(0, orders.size());\n }", "@AfterEach\n void tearDown() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.delete(\"/api/cleanuphero\")).andExpect(status().isOk());\n }", "@Test\n public void testSupprimerPays() {\n System.out.println(\"supprimerPays\");\n d1.ajouterPays(p1);\n d1.ajouterPays(p2);\n d1.supprimerPays(p1);\n assertEquals(1, d1.getMyListePays().size());\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDeleteExperiment() {\n ExperimentId experimentId = new ExperimentId();\n experimentId.setServerTimestamp(System.currentTimeMillis());\n experimentId.setId(1);\n\n // Create the entity\n ExperimentEntity entity = new ExperimentEntity();\n entity.setExperimentSpec(toJson(spec));\n entity.setId(experimentId.toString());\n\n // Construct expected result\n Experiment expectedExperiment = new Experiment();\n expectedExperiment.setSpec(spec);\n expectedExperiment.setExperimentId(experimentId);\n expectedExperiment.rebuild(status);\n // Stub service select\n // Pretend there is a entity in db\n when(mockService.select(any(String.class))).thenReturn(entity);\n\n // Stub mockSubmitter deleteExperiment\n when(mockSubmitter.deleteExperiment(any(ExperimentSpec.class))).thenReturn(status);\n\n // delete experiment\n Experiment actualExperiment = experimentManager.deleteExperiment(experimentId.toString());\n\n verifyResult(expectedExperiment, actualExperiment);\n }", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "@Test\n\tpublic void testDeleteCart() {\n\t}", "@Test\n void removeTest() {\n Admin anAdmin = new Admin();\n anAdmin.setEmail(\"[email protected]\");\n anAdmin.setName(\"Giovanni\");\n anAdmin.setSurname(\"Gialli\");\n anAdmin.setPassword(\"Ciao1234.\");\n\n try {\n entityManager = factor.createEntityManager();\n entityManager.getTransaction().begin();\n entityManager.persist(anAdmin);\n entityManager.getTransaction().commit();\n } finally {\n entityManager.close();\n }\n adminJpa.remove(anAdmin);\n assertThrows(NoResultException.class, () -> {\n adminJpa.retrieveByEmailPassword(\"[email protected]\", \"Ciao1234.\");\n });\n }", "@Override\r\n\tprotected void tearDown() throws Exception {\n\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000001' and table_name='emp0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000002' and table_name='dept0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000003' and table_name='emp'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000004' and table_name='dept'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00001' and database_name='database1'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00002' and database_name='database2'\");\r\n\t\tdao.insert(\"delete from system.users where user_name='scott'\");\r\n\r\n\t\tdao.insert(\"commit\");\r\n//\t\tdao.disconnect();\r\n\t}", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testEliminar() {\r\n System.out.println(\"eliminar\");\r\n Integer idUsuario = null;\r\n Usuario instance = new Usuario();\r\n instance.eliminar(idUsuario);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "private void delete() {\n\n\t}", "@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }", "@Test\r\n public void testDeleteNonExistRecipe() {\r\n assertNull(coffeeMaker.deleteRecipe(1)); // Test do not exist recipe\r\n }", "@Test\n public void testDeleteItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if (item !=null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // delete first item\n\n String action2 = \"2\";\n\n Input input3 = new StubInput(new String[]{action2, id, yes});\n new StartUI(input3).init(tracker);\n\n Assert.assertNull(tracker.findById(id));\n }", "int deleteByExample(TourstExample example);", "@Test (groups = \"create_post\")\n public void LTest_Delete_Post_success(){\n\n System.out.println(\"Delete PostID# \"+ createdPost);\n System.out.println(\"Request to: \" + resourcePath + \"/\" + createdPost);\n\n given()\n .spec(RequestSpecs.generateToken())\n //.body(testPost)\n .when()\n .delete(resourcePath + \"/\" + createdPost)\n .then()\n .body(\"message\", equalTo(\"Post deleted\"))\n .and()\n .statusCode(200)\n .spec(ResponseSpecs.defaultSpec());\n }", "@Test\n public void testDeleteFolder() {\n System.out.println(\"deleteFolder\");\n String folder = \"\";\n FileSystemStorage instance = null;\n instance.deleteFolderAndAllContents(folder);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.deleteFile(\"\");\n }", "@DeleteMapping(\"/type-tests/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTypeTest(@PathVariable Long id) {\n log.debug(\"REST request to delete TypeTest : {}\", id);\n typeTestService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Test\n public void delete01(){\n Response responseGet=given().\n spec(spec03).\n when().\n get(\"/198\");\n responseGet.prettyPrint();\n //delete islemi\n Response responseDel =given().\n spec(spec03).\n when().\n delete(\"/198\");\n responseDel.prettyPrint();\n //responseDel yazdirildiginda \"Not Found\" cevabi gelirse status code 404 ile test edilir. Eger bos bir\n // satir donerse Ststus code 200 ile test edilir.\n responseDel.then().assertThat().statusCode(200);\n // Hard assert\n assertTrue(responseDel.getBody().asString().contains(\"\"));\n //softAssertion\n SoftAssert softAssert = new SoftAssert();\n softAssert.assertTrue(responseDel.getBody().asString().contains(\"\"));\n softAssert.assertAll();\n\n\n }", "public void testDelete() {\r\n\r\n\t\ttry {\r\n\t\t\tlong count, newCount, diff = 0;\r\n\t\t\tcount = levelOfCourtService.getCount();\r\n\t\t\tLevelOfCourt levelOfCourt = (LevelOfCourt) levelOfCourtTestDataFactory\r\n\t\t\t\t\t.loadOneRecord();\r\n\t\t\tlevelOfCourtService.delete(levelOfCourt);\r\n\t\t\tnewCount = levelOfCourtService.getCount();\r\n\t\t\tdiff = newCount - count;\r\n\t\t\tassertEquals(diff, 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "int deleteByExample(TestEntityExample example);", "public void deleteTest(View v) {\n int value = (Integer) v.getTag();\n testList.remove(value);\n Intent intent = new Intent(this, Tests.class);\n intent.putExtra(\"Test value\", testList);\n \t\t intent.putExtra(\"int value\", 0);\n startActivity(intent); \n\t }", "@Test\r\n public void testDelete() throws PAException {\r\n Ii spIi = IiConverter.convertToStudyProtocolIi(TestSchema.studyProtocolIds.get(0));\r\n List<StudyDiseaseDTO> dtoList = bean.getByStudyProtocol(spIi);\r\n int oldSize = dtoList.size();\r\n Ii ii = dtoList.get(0).getIdentifier();\r\n bean.delete(ii);\r\n dtoList = bean.getByStudyProtocol(spIi);\r\n assertEquals(oldSize - 1, dtoList.size());\r\n }", "@Test\n public void testEliminar3() {\n System.out.println(\"eliminar\");\n usuarioController.crear(usuario1);\n int codigo = 0;\n boolean expResult = false;\n boolean result = usuarioController.eliminar(codigo);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void deleteTransformer() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\tTransformer tf = new Transformer( null, \"Soundwave\", Team.DECEPTICON, 8, 9, 2, 6, 7, 5, 6, 10); \r\n\t\ttf = tr.save(tf);\r\n\t\tint id=tf.getId();\r\n\t\t\r\n\t\tmockMvc.perform(delete(\"/transformers/\" + id ))\r\n\t\t\t\t.andExpect(status().isNoContent())\r\n\t\t\t\t;\r\n\t\t\r\n\t\tassertEquals( 0, tr.count());\r\n\t}", "public void testRemove() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\t\t\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tmodelDS.remove(service.getId()); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT count(*) FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tint expected = 0;\r\n\t\tif (rs.next())\r\n\t\t\texpected = rs.getInt(1);\r\n\t\tassertEquals(expected, 0);\r\n\t}", "@After\r\n public void tearDown(){\r\n \r\n Post post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 1l)\r\n .getSingleResult();\r\n \r\n assertNotNull(post);\r\n \r\n entityTransaction.begin();\r\n entityManager.remove(post);\r\n entityTransaction.commit();\r\n\r\n entityManager.close();\r\n }", "@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}", "@Test\r\n\tpublic void deleteGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGame \r\n\t\tGame game_1 = new tsw.domain.Game();\r\n\t\tservice.deleteGame(game_1);\r\n\t}", "int deleteByExample(TrainingCourseExample example);", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void deleteTest(){\n given().pathParam(\"id\",1)\n .when().delete(\"/posts/{id}\")\n .then().statusCode(200);\n }", "@Test\n public void foodDeletedGoesAway() throws Exception {\n createFood();\n // locate the food item\n\n // delete the food item\n\n // check that food item no longer locatable\n\n }", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "int deleteByExample(TCpySpouseExample example);", "@Test\n\t public void testDelete(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(user);\n\t\t\t\tuserDao.delete(user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }" ]
[ "0.7722138", "0.75139564", "0.75139564", "0.74709165", "0.7355166", "0.7325752", "0.7307765", "0.72299", "0.7177847", "0.71768177", "0.6999324", "0.69980913", "0.6943643", "0.6941816", "0.6929045", "0.69156706", "0.6906504", "0.6876256", "0.6873715", "0.6872588", "0.68559223", "0.6852121", "0.68512875", "0.6807398", "0.6798529", "0.679264", "0.6775502", "0.67716885", "0.6766963", "0.6758478", "0.66857463", "0.6674249", "0.6664564", "0.6647068", "0.6618537", "0.6608693", "0.6605586", "0.6605551", "0.6587254", "0.65803134", "0.6566765", "0.6562982", "0.655287", "0.65508735", "0.65296", "0.6525006", "0.6509319", "0.6503935", "0.64865154", "0.6479055", "0.6474379", "0.647337", "0.6472856", "0.6471152", "0.6466317", "0.6465624", "0.6464649", "0.64635885", "0.6461771", "0.6457327", "0.6456931", "0.64431876", "0.6441072", "0.6439154", "0.6438169", "0.6423679", "0.6419925", "0.6412093", "0.64098775", "0.64082515", "0.64071417", "0.6397626", "0.6393459", "0.6391197", "0.6385639", "0.638328", "0.6383258", "0.6380965", "0.6380551", "0.6380372", "0.63796365", "0.63793707", "0.63741755", "0.6372079", "0.63667756", "0.6366141", "0.6365874", "0.635946", "0.6348448", "0.6335065", "0.6332552", "0.6331015", "0.6329836", "0.63097084", "0.63053524", "0.6304073", "0.6301814", "0.62969023", "0.62967104", "0.6296257" ]
0.75993115
1
/ This method is used to find test byId
@Override public TestEntity findById(BigInteger testId) { Optional<TestEntity>optional=testDao.findById(testId); if(optional.isPresent()) { TestEntity test=optional.get(); return test; } throw new TestNotFoundException("Test not found for id="+testId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic MedicalTest findTestById(String testId) {\n\n\t\tOptional<MedicalTest> optional = testDao.findById(testId);\n\t\tif (optional.isPresent()) {\n\t\t\tMedicalTest test = optional.get();\n\t\t\treturn test;\n\t\t}\n\t\tthrow new MedicalTestNotFoundException(\"Test not found for Test Id= \" + testId);\n\t}", "@Test\n public void testFindById() {\n System.out.println(\"findById\");\n Integer id = 1;\n PrioridadRest instance = mokPrioridadRest;\n Prioridad expResult = new Prioridad(1);\n Prioridad result = instance.findById(id);\n assertEquals(expResult, result);\n \n }", "@Test\n public void findByIdTest() {\n }", "@Test\n public void findByIdTest() {\n }", "@Override\r\n\tpublic FyTestRecord findById(Long id) {\n\t\treturn testRecordDao.findOne(id);\r\n\t}", "@Test\n public void selectById() {\n }", "@Override\n\tpublic Test searchTest(long testId) {\n\t\treturn null;\n\t}", "TestEntity selectByPrimaryKey(Integer id);", "@Test\n public void testFindById() {\n\n }", "@Test\n public void idTest() {\n // TODO: test id\n }", "@Test\n public void idTest() {\n // TODO: test id\n }", "@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }", "@Test\r\n public void testFindById() throws Exception {\r\n }", "@Test\n\tpublic void getIdTest() {\n\t}", "@Test\r\n public void testSelectById() {\r\n System.out.println(\"selectById\");\r\n int id = 1;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent result = instance.selectById(id);\r\n assertTrue(result!=null && result.getId()==id);\r\n }", "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }", "@Test\n public void testGetRoundById() {\n Game testGame = new Game();\n \n testGame.setCorrectSolution(\"1234\");\n testGame.setGameOver(false);\n gameDao.addGame(testGame);\n \n Round testRound1 = new Round();\n testRound1.setGameId(testGame.getGameId());\n testRound1.setUserGuess(\"3214\");\n testRound1.setTime(LocalDateTime.now());\n testRound1.setResult(\"RESULT\");\n testRound1 = roundDao.addRound(testRound1);\n \n Round roundBackFromDao = roundDao.getRoundById(testRound1.getRoundId());\n \n assertEquals(testRound1, roundBackFromDao);\n }", "@Test\n\tpublic void testGetID() {\n\t}", "public OnlineTest searchTest(BigInteger testId) throws UserException {\n\t\treturn null;\r\n\t}", "@Test\n public void testSelectById() {\n disciplineTest = disciplineDao.selectById(1);\n boolean result = disciplineTest.getId() == 1;\n assertTrue(result);\n }", "@Test\n\tpublic void findById() {\n\t\tICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());\n\t\tiCallsService.addCallReceived(new Call(1l));\n\t\tAssert.assertTrue(1l == iCallsService.findById(1l).getId().longValue());\n\t}", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "@Test\n\tpublic void get_usersByIdtest(){\n\t\t\n\t}", "public Data findById(Object id);", "public void testFindAccountById(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tAssert.assertEquals(id, acc.getId()) ;\n\t}", "public TestDTO selectById(Long id) {\n\t\treturn selectById(id,null);\n\t}", "@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "@Test\n public void getID() {\n\n }", "T findById(ID id) ;", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "@Transactional(readOnly = true)\n public PatientOrderTest findOne(Long id) {\n log.debug(\"Request to get PatientOrderTest : {}\", id);\n PatientOrderTest patientOrderTest = patientOrderTestRepository.findOne(id);\n return patientOrderTest;\n }", "@Test\n public void testFindUserById() {\n System.out.println(\"findUserById\");\n long userId = testUsers.get(0).getId();\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n User expResult = testUsers.get(0);\n User result = instance.findUserById(userId);\n assertEquals(expResult.getEmail(), result.getEmail());\n }", "@GetMapping(\"/type-tests/{id}\")\n @Timed\n public ResponseEntity<TypeTest> getTypeTest(@PathVariable Long id) {\n log.debug(\"REST request to get TypeTest : {}\", id);\n TypeTest typeTest = typeTestService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(typeTest));\n }", "public Test getTestByKey(Long key) throws Exception {\r\n return this.testMapper.selectByPrimaryKey(key);\r\n }", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "@Test\n public void selectById(){\n User user=iUserDao.selectById(\"158271202\");\n System.out.println(user.toString());\n }", "@Override\n\tpublic TestUnit fetchByPrimaryKey(long testUnitId) {\n\t\treturn fetchByPrimaryKey((Serializable)testUnitId);\n\t}", "@Test\n void testGetByIdUser() {\n User getUser = (User) userData.crud.getById(1);\n assertEquals(\"Kevin\", getUser.getFirstName());\n logger.info(\"Got user information for ID: \" + getUser.getId());\n }", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Test\n\tpublic void testFindUserById() throws Exception {\n\t\tSqlSession sqlSession = factory.openSession();\n\t\tUser user = sqlSession.selectOne(\"com.wistron.meal.user.findUserById\",3);\n\t\tSystem.out.println(user);\n\t\tsqlSession.close();\n\t\t\n\t}", "@Test\n public void test4FindPk() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n SpecialityDTO respuesta = dao.findPk(\"telecomunicaciones\");\n assertEquals(respuesta,spec2);\n }", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "public void testGetId(){\n exp = new Experiment(\"10\");\n assertEquals(\"getId does not work\", \"10\", exp.getId());\n }", "@Test\n public void getPostByIdTest() {\n\n\n }", "CrawlTest selectByPrimaryKey(Integer crawlId);", "@Test\n void findOne() {\n UserEntity userEntity = new UserEntity();\n userEntity.setId(1);\n userEntity.setFirstName(\"mickey\");\n userEntity.setLastName(\"mouse\");\n UserEntity save = repository.save(userEntity);\n\n // then find\n UserEntity byId = repository.getById(1);\n\n System.out.println(\"byId.getId() = \" + byId.getId());\n\n Assert.isTrue(1 == byId.getId());\n }", "@Test\n void getByIdSuccess() {\n Event retrievedEvent = (Event)genericDao.getById(2);\n assertNotNull(retrievedEvent);\n assertEquals(\"Dentist\", retrievedEvent.getName());\n }", "@Test\n @DisplayName(\"Deve obter um livro por id\")\n public void getByIdTest() {\n given(bookRepositoryMocked.findById(ID)).willReturn(Optional.of(bookSavedMocked));\n\n // When execute save\n Optional<Book> foundBook = bookService.findById(ID);\n\n // Then\n assertThat(foundBook.isPresent()).isTrue();\n assertThat(foundBook.get()).isEqualTo(bookSavedMocked);\n\n // And verify mocks interaction\n verify(bookRepositoryMocked, times(1)).findById(ID);\n }", "@Test\n public void testPersonReturn(){\n// System.out.println(\"------->\"+ mHbParam.getId());\n }", "public Integer getTestId() {\n return testId;\n }", "public List<Test> getTestByGroupId(int group_id) {\n\t\tList<Test> listTest=(List<Test>) testRepository.findAll();\n\t\tList<Test> listTestByGroupById=new ArrayList<Test>();\n\t\tSystem.out.println(group_id);\n\t\tfor(Test t:listTest)\n\t\t{\n\t\t\tif(t.getGroup_id().getGroup_id() == group_id) \n\t\t\t\tlistTestByGroupById.add(t);\n\t\t}\n\t\treturn listTestByGroupById;\n\t}", "T findById(Integer id);", "@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }", "public Test1 test1_search_for_update(long id, TeUser user) throws Exception {\n\t\t log.setLevel(Level.INFO);\n\t log.info(\"test1_search_for_update Dao started operation!\");\n\n\t\ttry{\n\n\t\t\tQuery result = entityManager.\n\t\t\tcreateNativeQuery(search_for_update_Test1,Test1.class)\n\n\t\t\t.setParameter(\"id\", id);;\n\n\t\t\tArrayList<Test1> Test1_list =\t(ArrayList<Test1>)result.getResultList();\n\n\t\t\tif(Test1_list == null){\n\n\t\t\tlog.error(\"test1_search_for_update Dao throws exception :\" + \"no Test1 found\" );\n\t\t\t}\n\t\t\tlog.info(\"Object returned from test1_search_for_update Dao method !\");\n\t\t\treturn (Test1) Test1_list.get(0);\n\n\t\t}catch(Exception e){\n\n\t\t\t//new Exception(e.toString()); // this needs to be changed\n\t\t\tlog.error(\"test1_search_for_update Dao throws exception : \"+e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\t}", "public Long getTestId() {\n return testId;\n }", "private int getTestId(String testName) {\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tStatement statement = dbConnection.createStatement();\r\n\t\t\tResultSet resultSet = statement.executeQuery(\"select id_test from tests where name = '\" + testName + \"'\");\r\n\r\n\t\t\tif (resultSet.next()) {\r\n\t\t\t\treturn resultSet.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn -1;\r\n\t}", "@Test\n public void testFindUsuario_Integer() {\n System.out.println(\"findUsuario\");\n Integer id = 1;\n String user = \"[email protected]\";\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(user);\n Usuario result = instance.findUsuario(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por usuario ha fallado\");\n }\n }", "@Test\r\n\tpublic void findByIdMaterialCategoryTest() {\r\n\t\t// Your Code Here\r\n\r\n\t}", "@Test\n public void Athlete_Test_findUser()throws Exception {\n Athlete athlete2= new Athlete();\n Athlete athlete1= new Athlete();\n athlete1.name=\"emma\";\n athlete2.name=\"jose\";\n athlete1.save();\n athlete2.save();\n String id_athlete= athlete2.findUser(\"jose\").id;\n String id_athlete2 = athlete2.id;\n assertEquals(id_athlete, id_athlete2);\n }", "@Test\n public void testFindBySsoId() {\n LOGGER.info(\"findBySsoId\");\n String ssoId = \"sam\";\n AppUser result = userRepo.findBySsoId(ssoId);\n assertNotNull(result);\n }", "@Test\r\n\tpublic void findByFileInfoID() {\n\t\tSystem.out.println(123);\r\n\t\tint file_id = 1;\r\n\t\tFileInfo f= fileInfoDao.findByFileInfoID(file_id);\r\n\t\tdd(f);\r\n\t\t\r\n\t}", "@Test\r\n\tpublic void testFindById() throws NoSuchDatabaseEntryException {\r\n\t\tQuestion q = new Question(\"Empty\", 1, 20, quizzes, null, choices);\r\n\t\tdao.create(q);\r\n\t\tassertEquals(q, dao.findById(q.getId()));\r\n\t}", "public EspecieEntity encontrarPorId(Long id ){\r\n return em.find(EspecieEntity.class, id);\r\n }", "@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }", "private DBObject getById(MongoDbServer entity, String id) throws Exception {\n MongoClient mongoClient = new MongoClient(entity.getAttribute(SoftwareProcess.HOSTNAME));\n try {\n DB db = mongoClient.getDB(TEST_DB);\n DBCollection testCollection = db.getCollection(TEST_COLLECTION);\n DBObject doc = testCollection.findOne(new BasicDBObject(\"_id\", new ObjectId(id)));\n return doc;\n } finally {\n mongoClient.close();\n }\n }", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "@Override\n\tpublic TestPoEntity selectById(Integer pk) {\n\t\treturn null;\n\t}", "@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }", "TestEnum selectByPrimaryKey(String id);", "@Test\n public void testGetId() {\n System.out.println(\"getId\");\n Reserva instance = new Reserva();\n Long expResult = null;\n Long result = instance.getId();\n assertEquals(expResult, result);\n \n }", "TestActivityEntity selectByPrimaryKey(Integer id);", "public void setTestId(Integer testId) {\n this.testId = testId;\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedUserRole = (UserRoles) genericDao.getById(2);\n assertEquals(\"all\", retrievedUserRole.getRoleName());\n assertEquals(\"fhensen\", retrievedUserRole.getUserName());\n\n assertNotNull(retrievedUserRole);\n }", "public int getTestId() {\n return this._TestId;\n }", "Tourst selectByPrimaryKey(String id);", "public abstract T byId(ID id);", "@Test\n public void testFind() {\n System.out.println(\"find\");\n int id = 0;\n Resource expResult = null;\n Resource result = Resource.find(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public Testcasemodel gettestcasebyid(String testid) {\n\t\treturn mongorepo.findByTestcaseid(testid);\n\t}", "public void testGetServiceById() {\n System.out.println(\"getServiceById\");\n EntityManager em = emf.createEntityManager();\n ServiceDaoImpl sdao = new ServiceDaoImpl(em);\n Service s = getService(\"abc\", new Long(50),\n // 5 days\n new Duration(5 * 24 * 60 * 60 * 1000));\n\n em.getTransaction().begin();\n em.persist(s);\n em.getTransaction().commit();\n\n Long id = s.getId();\n assertNotNull(id);\n assertNotNull(sdao.getServiceById(id));\n assertEquals(s, sdao.getServiceById(id));\n }", "@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }", "public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }", "E findById(K id);", "public person findbyid(int id){\n\t\t\treturn j.queryForObject(\"select * from person where id=? \", new Object[] {id},new BeanPropertyRowMapper<person>(person.class));\r\n\t\t\r\n\t}", "@Override\n public User findById(Integer id) {\n try {\n return runner.query(con.getThreadConnection(),\"select *from user where id=?\",new BeanHandler<User>(User.class),id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }", "@Test\n public void findByWrongId() throws DAOException {\n int id = 10;\n Country actual = countryDAO.findById(id);\n Assert.assertEquals(actual, null);\n }", "public abstract T findOne(int id);", "@Test\n\tpublic void findByIdTest() {\n\t\tProductPrice price = repository.findById(proudctId).get();\n\t\tlog.info(\"\"+price.getValue());\n\t\tassertThat(price.getValue()).isEqualTo(22.22);\n\t}", "@Override\n public T findById(ID id) throws SQLException {\n\n return this.dao.queryForId(id);\n\n }", "@RequestMapping(method = RequestMethod.GET,\n path = \"/{labTestId}\",\n produces = MediaType.APPLICATION_JSON_VALUE)\n public Optional<LabTest> findById(@Valid @PathVariable Long labTestId) {\n return labTestService.findLabTestById(labTestId);\n }", "@Test\n void findClientById() {\n }", "public Driver findDriverById(long id);", "@Test\n public void findById_2(){\n String firstName=\"prakash\",lastName=\"s\";\n int age=21;\n String city=\"chennai\", houseNo=\"c-1\";\n Address address1=new Address(city, houseNo);\n Employee employee1=new Employee(firstName,lastName,age,address1);\n employee1=mongo.save(employee1);\n Employee fetched=employeeService.findById(employee1.getId());\n Assertions.assertEquals(firstName, fetched.getFirstName());\n Assertions.assertEquals(lastName,fetched.getLastName());\n Assertions.assertEquals(employee1.getId(),fetched.getId());\n Assertions.assertEquals(age, fetched.getAge());\n\n }", "@Test\n public void testFindProductByID_1() throws Exception {\n System.out.println(\"findProductByID_1\");\n String id = \"1\";\n Database instance = new Database();\n instance.addProduct(1, new Product(1.0, \"\", 1));\n try{\n assertEquals(instance.findProductByID(id), new Product(1.0, \"\", 1));\n }catch(AssertionError e){\n fail(\"testFindProductByID_1 failed\");\n }\n }", "@Test\n void findByPetId_API_TEST() throws Exception {\n\n Pet pet = setupPet();\n given(petService.findByPetId(2)).willReturn(Optional.of(pet));\n mvc.perform(get(\"/owners/*/pets/2\").accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(content().contentType(\"application/json\"))\n .andExpect(jsonPath(\"$.id\").value(2))\n .andExpect(jsonPath(\"$.name\").value(\"Daisy\"));\n }", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public void testFindAuthorByID() {\r\n //given\r\n System.out.println(\"findAuthorByID\");\r\n int authorID = 18;\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n \r\n //when\r\n Author result = instance.findAuthorByID(authorID);\r\n \r\n //then\r\n assertEquals(\"Maksim Gorky\", result.getName()); \r\n }", "@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }" ]
[ "0.76901925", "0.72106564", "0.71399695", "0.71399695", "0.71209157", "0.7085104", "0.7021825", "0.69553775", "0.6930199", "0.6809799", "0.6809799", "0.67970234", "0.67852306", "0.67564297", "0.67528576", "0.6673482", "0.66646886", "0.66033196", "0.65966195", "0.6590704", "0.65603703", "0.65325266", "0.65211535", "0.6511403", "0.65024424", "0.649969", "0.6474789", "0.6460896", "0.6435603", "0.6434176", "0.6418494", "0.64170694", "0.63945323", "0.63902014", "0.6378446", "0.63707113", "0.63603944", "0.63428843", "0.6338482", "0.63295865", "0.6314344", "0.6307879", "0.6301675", "0.62835157", "0.6281392", "0.627296", "0.62700623", "0.62654537", "0.6256925", "0.6219141", "0.62164694", "0.62084466", "0.62005967", "0.61800647", "0.6179919", "0.6173793", "0.617372", "0.6173657", "0.6166577", "0.6162319", "0.6147188", "0.61398095", "0.6133058", "0.61141205", "0.6113648", "0.6109655", "0.6104242", "0.6103637", "0.61014813", "0.6098124", "0.609624", "0.60911644", "0.6086686", "0.60667163", "0.60569227", "0.60541266", "0.60491735", "0.60441244", "0.60439646", "0.60405385", "0.6038592", "0.6023185", "0.6013571", "0.60081303", "0.6007597", "0.600406", "0.59963334", "0.5995278", "0.59879786", "0.59846395", "0.5974504", "0.5967924", "0.59657186", "0.59633726", "0.5958562", "0.595713", "0.5945323", "0.59421957", "0.59293365", "0.59274673" ]
0.7645582
1
/ This method is used to fetch All test
@Override public List<TestEntity> fetchAll() { List<TestEntity> tests = testDao.findAll(); return tests; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<MedicalTest> fetchAllTest() {\n\t\tList<MedicalTest> list = testDao.findAll();\n\t\treturn list;\n\t}", "@Test\n public void selectAll(){\n }", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "@Test\n public void listAll_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n List<Workflow> wfList = new ArrayList<>();\n wfList.add(addMOToDb(1));\n wfList.add(addMOToDb(2));\n wfList.add(addMOToDb(3));\n\n // PREPARE THE TEST\n // Fill in the workflow db\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n List<Workflow> readWorkflowList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(wfList.size(), readWorkflowList.size());\n for (int i = 0; i < wfList.size(); i++) {\n assertEquals(wfList.get(i).getId(), readWorkflowList.get(i).getId());\n assertEquals(wfList.get(i).getName(), readWorkflowList.get(i).getName());\n assertEquals(wfList.get(i).getDescription(), readWorkflowList.get(i).getDescription());\n }\n\n\n }", "@Test\n public void testSelectAll() {\n }", "@Test\n public void testSelectAll() throws Exception {\n\n }", "@Test\r\n public void testFindAll() throws Exception {\r\n }", "@Test\r\n public void testListAll() {\r\n System.out.println(\"listAll\");\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n String expResult = \"\";\r\n String result = instance.listAll();\r\n System.out.println(result);\r\n }", "@Test\n void getAllSuccess() {\n List<RunCategory> categories = dao.getAll();\n assertEquals(13, categories.size());\n }", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "public List<Test> getAllRecord() {\n\t\tList<Test> lis=(List<Test>)testRepository.findAll();\n\t\treturn lis;\n\t}", "@Test\n public void test_getAll_1() throws Exception {\n clearDB();\n\n List<User> res = instance.getAll();\n\n assertEquals(\"'getAll' should be correct.\", 0, res.size());\n }", "@Test \n\t public void testRetrieveAll(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t\tQuery mockQuery = mock(Query.class);\n\t\t\t\twhen(entityManager.createQuery(Mockito.anyString())).thenReturn(mockQuery);\n\t\t\t\twhen(mockQuery.getResultList()).thenReturn(users);\n\t\t\t\tList<Users> loadedUsers = (List<Users>)userDao.retrieveAll();\n\t\t\t\tassertNotNull(loadedUsers);\n\t\t\t\tassertTrue(loadedUsers.size() > 1);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveAll:.\",se);\n\t\t }\n\t }", "@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }", "@Test\n void testGetAllUsers() {\n List<User> users = userData.crud.getAll();\n int currentSize = users.size();\n assertEquals(currentSize, users.size());\n logger.info(\"Got all users\");\n }", "@Test\n public void testQueryList(){\n }", "@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }", "@Test\r\n public void testGetALL() {\r\n CategoriaDAO instance = new CategoriaDAO();\r\n List<Categoria> result = instance.getALL();\r\n Categoria itera = new Categoria();\r\n Iterator it = result.iterator();\r\n while (it.hasNext()) {\r\n itera = (Categoria) it.next();\r\n System.out.println(itera.getIdcategoria() + \" \" + itera.getDescricao());\r\n }\r\n }", "@Test\r\n public void testSelectAll() {\r\n System.out.println(\"AbonentDAL selectAll\");\r\n AbonentDAL instance = new AbonentDAL();\r\n List<Abonent> result = instance.selectAll();\r\n assertTrue(result!=null && result.size()>0);\r\n }", "@Test\n\t\tpublic void testGetAllMedicalAct() {\n\t\t\tfor (int i =0; i<10;i++){\n\t\t\t assertEquals(wraRestServer.listMedicalAct().get(i).getId(),medicalActDao.getAll().get(i).getId());\n\t\t}\n\t\t\t\n\t}", "@Test\n void getAllSuccess() {\n List<User> Users = dao.getAll();\n assertEquals(2, Users.size());\n }", "@Test\n\t\tpublic void testGetAllOrganization() {\n\t\t\tfor (int i =0; i<10;i++){\n\t\t\t assertEquals(wraRestServer.listOrganization().get(i).getSiret(),organizationDao.getAll().get(i).getSiret());\n\t\t}\n\t\t\n\t\n\t}", "@Test\n\tpublic void testFindAll() {\n\n\t\tList<UserInfo> result = this.userinfoDao.findAll();\n\n\t}", "@Test\n void getAllSuccess() {\n List<Event> events = genericDao.getAll();\n assertEquals(5, events.size());\n }", "@SmallTest\n public void testAll() {\n int result = this.adapter.getAll().size();\n int expectedSize = this.nbEntities;\n Assert.assertEquals(expectedSize, result);\n }", "@Test\n void getAllSuccess(){\n\n List<CompositionInstrument> compositionInstruments = genericDao.getAll();\n assertEquals(4, compositionInstruments.size());\n }", "@Test\n void getAllSuccess() {\n // get all the users\n // make sure there are the proper number of users\n List<User> users = genericDao.getAll();\n assertEquals(users.size(), 4);\n }", "@Test\n void displayAllTasks() {\n }", "@Test\n\tpublic void testGetAllPatient() {\n\t\tfor (int i =0; i<10;i++){\n\t\t assertEquals(wraRestServer.listPatient().get(i).getId(),patientDao.getAll().get(i).getId());\n\t}\n\t}", "@Test\n public void testGetAllUsers() {\n }", "@Test\n void retrieveAllTest() {\n boolean check1 = false;\n boolean check2 = false;\n List<Admin> adminList = adminJpa.retrieveAll();\n for (Admin anAdmin : adminList) {\n String email = anAdmin.getEmail();\n if (email.equals(\"[email protected]\"))\n check1 = true;\n if (email.equals(\"[email protected]\"))\n check2 = true;\n }\n assertTrue(check1);\n assertTrue(check2);\n }", "@Test\r\n void getAllUsers() throws IOException {\r\n }", "@Test\n public void getAllTest() {\n Mockito.when(this.repo.findAll()).thenReturn(publisherList);\n Iterable<Publisher> resultFromService = this.publisherService.findAll();\n Publisher resultFromIterator = resultFromService.iterator().next();\n assertThat(resultFromIterator.getName()).isEqualTo(\"What The What\");\n Mockito.verify(this.repo, Mockito.times(1)).findAll();\n }", "@Override\n public void testGetAllObjects() {\n }", "@Test\n public void findAll() throws Exception {\n }", "@Test\n public void getAllRecordsTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resum2\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet1\");\n fileMetaData.setFileName(\"resume3\");\n fileMetaData.setDescription(\"Attached resume to test upload1\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n List<FileMetaData> fileMetaDataList = fileMetaDataRepository.findAll();\n Assert.assertNotNull(fileMetaDataList);\n //Assert.assertEquals(2, fileMetaDataList.size());\n }", "@Test\r\n public void testA0Get_0args() {\r\n System.out.println(\"get all\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.get();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Test\n public void selectAll() {\n List<ProductCategory>productCategories=categoryService.selectAll();\n for (ProductCategory productCategory:productCategories\n ) {\n System.out.println(productCategory);\n }\n }", "@Test\r\n public void testGetAllFestivities() {\r\n System.out.println(\"getAllFestivities\");\r\n List<Festivity> result = Database.getAllFestivities();\r\n assertTrue(result.size() > 0 );\r\n }", "@Test\r\n public void testGetAllChromInfo() throws Exception {\n assertEquals(7, queries.getAllChromInfo().size());\r\n }", "@Test\n public void testGetAll() {\n List<Allocation> cc = allocationCollection.getAll();\n assertNotNull(cc);\n assertFalse(cc.isEmpty());\n }", "@Test\n public void testFindall() {\n\n System.out.println(\"findall\"); \n PrioridadRest rest = mokPrioridadRest;\n List<Prioridad> result = rest.findall();\n Prioridad prioridad = new Prioridad(1, \"1\");\n assertThat(result, CoreMatchers.hasItems(prioridad));\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "@Test\n\tvoid testAllUsersDataPresent() {\n\t\tassertNotNull(allUserList);\n\t\tassertTrue(allUserList.size() == 1000);\n\t}", "@GetMapping(\"/findAll\")\n public List<LabTest> findAll(){\n return labTestService.getLabTests();\n }", "@Test\n void getAllSuccess() {\n List<UserRoles> roles = genericDAO.getAll();\n assertEquals(3, roles.size());\n }", "@Test\n void getAllUserRolesSuccess() {\n List<UserRoles> userRoles = genericDao.getAll();\n //assert that you get back the right number of results assuming nothing alters the table\n assertEquals(6, userRoles.size());//\n log.info(\"get all userRoles test: all userRoles;\" + genericDao.getAll());\n }", "public void testGetAllTitles() {\r\n System.out.println(\"getAllEmployees\");\r\n List expResult = null;\r\n List result = TitleDao.getAllTitles();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testFindAllPassengers() {\n System.out.println(\"findAllPassengers\");\n PassengerHandler instance = new PassengerHandler();\n ArrayList<Passenger> expResult = new ArrayList();\n for(int i = 1; i < 24; i++){\n Passenger p = new Passenger();\n p.setPassengerID(i);\n p.setForename(\"Rob\");\n p.setSurname(\"Smith\");\n p.setDOB(new Date(2018-02-20));\n p.setNationality(\"USA\");\n p.setPassportNumber(i);\n expResult.add(p);\n }\n \n ArrayList<Passenger> result = instance.findAllPassengers();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic List<TestDTO> getTest() {\n\t\t\n\t\t\n\t\treturn sessionTemplate.selectList(\"get_test\");\n\t}", "@Test\n public void testConsultarTodos() throws Exception {\n System.out.println(\"testConsultarTodos\");\n List<ConfiguracaoTransferencia> result = instance.findAll();\n assertTrue(result != null && result.size() > 0);\n }", "public void testGetAllActivitiesDataSource()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tint categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\thelper.insertNewItem(categoryId, \"item1\", true, 1);\n\t\thelper.insertNewItem(categoryId, \"item2\", true, 2);\n\t\thelper.insertNewItem(categoryId, \"item3\", false, 3);\n\n\t\t// Act & Assert\n\t\tActivitiesDataSource dataSource = service.getActivitiesWithChildren(null, true);\n\n\t\tassertNotNull(dataSource);\n\t\tassertEquals(\"testlist\", dataSource.getActivity(listId).getName());\n\n\t\tActivityBean act = dataSource.getActivity(listId);\n\n\t\tassertEquals(\"dudus\", act.getCategory(categoryId).getName());\n\n\t\tCategoryBean cat = act.getCategory(categoryId);\n\n\t\tassertEquals(3, cat.getEntries().size());\n\t}", "@Test\n public void test_all() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_all_req.xml\",\n \"PWDDIC_testSearch_all_res.xml\");\n }", "@Test()\n public void testGetExpensesByTypeAll() {\n\tString type = \"all types\";\n\tList<Expense> expensesForDisplay = expenseManager.getExpensesByType(type);\n\tassertEquals(4, expensesForDisplay.size(), 0);\n }", "@Test\n public void testAll() throws ParseException {\n testCreate();\n testExists(true);\n testGetInfo(false);\n testUpdate();\n testGetInfo(true);\n testDelete();\n testExists(false);\n }", "@GetMapping(value = \"/listTest\")\n public List<Test> listTest() {\n return testService.findAll();\n }", "@Test\n public void testFindAll() {\n final WebTarget target = target().\n path(\"category\");\n\n Response response = target.request(MediaType.APPLICATION_JSON_TYPE).get();\n\n assertEquals(200, response.getStatus());\n List<Category> categories = response.readEntity(new GenericType<List<Category>>() {});\n assertTrue(categories.size() > 0);\n \n response = target.request(MediaType.APPLICATION_XML_TYPE).get();\n assertEquals(200, response.getStatus());\n }", "@Test\n void getAllOrdersSuccess() {\n List<Order> orders = dao.getAllOrders();\n assertEquals(3, orders.size());\n }", "public final void generateAll() {\n ConsoleUtils.display(\">> Generate Rest test...\");\n\n List<IUpdater> updaters = this.getAdapter().getRestUpdatersTest();\n this.processUpdater(updaters);\n\n Iterable<EntityMetadata> entities =\n this.getAppMetas().getEntities().values();\n\n for (final EntityMetadata entity : entities) {\n if (entity.getOptions().containsKey(\"rest\") \n && !entity.isInternal() \n && !entity.getFields().isEmpty()) {\n\n ConsoleUtils.display(\">>> Generate Rest test for \" \n + entity.getName());\n\n this.getDatamodel().put(\n TagConstant.CURRENT_ENTITY, entity.getName());\n\n updaters = this.getAdapter()\n .getRestEntityUpdatersTest(entity);\n this.processUpdater(updaters);\n }\n }\n }", "@Test\n public void listAll_404() throws Exception {\n\n // PREPARE THE DATABASE\n // No data needed in database\n\n // PREPARE THE TEST\n // No preparation needed\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(204, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }", "@Override\n\tpublic List<TestUnit> findAll() {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "@Test\n @Transactional\n public void testGetAllQuestions() {\n when(questionRepository.findAll()).thenReturn(Arrays.asList(createNewQuestion()));\n List<GetQuestionsResponseDto> getQuestionResponseDto = questionService.getAllQuestions();\n assertTrue(getQuestionResponseDto.size() > 0);\n assertEquals(\"Author1\", getQuestionResponseDto.get(0).getAuthor());\n assertEquals(\"Message1\", getQuestionResponseDto.get(0).getMessage());\n assertEquals(Long.valueOf(0), getQuestionResponseDto.get(0).getReplies());\n assertEquals(Long.valueOf(1), getQuestionResponseDto.get(0).getId());\n }", "@Test\n public void findAll() throws Exception {\n\n MvcResult result = mockMvc.perform(get(\"/v1/chamados\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n List<ChamadoDTO> chamados = asList(objectMapper.readValue(result.getResponse().getContentAsString(), ChamadoDTO[].class));\n for (ChamadoDTO c : chamados) {\n assertNotNull(c.getIdChamado());\n assertNotNull(c.getDescChamado());\n assertNotNull(c.getDescTituloChamado());\n assertNotNull(c.getStatusChamado());\n assertNotNull(c.getStatusChamado().getCodStatusChamado());\n assertNotNull(c.getStatusChamado().getDescStatusChamado());\n assertNotNull(c.getDataHoraInclusao());\n }\n }", "@Test\n public void testFindAll_Event_Job() {\n // more or less tested in testFindEntity_Event_Job()\n }", "@Test\r\n\tpublic void testFindAllApplication() {\r\n\t\twhen(backgroundVerificationAndLeaseAdminRepository.findAll()).thenReturn(StringList);\r\n\t\tList<Backgroundverification> StringList1 = backgroundVerificationAndLeaseAdmnServiceImpl.findAllApplications();\r\n\r\n\t\tassertEquals(6, StringList1.size());\r\n\t}", "@Test\n public void testFindAllStudents() throws Exception {\n List<Students> list = cs.findAllStudents();\n for (Students stu :\n list) {\n System.out.println(stu);\n }\n }", "@Test\n public void testFindAll() {\n List<Item> items = repository.findAll();\n assertEquals(3, items.size());\n }", "@Test\n public void testFindAll_Person_TimeSlot() {\n // more or less tested in testFindEntity_Person_TimeSlot()\n }", "@Test\n public void testGetAllObjects() \n throws InvalidParametersException, DelegateException {\n // Query all the objects.\n List<BsLocusDetail> objects = delegate.getAllObjects(100);\n assertTrue(\"Couldn't create list\", objects != null);\n // The list should not be empty.\n assertTrue(\"List of all objects empty\", objects.size() != 0);\n }", "@org.junit.Test\r\n public void listAll() throws Exception {\r\n System.out.println(\"listAll\");\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n int size1 = service.listAll().size();\r\n assertEquals(size1, 0);\r\n service.insertReview(review);\r\n int size2 = service.listAll().size();\r\n assertEquals(size2, 1);\r\n }", "@Test\n\t \t\n\t public void listAll() {\n\t \n\t List<Persona> list = personaDao.listPersons();\n\t \n\t Assert.assertNotNull(\"Error listado\", list);\n\n\t }", "@Test\n public void testGetUsersList() {\n System.out.println(\"getUsersList\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick0\", \"[email protected]\"));\n expResult.add(new User(\"nick1\", \"[email protected]\"));\n expResult.add(new User(\"nick2\", \"[email protected]\"));\n expResult.add(new User(\"nick3\", \"[email protected]\"));\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n expResult.add(new User(\"nick5\", \"[email protected]\"));\n expResult.add(new User(\"nick6\", \"[email protected]\"));\n expResult.add(new User(\"nick7\", \"[email protected]\"));\n expResult.add(new User(\"nick8\", \"[email protected]\"));\n expResult.add(new User(\"nick9\", \"[email protected]\"));\n\n Set<User> result = sn10.getUsersList();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void selectAllFromCourseTable() {\n\t\tList arrayList = em.createNamedQuery(\"query_get_all_courses\").getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c -> {}\", arrayList);\n\t}", "@Test\r\n\tpublic void listAllTransformer() throws Exception {\r\n\t\t\r\n\t\ttr.deleteAll();\r\n\t\ttr.save(new Transformer( null, \"Soundwave\", Team.DECEPTICON, 8, 9, 2, 6, 7, 5, 6, 10));\r\n\t\ttr.save(new Transformer( null, \"Hubcap\", Team.AUTOBOT, 4,4,4,4,4,4,4,4));\r\n\t\ttr.save(new Transformer( null, \"Bluestreak\", Team.AUTOBOT, 6,6,7,9,5,2,9,7));\r\n\t\ttr.save(new Transformer( null, \"Soundwave\", Team.DECEPTICON, 1, 1, 1, 1, 1, 1, 1, 1));\r\n\t\ttr.save(new Transformer( null, \"Foo\", Team.DECEPTICON, 1, 1, 1, 1, 1, 1, 1, 1));\r\n\t\t\r\n\t\tmockMvc.perform(get(\"/transformers/\" ))\r\n\t\t\t\t.andExpect(status().isOk())\r\n\t\t\t\t.andExpect(content().contentTypeCompatibleWith(\"application/json\"))\r\n\t\t\t\t.andExpect(jsonPath(\"$\").isArray())\r\n\t\t\t\t.andExpect(jsonPath(\"$\" , hasSize(5)))\r\n\t\t\t\t;\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testGetAllPharmacies() throws Exception {\n System.out.println(\"getAllPharmacies\");\n\n ManagePharmaciesController instance = new ManagePharmaciesController();\n LinkedList<PharmacyDTO> expResult= new LinkedList<>();\n LinkedList<PharmacyDTO> result = instance.getAllPharmacies();\n expResult.add(getPharmacyDTOTest(\"a\"));\n expResult.add(getPharmacyDTOTest(\"b\"));\n expResult.add(getPharmacyDTOTest(\"c\"));\n\n LinkedList<Pharmacy> resultDB = new LinkedList<>();\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"a\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"b\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"c\")));\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n when(db.getAllPharmacies()).thenReturn(resultDB);\n result = instance.getAllPharmacies();\n Assertions.assertEquals(result.size(), expResult.size());\n Assertions.assertEquals(result.get(0).getName(), expResult.get(0).getName());\n Assertions.assertEquals(result.get(1).getName(), expResult.get(1).getName());\n Assertions.assertEquals(result.get(2).getName(), expResult.get(2).getName());\n \n// int i = 0;\n// for(PharmacyDTO p : result){\n// Assertions.assertEquals(p.getName(), expResult.get(i).getName());\n// i++;\n// }\n \n when(db.getAllPharmacies()).thenReturn(null);\n Assertions.assertNull(instance.getAllPharmacies());\n }", "@Test\n void allBooks() {\n\n }", "@Test\n\tpublic void findAll() {\n\t\tList<Farm> list = (List<Farm>) farmRepository.findAll();\n\n\t\tSystem.out.println(\"info:\"+ list);\n\t\tassert(true);\n\n\t}", "@Test\n public void testGetAllOrders() throws Exception {\n }", "@Test\n public void getAllRecipes_ReturnsList(){\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n assertNotEquals(\"getAllRecipes - Non-empty List Returned\", 0, allRecipes.size());\n }", "@Test\n public void testFindAll()\n {\n final List<Invoice> invoices = invoiceRepository.findAll();\n\n Assert.assertFalse(invoices.isEmpty());\n\n for (final Invoice invoice : invoices)\n {\n Assert.assertNotNull(invoice.getDate());\n Assert.assertNotNull(invoice.getID());\n Assert.assertNotNull(invoice.getTotal());\n }\n }", "@Test\n public void findAll() {\n // SalesRep:\n List<SalesRep> salesRepList = salesRepRepository.findAll();\n assertEquals(2, salesRepList.size());\n assertEquals(\"Pepe\", salesRepList.get(0).getName());\n // Leads:\n List<Lead> leadList = leadRepository.findAll();\n assertEquals(3, leadList.size());\n assertEquals(\"María\", leadList.get(0).getName());\n // Opportunities:\n List<Opportunity> opportunityList = opportunityRepository.findAll();\n assertEquals(3, opportunityList.size());\n assertEquals(5, opportunityList.get(0).getQuantity());\n // Account:\n List<Account> accountList = accountRepository.findAll();\n assertEquals(2, accountList.size());\n assertEquals(20, accountList.get(0).getEmployeeCount());\n }", "@Test\n\tpublic void testQueryPage() {\n\n\t}", "@Test\n public void sTest(){\n List<Account> accounts = as.findAllAccount ();\n for (Account account : accounts) {\n System.out.println (account);\n }\n }", "public static void runAllTests() {\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL());\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL(new String [] {\"100\"}));\n\t}", "@Test\n public void getBatchTest() {\n String token = null;\n // List<BatchReturn> response = api.getBatch(token);\n\n // TODO: test validations\n }", "@Test\n public void test18() {\n\n List<Integer> services = response.extract().path(\"data.findAll{it.name=='Fargo'}.zip\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" + services);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "void testCanGetList();", "@Test\n\tpublic void testGetAllCompaniesApi() {\n\t\tCompany company = new Company(\"DataSolutions1\", \"Marthahalli1\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompany = companyRepository.save(company);\n\n\t\tCompany company1 = new Company(\"DataSolutions2\", \"Marthahalli2\",\n\t\t\t\t\"Chennai\", \"India\", \"9882440671\");\n\t\tcompany1 = companyRepository.save(company1);\n\n\t\t// Invoke the API\n\t\tCompany[] apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\", Company[].class);\n\n\t\tassertEquals(2, apiResponse.length);\n\n\t\t// Delete the test data created\n\t\tcompanyRepository.delete(company.getCompanyId());\n\t\tcompanyRepository.delete(company1.getCompanyId());\n\t}", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "public void listRunningTests() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"List of running tests in the framework.\\n\");\r\n\t\tlog.info(HEADER);\r\n\t\tlog.info(\"S.No\\tTest\");\r\n\t\tlog.info(HEADER);\r\n\t\tint i = 1;\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tlog.info(String.format(\"%d.\\t%s\\n\", i++, test));\r\n\t\t}\r\n\t}", "private void loadTestData() {\n try(Realm r = Realm.getDefaultInstance()) {\n r.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n PromotionsResponseDto promotionsResponseDto =\n PromotionsApiFactory.gson().fromJson(TEST_ANF_FULL_RESPONSE, PromotionsResponseDto.class);\n for(PromotionDto promotionDto : promotionsResponseDto.getPromotions()) {\n Promotion promotion = Promotion.fromDto(promotionDto);\n r.copyToRealm(promotion);\n }\n }\n });\n }\n }", "public List<TestHead> getList() {\n List<TestHead> result;\n Session session = SessionFactoryHelper.getOpenedSession();\n session.beginTransaction();\n result = session.createQuery(\"from TestHead\", TestHead.class).list();\n session.getTransaction().commit();\n session.close();\n return result;\n }", "@Test\n public void testGetAllProduct() throws Exception {\n System.out.println(\"getAllProduct\");\n prs = dao.getAllProduct();\n \n assertArrayEquals(products.toArray(), prs.toArray());\n }", "@Test\n\tpublic void testGetAllQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getAllQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(5, questions.size());\n\t\tAssert.assertTrue(questions.contains(tdp.question1_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question3_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question4_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question5_location1));\n\t}", "@Test\n public void test2(){\n\n List<FitActivity> upper = fitActivityRepository.findAllByBodyPart(\"Upper\");\n for (FitActivity fitActivity : upper) {\n System.out.println(fitActivity.getName());\n\n }\n\n }", "@Test\n\t// @Disabled\n\tvoid testViewAllCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tom\", \"son\", \"951771122\", \"[email protected]\");\n\t\tCustomer customer2 = new Customer(2, \"jerry\", \"lee\", \"951998122\", \"[email protected]\");\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tcustomerList.add(customer2);\n\t\tMockito.when(custRep.findAll()).thenReturn(customerList);\n\t\tList<Customer> customer = custService.findAllCustomer();\n\t\tassertEquals(2, customer.size());\n\t}", "@Test\r\n\tpublic void findAllMaterialCategoryTest() {\r\n\t\t// Your Code Here\r\n\r\n\t}", "@Test\r\n\tpublic void test_getAllEmployees() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t// .pathParam(\"page\", \"0\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(0))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}", "@Test\n public void fetchAll() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"entity\\\": \\\"collection\\\",\\n\" +\n \" \\\"count\\\": 1,\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": \\\"rfnd_FFX6AnnIN3puqW\\\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 88800,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FFX5FdEYx8jPwA\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Issuing an instant refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {},\\n\" +\n \" \\\"created_at\\\": 1594982363,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"optimum\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n List<Refund> fetch = refundClient.fetchAll();\n assertNotNull(fetch);\n assertTrue(fetch.get(0).has(\"id\"));\n assertTrue(fetch.get(0).has(\"entity\"));\n assertTrue(fetch.get(0).has(\"amount\"));\n assertTrue(fetch.get(0).has(\"currency\"));\n assertTrue(fetch.get(0).has(\"payment_id\"));\n String fetchRequest = getHost(Constants.REFUNDS);\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "@Override\n\tpublic List<TestPoEntity> findAll() {\n\t\treturn null;\n\t}" ]
[ "0.7595585", "0.7553384", "0.7381555", "0.7377014", "0.72051936", "0.7113154", "0.70983684", "0.7072542", "0.7024504", "0.7014967", "0.699271", "0.69911265", "0.6990586", "0.6985982", "0.69840676", "0.69761395", "0.69667166", "0.6958419", "0.69359326", "0.6912093", "0.688343", "0.68524224", "0.6821238", "0.6815212", "0.6812923", "0.6807088", "0.68047285", "0.68026555", "0.67640585", "0.6758302", "0.6758301", "0.67565876", "0.6737687", "0.6726687", "0.6724101", "0.6703263", "0.6692731", "0.66915613", "0.6643706", "0.66079897", "0.6603159", "0.6589762", "0.65670854", "0.6564976", "0.65511787", "0.65449", "0.65357894", "0.65356684", "0.6528783", "0.6516287", "0.651054", "0.6508967", "0.6506998", "0.6494757", "0.64638925", "0.6446834", "0.642131", "0.64103734", "0.6409383", "0.6402182", "0.639464", "0.6387134", "0.63702476", "0.6364046", "0.63528824", "0.63528293", "0.6350403", "0.6337168", "0.6329307", "0.6327099", "0.632511", "0.6302862", "0.6290641", "0.6284765", "0.6282481", "0.62747985", "0.6274658", "0.6267221", "0.6267027", "0.6247628", "0.62417203", "0.6235232", "0.62312007", "0.62295437", "0.6229023", "0.6228476", "0.622751", "0.6223838", "0.62231153", "0.6221891", "0.6210049", "0.6203369", "0.6201849", "0.62015754", "0.6195203", "0.6195128", "0.6191517", "0.61914414", "0.6191276", "0.61852807" ]
0.7865265
0
/ access modifiers changed from: packageprivate
public final void a(AMapNaviCross aMapNaviCross) { try { if (this.A && this.U) { this.ah = true; if (this.T) { if (this.f != null) { this.f.setVisibility(0); this.f.setIntersectionBitMap(aMapNaviCross); } c(true); } } } catch (Throwable th) { mj.a(th); rx.c(th, "BaseNaviView", "showCross"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo23813b() {\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo2740a() {\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}", "private NativeSupport() {\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.7152354", "0.66870445", "0.6557956", "0.64830303", "0.64306164", "0.63853925", "0.6384864", "0.63484466", "0.6330916", "0.62771153", "0.6263446", "0.6251191", "0.623744", "0.6234031", "0.62294084", "0.6198601", "0.6198601", "0.619552", "0.61842144", "0.61809874", "0.61573476", "0.6153497", "0.6152576", "0.6117015", "0.6109547", "0.6108387", "0.60887784", "0.6082723", "0.6073469", "0.60706985", "0.60562694", "0.60562575", "0.60559225", "0.60531056", "0.6050733", "0.60479873", "0.6045513", "0.6038094", "0.6023796", "0.6023796", "0.6023796", "0.6023796", "0.60206586", "0.60202146", "0.60190946", "0.60176116", "0.6006372", "0.6002703", "0.5999305", "0.5999144", "0.5997215", "0.59963655", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.59910274", "0.59878075", "0.59878075", "0.5985066", "0.5983375", "0.5973787", "0.5959142", "0.5958575", "0.59531504", "0.5951894", "0.5947825", "0.59468997", "0.59448934", "0.5942682", "0.5940769", "0.59384227", "0.59382755", "0.5926339", "0.5926243", "0.5926243", "0.59256226", "0.5913768", "0.5910571", "0.59055513", "0.5905238", "0.590443", "0.5899911", "0.589717", "0.5894518", "0.58944243", "0.5890848", "0.58823144", "0.58785427", "0.5878036", "0.5876826", "0.5876161", "0.58741283", "0.5866971", "0.58668786", "0.58668786", "0.5865463", "0.58651894" ]
0.0
-1
/ access modifiers changed from: packageprivate
public final void b() { try { if (this.f != null) { if (this.U && this.f.getVisibility() == 0) { g(); this.f.setVisibility(8); this.f.recycleResource(); c(false); } this.ah = false; } } catch (Throwable th) { mj.a(th); rx.c(th, "BaseNaviView", "hideCross"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo30696a();", "public abstract void mo42329d();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71507126", "0.66852754", "0.6558074", "0.6482426", "0.64311445", "0.638545", "0.63839656", "0.63482744", "0.63302624", "0.6277197", "0.62635255", "0.6250569", "0.62368745", "0.6233547", "0.6228953", "0.6197293", "0.6197293", "0.6194772", "0.6184139", "0.6180766", "0.61573917", "0.6152649", "0.6152198", "0.6116647", "0.61093503", "0.6108619", "0.60879374", "0.60821515", "0.60723346", "0.6068983", "0.60565233", "0.60564804", "0.605594", "0.6050983", "0.60498387", "0.60470885", "0.60436356", "0.603736", "0.60237354", "0.60237354", "0.60237354", "0.60237354", "0.6019666", "0.60196143", "0.6018301", "0.601686", "0.60056096", "0.600329", "0.5999082", "0.5997544", "0.59962994", "0.5995191", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991282", "0.5987402", "0.5987402", "0.5984476", "0.59827936", "0.5973211", "0.5958472", "0.5957542", "0.5953589", "0.59519774", "0.594738", "0.59457314", "0.59445536", "0.5942774", "0.5940164", "0.5938114", "0.5938083", "0.5926483", "0.59255004", "0.59255004", "0.5925304", "0.5914172", "0.5909818", "0.59050065", "0.59049857", "0.5904506", "0.5899379", "0.5896449", "0.5894286", "0.58935714", "0.5890183", "0.58829314", "0.58781534", "0.58774024", "0.58768195", "0.5875799", "0.5873635", "0.5867603", "0.5867603", "0.5866908", "0.58663774", "0.58619076" ]
0.0
-1
/ access modifiers changed from: packageprivate
public final void c() { try { if (this.V && this.af != null) { this.aj = null; this.af.remove(); this.af.setVisible(false); this.af = null; c(false); } this.ai = false; } catch (Throwable th) { mj.a(th); rx.c(th, "BaseNaviView", "hideModeCross"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "private OMUtil() { }", "public abstract void mo27464a();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71513015", "0.6686406", "0.6558315", "0.6482832", "0.6430476", "0.63856333", "0.63838816", "0.63487375", "0.6330605", "0.62764114", "0.626384", "0.62509346", "0.6237325", "0.62340367", "0.6228612", "0.6197973", "0.6197973", "0.61952", "0.6183631", "0.61797863", "0.6157397", "0.6152618", "0.61521906", "0.6116792", "0.61100185", "0.61080855", "0.6088319", "0.6082373", "0.6072587", "0.60691696", "0.60570836", "0.60564214", "0.6056027", "0.60505396", "0.6050144", "0.60472345", "0.6044647", "0.6036982", "0.6024398", "0.6024398", "0.6024398", "0.6024398", "0.6020334", "0.60201526", "0.6018423", "0.6016204", "0.6005956", "0.6002279", "0.5999404", "0.59974486", "0.59964895", "0.5995736", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.599113", "0.5987661", "0.5987661", "0.5984926", "0.5983099", "0.5973421", "0.59589046", "0.5958243", "0.5953439", "0.59510964", "0.59475076", "0.5946366", "0.5943994", "0.59424007", "0.59403396", "0.5937576", "0.59374106", "0.5926433", "0.59263766", "0.59263766", "0.5925841", "0.5913479", "0.5910542", "0.59044325", "0.5904201", "0.59039", "0.58995575", "0.58967894", "0.5894089", "0.58939654", "0.58905286", "0.5882918", "0.58785903", "0.58777314", "0.5876467", "0.5876147", "0.587332", "0.58671093", "0.58671093", "0.58666575", "0.5866619", "0.58632815" ]
0.0
-1
/ access modifiers changed from: packageprivate
public final void a(boolean z2, boolean z3) { try { if (this.E != null) { int i2 = z2 ? 1 : this.L ? 2 : 3; if (i2 != this.F) { this.F = i2; if (this.c != null) { Message obtain = Message.obtain(); obtain.what = 11; obtain.arg1 = this.F; this.c.sendMessage(obtain); } } if (this.T != z2 && !this.z) { for (AMapNaviViewListener aMapNaviViewListener : this.E) { try { aMapNaviViewListener.onLockMap(z2); } catch (Throwable th) { th.printStackTrace(); } } } } if (!this.z) { this.T = z2; this.c.removeMessages(0); if (z2) { b(false); } else { g(); if (z3) { this.c.sendEmptyMessageDelayed(0, this.S); } } this.R.c(z2); if (this.s != null) { this.s.setVisibility(!z2 ? 0 : 8); } if (this.t != null && this.a.isRouteListButtonShow()) { this.t.setVisibility(!z2 ? 0 : 8); } d(this.a.isTrafficBarEnabled()); if (z2) { if (this.ah && this.f != null) { this.f.setVisibility(0); this.ag = true; } if (this.ai && this.af != null) { this.af.setVisible(true); this.ag = true; return; } return; } if (this.f != null && this.f.getVisibility() == 0) { this.f.setVisibility(8); } if (this.af != null) { this.af.setVisible(false); } this.ag = false; } } catch (Throwable th2) { mj.a(th2); rx.c(th2, "BaseNaviView", "setCarLock(boolean isLock, boolean autoRestore)"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "private OMUtil() { }", "public abstract void mo27464a();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71513015", "0.6686406", "0.6558315", "0.6482832", "0.6430476", "0.63856333", "0.63838816", "0.63487375", "0.6330605", "0.62764114", "0.626384", "0.62509346", "0.6237325", "0.62340367", "0.6228612", "0.6197973", "0.6197973", "0.61952", "0.6183631", "0.61797863", "0.6157397", "0.6152618", "0.61521906", "0.6116792", "0.61100185", "0.61080855", "0.6088319", "0.6082373", "0.6072587", "0.60691696", "0.60570836", "0.60564214", "0.6056027", "0.60505396", "0.6050144", "0.60472345", "0.6044647", "0.6036982", "0.6024398", "0.6024398", "0.6024398", "0.6024398", "0.6020334", "0.60201526", "0.6018423", "0.6016204", "0.6005956", "0.6002279", "0.5999404", "0.59974486", "0.59964895", "0.5995736", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.5991695", "0.599113", "0.5987661", "0.5987661", "0.5984926", "0.5983099", "0.5973421", "0.59589046", "0.5958243", "0.5953439", "0.59510964", "0.59475076", "0.5946366", "0.5943994", "0.59424007", "0.59403396", "0.5937576", "0.59374106", "0.5926433", "0.59263766", "0.59263766", "0.5925841", "0.5913479", "0.5910542", "0.59044325", "0.5904201", "0.59039", "0.58995575", "0.58967894", "0.5894089", "0.58939654", "0.58905286", "0.5882918", "0.58785903", "0.58777314", "0.5876467", "0.5876147", "0.587332", "0.58671093", "0.58671093", "0.58666575", "0.5866619", "0.58632815" ]
0.0
-1
/ access modifiers changed from: packageprivate
public final void d() { try { if (this.o != null) { this.o.setVisibility(this.a.isTrafficLayerEnabled() ? 0 : 8); } if (this.s != null) { this.s.setVisibility(8); } if (this.t != null) { this.t.setVisibility(8); } a(this.w); } catch (Throwable th) { mj.a(th); rx.c(th, "BaseNaviView", "initLayout"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo23813b() {\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo42329d();", "public abstract void mo30696a();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo2740a() {\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}", "private NativeSupport() {\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.7152354", "0.66870445", "0.6557956", "0.64830303", "0.64306164", "0.63853925", "0.6384864", "0.63484466", "0.6330916", "0.62771153", "0.6263446", "0.6251191", "0.623744", "0.6234031", "0.62294084", "0.6198601", "0.6198601", "0.619552", "0.61842144", "0.61809874", "0.61573476", "0.6153497", "0.6152576", "0.6117015", "0.6109547", "0.6108387", "0.60887784", "0.6082723", "0.6073469", "0.60706985", "0.60562694", "0.60562575", "0.60559225", "0.60531056", "0.6050733", "0.60479873", "0.6045513", "0.6038094", "0.6023796", "0.6023796", "0.6023796", "0.6023796", "0.60206586", "0.60202146", "0.60190946", "0.60176116", "0.6006372", "0.6002703", "0.5999305", "0.5999144", "0.5997215", "0.59963655", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.599197", "0.59910274", "0.59878075", "0.59878075", "0.5985066", "0.5983375", "0.5973787", "0.5959142", "0.5958575", "0.59531504", "0.5951894", "0.5947825", "0.59468997", "0.59448934", "0.5942682", "0.5940769", "0.59384227", "0.59382755", "0.5926339", "0.5926243", "0.5926243", "0.59256226", "0.5913768", "0.5910571", "0.59055513", "0.5905238", "0.590443", "0.5899911", "0.589717", "0.5894518", "0.58944243", "0.5890848", "0.58823144", "0.58785427", "0.5878036", "0.5876826", "0.5876161", "0.58741283", "0.5866971", "0.58668786", "0.58668786", "0.5865463", "0.58651894" ]
0.0
-1
/ access modifiers changed from: private / access modifiers changed from: public
private void b(boolean z2) { try { if (this.L != z2) { int i2 = z2 ? 2 : this.T ? 1 : 3; if (this.F != i2) { this.F = i2; if (this.c != null) { Message obtain = Message.obtain(); obtain.what = 11; obtain.arg1 = this.F; this.c.sendMessage(obtain); } } } updateRouteOverViewStatus(z2); } catch (Throwable th) { rx.c(th, "BaseNaviView", "setIsRouteOverviewNow"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "@Override\n public void perish() {\n \n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void myPublicMethod() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "private TMCourse() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private MApi() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private Get() {}", "private Get() {}", "private Infer() {\n\n }", "private CommonMethods() {\n }", "private ChainingMethods() {\n // private constructor\n\n }", "public void checkPublic() {\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public final void mo51373a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void m23075a() {\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.917 -0500\", hash_original_method = \"4F6254C867328A153FDD5BD23453E816\", hash_generated_method = \"627F9C594B5D3368AD9A21A5E43D2CB8\")\n \nprivate Extensions() {}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private Singletion3() {}", "private Public() {\n super(\"public\", null);\n }", "private void m50366E() {\n }", "public abstract Object mo26777y();", "public void method_4270() {}", "protected Doodler() {\n\t}", "public void mo21825b() {\n }", "public void mo21779D() {\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}", "private URIs() {\r\n throw new IllegalAccessError();\r\n }", "private abstract void privateabstract();", "public void mo38117a() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:04.534 -0500\", hash_original_method = \"E4DEB0C107DDB25A537EF0E89F1C04F8\", hash_generated_method = \"2E76AFD8C90588F5139C0C2D28CAEA05\")\n \nprivate static int translateCodingErrorAction(CodingErrorAction action) {\n if (action == CodingErrorAction.REPORT) {\n return 0;\n } else if (action == CodingErrorAction.IGNORE) {\n return 1;\n } else if (action == CodingErrorAction.REPLACE) {\n return 2;\n } else {\n throw new AssertionError(); // Someone changed the enum.\n }\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public OOP_207(){\n\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "private test5() {\r\n\t\r\n\t}", "@Override\n\tpublic boolean isPublic() {\n\t\treturn false;\n\t}", "private void __sep__Constructors__() {}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo97908d() {\n }", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.877 -0500\", hash_original_method = \"6B80070A6DD2FB0EB3D1E45B8D1F67CF\", hash_generated_method = \"2A1ECFC7445D74F90AF7029089D02160\")\n \nprivate Organizations() {}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void init() {\n }", "@Override\n void init() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {\n\t}", "private Utils() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private Mgr(){\r\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo21782G() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "private Aliyun() {\n\t\tsuper();\n\t}", "public final void mo91715d() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.663 -0500\", hash_original_method = \"7BA2DC4B038FD72F399C633B1C4B5B34\", hash_generated_method = \"3D1B22AE31FE9AB2658DC3713C91A6C9\")\n \nprivate Groups() {}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void ss(){\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.504 -0500\", hash_original_method = \"F5E3085137E37D29F0F8CB3C296F1F57\", hash_generated_method = \"47D4A76F75042B03A266F16D90E98429\")\n \nprivate Contacts() {}", "private Utility() {\n throw new IllegalAccessError();\n }", "private Util() { }", "public void mo21877s() {\n }", "protected void mo6255a() {\n }", "void m1864a() {\r\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public Fun_yet_extremely_useless()\n {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public boolean getAllowPrivateConstructors()\n {\n \treturn allowPrivateConstructors;\n }", "public void mo115188a() {\n }", "private Marinator() {\n }", "private Marinator() {\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}" ]
[ "0.7241106", "0.6884593", "0.6832823", "0.6526034", "0.6477351", "0.6446282", "0.638184", "0.6364509", "0.63547784", "0.6348681", "0.6342245", "0.6326031", "0.6301997", "0.6288513", "0.62834656", "0.6269718", "0.62565446", "0.62383384", "0.62383384", "0.6237719", "0.62261933", "0.6217796", "0.6208081", "0.6199728", "0.61917263", "0.618648", "0.618648", "0.6155509", "0.6127812", "0.61208785", "0.6117697", "0.61058146", "0.6102333", "0.6099691", "0.6097595", "0.60881287", "0.608355", "0.6075715", "0.6075307", "0.60739565", "0.60725385", "0.60725385", "0.6062586", "0.6051084", "0.6050601", "0.6045557", "0.60425323", "0.6042366", "0.6042366", "0.60417986", "0.6036258", "0.60181653", "0.6017371", "0.6012509", "0.5999754", "0.5990268", "0.5973513", "0.59715706", "0.5968033", "0.5960015", "0.5955513", "0.594747", "0.5946615", "0.5943889", "0.5943889", "0.5943616", "0.59368896", "0.59368896", "0.59368896", "0.59368896", "0.5934181", "0.5934181", "0.5930267", "0.59234524", "0.5921336", "0.5918898", "0.59163344", "0.5913455", "0.59070474", "0.5902799", "0.59027195", "0.5899286", "0.5899262", "0.5898914", "0.5895257", "0.58874327", "0.5881057", "0.5876674", "0.5874492", "0.5871256", "0.5865132", "0.5857462", "0.5853274", "0.5851893", "0.58496183", "0.5847556", "0.5844423", "0.5844423", "0.5842818", "0.5842407", "0.5840877" ]
0.0
-1
Setus up the Bukkit task.
private void setupBukkitManaRegenerationTask(){ if(time <= 0) return; if(bukkitTaskID > 0){ Bukkit.getScheduler().cancelTask(bukkitTaskID); } if(bukkitTaskID < 0 || !Bukkit.getScheduler().isQueued(bukkitTaskID)){ int tickTime = time * 20; bukkitTaskID = Bukkit.getScheduler().scheduleSyncRepeatingTask((JavaPlugin)plugin, new Runnable() { @Override public void run() { for(AbstractTraitHolder holder : ManaRegenerationTrait.this.getTraitHolders()){ for(RaCPlayer player : holder.getHolderManager().getAllPlayersOfHolder(holder)){ if(player != null && player.isOnline()){ double modValue = modifyToPlayer(player, value, "value"); Bukkit.getPluginManager().callEvent(new ManaRegenerationEvent(player.getPlayer(), modValue)); } } } } }, tickTime, tickTime); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setupTask(Task task) {\n }", "public CompassTask(HG plugin)\r\n/* 23: */ {\r\n/* 24:20 */ this.plugin = plugin;\r\n/* 25:21 */ Bukkit.getScheduler().scheduleSyncRepeatingTask(HG.plugin, this, 25L, 25L);\r\n/* 26: */ }", "public void setUp() {\n instance = new Task();\n }", "public void setupTask() {\n\t\tif (!hasInternetConnection()) {\n\t\t\tdlgNoInet.show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tsetupMessageHandler();\n\t\t\n\t\t// Activate text box if user is logged in.\n\t\tString userid = checkLogin();\n\t\tLog.d(\"TIMER\", \"User logged in: \" + userid);\n\t\tif (userid != null && userid.length() > 0 && etMessage != null) {\n\t\t\tsetupSendMessageListener();\n\t\t\tetMessage.setEnabled(true);\n\t\t\thideVirtualKeyboard();\n\t\t}\n\t\t\n\t\t// Setup the message cursor object.\n\t\tsetupMessageCursor();\n\n\t\t// Start message listener if base url is set.\n\t\tstartMessageListener();\n\t}", "public void setup() {\n\t\tif(!plugin.getDataFolder().exists()) {\n\t\t\tplugin.getDataFolder().mkdir();\n\t\t}\n\n\t\t// Create main file\n\t\tString FileLocation = plugin.getDataFolder().toString() + File.separator + \"Storage\" + \".yml\";\n\t\tFile tmp = new File(FileLocation);\n\t\tstoragefile = tmp;\n\t\t// Check if file exists\n\t\tif (!storagefile.exists()) {\n\t\t\ttry {\n\t\t\t\tstoragefile.createNewFile();\n\t\t\t}catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tBukkit.getServer().getConsoleSender().sendMessage(net.md_5.bungee.api.ChatColor.RED + \"Storage file unable to be created!\");\n\t\t\t}\n\t\t}\n\t\tstoragecfg = YamlConfiguration.loadConfiguration(storagefile);\n\t\tcreateStorageValues();\n\t}", "public void setup() {\n\t\tif (!new File(plugin.getDataFolder() + path).exists())\r\n\t\t\tnew File(plugin.getDataFolder() + path).mkdir();\r\n\r\n\t\tif (!new File(plugin.getDataFolder() + path, name + \".yml\").exists())\r\n\t\t\ttry {\r\n\t\t\t\tnew File(plugin.getDataFolder() + path, name + \".yml\").createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tplugin.getLogger().log(Level.SEVERE, \"Could not generate \" + name + \".yml\");\r\n\t\t\t}\r\n\t}", "public BotTaskExecutor(SlackSession session) {\n LOG.info(\"Start time: {}\", String.format(\"%1$-2d:%2$-2d\", START_HOUR, START_MIN));\n\n SlackChannel channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n\n // Enable/disabe the Meetup bot\n if (PropertiesUtil.getBooleanProperty(Constants.MEETUP_ENABLE, true)) {\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start MEETUP task\");\n SlackBot.messageAdmins(session, \"Failed to start MEETUP task\");\n } else {\n TASKS.add(new MeetupBotTask(EXECUTOR_SERVICE, \"MEETUP\", START_HOUR, START_MIN, session, channelBotMain));\n }\n }\n\n if (PropertiesUtil.getBooleanProperty(Constants.BOT_TEST, false)) {\n channelBotMain = session.findChannelByName(\"random\");\n } else {\n channelBotMain = session.findChannelById(PropertiesUtil.getProperty(Constants.WBB_CHANNEL_ID));\n }\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start WBB task\");\n SlackBot.messageAdmins(session, \"Failed to start WBB task\");\n } else {\n TASKS.add(new WbbBotTask(EXECUTOR_SERVICE, \"WBB\", START_HOUR, START_MIN, session, channelBotMain));\n }\n\n channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start UPGRADE task\");\n SlackBot.messageAdmins(session, \"Failed to start UPGRADE task\");\n } else {\n // Start the upgrade task at 0600\n TASKS.add(new UpgradeTask(EXECUTOR_SERVICE, \"UPGRADE\", 6, 0, session, channelBotMain));\n }\n\n startAll();\n }", "public void setup() {\r\n\t\tthis.greet(\"Hello, my name is \" + this.name + \", this message is brought to you from the AI.java file under the greet method!\");\r\n\t\t//TODO ask for name\r\n\t\t// check if setup file exists and make sure nothing is invalid\r\n\t\t/*if(!(fileManager.getFile(\"settings.cy\").exists())) { // TODO finish this\r\n\t\t\tFile settings = fileManager.createFile(\"settings\");\r\n\t\t\tint i = 0;\r\n\t\t\tfileManager.writeToFile(settings, \"color: red\", i++);\r\n\t\t\t// no other settings at the moment\r\n\t\t}*/\r\n\t}", "@Override\n public void taskStarting() {\n\n }", "public void start()\n {\n if (task != -1) {\n return;\n }\n\n task = Bukkit.getScheduler().scheduleSyncRepeatingTask(library.getPlugin(), this, 5, 1);\n }", "public void setupTask(TaskAttemptContext context) throws IOException {\n }", "@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }", "public void setup()\n {\n this.p = Player.getInstance();\n\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n background = loadImage(\"images\\\\farm2.jpg\");\n background.resize(VIEW_WIDTH, VIEW_HEIGHT);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }", "private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }", "@Override\n\tpublic void initTask() {\n\t\tRankTempInfo rankInfo = RankServerManager.getInstance().getRankTempInfo(player.getPlayerId());\n\t\tif(rankInfo!=null){\n\t\t\tgetTask().getTaskInfo().setProcess((int)rankInfo.getSoul());\n\t\t}\n\t}", "@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}", "public void startTask() {\n\t}", "public AnemoCheckTask() {\n }", "@Override\n public void runTasks() {\n BukkitTask task1 = new BukkitRunnable() {\n long start = 0;\n long now = 0;\n\n @Override\n public void run() {\n start = now;\n now = System.currentTimeMillis();\n long tdiff = now - start;\n\n if (tdiff > 0) {\n instTps = (float) (1000 / tdiff);\n }\n }\n }.runTaskTimer(Aurora.getInstance(), 0, 1);\n\n //Task to populate avgTps\n BukkitTask task2 = new BukkitRunnable() {\n ArrayList<Float> tpsList = new ArrayList<>();\n\n @Override\n public void run() {\n Float totalTps = 0f;\n\n tpsList.add(instTps);\n //Remove old tps after 15s\n if (tpsList.size() >= 15) {\n tpsList.remove(0);\n }\n for (Float f : tpsList) {\n totalTps += f;\n }\n avgTps = totalTps / tpsList.size();\n }\n }.runTaskTimerAsynchronously(Aurora.getInstance(), 20, 20);\n\n //Add to runnables[]\n runnables = new BukkitTask[]{task1, task2};\n }", "void configureTasks(ScheduledTaskRegistrar taskRegistrar);", "public void setCombatTask() {\n\t\tif (this.level != null && !this.level.isClientSide) {\n\t\t\tthis.goalSelector.removeGoal(this.aiAttackOnCollide);\n\t\t\tthis.goalSelector.removeGoal(this.aiShotgunAttack);\n\t\t\tItemStack itemstack = this.getItemInHand(ProjectileHelper.getWeaponHoldingHand(this, DeferredRegistryHandler.BLUNDERBUSS.get()));\n\t\t\tif (itemstack.getItem() == DeferredRegistryHandler.BLUNDERBUSS.get()) {\n\t\t\t\tint i = 25;\n\t\t\t\tif (this.level.getDifficulty() != Difficulty.HARD) {\n\t\t\t\t\ti = 45;\n\t\t\t\t}\n\n\t\t\t\tthis.aiShotgunAttack.setAttackCooldown(i);\n\t\t\t\tthis.goalSelector.addGoal(16, this.aiShotgunAttack);\n\t\t\t} else {\n\t\t\t\tthis.goalSelector.addGoal(12, this.aiAttackOnCollide);\n\t\t\t}\n\n\t\t}\n\t}", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "public final void startAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Starting BotTask {}\", bt.getName());\n bt.start();\n\n if (bt.getName().contains(\"UPGRADE\")) {\n bt.doWork();\n } else {\n LOG.info(\"{} scheduled to start at {}:{}\", bt.getName(), START_HOUR, START_MIN);\n }\n }\n }", "public static void setup()\n\t{\n\t\tregisterEvent(calico.plugins.events.clients.ClientConnect.class);\n\t\tregisterEvent(calico.plugins.events.clients.ClientDisconnect.class);\n\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapCreate.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapDelete.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapReload.class);\n\t\t\n\t\t\n\t\t//System.out.println(\"LOAD PLUGINS: \"+COptions.server.plugins);\n\t\t\n\t\tlogger.debug(\"Loading plugins\");\n\t\t\n\t\ttry\n\t\t{\n\t\t\tPluginFinder pluginFinder = new PluginFinder();\n\t\t\tpluginFinder.search(\"plugins/\");\n\t\t\tList<Class<?>> pluginCollection = pluginFinder.getPluginCollection();\n\t\t\tfor (Class<?> plugin: pluginCollection)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Loading \" + plugin.getName());\n\t\t\t\tregisterPlugin(plugin);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString[] pluginsToLoad = COptions.server.plugins.split(\",\");\n\t\t\n//\t\tif(pluginsToLoad.length>0)\n//\t\t{\n//\t\t\tfor(int i=0;i<pluginsToLoad.length;i++)\n//\t\t\t{\n//\t\t\t\ttry\n//\t\t\t\t{\n//\t\t\t\t\tClass<?> pluginClass = Class.forName(pluginsToLoad[i].trim());\n//\t\t\t\t\tregisterPlugin(pluginClass);\n//\t\t\t\t}\n//\t\t\t\tcatch(Exception e)\n//\t\t\t\t{\n//\t\t\t\t\tlogger.error(\"Could not load plugin \"+pluginsToLoad[i].trim());\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\t\n\t\n\t}", "protected void setup() {\r\n }", "@Override\n public void onInitializeTasks() {\n }", "public void setup() {\n statsTable();\n spawnsTable();\n }", "public void setup() {\n }", "public void setup() {\n\t\taddBehaviour(new TickerBehaviour(this, 1000L) {\n\n\t\t\t@Override\n\t\t\tprotected void onTick() {\n\t\t\t\tint extinguishedFires = 0;\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < worldAgent.getAircraftAgents().length; i++) {\n\t\t\t\t\textinguishedFires+=worldAgent.getAircraftAgents()[i].getAircraftMetricsStats().getNumTotalFiresExtinguishedByThisAircraft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tworldAgent.getWorldMetricsStats().setNumTotalFiresExtinguishedByAllAircrafts(extinguishedFires);\n\t\t\t\t\n\t\t\t\tif(extinguishedFires >= 3) {\t\t\t\t\t\n\t\t\t\t\tlong end_time = System.currentTimeMillis();\n\t\t\t\t\tlong execution_time = end_time - init_time;\n\t\t\t\t\t\n\t\t\t\t\tAircraftAgent[] aircrafts = worldAgent.getAircraftAgents();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < aircrafts.length; i++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(Thread sleepingThread : aircrafts[i].getSleepingThreads().values()) {\n\t\t\t\t\t\t\tSystem.err.println(\"Interrupting thread = \\\"\" + sleepingThread.getName() + \"!\");\n\t\t\t\t\t\t\tsleepingThread.interrupt();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tkillContainer();\n\t\t\t\t\t\n\t\t\t\t\tLogger.appendConfigValues(execution_time);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Run no. \" + JADELauncher.NUMBER_OF_RUNS + \" finished.\");\n\n\t\t\t\t\tif(JADELauncher.NUMBER_OF_RUNS == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLogger.closeStream();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJADELauncher.NUMBER_OF_RUNS--;\n\t\t\t\t\t\tinstanceRun();\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\t\n\t\tinstanceRun();\n\t}", "void onTaskPrepare();", "@Override\n public void onEnable() {\n spigotLogger = new SpigotLogger(\"Phantom\", ChatColor.WHITE, ChatColor.GRAY, LogLevel.DEBUG);\n\n // Load the configuration files.\n if (!setupConfigs(settingsConfig, messagesConfig)) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all config files.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Set up all storage systems.\n if (!storageManager.setup()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to set up storage systems.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Load all (internal) modules.\n if (!moduleManager.loadAllModules()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all internal modules.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Now everything is loaded and we can start creating all prerequisites for the storage systems.\n // Of course we're running this async as they mostly involve IO operations.\n // Todo create server join states (OPEN, MAINTENANCE, BOOTING) for a minor update.\n Bukkit.getScheduler().runTaskAsynchronously(this, () -> {\n if (!storageManager.testSystems()) {\n // If failed -> Disable Phantom.\n }\n\n if (!storageManager.createPrerequisites()) {\n // If failed -> Disable Phantom.\n }\n });\n\n spigotLogger.log(LogLevel.SUCCESS, \"Enabled plugin.\");\n }", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "protected void setup() {\r\n \t//inizializza gli attributi dell'iniziatore in base ai valori dei parametri\r\n Object[] args = this.getArguments();\r\n \t\tif (args != null)\r\n \t\t{\r\n \t\t\tthis.goodName = (String) args[0];\r\n \t\t\tthis.price = (int) args[1];\r\n \t\t\tthis.reservePrice = (int) args[2];\r\n \t\t\tthis.dif = (int) args[3];\r\n \t\t\tthis.quantity = (int) args[4];\r\n \t\t\tthis.msWait = (int) args[5];\r\n \t\t} \t\t\r\n\r\n manager.registerLanguage(codec);\r\n manager.registerOntology(ontology);\r\n \r\n //inizializza il bene oggetto dell'asta\r\n good = new Good(goodName, price, reservePrice, quantity);\r\n \r\n //cerca ed inserisce nell'ArrayList gli eventuali partecipanti\r\n findBidders(); \r\n \r\n //viene aggiunto l'apposito behaviour\r\n addBehaviour(new BehaviourInitiator(this));\r\n\r\n System.out.println(\"Initiator \" + this.getLocalName() + \" avviato\");\r\n }", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "@Override\n protected void setup(final TaskBundle bundle, final List<Task<?>> taskList) {\n this.bundle = bundle;\n //taskNotificationDispatcher.setBundle(bundle);\n this.taskList = taskList;\n this.taskWrapperList = new ArrayList<>(taskList.size());\n this.dataProvider = taskList.get(0).getDataProvider();\n this.uuidList = bundle.getUuidPath().getList();\n ClassLoader taskClassLoader = null;\n try {\n taskClassLoader = getTaskClassLoader(taskList.get(0));\n usedClassLoader = threadManager.useClassLoader(taskClassLoader);\n } catch (final Exception e) {\n final String msg = ExceptionUtils.getMessage(e) + \" - class loader lookup failed for uuidPath=\" + uuidList;\n if (debugEnabled) log.debug(msg, e);\n else log.warn(msg);\n }\n accumulatedElapsed.set(0L);\n }", "public void setup() {\r\n\r\n\t}", "private void startSpawning()\n {\n MAUtils.setSpawnFlags(plugin, world, 1, allowMonsters, allowAnimals);\n \n // Start the spawnThread.\n spawnThread = new MASpawnThread(plugin, this);\n spawnTaskId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, spawnThread, waveDelay, (!waveClear) ? waveInterval : 60);\n }", "private void startGameAfterDelay() {\n int delay = (int) (double) DiaConfig.SECONDS_UNTIL_START.get() * MinecraftConstants.TICKS_PER_SECOND + 1;\n\n this.startingTask = new BukkitRunnable() {\n @Override\n public void run() {\n startGame();\n }\n }.runTaskLater(DiaHuntPlugin.getInstance(), delay);\n }", "void makeDragon() {\n new BukkitRunnable() {\n int i = 555;\n\n @Override\n public void run() {\n Set<BlockData> set = create.get(i);\n for (BlockData blockData : set) {\n blockData.setBlock();\n }\n\n i++;\n if (i > 734) {\n cancel();\n }\n }\n }.runTaskTimer(Main.plugin, 0, 2);\n // Location end = new Location(Bukkit.getWorld(\"world\"), 3, 254, 733);\n }", "@Override\r\n\tpublic void PostExecute(TaskConfig config){\n\t}", "@Override\n public void onEnable() {\n plugin = this;\n if(!getServer().getPluginManager().isPluginEnabled(\"BedWars1058\")){\n getLogger().severe(\"Unable to locate Bedwars1058.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n bwAPI = Bukkit.getServicesManager().getRegistration(BedWars .class).getProvider();\n bedwarsEnabled = true;\n }\n if(!getServer().getPluginManager().isPluginEnabled(\"Citizens\")){\n getLogger().severe(\"Citizens is missing shopkeeper won't be used!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n npcRegistry = CitizensAPI.getNPCRegistry();\n citizensEnabled = true;\n getLogger().info(\"Hooked with Citizens for shopkeeper\");\n }\n /*commandManager = new BukkitCommandManager(this);\n if(commandManager == null){\n getLogger().severe(\"Unable to intialize BukkitCommandManager.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }*/\n fileUtils = new FileUtils();\n configuration = new Configuration();\n if(!configuration.createConfiguration(this)){\n getLogger().severe(\"Unable to create configuration file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n messages = new Messages();\n if(!messages.generateMessages()){\n getLogger().severe(\"Unable to create messages.yml file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n cacheManager = new CacheManager(this);\n if(!cacheManager.buildCache()){\n getLogger().severe(\"Unable to create cache file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n scheduler = new WorkloadScheduler();\n scheduler.intializeThread();\n storage = new Storage(this,getConfiguration().isUsingMysql());\n storage.build();\n storage.tryConnection();\n storage.createDatabase();\n randomUtility = new RandomUtility(this);\n cosmeticManager = new CosmeticManager();\n cosmeticManager.loadCosmetics();\n playerManager = new PlayerCosmeticsManager();\n registerListeners();\n cooldownTasks = new Cooldowns();\n cooldownTasks.runTaskTimerAsynchronously(this,100L,20L);\n registerCommands();\n getLogger().info(\"------------------------------------------------\");\n getLogger().info(\"Enabled Plugin\");\n getLogger().info(\"------------------------------------------------\");\n\n }", "@Override\n protected void startUp() {\n }", "@Override\n\tprotected void setup() {\n\t\t{\n\t\t\tKeyPairGenerator kpg = null;\n\t\t\ttry {\n\t\t\t\tkpg = KeyPairGenerator.getInstance(\"RSA\");\n\t\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t\te.printStackTrace(); // There is such an algorithm\n\t\t\t}\n\t\t\tkpg.initialize(GlobalPreferences.getKeysize(), new SecureRandom());\n\t\t\tkeys = kpg.genKeyPair();\n\t\t\t\n\t\t\tMLoginInitiate loginInitiate = new MLoginInitiate(keys.getPublic());\n\t\t\tputMessage(loginInitiate);\n\t\t}\n\t\t\n\t\twhile(!loginCompleted)\n\t\t{\n\t\t\ttry {\n\t\t\t\tThread.sleep(50); // Wait a bit for response\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tputMessage(new MLoginCompleted(loginSuccess, -2, \"admin\", \"admin\", false));\n\t}", "void setup(CommandLine cmd);", "@Override\n public void run(){\n sharedPref = getActivity().getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n String defaultValue = getResources().getString(R.string.username);\n String username =sharedPref.getString(getString(R.string.username), defaultValue);\n\n mBuddyLocationTask = new GetBuddyLocation(username);\n mBuddyLocationTask.execute((Void) null);\n\n mBuddyHrTask = new GetBuddyHr(username);\n mBuddyHrTask.execute((Void) null);\n }", "public PlayerTickTask(Player player) {\n\t\tthis.player = player;\n\t}", "public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}", "public BoardSetup() {\n\t\tthis.theBoard = Board.getInstance();\n\t}", "@Before\r\n public void setup()\r\n {\r\n board = new Board();\r\n piece = new Pawn(WHITE);\r\n board.putPiece(piece, 0, 0);\r\n }", "private void setup() throws Exception {\n\t}", "public static void main(String args[]) {\n File config = new File(\"files/config.txt\");\n\n try {\n JavaBot.FileReader = new BufferedReader(new FileReader(config));\n String line = null;\n line = JavaBot.FileReader.readLine();\n\n while (line != null) {\n final String[] array = line.split(\"=\");\n\n if (array.length == 2) {\n JavaBot.configNameArray.add(array[0].replaceAll(\"=\", \"\").trim());\n JavaBot.configArray.add(array[1].trim());\n }\n\n line = JavaBot.FileReader.readLine();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JavaBot.getAllConfig();\n\n String[] channels = JavaBot.CHANNELS.split(SERVERS_SEPERATOR); \n String[] passwords = JavaBot.NICKSERV_PASSWORDS.split(SERVERS_SEPERATOR); \n String[] names = JavaBot.NAMES.split(SERVERS_SEPERATOR);\n\n /** TRIMMING VARIABLES */\n SERVERS_ARRAY = trimArray(SERVERS_ARRAY);\n channels = trimArray(channels);\n passwords = trimArray(passwords);\n names = trimArray(names);\n\n initPlugins();\n \n /** CLASSES onStart() */\n new onStart();\n\n /** PLUGINS onStart() */\n\n for (final javaBotPlugin plugin : plugins) {\n plugin.onStart();\n }\n\n for (int i = 0; i < SERVERS_ARRAY.length; i++) {\n JavaBot bot = new JavaBot();\n\n // setting of values respective to each instance of the bot\n bot.setServer(SERVERS_ARRAY[i]);\n bot.setBotName(names[i]);\n bot.setPassword(passwords[i]);\n bot.channels_array = channels[i].split(CHANNELS_SEPERATOR); // split up channels\n new Thread(bot).start();\n }\n }", "private QVCSAntTask initQVCSAntTask() throws InterruptedException {\n Thread.sleep(1000);\n QVCSAntTask qvcsAntTask = new QVCSAntTask();\n qvcsAntTask.setUserName(TestHelper.USER_NAME);\n qvcsAntTask.setPassword(TestHelper.PASSWORD);\n qvcsAntTask.setUserDirectory(System.getProperty(\"user.dir\"));\n qvcsAntTask.setProjectName(TestHelper.getTestProjectName());\n qvcsAntTask.setServerName(TestHelper.SERVER_NAME);\n qvcsAntTask.setAppendedPath(\"\");\n qvcsAntTask.setWorkfileLocation(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n qvcsAntTask.setProject(new Project());\n qvcsAntTask.setRecurseFlag(false);\n qvcsAntTask.init();\n return qvcsAntTask;\n }", "public Config(HG plugin)\r\n/* 38: */ {\r\n/* 39:46 */ if (!new File(plugin.getDataFolder(), \"config.yml\").exists())\r\n/* 40: */ {\r\n/* 41:47 */ Util.log(\"Config not found. Generating default config!\");\r\n/* 42:48 */ plugin.saveDefaultConfig();\r\n/* 43: */ }\r\n/* 44:51 */ config = plugin.getConfig().getRoot();\r\n/* 45:52 */ config.options().copyDefaults(true);\r\n/* 46:53 */ plugin.reloadConfig();\r\n/* 47:54 */ config = plugin.getConfig();\r\n/* 48: */ \r\n/* 49:56 */ spawnmobs = config.getBoolean(\"settings.spawn-mobs\");\r\n/* 50:57 */ spawnmobsinterval = config.getInt(\"settings.spawn-mobs-interval\") * 20;\r\n/* 51:58 */ freeroam = config.getInt(\"settings.free-roam\");\r\n/* 52:59 */ trackingstickuses = config.getInt(\"settings.trackingstick-uses\");\r\n/* 53:60 */ playersfortrackingstick = config.getInt(\"settings.players-for-trackingstick\");\r\n/* 54:61 */ maxchestcontent = config.getInt(\"settings.max-chestcontent\");\r\n/* 55:62 */ teleAtEnd = config.getBoolean(\"settings.teleport-at-end\");\r\n/* 56:63 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 57:64 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 58:65 */ cash = config.getInt(\"reward.cash\");\r\n/* 59:66 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 60:67 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 61:68 */ cash = config.getInt(\"reward.cash\");\r\n/* 62:69 */ breakblocks = config.getBoolean(\"rollback.allow-block-break\");\r\n/* 63:70 */ blocks = config.getIntegerList(\"rollback.editable-blocks\");\r\n/* 64:71 */ randomChest = config.getBoolean(\"random-chest.enabled\");\r\n/* 65:72 */ randomChestInterval = config.getInt(\"random-chest.interval\") * 20;\r\n/* 66:73 */ randomChestMaxContent = config.getInt(\"random-chest.max-chestcontent\");\r\n/* 67:75 */ if (giveReward) {\r\n/* 68: */ try\r\n/* 69: */ {\r\n/* 70:77 */ Vault.setupEconomy();\r\n/* 71: */ }\r\n/* 72: */ catch (NoClassDefFoundError e)\r\n/* 73: */ {\r\n/* 74:79 */ Util.log(\"Unable to setup vault! Rewards will not be given out..\");\r\n/* 75:80 */ giveReward = false;\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:84 */ ItemStack i = new ItemStack(Material.FIREWORK, 64);\r\n/* 79:85 */ FireworkMeta fm = (FireworkMeta)i.getItemMeta();\r\n/* 80:86 */ List<Color> c = new ArrayList();\r\n/* 81:87 */ c.add(Color.ORANGE);\r\n/* 82:88 */ c.add(Color.RED);\r\n/* 83:89 */ FireworkEffect e = FireworkEffect.builder().flicker(true).withColor(c).withFade(c).with(FireworkEffect.Type.BALL_LARGE).trail(true).build();\r\n/* 84:90 */ fm.addEffect(e);\r\n/* 85:91 */ fm.setPower(3);\r\n/* 86:92 */ i.setItemMeta(fm);\r\n/* 87: */ \r\n/* 88:94 */ firework = i;\r\n/* 89: */ }", "private void configInit() {\r\n\t\tconfig = pluginInstance.getConfiguration();\r\n\t\tif (!new File(pluginInstance.getDataFolder().getPath() + File.separator + \"config.yml\")\r\n\t\t\t\t.exists()) {\r\n\t\t\tconfig.setProperty(\"reset-deathloc\", true);\r\n\t\t\tconfig.setProperty(\"use-iConomy\", true);\r\n\t\t\tconfig.setProperty(\"creation-price\", 10.0D);\r\n\t\t\tconfig.setProperty(\"deathtp-price\", 50.0D);\r\n\t\t\tconfig.setProperty(\"allow-tp\", true);\r\n\t\t\tconfig.setProperty(\"maxTombStone\", 0);\r\n\t\t\tconfig.setProperty(\"TombKeyword\", \"[Tomb]\");\r\n\t\t\tconfig.setProperty(\"use-tombAsSpawnPoint\", true);\r\n\t\t\tconfig.setProperty(\"cooldownTp\", 5.0D);\r\n\t\t\tconfig.setProperty(\"reset-respawn\", false);\r\n\t\t\tconfig.setProperty(\"maxDeaths\", 0);\r\n\t\t\tconfig.save();\r\n\t\t\tworkerLog.info(\"Config created\");\r\n\t\t}\r\n\t\tconfig.load();\r\n\t}", "public void gameSetUp() {\n if (!running.get()) return;\n if (!setup.compareAndSet(true, false)) return;\n ArrayList<GodController> controllers = new ArrayList<GodController>();\n controllers.add(new ApolloController(this));\n controllers.add(new ArtemisController(this));\n controllers.add(new AthenaController(this));\n controllers.add(new AtlasController(this));\n controllers.add(new DemeterController(this));\n controllers.add(new HephaestusController(this));\n controllers.add(new HestiaController(this));\n controllers.add(new LimusController(this));\n controllers.add(new MedusaController(this));\n controllers.add(new MinotaurController(this));\n controllers.add(new PanController(this));\n controllers.add(new PrometheusController(this));\n controllers.add(new TritonController(this));\n controllers.add(new ZeusController(this));\n\n Deck deck = game.getDeck();\n\n for (GodController godController : controllers) {\n deck.addCard(godController.generateCard());\n }\n\n players = game.getPlayers();\n\n try {\n broadcastGameInfo(\"gameSetup\");\n broadcastMessage(\"Game started!\");\n broadcastMessage(\"Picking cards...\");\n pickCards();\n broadcastGameInfo(\"boardSetup\");\n chooseStartPlayer();\n placeWorkers();\n\n broadcastGameInfo(\"gameStart\");\n playGame();\n } catch (IOExceptionFromController e) {\n handleDisconnection(e.getController());\n }\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void setup() throws Exception {\n setup(new File(\".\"));\n }", "public TaskGenerator() {\n if (taskNames == null) {\n setUpNameList();\n }\n }", "public static void main(String[] args) {\n\t\tJGroupHelper j = new JGroupHelper(\"BieberFeverGroup\", \"127.0.0.1\", 51924);\n\t\tTask t = new Task(Integer.toString(new Random().nextInt(9999)), \"Rick Astley\", \"TODAY\", \"Completed\", \"This is a Rick Roll\", \"The BieberFever team\" );\n\t\tj.addTask(t);\n\t}", "public void setup()\n {\n }", "@Override\n\tpublic void run() {\n\t\tdb.i(\"PowerupRunnable commiting spawn\");\n\t\tif (a.fightInProgress) {\n\t\t\t\n\t\t\tpum.calcPowerupSpawn(a);\n\t\t} else {\n\t\t\t// deactivate the auto saving task\n\t\t\tBukkit.getServer().getScheduler().cancelTask(pum.SPAWN_ID);\n\t\t}\n\t}", "public void initialize() {\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\t\tif (AttackRateSeconds > 30)\n\t\t\tAttackRateSeconds = 30.0;\n\n\t\tif (sentryHealth < 0)\n\t\t\tsentryHealth = 0;\n\n\t\tif (sentryRange < 1)\n\t\t\tsentryRange = 1;\n\t\tif (sentryRange > 100)\n\t\t\tsentryRange = 100;\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\n\t\tif (RespawnDelaySeconds < -1)\n\t\t\tRespawnDelaySeconds = -1;\n\n\t\tif (Spawn == null)\n\t\t\tSpawn = myNPC.getBukkitEntity().getLocation();\n\n\n\t\t// defaultSpeed = myNPC.getNavigator().getSpeed();\n\n\t\t((CraftLivingEntity) myNPC.getBukkitEntity()).getHandle().setHealth(sentryHealth);\n\n\t\t_myDamamgers.clear();\n\n\t\tthis.sentryStatus = Status.isLOOKING;\n\t\tfaceForward();\n\n\t\tshootanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),1);\n\t\thealanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),6);\n\n\t\t//\tPacket derp = new net.minecraft.server.Packet15Place();\n\n\n\t\tmyNPC.getBukkitEntity().teleport(Spawn); //it should be there... but maybe not if the position was saved elsewhere.\n\n\t\t// plugin.getServer().broadcastMessage(\"NPC GUARDING!\");\n\n\t\tif (taskID == null) {\n\t\t\ttaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new SentryLogicRunnable(), 40, _logicTick);\n\t\t}\n\n\n\t}", "public void setup() {\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT,\n DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world, TILE_WIDTH,\n TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n nextTime = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }", "public void initialize() {\n\n getStartUp();\n }", "protected abstract void setup();", "@Override\n public void run(String... args) throws Exception {\n\n TaskTemplate finalProjectDemo = new TaskTemplate(\"Final Project Demo\", \"Finishing the Demo\", 300, \"Tuesday\");\n taskTemplateStorage.save(finalProjectDemo);\n\n User mom = new User(\"Mom\", 300, \"rose\", \"/front-end/images/mom.png\");\n User dad = new User(\"Dad\", 600, \"apple\", \"/front-end/images/Dad.png\");\n User bro = new User(\"Bro\", 200, \"light-blue\", \"/front-end/images/Bro.png\");\n User sis = new User(\"Sis\", 200, \"magenta\", \"/front-end/images/sis.png\");\n\n\n// userStorage.save(testUser);\n userStorage.save(mom);\n userStorage.save(dad);\n userStorage.save(bro);\n userStorage.save(sis);\n\n\n\n TaskTemplate cleanCommonArea = new TaskTemplate(\"Clean Common Area\", \"Clean all common areas\", 30, 30, \"Monday\");\n TaskTemplate cleanGarage = new TaskTemplate(\"Clean Garage\", \"Sweep and organize the Garage\", 45, 45, \"Tuesday\");\n TaskTemplate cleanBathrooms = new TaskTemplate(\"Clean Bathrooms\", \"Wipe down sinks, scrub toilets, sweep and mop floors, and empty bathroom trash\", 30, 30, \"Wednesday\");\n TaskTemplate takeOutTrash = new TaskTemplate(\"Take Out Trash\", \"Take all trash to rolling bin outside and take the rolling bin to the road if today is a trash day\", 15,\"Wednesday\" );\n TaskTemplate washDishes = new TaskTemplate(\"Wash Dishes\", \"Wash and dry all dishes in the sink and empty/load the dishwasher\", 30, \"Wednesday\");\n TaskTemplate washAndDryLaundry = new TaskTemplate(\"Wash and Dry Laundry\", \"\", 30, 200, \"Monday\");\n TaskTemplate foldAndPutAwayLaundry = new TaskTemplate(\"Fold and Put Away Laundry\", \"\", 30, \"Monday\");\n TaskTemplate rakeLeaves = new TaskTemplate(\"Rake Leaves\", \"Rake and bag the leaves from the front, back, and sides of the house\", 45, \"Monday\");\n TaskTemplate mowLawn = new TaskTemplate(\"Mow Lawn\", \"Pick up rocks and sticks in the yards and mow the front and back lawn\", 45, \"Monday\");\n TaskTemplate cleanBedroom = new TaskTemplate(\"Clean Bedroom\", \"Clean your room\", 30, \"Tuesday\");\n TaskTemplate deepCleanKitchen = new TaskTemplate(\"Deep Clean Kitchen\", \"Clear off and wipe down all counter tops, wipe cabinet fronts, wipe behind sink, wipe trim boards under cabinets, sweep, and mop kitchen\", 90, \"Tuesday\");\n TaskTemplate tidyKitchen = new TaskTemplate(\"Tidy Kitchen\", \"Move dishes to sink, wipe down counter tops and table, and sweep floors\", 30, \"Tuesday\");\n TaskTemplate vacuumLivingRoom = new TaskTemplate(\"Vacuum Living Room\", \"Vacuum floors, crevases, and under furniture, and remove couch cushions to vacuum under cushions\", 30, \"Tuesday\");\n TaskTemplate mopAndSweepKitchen = new TaskTemplate(\"Mop and Sweep Kitchen\", \"Sweep and hot mop the kitchen floors\", 30, \"Thursday\");\n TaskTemplate changeLitterBox = new TaskTemplate(\"Change Litter Box\", \"Scoop the litter box and replace the litter if today is Friday\", 15, \"Thursday\");\n TaskTemplate walkDog = new TaskTemplate(\"Walk Dog\", \"Take the dogs for a walk around the block\", 20, \"Daily\");\n TaskTemplate cleanUpYard = new TaskTemplate(\"Clean Up Yard\", \"Pick up sticks and rocks in the front and back yard and pick up any trash that has blown in\", 20, \"Thursday\");\n TaskTemplate getMail = new TaskTemplate(\"Get Mail\", \"Get the mail from the mailbox\", 5, \"Daily\");\n TaskTemplate dustLivingRoom = new TaskTemplate(\"Dust Living Room\", \"Dust picture frames, end tables, coffee table, and door sills in the living room\", 20, \"Friday\");\n TaskTemplate dustFamilyRoom = new TaskTemplate(\"Dust Family Room\", \"Dust bookshelves, mantel over fireplace, stereo, and door sills in family room\", 20, \"Friday\");\n TaskTemplate vacuumFamilyRoom = new TaskTemplate(\"Vacuum Family Room\", \"Vacuum floors, crevases, and under furniture in the family room\", 20, \"Friday\");\n TaskTemplate dustCeilingFans = new TaskTemplate(\"Dust Ceiling Fans\", \"Wipe blades of ceiling fans down and ensure dust is blown out of fan motor housing\", 30, \"Friday\", bro, sis);\n\n taskTemplateStorage.save(cleanCommonArea);\n taskTemplateStorage.save(cleanGarage);\n taskTemplateStorage.save(cleanBathrooms);\n taskTemplateStorage.save(takeOutTrash);\n taskTemplateStorage.save(washDishes);\n taskTemplateStorage.save(washAndDryLaundry);\n taskTemplateStorage.save(foldAndPutAwayLaundry);\n taskTemplateStorage.save(rakeLeaves);\n taskTemplateStorage.save(mowLawn);\n taskTemplateStorage.save(cleanBedroom);\n taskTemplateStorage.save(deepCleanKitchen);\n taskTemplateStorage.save(tidyKitchen);\n taskTemplateStorage.save(vacuumLivingRoom);\n taskTemplateStorage.save(mopAndSweepKitchen);\n taskTemplateStorage.save(changeLitterBox);\n taskTemplateStorage.save(walkDog);\n taskTemplateStorage.save(cleanUpYard);\n taskTemplateStorage.save(getMail);\n taskTemplateStorage.save(dustLivingRoom);\n taskTemplateStorage.save(dustFamilyRoom);\n taskTemplateStorage.save(vacuumFamilyRoom);\n taskTemplateStorage.save(dustCeilingFans);\n\n resourceManager.allocateAllTasks();\n\n }", "public static void setup() {\n\n timers = new LinkedList<>();\n }", "@BeforeClass\n\tpublic static void setUp() {\n\t\tboard = Board.getInstance();\n\t\t// set the file names to use my config files\n\t\tboard.setConfigFiles(\"CTest_ClueLayout.csv\", \"CTest_ClueLegend.txt\");\n\t\t// Initialize will load BOTH config files\n\t\tboard.initialize();\n\t\t\n\t\tplayerHuman.setConfigFile(\"CTest_PlayerHuman.txt\");\n\t\tplayerComputer.setConfigFile(\"CTest_PlayerComputer.txt\");\n\n\t}", "@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broker(\"Broker\");\r\n\t\t}\r\n\t\t\r\n\t\tProgramGUI.getInstance().printToLog(broker.hashCode(), getLocalName(), \"created\", Color.GREEN.darker());\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\tsubscribeToRetailers();\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}", "public void setup()\n {\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n click = false;\n }", "@Before\r\n\tpublic void setUp() throws Exception {\n\t\tSourceLocation testLocation = new SourceLocation(1, 1);\r\n\t\ttestStatement = new MoveToStatement(new HerePositionExpression(testLocation), testLocation);\r\n\t\ttask = new Task(\"test\", -10, testStatement);\r\n\t\ttask1 = new Task(\"test\", 0, testStatement);\r\n\t\ttask2 = new Task(\"test\", 10, testStatement);\r\n\t\ttask3 = new Task(\"test\", 20 , testStatement);\r\n\t\tunit= new Unit(world, false);\r\n\t\tscheduler1 = unit.getFaction().getScheduler();\r\n\t}", "protected void setup(){\n\n\t\tsuper.setup();\n\n\t\tfinal Object[] args = getArguments();\n\t\tif(args!=null && args[0]!=null && args[1]!=null){\n\t\t\tdeployAgent((Environment) args[0],(EntityType)args[1]);\n\t\t}else{\n\t\t\tSystem.err.println(\"Malfunction during parameter's loading of agent\"+ this.getClass().getName());\n System.exit(-1);\n }\n\t\t\n\t\t//############ PARAMS ##########\n\n\t\tthis.nbmodifsmin \t\t= 30;\t\t\t//nb modifs minimum pour renvoyer la carte\n\t\tthis.timeOut \t\t\t= 1000 * 4;\t\t//secondes pour timeout des messages (*1000 car il faut en ms)\n\t\tthis.sleepbetweenmove \t= 200;\t\t\t//in MS\n\t\tthis.nbmoverandom\t\t= 4;\t\t\t// nb random moves by default\n\t\t\n\t\t//#############################\n\t\t//setup graph\n\t\t//setupgraph();\n\t\tthis.graph = new SingleGraph(\"graphAgent\");\n\t\tinitMyGraph();\n\t\tthis.step = 0;\n\t\tthis.stepMap = new HashMap<String, Integer>();\n\t\tthis.path = new ArrayList<String>();\n\t\tthis.mailbox = new Messages(this);\n\t\tthis.lastMsg = null;\n\t\tthis.switchPath = true;\n\t\tthis.lastsender = null;\n\t\tthis.lastSentMap = new HashMap<String, Integer>(); //nbmodifs\n\t\tthis.remakepath = false; // changes to true if the map changed in a way that requires a new path\n\t\tthis.nbmoverandomoriginal = this.nbmoverandom;\n\t\t\n\t\tthis.toSendMap = new HashMap<String, Graph>(); //actual hashmap graph\n\t\t\n\t\tSystem.out.println(\"the agent \"+this.getLocalName()+ \" is started\");\n\t}", "@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}", "public static void setupModules(){\n\t\tStart.setupModules();\n\t\t//add\n\t\t//e.g.: special custom scripts, workers, etc.\n\t}", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");\n }", "@Before\n\tpublic void setup(){\n\t\tMapperTask1 mapper = new MapperTask1();\n\t\tString file = getClass().getClassLoader().getResource(\"hdp-task1/datasets/sfo_weather.csv\").getFile();\n\t\tmapDriver = MapDriver.newMapDriver((Mapper<LongWritable, Text, Task1Key, Task1Value>) mapper).withCacheFile(file);\n\t}", "private SleeperTask()\r\n\t{\r\n\t\ttimer = new Timer();\r\n\t\tprovider = null;\r\n\t\taction = \"\";\r\n\t\tverbose = false;\r\n\t\tsetRepeat(5);\r\n\t}", "@Override\n public void initialize() {\n intake.intakePistons.set(true);\n }", "public void onStart(){\n\t\tif(Bukkit.getPluginManager().isPluginEnabled(\"MVdWPlaceholderAPI\")){\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_alive_players\",\n\t\t\t\t\tplaceholderReplaceEvent -> Integer.toString(arena.getPlayers(ArenaJoinMode.PLAYING).size()));\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_remaining_build\", placeholderReplaceEvent -> {\n\t\t\t\tString message = getArena().getHeartbeat().getTimeLeft() <= 59 ?\n\t\t\t\t\t\tCommon.plural(0,\"second\"):\n\t\t\t\t\t\tCommon.plural(getArena().getHeartbeat().getTimeLeft()-60, \"second\");\n\t\t\t\treturn message;\n\t\t\t});\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_highest_voted_theme\", placeholderReplaceEvent ->\n\t\t\t\t\tString.valueOf(VoteMenu.getHighestVotedTheme()));\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_voting_time\", placeholderReplaceEvent ->\n\t\t\t\t\tInteger.toString(arena.getSettings().getVotingDuration().getTimeSeconds()));\n\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_game_round\", placeholderReplaceEvent ->\n\t\t\t\t\tInteger.toString(arena.getSettings().getGameDuration().getTimeSeconds()));\n\t\t}\n\t}", "@Override\n public void onEnable(){\n \tgetLogger().info(\"onEnable has been invoked!\");\n \t// This will throw a NullPointerException if you don't have the command defined in your plugin.yml file!\n \tgetCommand(\"basic\").setExecutor(new BetatestCommandExecutor(this));\n \tgetCommand(\"WhatAmI\").setExecutor(new BetatestCommandExecutor(this));\n \tgetCommand(\"isonline\").setExecutor(new BetatestCommandExecutor(this));\n }", "protected TaskChain() {\n\t}", "@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }", "private ActorSystemBootstrapTools() {}", "public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }", "@Override\n public void run() {\n ShellResponse response =\n getNodeManager().nodeCommand(NodeManager.NodeCommandType.Configure, taskParams());\n processShellResponse(response);\n\n if (taskParams().type == UpgradeUniverse.UpgradeTaskType.Everything\n && !taskParams().updateMasterAddrsOnly) {\n // Check cronjob status if installing software.\n response = getNodeManager().nodeCommand(NodeManager.NodeCommandType.CronCheck, taskParams());\n\n // Create an alert if the cronjobs failed to be created on this node.\n if (response.code != 0) {\n Universe universe = Universe.getOrBadRequest(taskParams().universeUUID);\n Customer cust = Customer.get(universe.customerId);\n String alertErrCode = \"CRON_CREATION_FAILURE\";\n String nodeName = taskParams().nodeName;\n String alertMsg =\n \"Universe %s was successfully created but failed to \"\n + \"create cronjobs on some nodes (%s)\";\n\n // Persist node cronjob status into the DB.\n UniverseUpdater updater =\n new UniverseUpdater() {\n @Override\n public void run(Universe universe) {\n UniverseDefinitionTaskParams universeDetails = universe.getUniverseDetails();\n NodeDetails node = universe.getNode(nodeName);\n node.cronsActive = false;\n LOG.info(\n \"Updated \"\n + nodeName\n + \" cronjob status to inactive from universe \"\n + taskParams().universeUUID);\n }\n };\n saveUniverseDetails(updater);\n\n // Create new alert or update existing alert with current node name if alert already exists.\n if (Alert.exists(alertErrCode, universe.universeUUID)) {\n Alert cronAlert = Alert.list(cust.uuid, alertErrCode, universe.universeUUID).get(0);\n List<String> failedNodesList =\n universe\n .getNodes()\n .stream()\n .map(nodeDetail -> nodeDetail.nodeName)\n .collect(Collectors.toList());\n String failedNodesString = String.join(\", \", failedNodesList);\n cronAlert.update(String.format(alertMsg, universe.name, failedNodesString));\n } else {\n Alert.create(\n cust.uuid,\n universe.universeUUID,\n Alert.TargetType.UniverseType,\n alertErrCode,\n \"Warning\",\n String.format(alertMsg, universe.name, nodeName));\n }\n }\n\n // We set the node state to SoftwareInstalled when configuration type is Everything.\n // TODO: Why is upgrade task type used to map to node state update?\n setNodeState(NodeDetails.NodeState.SoftwareInstalled);\n }\n }", "abstract public void initSpawn();", "private static void executeTask02() {\n }", "public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public void prepare() {\n this.taskHandler.run(this::inlinePrepare);\n }", "@Override\n public void setupRecipes()\n {\n\n }", "@TaskAction\n public void configureFromResources() {\n // set icon file as input for supplyIcon task\n File icon = helperTask.getIcon().getResolve().get();\n helperTask.getIcon().setIcon(nullifyIfNotExists(icon));\n\n // todo implement \"should we even try to produce a splash?\"\n\n // look at the headerType first.\n // ACTUALLY, we don't care. We would assume that the user put a splash\n // in the directory, so that's what they want. If they don't want to use a splash\n // they can disable the splash task.\n\n // set splash file as input for supplySplash task\n // if splash file is present change header type to gui if it is not already set.\n File splash = helperTask.getSplash().getResolve().get();\n helperTask.getSplash().setSplash(nullifyIfNotExists(splash));\n\n // todo update the launch4jTask with a \"gui\" headerType.\n // if we actually produced a splash, that is...\n\n File manifest = helperTask.getManifest().getResolve().get();\n helperTask.getManifest().setManifest(nullifyIfNotExists(manifest));\n }", "abstract void setup();", "@Override\n public void apply(Project project) {\n if (!project.getPlugins().hasPlugin(\"li-pegasus2\")) {\n project.getPlugins().apply(PegasusPlugin.class);\n }\n\n // Mimic the pegasus plugin behavior. It crawls through source sets.\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n\n javaPluginConvention.getSourceSets().all(sourceSet -> {\n setupTasks(project, sourceSet);\n });\n }", "@Override\n public void init() throws IOException {\n ToDoData.getInstance().loadTasks();\n }", "@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }", "@Override\n public void configureTasks( ScheduledTaskRegistrar registrar ) {\n registrar.setScheduler( rhizomeScheduler() );\n }", "public static void init(){\r\n CommandBase.magazine.setSpeed(0.0);\r\n CommandBase.loader.setSpeed(0.0);\r\n Init.manualTankDrive.start(); \r\n Init.runCompressor.start();\r\n Init.stopGyroDrift.start();\r\n \r\n }", "public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }", "protected void setupLocal() {}" ]
[ "0.63280344", "0.61576927", "0.60836476", "0.5954433", "0.5930212", "0.5912727", "0.5863277", "0.58340704", "0.5768867", "0.5699654", "0.56738186", "0.56488305", "0.56423223", "0.5617882", "0.5567271", "0.55178964", "0.54951584", "0.5492928", "0.5482072", "0.5464663", "0.54578745", "0.5438094", "0.5429415", "0.54116374", "0.54076505", "0.5402386", "0.5366619", "0.5366191", "0.53647155", "0.5359204", "0.5359055", "0.5348756", "0.53329986", "0.53186023", "0.53130066", "0.53066945", "0.5293659", "0.528782", "0.528296", "0.52762747", "0.52753794", "0.5268631", "0.5267882", "0.52526003", "0.52323574", "0.52294785", "0.5228085", "0.519688", "0.51880527", "0.51874506", "0.51831156", "0.5178628", "0.5173623", "0.5165513", "0.51628834", "0.51593196", "0.51507527", "0.5148447", "0.5141531", "0.51362264", "0.5136014", "0.5133244", "0.5130139", "0.51183975", "0.51138425", "0.5112748", "0.51098454", "0.51086146", "0.5098385", "0.5091204", "0.50666976", "0.5066634", "0.50641096", "0.50596803", "0.5058471", "0.50442886", "0.50365", "0.5025595", "0.5024234", "0.5023563", "0.5020235", "0.5011392", "0.50036037", "0.5002876", "0.5000622", "0.4996448", "0.4993195", "0.49928668", "0.4991285", "0.49905896", "0.4989417", "0.4983856", "0.49833462", "0.49829262", "0.49823922", "0.49805072", "0.49793762", "0.4976649", "0.49709362", "0.49669245" ]
0.6117084
2
TODO Autogenerated method stub USER TABLE
@Override public void onCreate(SQLiteDatabase db) { String CREATE_USER_TABLE = "CREATE TABLE " + TABLE_USER + "(" + COLUMN_USER_NAME + " TEXT PRIMARY KEY,"+ COLUMN_WORKING_HOURS +" INT ," + COLUMN_WEEKEND + " INT"+ ")"; //COMPANY TABLE String CREATE_COMPANY_TABLE = "CREATE TABLE " + TABLE_COMPANY + "(" + COLUMN_COMPANY_NAME + " TEXT "+")"; //LOCATION TABLE String CREATE_LOCATION_TABLE = "CREATE TABLE " + TABLE_LOCATION + "(" + COLUMN_LOCATION_NAME + " TEXT"+")"; //LOCATION TABLE String CREATE_CLIENT_TABLE = "CREATE TABLE " + TABLE_CLIENT + "(" + COLUMN_CLIENT_NAME + " TEXT"+")"; String CREATE_TIMESHEET_TABLE = "CREATE TABLE " + TABLE_TIMESHEET + "(" + COLUMN_DATE + " TEXT PRIMARY KEY," + COLUMN_DAY + " TEXT," + COLUMN_TIME_IN + " TEXT," + COLUMN_TIME_OUT + " TEXT," + COLUMN_TOTAL_HOURS + " TEXT," + COLUMN_CLIENT + " TEXT," + COLUMN_LOCATION + " TEXT," + COLUMN_WORK_DONE + " TEXT," + COLUMN_REMARKS + " TEXT" + ")"; db.execSQL(CREATE_USER_TABLE); db.execSQL(CREATE_COMPANY_TABLE); db.execSQL(CREATE_LOCATION_TABLE); db.execSQL(CREATE_CLIENT_TABLE); db.execSQL(CREATE_TIMESHEET_TABLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }", "public void initializeUser() {\n try {\n Connection connection = connect();\n\n PreparedStatement createCategoryTable = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS user (\"\n + \"id INTEGER PRIMARY KEY, \"\n + \"username VARCHAR(100),\"\n + \"password VARCHAR(100),\"\n + \"UNIQUE(username, password)\"\n + \");\"\n );\n createCategoryTable.execute();\n createCategoryTable.close();\n\n connection.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void createTableUsers() {\n try (Statement statement = connection.createStatement()) {\n statement.executeUpdate(\"CREATE TABLE users ( \" +\n \"id INT NOT NULL PRIMARY KEY,\"\n + \"role_id INT NOT NULL,\"\n + \"FOREIGN KEY (role_id) REFERENCES roles (id),\"\n + \"username VARCHAR(256) NOT NULL UNIQUE,\"\n + \"firstname VARCHAR(256) NOT NULL,\"\n + \"lastname VARCHAR(256) NOT NULL,\"\n + \"email VARCHAR(256) NOT NULL,\"\n + \"dob VARCHAR(256) NOT NULL,\"\n + \"password VARCHAR(256) NOT NULL)\");\n\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n }\n }", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "private void initUser() {\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(KEY_CREATE_USER_TABLE);\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }", "@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public User() {\n\t\tsuper(\"User\", models.DefaultSchema.DEFAULT_SCHEMA);\n\t}", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public void setupUser() {\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "@Override\n\tpublic User viewUser(String nm) {\n\t\treturn userdao.viewUser(nm);\n\t}", "@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }", "public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }", "public List<User> user_list() throws HibernateException \r\n\t{ \r\n\t\tList <User> Lista_usuarios = null; \r\n\t \r\n\t try \r\n\t { \r\n\t iniciaOperacion(); //IMPORTANTE la query: se pide la clase realmnete Cliente! no la tabla que se ha creado\r\n\t Lista_usuarios= sesion.createQuery(\"FROM User\").list(); //creamos consulta de la tabla clientes (en plural)!\r\n\t }finally \r\n\t { \r\n\t sesion.close(); \r\n\t } \r\n\t return Lista_usuarios; \r\n\t}", "@Override\n\tpublic ArrayList<user> getAllUser() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}", "public void getAllUsers() {\n\t\t\n\t}", "@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }", "public User_accounts() {\n\n initComponents();\n tableModel = (DefaultTableModel) jTable1.getModel();\n loadUsers();\n\n }", "@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}", "public void insertUser() {}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}", "public void viewUser() {\n\t\tsuper.viewUser();\n\t}", "public void addUser(SPUser user, String tableName) { // tar inn user-tabellen\n\t try {\n\t myCon.execute(\"INSERT INTO \"+tableName+\" VALUES ('\"+ user.getUsername() +\"', '\"+ user.getPassword()+\"');\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "public List<User> getAllUser() {\n\t\treturn null;\r\n\t}", "public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }", "@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}", "public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "public JTable getJtUser() {\n\t\tif(jtUser==null){\n\t\t\tjtUser = new JTable( new ModeleTableUser());\n\t\t\tjtUser.setAutoCreateRowSorter(true);\n\t\t}\n\t\treturn jtUser;\n\t}", "@Override\r\n\tpublic List<User> getUserList() throws MyUserException {\n\t\treturn userDao.getUserList();\r\n\t}", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}", "@Override\n\tpublic Iterable<User> getAllUser() {\n\t\treturn userRepository.findAll();\n\t}", "private UserPrefernce(){\r\n\t\t\r\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public ArrayList<User> getAllUsersBD() {\n ArrayList<User> users = new ArrayList<>();\n Cursor cursor = this.db.query(TABLE_USER, new String[]{ID_USER, USERNAME, AUTH_KEY, PASSWORD_HASH, EMAIL, STATUS, DATA_REGISTO, DATA_ATUALIZADO},\n null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n User auxUser = new User(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2),\n cursor.getString(3), cursor.getString(4),\n cursor.getInt(5), cursor.getInt(6),\n cursor.getInt(7));\n users.add(auxUser);\n } while (cursor.moveToNext());\n }\n cursor.close();\n\n return users;\n }", "private void createTable() {\n try (Statement st = this.conn.createStatement()) {\n st.execute(\"CREATE TABLE IF NOT EXISTS users (user_id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, \"\n + \"login VARCHAR(100) UNIQUE NOT NULL, email VARCHAR(100) NOT NULL, createDate TIMESTAMP NOT NULL);\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}", "@Override\n\tpublic List<User> findUser() {\n\t\treturn userdao.findUser();\n\t}", "public List<User> getAllUsers() {\n\n\t\tList<User> result = new ArrayList<User>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsers);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tString query = \"SELECT IdGlobal, TCELLIP, PUBLICKEY, TCELLPORT from USER\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint UserGID =rs.getInt(1);\n\t\t\t\tString TCellIP = rs.getString(2);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(3);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString pubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\tint port = rs.getInt(4);\n\t\t\t\tUser user = new User(UserGID,TCellIP, port, pubKey);\n\t\t\t\tresult.add(user);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\n\t}", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "@Override\n\tpublic List<AdminUser> getAllUsers() {\n\t\treturn em.createQuery(\"SELECT r FROM AdminUser r order by user_id\").getResultList();\n\t}", "public static String getSQLForUserTableCreation() {\n return \"CREATE TABLE \" + USER_TABLE + \"(\" +\n USER_ID + \" varchar(8) PRIMARY KEY, \" +\n USER_LAST_NAME + \" varchar(32), \" +\n USER_FIRST_NAME + \" varchar(32), \" +\n USER_EMAIL + \" varchar(256), \" +\n USER_PASSWORD + \" varchar(64), \" +\n USER_IS_TEACHER + \" bool, \" +\n USER_GROUP + \" varchar(32))\";\n\n }", "@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }", "@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}", "public UserDAO() {\r\n\t\tsuper();\r\n\t\tthis.userStore.put(\"user\", new User(\"user\", \"user\"));\r\n\t}", "public void makeUser(String user){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(new StringBuilder().append(\"SELECT id, password, weight, height, weight_goal, step_goal FROM \" + TABLE_USERS + \" WHERE username = '\").append(user).append(\"'\").toString(), null);\n\n cursor.moveToFirst();\n\n User.setUsername(user);\n User.setUserID(cursor.getInt(0));\n User.setUserPassword(cursor.getString(1));\n User.setUserWeight(cursor.getString(2));\n User.setUserHeight(cursor.getString(3));\n User.setUserWeightGoal(cursor.getString(4));\n User.setUserStepGoal(cursor.getString(5));\n\n cursor.close();\n\n }", "public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}", "public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}", "void add(User user) throws SQLException;", "public ArrayList<User> getAllUser() \n {\n ArrayList<User> wordList;\n wordList = new ArrayList<User>();\n String selectQuery = \"SELECT * FROM UsersTable\";\n SQLiteDatabase database = this.getWritableDatabase();\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) \n {\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 return wordList;\n }", "public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}", "@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}", "@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}", "public void SetModel() {\n try {\n con = dc.connect();\n tb_User.setModel(user_model);\n stmt2 = con.createStatement();\n vtdata_user = new Vector();\n vtcolumn_user = new Vector();\n\n //Add Header for User Table Model\n vtcolumn_user.add(\"UserName\");\n vtcolumn_user.add(\"Full Name\");\n vtcolumn_user.add(\"Email\");\n vtcolumn_user.add(\"Birthday\");\n vtcolumn_user.add(\"Gender\");\n vtcolumn_user.add(\"Phone\");\n String sqlUser = \"select UserName,u_name,Email,BirthDate,Gender,Phone from tblUsers\";\n ResultSet rsUser = stmt2.executeQuery(sqlUser);\n\n\n\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(1));\n temp.add(rsUser.getString(2));\n temp.add(rsUser.getString(3));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(4)));\n boolean gender = rsUser.getBoolean(5);\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(6));\n vtdata_user.add(temp);\n }\n\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n tb_User.setModel(user_model);\n\n dc.disconnect(rsUser);\n dc.disconnect(stmt2);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }", "public QUser(Database server) {\n super(User.class, server);\n }", "public UsersInF() {\n initComponents();\n dao = new UsersDAO();\n loadTableUsers(dao.readAll());\n }", "public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "@Override\n\tpublic List<User> findAllUser() throws Exception {\n\t\treturn this.userDao.findAllUser();\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "void regist(User user) throws SQLException;", "@Override\n\tpublic List<SimpleUser> getAllSimpleUser() {\n\t\treturn dao.getAllSimpleUser();\n\t}", "public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}", "public List<user> getAllUser() {\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID,\n COLUMN_USER_EMAIL,\n COLUMN_USER_NAME,\n COLUMN_USER_PASSWORD\n };\n // sorting orders\n String sortOrder =\n COLUMN_USER_NAME + \" ASC\";\n List<user> userList = new ArrayList<user>();\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n // query the user table\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name;\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n null, //columns for the WHERE clause\n null, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n sortOrder); //The sort order\n\n\n // Traversing through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n user user = new user();\n user.setId(Integer.parseInt(cursor.getString(cursor.getColumnIndex(COLUMN_USER_ID))));\n user.setName(cursor.getString(cursor.getColumnIndex(COLUMN_USER_NAME)));\n user.setEmail(cursor.getString(cursor.getColumnIndex(COLUMN_USER_EMAIL)));\n user.setPassword(cursor.getString(cursor.getColumnIndex(COLUMN_USER_PASSWORD)));\n // Adding user record to list\n userList.add(user);\n } while (cursor.moveToNext());\n }\n cursor.close();\n db.close();\n\n // return user list\n return userList;\n }", "public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}", "public User getUserByID(long id)throws SQLException, ClassNotFoundException ;", "public void createUser(User user) {\n\n\t}", "@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}", "public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }", "public void buildUsers() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS users (id TEXT, name TEXT,\"\n + \" cell TEXT, password INT, stripe_id TEXT, url TEXT,\"\n + \" PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public List<User> findAllUser() {\n\t\treturn null;\n\t}" ]
[ "0.76641923", "0.71568066", "0.70681393", "0.6777116", "0.6729644", "0.66697085", "0.65963817", "0.6565623", "0.65625", "0.6541203", "0.652069", "0.65094084", "0.65037787", "0.6497684", "0.6491436", "0.6490347", "0.6477197", "0.6463965", "0.645146", "0.64448065", "0.64429826", "0.6435658", "0.6424546", "0.6414767", "0.6407234", "0.6407108", "0.63984096", "0.63891274", "0.6369439", "0.6363984", "0.6358721", "0.63585407", "0.63577753", "0.63534665", "0.63430613", "0.6337461", "0.631188", "0.6310933", "0.6310024", "0.6302991", "0.6302589", "0.6264254", "0.6251659", "0.62470645", "0.62398887", "0.6230246", "0.622836", "0.6206422", "0.6190106", "0.6187281", "0.6179863", "0.6178315", "0.61696076", "0.61681235", "0.6159591", "0.6155608", "0.6155212", "0.6137393", "0.6135521", "0.61354214", "0.6134395", "0.6131277", "0.6127601", "0.6119376", "0.61174005", "0.6110086", "0.61076", "0.61031467", "0.60985076", "0.6089805", "0.60738266", "0.60729617", "0.6063463", "0.60560435", "0.60542935", "0.6053443", "0.6041662", "0.6035051", "0.6032683", "0.6025101", "0.6024719", "0.6023622", "0.60206735", "0.60187775", "0.6017921", "0.60149777", "0.6009186", "0.600552", "0.6004303", "0.60012037", "0.6000018", "0.5998881", "0.59988266", "0.5996127", "0.5995954", "0.59906524", "0.5990258", "0.5989396", "0.5989297", "0.5989016", "0.5984602" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
StartUSER SPECIFIC DATA TRANSACTIONS//
public boolean addUserData (UserData userData) //ADD { ContentValues contentValues = new ContentValues(); contentValues.put(COLUMN_USER_NAME, userData.getUserName()); contentValues.put(COLUMN_WORKING_HOURS, userData.getWorkingHours()); contentValues.put(COLUMN_WEEKEND, userData.getWeekendType()); long result = db.insert(TABLE_USER, null, contentValues); db.close(); //Notifying if transaction was successful if(result == -1)return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void begin()\n {\n checkTransactionJoin();\n if (joinStatus != JoinStatus.NO_TXN)\n {\n throw new NucleusTransactionException(\"JTA Transaction is already active\");\n }\n\n UserTransaction utx;\n try\n {\n utx = getUserTransaction();\n }\n catch (NamingException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to obtain UserTransaction\", e);\n }\n\n try\n {\n utx.begin();\n }\n catch (NotSupportedException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to begin UserTransaction\", e);\n }\n catch (SystemException e)\n {\n throw ec.getApiAdapter().getUserExceptionForException(\"Failed to begin UserTransaction\", e);\n }\n\n checkTransactionJoin();\n if (joinStatus != JoinStatus.JOINED)\n {\n throw new NucleusTransactionException(\"Cannot join an auto started UserTransaction\");\n }\n userTransaction = utx;\n }", "void startTransaction();", "public void beginTransaction() {\n\r\n\t}", "public void transactionStarted() {\n transactionStart = true;\n }", "protected void startTopLevelTrx() {\n startTransaction();\n }", "@Override\n public void startTx() {\n \n }", "public int startTransaction();", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "void beginTransaction();", "public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}", "@Override\r\n\tpublic void initData() {\n\t\tThreadUtils.getSinglePool().execute(new Runnable() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException 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}", "@Override\n\tpublic void onTransactionStart() {}", "public TitanTransaction start();", "private void setUserData(){\n }", "@Override\n public void run() {\n User user = new UserSessionDataSource(MainActivity.this).SelectTableUser();\n Grua grua = new GruaSessionDataSource(MainActivity.this).SelectTableUser();\n if(user.getId() == -1)\n return;\n Toast.makeText(getApplicationContext(),\"Entrando en modo desconectado\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, InitActivity.class);\n intent.putExtra(Register.JSON_USER, user.toJSON());\n intent.putExtra(Register.JSON_GRUA, grua.toJSON());\n startActivity(intent);\n }", "@Override\r\n\t\t\t\tpublic boolean run() throws SQLException {\n\t\t\t\t\tString userName=\"\";\r\n\t\t\t\t\tString supplierName=\"\";\r\n\t\t\t\t\tMap<String, Object> variables = new HashMap<String, Object>();\r\n\t\t\t\t\tif (!StringUtil.isEmpty(fillupDate)) {\r\n\t\t\t\t\t\t// 根据userId去staff表里查出订单号\r\n\t\t\t\t\t\tRecord re = service.getOrderNumber(Integer.parseInt(userId));\r\n\t\t\t\t\t\tuserName=re.get(\"person_name\").toString();\r\n\t\t\t\t\t\tsupplierName=re.get(\"supplier_name\").toString();\r\n\t\t\t\t\t\tString orderNumber = re.getStr(\"order_num\");\r\n\t\t\t\t\t\tvariables.put(Constants.HR_STAFF_ATTENDANCE_FILLUP_DATE, fillupDate);\r\n\t\t\t\t\t\tvariables.put(Constants.HR_STAFF_ATTENDANCE_FILLUP_TIME, fillupTime);\r\n\t\t\t\t\t\tvariables.put(Constants.HR_STAFF_ATTENDANCE_CHECKINNUM, checkInNum);\r\n\t\t\t\t\t\tvariables.put(Constants.HR_STAFF_ATTENDANCE_ORDERNUM, orderNumber);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tSysOrg sysOrg = SysOrg.dao.getUserOrg(createBy);\r\n\t\t\t\t\t\tsupplierName=sysOrg.getName();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//判断该订单是否已经终止\r\n\t\t\t\t\tRecord rec=service.queryOrderStatus(orderNum);\r\n\t\t\t\t\tif(rec!=null) {\r\n\t\t\t\t\t\tString orderSignStatus = rec.getStr(\"order_sign_status\");\r\n\t\t\t\t\t\tif(\"终止\".equals(orderSignStatus)) {\r\n\t\t\t\t\t\t\t renderError(\"该订单已终止!\");\r\n\t\t\t\t\t\t\t return false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\t ActReProcdef actReProcdef = ActReProcdef.dao.getProcdef(tableName);\r\n\t\t\t\t\t// 启动流程\r\n\t\t\t\t\tProcessInstance activitiInfo = tasksService.startUp(actReProcdef.getKey(),tasksService.obtainJsonObjectFormKey(actReProcdef.getId(),userName,supplierName,orderNum,variables),null);\r\n\t\t\t\t\t// 判断是订单工作确认还是补打卡申请\r\n\t\t\t\t\tif (Constants.HR_STAFF_ATTENDANCE.equals(tableName)) {\r\n\t\t\t\t\t\t//不能提交当月的\r\n\t\t\t\t\t\tCalendar calendar = new GregorianCalendar();\r\n\t\t\t\t\t\t int month = calendar.get(Calendar.MONTH)+1;\r\n\t\t\t\t\t\t int year = calendar.get(Calendar.YEAR);\r\n\t\t\t\t\t\t String yearsub = attendanceDate.substring(0, 4);\r\n\t\t\t\t\t\t String monthsub = attendanceDate.substring(5,7);\r\n\t\t\t\t\t\t if(year==Integer.parseInt(yearsub)&&month==Integer.parseInt(monthsub)) {\r\n\t\t\t\t\t\t\t renderError(\"订单工作量确认只能提交当月之前的!\");\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\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 Boolean bo=service.proStaffWork(orderNum,attendanceDate);\r\n\t\t\t\t\t\t if(!bo) {\r\n\t\t\t\t\t\t\t renderError(\"工作量确认仅为项目实施日期内的工作投入。如需变更项目里程碑信息,请于项目信息列表中变更。\"); \r\n\t\t\t\t\t\t }\r\n\t\t\r\n\t\t\t\t\t\t// 判断补打卡申请是否处理完,若没有,工作量确认不能提交\r\n\t\t\t\t\t\tList<HrStaffAttendance> statusList = service.getfillupStatus(orderNum,\r\n\t\t\t\t\t\t\t\tattendanceDate.substring(0, 7));\r\n\t\t\t\t\t\tfor (HrStaffAttendance hrStaffAttendance : statusList) {\r\n\t\t\t\t\t\t\t// 只要有审批没通过的均不能提交工作量确认\r\n\t\t\t\t\t\t\tif (Constants.HR_FILLUP_ATTENDANCE_STATUS_FILLUP1.equals(hrStaffAttendance.getStatus())\r\n\t\t\t\t\t\t\t\t\t|| Constants.HR_FILLUP_ATTENDANCE_STATUS_FILLUP2\r\n\t\t\t\t\t\t\t\t\t\t\t.equals(hrStaffAttendance.getStatus())) {\r\n\t\t\t\t\t\t\t\trenderError(\"有未完成的补打卡申请单\");\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//判断该订单是否存在转场流程\r\n\t\t\t\t\t\tList<Record> reList = service.getTransStatus(orderNum,attendanceDate.substring(0, 7));\r\n\t\t\t\t\t\tif(reList!=null) {\r\n\t\t\t\t\t\t\tfor (Record record : reList) {\r\n\t\t\t\t\t\t\t\tif(record!=null) {\r\n\t\t\t\t\t\t\t\t\tString str = record.getStr(\"status_type\");\r\n\t\t\t\t\t\t\t\t\tif(str.equals(\"1\")) {\r\n\t\t\t\t\t\t\t\t\t\trenderError(\"该订单内有未完成的转场人员\");\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// 订单工作量走的审批流\r\n\t\t\t\t\t\tfor (String id : userId.split(\",\")) {\r\n\t\t\t\t\t\t\t// 将id为user员工的 ins_id 改为相同的ins_id :activitiInfo.getProcessInstanceId();\r\n\t\t\t\t\t\t\tint i = service.updateInstId(Integer.parseInt(id), activitiInfo.getProcessInstanceId());\r\n\t\t\t\t\t\t\tif (i > 0) {\r\n\t\t\t\t\t\t\t\trenderSuccess(\"工作量确认审批申请:提交成功!\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// 补打卡走的审批流 ins_id 改为activitiInfo.getProcessInstanceId()\r\n\t\t\t\t\t\tif(!StringUtil.isEmpty(fillupDate)) {\r\n\t\t\t\t\t\t\tint j = service.updateFillupInstId(fillupDate.substring(0, 7), Integer.parseInt(userId),\r\n\t\t\t\t\t\t\t\t\tactivitiInfo.getProcessInstanceId());\r\n\t\t\t\t\t\t\tif (j > 0) {\r\n\t\t\t\t\t\t\t\trenderSuccess(\"补打卡审批申请:提交成功!\");\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\tKv orderParam = Kv.by(\"number\", orderNum);\r\n\t\t\t\t\tSqlPara orderSqlParam = Db.getSqlPara(\"orderNum.getOrderNum\", orderParam);\r\n\t\t\t\t\tRecord orderRecords = Db.findFirst(orderSqlParam);\r\n\t\t\t\t\tif (orderRecords == null) {\r\n\t\t\t\t\t\trenderError(\"请核对改订单对应的行方负责人是否存在!\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tMap<String, Object> orderRecordMap = orderRecords.getColumns();\r\n\t\t\t\t\tString username = orderRecordMap.get(\"username\").toString();\r\n\t\t\t\t\tTask task = taskService.createTaskQuery().processInstanceId(activitiInfo.getProcessInstanceId())\r\n\t\t\t\t\t\t\t.singleResult();\r\n\t\t\t\t\tActivitiUtil.setUserTaskAssignee(task.getId(), username);\r\n\t\t\t\t\ttasksService.saveHistorical(activitiInfo.getProcessInstanceId(), null);\r\n\t\t\t\t\t// 发送邮件\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ttasksService.taskSendEmail(activitiInfo.getProcessInstanceId(), \"1\");\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tlogger.error(\"Exception: \", e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "@Override\n\tpublic void beginTransaction() {\n\t\tSystem.out.println(\"Transaction 1 begins\");\n\t\t\n\t\t/*String queryLock = \"LOCK TABLES hpq_mem READ;\";\n\t\t\n\t\tPreparedStatement ps;\n\t\ttry {\n\t\t\tconn.setAutoCommit(false);\n\t\t\tps = conn.prepareStatement(queryLock);\n\t\t\tps.execute();\n\t\t\tps = conn.prepareStatement(\"START TRANSACTION;\");\n\t\t\tps.execute();\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\t\n\t\tSystem.out.println(\"After obtaining readLock\");\n\t\t\n\t}", "void begin() throws org.omg.CosTransactions.SubtransactionsUnavailable;", "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 initData() throws Exception {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createOrganizationRoles(dm);\n createPaymentTypes(dm);\n createUserRoles(dm);\n supplier = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroupSup = new UserGroup();\n defaultGroupSup.setOrganization(supplier);\n defaultGroupSup.setIsDefault(true);\n defaultGroupSup.setName(\"default\");\n dm.persist(defaultGroupSup);\n technologyProvider = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER);\n UserGroup defaultGroupTP = new UserGroup();\n defaultGroupTP.setOrganization(technologyProvider);\n defaultGroupTP.setIsDefault(true);\n defaultGroupTP.setName(\"default\");\n dm.persist(defaultGroupTP);\n tpAndSup = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER,\n OrganizationRoleType.SUPPLIER);\n supplierAdminUser = Organizations.createUserForOrg(dm, supplier,\n true, \"admin\");\n supplier2 = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroup = new UserGroup();\n defaultGroup.setOrganization(supplier2);\n defaultGroup.setIsDefault(true);\n defaultGroup.setName(\"default\");\n dm.persist(defaultGroup);\n UserGroup defaultGroupTpAndSp = new UserGroup();\n defaultGroupTpAndSp.setOrganization(tpAndSup);\n defaultGroupTpAndSp.setIsDefault(true);\n defaultGroupTpAndSp.setName(\"default\");\n dm.persist(defaultGroupTpAndSp);\n Organizations.createUserForOrg(dm, supplier2, true, \"admin\");\n customer = Organizations.createCustomer(dm, supplier);\n UserGroup defaultGroup1 = new UserGroup();\n defaultGroup1.setOrganization(customer);\n defaultGroup1.setIsDefault(true);\n defaultGroup1.setName(\"default\");\n dm.persist(defaultGroup1);\n customer2 = Organizations.createCustomer(dm, supplier2);\n customerUser = Organizations.createUserForOrg(dm, customer,\n true, \"admin\");\n OrganizationReference onBehalf = new OrganizationReference(\n supplier, customer,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, supplier2,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier,\n technologyProvider,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, tpAndSup,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n return null;\n }\n });\n }", "public static void beginTransaction(int trans_id, String trans_type) {\n\n // System.out.println(\"beginTransaction\");\n long currTime = time;\n time++;\n Transaction txn = new Transaction(trans_id, currTime, trans_type);\n transactions.put(trans_id, txn);\n\n if (trans_type == \"RO\") {\n setVariableListForReadOnlyTxn(txn);\n System.out.println(\"T\" + trans_id + \" begins and is Read Only\");\n } else {\n System.out.println(\"T\" + trans_id + \" begins\");\n }\n\n\n }", "@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}", "protected abstract void startIndividualTrx();", "Transaction beginTx();", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tMasterBEnt masterBEnt = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tMasterBComp masterBComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAuZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> compDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wIiwicmF3S2V5VmFsdWVzIjpbIjEiLCIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciIsImphdmEubGFuZy5JbnRlZ2VyIl19\");\r\n\t\t\t\tMasterBCompComp masterBCompComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wLmRldGFpbEFFbnRDb2wiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tCollection<DetailAEnt> compCompDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp(), sameInstance(masterBComp)\", masterBEnt.getMasterBComp(), sameInstance(masterBComp));\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compDetailAEntCol))\", detailAEntCol, not(sameInstance(compDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compCompDetailAEntCol))\", detailAEntCol, not(sameInstance(compCompDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"compDetailAEntCol, not(sameInstance(compCompDetailAEntCol))\", compDetailAEntCol, not(sameInstance(compCompDetailAEntCol)));\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "IDbTransaction beginTransaction();", "private void insertRecord(String userName){\n\t\tLog.v(TAG, \"1\");\n\t\tLog.i(TAG, \"2\");\n\t\tLog.d(TAG, \"\");\n\t\tLog.w(\"Data printing.....\", \"3\");\n\t\tLog.e(\"Data printing.....\", \"\");\n\t}", "public TransID beginTransaction()\n {\n\t //TransID tid = new TransID();\n\t Transaction collect_trans = new Transaction(this);\n\t atranslist.put(collect_trans);\n\t return collect_trans.getTid();\n }", "@RequestMapping(method = RequestMethod.GET)\n public List<User> start()\n {\n userService.addUser(new User(rightService.getByName(\"USER\"),userGroupService.getByName(\"STUDENTS\"),login,password,token,mail));\n login=login+\" \"+inc;\n password=password+\" \"+inc;\n token=token+\" \"+inc;\n mail=mail+\" \"+inc;\n inc++;\n userService.addUser(new User(rightService.getByName(\"MODERATOR\"),userGroupService.getByName(\"TEACHERS\"),login,password,token,mail));\n login=login+\" \"+inc;\n password=password+\" \"+inc;\n token=token+\" \"+inc;\n mail=mail+\" \"+inc;\n inc++;\n userService.addUser(new User(rightService.getByName(\"USER\"),userGroupService.getByName(\"STUDENTS\"),login,password,token,mail));\n\n return userService.getAll();\n }", "@Override\n\t\tpublic void run() {\n\t\t\tif (runState != 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\trunState = 1;\n\t\t\t\tif (om == null) \n\t\t\t\t\tom = new OracleManager();\n\t\t\t\tResultSet rs = om.getTivoliData();\n\t\t\t\tif (rs == null) {\n\t\t\t\t\trunState = 0;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (sm == null)\n\t\t\t\t\tsm = new SybaseManager();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tif(!sm.insertTivoliData(rs)) { //如果插入数据失败,直接返回,等待下次插入\n\t\t\t\t\t\trunState = 0;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//如果修改失败,直接返回,下次重新插入和修改\n\t\t\t\t\t\tif (!om.setTivoliData(rs.getString(\"I_ID\"))) {\n\t\t\t\t\t\t\trunState = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trunState = 0;\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t\tlogger.error(\"执行错误:\" + ex.toString());\n\t\t\t\trunState = 0;\n\t\t\t}\n\t\t}", "private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void beginTransaction() throws Exception;", "private void startLoading() {\n\t\tJSONObject obj = new JSONObject();\r\n\t\tobj.put(\"userId\", new JSONString(User.id));\r\n\t\tobj.put(\"userSID\", new JSONString(User.SID));\r\n\t\tapi.execute(RequestType.GetUserInfo, obj, this);\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tDsDetails ds=dsDbHandler.getDsDetails(dsId);\n\t\t\t\tString entityName=ds.getName()+\"_\"+tbName;\n\t\t\t\tdataConfHandler.doDih(userName,coreName,entityName,\"entity\");\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) {\n\t\tUser client = new User(\"user_z\");\n\t\tProtocol objectTransit= new Protocol(99,client,client.name);\n\t\t\n\t\tconnectingServer=new DatabaseConnectorServer();\n\t\tconnectingServer.setupDatabaseConnectionPool(\"postgres\", \"squirrel\",\"localhost\", \"messaging\", 100,9000);\n\t\ttry{\n\t\t\tconnection_1=connectingServer.getDatabaseConnection();\n\t\t\t//checking if the connection that is returning is not closed\n\t\t\tif(!connection_1.isClosed()){\n\t\t\t\tSystem.out.println(\"conencted to database!!\");\n\t\t\t\t//the parameter in the print if the call of the method\n\t\t\t\t//inside that class that calls the store procedure\n//\t\t\t\tSystem.out.println(database.GetUser.execute_query(connection_1,\"user_1\"));\n\t\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\t\n\t\t\n//\t\tStep 1 check user in database\n\t\tString userID = database.GetUser.execute_query(connection_1, objectTransit.newUser.name);\n\t\t\n\t\tif(!userID.equals(\"\")){\n\t\t\tSystem.out.println(\"this user already exist\");\n\n\t\t}else{\n\t\t\tUser newUser=objectTransit.newUser;\n\t\t\tdatabase.CreateNewUser.execute_query(connection_1, newUser);\n\n\t\t}\n\t}", "@Override\n\tprotected void initData() {\n\t\trequestUserInfo();\n\t}", "@Override\r\n\tpublic int insertData(UserVO userVO) {\n\t\treturn 0;\r\n\t}", "public void flushData (){\n\t\tTransaction tx = this.pm.currentTransaction();\n\t\ttry {\n\t\t\tif (this.pm.currentTransaction().isActive ()){\n\t\t\t\tthis.pm.currentTransaction().commit();\n\t\t\t}\n\t\t} catch (Exception e){\n\t\t\tApplication.getLogger ().error (\"Error flushing data for persistence. \", e);\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n//\t\ttx.begin();\n\t}", "public void start() {\n Date dataCorr;\n\n try { // prova ad eseguire il codice\n for (int codConto : codiciConto) {\n quanti++;\n dataCorr = dataInizio;\n while (Lib.Data.isPrecedenteUguale(dataFine, dataCorr)) {\n creaAddebitiGiornoConto(dataCorr, codConto);\n dataCorr = Lib.Data.add(dataCorr, 1);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n break;\n }// fine del blocco if\n\n }// fine del blocco while\n }// fine del blocco for\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public Transaction startTransaction(){\n\t\ttr = new Transaction(db);\n\t\treturn tr;\n\t}", "public boolean transactionStarted();", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "public synchronized void writeStart(Transaction t) {\n\t\tpw.println(t.transactionId() + \" start\");\n\t}", "@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}", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "@Override\n public void setUp() throws Exception\n {\n transactionService = (TransactionService) ctx.getBean(\"TransactionService\");\n subscriptionService = (SubscriptionService) ctx.getBean(\"SubscriptionService\");\n personService = (PersonService) ctx.getBean(\"PersonService\");\n\n AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());\n\n txn = transactionService.getNonPropagatingUserTransaction(false);\n txn.begin();\n\n createPerson(USER_BOB);\n createPerson(USER_TOM);\n createPerson(USER_LISA);\n }", "private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}", "public void userListStart() {\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tuserList.add(userServices.getAllUsers()[i]);\n\t\t}\n\t}", "private void handleTransaction() throws Exception {\r\n\t\tString receiver;\r\n\t\tString amount;\r\n\t\tMessage sendTransaction = new Message().addData(\"task\", \"transaction\").addData(\"message\", \"do_transaction\");\r\n\t\tMessage response;\r\n\r\n\t\tthis.connectionData.getTerminal().write(\"enter receiver\");\r\n\t\treceiver = this.connectionData.getTerminal().read();\r\n\r\n\t\t// tries until a amount is typed that's between 1 and 10 (inclusive)\r\n\t\tdo {\r\n\t\t\tthis.connectionData.getTerminal().write(\"enter amount (1-10)\");\r\n\t\t\tamount = this.connectionData.getTerminal().read();\r\n\t\t} while (!amount.matches(\"[0-9]|10\"));\r\n\r\n\t\t// does the transaction\r\n\t\tsendTransaction.addData(\"receiver\", this.connectionData.getAes().encode(receiver)).addData(\"amount\",\r\n\t\t\t\tthis.connectionData.getAes().encode(amount));\r\n\r\n\t\tthis.connectionData.getConnection().write(sendTransaction);\r\n\r\n\t\tresponse = this.connectionData.getConnection().read();\r\n\t\tif (response.getData(\"message\").equals(\"success\")) {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction done\");\r\n\t\t} else {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction failed. entered correct username?\");\r\n\t\t}\r\n\t}", "public String _setuser(b4a.HotelAppTP.types._user _u) throws Exception{\n_types._currentuser.username = _u.username;\n //BA.debugLineNum = 168;BA.debugLine=\"Types.currentuser.password = u.password\";\n_types._currentuser.password = _u.password;\n //BA.debugLineNum = 169;BA.debugLine=\"Types.currentuser.available = u.available\";\n_types._currentuser.available = _u.available;\n //BA.debugLineNum = 170;BA.debugLine=\"Types.currentuser.ID = u.ID\";\n_types._currentuser.ID = _u.ID;\n //BA.debugLineNum = 171;BA.debugLine=\"Types.currentuser.TypeOfWorker = u.TypeOfWorker\";\n_types._currentuser.TypeOfWorker = _u.TypeOfWorker;\n //BA.debugLineNum = 172;BA.debugLine=\"Types.currentuser.CurrentTaskID = u.CurrentTaskID\";\n_types._currentuser.CurrentTaskID = _u.CurrentTaskID;\n //BA.debugLineNum = 173;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void loadAllUserData(){\n\n }", "private void startTransaction() throws CalFacadeException {\n if (transactionStarted) {\n return;\n }\n\n getSvc().open();\n getSvc().beginTransaction();\n transactionStarted = true;\n }", "private void remplirUtiliseData() {\n\t}", "@Override\r\n\tpublic void windowstartUpData() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "@Override\n public void run() {\n P2PContext.getInstance().createShardProfilePreferences();\n String userId = P2PContext.getLoggedInUser();\n String deviceId = P2PContext.getCurrentDevice();\n DBSyncManager.getInstance(that).upsertUser(userId, deviceId, \"Photo Message\");\n that.manager.notifyUI(\"Added user -> \" + userId, \" --------> \", LOG_TYPE);\n that.manager.startBluetoothBased();\n }", "@Override\r\n\t@Transactional(rollbackFor=Exception.class)\r\n\tpublic int insertUser(TUsers users) {\n\t\tdao.insertUser(users);\r\n\t\tint i=10/0;\r\n\t\tdao.insertUser(users);\r\n\t\treturn users.getId();\r\n\t}", "public boolean subIn(DTOSet lineSet,SfUserDTO user,int groupId ,String groupName,String orderExecuter,String orderFiler){\r\n\t \tboolean autoCommit=false;\r\n\t \tboolean operateResult=false;\r\n\t \tZeroTurnModel model = (ZeroTurnModel) sqlProducer;\r\n\t ZeroTurnHeaderDTO headerDTO=(ZeroTurnHeaderDTO)dtoParameter;\r\n\t String trnasStatus=headerDTO.getTransStatus();\r\n\t String transId=headerDTO.getTransId();\r\n\t String computeDays=headerDTO.getComputeTims();//执行周期\r\n\t \ttry {\r\n\t \tautoCommit = conn.getAutoCommit();\r\n\t conn.setAutoCommit(false);\r\n\t if (trnasStatus.equals(\"PRE_ASSETS\")&&!computeDays.equals(\"\")) {\r\n\t \tisExsitSegment();//添加零购工程\r\n\t \toperateResult=createTmpData(lineSet, user,groupId,groupName, headerDTO, orderExecuter, orderFiler,transId);\r\n\t\t\t}else{\r\n\t\t\t\toperateResult=true;\r\n\t\t\t}\r\n\t\t} catch (DataHandleException 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 (QueryException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (operateResult) {\r\n\t\t\t\t\tconn.commit();\r\n\t\t\t autoCommit=true;\r\n\t\t\t } else {\r\n\t\t\t conn.rollback();\r\n\t\t\t }\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n \treturn autoCommit;\r\n }", "@Before\n public void fillSomeDataIntoOurDb() {\n entityManager.persist(user);\n }", "public UserData(int userId, String username){\n isBusy = false;\n\n\t projects = new ArrayList<>();\n//\t projsInTmp = new ArrayList<>();\n//\t tasksInTmp = new ArrayList<>();\n\n\t\tthis.currentOperatorNetkey = 0;\n\t\tthis.userId = userId;\n\t this.username = username;\n }", "@Override\n public void run() {\n Cursor cursor = getFromTableById(DbTables.TABLE_USER, \"id=?\", id_user);\n\n User user = (User) DbUtility.cursorToClass(cursor, User.class.getName());\n\n if (user == null) {\n log.info(\"User is null. Can't load the user\");\n/*finish()?*/\n\n } else {\n /*find his personal data*/\n Integer id_pd = user.getId_pd();\n\n if (id_pd == null) {\n log.info(\"User has no personal data. Can't load the user\");\n\n\n } else {\n cursor = getFromTableById(DbTables.TABLE_PERSONAL_DATA, \"id=?\", id_pd);\n\n log.info(\"Cursor is \" + cursor.getCount());\n\n personalData = (PersonalData) DbUtility.cursorToClass(cursor, PersonalData.class.getName());\n if (personalData == null) {\n log.info(\"User's personal data is null. Can't load the data\");\n\n\n } else {\n Integer id_tp = personalData.getId_tp();\n\n if (id_tp == null) {\n log.info(\"Address is null\");\n } else {\n /*find address*/\n cursor = getFromTableById(DbTables.TABLE_ADDRESS, \"id=?\", id_tp);\n\n address = (Address) DbUtility.cursorToClass(cursor, Address.class.getName());\n }\n\n\n Integer id_wp = personalData.getId_wp();\n\n /*find workplace*/\n if (id_wp == null) {\n log.info(\"Workplace is null\");\n } else {\n cursor = getFromTableById(DbTables.TABLE_WORKPLACE, \"id=?\", id_wp);\n workplace = (Workplace) DbUtility.cursorToClass(cursor, Workplace.class.getName());\n }\n\n\n /*get phone numbers*/\n /*cursor = getFromTableById(\"phone_number\",\"id_pd=?\", id_pd);\n*/\n }\n\n }\n\n cursor.close();\n /*set to text view*/\n handler.post(runSetTextViews);\n }\n\n }", "public void start(String filenameA , String filenameB){\n\t\t\n\t\t// READ DATA\n\t\treadKeyDataToIdentifyTransactions();\n\t\treadDataFromUserLog(userData,filenameA);\n\t\treadDataFromUserLog(userData,filenameB);\n\t\t\n\t\t//Enable the below to print the data read from the files\n\t\t//printData(userData);\n\t\t\t\t\n\t\t// ADD DATA TO RESPECTIVE SETS\n\t\tcategorizeData();\t\t\n\t\t\t\n\t\t// GIVE RECOMMENDATION\n\t\tprintRecommendation();\n\t}", "protected void startProcessAndCompleteUserTask() {\n runtimeService.startProcessInstanceByKey(\"HistoryLevelTest\");\n Task task = taskService.createTaskQuery().singleResult();\n taskService.complete(task.getId());\n }", "public void start()\n\t{\n\t\taskUser();\n\t\tloop();\n\n\t}", "void doTransaction (Redis redis) {\n\t \tswitch (redis.EXEC()) {\n\t \tcase OK:\n\t \tbreak;\n\t \tcase FAIL:\n \t\t\tdiscardTransaction(redis);\n\t\t\tbreak;\n\t \t}\n\t}", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public interface IUserTransactionOperation {\n\n /**\n * Add the new invited transaction into this user's list\n * @param transaction the new invited transaction\n */\n void addInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Remove the new invited transaction into this user's list\n * @param transaction the invited transaction which is needed to be removed\n */\n void removeInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Used to receive transaction from one user.\n * @param meeting the transaction information which is used for two user.\n */\n void receiveTransaction(IMeeting meeting, String userId);\n\n\n /**\n * Used to edit the specific information about transaction.\n * @param trans the transaction information which is used for two user.\n * @param tradeItem the item which is users want to trade\n * @param time the meeting time of trading\n * @param place the meeting type of trading\n * @param tradeType the trading type of this transaction\n */\n void editTransaction(ITransaction trans, ItemInterface tradeItem, String time, String place\n , String tradeType, IUserAccount user);\n\n /**\n * Send the one way transaction information to target user.\n * @param target the user who start user want to trade with.\n * @param trans the one way transaction between this user and target user\n */\n void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);\n\n /**\n * Confirm this transaction and change the value of confirmRealWorldTrade\n * @param trans the transaction information which is used for two user.\n */\n void confirmRealWorldTrade(IUserAccount user, ITransaction trans);\n\n /**\n * Confirm this transaction and change the value of confirmTrans\n * @param trans the transaction information which is used for two user.\n\n */\n void confirmTrans(ITransaction trans);\n\n void declineTrans(ITransaction trans) ;\n\n /**\n * Add the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to add\n */\n void addConfirmedTransaction(int transId, String userId);\n\n /**\n * Remove the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to remove\n */\n void removeConfirmedTransaction(int transId, String userId);\n\n /**\n * this method is used for targetUser to perform final confirm of the transaction.\n * @param trans the transaction need to get a final confirm.\n */\n void finalConfirm(ITransaction trans,boolean confirmation, String userId);\n\n void addUserItemRating(IUserAccount user, int ItemId, int rating);\n}", "public Transaction startTransaction() {\r\n return getManager().startTransaction();\r\n }", "@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic int execute() throws Exception {\n\t\t System.out.println(\"--------------------Start InitConfirmUpdTHTDOpStep--\");\n\t\tlocale = (Locale) getContext().getValueAt(\"dse_locale\");\n\t\tsql = new Sql(locale.toString().toUpperCase());\n\t\t\n\t\tinitAcctNbrNoList(getContext());\n\t\tinitCalperiodList(getContext());\n\t\tinitInfo(getContext());\n\t\treturn 0;\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tCursor result = null;\n\t\t\t\tUserEmotion rValue = null;\n\n\t\t\t\tString projection[] = dataContract.USER_COLUMNS;\n\t\t\t\tString selection = dataContract.Col._ID + \" LIKE ? AND \"\n\t\t\t\t\t\t+ dataContract.Col._OWNERID + \" LIKE ? \";\n\t\t\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tresult = mDB.query(dataContract.TABLE_USER, projection,\n\t\t\t\t\t\t\tselection, args, null, null, null);\n\n\t\t\t\t\tLog.i(tag, \"# of row: \" + result.getCount());\n\t\t\t\t\tif (result != null && result.moveToFirst()) {\n\t\t\t\t\t\trValue = getUserDataFromCursor(result);\n\t\t\t\t\t\tresult.close();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (rValue == null) {\n\t\t\t\t\t\tContentValues values = new ContentValues();\n\n\t\t\t\t\t\tvalues.put(dataContract.Col._ID, giftId);\n\t\t\t\t\t\tvalues.put(dataContract.Col._OWNERID, userId);\n\t\t\t\t\t\tvalues.put(dataContract.Col._TOUCHED, 0);\n\t\t\t\t\t\tvalues.put(dataContract.Col._INPROP, 0);\n\t\t\t\t\t\tvalues.put(dataContract.Col._OBSCENE, 0);\n\t\t\t\t\t\tlong row = mDB.insert(dataContract.TABLE_USER, null, values);\n\n\t\t\t\t\t\tresult = mDB.query(dataContract.TABLE_USER, projection,\n\t\t\t\t\t\t\t\tselection, args, null, null, null);\n\t\t\t\t\t\t\n\t\t\t\t\t\tLog.i(tag, \"# of row: \" + row + \" query result: \" + result.getCount());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (result != null && result.moveToFirst()) {\n\t\t\t\t\t\t\trValue = getUserDataFromCursor(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tMessage msg = Message.obtain(handler,\n\t\t\t\t\t\t\tPotlatchMsg.QUERY_USERDATA.getVal());\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.putSerializable(PotlatchConst.query_user_data,\n\t\t\t\t\t\t\trValue);\n\t\t\t\t\tmsg.setData(b);\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\tresult.close();\n\t\t\t\t}\n\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tLog.d(tag, e.getMessage());\n\t\t\t\t}\n\t\t\t}", "private void startSession(String userPin) {\n\t\tPunchInEvent punchIn = new PunchInEvent(this, CommonUtils.selectUserId(userPin));\n\n\t\tpunchIn.sendSessionStartEvent();\n\t\tpunchIn.doPunch(UserWorkStatusLogs.PUNCH_IN);\n\n\t}", "public void run() {\n progressDialog.dismiss();\n insertUser();\n //userLogin();\n // onLoginSuccess();\n // onLoginFailed();\n\n }", "@Override\n\tpublic Integer insertUserIntoUsersTable(final String username, final String password) \n\t{\n\t\treturn executeTransaction(new Transaction<Integer>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic Integer execute(Connection conn) throws SQLException \n\t\t\t{\n\t\t\t\tPreparedStatement stmt1 = null;\n\t\t\t\tPreparedStatement stmt2 = null; \n\t\t\t\tPreparedStatement stmt3 = null; \t\n\t\t\t\t\n\t\t\t\tResultSet resultSet1 = null;\t\n\t\t\t\tResultSet resultSet3 = null; \n\t\t\t\t\n\t\t\t\t// for saving user ID\n\t\t\t\tInteger user_id = -1;\n\t\t\t\t\n\t\t\t\t// try to retrieve user_ID (if it exists) from DB, for username passed into query\n\t\t\t\ttry {\n\t\t\t\t\tstmt1 = conn.prepareStatement(\n\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t);\n\t\t\t\t\tstmt1.setString(1, username);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// execute the query, get the result\n\t\t\t\t\tresultSet1 = stmt1.executeQuery();\n\n\t\t\t\t\t\n\t\t\t\t\t// if user was found then inform the user \t\t\t\t\t\n\t\t\t\t\tif (resultSet1.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tuser_id = -1; \n\t\t\t\t\t\tSystem.out.println(\"Username already taken\");\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Creating new user\");\n\t\t\t\t\n\t\t\t\t\t\t// insert new user\n\t\t\t\t\t\tif (user_id <= 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// prepare SQL insert statement to add user to users table\n\t\t\t\t\t\t\tstmt2 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"insert into users (username, password) \" +\n\t\t\t\t\t\t\t\t\t\" values(?, ?) \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt2.setString(1, username);\n\t\t\t\t\t\t\tstmt2.setString(2, password);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// execute the update\n\t\t\t\t\t\t\tstmt2.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Get the new user's id\n\t\t\t\t\t\t\tstmt3 = conn.prepareStatement(\n\t\t\t\t\t\t\t\t\t\"select user_id from users \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where username = ? \"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstmt3.setString(1, username);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//execute query and get result\n\t\t\t\t\t\t\tresultSet3 = stmt3.executeQuery(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//should only be one value \n\t\t\t\t\t\t\tresultSet3.next(); \n\t\t\t\t\t\t\tuser_id = resultSet3.getInt(1); \n\t\t\t\t\t\t\tSystem.out.println(\"New user added\");\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn user_id;\n\t\t\t\t} \n\t\t\t\tfinally \n\t\t\t\t{\n\t\t\t\t\tDBUtil.closeQuietly(resultSet1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt1);\n\t\t\t\t\tDBUtil.closeQuietly(stmt2);\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void doJob() {\n if(User.count() == 0) {\n\t // Create classification dimensions\n\t ClassificationDimension whatDimension = new\n\t\t\t ClassificationDimension(\"What\", ClassificationDimension.WHAT_DIMENSION_ID);\n\t ClassificationDimension whereDimension = new\n\t\t\t ClassificationDimension(\"Where\", ClassificationDimension.WHERE_DIMENSION_ID);\n\t whatDimension.save();\n\t whereDimension.save();\n\n\t // Admin user\n\t User admin = new User(ADMIN_USER_EMAIL, ADMIN_USER_PASSWORD);\n\t admin.name = \"Admin user\";\n\t admin.save();\n\n\t // Tester user\n\t User tester = new User(TEST_USER_EMAIL, TEST_USER_PASSWORD);\n\t\t tester.name = \"Test user\";\n\t\t tester.save();\n\n\t // Tutorial user\n\t User tutorial = new User(TUTORIAL_USER_EMAIL, TUTORIAL_USER_PASSWORD);\n\t tutorial.name = \"Tutorial user\";\n\t tutorial.save();\n\n\t // First RCA case\n\t RCACase firstRCACase = new RCACase(tester);\n\t firstRCACase.caseName = \"\";\n\t firstRCACase.caseName = \"Test RCA case\";\n\t\t\tfirstRCACase.caseTypeValue = 2;\n\t\t\tfirstRCACase.caseGoals = \"Save the world\";\n\t\t\tfirstRCACase.companySizeValue = 2;\n\t\t\tfirstRCACase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tfirstRCACase.isMultinational = true;\n\t\t\tfirstRCACase.companyName = \"WiRCA\";\n\t\t\tfirstRCACase.companyProducts = \"ARCA-tool\";\n\t\t\tfirstRCACase.isCasePublic = true;\n\n\t // Problem of the first RCA case\n\t firstRCACase.problem = new Cause(firstRCACase, firstRCACase.caseName, tester).save();\n\t firstRCACase.save();\n\t tester.addRCACase(firstRCACase);\n\t tester.save();\n\t \n\t Cause testNode1 = firstRCACase.problem.addCause(\"test node 1\", tester);\n\t\t\ttestNode1.xCoordinate = -100;\n\t\t\ttestNode1.save();\n\t Cause testNode2 = firstRCACase.problem.addCause(\"test node 2\", tester);\n\t Cause testNode3 = testNode1.addCause(\"test node 3\", tester);\n\t\t\ttestNode3.xCoordinate = -75;\n\t\t\ttestNode3.save();\n\t Cause testNode4 = testNode1.addCause(\"test node 4\", tester);\n\t Cause testNode5 = testNode1.addCause(\"test node 5\", tester);\n\t\t\ttestNode5.xCoordinate = -200;\n\t\t\ttestNode5.save();\n\t Cause testNode6 = testNode2.addCause(\"test node 6\", tester);\n\t\t\ttestNode6.xCoordinate = 0;\n\t\t\ttestNode6.save();\n\t Cause testNode7 = testNode5.addCause(\"test node 7\", tester);\n\t Cause testNode8 = testNode4.addCause(\"test node 8\", tester);\n\t\t\ttestNode8.xCoordinate = 0;\n\t\t\ttestNode8.save();\n\t Cause testNode9 = testNode5.addCause(\"test node 9\", tester);\n\t\t\ttestNode9.xCoordinate = -100;\n\t\t\ttestNode9.save();\n\t Cause testNode10 = testNode9.addCause(\"test node 10\", tester);\n\t testNode7.addCause(testNode3);\n\t testNode8.addCause(testNode6);\n\t testNode10.addCause(testNode6);\n\n\t // Some classifications for \"firstRCACase\"\n\t Classification testClassification1 = new Classification(firstRCACase,\"Management\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"MA\", \"MA\");\n\t Classification testClassification2 = new Classification(firstRCACase,\"Software Testing\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"ST\", \"ST\");\n\t Classification testClassification3 = new Classification(firstRCACase,\"Implementation Work\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"IM\", \"IM\");\n\t Classification testClassification4 = new Classification(firstRCACase,\"Work Practices\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"WP\", \"WP\");\n\t Classification testClassification5 = new Classification(firstRCACase,\"Methods\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"ME\", \"ME\");\n\t Classification testClassification6 = new Classification(firstRCACase,\"Task Priority\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"TP\", \"TP\");\n\t Classification testClassification7 = new Classification(firstRCACase,\"Monitoring\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"MO\", \"MO\");\n\t Classification testClassification8 = new Classification(firstRCACase,\"Co-operation\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"CO\", \"CO\");\n\t testClassification1.save();\n\t testClassification2.save();\n\t testClassification3.save();\n\t testClassification4.save();\n\t testClassification5.save();\n\t testClassification6.save();\n\t testClassification7.save();\n\t testClassification8.save();\n\n\t ClassificationPair pair = new ClassificationPair(testClassification1, testClassification4);\n\t pair.save();\n\t SortedSet<ClassificationPair> set1 = new TreeSet<ClassificationPair>();\n\t set1.add(pair);\n\t testNode1.setClassifications(set1);\n\t testNode1.save();\n\n\t ClassificationPair pair2 = new ClassificationPair(testClassification1, testClassification4);\n\t pair2.save();\n\t SortedSet<ClassificationPair> set2 = new TreeSet<ClassificationPair>();\n\t set2.add(pair2);\n\t testNode2.setClassifications(set2);\n\t testNode2.save();\n\n final Calendar calendar = Calendar.getInstance();\n RCACase adminsPrivateCase = new RCACase(admin);\n\t adminsPrivateCase.caseName = \"\";\n\t adminsPrivateCase.caseName = \"Admin's private RCA case\";\n\t adminsPrivateCase.caseTypeValue = 2;\n\t\t\tadminsPrivateCase.caseGoals = \"Test the program\";\n\t\t\tadminsPrivateCase.companySizeValue = 2;\n\t\t\tadminsPrivateCase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tadminsPrivateCase.isMultinational = true;\n\t\t\tadminsPrivateCase.companyName = \"WiRCA\";\n\t\t\tadminsPrivateCase.companyProducts = \"ARCA-tool\";\n\t adminsPrivateCase.isCasePublic = false;\n\t adminsPrivateCase.problem = new Cause(adminsPrivateCase, adminsPrivateCase.caseName, admin).save();\n calendar.set(2011,Calendar.DECEMBER,02,11,31);\n adminsPrivateCase.created = calendar.getTime();\n adminsPrivateCase.save();\n\t admin.addRCACase(adminsPrivateCase);\n\t admin.save();\n\t tester.addRCACase(adminsPrivateCase);\n\t tester.save();\n\n\t RCACase adminsOwnPrivateCase = new RCACase(admin);\n adminsOwnPrivateCase.caseName = \"\";\n adminsOwnPrivateCase.caseName = \"Admin's own private RCA case\";\n adminsOwnPrivateCase.caseTypeValue = 2;\n adminsOwnPrivateCase.caseGoals = \"Test the program\";\n adminsOwnPrivateCase.companySizeValue = 2;\n adminsOwnPrivateCase.description = \"We are going to save the world with our ARCA-tool!\";\n adminsOwnPrivateCase.isMultinational = true;\n adminsOwnPrivateCase.companyName = \"WiRCA\";\n\t adminsOwnPrivateCase.companyProducts = \"ARCA-tool\";\n adminsOwnPrivateCase.isCasePublic = false;\n adminsOwnPrivateCase.problem = new Cause(adminsOwnPrivateCase, adminsOwnPrivateCase.caseName, admin).save();\n calendar.set(2012,Calendar.JUNE,05,10,30);\n adminsOwnPrivateCase.created = calendar.getTime();\n adminsOwnPrivateCase.save();\n admin.addRCACase(adminsOwnPrivateCase);\n admin.save();\n\n\t RCACase adminsPublicCase = new RCACase(admin);\n\t adminsPublicCase.caseName = \"\";\n\t adminsPublicCase.caseName = \"Admin's public RCA case\";\n\t adminsPublicCase.caseTypeValue = 2;\n\t\t\tadminsPublicCase.caseGoals = \"Test the program\";\n\t\t\tadminsPublicCase.companySizeValue = 2;\n\t\t\tadminsPublicCase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tadminsPublicCase.isMultinational = true;\n\t\t\tadminsPublicCase.companyName = \"WiRCA\";\n\t\t\tadminsPublicCase.companyProducts = \"ARCA-tool\";\n\t adminsPublicCase.isCasePublic = true;\n\t adminsPublicCase.problem = new Cause(adminsPublicCase, adminsPublicCase.caseName, admin).save();\n calendar.set(2011,Calendar.DECEMBER,6,22,12);\n adminsPublicCase.created = calendar.getTime();\n adminsPublicCase.save();\n\t admin.addRCACase(adminsPublicCase);\n\t admin.save();\n\t tester.addRCACase(adminsPublicCase);\n\t tester.save();\n\n\n\t Classification classification1 = new Classification(adminsPublicCase,\"Management\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"MA\", \"MA\");\n\t Classification classification2 = new Classification(adminsPublicCase,\"Software Testing\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"ST\", \"ST\");\n\t Classification classification3 = new Classification(adminsPublicCase,\"Implementation Work\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"IM\", \"IM\");\n\t Classification classification4 = new Classification(adminsPublicCase,\"Work Practices\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"WP\", \"WP\");\n\t Classification classification5 = new Classification(adminsPublicCase,\"Methods\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"ME\", \"ME\");\n\t Classification classification6 = new Classification(adminsPublicCase,\"Task Priority\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"TP\", \"TP\");\n\t Classification classification7 = new Classification(adminsPublicCase,\"Monitoring\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"MO\", \"MO\");\n\t Classification classification8 = new Classification(adminsPublicCase,\"Co-operation\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"CO\", \"CO\");\n\t classification1.save();\n\t classification2.save();\n\t classification3.save();\n\t classification4.save();\n\t classification5.save();\n\t classification6.save();\n\t classification7.save();\n\t classification8.save();\n\n\t //new TutorialRCACaseJob().doJob(tester, true);\n\t new TutorialRCACaseJob().doJob(tutorial,true);\n\n\t }\n }", "@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }", "private Transaction setUpTransaction(double amount, Transaction.Operation operation, String username){\n Transaction transaction = new Transaction();\n transaction.setDate(Date.valueOf(LocalDate.now()));\n transaction.setAmount(amount);\n transaction.setOperation(operation);\n transaction.setUserId(userRepository.getByUsername(username).getId());\n return transaction;\n }", "@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}", "@Override\n public void begin() throws NotSupportedException, SystemException {\n SimpleTransaction txn = getTransaction();\n int status = txn.getStatus();\n if (status == Status.STATUS_COMMITTED || status == Status.STATUS_ROLLEDBACK || status == Status.STATUS_UNKNOWN\n || status == Status.STATUS_ACTIVE)\n txn.setStatus(Status.STATUS_ACTIVE);\n else\n throw new IllegalStateException(\"Can not begin \" + txn);\n }", "@Override\r\n\t@Transactional\r\n\tpublic void doService() {\n\t\tTbookingrecord booking = new Tbookingrecord();\r\n\t\tbooking.setId(Long.valueOf(31622L));\r\n\t\tbooking.setInstrumentid(2);\r\n\t\tbooking.setUserid(3);\r\n\t\tmappper.insertSelective(booking);\r\n\t\tlogger.debug(booking);\r\n\t\t//int i = 1/0;\r\n\t}", "public void beginTransaction() throws TransactionException {\n\t\t\r\n\t}", "@Override\r\n\t\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\r\n\t\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\t\tsqlLogInspetor.enable();\r\n\r\n\t\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA());\r\n\t\t\t\t\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA().getTime());\r\n\r\n\t\t\t\t\tPlayerManagerTest.this.manager.overwriteConfigurationTemporarily(PlayerManagerTest.this.manager\r\n\t\t\t\t\t\t\t.getConfig().clone().configSerialiseBySignatureAllRelationship(true));\r\n\r\n\t\t\t\t\tPlayerSnapshot<MasterAEnt> playerSnapshot = PlayerManagerTest.this.manager\r\n\t\t\t\t\t\t\t.createPlayerSnapshot(masterAEnt);\r\n\r\n\t\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\t\tPlayerManagerTest.this.manager.getConfig().getObjectMapper().writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsqlLogInspetor.disable();\r\n\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "public void openTheTransaction() {\n openTransaction();\n }", "public int insertUser(String uname, String upassword, int uscore,\n\t\t\tString ulastname, String ufirstname, String ubirthdate,\n\t\t\tString uemail, String ucity, String website, int flag) {\n\n\t\tif (flag == 0) {\n\t\t\tSystem.out.println(uscore);\n\t\t\tif (isExistUsername(uname, 0))\n\t\t\t\treturn 3;\n\t\t\tif (isExistEmail(uemail, 0))\n\t\t\t\treturn 2;\n\t\t\ttry {\n\t\t\t\tPreparedStatement updateStatus = null;\n\t\t\t\tsql = \"insert into user values(?,?,?,?,?,?,?,?)\";\n\t\t\t\ttry {\n\t\t\t\t\tupdateStatus = conn.prepareStatement(sql);\n\t\t\t\t\tupdateStatus.setString(1, uname);\n\t\t\t\t\tupdateStatus.setString(2, upassword);\n\t\t\t\t\tupdateStatus.setInt(3, uscore);\n\t\t\t\t\tupdateStatus.setString(4, ulastname);\n\t\t\t\t\tupdateStatus.setString(5, ufirstname);\n\t\t\t\t\tupdateStatus.setString(6, ubirthdate);\n\t\t\t\t\tupdateStatus.setString(7, uemail);\n\t\t\t\t\tupdateStatus.setString(8, ucity);\n\t\t\t\t\tupdateStatus.executeUpdate();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn 0;\n\t\t\t\t} finally {\n\t\t\t\t\tupdateStatus.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"sql error\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn 1;\n\t\t} else {\n\t\t\tif (isExistUsername(uname, 1))\n\t\t\t\treturn 3;\n\t\t\tif (isExistEmail(uemail, 1))\n\t\t\t\treturn 2;\n\t\t\ttry {\n\t\t\t\tPreparedStatement updateStatus = null;\n\t\t\t\tsql = \"insert into band values(?,?,?,?,?,?,?)\";\n\t\t\t\ttry {\n\t\t\t\t\tupdateStatus = conn.prepareStatement(sql);\n\t\t\t\t\tupdateStatus.setString(1, uname);\n\t\t\t\t\tupdateStatus.setString(2, upassword);\n\t\t\t\t\tupdateStatus.setString(3, ulastname);\n\t\t\t\t\tupdateStatus.setString(4, ufirstname);\n\t\t\t\t\tupdateStatus.setString(5, ubirthdate);\n\t\t\t\t\tupdateStatus.setString(6, uemail);\n\t\t\t\t\tupdateStatus.setString(7, website);\n\t\t\t\t\tupdateStatus.executeUpdate();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn 0;\n\t\t\t\t} finally {\n\t\t\t\t\tupdateStatus.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"sql error\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t}", "public void storeGlucose(){\n String HBA1C = hba1c.getText().toString();\n String date = glucose_date.getText().toString();\n String medication = String.valueOf(medication_spinner.getSelectedItem());\n UserData userdata = new UserData(\"rjgalleg\", date, glucose_number, tag, medication, HBA1C);\n Log.i(\"Authorize\", \"date: \"+date +\", medication: \"+medication+\", HBA1C: \"+HBA1C+\", glucose number: \"+glucose_number +\"tag: \"+tag);\n ServerRequests serverRequests = new ServerRequests(this);\n serverRequests.storeUserGlucoseInBackground(userdata, new GetUserCallback() {\n @Override\n public void done(User returnedUser) {\n startActivity(new Intent(GlucoseActivity.this, GlucoseActivity.class));\n }\n });\n\n\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tTransactionType command;\n\t\t\tif (args.length > 0) {\n\t\t\t\tcommand = TransactionType.valueOf(args[0]);\n\t\t\t} else {\n\t\t\t\tcommand = TransactionType.User;\n\t\t\t}\n\t\t\tUserService us = new UserServiceImpl();\n\t\t\tswitch (command) {\n\t\t\tcase Withdrawal:\n\n\t\t\t\tif (us.Withdrawal(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) {\n\t\t\t\t\tSystem.out.println(\"Withdrawal \\n\" + us.getUser(Long.valueOf(args[1])) + \"\\n Completed\");\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Withdrawal \\n\" + us.getUser(Long.valueOf(args[1])) + \"\\n Faild\");\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase Deposit:\n\t\t\t\tif (us.deposit(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) {\n\t\t\t\t\tSystem.out.println(\"Deposit \\n\" + us.getUser(Long.valueOf(args[1])) + \"\\n Completed\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Deposit \\n\" + us.getUser(Long.valueOf(args[1])) + \"\\n Faild\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase Transfer:\n\t\t\t\tif (us.transfer(us.getUser(Long.valueOf(args[1])), us.getUser(Long.valueOf(args[2])),\n\t\t\t\t\t\tBigDecimal.valueOf(Long.valueOf(args[3])))) {\n\t\t\t\t\tSystem.out.println(\"Transfer \\n\" + \"From user\" + us.getUser(Long.valueOf(args[1])) + \"To user\"\n\t\t\t\t\t\t\t+ us.getUser(Long.valueOf(args[2])) + \"\\n Completed\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Transfer \\n\" + \"From user\" + us.getUser(Long.valueOf(args[1])) + \"To user\"\n\t\t\t\t\t\t\t+ us.getUser(Long.valueOf(args[2])) + \"\\n Faild\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase History:\n\t\t\t\tUserTransactionService ut = new UserTransactionServiceImpl();\n\t\t\t\tSystem.out.println(ut.getHistory(Long.valueOf(args[1])).stream().map(item->item.toString()).collect(Collectors.joining(\"\\n\")));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tUser u = new User();\n\t\t\t\tu.setName(\"Test Egy\");\n\t\t\t\tu.setDebit(BigDecimal.valueOf(0L));\n\t\t\t\tSystem.out.println(us.saveUser(u));\n\n\t\t\t\tu = new User();\n\t\t\t\tu.setName(\"Test Ketto\");\n\t\t\t\tu.setDebit(BigDecimal.valueOf(0L));\n\t\t\t\tSystem.out.println(us.saveUser(u));\n\n\t\t\t\tu = new User();\n\t\t\t\tu.setName(\"Test Harom\");\n\t\t\t\tu.setDebit(BigDecimal.valueOf(0L));\n\t\t\t\tSystem.out.println(us.saveUser(u));\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} finally {\n\n\t\t\tMyEntityManager.closeEntyyManaggerFactroy();\n\t\t}\n\n\t}", "public void XtestUserSync() throws Exception\n\t{\n\t\tCumulusUserConverter converter = (CumulusUserConverter)getFixture().getModuleManager().getBean(\"cumulusUserConverter\");\n\n\t\tServerCatalog cat = converter.getServerCatalogs().getServerCatalog(\"$Users\");\n\t\tConvertStatus status = new ConvertStatus();\n\t\tconverter.parseUsers(cat, getMediaArchive(),status);\n\t}", "private void performTradingOnStock(UserStockRequest userStockRequest) throws StockProcessingException {\n\t\t//System.out.println(\"Processing stock: \" + userStockRequest);\n\t}", "public void sendWaitingDatas()\n\t{\n\t\tProcessExecuterModule processExecuterModule = new ProcessExecuterModule();\n\t\t\n\t\tString sendResultByEmail = (settings.getBoolean(\"sendResultByEmail\", false)) ? \"0\" : \"1\";\n\t\t\n\t\tint numberOfWaitingDatas = settings.getInt(\"numberOfWaitingDatas\", 0);\n\t\t\n\t\twhile (numberOfWaitingDatas > 0)\n\t\t{\n\t\t\tprocessExecuterModule.runSendTestData(MainActivity.this,settings.getString(\"fileTitle\"+numberOfWaitingDatas, \"\"),\n\t\t\t\t\tsettings.getString(\"testData\"+numberOfWaitingDatas, \"\"),sendResultByEmail,\n\t\t\t\t\tsettings.getString(\"fileTitle2\"+numberOfWaitingDatas, \"\"), settings.getString(\"xmlResults\"+numberOfWaitingDatas, \"\"));\n\t\t\t\n\t\t\tnumberOfWaitingDatas--; \n\t\t}\n\t\t\n\t\teditor.putInt(\"numberOfWaitingDatas\", 0);\n\t\teditor.putBoolean(\"dataToSend\", false);\n\t\t\n\t\teditor.commit(); \n\t}", "private void traverseStudentDb(UserDbOperations user_db_ops, CampusUser user, String campus_name) throws NotBoundException, IOException, InterruptedException\n\t{\n\t\tStudentRecord record = null;\n\t\t\n\t\tif (userBelongHere(user))\n\t\t{\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\trecord = student_db.get(user.getUserId());\n\t\t\t\tif (record == null)\n\t\t\t\t{\n\t\t\t\t\trecord = user_db_ops.onNullUserRecord(user);\n\t\t\t\t\tif (record == null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tstudent_db.put(user.getUserId(), record);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tsynchronized (record) {\t\t\t\n\t\t\t\tif (!user_db_ops.onUserBelongHere(record))\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tif (campus_name.equals(getName()))\n\t\t\t\t{\n\t\t\t\t\tArrayList<TimeSlot> time_slots = user_db_ops.findTimeSlots();\n\t\t\t\t\tif (time_slots == null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tsynchronized (time_slots) {\n\t\t\t\t\t\tif (!user_db_ops.onOperationOnThisCampus(time_slots))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint msg_id = MessageProtocol.generateMessageId();\n\t\t\t\t\tif (!user_db_ops.onOperationOnOtherCampus(msg_id))\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tuser_db_ops.onPostUserBelongHere(record);\n\t\t\t}\n\t\t}\n\t\telse if (campus_name.equals(getName()))\t//We received booking request from another campus\n\t\t{\n\t\t\tArrayList<TimeSlot> time_slots = user_db_ops.findTimeSlots();\n\t\t\tif (time_slots == null)\n\t\t\t\treturn;\n\t\t\tsynchronized (time_slots) {\n\t\t\t\tuser_db_ops.onOperationOnThisCampus(time_slots);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new IllegalArgumentException(\"The sender campus send the message to the wrong campus: (\" + campus_name + \", \" + getName() + \")\");\n\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }", "public static void main(String[] args) {\n logger.info(\"start program\");\n UserDao userDao = new UserDaoJdbcImpl();\n\n User user = new User(null, \"userF03\", new Date(new java.util.Date().getTime()), \"F03_login\", \"Moscow\", \"[email protected]\", \"anyDescription\");\n userDao.addUser(user);\n\n List<User> adderUsers = new ArrayList<>();\n for (int i = 0; i < 3; i++) {\n adderUsers.add(\n new User(\n null,\n \"userF0\" + i,\n new Date(new java.util.Date().getTime()),\n \"F0\" + i + \"_login\",\n \"Moscow\",\n \"f0\" + i + \"@dmail.ru\",\n \"anyDescription\"));\n }\n userDao.addUser(adderUsers);\n\n userDao.getUserByLoginId_Name(\"F02_login\", \"userF02\").forEach(System.out::println);\n\n ConnectionManager connectionManager = ConnectionManagerJdbcImpl.getInstance();\n Connection connection = connectionManager.getConnection();\n Statement statement = null;\n Savepoint savepoint = null;\n try {\n statement = connection.createStatement();\n logger.info(\"create Statement\");\n connection.setAutoCommit(false);\n SQL = \"INSERT INTO study.public.user VALUES \" +\n \"(DEFAULT, 'TestUser', '12.12.2019', 'testUser', 'testCity', 'testEmail', 'testDescription')\";\n statement.executeUpdate(SQL);\n logger.info(\"execute Update 1\");\n savepoint = connection.setSavepoint(\"SavepointA\");\n SQL = \"INSERT INTO study.public.role VALUES (DEFAULT, 'a', 'ghg')\";\n statement.executeUpdate(SQL);\n logger.info(\"execute Update 2\");\n connection.commit();\n } catch (SQLException e) {\n logger.error(e.getMessage());\n try {\n if (savepoint == null) {\n connection.rollback();\n logger.info(\"Транзакции в JDBC откатить\");\n } else {\n connection.rollback(savepoint);\n connection.commit();\n }\n } catch (SQLException e1) {\n logger.error(\"SQLException во время отката \" + e1.getMessage());\n } finally {\n try {\n if (statement != null)\n statement.close();\n connection.close();\n logger.info(\"connection closed\");\n } catch (SQLException ex) {\n logger.error(ex.getMessage());\n ex.printStackTrace();\n }\n }\n }\n }", "@Override\n public void executeAction(IData mainTrade) throws Exception\n {\n String userId = mainTrade.getString(\"USER_ID\");\n String userIdA = mainTrade.getString(\"RSRV_STR2\");\n UserInfoQry.updateTrunkByUserId(userId, userIdA);\n\n }", "@Override\n public void syncUserData() {\n\n List<User> users = userRepository.getUserList();\n List<LdapUser> ldapUsers = getAllUsers();\n Set<Integer> listUserIdRemoveAM = new HashSet<>();\n\n //check update or delete \n for (User user : users) {\n boolean isDeleted = true;\n for (LdapUser ldapUser : ldapUsers) {\n if (user.getUserID().equals(ldapUser.getUserID())) {\n // is updateours\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n \n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n checkChangeDepartment(user, department, listUserIdRemoveAM);\n \n userRepository.editUser(user);\n \n isDeleted = false;\n break;\n }\n }\n if (isDeleted) {\n user.setIsDeleted((byte) 1);\n user.setActive((byte) 0);\n userRepository.editUser(user);\n }\n }\n\n //check new user\n for (LdapUser ldapUser : ldapUsers) {\n boolean isNew = true;\n for(User user : users){\n if(ldapUser.getUserID().equals(user.getUserID())){\n isNew = false;\n break;\n }\n }\n if(isNew){\n logger.debug(\"Is new User userID = \"+ldapUser.getUserID());\n User user = new User();\n user.setUserID(ldapUser.getUserID());\n user.setStaffCode(ldapUser.getUserID());\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setCreatedAt(Utils.getCurrentTime());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setActive((byte) 1);\n user.setIsDeleted((byte) 0);\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n user.setRoleId(4);\n user.setApprovalManagerId(0);;\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n\n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n user.setDepartmentId(department == null ? 0 : department.getId());\n \n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n \n userRepository.addUser(user);\n logger.debug(\"Is new User id = \"+user.getId());\n }\n }\n \n //Remove AprovalManager out User\n for(Integer userId : listUserIdRemoveAM){\n if(userId == null) continue;\n User userRemoveAMId = userRepository.getUserById(userId);\n userRemoveAMId.setApprovalManagerId(0);\n userRepository.editUser(userRemoveAMId);\n }\n }", "private void recordTransactionFlow(SecondAuth hfUser, SecondPayOrder payOrder, Map<String, String> data,\n Map<String, String> reData) {\n\n SecondTransactionFlowExample e = new SecondTransactionFlowExample();\n e.createCriteria().andOutTradeNoEqualTo(data.get(\"out_trade_no\"))\n .andHfStatusEqualTo(TansactionFlowStatusEnum.PROCESS.getStatus());\n List<SecondTransactionFlow> hfTansactionFlows = secondTransactionFlowMapper.selectByExample(e);\n\n if (hfTansactionFlows.isEmpty()) {\n SecondTransactionFlow t = completeHfTansactionFlow(new SecondTransactionFlow(), hfUser, payOrder, data, reData);\n secondTransactionFlowMapper.insertSelective(t);\n } else {\n SecondTransactionFlow t = completeHfTansactionFlow(hfTansactionFlows.get(0), hfUser, payOrder, data, reData);\n secondTransactionFlowMapper.updateByPrimaryKey(t);\n }\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}" ]
[ "0.6408418", "0.62868375", "0.6212167", "0.6189805", "0.61467034", "0.6140858", "0.6135918", "0.60565275", "0.60413796", "0.5959163", "0.5891565", "0.58825976", "0.5842776", "0.58367676", "0.58365065", "0.5834856", "0.5767572", "0.57378703", "0.5714663", "0.5707896", "0.5705872", "0.56953067", "0.5625109", "0.56155884", "0.56051314", "0.55924004", "0.5577007", "0.5545998", "0.553996", "0.5515557", "0.5493571", "0.5468949", "0.543966", "0.54313713", "0.54206306", "0.54099107", "0.54017144", "0.5387486", "0.5387029", "0.5385812", "0.5379353", "0.5358676", "0.5328324", "0.53249454", "0.5314916", "0.53092945", "0.5299987", "0.52995133", "0.5283197", "0.5280971", "0.5279342", "0.5268972", "0.52631354", "0.5257775", "0.5256732", "0.52558506", "0.5244242", "0.5241731", "0.5236441", "0.52293843", "0.5225988", "0.5214128", "0.5212885", "0.5208474", "0.5202288", "0.5201522", "0.51958233", "0.5191995", "0.51812726", "0.5178079", "0.51757795", "0.5173307", "0.5169921", "0.51592946", "0.5157625", "0.5154176", "0.51533437", "0.51522535", "0.5144448", "0.51439685", "0.5141488", "0.51412046", "0.51403975", "0.5135702", "0.513558", "0.5133856", "0.5133705", "0.5129985", "0.51295155", "0.5128973", "0.5125837", "0.51258206", "0.5125464", "0.51248014", "0.51247686", "0.5121816", "0.51151055", "0.51038194", "0.5101988", "0.5099502", "0.50954276" ]
0.0
-1
EndUSER SPECIFIC DATA TRANSACTIONS// StartCOMPANY DATA TRANSACTIONS//
public boolean addCompanyData (CompanyData companyData) //ADD { ContentValues contentValues = new ContentValues(); contentValues.put(COLUMN_COMPANY_NAME, companyData.getCompanyName()); long result = db.insert(TABLE_COMPANY, null, contentValues); db.close(); //Notifying if transaction was successful if(result == -1)return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}", "public void setCompany(String company) {\n\t\tthis.company = company;\n\t}", "public void setCompany(String company) {\n this.company = company;\n }", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }", "public void setCompany(String company) {\n\t\tthis.company = StringUtils.trimString( company );\n\t}", "public void addCustomerCompany(CustomerCompany... entity) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.addAll(Lists.newArrayList(entity));\n }", "@Override\r\n\tpublic void setCompanyData(RentCompanyData companyData) {\n\r\n\t}", "public void setCoor(Account coor) {\r\n this.coor = coor;\r\n }", "public void setCompanyName(String name) {\n this.companyName = name;\n }", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "@Test\n\tpublic void companyLogin()\n\t{\n\t\tCompanyFacade comf = comp.login(\"Comp1\", \"12345\", ClientType.COMPANY);\n\t\tAssert.assertNotNull(comf);\n\t}", "public void setCustomerCompany(\n @Nonnull\n final List<CustomerCompany> value) {\n if (toCustomerCompany == null) {\n toCustomerCompany = Lists.newArrayList();\n }\n toCustomerCompany.clear();\n toCustomerCompany.addAll(value);\n }", "void setCompanyBaseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData companyBaseData);", "public LoanCompany(String str, CurrentBankAccount currBankAccount, ThreadGroup group) {\n \n super(group, str);\n \n this.currBankAccount = currBankAccount;\n this.companyGroup = group; \n \n c1[0] = new Transaction(university_names, 2550);\n c1[1] = new Transaction(university_names, 500);\n c1[2] = new Transaction(university_names, 1500);\n \n \n }", "public static void fillCompanies() {\n\t\tString constant=indentation+\"- Empresa: \"; //Creo esta variable, ya que la voy a usar varias veces y me ahorra tiempo\n\t\twhile (company1.equals(company2) || company2.equals(company3) || company1.equals(company3)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\tcompany1=constant+companies[selector.nextInt(companies.length)]; //Asigna aleatoriamente los nombres de entre los definidos al principio de la clase en el array companies\n\t\t\tcompany2=constant+companies[selector.nextInt(companies.length)];\n\t\t\tcompany3=constant+companies[selector.nextInt(companies.length)];\n\t\t}\n\t}", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "@Test\n\tpublic void companyLogin2()\n\t{\n\t\tCompanyFacade comf = comp.login(\"Comp1\", \"43621\", ClientType.COMPANY);\n\t\tAssert.assertNull(comf);\n\t}", "public String savePermissionPersonCompany() {\r\n\t\tResourceBundle bundleSecurity = ControladorContexto\r\n\t\t\t\t.getBundle(\"messageSecurity\");\r\n\t\ttry {\r\n\t\t\tif (listPermissionPersonBusinessTemp != null) {\r\n\t\t\t\tthis.userTransaction.begin();\r\n\t\t\t\tString personName = person.getNames() + \" \"\r\n\t\t\t\t\t\t+ person.getSurnames();\r\n\t\t\t\tStringBuilder messageCompaniesFarms = new StringBuilder();\r\n\t\t\t\tString messageFarmCompany = \"person_permission_company_message_associate_company_farm\";\r\n\t\t\t\tfor (PermissionPersonBusiness permissionPersonBusinessAdd : listPermissionPersonBusinessTemp) {\r\n\t\t\t\t\tboolean predetermined = permissionPersonBusinessAdd\r\n\t\t\t\t\t\t\t.isPredetermined();\r\n\t\t\t\t\tPermissionPersonBusiness predeterminedPermision = permissionPersonBusinessDao\r\n\t\t\t\t\t\t\t.consultExistPredetermined(person.getDocument());\r\n\t\t\t\t\tif (predetermined && predeterminedPermision != null) {\r\n\t\t\t\t\t\tpredeterminedPermision.setPredetermined(false);\r\n\t\t\t\t\t\tpermissionPersonBusinessDao\r\n\t\t\t\t\t\t\t\t.editPermissionPersonCompany(predeterminedPermision);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnullValidate(permissionPersonBusinessAdd);\r\n\t\t\t\t\tpermissionPersonBusinessAdd.setDateCreation(new Date());\r\n\t\t\t\t\tpermissionPersonBusinessAdd.setUserName(identity\r\n\t\t\t\t\t\t\t.getUserName());\r\n\t\t\t\t\tpermissionPersonBusinessDao\r\n\t\t\t\t\t\t\t.savePermissionPersonCompany(permissionPersonBusinessAdd);\r\n\t\t\t\t\tif (messageCompaniesFarms.length() > 1) {\r\n\t\t\t\t\t\tmessageCompaniesFarms.append(\", \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString nitCompany = permissionPersonBusinessAdd\r\n\t\t\t\t\t\t\t.getBusiness().getNit();\r\n\t\t\t\t\tString nameFarm = permissionPersonBusinessAdd.getFarm()\r\n\t\t\t\t\t\t\t.getName();\r\n\t\t\t\t\tString msg = MessageFormat.format(\r\n\t\t\t\t\t\t\tbundleSecurity.getString(messageFarmCompany),\r\n\t\t\t\t\t\t\tnitCompany, nameFarm);\r\n\t\t\t\t\tmessageCompaniesFarms.append(msg);\r\n\t\t\t\t}\r\n\t\t\t\tthis.userTransaction.commit();\r\n\t\t\t\tString format = MessageFormat\r\n\t\t\t\t\t\t.format(bundleSecurity\r\n\t\t\t\t\t\t\t\t.getString(\"person_permission_company_message_associate_company\"),\r\n\t\t\t\t\t\t\t\tpersonName, messageCompaniesFarms);\r\n\t\t\t\tControladorContexto.mensajeInformacion(null, format);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.userTransaction.rollback();\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tControladorContexto.mensajeError(e1);\r\n\t\t\t}\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t\treturn consultPermissionPersonCompany();\r\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n return company;\n }", "void setAuditingCompany(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData auditingCompany);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public GoldenContactBuilder company(String value) {\n company = value;\n return this;\n }", "private void processCompany(SwsService swsService) {\n ForetakSokResponse foretakSokResponse = swsService.companySearch(getCompanySearchRequest());\n ForetakData foretakData = foretakSokResponse.getForetakData().get(0);\n Integer orgNo = foretakData.getOrgnr();\n\n // 2. fetch company information based in retrieved organization number\n HentForetakResponse hentForetakResponse = swsService.companyInfo(orgNo);\n\n // 3. output company name\n System.out.println(hentForetakResponse.getNavnAdresse().getNavn());\n\n // 4. output messages (if any)\n List<com.bisnode.services.sws.generated.company.Meldinger> messages = hentForetakResponse.getMeldinger();\n\n if (messages != null && messages.size() > 0) {\n for (com.bisnode.services.sws.generated.company.Meldinger msg : hentForetakResponse.getMeldinger()) {\n System.out.println(msg.getMeldingsKode() + \": \" + msg.getMeldingsTekst());\n }\n }\n }", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "public void setCompanies(java.util.Set<vn.com.phuclocbao.entity.CompanyEntity> _companies)\n {\n companies = _companies;\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "public static final String getCompany() { return company; }", "public void setCompanyName(String companyName) {\r\n this.companyName = companyName;\r\n }", "public void setCompanyName(String companyName) {\r\n this.companyName = companyName;\r\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "public void setCompany(com.hps.july.persistence.CompanyAccessBean newCompanies) throws Exception {\n\tif (newCompanies == null) {\n\t companycode = null;\n\t companyname = \"\";\n\t}\n\telse {\n\t\tcompanycode = new Integer(newCompanies.getCompany());\n\t\tcompanyname = newCompanies.getName();\n\t}\n}", "public String getContactCompany() {\n return contactCompany;\n }", "public void setSrcCompany(String value) {\r\n setAttributeInternal(SRCCOMPANY, value);\r\n }", "public void setCompanyName(String companyName) {\n this.companyName = companyName;\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public void searchCompanies() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\ttry {\r\n\t\t\tbusiness = businessDao.searchBusinessForNameOrNit(searchCompany);\r\n\t\t\tif (business == null || business.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(\r\n\t\t\t\t\t\t\"frmAsociarPermisos:empresas\",\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else {\r\n\t\t\t\tBusinessAction businessAction = ControladorContexto\r\n\t\t\t\t\t\t.getContextBean(BusinessAction.class);\r\n\t\t\t\tbusinessAction.setListBusiness(new ArrayList<Business>());\r\n\t\t\t\tbusinessAction.setListBusiness(business);\r\n\t\t\t\tbusinessAction.loadDetailsBusiness();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCompanyBytes() {\n java.lang.Object ref = company_;\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 company_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setCompany(Company company, Context context) {\n // TODO: Perform networking operations here to upload company to database\n this.company = company;\n invoiceController = new InvoiceController(context, company);\n }", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "public void setCompanyname(String companyname) {\n this.companyname = companyname == null ? null : companyname.trim();\n }", "private Company(com.google.protobuf.GeneratedMessage.ExtendableBuilder<cb.Careerbuilder.Company, ?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public String getCompanyname() {\n return companyname;\n }", "@Override\r\n\tpublic void updateCompany(Company company) throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\r\n\t\tString sql = String.format(\"update Company set COMP_NAME= '%s',PASSWORD = '%s', EMAIL= '%s' where ID = %d\",\r\n\t\t\t\tcompany.getCompanyName(), company.getCompanyPassword(), company.getCompanyEmail(),\r\n\t\t\t\tcompany.getCompanyId());\r\n\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t\tSystem.out.println(\"update Company succeeded. id which updated: \" + company.getCompanyId());\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"update Compnay failed. companyId: \"+ company.getCompanyId());\r\n\t\t} finally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\r\n\t}", "public Company getCompany() {\n\t\treturn company;\n\t}", "@Override\n\tpublic void save(Company company) {\n\t\t\n\t}", "public void setCompany(final String value)\n\t{\n\t\tsetCompany( getSession().getSessionContext(), value );\n\t}", "public ComputerBuilder company(Company company) {\n this.computer.setCompany(company);\n return this;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData();", "private Company cursorToCompany(Cursor cursor) {\n\t\t \n\t Company company = new Company();\n\t company.setAdministratorId(cursor.getInt(0));\n\t company.setCompanyName(cursor.getString(1));\n\t company.setCompanyPassword(cursor.getString(2));\n\t return company;\n\t }", "public static void loadMyCompany() {\n\t\tMyCompany myCompany = fetchFromDB();\n\n\t\trender(\"@myCompany\", myCompany);\n\t}", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "public String getCompanyContact() {\n\t\treturn companyContact;\n\t}", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public void setCompanyno(String companyno) {\n this.companyno = companyno == null ? null : companyno.trim();\n }", "@Override\r\n\tpublic void addCompany(Company company) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"insert into companies values(0, ?, ?, ?)\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\r\n\t\t\tif (company != null) {\r\n\t\t\t\tpstmt.setString(1, company.getCompName());\r\n\t\t\t\tpstmt.setString(2, company.getCompEmail());\r\n\t\t\t\tpstmt.setString(3, company.getCompPass());\r\n\t\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t\t\tSystem.out.println(\"New company was added\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"addCompany Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setCompany(SSNewCompany iCompany) {\n this.iCompany = iCompany;\n\n iTaxRate1.setValue( iCompany.getTaxRate1() );\n iTaxRate2.setValue( iCompany.getTaxRate2() );\n iTaxRate3.setValue( iCompany.getTaxRate3() );\n }", "public void pay(Company company) {\n\n if (!checkBudgetAvailability(company, 0)) {\n throw new IllegalArgumentException(INSUFFICIENT_BUDGET_MESSAGE);\n }\n\n for (Employee employee : company.getEmployees()) {\n\n double salary = employee.getSalary();\n company.setBudget(company.getBudget() - salary);\n employee.setBankAccount(employee.getBankAccount() + salary);\n }\n }", "@Test\n\tvoid findAllMyCompany() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(\"ligoj\", null, null, newUriInfoAsc(\"id\"));\n\n\t\t// 7 users from company 'ligoj', 0 from delegate\n\t\tAssertions.assertEquals(7, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(7, tableItem.getRecordsFiltered());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"alongchu\", tableItem.getData().get(0).getId());\n\t}", "@Override\r\n\tpublic void insertCompany(Company company) throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\r\n\t\tString sql = \"insert into Company(ID, COMP_NAME, PASSWORD, EMAIL) values (?,?,?,?)\";\r\n\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\r\n\t\t\tpreparedStatement.setLong(1, company.getCompanyId());\r\n\t\t\tpreparedStatement.setString(2, company.getCompanyName());\r\n\t\t\tpreparedStatement.setString(3, company.getCompanyPassword());\r\n\t\t\tpreparedStatement.setString(4, company.getCompanyEmail());\r\n\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t\tSystem.out.println(\"Company created: \" + company.toString());\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"DB error - Company creation failed. companyId: \"+ company.getCompanyId());\r\n\t\t}catch (Exception e) {\r\n\t\t\tthrow new Exception(\"Company creation failed. companyId: \"+ company.getCompanyId());\r\n\t\t} \r\n\t\tfinally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\r\n\t}", "public Company getCompany() {\r\n return this.company;\r\n }", "List<UserAccount> getUserAccountListByCompany(Serializable companyId,\r\n Serializable creatorId, Serializable subsystemId);", "@Override\n\tpublic void addCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.save(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "@java.lang.Override\n public java.lang.String getCompany() {\n java.lang.Object ref = company_;\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 company_ = s;\n return s;\n }\n }", "public void setCarCompany(String carCompany) {\n\t\tthis.carCompany = carCompany;\n\t}", "public void setCompanyContact(String companyContact) {\n\t\tthis.companyContact = StringUtils.trimString( companyContact );\n\t}", "public Builder setCompany(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n company_ = value;\n onChanged();\n return this;\n }", "public void setCompnayNum(String comnayNum) {\n this.companyNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getAuditingCompany();", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewAuditingCompany();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "@Override\n @Transactional\n public String create(Company company, BindingResult result) {\n\n\t// Security check.\n\tif (!this.authHelper.isSuperAdmin()) {\n\t this.messageHelper.unauthorizedID(Company.OBJECT_NAME, company.getId());\n\t return AlertBoxFactory.ERROR;\n\t}\n\n\t// Service layer form validation.\n\tthis.companyValidator.validate(company, result);\n\tif (result.hasErrors()) {\n\t return this.validationHelper.errorMessageHTML(result);\n\t}\n\n\tthis.companyDAO.create(company);\n\n\t// Log.\n\tthis.messageHelper.auditableID(AuditAction.ACTION_CREATE, Company.OBJECT_NAME, company.getId(),\n\t\tcompany.getName());\n\n\t// Do actual service and construct response.\n\treturn AlertBoxFactory.SUCCESS.generateCreate(Company.OBJECT_NAME, company.getName());\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewCompanyBaseData();", "public void setDocumentCompany(java.lang.String documentCompany) {\n this.documentCompany = documentCompany;\n }", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "private String companies() {\r\n\t\tint num=tile.getCompaniesNum();\r\n\t\tString out=\"Total Companies: \"+num;\r\n\t\treturn out;\r\n\t}", "@POST\n\t@Path(\"/analytics/company\")\n\tpublic Response getStudentsWorkingForACompany(ParamsObject input){\n\t\tList<StudentBasicInfo> studentsList = new ArrayList<StudentBasicInfo>();\n\t\tif (input.getCampus()!=null && input.getCompany()!=null && input.getYear()!=null){\n\t\t\ttry{\n\t\t\t\tstudentsList = workExperiencesDao.getStudentsWorkingInACompany(Campus.valueOf(input.getCampus().toUpperCase()),Integer.valueOf(input.getYear()),input.getCompany());\n\t\t\t} catch(Exception e){\n\t\t\t\treturn Response.status(Response.Status.BAD_REQUEST).entity(\"campus doesn't exist or year should be integer.\").build();\n\t\t\t}\n\t\t} else if (input.getCampus()!=null && input.getCompany()!=null && input.getYear()==null){\n\t\t\ttry{\n\t\t\t\tstudentsList = workExperiencesDao.getStudentsWorkingInACompany(Campus.valueOf(input.getCampus().toUpperCase()),null,input.getCompany());\n\t\t\t} catch(Exception e){\n\t\t\t\treturn Response.status(Response.Status.BAD_REQUEST).entity(\"campus doesn't exist.\").build();\n\t\t\t}\n\t\t} else if (input.getCampus()==null || input.getCompany()==null){\n\t\t\treturn Response.status(Response.Status.BAD_REQUEST).entity(\"Campus and Company cannot be null.\").build();\n\t\t}\n\n\t\treturn Response.status(Response.Status.OK).\n\t\t\t\tentity(studentsList).build(); \n\t}", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "public void setCompanyname(java.lang.String newCompanyname) {\n\tcompanyname = newCompanyname;\n}", "public void setData(){\n\t\tif(companyId != null){\t\t\t\n\t\t\tSystemProperty systemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"BUSINESS_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tbusinessType = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"MAX_INVALID_LOGIN\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvalidloginMax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tformatItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"STO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tstockOpnameNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"RN_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticProdCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_FORMAT_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tprodCodeFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SOINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SORCPT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DEFAULT_TAX_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesTax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DELIVERY_COST\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryCost = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceInvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PAYMENT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpaymentNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"TAX_VALUE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\ttaxValue = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t} else {\n\t\t\tbusinessType = null;\n\t\t\tinvalidloginMax = null;\n\t\t\tautomaticItemCode = null;\n\t\t\tformatItemCode = null;\n\t\t\tdeliveryItemNoFormat = null;\n\t\t\tstockOpnameNoFormat = null;\n\t\t\treceiptItemNoFormat = null;\n\t\t\tautomaticProdCode = null;\n\t\t\tprodCodeFormat = null;\n\t\t\tsalesNoFormat = null;\n\t\t\tinvoiceNoFormat = null;\n\t\t\treceiptNoFormat = null;\n\t\t\tsalesTax = null;\n\t\t\tdeliveryCost = null;\n\t\t\tpurchaceNoFormat = null;\n\t\t\tpurchaceInvoiceNoFormat = null;\n\t\t\tpaymentNoFormat = null;\n\t\t\ttaxValue = null;\n\t\t}\n\t}", "public void setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }", "public void setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }", "public void setCompanyName(String companyName) {\r\n\t\tthis.companyName = companyName;\r\n\t}", "public Builder setCompanyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n company_ = value;\n onChanged();\n return this;\n }", "void getCompanyInfoFromText() {\r\n\r\n String first = texts.get(0).getText();\r\n String cID = first;\r\n String second = texts.get(1).getText();\r\n String cNAME = second;\r\n String third = texts.get(2).getText();\r\n String password = third;\r\n String forth = texts.get(3).getText();\r\n String GUR = forth;\r\n double d = Double.parseDouble(GUR);\r\n String fifth = texts.get(4).getText();\r\n String EUR = fifth;\r\n double dd = Double.parseDouble(EUR);\r\n String sixth = texts.get(5).getText();\r\n String TSB = sixth ;\r\n String TT = \"2018-04-/08:04:26\";\r\n StringBuffer sb = new StringBuffer();\r\n sb.append(TT).insert(8,TSB);\r\n String ts = sb.toString();\r\n\r\n companyInfo.add(new CompanyInfo(cID,cNAME,password,d,dd,ts));\r\n\r\n new CompanyInfo().WriteFiles_append(companyInfo);\r\n }" ]
[ "0.57010114", "0.56626683", "0.5592802", "0.54137176", "0.52511024", "0.52123475", "0.5126337", "0.5119245", "0.5058204", "0.50354666", "0.5015424", "0.5005362", "0.49808365", "0.49349993", "0.4904746", "0.4861968", "0.48531446", "0.48474488", "0.48040006", "0.48032588", "0.48032588", "0.47995588", "0.47823557", "0.47692835", "0.47692835", "0.47692835", "0.47692835", "0.47692835", "0.4760717", "0.47427216", "0.4731651", "0.47280854", "0.47201276", "0.47201276", "0.47146344", "0.47145954", "0.47145954", "0.4700928", "0.47006515", "0.4689185", "0.46869013", "0.46773314", "0.46167606", "0.45995843", "0.45995843", "0.45995843", "0.45995843", "0.4596853", "0.45924133", "0.45807672", "0.45754135", "0.45703262", "0.45636874", "0.45590988", "0.45569912", "0.45397744", "0.45394114", "0.4537959", "0.45361942", "0.45335034", "0.45334005", "0.45332348", "0.45312706", "0.45290405", "0.45199177", "0.45178157", "0.45161685", "0.4511129", "0.45095474", "0.4504222", "0.4503636", "0.4479456", "0.44698808", "0.44643962", "0.44499362", "0.44489214", "0.44449666", "0.44444686", "0.4442845", "0.44366172", "0.4432745", "0.44314635", "0.44282034", "0.44282034", "0.44245237", "0.44240806", "0.44231734", "0.44196853", "0.4418228", "0.44170654", "0.44012564", "0.43976736", "0.4396328", "0.43930858", "0.439229", "0.43918628", "0.43902883", "0.43902883", "0.43897337", "0.4385202", "0.43781033" ]
0.0
-1
EndCOMPANY DATA TRANSACTIONS// StartLOCATION DATA TRANSACTIONS//
public boolean addLocationData (LocationData locationData) //ADD { ContentValues contentValues = new ContentValues(); contentValues.put(COLUMN_LOCATION_NAME, locationData.getLocationName()); long result = db.insert(TABLE_LOCATION, null, contentValues); db.close(); //Notifying if transaction was successful if(result == -1)return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\t\n\t\tif(qName.equals(\"location\")){\n\t\t\t\n\t\t\t//locationEntity.setExits(exits);\n\t\t\tlocationEntity.setObjects(tempListForObject);\n\t\t\tlocationEntity.setObservers(characters);\n\t\t\tlocations.add(locationEntity);//put the newly loc in\n\t\t\t\n\t\t\t\n\t\t\tlocation=false;\n\t\t\t\n\t\t\tlocationEntity=null;\n\t\t\t\n\t\t\ttempListForObject=null;\n\t\t\texits=null;\n\t\t\tcharacters=null;\n\t\t}else if(qName.equals(\"Description\")){\n\t\t\tdescription=false;\n\t\t \n\t\t}else if(qName.equals(\"Object\")){\n\t\t Object=false;\n\t\t}else if(qName.equals(\"game_character\")){\n\t\t\tgame_character=false;\n\t\t}else if(qName.equals(\"Exit\")){\n\t\t\t//mapsForTenLocations.put(locationEntity, maps);\n\t\t\tExit=false;\n\t\t}else if(qName.equals(\"edge\")){\n\t\t\t//mapsForTenLocations.put(locationEntity, maps);\n \n \n\t\t}\n\t}", "private static void writeLocations(XMLStreamWriter w, RepositoryConnection con) throws XMLStreamException {\n\t\tint nr = 0;\n\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(null, RDF.TYPE, DCTERMS.LOCATION)) {\n\t\t\twhile (res.hasNext()) {\n\t\t\t\tIRI iri = (IRI) res.next().getSubject();\n\n\t\t\t\tValue bbox = null;\n\t\t\t\tRepositoryResult<Statement> bboxes = con.getStatements(iri, DCAT.BBOX, null);\n\t\t\t\twhile (bboxes.hasNext()) {\n\t\t\t\t\tValue val = bboxes.next().getObject();\n\t\t\t\t\tif (val.stringValue().startsWith(\"POLYGON\")) {\n\t\t\t\t\t\tbbox = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bbox != null) {\n\t\t\t\t\tnr++;\n\t\t\t\t\tw.writeStartElement(\"dct:Location\");\n\t\t\t\t\tw.writeAttribute(\"rdf:about\", iri.toString());\n\t\t\t\t\twriteLiteral(w, \"dcat:bbox\", bbox);\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOG.info(\"Wrote {} locations\", nr);\n\t}", "@Override\n public void onReceiveLocation(BDLocation location) {\n if (null != location && location.getLocType() != BDLocation.TypeServerError) {\n StringBuffer sb = new StringBuffer(256);\n sb.append(location.getCity());\n logMsg(sb.toString());\n City = sb.toString();\n }\n }", "com.google.protobuf.ByteString\n getLocationBytes();", "private void update_location() throws Exception {\r\n\t\tif (children.size() == 1) {\r\n\t\t\tCLocation bloc = children.get(0).get_location();\r\n\t\t\tthis.location = bloc.get_source().get_location(bloc.get_bias(), bloc.get_length());\r\n\t\t} else if (children.size() > 1) {\r\n\t\t\tCLocation eloc = children.get(children.size() - 1).get_location();\r\n\t\t\tint beg = this.location.get_bias(), end = eloc.get_bias() + eloc.get_length();\r\n\t\t\tthis.location.set_location(beg, end - beg);\r\n\t\t}\r\n\t}", "public void setLocation(String location){\n this.location = location;\n }", "public void setLocation(String location){\n this.location = location;\n }", "private void arrived(DevicePath devicePath, String location, String finishLocation) {\n\t\tif(!location.equals(finishLocation)) {\n\t\t\ttry {\n\t\t\t\tDeviceMover finishDeviceMover =\n\t\t\t\t\t(DeviceMover)subEndpointTable.get(finishLocation);\n\t\t\t\tHashSet nameSet = createNameSet(finishDeviceMover);\n\t\t\t\tif(nameSet.contains(location)) {\n\t\t\t\t\tcreatePath(devicePath, finishDeviceMover, finishDeviceMover,\n\t\t\t\t\tlocation, finishLocation);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcreatePath(devicePath, root, finishDeviceMover, location,\n\t\t\t\t\tfinishLocation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(UnknownLocationException e) {\n\t\t\t\tthrow new IllegalArgumentException(e.toString());\n\t\t\t}\n\t\t}\n\t\t//else {\n\t\t\t//if(arrivalListener != null) {\n\t\t\t//\tarrivalListener.arrived(device, finish);\n\t\t\t//}\n\t\t//}\n\t}", "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 void setLocation(String location) {\n this.location = location;\n }", "@Override\n\tpublic void setLocation(long location) {\n\t\t_buySellProducts.setLocation(location);\n\t}", "public void setLocation(String location)\n {\n this.location = location;\n }", "private void setEnd()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to end at? Enter the location number\"); \n cities = getShortestPathTo(cities.get(input.nextInt())); \n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location;\n }", "public void setLocation(String location) {\r\n this.location = location;\r\n }", "public void release(int location)\n throws DataOrderingException;", "public org.afscme.enterprise.organization.LocationData getLocationData() {\n return locationData;\n }", "public void setLocation(String location) {\r\n this.location = location;\r\n }", "private void getLocation() {\n\n }", "public void setLocation(String location) {\r\n\t\tthis.location = location;\r\n\t}", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "public void setLocation(String location) {\n\t\tthis.location = location;\n\t}", "@Override\r\n\tpublic CenterLocation saveLocation(CenterLocation loc)\r\n\t\t\tthrows Exception {\r\n\t\tSystem.out.println(\"in service layer \"+ loc);\r\n\t\treturn cdao.saveLocation(loc);\r\n\t}", "public void endContact(Contact contact) {\n }", "void endTransaction();", "public void setEndLoc( Vector2 end ) { endLoc = end; }", "public City getEndCity() {\n \treturn vertex2;\n }", "public int saveLocation(Location location){\n return 0;\n }", "public static void AddLocation(Location location){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT City, AirportCode from Location\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateString(\"City\", location.getCity());\n resultSet.updateString(\"AirportCode\", location.getAirportCode());\n resultSet.insertRow();\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n }", "public void transactionComplete(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for lab1|lab2\n }", "public void setLocation(Location location) \n\t{\n\t\tthis.location = location;\n\t}", "public void setLocation(Location location) {\n this.location = location;\n }", "public void setLocation(Location location) {\n this.location = location;\n }", "public void setLocation(Location location) {\n this.location = location;\n }", "@Override\n\tpublic long getLocation() {\n\t\treturn _buySellProducts.getLocation();\n\t}", "private void setLocation(){\r\n\t\t//make the sql command\r\n\t\tString sqlCmd = \"INSERT INTO location VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"');\";\r\n\r\n\t\ttry {//start SQL statement\r\n\t\t\tstmt.executeUpdate(sqlCmd);\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;\r\n\t\t\tout.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");\r\n\t}", "public void getLocation(){\n }", "public String getLocation() { return location; }", "public String getLocation() { return location; }", "public void setLocation(String location);", "public void endContact(Contact contact) {\n\n }", "public byte[] getLocation() {\r\n return location;\r\n }", "public void setLocation(Location loc) {\n this.location = loc;\n }", "public void transactionComplete(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for proj1\\\n \t//should always commit, simply call transactionComplete(tid,true)\n \ttransactionComplete(tid, true);\n \t\n }", "public void setLocationData(org.afscme.enterprise.organization.LocationData locationData) {\n this.locationData = locationData;\n }", "public void transactionComplete(TransactionId tid, boolean commit)\n throws IOException {\n // some code goes here\n // not necessary for lab1|lab2\n }", "public CreateStatementBuilder setLocation(String location) {\n this.location = location;\n return this;\n }", "@Override\n\tpublic void endContact(Contact contact) {\n\n\t}", "public com.google.protobuf.ByteString\n getLocationBytes() {\n java.lang.Object ref = location_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n location_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setLocation(Location location) {\r\n\t\tthis.location = location;\r\n\t}", "@Override\n\tpublic void endContact(Contact contact) {\n\t\t\n\t}", "@Override\n\tpublic void endContact(Contact contact) {\n\t\t\n\t}", "public phaseI.Hdfs.DataNodeLocationOrBuilder getLocationOrBuilder() {\n return location_ == null ? phaseI.Hdfs.DataNodeLocation.getDefaultInstance() : location_;\n }", "public void completeOrderTransaction(Transaction trans){\n }", "WorkoutBatch end(boolean wasInVehicle);", "@Override\n public void setLocation(String location) {\n this.location = location;\n }", "public CreateStatementBuilder setLocation(Location location) {\n this.location = location.toURI().toString();\n return this;\n }", "public abstract Location getLastLocation();", "public int getLocation()\r\n {\r\n return location;\r\n }", "public abstract void saveLocationXml(Location location);", "public String getLocation(){\n return this.location;\n }", "Location(int x, int y, Block block)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.block = block;\n\t}", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "public com.google.protobuf.ByteString\n getLocationBytes() {\n java.lang.Object ref = location_;\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 location_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void endTransaction(int transactionID);", "java.lang.String getLocation();", "String getLocation();", "String getLocation();", "String getLocation();", "protected void setLocation(String location){\r\n this.location = location;\r\n }", "public LocationData(Location loc)\n {\n update(loc);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }", "public abstract void updateLocationXml(Location location, String newLocationName, int newLocationCapacity);", "private void setLocationData(Location location){\r\n currentLat = location.getLatitude();\r\n currentLng = location.getLongitude();\r\n }", "public void sendLastLocation() {\n\t\tif (listeners.size() == 0)\n\t\t\treturn;\n\n\t\tLocation locationToSend = getLastKnownLocation();\n\n\t\tif (locationToSend != null) {\n\t\t\toldLocation = locationToSend;\n\t\t\tfor(Listener ls: listeners){\n\t\t\t\tls.newLocation(locationToSend);\n\t\t\t}\n\t\t\tlog.debug(\"LocationReceiver send last location\");\n\t\t}\n\t}", "int getLocation() throws IllegalStateException;", "void setOrigination(Locations origination);", "public void setLocation(final String location) {\n this.location = location;\n }", "public void setLocation(String location) {\n this.location = location == null ? null : location.trim();\n }", "public void setLocation(String location) {\n this.location = location == null ? null : location.trim();\n }", "public void setLocation(String location) {\n this.location = location == null ? null : location.trim();\n }", "public void setLocation(String location) {\n this.location = location == null ? null : location.trim();\n }", "@Override\n public ExtensionResult doSendLocation(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder(\"\")\n .add(\"location\", \"location\").build();\n output.put(OUTPUT, quickReplyBuilder.string());\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n extensionResult.setValue(output);\n return extensionResult;\n }", "public abstract List<LocationDto> freelocations(SlotDto slot);", "public void addSign(Vector3D location, String world, String[] lines) {\n dirty = true;\n if (!getSignAt(location, world).isPresent()) {\n signLocations.add(new SignLocation(location, world, server, lines));\n }\n }", "@Override\r\n\tpublic void placeCity(VertexLocation vertLoc) {\n\t\t\r\n\t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n mLocation = location;\n try {\n\n if (commingFrom.equalsIgnoreCase(\"DIRECTION\")) {\n if (mObituaries != null && mLocation != null) {\n if (mLocation != null) {\n String uri = String.format(Locale.ENGLISH,\n \"http://maps.google.com/maps?saddr=%f,%f(%s)&daddr=%f,%f (%s)\",\n Double.valueOf(mObituaries.getObituaryLat()),\n Double.valueOf(mObituaries.getObituaryLng()),\n \"Your Location\",\n mLocation.getLatitude(), mLocation.getLongitude(),\n mObituaries.getObituaryName());\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));\n intent.setPackage(\"com.google.android.apps.maps\");\n startActivity(intent);\n } else {\n Toast.makeText(ObitiuariesDetailsActivity.this,\n \"Current location not available\",\n Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(ObitiuariesDetailsActivity.this,\n \"No contact number found\",\n Toast.LENGTH_SHORT).show();\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public BirdSightDto(String name, String location, long start, long end) {\r\n this.name = name;\r\n this.location = location;\r\n this.start = start;\r\n this.end = end;\r\n }", "public phaseI.Hdfs.DataNodeLocationOrBuilder getLocationOrBuilder() {\n if (locationBuilder_ != null) {\n return locationBuilder_.getMessageOrBuilder();\n } else {\n return location_ == null ?\n phaseI.Hdfs.DataNodeLocation.getDefaultInstance() : location_;\n }\n }", "public Geolocation getCashRegisterLocation() {\n return this.cashRegisterLocation;\n }", "public String getLocation(){\r\n return location;\r\n }", "public void geolocTransfered() {\n\t\tthis.geolocTransfered = true;\n\t}", "NameValue getLocation(T data);" ]
[ "0.5483611", "0.5112229", "0.5064605", "0.4954023", "0.49097002", "0.4865164", "0.4865164", "0.4860976", "0.48588654", "0.48363438", "0.48196456", "0.47750214", "0.47690114", "0.47598046", "0.4732917", "0.4732917", "0.4732917", "0.4732917", "0.47223917", "0.47055393", "0.47048724", "0.47038874", "0.4703211", "0.47012624", "0.4692164", "0.4692164", "0.4692164", "0.46733093", "0.46531346", "0.46491516", "0.4614636", "0.4612186", "0.45970866", "0.45915177", "0.45902404", "0.45895836", "0.4572374", "0.4572374", "0.4572374", "0.45622918", "0.4562099", "0.4550176", "0.45262513", "0.45262513", "0.4518869", "0.45148715", "0.45130575", "0.45044586", "0.44996268", "0.4498133", "0.44923943", "0.44851366", "0.44813666", "0.447831", "0.4474916", "0.44704226", "0.44704226", "0.44688532", "0.44662315", "0.44651568", "0.44622818", "0.446142", "0.44609445", "0.44542488", "0.44444156", "0.44407123", "0.44345307", "0.44197693", "0.44197693", "0.44197693", "0.44197693", "0.44180998", "0.44135204", "0.44064698", "0.440562", "0.440562", "0.440562", "0.4398165", "0.4397626", "0.43859917", "0.43849847", "0.43817207", "0.43786922", "0.43773013", "0.43766227", "0.43761674", "0.43676952", "0.43676952", "0.43676952", "0.43676952", "0.43669823", "0.43635038", "0.4362463", "0.43583268", "0.43573406", "0.4356135", "0.4355985", "0.4355645", "0.43474513", "0.43418473", "0.43411273" ]
0.0
-1
EndLOCATION DATA TRANSACTIONS// StartCLIENT DATA TRANSACTIONS//
public boolean addClientData (ClientData clientData) //ADD { ContentValues contentValues = new ContentValues(); contentValues.put(COLUMN_CLIENT_NAME, clientData.getClientName()); long result = db.insert(TABLE_CLIENT, null, contentValues); db.close(); //Notifying if transaction was successful if(result == -1)return false; else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeClientData(Client client) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.overwriteClient(client);\n dbb.commit();\n dbb.closeConnection();\n }", "@Override\n protected byte[] getClientData() {\n return (clientData + \" individual\").getBytes(StandardCharsets.UTF_8);\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n\t\treturn clientData;\r\n\t}", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n\t\treturn clientData;\n\t}", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public void insertClients(String deviceid, String name) {\n System.out.println(\"System: insertClients(): entered.....\");\n \n PreparedStatement insertData = null;\n \n try {\n mDb.setAutoCommit(false);\n insertData = mDb.prepareStatement(ClientsTbl.STMT_INSERT);\n insertData.setString(1, deviceid);\n insertData.setString(2, name);\n insertData.setLong(3, System.currentTimeMillis());\n System.out.println(\"System: insertClients(): insertData: \" +insertData.toString());\n insertData.executeUpdate();\n mDb.commit();\n } catch (SQLException ex) {\n System.out.println(ex);\n if (mDb != null) {\n try {\n System.out.print(\"System: insertClients(): insertData: Transaction is being rolled back\");\n mDb.rollback();\n } catch(SQLException excep) {\n System.err.print(excep);\n }\n }\n } finally {\n if (insertData != null) {\n try {\n System.out.print(\"System: insertClients(): insertData: Transaction will be closed\");\n insertData.close();\n } catch(SQLException excep) {\n System.err.print(excep);\n } \n }\n try {\n System.out.print(\"System: insertClients(): AutoCommit() switched on again\");\n mDb.setAutoCommit(true);\n } catch(SQLException excep) {\n System.err.print(excep);\n } \n }\n }", "public int updateClient(Client client) throws SQLException {\n\t\treturn iDaoClient.updateClient(client);\n\t}", "public int ajouteClient(Client client) throws SQLException{\n\t\treturn iDaoClient.ajoutClient(client);\n\t}", "public void insertClient(Client client) {\n\t\t\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement insertStatement = null;\n\t\t\n\t\ttry {\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString);\n\t\t\tinsertStatement.setInt(1, client.getId());\n\t\t\tinsertStatement.setString(2, client.getName());\n\t\t\tinsertStatement.setString(3, client.getAddress());\n\t\t\tinsertStatement.setString(4, client.getEmail());\n\t\t\t\n\t\t\tinsertStatement.execute();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"ClientDAO : insert \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(insertStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t}", "@Override\r\n\tpublic void updateclient(Client client) {\n\t\t\r\n\t}", "public final void setClientEnd(final Long clientEnd) {\n this.clientEnd = clientEnd;\n }", "public final void setClientStart(final Long clientStart) {\n this.clientStart = clientStart;\n }", "public void addTransaction\n \t\t(SIPClientTransaction clientTransaction) {\n \tsynchronized (clientTransactions) {\n \t\tclientTransactions.add(clientTransaction);\n \t}\n }", "public Client save(Client client) {\n try (Connection connection = DatabaseConfiguration.getDatabaseConnection()) {\n String query = \"INSERT into clients(clientId, name, surname, age) VALUES(?,?,?,?)\";\n String query_account = \"INSERT INTO accounts(clientId, leftBalance) VALUES (?, ?)\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1, client.getClientId());\n preparedStatement.setString(2, client.getName());\n preparedStatement.setString(3, client.getSurname());\n preparedStatement.setInt(4, client.getAge());\n preparedStatement.execute();\n PreparedStatement preparedStatement1 = connection.prepareStatement(query_account);\n preparedStatement1.setString(1, client.getClientId());\n preparedStatement1.setDouble(2, client.getPaymentMethod().getLeftBalance());\n preparedStatement1.execute();\n return client;\n\n } catch (SQLException exception) {\n throw new RuntimeException(\"Something went wrong while saving the client: \" + client);\n }\n }", "public void addClient(ClientBean client){\r\n\t\tlog.info(\"Endpoint call: operation.addClient\" );\r\n\t\t// 3 Creiamo un'istanza di ClientDao e su questa chiamiamo il servizio creato al passo 2\r\n\t}", "public static void main(String[] args) {\n Client clientIP = new IndividualEntrepreneur(100000);\n System.out.println(clientIP);\n// client.deposit(555);\n// System.out.println(client);\n// client.deposit(1234);\n// System.out.println(client);\n// client.withdraw(1498);\n// System.out.println(client);\n\n Client clientOOO= new legalEntity(200000);\n System.out.println(clientOOO);\n// client1.deposit(1234);\n// System.out.println(client1);\n// client1.withdraw(10000);\n// System.out.println(client1);\n clientOOO.send(clientIP,2000);\n System.out.println(clientIP);\n System.out.println(clientOOO);\n clientIP.getInformation();\n clientOOO.getInformation();\n\n System.out.println(\"Hah Set \" + clientIP.getClientSet());\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().clear();\n System.out.println(clientIP.getClientSet());\n Client clientInd = new Individual(50000);\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().add(clientInd);\n clientIP.getClientSet().add(clientInd);\n System.out.println(clientIP.getClientSet());\n\n }", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "public ClientEventCallback(ClientManagerModel state, Client client) {\n\t\tthis.state = state;\n\t\tthis.client = client;\n\t}", "@Transactional\n public void persist(Client client) {\n em.persist(client);\n }", "private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }", "public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);", "public void setClient(Client client) {\n\t\tthis.client = client;\n\t}", "@Override\n\tpublic void persist(Client client) {\n\t\tdao.persist(client);\n\t}", "Boolean insertClient(Client client){\n return true;\n }", "public void updateClient()\n\t{\n\t\t// TODO\n\t}", "private void LoadClients(boolean Traitement) {\n\n\t\ttry {\n\t\t\tpanelBouton.getBtnCarteClient().setVisible(false);\n\t\t\tint i = 0;\n\t\t\tGetClientTableModel().clear();\n\t\t\tif (Traitement) {\n\t\t\t\tthis.nom = panelRecherche.getEtNom().getText();\n\t\t\t\tthis.prenom = panelRecherche.getEtPrenom().getText();\n\t\t\t\tliste = gestion.getClients(nom, prenom);\n\t\t\t} else {\n\t\t\t\tString numclient = panelRecherche.getEtNumclient().getText().toString();\n\t\t\t\tif (numclient.isEmpty()) {\n\t\t\t\t\ti = 0;\n\t\t\t\t} else {\n\t\t\t\t\tString patternId = \"^[0-9]+$\";\n\t\t\t\t\tboolean checkId = Pattern.matches(patternId, numclient);\n\t\t\t\t\tif (checkId) {\n\t\t\t\t\t\ti = Integer.parseInt(numclient);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Ce champ peut contenir uniquement des valeurs numériques\");\n\t\t\t\t\t\tRunnable clearText = new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tpanelRecherche.getEtNumclient().setText(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tSwingUtilities.invokeLater(clearText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tliste = gestion.getClient(i);\n\t\t\t}\n\t\t\tif (liste == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Client client : liste) {\n\t\t\t\tGetClientTableModel().addRow(client);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\tArrayList<Commande> cdes = null;\n\t\ttry {\n\t\t\tcdes = gestion.getCdes(resultat);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "public ClientData() {\n\n this.name = \"\";\n this.key = \"\";\n this.serverIpString = \"\";\n this.serverPort = 0;\n this.clientListenPort = 0;\n this.clientsSocketPort = 0;\n this.clientsLocalHostName = \"\";\n this.clientsLocalhostAddressStr = \"\";\n\n this.socket = new Socket();\n\n try {\n this.socket.bind(null);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n \n try {\n this.clientsLocalHostName = InetAddress.getLocalHost().getHostName();\n this.clientsLocalhostAddressStr = InetAddress.getLocalHost().getHostAddress();\n } catch (UnknownHostException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n this.clientsSocketPort = socket.getLocalPort();\n\n parseClientConfigFile();\n\n //Initialize ServerSocket and bind to specific port.\n try {\n serverS = new ServerSocket(clientListenPort);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n }", "public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }", "public void approveClient(Client client) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n client.setForbidden(false);\n dbb.overwriteClient(client);\n dbb.commit();\n dbb.closeConnection();\n }", "@Override\n\tpublic void updateClient() {\n\t\t\n\t}", "double clientData(final int index, final int data);", "public final Long getClientEnd() {\n return clientEnd;\n }", "void onAfterClientStateChange(Participant client, State previousState);", "public void setClients(final List<RunDataClient> clients) {\r\n\t\tthis.clients=clients;\r\n\t\tcount=clients.size();\r\n\t}", "public void setClient(Client client) {\r\n\t\tthis.client = client;\r\n\t}", "public void modifierClient(Client client) throws DaoException {\n\t\ttry {\n\t\t\tdaoClient.save(client);\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.modifierClient\" + e);\n\t\t}\n\t}", "public BankingOperation(int type, Client client) {\n super(type);\n m_client = client;\n }", "public void setClient(Client client_) {\n\t\tclient = client_;\n\t}", "@Override\n @Transactional\n public void updateClient(Client newClient){\n log.trace(\"updateClient: client={}\", newClient);\n clientValidator.validate(newClient);\n clientRepository.findById(newClient.getId())\n .ifPresent(client1 -> {\n client1.setName(newClient.getName());\n client1.setMoneySpent(newClient.getMoneySpent());\n log.debug(\"updateClient --- client updated --- \" +\n \"client={}\", client1);\n });\n log.trace(\"updateClient --- method finished\");\n }", "void onClientDataReceived(Client client, List<Float> weightList, List<Date> dateList);", "@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}", "@Override\r\n\tpublic void addclient(Client client) {\n\t\t\r\n\t}", "public void insertClient(ClientVO clientVO);", "@Override\r\n\tpublic Client update(Client entity) {\n\t\treturn clientService.mergeClient(entity);//TODO update should only be based on baseEntityId\r\n\t}", "public Long getClientID() { return m_lClientID; }", "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\r\n\t\t\t\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}\r\n\t\t\r\n\t}", "public interface ClientsInterface {\r\n\t/**\r\n\t * Gibt die Anzahl an Kunden in der Warteschlange an.\r\n\t * @return\tAnzahl an Kunden in der Warteschlange\r\n\t */\r\n\tint count();\r\n\r\n\t/**\r\n\t * Legt fest, dass ein bestimmter Kunde für den Weitertransport freigegeben werden soll.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t */\r\n\tvoid release(final int index);\r\n\r\n\t/**\r\n\t * Liefert den Namen eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tName des Kunden\r\n\t */\r\n\tString clientTypeName(final int index);\r\n\r\n\t/**\r\n\t * Liefert die ID der Station, an der der aktuelle Kunde erzeugt wurde oder an der ihm sein aktueller Typ zugewiesen wurde.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tID der Station\r\n\t */\r\n\tint clientSourceStationID(final int index);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Daten-Element eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tdouble clientData(final int index, final int data);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Daten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientData(final int index, final int data, final double value);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Textdaten-Element eins Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tString clientTextData(final int index, final String key);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Textdaten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientTextData(final int index, final String key, final String value);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingTime(int)\r\n\t */\r\n\tdouble clientWaitingSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tString clientWaitingTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Wartezeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tWartezeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tvoid clientWaitingSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferTime(int)\r\n\t */\r\n\tdouble clientTransferSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tString clientTransferTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Transferzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tTransferzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tvoid clientTransferSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessTime(int)\r\n\t */\r\n\tdouble clientProcessSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tString clientProcessTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Bedienzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tBedienzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tvoid clientProcessSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceTime(int)\r\n\t */\r\n\tdouble clientResidenceSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tString clientResidenceTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Verweilzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tVerweilzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tvoid clientResidenceSecondsSet(final int index, final double time);\r\n}", "public void guarda(Cliente cliente) {\n\n clienteDAO.guarda(cliente);\n editRow=0;\n //force get data from DAO (see getClientes() )\n lc=null;\n }", "void save(Client client) throws DAOException;", "public int getIdClient() {\r\n return idClient;\r\n }", "public ObservableList<Cliente> getClienteData() {\r\n return clienteData;\r\n }", "public MySQLServiceEquipmentCallbackHandler(Object clientData) {\n this.clientData = clientData;\n }", "private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }", "public void update(DroitsMembre client) {\n\n\t}", "public void setData(List<clientes> end2) {\n \n this.cliente.clear();\n this.cliente.addAll(end2);\n super.fireTableDataChanged();\n }", "public void registerCustomerToEvent(Client client) {\n\n\t}", "public void añadircliente(ClienteHabitual cliente) throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n ClientesHabitualesDatos clientesdatos = new ClientesHabitualesDatos(conexion);\n clientesdatos.insert(cliente);\n conexion.commit();\n System.out.println(\"Cliente ingresado con exito\");\n \n }catch(SQLException ex){\n System.out.println(\"Error al insertar \"+ex);\n try{\n //Tratamos la excepcion y se agega un rollback para evitar males mayores en la BD\n conexion.rollback();\n System.out.println(\"Procediendo a rollback\");\n }catch(SQLException ex1){\n System.out.println(\"Error en rollback de insertado \"+ex1);\n }\n }finally{\n if (conexion != null){\n conexion.close();\n }\n }\n }", "void clientData(final int index, final int data, final double value);", "public synchronized void setClients(ClientList clients) {\r\n this.clients.clear();\r\n \r\n if (clients != null) {\r\n this.clients.addAll(clients);\r\n }\r\n }", "public void saveDataSignIn(Client client) {\r\n\t\tSQLPeople sqlPeople = new SQLPeople();\r\n\r\n\t\tJTextField[] requiredFields = { jPanelFormClient.jtfDoc, jPanelFormClient.jtfName, jPanelFormClient.jtfLastName,\r\n\t\t\t\tjPanelFormClient.jtfPhone };\r\n\t\tif (UtilityClass.fieldsAreEmpty(requiredFields)) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Se debe ingresar información en los campos que son obligatorios (*)\",\r\n\t\t\t\t\t\"EXISTENCIA DE CAMPOS VACIOS\", JOptionPane.ERROR_MESSAGE);\r\n\t\t} else {\r\n\t\t\tif (sqlPeople.existDocumentId(Integer.parseInt(jPanelFormClient.jtfDoc.getText()))) {\r\n\r\n\t\t\t\tif (sqlPeople.existPhone(jPanelFormClient.jtfPhone.getText()) == 0) {\r\n\r\n\t\t\t\t\tif (UtilityClass.validateEmail(jPanelFormClient.jtfEmail.getText())\r\n\t\t\t\t\t\t\t|| jPanelFormClient.jtfEmail.getText().length() == 0) {\r\n\r\n\t\t\t\t\t\tclient.setPersonalIdentification(jPanelFormClient.jtfDoc.getText());\r\n\t\t\t\t\t\tclient.setName(jPanelFormClient.jtfName.getText());\r\n\t\t\t\t\t\tclient.setLastName(jPanelFormClient.jtfLastName.getText());\r\n\t\t\t\t\t\tclient.setBirthDate(jPanelFormClient.birthdayDateChooser.getDate());\r\n\t\t\t\t\t\tclient.setTelephone(jPanelFormClient.jtfPhone.getText());\r\n\t\t\t\t\t\tclient.setEmail(jPanelFormClient.jtfEmail.getText());\r\n\t\t\t\t\t\tclient.setAddress(jPanelFormClient.jtfAdress.getText());\r\n\t\t\t\t\t\tclient.setActivationState(\r\n\t\t\t\t\t\t\t\tActivationState.getState(jPanelFormClient.activRadioButton.isSelected()));\r\n\t\t\t\t\t\tif (sqlPeople.registerDataClient(client)) {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"REGISTRO GUARDADO CON EXITO\");\r\n\t\t\t\t\t\t\tjPanelFormClient.newForm();\r\n\t\t\t\t\t\t\tthis.jPanelFormClient.createAutomaticID();\r\n\t\t\t\t\t\t\tthis.addPet((Integer.parseInt(jPanelFormClient.lblIdSet.getText())-1) + \"\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR AL GUARDAR\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Correo no valido\", \"CORREO SIN FORMATO\",\r\n\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"El telefono ingresado ya existe en el sistema\",\r\n\t\t\t\t\t\t\t\"TELEFONO REPETIDO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El documento de identidad ya existe en el sistema\",\r\n\t\t\t\t\t\t\"DOCUMENTO REPETIDO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Logic(Starter client) {\n\t\tthis.client = client;\n\t}", "@Override\n\tpublic void onClientMessage(ClientThread client, String msg) {\n\t\ttry {\n\t\t\tlockClients.readLock().lock();\n\t\t\tLocalDateTime now = LocalDateTime.now();\n\t\t\tString toSend = \"[\"+dtf.format(now)+\"] \"+client.getClientName()+\" : \"+msg;\n\t\t\tfor (ClientThread ct : this.clients) {\n\t\t\t\tct.sendMessage(toSend);\n\t\t\t}\n\t\t\taddToHistory(toSend);\n\t\t} finally {\n\t\t\tlockClients.readLock().unlock();\n\t\t}\n\t}", "public void obtenerHistoricoEstatusCliente(Cliente cliente)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT ESTA_OID_ESTA_CLIE, OID_HIST_ESTA, \");\n query.append(\" PERD_OID_PERI, \");\n query.append(\" PERD_OID_PERI_PERI_FIN, \");\n query.append(\" PED.FEC_INIC as PED_FEC_INIC, \");\n query.append(\" PED.FEC_FINA as PED_FEC_FINA, \");\n query.append(\" PED.MARC_OID_MARC as PED_MARC_OID_MARC, \");\n query.append(\" PED.CANA_OID_CANA as PED_CANA_OID_CANA, \");\n query.append(\" PED.PAIS_OID_PAIS as PED_PAIS_OID_PAIS, \");\n query.append(\" PCD.COD_PERI as PCD_COD_PERI, \");\n query.append(\" PEH.FEC_INIC as PEH_FEC_INIC, \");\n query.append(\" PEH.FEC_FINA as PEH_FEC_FINA, \");\n query.append(\" PEH.MARC_OID_MARC as PEH_MARC_OID_MARC, \");\n query.append(\" PEH.CANA_OID_CANA as PEH_CANA_OID_CANA, \");\n query.append(\" PEH.PAIS_OID_PAIS as PEH_PAIS_OID_PAIS, \");\n query.append(\" PCH.COD_PERI as PCH_COD_PERI \");\n query.append(\" FROM MAE_CLIEN_HISTO_ESTAT, \");\n query.append(\" CRA_PERIO PED, \");\n query.append(\" SEG_PERIO_CORPO PCD, \");\n query.append(\" CRA_PERIO PEH, \");\n query.append(\" SEG_PERIO_CORPO PCH \");\n query.append(\" WHERE PERD_OID_PERI = PED.OID_PERI \");\n query.append(\" AND PED.PERI_OID_PERI = PCD.OID_PERI \");\n query.append(\" AND PERD_OID_PERI_PERI_FIN = PEH.OID_PERI(+) \");\n query.append(\" AND PEH.PERI_OID_PERI = PCH.OID_PERI(+) \");\n query.append(\" AND CLIE_OID_CLIE = \").append(cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\" obtenerHistoricoEstatusCliente respuesta \" + respuesta); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setHistoricoEstatusCliente(new HistoricoEstatusCliente[0]);\n } else {\n HistoricoEstatusCliente[] historico = new HistoricoEstatusCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico\");\n\n Periodo periodoDesde = new Periodo();\n periodoDesde.setOidPeriodo(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI\")).longValue()));\n periodoDesde.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PED_FEC_INIC\"));\n periodoDesde.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PED_FEC_FINA\"));\n periodoDesde.setOidMarca(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_MARC_OID_MARC\")).longValue()));\n periodoDesde.setOidCanal(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_CANA_OID_CANA\")).longValue()));\n periodoDesde.setOidPais(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_PAIS_OID_PAIS\")).longValue()));\n periodoDesde.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCD_COD_PERI\"));\n\n Periodo periodoHasta;\n BigDecimal periodoFin = (BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI_PERI_FIN\");\n\n if (periodoFin == null) {\n periodoHasta = null;\n } else {\n periodoHasta = new Periodo();\n periodoHasta.setOidPeriodo(new Long(periodoFin\n .longValue()));\n periodoHasta.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PEH_FEC_INIC\"));\n periodoHasta.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PEH_FEC_FINA\"));\n periodoHasta.setOidMarca((respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\")).longValue()) \n : null);\n periodoHasta.setOidCanal((respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\") != null) \n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\")).longValue()) \n : null);\n periodoHasta.setOidPais((respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\")).longValue()) \n : null);\n periodoHasta.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCH_COD_PERI\"));\n }\n\n historico[i] = new HistoricoEstatusCliente();\n historico[i].setOidEstatus(respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")==null?null:\n new Long(((BigDecimal) respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")).longValue()));\n historico[i].setPeriodoInicio(periodoDesde);\n historico[i].setPeriodoFin(periodoHasta);\n \n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico historico[i].setOidEs\"\n +\"tatus \" + historico[i].getOidEstatus());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doInicio \" + historico[i].getPeriodoInicio());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doFin \" + historico[i].getPeriodoFin());\n } \n }\n\n cliente.setHistoricoEstatusCliente(historico);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Salida\");\n }", "@Test\n\tpublic void insertAndDeleteClientTest() {\n\t\tservice.insertClient(\"devuser3\", \"test\", \"[email protected]\", \"devpass\");\n\n\t\tClientDTO clientDTO = service.getClient(\"[email protected]\");\n\n\t\tassertEquals(\"devuser3\", clientDTO.getFirstname());\n\t\tassertEquals(\"test\", clientDTO.getLastname());\n\t\tassertEquals(\"[email protected]\", clientDTO.getEmail());\n\n\t\tservice.deleteClient(\"[email protected]\");\n\t\tassertFalse(service.emailExists(\"[email protected]\"));\n\t}", "public void setCliente(ClienteEntity cliente) {\r\n this.cliente = cliente;\r\n }", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public void addOrUpdateClient(Client client) {\r\n // Add table values mapped to their associated column name\r\n ContentValues value = new ContentValues();\r\n value.put(\"email\", client.getEmail());\r\n value.put(\"personalAddress\", client.getPersonalAddress());\r\n value.put(\"creditCardNumber\", client.getCreditCardNumber());\r\n value.put(\"expiry\", new SimpleDateFormat(\"yyyy-MM-dd\").format(client.getExpiry()));\r\n value.put(\"firstName\", client.getFirstName());\r\n value.put(\"lastName\", client.getLastName());\r\n // Add or update database with table values\r\n sqlExecutor.updateOrAddRecords(\"clients\", value);\r\n }", "@Override\r\n public void editarCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la edicion\r\n entity.merge(cliente);//realiza la edicion.\r\n entity.getTransaction().commit();//finaliza la edicion\r\n }", "public void addClient() {\n String name = getToken(\"Enter client company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Client result;\n result = warehouse.addClient(name, address, phone);\n if (result == null) {\n System.out.println(\"Client could not be added.\");\n }\n System.out.println(result);\n }", "private void obtenerClienteRecomendante(Cliente clienteParametro, Long \n oidPais) throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\"clienteParametro, Long oidPais):Entrada\");\n // query sobre INC\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n //jrivas 17/8/2005\n //Inc 20556 \n queryInc.append(\" SELECT RECT.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RDO.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n // query sobre MAE\n BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n ClienteRecomendante clienteRecomendante = new ClienteRecomendante();\n boolean hayRecomendante;\n\n if (!respuestaInc.esVacio()) {\n // tomo los datos de INC\n hayRecomendante = true;\n\n {\n BigDecimal recomendante = (BigDecimal) respuestaInc\n .getValueAt(0, \"CLIE_OID_CLIE\");\n clienteRecomendante.setRecomendante((recomendante != null) \n ? new Long(recomendante.longValue()) : null);\n }\n\n clienteRecomendante.setFechaInicio((Date) respuestaInc\n .getValueAt(0, \"FEC_INIC\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaInc.getValueAt(0, \"FEC_FINA\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n \n /* */\n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n Date fec_desd = (Date) respuestaInc.getValueAt(0, \"FEC_INIC\");\n\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n\n/* */\n } else {\n // BELC300022542 - gPineda - 24/08/06\n try {\n queryInc = new StringBuffer();\n \n //jrivas 4/7/2005\n //Inc 16978\n queryInc.append(\" SELECT CLIE_OID_CLIE_VNTE, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNDO = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n \n // BELC300022542 - gPineda - 24/08/06\n //queryInc.append(\" AND COD_TIPO_VINC = '\" + ConstantesMAE.TIPO_VINCULO_RECOMENDADA + \"'\");\n queryInc.append(\" AND IND_RECO = 1 \");\n \n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n if (!respuestaMae.esVacio()) { \n Date fec_desd = (Date) respuestaMae.getValueAt(0, \"FEC_DESD\");\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n } \n // } \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n hayRecomendante = true;\n clienteRecomendante.setRecomendante(new Long(((BigDecimal) \n respuestaMae.getValueAt(0, \"CLIE_OID_CLIE_VNTE\"))\n .longValue()));\n\n {\n Date fechaInicio = (Date) respuestaMae\n .getValueAt(0, \"FEC_DESD\");\n clienteRecomendante.setFechaInicio((fechaInicio != null) \n ? fechaInicio : null);\n }\n // fecha fin de MAE\n {\n Date fechaFin = (Date) respuestaMae\n .getValueAt(0, \"FEC_HAST\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n } else {\n hayRecomendante = false;\n }\n }\n // tomo los datos de MAE\n if (hayRecomendante) {\n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendante.getRecomendante()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n\n clienteRecomendante.setPeriodo(periodo);\n // } \n \n Cliente clienteLocal = new Cliente();\n clienteLocal.setOidCliente(clienteRecomendante.getRecomendante());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendante.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n clienteParametro.setClienteRecomendante(clienteRecomendante);\n \n } else {\n clienteParametro.setClienteRecomendante(null);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\" clienteParametro, Long oidPais):Salida\");\n }", "public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}", "@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}", "@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }", "private void saveData() {\n // Actualiza la información\n client.setName(nameTextField.getText());\n client.setLastName(lastNameTextField.getText());\n client.setDni(dniTextField.getText());\n client.setAddress(addressTextField.getText());\n client.setTelephone(telephoneTextField.getText());\n\n // Guarda la información\n DBManager.getInstance().saveData(client);\n }", "public void CadastrarCliente(Cliente cliente) throws SQLException {\r\n String query = \"INSERT INTO cliente(nome ,cpf,data_nascimento, sexo,cep,rua,numero,bairro,cidade,estado,telefone_residencial,celular,email,senha) \"\r\n + \"VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n insert(query, cliente.getNome(), cliente.getCpf(), cliente.getData_nascimento(), cliente.getSexo(), cliente.getCep(), cliente.getRua(), cliente.getNumero(), cliente.getBairro(), cliente.getCidade(), cliente.getEstado(), cliente.getTelefone_residencial(), cliente.getCelular(), cliente.getEmail(), cliente.getSenha());\r\n }", "private Future sendDataServerLocation(final Location clientLocation,final Location serverLocation) {\n return executor.submit(new Runnable() {\n public void run() {\n try {\n byte[] sendDataServerAddress = serialize(serverLocation);\n DatagramSocket clientSocket = new DatagramSocket();\n DatagramPacket pongPacket = new DatagramPacket(sendDataServerAddress,\n sendDataServerAddress.length,\n clientLocation.getLocation());\n clientSocket.send(pongPacket);\n clientSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n }", "public Position getClientPosition() {\r\n\t\treturn client_p;\r\n\t}", "Client updateClient(Client client) throws BaseException;", "public final Long getClientStart() {\n return clientStart;\n }", "public void ajouterClient(Client client) throws DaoException {\n\t\ttry {\n\t\t\tdaoClient.save(client);\n\n\t\t\t// Strategy local de generer reference client automatique\n\t\t\tif (client.getRefClient().isEmpty())\n\t\t\t\tclient.setRefClient(ConstantsConfig.PREFIX_CLI_REF + client.getId());\n\n\t\t\tdaoClient.save(client);\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.ajouterClient \" + e);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testDownloadLineDataList() {\n\t\n\tClientUpdateDataPack client2 = new ClientUpdateDataPack();\n\tclient2.setOrgCode(\"W011304060906\");\n\tDate d = new Date();\n\td = DateUtils.addDays(d, -1);\n\tclient2.setLastUpdateTime(d);\n\tList<ClientUpdateDataPack> lista = new ArrayList<ClientUpdateDataPack>();\n//\tlista.add(client);\n\tlista.add(client2);\n\n\tDataBundle db = baseInfoDownloadService.downloadLineData(lista);\n\tList<LineEntity> list = (List<LineEntity>) (db.getObject());\n\tfor (LineEntity entity : list) {\n\t Assert.assertNotNull(entity.getId());\n\t}\n }", "void clientConnected(Client client);", "@Override\n public int getClientId() {\n return _entityCustomer.getClientId();\n }", "public void updateTransaction(){\n\n System.out.println(\"Update transaction with ID: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n Transaction newTransaction = this.ctrl.getTransactions().findOne(id).get();\n System.out.println(\"Choose an action: \\n 1.Change the client details. \\n\" +\n \"2.Add a new item to the same transaction. \\n 3.Update the date.\");\n\n String option = bufferRead.readLine();\n\n switch (option) {\n case \"1\":\n System.out.println(\"New client? \");\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n Long clientId = ((Client) this.ctrl.getAllClients().toArray()[clientOption - 1]).getId();\n System.out.println(\"Enter new characteristics: \");\n System.out.println(\"Name: \");\n String newName = bufferRead.readLine();\n System.out.println(\"Age: \");\n int newAge = Integer.parseInt(bufferRead.readLine());\n System.out.println(\"Membership type: \");\n String newMembershipType = bufferRead.readLine();\n\n c = new Client(newName, newAge, newMembershipType);\n c.setId(clientId);\n ctrl.updateClient(c);\n }\n newTransaction.setClient(c);\n ctrl.updateTransaction(newTransaction);\n break;\n case \"2\":\n System.out.println(\"Choose the item you would like to add: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int itemOption = 0;\n\n itemOption = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[itemOption - 1];\n newTransaction.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Choose another item(or stop if you have finished adding): \");\n sOption = bufferRead.readLine();\n }\n ctrl.updateTransaction(newTransaction);\n break;\n case \"3\":\n System.out.println(\"Enter a new date(dd/mm/yyyy): \");\n String newDate = bufferRead.readLine();\n newTransaction.setDate(newDate);\n ctrl.updateTransaction(newTransaction);\n break;\n default:\n break;\n\n }\n\n\n\n this.ctrl.updateTransaction(newTransaction);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public static void insert(Client client) throws ClassNotFoundException, SQLException { \r\n \r\n \tif (connection == null || connection.isClosed()) \r\n \t\tconnection = DataSourceManager.getConnection();\r\n \t\r\n \tstatement = connection.prepareStatement(INSERT, Statement.RETURN_GENERATED_KEYS);\r\n \tstatement.setInt(1, client.group.id);\r\n \tstatement.setString(2, client.name);\r\n \tstatement.setString(3, client.ip);\r\n \tstatement.setString(4, client.guid);\r\n \tif (client.auth != null) statement.setString(5, client.auth);\r\n \telse statement.setNull(5, Types.VARCHAR);\r\n \tstatement.setLong(6, client.time_add.getTime());\r\n \tstatement.setLong(7, client.time_edit.getTime());\r\n \t\r\n \t// Executing the statement.\r\n \tstatement.executeUpdate();\r\n \t \r\n \t// Storing the new generated client id.\r\n \tresultset = statement.getGeneratedKeys();\r\n \tclient.id = resultset.getInt(1);\r\n \r\n resultset.close();\r\n statement.close();\r\n \r\n }", "@Test\n @Order(6)\n void get_client_2() {\n Client c = service.getClient(client);\n Assertions.assertEquals(client.getId(), c.getId());\n Assertions.assertEquals(client.getName(), c.getName());\n Assertions.assertEquals(client.getAccounts().size(), c.getAccounts().size());\n for(Account i : client.getAccounts()) {\n Account check = c.getAccountById(i.getId());\n Assertions.assertEquals(i.getAmount(), check.getAmount());\n Assertions.assertEquals(i.getClientId(), check.getClientId());\n }\n }", "public List<Result> loadResults(Client client) {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults(client);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }" ]
[ "0.57584685", "0.5709017", "0.55585057", "0.55585057", "0.55585057", "0.55429274", "0.55290395", "0.55290395", "0.55290395", "0.55290395", "0.55290395", "0.55290395", "0.55290395", "0.5516914", "0.5483599", "0.5483599", "0.5483599", "0.5483599", "0.53358287", "0.5201532", "0.5195922", "0.51872855", "0.5180715", "0.51331383", "0.5101056", "0.504338", "0.5020369", "0.49987584", "0.49981675", "0.49922866", "0.49902982", "0.49747866", "0.49698928", "0.4946832", "0.49467877", "0.49438614", "0.49224076", "0.49007228", "0.48427826", "0.4831875", "0.4828857", "0.48236653", "0.4817423", "0.481573", "0.48154467", "0.48130772", "0.48083577", "0.4802019", "0.47963488", "0.47916168", "0.47860834", "0.4775245", "0.4769924", "0.47689158", "0.4763784", "0.47567594", "0.47552794", "0.47547162", "0.47466165", "0.47447136", "0.47227964", "0.47177842", "0.47139484", "0.47103274", "0.47062963", "0.47048607", "0.4700952", "0.46984407", "0.46984082", "0.46900076", "0.46852636", "0.46767148", "0.46761692", "0.46728125", "0.46648994", "0.46637344", "0.46558586", "0.46548173", "0.4648258", "0.4641494", "0.4632117", "0.46308488", "0.4628886", "0.4616383", "0.46163082", "0.46119153", "0.46114287", "0.46103856", "0.460924", "0.46069318", "0.4597934", "0.45978788", "0.4593636", "0.45917222", "0.45912534", "0.45811775", "0.45651588", "0.4562276", "0.45609412", "0.45603743" ]
0.52720475
19
EndCLIENT DATA TRANSACTIONS// StartTIMESHEET DATA TRANSACTIONS//
public void addData(TimeSheetData dataList) { SQLiteDatabase db = this.getWritableDatabase(); Log.v("databse calll", dataList + ""); ContentValues values = new ContentValues(); // values.put(COLUMN_SERIAL_NUMBER, dataList.getmSerialNumber()); values.put(COLUMN_DATE, dataList.getmDate()); values.put(COLUMN_DAY, dataList.getmDay()); values.put(COLUMN_TIME_IN, dataList.getmTimeIn()); // Inserting Row db.insert(TABLE_TIMESHEET, null, values); db.close(); // Closing database connection }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBeginTime(String time){beginTime = time;}", "void setBeginPosition(net.opengis.gml.x32.TimePositionType beginPosition);", "public void setStart_time(long start_time) {\n this.start_time = start_time;\n }", "public void addTimetable(String date, String slot, String room, String teacher, String classes) throws Exception;", "public void setTime_start(java.lang.String time_start) {\r\n this.time_start = time_start;\r\n }", "void xsetStartTime(org.apache.xmlbeans.XmlDateTime startTime);", "public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }", "public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }", "public void setTimeStart(int timeStart) {\r\n this.timeStart = timeStart;\r\n }", "public void setBeginTime(String beginTime) {\n\t\tthis.beginTime = beginTime;\n\t}", "public void setStartTime(String startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(String startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(String startTime) {\n this.startTime = startTime;\n }", "@Override\n public void setBean(TimeSheet t)\n {\n \n }", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "public void setStartTime(String startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(String startTime) {\n this.startTime = startTime;\n }", "@Override\n\tpublic void setStartTime(float t) \n\t{\n\t\t_tbeg = t;\n\t}", "public void setStartTime(Calendar startTime) {\r\n\t\tthis.startTime = startTime;\r\n\t}", "public void setTimeRange(long timeStart, long timeEnd)\n {\n this.timeStart = timeStart;\n this.timeEnd = timeEnd;\n }", "public List<TimesheetRow> getAllTimesheetRows(Timesheet timesheet){\n\t\tcurrentTimesheet = timesheet;\n\t\ttimesheetRowList = service.getAllTimesheetRows(currentTimesheet.getTimesheetId());\n\t\ttimesheetRowList.add(new TimesheetRow(currentTimesheet.getTimesheetId()));\n\t\treturn service.getAllTimesheetRows(currentTimesheet.getTimesheetId());\n\t}", "public synchronized void writeStart(Transaction t) {\n\t\tpw.println(t.transactionId() + \" start\");\n\t}", "public void setCurrentTimesheet(Timesheet currentTimesheet) {\n\t\tthis.currentTimesheet = currentTimesheet;\n\t}", "void setStartTime(java.util.Calendar startTime);", "public static void beginTransaction(int trans_id, String trans_type) {\n\n // System.out.println(\"beginTransaction\");\n long currTime = time;\n time++;\n Transaction txn = new Transaction(trans_id, currTime, trans_type);\n transactions.put(trans_id, txn);\n\n if (trans_type == \"RO\") {\n setVariableListForReadOnlyTxn(txn);\n System.out.println(\"T\" + trans_id + \" begins and is Read Only\");\n } else {\n System.out.println(\"T\" + trans_id + \" begins\");\n }\n\n\n }", "public Map<String,Long> getOnJobTotalTimes(String accessKey, Set<String> entityIds, long startTime, long endTime) throws org.apache.thrift.TException;", "public void setStartTime(long startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void transactionStarted() {\n transactionStart = true;\n }", "public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }", "net.opengis.gml.x32.TimePositionType getBeginPosition();", "public void outputToExcel(String startTime,String endTime) throws ParseException {\n\t\tDate[] dates = new Date[2];\r\n\t\tif (startTime != null && endTime != null) {\r\n\t\t\t\r\n\t\t\tString dateRange = startTime +\" - \"+endTime;\r\n\t\t\tdates = WebUtil.changeDateRangeToDate(dateRange);\r\n\t\t}else {\r\n\t\t\tdates[0] = null;\r\n\t\t\tdates[1] = null;\r\n\t\t}\r\n\t\t\r\n\t\tList<Profit> profits = profitMapper.getProfit(dates[0], dates[1]);\r\n\t\tList<CourseProfit> courseProfits = courseSelectMapper.getCourseProfit(dates[0],WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<CardProfit> cardProfits = cardFeeMapper.getCardProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<MachineBuyConfig> machineBuyConfigs = machineConfigMapper.getMachineProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\t\r\n\t\tMap<String, String> profitMap = new LinkedHashMap<String, String>();\r\n\t\tprofitMap.put(\"date\", \"时间\");\r\n\t\tprofitMap.put(\"vip\", \"会员收益\");\r\n\t\tprofitMap.put(\"course\", \"课程收益\");\r\n\t\tprofitMap.put(\"mechine\", \"器械支出\");\r\n\t\tprofitMap.put(\"sum\", \"总计\");\r\n\t\tString sheetName = \"财务总表\";\r\n\t\t\r\n\t\tMap<String, String> courseProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcourseProfitMap.put(\"selectTime\", \"时间\");\r\n\t\tcourseProfitMap.put(\"courseName\", \"课程名称\");\r\n\t\tcourseProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcourseProfitMap.put(\"courseCost\", \"课程收益\");\r\n\t\tString courseSheet = \"课程收益\";\r\n\t\t\r\n\t\tMap<String, String> cardProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcardProfitMap.put(\"startTime\", \"时间\");\r\n\t\tcardProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcardProfitMap.put(\"cardType\", \"办卡类型\");\r\n\t\tcardProfitMap.put(\"cardFee\", \"办卡收益\");\r\n\t\tString cardSheet = \"办卡收益(1、年卡会员 2、季卡会员 3、月卡会员)\";\r\n\t\t\r\n\t\tMap<String, String> machineOutMap = new LinkedHashMap<String, String>();\r\n\t\tmachineOutMap.put(\"time\", \"时间\");\r\n\t\tmachineOutMap.put(\"machineName\", \"器械名称\");\r\n\t\tmachineOutMap.put(\"machineBrand\", \"器械品牌\");\r\n\t\tmachineOutMap.put(\"machineCost\", \"单价\");\r\n\t\tmachineOutMap.put(\"machineCount\", \"购买数量\");\r\n\t\tmachineOutMap.put(\"sumCost\", \"支出\");\r\n\t\tString machineSheet = \"器械支出\";\r\n\t\t\r\n\t\tExportExcel.excelExport(profits, profitMap, sheetName);\r\n\t\tExportExcel.excelExport(courseProfits, courseProfitMap, courseSheet);\r\n\t\tExportExcel.excelExport(cardProfits, cardProfitMap, cardSheet);\r\n\t\tExportExcel.excelExport(machineBuyConfigs, machineOutMap, machineSheet);\r\n\t}", "public boolean transactionStarted();", "public void setStartTime(long ts) {\n\t\tthis.startTime = ts;\t\t\n\t}", "public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(String startTime) {\n this.startTime = startTime == null ? null : startTime.trim();\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime( Date startTime ) {\n this.startTime = startTime;\n }", "void setBegin(net.opengis.gml.x32.TimeInstantPropertyType begin);", "public void setStartTime(Long startTime) {\n this.startTime = startTime;\n }", "public Timesheet getCurrentTimesheet() {\n\t\treturn currentTimesheet;\n\t}", "net.opengis.gml.x32.TimePositionType addNewBeginPosition();", "public void setStartTime(Date startTime) {\r\n this.startTime = startTime;\r\n }", "private List<Object[]> executeDayQuery(\n List<Object> segments, List<Object> workplaces,\n String Eq1startTime, String Eq1endTime,\n String Eq2startTime, String Eq2endTime,\n String Eq3startTime, String Eq3endTime) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT 'Matin' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces) \"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time)\";\n\n query_str_1 = String.format(query_str_1, Eq1startTime, Eq1endTime, Eq1startTime, Eq1endTime);\n\n String query_str_2 = \"(SELECT 'Soir' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces) \"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time)\";\n\n query_str_2 = String.format(query_str_2, Eq2startTime, Eq2endTime, Eq2startTime, Eq2endTime);\n\n String query_str_3 = \"(SELECT 'Nuit' as shift,'%s' As start_time, '%s' as end_time, \"\n + \"bh.segment AS segment, \"\n + \"bh.workplace AS workplace, \"\n + \"bh.harness_part AS harness_part, \"\n + \"bh.std_time AS std_time, \"\n + \"COUNT(bh.harness_part) AS produced_qty, \"\n + \"SUM(bh.std_time) AS produced_hours \"\n + \"FROM base_harness bh, base_container bc \"\n + \"WHERE bc.id = bh.container_id \"\n + \"AND bh.create_time BETWEEN '%s' AND '%s' \"\n + \"AND bh.segment IN (:segments) \"\n + \"AND bh.workplace IN (:workplaces)\"\n + \"GROUP BY bh.segment, bh.workplace, bh.harness_part, bh.std_time) \";\n\n query_str_3 = String.format(query_str_3, Eq3startTime, Eq3endTime, Eq3startTime, Eq3endTime);\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY start_time ASC, segment ASC, workplace ASC, harness_part ASC\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n query.addScalar(\"shift\", StandardBasicTypes.STRING)\n .addScalar(\"start_time\", StandardBasicTypes.STRING)\n .addScalar(\"end_time\", StandardBasicTypes.STRING)\n .addScalar(\"segment\", StandardBasicTypes.STRING)\n .addScalar(\"workplace\", StandardBasicTypes.STRING)\n .addScalar(\"harness_part\", StandardBasicTypes.STRING)\n .addScalar(\"std_time\", StandardBasicTypes.DOUBLE)\n .addScalar(\"produced_qty\", StandardBasicTypes.INTEGER)\n .addScalar(\"produced_hours\", StandardBasicTypes.DOUBLE)\n .setParameterList(\"segments\", segments)\n .setParameterList(\"workplaces\", workplaces);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "void startTransaction();", "ButEnd getStart();", "public void setStarttime(String starttime) {\n this.starttime = starttime == null ? null : starttime.trim();\n }", "public void endTransaction(SpaceTech.TransactionEndType tet) {\n\tfor (int i = 0; i < containers.size(); i++) {\n\t\tcontainers.get(i).Lock();\n\t}\n\tfor (int i = 0; i < containers.size(); i++) {\n\t\tswitch (tet) {\n\t\t\tcase TET_COMMIT:\n\t\t\t\tcontainers.get(i).commitTransaction(this);\n\t\t\t\tbreak;\n\t\t\tcase TET_ROLLBACK: case TET_ABORT:\n\t\t\t\tcontainers.get(i).rollbackTransaction(this);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tfor (int i = 0; i < containers.size(); i++) {\n\t\tcontainers.get(i).Unlock();\n\t}\n }", "public void setStartTime(LocalDateTime startTime) {\n this.startTime = startTime;\n }", "public M csseFinishStart(Object start){this.put(\"csseFinishStart\", start);return this;}", "public Timetable checkExistRoomTimeTable(String date, String classes, String room) throws Exception;", "public static int obterQtdeHorasEntreDatas(Date dataInicial, Date dataFinal) {\r\n\t\tCalendar start = Calendar.getInstance();\r\n\t\tstart.setTime(dataInicial);\r\n\t\t// Date startTime = start.getTime();\r\n\t\tif (!dataInicial.before(dataFinal))\r\n\t\t\treturn 0;\r\n\t\tfor (int i = 1;; ++i) {\r\n\t\t\tstart.add(Calendar.HOUR, 1);\r\n\t\t\tif (start.getTime().after(dataFinal)) {\r\n\t\t\t\tstart.add(Calendar.HOUR, -1);\r\n\t\t\t\treturn (i - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void set_keyspace(String keyspace)\n throws InvalidRequestException, TException\n {\n for (Cassandra.Client client : addressToClient.values()) {\n long returnTime = client.set_keyspace(keyspace, LamportClock.sendTimestamp());\n LamportClock.updateTime(returnTime);\n }\n }", "private void setBeginAndEnd() {\n for (int i=1;i<keyframes.size();i++){\n if (curTime <= ((PointInTime)keyframes.get(i)).time){\n beginPointTime=(PointInTime)keyframes.get(i-1);\n endPointTime=(PointInTime)keyframes.get(i);\n return;\n }\n }\n beginPointTime=(PointInTime)keyframes.get(0);\n if (keyframes.size()==1)\n endPointTime=beginPointTime;\n else\n endPointTime=(PointInTime)keyframes.get(1);\n curTime=((PointInTime)keyframes.get(0)).time;\n }", "public void fixStartEnd() {\n\t\tif (sstart > send) {\n\t\t\tint t = send;\n\t\t\tsend = sstart;\n\t\t\tsstart = t;\n\t\t}\n\n\t\tif (qstart > qend) {\n\t\t\tint t = qend;\n\t\t\tqend = qstart;\n\t\t\tqstart = t;\n\t\t}\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setEndTime(String time){endTime = time;}", "public void setTimeRange(Range range) {\r\n\t\ttimeRange = new Range(range);\r\n\t}", "public void setREQ_END_TIME(java.sql.Time value)\n {\n if ((__REQ_END_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_END_TIME)))\n {\n _isDirty = true;\n }\n __REQ_END_TIME = value;\n }", "public void sendDataOnServer()\n {\n\n SimpleDateFormat dateFormate = new SimpleDateFormat(\"yyyy-MM-dd\");\n SimpleDateFormat timeFormate = new SimpleDateFormat(\"HH:mm\");\n\n\n HashMap<String , Object> param = new HashMap<>();\n param.put(\"class_uid\" , SessionManager.getUser_id(getActivity()));\n param.put(\"class_club_id\" , SessionManager.getUser_Club_id(getActivity()));\n param.put(\"class_name\" , classTitleEditView.getText().toString());\n param.put(\"class_startDate\" , Utill.formattedDateFromString(\"d-MMM-yyyy\" , \"yyyy-MM-dd\" , enterStartDateBtn.getText().toString()));\n\n\n\n param.put(\"class_days\" , weekStr);\n\n param.put(\"class_duration\" ,classDurationSpinner.durationItem.get(selectDurationSpinner.getSelectedItemPosition()) );\n param.put(\"class_startTime\" , timeFormate.format(startTimeCalender.getTime()));\n param.put(\"class_endTime\" , timeFormate.format(endTimeCalender.getTime()));\n param.put(\"class_cost\" , costEditTv.getText().toString());\n param.put(\"class_color\" , recursiveBookingCourtColourArrayList.get(colorCodeSpinner.getSelectedItemPosition()).getCat_color());\n param.put(\"class_noOfParticipents\" , participantEditTv.getText().toString());\n\n httpRequest.getResponse(activity, WebService.createCclassLink, param, new OnServerRespondingListener(activity) {\n @Override\n public void onSuccess(JSONObject jsonObject) {\n\n Log.e(\"jsonObject\",jsonObject+\"\");\n //{\"status\":\"true\",\"message\":\"Class created successfully\",\"class_id\":4}\n\n try\n {\n Utill.hideKeybord(getActivity());\n if (jsonObject.getBoolean(\"status\"))\n {\n\n getActivity().getSupportFragmentManager().popBackStack();\n getActivity().getSupportFragmentManager().popBackStack();\n //updateclassListListener.onBackFragment();\n }\n else\n {\n Utill.showDialg(jsonObject.getString(\"message\") , getActivity());\n }\n\n }\n catch (Exception e)\n {\n Utill.showToast(getActivity() , e.getMessage());\n }\n }\n });\n\n }", "public void setStartTime(String StartTime) {\n this.StartTime = StartTime;\n }", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "protected void doAWTimeSlice()\n\t\tthrows DbCompException\n\t{\n//AW:TIMESLICE\n dates.add(_timeSliceBaseTime);\n//AW:TIMESLICE_END\n\t}", "public void endClass(int booking, Date theTime) {\n try {\n //Connect to database\n Connector c = new Connector();\n Connection conn = c.getConnection();\n\n //Prepare and bind values to statement\n PreparedStatement ps;\n ps = conn.prepareStatement(\"call end_class(?,?)\");\n java.sql.Timestamp sDate = new java.sql.Timestamp(theTime.getTime());\n ps.setInt(1, booking);\n ps.setTimestamp(2, sDate);\n\n //Execute statement\n ps.execute();\n\n } catch (Exception e) {\n //Catch any errors/exceptions which may occur\n e.printStackTrace();\n }\n\n }", "void beginTransaction();", "public String getBeginTime(){return beginTime;}", "public void setTranTime(int time)\n\t{\n\t\tthis.tranTime = time;\n\t}", "public void merge(Timesheet ts) {\n\t em.merge(ts);\n\t }", "private void Start() throws Exception, Throwable{\n \n POI poi = new POI();\n \n \n\n try //( InterfaceCon = orcTST.GetConnSession())\n {\n //Коннектимся к базам\n if (InterfaceCon == null)\n { \n //Ходим в фаил с коннектами получае параметры коннектимся к ORACLE \n InterfaceCon = OraConFile.get_connect_from_file(\"INTERFACE\");\n }\n\n \n //Работа авто шедулера, ставим отчеты в очередь по достижении определенного периода\n CallableStatement callableStatement = InterfaceCon.prepareCall(\"{call REPORTS_WORK.AUTO_SHEDULER }\");\n callableStatement.executeUpdate();\n callableStatement.close();\n\n \n \n //Коннект к базе по умолчанию \n v_REP_ID = 0; \n v_PC_OPER_ID =0 ; \n //\n // System.out.println(\"Проверка очереди отчетов!\");\n //\n Statement pst_param1 = InterfaceCon.createStatement();\n String query = \"SELECT to_number(pcp.value) as REP_ID, pc.id as OPER_ID \" +\n \" FROM PC_OPER pc , Pc_Oper_Params pcp \" +\n \" WHERE pc.op_status in ('ENTRY') \" +\n \" AND pc.op_code = 'CREATE_REPORT' \" +\n \" and pc.id = pcp.oid_pc_oper \" +\n \" and pcp.param = 'REP_ID' \" +\n \" and rownum = 1 \" +\n \" and pc.id not in (select t.oid_pc_oper as ID from REPORTS_RESULT t where t.oid_pc_oper = pc.id)\" ;\n \n //Получаем заказ отчета\n ResultSet resultSet1 = pst_param1.executeQuery(query) ;\n //Получаем заказ отчета\n while (resultSet1.next())\n {\n v_REP_ID = resultSet1.getInt(\"REP_ID\");\n v_PC_OPER_ID = resultSet1.getInt(\"OPER_ID\");\n } \n //Закрываем открытые курсоры, ORA-01000: количество открытых курсоров превысило допустимый максимум\n pst_param1.close();\n resultSet1.close();\n \n \n if ( v_REP_ID != 0 && v_PC_OPER_ID != 0)\n {\n //Создаем новый поток обработки отчета \n new Thread(() -> {\n try {\n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n poi.GetblobExcel(v_REP_ID, v_PC_OPER_ID);\n \n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n // orcTST.close(); \n v_REP_ID = 0;\n v_PC_OPER_ID =0 ;\n } catch (Throwable ex) {\n System.out.println(\"ошибка !!!!\"+ex.toString());\n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString());\n try {\n oper_log.set_log( v_PC_OPER_ID,\"Ошибка! - \" + ex.toString());\n } catch (Throwable ex1) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex1);\n }\n\n }\n }).start(); \n } \n \n } catch (Exception e) { \n System.out.println(\"Ошибка в методе Start с ошибкой\" +e.toString()); \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, e.toString());\n try( Connection InterfaceCon1 = OraConFile.get_connect_from_file(\"INTERFACE\");)\n {\n InterfaceCon = null;\n try (CallableStatement callableStatement = InterfaceCon1.prepareCall(\"{call PC_OPER_WORK.PC_OPER_ERR (?, ?) }\")) {\n callableStatement.setInt(1, v_PC_OPER_ID);\n callableStatement.setString(2, e.toString());\n callableStatement.executeUpdate();\n }\n InterfaceCon1.close();\n InterfaceCon.close();\n } catch (Exception ex) \n { \n InterfaceCon = null; \n System.out.println(\"Ошибка в методе Start при попытке записать ошибку в базу с ошибкой\"+ex.toString()); \n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString()); \n \n }\n } \n \n /* IMINCIDENTS inc = new IMINCIDENTS();\n IMPROBLEMS imp = new IMPROBLEMS();\n IMTASKS imt = new IMTASKS();\n RONTRANS rt = new RONTRANS();\n RONINKAS ron = new RONINKAS();\n AUDITMP am = new AUDITMP();\n AUDITFUNC af = new AUDITFUNC();\n AUDITACTION aa = new AUDITACTION();\n Ronevent rone = new Ronevent();\n LASTSTATUS last = new LASTSTATUS();*/\n /* new Thread(() -> {\n try {\n inc.take_IMINCIDENTS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imp.take_IMPROBLEMS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imt.take_IMTASKS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n rt.take_RONTRANS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n ron.take_RONINKAS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n am.take_AUDITMP();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n af.take_AUDITFUNC();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n aa.take_AUDITACTION();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n rone.take_Ronevent();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n last.take_LASTSTATUS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();*/\n }", "public TransID beginTransaction()\n {\n\t //TransID tid = new TransID();\n\t Transaction collect_trans = new Transaction(this);\n\t atranslist.put(collect_trans);\n\t return collect_trans.getTid();\n }", "public static void writeWeek(String start, String end, Sheets service, String rangeStart, String rangeEnd) throws IOException {\n String total = start + \" - \" + end;\n List<List<Object>> values = Collections.singletonList(Collections.singletonList(total));\n ValueRange body = new ValueRange()\n .setValues(values);\n AppendValuesResponse result =\n service.spreadsheets().values().append(spreadsheetId, rangeStart + \":\" + rangeEnd, body)\n .setValueInputOption(\"USER_ENTERED\")\n .execute();\n }", "public void persist(Timesheet ts) {\n\t em.persist(ts);\n\t }", "@Override\n public final void tickStart(EnumSet<TickType> type, Object... tickData)\n {\n keyTick(type, false);\n }", "public void setREQ_START_TIME(java.sql.Time value)\n {\n if ((__REQ_START_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_START_TIME)))\n {\n _isDirty = true;\n }\n __REQ_START_TIME = value;\n }", "RollingResult start(String roomId);", "org.apache.xmlbeans.XmlDateTime xgetStartTime();", "public long deleteInactiveRecords(Timestamp time);", "public TradeHistoryReq start(String start) {\n this.start = start;\n return this;\n }", "@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}", "public void setStartWorkTime(Date startWorkTime) {\n this.startWorkTime = startWorkTime;\n }", "long getStartTime();", "public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }", "public void beginTransaction() {\n\r\n\t}", "@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 String execute() {\n\t\ttry {\n\t\tlogger.debug(\"PortfolioAction class : execute method : start\");\n\t\t\n\t\tXSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Client Records\");\n\t\tSession hibernateSession = HibernateUtil.getSessionAnnotationFactory().openSession();\n\n\t\tList<ClientData> clientDataList = new LinkedList<ClientData>();\n\t\t String[][] bookData = new String[100][30] ;\n\t\t \n\t\ttry\n\t\t{\n\t\t\thibernateSession.beginTransaction();\n\t\t\t\n\t\t\tQuery query = hibernateSession.createQuery(\"select distinct(amcCode) from SecondaryFundDetails order by amcCode asc \");\n\t\t\t\n\t\t\tList<String> amcList = query.list();\n\t\t\t\n\t\t\thibernateSession.getTransaction().commit();\n\t\t\t\n\t\t\tbookData[0][0]=\"CustomerID\";\n\t\t\tbookData[0][1]=\"CustomerName\";\n\t\t\tbookData[0][2]=\"TotalAmount\";\n\t\t\tbookData[0][3]=\"TotalSIPAmount\";\n\t\t\tint j = 4;\n\t\t\t\n\t\t\tfor ( String amc : amcList ) {\n\t\t\t\tbookData[0][j++]=amc;\n\t\t\t}\n\t\t\t\t\n\t\t\tDouble[] totalRecord = new Double[amcList.size()+2];\n\t\t\t\n\t\t\tfor ( int i=0 ; i < totalRecord.length ; i++)\n\t\t\t\ttotalRecord[i] = 0.0;\n\t\t\t\n\t\t\t\n\t\t\thibernateSession.beginTransaction();\n\t\t\t\n\t\t\tquery = hibernateSession.createQuery(\"select c.customerId,c.customerName , sum(t.unitPrice*t.quantity) from Customers c, TransactionDetails t \" + \n\t\t\t\t\t\"where t.transactionStatus = '8' and c.customerId=t.customerId group by t.customerId \");\n\t\t\t\n\t\t\tList<Object[]> customersList = query.list();\n\t\t\tString customerId = \"\";\n\t\t\tString customerName = \"\";\n\t\t\tString totalAmount = \"\";\n\t\t\thibernateSession.getTransaction().commit();\n\t\t\t\n\t\t\tString amount = \"\";\n\t\t\tfor ( int i = 0; i < customersList.size() ;i++ ) {\n\t\t\t\t\n\t\t\t\tcustomerId = customersList.get(i)[0].toString();\n\t\t\t\tcustomerName = customersList.get(i)[1].toString();\n\t\t\t\ttotalAmount = customersList.get(i)[2].toString();\n\t\t\t\tif (totalAmount != null)\n\t\t\t\t\ttotalAmount = String.format(\"%.2f\",Double.parseDouble(totalAmount));\n\t\t\t\telse \n\t\t\t\t\ttotalAmount = \"0.0\";\n\t\t\t\t\n\t\t\t\ttotalRecord[0] += Double.parseDouble(totalAmount);\n\t\t\t\t \n\t\t\t\tbookData[(i+1)][0]=customerId;\n\t\t\t\tbookData[(i+1)][1]=customerName;\n\t\t\t\tbookData[(i+1)][2]=totalAmount;\n\t\t\t\t\n\t\t\t\thibernateSession.beginTransaction();\n\t\t\t\t\n\t\t\t\tquery = hibernateSession.createQuery(\"select sum(sipAmount) from SipDetails \"\n\t\t\t\t\t\t+ \" where sipCompletionStatus='N' and customerId = :customerId and sipDate is not null \");\n\t\t\t\t\n\t\t\t\tquery.setParameter(\"customerId\", customerId );\n\t\t\t\t\t\n\t\t\t\tObject result = query.uniqueResult();\n\t\t\t\t\n\t\t\t\tif (result != null)\n\t\t\t\t\tbookData[(i+1)][3] = result.toString();\n\t\t\t\telse \n\t\t\t\t\tbookData[(i+1)][3] = \"0.0\";\n\t\t\t\t\n\t\t\t\ttotalRecord[1] += Double.parseDouble(bookData[(i+1)][3].toString());\n\t\t\t\t\n\t\t\t\thibernateSession.getTransaction().commit();\n\t\t\t\t\t\t\t\t\n\t\t\t\thibernateSession.beginTransaction();\n\t\t\t\t\n\t\t\t\tquery = hibernateSession.createSQLQuery(\"select sum(t.UNIT_PRICE*t.QUANTITY) from \"\n\t\t\t\t\t\t+ \" ( select * from TRANSACTION_DETAILS where CUSTOMER_ID= :customerId and TRANSACTION_STATUS='8' ) t \"\n\t\t\t\t\t\t+ \" RIGHT JOIN SECONDARY_FUND_DETAILS s ON t.FUND_ID=s.FUND_ID \"\n\t\t\t\t\t\t+ \" group by s.AMC_CODE order by s.AMC_CODE asc\");\n\t\t\t\t\n\t\t\t\tquery.setParameter(\"customerId\", customerId );\n\t\t\t\t\t\n\t\t\t\tList<String> amountsList = query.list();\n\t\t\t\t\n\t\t\t\thibernateSession.getTransaction().commit();\n\t\t\t\t\n\t\t\t\tfor ( int k = 0; k < amountsList.size() ;k++ ) {\n\t\t\t\t\t\n\t\t\t\t\tif (null != amountsList.get(k)) \n\t\t\t\t\t\tamount = String.format(\"%.2f\",amountsList.get(k));\n\t\t\t\t\telse \n\t\t\t\t\t\tamount=\"0.0\";\n\t\t\t\t\t\n\t\t\t\t\tbookData[(i+1)][(k+4)]=amount;\n\t\t\t\t\ttotalRecord[k+2] += Double.parseDouble(amount);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint total = customersList.size()+1;\n\t\t\tbookData[total][1] = \"TOTAL\";\n\t\t\t\n\t\t\t\n\t\t\tfor ( int i = 0; i < totalRecord.length ;i++ ) {\n\t\t\t\tbookData[total][(i+2)]= String.format(\"%.2f\",totalRecord[i]); \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\n\t\t}\n\t\tcatch ( HibernateException e ) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new MoneyBuddyException(e.getMessage(),e);\n\t\t}\n\t\tcatch (Exception e ) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new MoneyBuddyException(e.getMessage(),e);\n\t\t}\n\t\tfinally {\n\t\t\tif(hibernateSession !=null )\n\t\t\t\t\thibernateSession.close();\n\t\t}\n\t\t\n\t\tint rowCount = 0;\n \n for (String[] aBook : bookData) {\n Row row = sheet.createRow(++rowCount);\n \n int columnCount = 0;\n \n for (String field : aBook) {\n Cell cell = row.createCell(++columnCount);\n if ( field != null) {\n if ( isInteger(field)) {\n \tcell.setCellType(Cell.CELL_TYPE_NUMERIC);\n cell.setCellValue(Double.parseDouble(field));\n } else {\n \tcell.setCellValue((String) field);\n }\n }\n \n }\n \n \n \n }\n \n \n ClassLoader cl = getClass().getClassLoader();\n\t\t\n\t\tString directoryName = cl.getResource(\"./../../assets/ClientRecord\").getPath().substring(1);\n\t\t\n\t\tSystem.out.println(\"directoryNameeeee : \"+directoryName);\n\t\t\n\t\tString fileName = \"/\"+directoryName + \"ClientRecords.xlsx\";\n\t\t\n\t\tSystem.out.println(\"fileName : \"+fileName);\n\t\t\n\t\ttry (FileOutputStream outputStream = new FileOutputStream(fileName)) {\n workbook.write(outputStream);\n }\n\t\t\n SendMail sendMail = new SendMail();\n sendMail.sendMailwithAttachement(fileName);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\t\n\t\tlogger.debug(\"PortfolioAction class : execute method : end\");\n \t\n\t\treturn SUCCESS;\n\t\t}\n\t\t/*catch (MoneyBuddyException e) {\t\n\t\t\tlogger.error(\"PortfolioAction class : execute method : Caught MoneyBuddyException for customerId : \"+customerId);\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn ERROR;\n\t\t} */\n \tcatch (Exception e) {\t\n \t\tlogger.error(\"PortfolioAction class : execute method : Caught Exception \");\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn ERROR;\n\t\t} \n\t}", "public void setStart( Calendar start );", "void xsetEndTime(org.apache.xmlbeans.XmlDateTime endTime);", "public long getBeginTime() { return beginTime; }", "void setEndPosition(net.opengis.gml.x32.TimePositionType endPosition);", "void setEnd(Instant instant);", "hr.client.appuser.CouponCenter.TimeRangeOrBuilder getUseTimeOrBuilder();", "hr.client.appuser.CouponCenter.TimeRangeOrBuilder getUseTimeOrBuilder();", "@Test\r\n public void testEndBeforeStartException() {\r\n boolean result = false;\r\n try {\r\n new TimeCell(\r\n LocalDateTime.now(),\r\n LocalDateTime.now().minusDays(1),\r\n LocalDateTime.now(),\r\n new Manager(\"James\"),\r\n new Worker(\"Fred\", TypeOfWork.ANY),\r\n TypeOfWork.ANY);\r\n } catch (ZeroLengthException ex) {\r\n result = false;\r\n } catch (EndBeforeStartException ex) {\r\n result = true;\r\n }\r\n assertTrue(result);\r\n }", "public void setStartTimeString(String startTimeString) {\n this.startTimeString = startTimeString;\n }", "public EndSendEntry getEndSendEntry(BeginSendEntry beginSendEntry);", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }" ]
[ "0.46765855", "0.46688968", "0.45362025", "0.44382468", "0.44227633", "0.4354722", "0.43443406", "0.43443406", "0.43204346", "0.43067008", "0.4306209", "0.4306209", "0.4306209", "0.43056175", "0.42801106", "0.42794627", "0.42794627", "0.42679748", "0.4253757", "0.42512873", "0.42439705", "0.42237538", "0.4213624", "0.419705", "0.41955116", "0.4178008", "0.41659683", "0.41643906", "0.41608253", "0.41435125", "0.41419452", "0.41402605", "0.41298425", "0.41255638", "0.4077027", "0.406795", "0.406795", "0.406795", "0.406795", "0.40606186", "0.40436858", "0.40434292", "0.40426147", "0.4030851", "0.40265262", "0.40245265", "0.40228185", "0.40220386", "0.40178123", "0.4015981", "0.40120456", "0.40110782", "0.400402", "0.40034372", "0.40016198", "0.39976484", "0.39905772", "0.39904296", "0.39904296", "0.39904296", "0.39904296", "0.39846125", "0.39696148", "0.3968588", "0.39607605", "0.39591578", "0.3942082", "0.39392507", "0.39388487", "0.3937449", "0.39323536", "0.392393", "0.39206743", "0.39190328", "0.39172858", "0.39143854", "0.3911036", "0.39082494", "0.3903695", "0.388818", "0.38869032", "0.38854888", "0.38795367", "0.38766545", "0.3876003", "0.38758725", "0.38748568", "0.38724115", "0.38661638", "0.38628197", "0.38625413", "0.38570988", "0.38518986", "0.38509557", "0.38503096", "0.3841693", "0.3841693", "0.38379914", "0.38262665", "0.38253117", "0.38160866" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Scanner scan = new Scanner (System.in); //*variables int name; //** Processing System.out.println("How many names are you inputting?"); name = Integer.parseInt(scan.nextLine()); String [] names=new String [name]; System.out.println("Enter the " + name + " names one by one"); for (int i = 0; i<name; i++) names[i] = scan.nextLine(); for (int i = name - 1; i >=0; i--){ System.out.println(names[i]); } }
{ "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
Two parameter constructor. This class needs to Data object and PrintData object to make operations.
public ManageBranchEmployee(Data data,PrintData printData){ this.data = data; this.printData = printData; trackingNumbers = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data() {}", "public Data() {\n }", "public Data() {\n }", "public Data() {\n \n }", "public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }", "public mainData() {\n }", "public StringData1() {\n }", "public DataMessage(final Object data){\n\t\tthis.data=data;\n\t}", "private Noder(E data) {\n this.data = data;\n }", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "public DesastreData() { //\r\n\t}", "public StringData() {\n\n }", "public DataRecord() {\n super(DataTable.DATA);\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "protected Node(T dataPortion) {\n data = dataPortion;\n next = null;\n }", "public LineData()\n\t{\n\t}", "public DataInt() {\n }", "public ChangeData()\r\n\t\t{\r\n\t\t}", "public InitialData(){}", "public Data(Integer first, Integer second) {\n this.setFirst(first);\n this.setSecond(second);\n }", "public Node(T data) {\r\n this.data = data;\r\n }", "public Node(T data) {\n this(data, null, null, null);\n }", "public TradeData() {\r\n\r\n\t}", "public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}", "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public Node(T data) {\n\n this.data = data;\n\n\n }", "public Node(T theData) \n\t{\n\t\tthis.data = theData;\n\t\tthis.next = null;\n\t}", "public Data(SearchTree<Software> dataStructure){\n administratorMyArray = new ArrayList<>();\n IDList = new ArrayList<>();\n products = dataStructure;\n money=0.0;\n }", "public Data()\n {\n //initialize the queues\n for (int i=0;i<10;i++)\n data[i] = new LinkedList<String >();\n }", "public WorkDataFile()\n\t{\n\t\tsuper();\n\t}", "private Node(Object dataPortion) {\n\t\t\tdata = dataPortion;\n\t\t\tnext = null;\n\t\t}", "DataHRecordData() {}", "public Data(short dataAmount, short routerId, Integer theDataId) {\n amount = dataAmount;\n targetRouterId = routerId;\n dataId = theDataId;\n }", "public Node(T data){\n this.data = data;\n }", "public SensorData() {\n\n\t}", "private SimpleBuildingJob(BuildingJobData data) {\n\t\tsuper(data.getDx(), data.getDy());\n\t\ttype = data.getType();\n\t\ttime = data.getTime();\n\t\tmaterial = data.getMaterial();\n\t\tdirection = data.getDirection();\n\t\tsearch = data.getSearchType();\n\t\tname = data.getName();\n\t\ttakeMaterialFromMap = data.isTakeMaterialFromMap();\n\t\tfoodOrder = data.getFoodOrder();\n\t}", "public Node(T data) {this.data = data;}", "@Test\n\tpublic void testPrintData()\n\t{\n\t\tData d = new Data();\n\t\tassertThat(d.print(), instanceOf(String.class));\n\t}", "public Tabel(Object[][] data, String[] header) {\n\t\tsuper(data, header);\n\t}", "protected abstract D createData();", "public NetworkData() {\n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "public Node(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public ActuatorData()\n\t{\n\t\tsuper(); \n\t}", "@Test\n\tpublic void testConstructorForEvtDataParam()\n\t{\n\t\tfinal Object rawData = new Object();\n\t\tfinal String id = \"TestId\";\n\t\tfinal Object evtData = new Object();\n\t\tfinal RawDataEvent testObj = new RawDataEvent(rawData, id, evtData);\n\n\t\tassertEquals(evtData, testObj.getEventObject());\n\t\tassertEquals(id, testObj.getIdentifier());\n\t\tassertEquals(rawData, testObj.getRawDataSource());\n\t}", "protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}", "public DataView(Object data) {\n\t\tthis.data = data;\n\t}", "public Node(T theData, Node<T> another) \n\t{\n\t\tthis.data = theData;\n\t\tthis.next = another;\n\t}", "public Node(E data) {\n this.data = data;\n }", "public WorkDataFile(int length)\n\t{\n\t\tsuper(length);\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 Node(T data, Node<T> parent, Node<T> left, Node<T> right) {\n this.data = data;\n this.parent = parent;\n this.left = left;\n this.right = right;\n }", "public DataBean() {\r\n \r\n }", "public Datos(){\n }", "public XSDataCrystal() {\n super();\n }", "public ProductImpl(ActivationID id, MarshalledObject data) \n throws RemoteException, IOException, ClassNotFoundException\n { \n super(id, 0);\n name = (String) data.get();\n System.out.println(\"Constructed \" + name);\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "public Printer(){ }", "public Node(T data) {\n\t\t\tthis.data = data;\n\t\t\tthis.nextNode = null;\n\t\t}", "public RegisterNewData() {\n }", "private Cell(E data) {\n Cell.this.data = data;\n }", "public CreateStatus(DataMap data)\n {\n super(data, null);\n }", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public DataManage() {\r\n\t\tsuper();\r\n\t}", "public JsonDataset() {\r\n\t\tsuper();\r\n\t\tlogger.trace(\"JsonDataset() - start\");\r\n\t\tlogger.trace(\"JsonDataset() - end\");\r\n\t}", "private Node(E data) {\n this.data = data;\n previous = null;\n next = null;\n }", "private DataObject(Builder builder) {\n super(builder);\n }", "public FilterData() {\n }", "protected Command(String input, String[] data) {\n this.setInput(input);\n this.setData(data);\n }", "DataObject(int datasetid, YailList fields, YailList data) {\n this.name = \"\";\n this.fields = fields;\n this.data = data;\n this.path = \"\";\n this.datasetid = datasetid;\n }", "public SNode(T data) {\n this(data, null);\n }", "private Node(E dataItem)\n {\n data = dataItem;\n next = null;\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 SimpleShipDisplayInfo(T myData, T onHit) {\n this.myData = myData;\n this.onHit = onHit;\n }", "public DataAdapter() {\n }", "public CardCommandAPDU(byte cla, byte ins, byte p1, byte p2, byte[] data) {\n\tthis(cla, ins, p1, p2);\n\tthis.data = data;\n\n\tsetLC(data.length);\n }", "public StringDataList() {\n }", "public StreamData(String name)\n {\n _data = new LinkedList<byte[]>();\n this.Name = name;\n this.Length = 0;\n }", "private SimpleData(Builder builder) {\n super(builder);\n }", "Constructor() {\r\n\t\t \r\n\t }", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "public Data(ArrayList<Object> list) {\n try {\n int n = list.size();\n if (n == 0) throw new Exception(\"Specified argument for Data constructor is an empty ArrayList\");\n this.data = new ArrayList<Byte>();\n\n for (int i = 0; i < n; i++) {\n Object o = list.get(i);\n if (o instanceof Byte) {\n byte b = (byte) o;\n this.data.add(b);\n } else if (o instanceof Integer) {\n int v = (int) o;\n for (int j = 0; j < 4; j++) {\n int b = 0;\n for (int k = 0; k < 8; k++) {\n b = b << 1;\n int x = (3 - j) * 8 + (7 - k);\n int c = (v >> x) & 1;\n b = b | c;\n }\n byte d = (byte) b;\n this.data.add(d);\n }\n } else // support for other formats (eg. Double) may be added\n {\n throw new Exception(\"Specified argument for Data constructor contains Objects that are not supported yet\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "public CompositeData()\r\n {\r\n }", "public PaymentPreview(Map<String, Object> data) throws Exception {\n super((String) data.remove(\"id\"));\n HashMap<String, Object> dataCopy = new HashMap<>(data);\n\n this.scheduled = (String) dataCopy.remove(\"scheduled\");\n this.type = null;\n this.payment = null;\n\n if (!dataCopy.isEmpty()) {\n throw new Exception(\"Unknown parameters used in constructor: [\" + String.join(\", \", dataCopy.keySet()) + \"]\");\n }\n }", "private DataPrimitive(\n VariableName variableName,\n DataPurpose dataPurpose,\n DataValidator dataValidator,\n PrimitiveType primitiveType,\n Set<Annotation> annotations,\n DataObject dataObject) {\n super(\n DataPrimaryType.PRIMITIVE,\n variableName,\n dataPurpose,\n dataValidator,\n DataSourceType.DEFAULT);\n this.primitiveType = primitiveType;\n this.annotations = annotations;\n this.dataObject = dataObject;\n }", "public ListingData() {\r\n\t\tsuper();\r\n\t}", "@Test\n\tpublic void testConstructor()\n\t{\n\t\tfinal Object rawData = new Object();\n\t\tfinal String id = \"TestId\";\n\t\tfinal DataSeries ds = new DataSeries();\n\t\tfinal RawDataEvent testObj = new RawDataEvent(rawData, id, ds);\n\n\t\tassertEquals(ds, testObj.getDataSeries());\n\t\tassertEquals(id, testObj.getIdentifier());\n\t\tassertEquals(rawData, testObj.getRawDataSource());\n\t}", "public Data (String name, int type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tstream = new MyReader();\n\t}", "public Leaf(T data) {\n this.data = data;\n this.progeny = 1;\n }", "public Data(int n) {\n this(n, 0.5);\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public DataSet() {\r\n \r\n }", "public Data(int dia, int mes, int ano){\r\n \r\n if (dia> 31) {\r\n System.out.println(\"Dia Invalido\");\r\n System.exit(0);\r\n }\r\n if (mes> 12) {\r\n System.out.println(\"Mes Invalido\");\r\n System.exit(0);\r\n }\r\n if (((mes == 4) || (mes == 6) || (mes == 9) || (mes == 11)) && (dia > 30)) {\r\n System.out.println(\"Mes Invalido\");\r\n System.exit(0);\r\n }\r\n if (mes == 2) {\r\n \r\n if((ano % 400 == 0) || ((ano % 4 == 0) && (ano % 100 != 0))){\r\n\t\t\tif(dia > 29){\r\n System.out.println(\"Ano Invalido\");\r\n System.exit(0);\r\n }\r\n }\r\n else{\r\n if(dia > 28){\r\n System.out.println(\"Dia Invalido\");\r\n System.exit(0);\r\n }\r\n } \r\n }\r\n this.dia = dia;\r\n this.mes = mes;\r\n this.ano = ano;\r\n }", "@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }", "public TestData(String owner, String fileName, String createdTime, String filePath, int fileSize, String fileType ) {\t\t\n\t\tthis.onwer = owner;\n\t\tthis.fileName = fileName;\n\t\tthis.createdTime = createdTime;\n\t\tthis.filePath = filePath;\n\t\tthis.fileSize = fileSize;\n\t\tthis.fileType = fileType;\t\t\n\t}", "Node(T data) {\n\t\t\tthis(data, null);\n\t\t}", "private ProcessedDynamicData( ) {\r\n super();\r\n }" ]
[ "0.676062", "0.6730945", "0.6730945", "0.6692438", "0.6585638", "0.65844566", "0.6543099", "0.64090073", "0.63872254", "0.6361463", "0.6243245", "0.618895", "0.61715144", "0.61714363", "0.6151393", "0.6094016", "0.60909796", "0.6087181", "0.6074453", "0.60703456", "0.6033077", "0.60317415", "0.6029307", "0.6012461", "0.6005162", "0.5989131", "0.5982132", "0.5969537", "0.59480935", "0.59404194", "0.5917808", "0.5916877", "0.5911717", "0.59061277", "0.5887784", "0.5836485", "0.5812083", "0.5811608", "0.58065486", "0.57721245", "0.5771567", "0.57528144", "0.5740299", "0.5727263", "0.5719209", "0.57147384", "0.5713998", "0.57136345", "0.5710223", "0.5710038", "0.56797564", "0.5679153", "0.5670521", "0.5668835", "0.5633716", "0.56307966", "0.56264275", "0.5611929", "0.5611815", "0.5608007", "0.56071836", "0.5600037", "0.5593869", "0.5592179", "0.5583682", "0.5582563", "0.55755246", "0.5568401", "0.55660754", "0.5565822", "0.5562576", "0.5559705", "0.55580986", "0.55557865", "0.55555207", "0.5547707", "0.55381006", "0.55341595", "0.5531708", "0.55302423", "0.55236125", "0.55150086", "0.5513677", "0.5512245", "0.55043995", "0.5501433", "0.54999316", "0.54940844", "0.54820037", "0.5481253", "0.54668754", "0.54608303", "0.545755", "0.54514027", "0.54514027", "0.54487497", "0.544646", "0.5440117", "0.54310685", "0.5422504", "0.5420238" ]
0.0
-1
This method manages the Branch Employee First it gets a choice from user and it makes that operation
public void manage(int employeeID){ ID = employeeID; int choice; do { choice = GetChoiceFromUser.getSubChoice(5,new MenuForBranchEmployee(data.getBranchEmployee(employeeID).getFirstName())); if (choice==1) { enterShipment(); } else if (choice == 2){ removeShipment(); } else if(choice == 3){ addCustomer(); } else if(choice == 4){ removeCustomer(); } else if(choice == 5){ updateStatusOfShipment(data.getBranchEmployee(ID).getFirstName(),data.getBranchEmployee(ID).getBranchID()); } }while (choice!=0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "public static void main(String[] args) {\n String inputLine = \"\";\n char action = ' ';\n Employee[] employees = new Employee[] {\n new Employee(\"John\", \"+1-518-383-9901\", 9000),\n new Employee(\"Tom\", \"+1-518-383-6664\", 12000),\n new Employee(\"Diane\", \"+1-518-383-4025\", 5000),\n new Employee(\"Robert\", \"+1-518-383-7971\", 16000),\n new Employee(\"Patrick\", \"+1-518-383-5503\", 7000),\n new Employee(\"David\", \"+1-518-383-9905\", 8000),\n new Employee(\"Kate\", \"+1-518-383-3334\", 2000),\n new Employee(\"Mary\", \"+1-518-383-4545\", 4500),\n new Employee(\"Steven\", \"+1-518-383-7845\", 3500),\n new Employee(\"Bill\", \"+1-518-383-0456\", 7500),\n new Employee(\"Peter\", \"+1-518-383-3578\", 2500),\n new Employee(\"Mike\", \"+1-518-383-3895\", 3500),\n new Employee(\"Amanda\", \"+1-518-383-1001\", 4000)\n } ;\n Company company = new Company(\"1741 Technology Drive, Suite 400, San Jose, California 95110\", \"+1-408-273-8900\", employees);\n\n while (true) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Input 1 to add new employee/ Input 2 to remove employee / Input 3 to get list of company employees\");\n System.out.println(\"Input 3 to print sum of all salaries/ Input 4 to print average salary / Input 5 to print employee name with the highest salary\");\n System.out.println(\"Input 7 to Exit\");\n inputLine = br.readLine();\n action = inputLine.charAt(0);\n\n switch (action) {\n case '1':\n System.out.print(\"Input employee name: \");\n String name = br.readLine();\n System.out.print(\"Input employee phone: \");\n String phone = br.readLine();\n System.out.print(\"Input employee salary: \");\n String salaryStr = br.readLine();\n int salary = Integer.parseInt(salaryStr);\n Employee emp = new Employee(name, phone, salary);\n company.addEmployee(emp);\n break;\n case '2':\n System.out.println(\"Input name of employee to remove\");\n String employeeName = br.readLine();\n company.removeEmployee(employeeName);\n break;\n case '3':\n System.out.println(\"Here is list of all company employees\");\n company.printEmployees();\n break;\n case '4':\n System.out.println(\"Sum of all salaries is \" + company.getSumOfAllSalaries());\n break;\n case '5':\n System.out.println(\"Average company salary is \" + company.getAverageSalary());\n break;\n case '6':\n System.out.println(\"Employee name with the highest salary is \" + company.getEmployeeNameWithMaxSalary());\n break;\n case '7': System.exit(0);\n default:\n System.out.println(\"You have written wrong or not supported action!\");\n break;\n }\n }\n catch (NumberFormatException e) {\n System.out.println(\"You entered non-number salary for employee!\");\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public ManageBranchEmployee(Data data,PrintData printData){\n this.data = data;\n this.printData = printData;\n trackingNumbers = new ArrayList<>();\n }", "public void extensionEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name of the employee:\");\n\t\t\tString nameEmployee = reader.nextLine();\n\t\t\tSystem.out.println(\"How do you want to perform the search:\");\n\t\t\tSystem.out.println(\"L\");\n\t\t\tSystem.out.println(\"Z\");\n\t\t\tSystem.out.println(\"X\");\n\t\t\tSystem.out.println(\"O\");\n\t\t\tSystem.out.println(\"R. spiral by row\");\n\t\t\tchar travel = reader.nextLine().charAt(0);\n\t\t\tSystem.out.println(\"The extension of the cubicle of the employee is \"+theHolding.extensionEmployee(selected, nameEmployee, travel));\n\t\t}\n\t}", "private static void profelEmployee(Employee e) {\n\t\tString choix = scannerResultat(e.affichageMenu());\n\t\twhile (!choix.equalsIgnoreCase(\"Q\")) {\n\t\t\tif (choix.equalsIgnoreCase(\"A\")) {\n\t\t\t\te.CreeUneOperation();\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"B\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"C\")) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"D\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"E\")) {\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t}\n\t}", "public String execute() throws Exception{\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tHttpSession session = request.getSession();\n\t\tservicePatModel = (ServicePatientModel) session.getAttribute(\"ServicePatientModel\");\n\t\tsetPatHN(servicePatModel.getHn());\n\t\t\n\t\tif(!request.getParameter(\"branchModel.branch_code\").isEmpty()){\n\t\t\tsetBranch_code(request.getParameter(\"branchModel.branch_code\"));\n\t\t\tGeneratePatientBranchID gpbID = new GeneratePatientBranchID();\n\t\t\tgpbID.generateBranchHN(getBranch_code());\n\t\t\tthis.branch_code = gpbID.getBranchCode();\n\t\t\t\n\t\t\tsetBranchHN(gpbID.getResultID()[0]);\n\t\t\tsetNextNumber(gpbID.getResultID()[1]);\n\t\t\tsetBranchID(gpbID.getResultID()[2]);\n\t\t\t\n\t\t\t/**\n\t\t\t * UPDATE DATABASE\n\t\t\t */\n\t\t\tBranchData bd = new BranchData();\n\t\t\tif(bd.updateBranchHN(\n\t\t\t\t\tthis.nextNumber,\n\t\t\t\t\tthis.branch_code,\n\t\t\t\t\tthis.patHN,\n\t\t\t\t\tthis.branchHN,\n\t\t\t\t\tthis.branchID\n\t\t\t)){\n\t\t\t\treturn SUCCESS;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public void employeeMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Employee Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Register a game |\");\n System.out.println(\"| 2. Remove a game |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 3. Register an album |\");\n System.out.println(\"| 4. Remove an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. Register a customer |\");\n System.out.println(\"| 6. Upgrade a customer |\");\n System.out.println(\"| 7. Remove a customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 8. Return rented item |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. View all games and albums (sorted) |\");\n System.out.println(\"| 10. View all customers |\");\n System.out.println(\"| 11. View all rentals and history |\");\n System.out.println(\"| 12. View total rent profit |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Send message to customer |\");\n System.out.println(\"| 14. Send message to employee |\");\n System.out.println(\"| 15. Read my messages \" + messageController.checkNewMsg(activeId, \"Employee\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 16. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> dartController.addGame();\n case \"2\" -> dartController.deleteProduct(\"Game\");\n case \"3\" -> dartController.addAlbum();\n case \"4\" -> dartController.deleteProduct(\"Album\");\n case \"5\" -> userController.addCustomer();\n case \"6\" -> userController.upgradeCustomerView(null);\n case \"7\" -> userController.deleteCustomer();\n case \"8\" -> dartController.returnRental();\n case \"9\" -> productSortView(activeId);\n case \"10\" -> userController.displayCustomers(false);\n case \"11\" -> dartController.viewCurrentRentals();\n case \"12\" -> dartController.viewRentalTotalProfit();\n case \"13\" -> messageController.buildMessage(activeId, \"Employee\", \"Customer\", null, \"message\", null);\n case \"14\" -> messageController.buildMessage(activeId, \"Employee\", \"Employee\", null, \"message\", null);\n case \"15\" -> messageController.openInbox(activeId, \"Employee\");\n case \"16\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"1. add company \\n2. display all company \\n3. update company \\n4. find company \"\r\n\t\t\t\t+ \"\\n5. delete company \\n6. get company by size\t\\n7. sort company\");\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tint i;\r\n\t\tMyCompDAOImpl impl = new MyCompDAOImpl();\r\n\t\tMyInput input = new MyInput();\r\n\t\tCompany company = new Company();\r\n\t\tList<Company> list;\r\n\r\n\t\ttry {\r\n\t\t\ti = Integer.parseInt(reader.readLine());\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 1: {\r\n\t\t\t\tcompany = input.getCompanyInfo();\r\n\t\t\t\tint j = impl.addCompany(company);\r\n\t\t\t\tif (j == 1) {\r\n\t\t\t\t\tSystem.out.println(\"inserted\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tSystem.out.println(\"not inserted\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 2: {\r\n\t\t\t\tlist = impl.getAllCompanies();\r\n\t\t\t\tfor (Company c : list) {\r\n\t\t\t\t\tinput.printCompanyInfo(c);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 3: {\r\n\t\t\t\tSystem.out.println(\"Enter Company ID and Total Employee\");\r\n\r\n\t\t\t\tBoolean b = impl.updateCompany(Integer.parseInt(reader.readLine()),\r\n\t\t\t\t\t\tInteger.parseInt(reader.readLine()));\r\n\t\t\t\tif (b) {\r\n\t\t\t\t\tSystem.out.println(\"updated\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tSystem.out.println(\"not updated\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 4: {\r\n\t\t\t\tSystem.out.println(\"Enter Company ID\");\r\n\t\t\t\tcompany = impl.getCompany(Integer.parseInt(reader.readLine()));\r\n\r\n\t\t\t\tinput.printCompanyInfo(company);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 5: {\r\n\t\t\t\tSystem.out.println(\"Enter Company ID\");\r\n\t\t\t\tBoolean val = impl.deleteCompany(Integer.parseInt(reader.readLine()));\r\n\t\t\t\tif (val=true) {\r\n\t\t\t\t\tSystem.out.println(\"deleted successfully\");\r\n\t\t\t\t} else\r\n\t\t\t\t\tSystem.out.println(\"not deleted\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 6: {\r\n\t\t\t\tSystem.out.println(\"Enter Number of Employee to be find\");\r\n\t\t\t\tlist = impl.getCompaiesBySize(Integer.parseInt(reader.readLine()));\r\n\t\t\t\tfor (Company c : list) {\r\n\t\t\t\t\tinput.printCompanyInfo(c);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 7: {\r\n\t\t\t\tSystem.out.println(\"Enter criteria i.e Column name\");\r\n\t\t\t\tlist = impl.sortCompany(reader.readLine());\r\n\t\t\t\tfor (Company c : list) {\r\n\t\t\t\t\tinput.printCompanyInfo(c);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdefault: {\r\n\t\t\t\tSystem.out.println(\"Enter proper value\");\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "public static void EmployeeTest()\r\n\t{\n\t\t\tScanner getVar = new Scanner(System.in);\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t//Arrays to hold final values.\r\n\t\t\tString[] employeeNameArr = new String[100];\r\n\t\t\tdouble[] employeeSalArr = new double[100];\r\n\t\t\t\r\n\t\t\t//Variable for user choice.\r\n\t\t\tint choice;\r\n\t\t\t\r\n\t\t\t//Loop the menu until exit.\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t//Creating the menu.\r\n\t\t\t\tSystem.out.println(\"1. Create employee\\n2. Give Employee 10% Raise\\n3. Display Employees\\n4. Exit\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"Enter a choice: \");\r\n\t\t\t\tchoice = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tswitch(choice)\r\n\t\t\t\t{\r\n\t\t\t\t/*CREATE EMPLOYEE: ASKS FOR USERS NAME AND MONTHLY SALARY\r\n\t\t\t\t \t\t\t\tCONVERTS THE MONTHLY SALARY TO YEARLY SALARY\r\n\t\t\t\t \t\t\t\tENSURES THAT THE EMPLOYEE IS PAYED.*/\r\n\t\t\t\tcase 1:\r\n\t\t\t\t{\r\n\t\t\t\t\t//Setting Employee's First Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's First Name: \");\r\n\t\t\t\t\tString fName = getVar.next();\r\n\t\t\t\t\tsetFirstName(fName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Last Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's Last Name: \");\r\n\t\t\t\t\tString lName = getVar.next();\r\n\t\t\t\t\tsetLastName(lName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Monthly Salary\r\n\t\t\t\t\twhile(true) {\r\n\t\t\t\t\t\tSystem.out.print(\"Enter the Employee's MONTHLY Salary: \");\r\n\t\t\t\t\t\tdouble createSal = getVar.nextDouble()*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Making Sure the Employee is Paid Properly\r\n\t\t\t\t\t\tif(createSal<=0) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid Salary\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tsetMonthlySalary(createSal);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Pushes the names and values into an array.\r\n\t\t\t\t\t\t\tfor(int i = 0; i <= employeeNameArr.length; i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(employeeNameArr[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\temployeeNameArr[i] = getFirstName() + \" \" + getLastName();\r\n\t\t\t\t\t\t\t\t\temployeeSalArr[i] = getMonthlySalary();\r\n\t\t\t\t\t\t\t\t\tbreak;\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\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t/*GIVE EMPLOYES 10% RAISE: ADDS 10% TO THE MONTHLY SALARY\r\n\t\t\t\t \t\t\t\t\t\tALLOWS USER TO CHOOSE EMPLOYEE FROM LIST\r\n\t\t\t\t \t\t\t\t\t\tMAKES SURE THERE IS AT LEAST ONE EMPLOYEE*/\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Confirming that there is at least one employee\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Listing each employee and their yearly salary (i+1 to avoid displaying 0)\r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println((i+1)+\". \"+employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//User inputs which employee gets the raise.\r\n\t\t\t\t\tSystem.out.print(\"Which employee should receive the raise? : \");\r\n\t\t\t\t\tint salChoice = getVar.nextInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Calculating the raise to the monthly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = (employeeSalArr[salChoice-1]/12) * .10 + employeeSalArr[salChoice-1]/12;\r\n\t\t\t\t\t//Converting monthly salary to yearly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = employeeSalArr[salChoice-1]*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Outputting new information.\r\n\t\t\t\t\tSystem.out.println(\"New yearly salary for \" + employeeNameArr[salChoice-1] + \": \" + employeeSalArr[salChoice-1] + \"\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*DISPLAY EMPLOYEES: MAKES SURE THERE IS AT LEAST ONE EMPLOYEE\r\n\t\t\t\t * \t\t\t\t\tLISTS ALL AVAILABLE EMPLOYEES IN ORDER OF CREATION*/\r\n\t\t\t\tcase 3:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Displaying the employees \r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*EXIT: EXITS THE PROGRAM\r\n\t\t\t\t * \t\tFREES THE SCANNERS FROM MEMORY*/\r\n\t\t\t\tcase 4:\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Logging out...\");\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\tgetVar.close();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String submitByEmployee() throws IOException {\r\n\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\tif(application.getApprover()==null||\"\".equals(application.getApprover())){\r\n\t\t\tapplication.setApprover(\"Cindy\");\r\n\t\t\tif(\"Cindy\".equalsIgnoreCase(userRole.getEmpName()) ){\r\n\t\t\t application.setApprover(\"Cindy\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(application.getCc()==null||\"\".equals(application.getCc())){\r\n\t\t\tapplication.setCc(\"Eve;\");\r\n\t\t\tif(\"Eve\".equalsIgnoreCase(userRole.getEmpName()) ){\r\n\t\t\t\t application.setCc(\"Eve;\");\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(\"disapproved\".equals(application.getStatus())){\r\n\t\t\tapplication.setStatus(\"resubmitted\");\r\n\t\t}else{\r\n\t\t\tapplication.setStatus(\"submitted\");\r\n\t\t}\r\n\t\tapplication.setEmpId(userRole.getEmpId());\r\n\t\tapplication.setEmpName(userRole.getEmpName());\r\n\t\tiad.setApplicationCompanyCoverRate(application);\r\n\t\tiad.setApplicationCompanyCoverCn(application);\r\n\t\tiad.setApplicationTotalCostCn(application);\r\n\t\tString cc = application.getCc();\r\n\t\tString approver=application.getApprover();\r\n\t\tString[] approver1=approver.split(\"\\\\.\");\r\n\t\tString approve2=\"\";\r\n\t\tfor(int i=0;i<approver1.length;i++){\r\n\t\t\tapprove2+=approver1[i]+\" \";\r\n\t\t}\r\n\t\tString program=application.getTrainingProgram();\r\n\t\tString ename=application.getEmpName();\r\n\t\tString [] name=ename.split(\"\\\\.\");\r\n\t\tString ename1=\"\";\r\n\t\tfor(int i=0;i<name.length;i++){\r\n\t\t\tename1+=name[i]+\" \";\r\n\t\t}\t\r\n\t\tif(application.getDataId()>0){\r\n\t\t\t\r\n\t\t\tif(iad.updateByDataId(application)){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\t\treturn \"adminAsEmp_insertSUCCESS\";\r\n\t\t\t\t}\r\n\t\t\t\tif(userRole.isApprover()){\r\n\t\t\t\t\treturn \"approverAsEmp_insertSUCCESS\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"emp_updateSUCCESS\";\r\n\t\t\t}\r\n\t\t }\r\n\t\tif(iad.insertApplication(application)){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\treturn \"adminAsEmp_insertSUCCESS\";\r\n\t\t\t}\r\n\t\t\tif(userRole.isApprover()){\r\n\t\t\t\treturn \"approverAsEmp_insertSUCCESS\";\r\n\t\t\t}\r\n\t \treturn \"emp_insertSUCCESS\";\r\n\t }else{\r\n\t \r\n\t \treturn \"error\";\r\n\t }\r\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tEmployeeService service=new EmployeeService();\r\n\t Map<Integer,Employee> acc=new TreeMap<Integer,Employee>();\r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString choice=\"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\tSystem.out.println(\"Menu\");\r\n\t\tSystem.out.println(\"======================\");\r\n\t\tSystem.out.println(\"1 for creating employee and getting details from user\");\r\n\t\tSystem.out.println(\"2 for calculating scheme\");\r\n\t\tSystem.out.println(\"3 for display\");\r\n\t\tSystem.out.println(\"4 for exit\");\r\n\t\tchoice=br.readLine();\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\tcase \"1\":int eid=0;String ename=\"\"; double salary=0.0; String designation=\"\";\r\n\t\t\t System.out.println(\"employee id\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_id=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_id, Validator.idpattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t eid=Integer.parseInt(s_id);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter id in 3 digits\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t \r\n\t\t\t System.out.println(\"employee name\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_na=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_na, Validator.namepattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t ename=s_na;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in alphabetical order\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter name in correct format\");\r\n\t\t\t \t }\r\n\t\t }//end of employee name while\r\n\t\t \r\n\t\t\t System.out.println(\"employee designation\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_d=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_d, Validator.despattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t designation=s_d;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee designation in alphabets\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter designation again\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t\t System.out.println(\"employee salary\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_sa=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_sa, Validator.salpattern);\r\n\t\t\t \t \r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t salary=Double.parseDouble(s_sa);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee salary in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter salary again \");\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t\t \t if(salary<0)\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter the salary greater than zero \");\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t }//end of employee id while\r\n\t\t\t Employee ob=new Employee(eid,ename,salary,designation);\r\n\t \t\t acc.put(ob.getEid(),ob);\r\n\t\t\t System.out.println(\"Employee added\");\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"2\"://System.out.println(\"enter employee id \");\r\n\t\t //eid=Integer.parseInt(br.readLine());\r\n\t\t\t Collection<Employee> v=acc.values();\r\n\t List<Employee> acclis=new ArrayList<Employee>(v);\r\n\t for(Employee o:acclis)\r\n\t {\r\n\t \t service.calculateScheme(o);\r\n\t }\r\n\t\t //System.out.println(service.calculateScheme(acc.get(eid)));\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"3\":System.out.println(\"The details for employees are\");\r\n\t\t System.out.println(\"=============================\");\r\n\t\t Collection<Employee> vc=acc.values();\r\n\t\t List<Employee> acclist=new ArrayList<Employee>(vc);\r\n\t\t for(Employee o:acclist)\r\n\t\t {\r\n\t\t \t service.display(o);\r\n\t\t }\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"4\":System.out.println(\"System exiting\");\r\n\t\t System.exit(0);\r\n\t\t break;\r\n\t\t \r\n\t\tdefault:System.out.println(\"wrong choice\");\r\n\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tSystem.out.print(\"*****Lab Description: Design and implement a class hierarchy representing individuals involved in a business***** \\n\");\r\n\t\tSystem.out.print(\"**[A. The Company Executive list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\r\n\t\tAddress E1 = new Address();\r\n\t\tExecutive EX1 = new Executive(\"Bob\", \"Jim\", 18, 1001);\r\n\t\tE1.setCity(\"San Jose\");\r\n\t\tE1.setState(\"CA\");\r\n\t\tE1.setStreetName(\"S 11st street\");\r\n\t\tE1.setZipCode(98119);\r\n\t\tE1.setStreetNumber(89);\r\n\t\tEX1.setEmployeeId(\"EX-01\");\r\n\t\tEX1.setlevelOfEducation(\"Master\");\r\n\t\tEX1.setspecoalAccomo(\"NO\");\r\n\t\tEX1.setYearlyBonus(8000);\r\n\t\tEX1.setYearlySalary(380000);\r\n\t\tEX1.computePay();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tEX1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress E2 = new Address();\r\n\t\tExecutive EX2 = new Executive(\"Sam\", \"Time\", 26, 1002);\t\r\n\t\tE2.setCity(\"San Jose\");\r\n\t\tE2.setState(\"CA\");\r\n\t\tE2.setStreetName(\"N 68st street\");\r\n\t\tE2.setZipCode(92269);\r\n\t\tE2.setStreetNumber(669);\r\n\t\tEX2.setEmployeeId(\"EX-02\");\r\n\t\tEX2.setlevelOfEducation(\"Master\");\r\n\t\tEX2.setspecoalAccomo(\"NO\");\r\n\t\tEX2.setYearlyBonus(5000);\r\n\t\tEX2.setYearlySalary(520000);\r\n\t\tEX2.computePay();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tEX2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\t\r\n\t\tSystem.out.print(\"**[B. The Company Full-time Salaried Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress F1 = new Address();\r\n\t\tFullTimeSalaryEmployee FS1 = new FullTimeSalaryEmployee(\"Kit\", \"Amy\", 24, 2001);\r\n\t\tF1.setCity(\"San, Jose\");\r\n\t\tF1.setState(\"CA\");\r\n\t\tF1.setStreetName(\"W 16th strret\");\r\n\t\tF1.setStreetNumber(669);\r\n\t\tF1.setZipCode(96335);\r\n\t\tFS1.setEmployeeId(\"FS-2001\");\r\n\t\tFS1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS1.setspecoalAccomo(\"Yes\");\r\n\t\tFS1.setYearlySalary(30000);\r\n\t\tFS1.setYearlyBonus(2000);\r\n\t\tFS1.computePay(4);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFS1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress F2 = new Address();\r\n\t\tFullTimeSalaryEmployee FS2 = new FullTimeSalaryEmployee(\"Him\", \"Lmy\", 28, 2002);\r\n\t\tF2.setCity(\"San, Cruz\");\r\n\t\tF2.setState(\"CA\");\r\n\t\tF2.setStreetName(\"E 169th strret\");\r\n\t\tF2.setStreetNumber(42);\r\n\t\tF2.setZipCode(94561);\r\n\t\tFS2.setEmployeeId(\"FS-2002\");\r\n\t\tFS2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS2.setspecoalAccomo(\"NO\");\r\n\t\tFS2.setYearlySalary(45000);\r\n\t\tFS2.setYearlyBonus(2000);\r\n\t\tFS2.computePay(3);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFS2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[C. The Company Full-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress H1 = new Address();\r\n\t\tFullTimeHourlyEmployee FH1 = new FullTimeHourlyEmployee(\"Lk\", \"Bit\", 19, 3001);\r\n\t\tH1.setCity(\"San Jose\");\r\n\t\tH1.setState(\"CA\");\r\n\t\tH1.setStreetName(\"Willmams Street\");\r\n\t\tH1.setStreetNumber(779);\r\n\t\tH1.setZipCode(96654);\r\n\t\tFH1.setEmployeeId(\"FH-3001\");\r\n\t\tFH1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH1.setspecoalAccomo(\"NO\");\r\n\t\tFH1.setHourlyPay(100);\r\n\t\tFH1.setOverTimePay(200);\r\n\t\tFH1.computePay(43);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress H2 = new Address();\r\n\t\tFullTimeHourlyEmployee FH2 = new FullTimeHourlyEmployee(\"Ak\", \"Jit\", 21, 3002);\r\n\t\tH2.setCity(\"San Jose\");\r\n\t\tH2.setState(\"CA\");\r\n\t\tH2.setStreetName(\"Willmams Street\");\r\n\t\tH2.setStreetNumber(779);\r\n\t\tH2.setZipCode(96654);\r\n\t\tFH2.setEmployeeId(\"FH-3002\");\r\n\t\tFH2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH2.setspecoalAccomo(\"NO\");\r\n\t\tFH2.setHourlyPay(100);\r\n\t\tFH2.setOverTimePay(200);\r\n\t\tFH2.computePay(38);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[D. The Company Part-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress P1 = new Address();\r\n\t\tPartTimeHourlyEmployee PH1 = new PartTimeHourlyEmployee(\"Kitch\", \"Aml\", 18, 4001);\r\n\t\tP1.setCity(\"San jose\");\r\n\t\tP1.setState(\"CA\");\r\n\t\tP1.setStreetName(\"Jim Street\");\r\n\t\tP1.setStreetNumber(66);\r\n\t\tP1.setZipCode(96334);\r\n\t\tPH1.setlevelOfEducation(\"Master\");\r\n\t\tPH1.setspecoalAccomo(\"NO\");\r\n\t\tPH1.setHourlyPay(60);\r\n\t\tPH1.computePay(30);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tPH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress P2 = new Address();\r\n\t\tPartTimeHourlyEmployee PH2 = new PartTimeHourlyEmployee(\"Kim\", \"Boy\", 19, 4002);\r\n\t\tP2.setCity(\"San jose\");\r\n\t\tP2.setState(\"CA\");\r\n\t\tP2.setStreetName(\"Amy Street\");\r\n\t\tP2.setStreetNumber(696);\r\n\t\tP2.setZipCode(96465);\r\n\t\tPH2.setlevelOfEducation(\"Master\");\r\n\t\tPH2.setspecoalAccomo(\"NO\");\r\n\t\tPH2.setHourlyPay(60);\r\n\t\tPH2.computePay(30);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tPH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[E. The Company Hourly Paid Contractors list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress c1 = new Address();\r\n\t\tContractor C1 = new Contractor(\"Ace\", \"EL\", 27, 5001);\r\n\t\tc1.setCity(\"San Jose\");\r\n\t\tc1.setState(\"CA\");\r\n\t\tc1.setStreetNumber(556);\r\n\t\tc1.setStreetName(\"S 28th Street\");\r\n\t\tc1.setZipCode(96348);\r\n\t\tC1.setEmployeeId(\"CO-5001\");\r\n\t\tC1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC1.setspecoalAccomo(\"NO\");\r\n\t\tC1.setHourlyPay(180.5);\r\n\t\tC1.setOverTimePay(400);\r\n\t\tC1.computePay(40);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tC1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\r\n\t\tAddress c2 = new Address();\r\n\t\tContractor C2 = new Contractor(\"Aty\", \"Jack\", 24, 5002);\r\n\t\tc2.setCity(\"San Jose\");\r\n\t\tc2.setState(\"CA\");\r\n\t\tc2.setStreetNumber(556);\r\n\t\tc2.setStreetName(\"W 18th Street\");\r\n\t\tc2.setZipCode(96987);\r\n\t\tC2.setEmployeeId(\"CO-5002\");\r\n\t\tC2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC2.setspecoalAccomo(\"NO\");\r\n\t\tC2.setHourlyPay(150.5);\r\n\t\tC2.setOverTimePay(300);\r\n\t\tC2.computePay(42);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tC2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[F. The Company Customers/Clients list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress U1 = new Address();\r\n\t\tCustomer CU1 = new Customer(\"Cat\", \"AP\", 34, 6001);\r\n\t\tU1.setCity(\"LA\");\r\n\t\tU1.setState(\"CA\");\r\n\t\tU1.setStreetName(\"Josh Street\");\r\n\t\tU1.setStreetNumber(447);\r\n\t\tU1.setZipCode(50063);\r\n\t\tCU1.setCustomerId(\"CU-6001\");\r\n\t\tCU1.setDirectDeposit(\"YES\");\r\n\t\tCU1.setlevelOfEducation(\"Master\");\r\n\t\tCU1.setPaymentMethod(\"Credit Card\");\r\n\t\tCU1.setPreferredMethod(\"Credit Card\");\r\n\t\tCU1.setspecoalAccomo(\"NO\");\r\n\t\tCU1.makePayment();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tCU1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress U2 = new Address();\r\n\t\tCustomer CU2 = new Customer(\"Frank\", \"Keeny\", 29, 6002);\r\n\t\tU2.setCity(\"San Jose\");\r\n\t\tU2.setState(\"CA\");\r\n\t\tU2.setStreetName(\"E 19th Street\");\r\n\t\tU2.setStreetNumber(112);\r\n\t\tU2.setZipCode(92663);\r\n\t\tCU2.setCustomerId(\"CU-6002\");\r\n\t\tCU2.setDirectDeposit(\"NO\");\r\n\t\tCU2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tCU2.setPaymentMethod(\"Cash\");\r\n\t\tCU2.setPreferredMethod(\"Cash Check\");\r\n\t\tCU2.setspecoalAccomo(\"NO\");\r\n\t\tCU2.makePayment();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tCU2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\t\r\n\t}", "public static void main(String[] args) {\n\t\tEmployee employee= new Employee(\"Gowtham\",\"Subramanian\");\r\n\t\tSystem.out.println(\"Hello \"+employee.getfName()+\" Enter Department Name\");\r\n\t\tSystem.out.println(\"1.Technical\\n2.Admin\\n3.HR\\n4.Legal\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice = in.nextInt();\r\n\t\tDepartment department = new Department();\r\n\t\tCredentialService cr = new CredentialService();\r\n\t\tswitch(depChoice) {\r\n\t\tcase 1:\r\n\t\t\tdepartment.setDeptName(\"technical\");\r\n\t\t\tString email = cr.generateEmail(employee, department);\r\n\t\t\tString password = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tdepartment.setDeptName(\"admin\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tdepartment.setDeptName(\"hr\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tdepartment.setDeptName(\"legal\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Invalid\");\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(employees.size() >= 1){\n\t\t\t\t\tif(empNameCombo.getSelectedIndex() != 0){\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeName().equalsIgnoreCase(empNameCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tempJTextArea.setText(\"Employee ID: \"+employee.getEmployeeId()\n\t\t\t\t\t\t\t+\"\\n Name: \" +employee.getEmployeeName() \n\t\t\t\t\t\t\t+\"\\n Access Level: \" +employee.getAccess()\n\t\t\t\t\t\t\t+\"\\n Password: \" +employee.getPassword()\n\t\t\t\t\t\t\t+\"\\n Salary: \" +employee.getSalary());\n\t\t\t\t\t\t\tempNameCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Employee.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Employees Found\");\n\t\t\t\t}\n\t\t\t}", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}", "public static void work(Employee [] employee) {\n\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\tif (employee[i+1].isAdminOrNot()) { //Administrative\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Rental Customer Info.\", \"Sales Info.\"\n\t\t\t\t\t\t, \"Employee Info.\", \"Vehicle Info.\", \"Exit\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Administrative user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Sales Information\");\n\t\t\t\t\t\t\t\tgetSalesInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Information\");\n\t\t\t\t\t\t\t\tgetEmployeeInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Vehicle Information\");\n\t\t\t\t\t\t\t\tgetVehicleInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\tdefault: JOptionPane.showMessageDialog(null, \"Error\");\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t} else { //Regular\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Enter Customer Information\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Regular user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Enter Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\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 3:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void showBeveragesMenu(int selectedPerson) {\n\t\ttry{\n System.out.println(\"Please place your order\");\n randomNum=transactionService.createRandomOrderNumber();\n OrderNum=initialOrderNum+randomNum;\n do {\n \t\n showCoffeeType();\n showCoffeeSize();\n System.out.println(\"Do you want Add-ons?\");\n subChoice=input.next();\n if(subChoice.equalsIgnoreCase(\"yes\"))\n {\n showCoffeeAddon();\n \n }\n else\n {\n \ttransactionService.createCoffeeOrder(selectedPerson,OrderNum,selectedCoffeeType,selectedCoffeeSize,selectedAddon);\n }\n System.out.println(\"Do you want to order more coffee?\");\n subChoice = input.next();\n \n \n\n }while(subChoice.equalsIgnoreCase(\"yes\"));\n showVoucher();\n\n printBill(selectedPerson,OrderNum,selectedVoucher);\n System.out.println(\"Happy Drink! Have a good day.\");\n System.out.println(\"================================\");\n\n\n\n }\n \n catch (InputMismatchException e)\n {\n System.out.println(\"Please provide a correct input\");\n }\n catch (NullPointerException en)\n {\n System.out.println(en.getMessage());\n }\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "public static void menu(Scanner input, ArrayList<Employee> newEmployee){\n String menuAns;\n int userAnswer = 0;\n \n //Infinite loop until user selected exit\n while(true){\n System.out.print(\"\\nWhat would you like to do at this time?\"+\n \"\\n1) Add Employee\"+ \n \"\\n2) Add Shift Supervisor\"+ \n \"\\n3) Add Production Worker\"+\n \"\\n4) Add Team Leader\"+\n \"\\n5) Print employees\"+\n \"\\n6) Exit the Program\"+\n \"\\nPlease enter a choice: \");\n menuAns = input.nextLine();\n userAnswer = UtilityMethods.verifyInt(input, menuAns);\n switch(userAnswer){\n case 1: \n addEmployee(input, newEmployee);\n break;\n \n case 2:\n addShiftSupervisor(input, newEmployee);\n break;\n \n case 3:\n addProductionWorker(input, newEmployee);\n break;\n \n case 4:\n addTeamLeader(input, newEmployee);\n break;\n\n case 5:\n printEmployees(newEmployee);\n break;\n \n case 6:\n farewell();\n \n }\n } \n }", "public boolean addBranchEmployee(Employee person)\n\t{\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tif(employees.get(i).getMail().equals(person.getMail()))\n\t\t\t\treturn false;\n\t\t}\n\n\t\tperson.setId(this.company.getEmployeeCounter());\n\t\tthis.company.getEmployees().insert(person);\n\n\t\treturn true;\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter employee ID: \");\r\n\t\tint empId = input.nextInt();\r\n\t\tSystem.out.println(\"-----------------------------------------------\");\r\n\t\tinput.close();\r\n\t\t\r\n\t\t/*\r\n\t\t * I figured it would be more efficient to call the subclasses from the\r\n\t\t * superclass. To stay within the guidelines of the assignment I will\r\n\t\t * call the superclass so that I can correctly fill the array and allow\r\n\t\t * the status of the employee to determine which subclass will be used.\r\n\t\t */\r\n\t\t\r\n\t\tEmployee e1 = new Employee(empId);\r\n\t\tString stat = e1.getStatus();\r\n\t\t\r\n\t\tif(stat.equals(\"Full Time\")) {\r\n\t\t\t\r\n\t\t\tSalaryEmployee se1 = new SalaryEmployee(empId);\r\n\r\n\t\t} else if(stat.equals(\"Part Time\")) {\r\n\t\t\t\r\n\t\t\tHourlyEmployee he1 = new HourlyEmployee(empId);\r\n\t\t\t\r\n\t\t} else if(stat.equals(\"Commission\")) {\r\n\t\t\t\r\n\t\t\tCommissionEmployee ce1 = new CommissionEmployee(empId);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\te1.setPay(0.00);\r\n\t\t\te1.printEmployee();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\tse1.printEmployee();\r\n\t\t\r\n//\t\tEmployee e1 = new Employee(empId);\r\n//\t\te1.getEmployee();\r\n\t\t\r\n\t}", "public static void main(String[] args){\n ArrayList<Employee> newEmployee = new ArrayList<Employee>();\n \n //Scanner used for user input\n Scanner input = new Scanner(System.in);\n \n welcome();\n menu(input, newEmployee);\n \n }", "public List<Employee_mst> listEmployeeByBranch(final String branch) {\n final StringBuilder query = new StringBuilder();\n query.append(\"SELECT e FROM Employee_mst e, Authority_mst a WHERE e.emp_delete_flg = 'false' \");\n query.append(\" AND (e.emp_condi_code = '0' OR e.emp_condi_code IS NULL) \");\n query.append(\" AND e.emp_settle_authority=a.aut_code \");\n\n if (SummaryReportConstants.HQ_CODE.equals(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.HEAD_QUARTER);\n }\n else if (!StringUtils.isEmpty(branch)) {\n query.append(\" AND a.aut_code = \" + AuthorityLevels.BRANCH).append(\" AND e.emp_adpcode = '\" + branch + \"'\");\n }\n\n query.append(\" ORDER BY e.emp_code\");\n List<Employee_mst> results = super.emMain.createQuery(query.toString(), Employee_mst.class).getResultList();\n return results;\n }", "void choice() throws ClassNotFoundException, SQLException {\n\t\tScanner s = new Scanner(System.in);\r\n\t\tSystem.out.println(\"1)Admin\\n2)Customer\\n3)Exit\\n\");\r\n\t\tSystem.out.println(\"Enter the choice\");\r\n\t\tint ch= s.nextInt();\r\n\t\tswitch(ch)\r\n\t\t{\r\n\t\tcase 1: Admin ad= new Admin();\r\n\t\tad.admindetail();\r\n\t\tbreak;\r\n\t\tcase 2: Customer c= new Customer();\r\n\t\tc.customerdetail();\r\n\t\tbreak;\r\n\t\tcase 3: System.out.println(\"Exited successfully\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }", "public void processUser() {\r\n Scanner sc = new Scanner(System.in);\r\n model.setAllparameters(inputIntValueWithScanner(sc, View.INPUT_INT_HOUR_DATA, GlobalConstants.PRIMARY_HOUR_MAX_BARRIER),// the correct input (hour,minute,second) is sent to the model\r\n inputIntValueWithScanner(sc, View.INPUT_INT_MINUTE_DATA, GlobalConstants.PRIMARY_MINUTE_MAX_BARRIER),\r\n inputIntValueWithScanner(sc, View.INPUT_INT_SECOND_DATA, GlobalConstants.PRIMARY_SECOND_MAX_BARRIER));\r\n int k = 0;\r\n do { //at least once the menu option is chosen (for option number 6 (break) for example)\r\n k = inputIntValueWithScanner(sc, View.CHOOSE_OPERATION, GlobalConstants.MENU_OPTION_MAX_VALUE);\r\n chooseOperation(k);\r\n } while (k != GlobalConstants.MENU_OPTION_MAX_VALUE); //menu loop until break option isn't chosen\r\n\r\n }", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "public static void main(String args[])\r\n\t{\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your first name:\");\r\n\t\tString firstname = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name:\");\r\n\t\tString lastname = sc.nextLine();\r\n\t\tSystem.out.println(\"Please enter the department from the folloiwng \\n 1.Technical \\n 2.Admin \\n 3.Human Resource \\n 4.Legal \");\r\n\t\tint choice = sc.nextInt();\r\n\t\t\r\n\t\tEmployee emp;\r\n\t\t\r\n\t\tswitch( choice ) {\r\n\t\t\tcase 1:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"tech\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"adm\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"hr\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"lg\" );\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println( \"Incorrect choice\" );\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t\t//generate email\r\n\t\tCredentialService cs = new CredentialService();\r\n\t\tString email = cs.generateEmailAddress( emp );\r\n\t\tString password = cs.GeneratePassword();\r\n\t\tcs.showCredentials(emp, email, password);\r\n\r\n\r\n\t\t}", "public static void main(String[] args) {\n Scanner userInput = new Scanner(System.in);\n boolean quit =false;\n Bank bank = new Bank(\"Dummy\");\n while(!quit){\n System.out.println(\"Please provide the input now\");\n switch (userInput.nextInt()){\n case 1:\n printInstructions();\n break;\n case 2:\n System.out.println(\"Good Please provide the name of the bank\");\n bank = startBank();\n break;\n case 3:\n startBranch(bank);\n break;\n case 4:\n bank.addCustomer();\n break;\n case 5:\n bank.customerTransaction();\n break;\n case 6:\n bank.updateTransaction();\n break;\n case 7:\n getBankDetail(bank);\n break;\n case 8:\n bank.getBalancePerBranch();\n break;\n case 9:\n quit = true;\n System.out.println(\"quitting the applicaiton\");\n break;\n default:\n System.out.println(\"Please give correct input\");\n }\n\n }\n }", "public void openEmployeesPage() {\n // Navigate to HumanResources > Employees through the left menu\n driver.findElement(By.cssSelector(\"div.group-items>fuse-nav-vertical-collapsable:nth-child(5)\")).click();\n driver.findElement(By.cssSelector(\"fuse-nav-vertical-collapsable:nth-child(5)>div.children>fuse-nav-vertical-item:nth-child(2)\")).click();\n }", "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }", "public void actionPerformed(ActionEvent e){\n\t\t\tif(employees.size() >= 1){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeId()== Integer.parseInt(empIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tempJTextArea.setText(\"Employee ID: \"+employee.getEmployeeId()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Name: \" +employee.getEmployeeName() \n\t\t\t\t\t\t\t\t\t\t+\"\\n Access Level: \" +employee.getAccess()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Password: \" +employee.getPassword()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Salary: \" +employee.getSalary());\n\t\t\t\t\t\t\t\tempIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Id should be a number.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Employees Found\");\n\t\t\t\t}\n\t\t\t}", "@Override\n public void successInsertBranch() {\n edtAddress.setText(\"\");\n edtPassword.setText(\"\");\n edtBranchName.setText(\"\");\n Toast.makeText(context, \"Branch has been added\", Toast.LENGTH_SHORT).show();\n // presenter.getBranchData();\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------------HR representatives Log in----------------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your USERNAME: \");\n\t\tString username = input.nextLine();\n\t\tSystem.out.println(\"Please enter your PASSWORD: \");\n\t\tString password = input.nextLine();\n\t\tSystem.out.println();\n\t\t\n\t\t//test public static int getEmployeeID (String user, String password) method\n\t\tint empID = DAManager.getEmployeeID(username, password);\n\t\t\n\t\tif (empID == 0) {\n\t\t\tSystem.out.println(\"You are an unauthorized user.\");\n\t\t\tSystem.exit(0);\n\t\t}else {\n\t\t\tSystem.out.println(\"You have passed the credential check.\\n\");\n\t\t\tSystem.out.println(\"Your information is : \");\n\t\t\t//test public static Employee getEmployeeByID(int empid) method \n\t\t\tEmployee HR_emp = DAManager.getEmployeeByID(empID);\n\t\t\tHR_emp.display();\n\t\t\t\n\t\t\t//test public static void addEmployee (Employe emp) method\n\t\t\tSystem.out.println(\"\\nAdd one employee inte EMPLOYEE table\");\n\t\t Employee added_emp = new Employee(207, \"Yuhang\", \"Zhao\", \"[email protected]\", \"111-222-3333\", java.sql.Date.valueOf(\"2020-09-01\"), \"IT_PROG\", 30000, 0.0,102,60);\n\t\t\tDAManager.addEmployee(added_emp);\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getAllEmployees() method\n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info\");\n\t\t\tArrayList<Employee> empList = DAManager.getAllEmployees();\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empList.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in EMPLOYEES table is: \"+ empList.size());\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getEmployeesByDepartmentID (int depid) method \n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info in the department_ID 60: \");\n\t\t\tArrayList<Employee> empListByDep = DAManager.getEmployeesByDepartmentID(60);\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empListByDep.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in deaprtment ID 60 is: \"+empListByDep.size());\n\t\t\t\n\t\t\t//test public static int updateEmployee (Employee emp) method\n\t\t\tSystem.out.println(\"\\nUpdate the employee#99 info\");\n\t\t\tEmployee updated_emp = new Employee(207, \"James\", \"Bob\", \"[email protected]\", \"123-345-1111\", java.sql.Date.valueOf(\"2019-11-01\"), \"FI_ACCOUNT\", 24000, 0.0, 108, 100);\n\t\t\tDAManager.updateEmployee(updated_emp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//test public static boolean batchUpdate(String[] SQLs) method\n\t\t\tSystem.out.println(\"\\nTest batchUpdate method: \");\n\t\t\tString batchSQL1 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(208, 'Lebron', 'James', '[email protected]', '111-111-2222', TO_DATE('01-Jan-2017', 'DD-MM-YYYY','NLS_DATE_LANGUAGE = American'), 'IT_PROG')\";\n\t\t\tString batchSQL2 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(209, 'Kevin', 'Durant', '[email protected]', '111-222-3333', SYSDATE, 'AD_VP')\";\n\t\t\tString batchSQL3 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(210, 'Kris', 'Smith', '[email protected]', '111-333-4444', SYSDATE, 'ST_MAN')\";\n\t\t\tString[] SQLs = new String[3];\n\t\t\tSQLs[0] = batchSQL1;\n\t\t\tSQLs[1] = batchSQL2;\n\t\t\tSQLs[2] = batchSQL3;\n\t\t\tif(DAManager.batchUpdate(SQLs)) {\n\t\t\t\tSystem.out.println(\"Success. This transaction is successfully executed!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Failed. All SQL statements are rolled back.\");\n\t\t\t};\n\t\t\t\n\t\t\t//test public static int deleteEmployeeByID (int empid) method\n\t\t\tSystem.out.println(\"\\nDelete the employee#210\");\n\t\t\tDAManager.deleteEmployeeByID(210);\n\t\t}\n\n\t}", "private void createAndSetNewBranch()\n {\n Date startDateOfArticle = getStartDateOfArticle();\n final String branchId = startDateOfArticle == null ? GWikiProps.formatTimeStamp(new Date()) : GWikiProps\n .formatTimeStamp(startDateOfArticle);\n\n wikiContext.runInTenantContext(branchId, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n final GWikiElement branchInfo = PlcUtils.createInfoElement(wikiContext, branchId, \"\", branchId, \"\");\n final GWikiElement branchFileStats = PlcUtils.createFileStats(wikiContext);\n wikiContext.getWikiWeb().getAuthorization().runAsSu(wikiContext, new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n wikiContext.getWikiWeb().saveElement(wikiContext, branchInfo, false);\n wikiContext.getWikiWeb().saveElement(wikiContext, branchFileStats, false);\n return null;\n }\n });\n GLog.note(GWikiLogCategory.Wiki, \"Autocreate branch: \" + branchId);\n return null;\n }\n });\n\n // set new created branch as selected\n selectedBranch = branchId;\n }", "public EmployeeBoarding addEmployee(RetailscmUserContext userContext, String employeeBoardingId, String companyId, String title, String departmentId, String familyName, String givenName, String email, String city, String address, String cellPhone, String occupationId, String responsibleForId, String currentSalaryGradeId, String salaryAccount , String [] tokensExpr) throws Exception;", "private void performApplyUserHandling() throws Exception {\n String methodName = \"performGuestUserCreateHandling\";\n trace.entering(methodName);\n\n boolean guestE = ((Boolean)proxy.getSessionAttribute(enableGuestReg)).booleanValue();\n boolean susE = ((Boolean)proxy.getSessionAttribute(enableSUSPlugin)).booleanValue();\n // boolean companyE = ((Boolean)proxy.getSessionAttribute(enableCompanyReg)).booleanValue();\n\n CompanySelectBean companySelectBean = new CompanySelectBean(proxy);\n String companyName = companySelectBean.getCompanySearchName();\n trace.debugT(methodName, \"companyName is:\", new String[]{proxy.getRequestParameter(CompanySelectBean.companySearchNameId)});\n TradingPartnerInterface company = null;\n UserAccountBean uaBean = new UserAccountBean(proxy);\n UserBean userBean = new UserBean(proxy, false);\n\n // check User logonid & password\n ErrorBean error = uaBean.checkUserAccount(true, proxy.getRequestLocale());\n if ( null != error ) {\n trace.errorT(methodName, \"user input is wrong\", new Message[] {error.getMessage()});\n proxy.setRequestAttribute(ErrorBean.beanId, error);\n if ( !susE ) proxy.setRequestAttribute(CompanySelectBean.beanId, companySelectBean);\n proxy.setRequestAttribute(UserBean.beanId, userBean);\n proxy.setRequestAttribute(UserAccountBean.beanId, uaBean);\n proxy.gotoPage(applyUserPage);\n return;\n }\n\n error = userBean.checkUser(proxy.getRequestLocale());\n if ( null != error ) {\n trace.errorT(methodName, \"user input is wrong\", new Message[] {error.getMessage()});\n proxy.setRequestAttribute(ErrorBean.beanId, error);\n if ( !susE ) proxy.setRequestAttribute(CompanySelectBean.beanId, companySelectBean);\n proxy.setRequestAttribute(UserAccountBean.beanId, uaBean);\n proxy.setRequestAttribute(UserBean.beanId, userBean);\n proxy.gotoPage(applyUserPage);\n return;\n }\n\n\t\tif ( susE ) {\n\t\t\ttrace.debugT(methodName, \"for SUS, to retrieve companyid from the input regid ...\");\n\t\t\tString partnerId = null;\n\t\t\ttry {\n\t\t\t\tpartnerId = userBean.checkRegId();\n\t\t\t} catch (UMException ex) {\n\t\t\t\tproxy.setRequestAttribute(ErrorBean.beanId, new ErrorBean(new Message(UserAdminMessagesBean.REGID_INVALID)));\n\t\t\t\tproxy.setRequestAttribute(UserBean.beanId, userBean);\n\t\t\t\tproxy.gotoPage(applyUserPage);\t\n\t\t\t\treturn;\t\t\t\n\t\t\t}\n\t\t\tif ( null == partnerId ) {\n\t\t\t\ttrace.debugT(methodName, \"regId is empty\");\n\t\t\t\tproxy.setRequestAttribute(ErrorBean.beanId, new ErrorBean(new Message(UserAdminMessagesBean.REGID_MISSING)));\n\t\t\t\tproxy.setRequestAttribute(UserBean.beanId, userBean);\n\t\t\t\tproxy.gotoPage(applyUserPage);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\ttrace.debugT(methodName, \"regid is: \", new String[]{partnerId});\n\t\t\t\tcompanySelectBean = new CompanySelectBean(partnerId);\n\t\t\t\tcompany = companySelectBean.getSingleCompany();\n\t\t\t\ttrace.debugT(methodName, \"SUS: company retrived is: \", new String[]{company.getPartnerID().toString()});\n\t\t\t\tproxy.setSessionAttribute(slctcom, company);\n\t\t\t\tproxy.setRequestAttribute(UserBean.beanId, new UserBean(proxy));\n\t\t\t\tproxy.setSessionAttribute(uApplyUser, userBean);\n\t\t\t\tproxy.setSessionAttribute(uaApplyUser, uaBean);\n\t\t\t\tproxy.setSessionAttribute(comApplyUser, companySelectBean);\n\t\t\t\tproxy.gotoPage(applyCompanyUserPage);\n\t\t\t}\t\t\t\n\t\t} else { // not for sus Registration\n\t\t\tif ( companyName.length() < 1 ) {\n\t\t\t\ttrace.debugT(methodName, \"companySearchName is empty!\");\n\t\t\t\tif ( null != proxy.getSessionAttribute(slctcom) ) proxy.removeSessionAttribute(slctcom);\n\t\t\t\t// case1: companySearchName eq empty\n\t\t\t\tif ( guestE ) {\n\t\t\t\t\ttrace.debugT(methodName, \"to create a guest user\");\n\t\t\t\t\tproxy.setSessionAttribute(uApplyUser, userBean);\n\t\t\t\t\tproxy.setSessionAttribute(uaApplyUser, uaBean);\n\t\t\t\t\tperformGuestUserCreate(false);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\ttrace.errorT(methodName, \"guest disabled, company must be filled\");\n\t\t\t\t\tUserAdminLocaleBean localeBean = (UserAdminLocaleBean) proxy.getSessionAttribute(UserAdminLocaleBean.beanId);\n\t\t\t\t\tString msgObj = localeBean.get(\"COMPANY\");\n\t\t\t\t\tMessage msg = new Message(UserAdminMessagesBean.MUST_BE_FILLED, msgObj);\n\t\t\t\t\tproxy.setRequestAttribute(ErrorBean.beanId, new ErrorBean(msg));\n\t\t\t\t\tproxy.setRequestAttribute(CompanySelectBean.beanId, companySelectBean);\n\t\t\t\t\tproxy.setRequestAttribute(UserAccountBean.beanId, uaBean);\n\t\t\t\t\tproxy.setRequestAttribute(UserBean.beanId, userBean);\n\t\t\t\t\tproxy.gotoPage(applyUserPage);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttrace.debugT(methodName, \"companySelectName is filled!\");\n\t\t\t\tcompany = (TradingPartnerInterface) proxy.getSessionAttribute(slctcom);\n\t\t\t\tboolean doComSlct = true;\n\t\t\t\tif ( null != company) {\n\t\t\t\t\tString slctComName = company.getDisplayName();\n\t\t\t\t\tif ( slctComName.equals(companyName) ) doComSlct = false;\n\t\t\t\t}\n\t\t\t\tif ( doComSlct ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcompany = companySelectBean.getSingleCompany();\n\t\t\t\t\t} catch (BeanException ex) {\n\t\t\t\t\t\tsearchCompany();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tproxy.setSessionAttribute(slctcom, company);\n\t\t\t\t}\n\t\t\t\tproxy.setRequestAttribute(UserBean.beanId, new UserBean(proxy));\n\t\t\t\tproxy.setSessionAttribute(uApplyUser, userBean);\n\t\t\t\tproxy.setSessionAttribute(uaApplyUser, uaBean);\n\t\t\t\tproxy.setSessionAttribute(comApplyUser, companySelectBean);\n\t\t\t\tproxy.gotoPage(applyCompanyUserPage);\n\t\t\t}\t\t\t\n\t\t}\n }", "protected void doPost(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tString bscPeriod = request.getParameter(\"bscPeriod\");\n\t\tString department = request.getParameter(\"department\");\n\t\tString position = request.getParameter(\"position\");\n\t\tString bscEmployeeName = null;\n\t\t\n\t\tif (position.equals(\"Executive Manager Business Banking\")){\n\t\t\tbscEmployeeName = \"NOZIZWE MULELA\"; \n\t\t} else if (position.equals(\"Executive Manager Corporate Services\")){\n\t\t\tbscEmployeeName = \"THEMBI DLAMINI\"; \n\t\t}else if (position.equals(\"Executive Manager Credit\")){\n\t\t\tbscEmployeeName = \"DUMASE NXUMALO\"; \n\t\t}else if (position.equals(\"Executive Manager Finance\")){\n\t\t\tbscEmployeeName = \"ZANELE DLAMINI\"; \n\t\t}else if (position.equals(\"Executive Manager Internal Audit\")){\n\t\t\tbscEmployeeName = \"TAWONGA SIFUNDZA\"; \n\t\t}else if (position.equals(\"Executive Manager IT\")){\n\t\t\tbscEmployeeName = \"PAUL WASWA\"; \n\t\t}else if (position.equals(\"Executive Manager Legal and Board Secretary\")){\n\t\t\tbscEmployeeName = \"SIFISO MDLULI\"; \n\t\t}else if (position.equals(\"Executive Manager Marketing\")){\n\t\t\tbscEmployeeName = \"LINDIWE SHONGWE\"; \n\t\t}else if (position.equals(\"Executive Manager Operations\")){\n\t\t\tbscEmployeeName = \"ENOC MAVIMBELA\"; \n\t\t}\n\t\t\n\t\tString bscEmployeeSupervisor = \"ZAKELE LUKHELE\";\n\t\tString subDepartment = \"Exco\";\n\t\tString[] perspectives = request.getParameterValues(\"perspective\");\n\t\tString[] objectives = request.getParameterValues(\"objective\");\n\t\tString[] periods = request.getParameterValues(\"period\");\n\t\tString[] reportingFrequencies = request.getParameterValues(\"reportingFrequency\");\n\t\tString[] measures = request.getParameterValues(\"measure\");\n\t\tString[] bases = request.getParameterValues(\"base\");\n\t\tString[] stretches = request.getParameterValues(\"stretch\");\n\t\tString[] actuals = request.getParameterValues(\"actual\");\n\t\t\n\n\t\tConnectionHelper connectionHelper = new ConnectionHelper();\n\t\tcon = connectionHelper.connect();\n\t\tif (con != null) {\n\n\t\t\tString insertIssueSql = \"INSERT INTO [dbo].[bscSDSBExcoScores] \"\n\t\t\t\t\t+ \"([bscEmployeeName] \"\n\t\t\t\t\t+ \",[bscEmployeeSupervisor]\"\n\t\t\t\t\t+ \",[position]\"\n\t\t\t\t\t+ \",[department] \"\n\t\t\t\t\t+ \",[subDepartment] \"\n\t\t\t\t\t+ \",[bscPeriod] \"\n\t\t\t\t\t+ \",[perspective] \"\n\t\t\t\t\t+ \",[objective] \"\n\t\t\t\t\t+ \",[period] \"\n\t\t\t\t\t+ \",[reportingFrequencies] \"\n\t\t\t\t\t+ \",[measure] \"\n\t\t\t\t\t+ \",[base] \"\n\t\t\t\t\t+ \",[stretch] \"\n\t\t\t\t\t+ \",[actual]) \"\n\t\t\t\t\t+ \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\n\t\t\ttry {\n\n\t\t\t\tjava.sql.PreparedStatement insertReportStatement = con.prepareStatement(insertIssueSql);\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < measures.length; i++) {\n\t\t\t\t\t\n\t\t\t\t\tinsertReportStatement.setString(1, bscEmployeeName);\n\t\t\t\t\tinsertReportStatement.setString(2, bscEmployeeSupervisor);\n\t\t\t\t\tinsertReportStatement.setString(3, position);\n\t\t\t\t\tinsertReportStatement.setString(4, department);\n\t\t\t\t\tinsertReportStatement.setString(5, subDepartment);\n\t\t\t\t\tinsertReportStatement.setString(6, bscPeriod);\n\t\t\t\t\tinsertReportStatement.setString(7, perspectives[i]);\n\t\t\t\t\tinsertReportStatement.setString(8, objectives[i]);\n\t\t\t\t\tinsertReportStatement.setString(9, periods[i]);\n\t\t\t\t\tinsertReportStatement.setString(10, reportingFrequencies[i]);\n\t\t\t\t\tinsertReportStatement.setString(11, measures[i]);\n\t\t\t\t\tinsertReportStatement.setFloat(12, Float.valueOf(bases[i]));\n\t\t\t\t\tinsertReportStatement.setFloat(13, Float.valueOf(stretches[i]));\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tinsertReportStatement.setFloat(14, Float.parseFloat(actuals[i]));\n\t\t\t\t\tSystem.out.println(Float.parseFloat(actuals[i]));\n\t\t\t\t\tinsertReportStatement.executeUpdate();\n\t\t\t\t}\n\n\t\t\t\tinsertReportStatement.close();\n\t\t\t\tcon.close();\n\n\t\t\t\tRequestDispatcher view = request\n\t\t\t\t\t\t.getRequestDispatcher(\"WEB-INF/technicalResources_bsc/bscExcoHome.jsp\");\n\n\t\t\t\tview.forward(request, response);\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tfinally {\n\t\t\t\tif (con != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tConnectionHelper.disconnect(con);\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n if (request.getParameter(\"btnChooseEmployee\") != null){\n saveEverything(request);\n \n }else if (request.getParameter(\"btnRemoveSkill\") != null)\n {\n removeSkillFromEmployee(request);\n saveEverything(request);\n \n }else if(request.getParameter(\"btnAddSkill\") != null){\n addSkillForEmployee(request);\n saveEverything(request);\n }else{\n buildAndSaveEmployeeList(request);\n resetSkillLists(request);\n } \n\n getServletContext().getRequestDispatcher(\"/ManageEmployeeSkills.jsp\").forward(request,response); \n }", "private void accept() throws NumberFormatException, IOException {\r\n\r\n\t\tint choice;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Enter choice\\n1.Add New Employee\\n2.View all employees\\n3.Get employee by id\\n4.Delete an employee\\n5.Exit\");\r\n\t\t\tchoice = Integer.parseInt(reader.readLine());\r\n\r\n\t\t\tswitch (choice) {\r\n\t\t\tcase 1:\r\n\t\t\t\tSystem.out.println(\"Enter the Employee Name\");\r\n\t\t\t\temployee.put(\"id\", String.valueOf(Employee.getNextId()));\r\n\t\t\t\temployee.put(\"name\", reader.readLine());\r\n\t\t\t\tcontrol.addEmployee(employee);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tviewAll(control.viewAllEmployee());\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"Enter the Employee ID\");\r\n\t\t\t\tcontrol.getEmployeeById(Integer.parseInt(reader.readLine()));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tSystem.out.println(\"Enter the Employee ID\");\r\n\t\t\t\tcontrol.deleteEmployee(Integer.parseInt(reader.readLine()));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public void managerMenu() {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Manager Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Add an employee |\");\n System.out.println(\"| 2. Remove an employee |\");\n System.out.println(\"| 3. View all employees |\");\n System.out.println(\"| 4. View employees' total salary cost |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. View total rent profit |\");\n System.out.println(\"| 6. View most profitable item |\");\n System.out.println(\"| 7. View most frequent rented item |\");\n System.out.println(\"| 8. View best customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Load user, product data file |\");\n System.out.println(\"| 10. Load rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 11. Save DART data file |\");\n System.out.println(\"| 12. Save Rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n\n DartController dart = new DartController();\n\n switch (userInput.toLowerCase()) {\n case \"1\" -> userController.addEmployee();\n case \"2\" -> userController.deleteEmployee();\n case \"3\" -> userController.displayEmployees(false);\n case \"4\" -> userController.calculateSalary();\n case \"5\" -> dart.viewRentalTotalProfit();\n case \"6\" -> dart.viewRentalProfitable();\n case \"7\" -> dart.viewRentalFrequency();\n case \"8\" -> dart.viewRentalBestCustomer();\n case \"9\" -> dart.loadProductData();\n case \"10\" -> dart.loadRentalData();\n case \"11\" -> dart.saveProductData();\n case \"12\" -> dart.saveRentalData();\n case \"13\" -> mainMenu();\n\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMainMenu\", String.valueOf(e));\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"MajorAssignment.java - starting main method\\n\");\n\n\t\t// Create a scanner to accept input from the user\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Create a DBConnect object and open a connection\n\t\tDBConnect dbc2 = new DBConnect();\n//\t\tinput your details\n\t\tdbc2.setUpForKnuthMySQL(\"s2992196\", \"iestadom\", \"s2992196\", \"s2992196\", \"iestadom\");\n\t\t// open the connection\n\t\tdbc2.openConnection();\n// creating a do loop that will loop the option once\n\t\tdo {\n\t\t\t// Menu of the application\n//\t\t\tamend the menu with the new options\n\t\t\tSystem.out.println(\"\\n===========================================================\");\n\t\t\tSystem.out.println(\"USER MENU\");\n\t\t\tSystem.out.println(\"Please select an option by typing the corresponding number.\");\n\t\t\tSystem.out.println(\"0. Exit\");\t\t\t\t\n\t\t\tSystem.out.println(\"1. Display the count of the employees\");\n\t\t\tSystem.out.println(\"2. Display records of all employees\");\n\t\t\tSystem.out.println(\"3. Search for an employee by last name\");\n\t\t\tSystem.out.println(\"4. Add a new employee\");\n\t\t\tSystem.out.println(\"5. Show the salary of an employee by entering their number.\");\t\t\t\t\n\t\t\tSystem.out.println(\"6. Show all the employee's department number\");\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.print(\"option> \");\n\n\t\t\t// store the selected option number\n\t\t\tint option = sc.nextInt();\n\n\t\t\t// 0. exit the program\n\t\t\t\n\t\t\tif (option == 0) {\n\t\t\t\tSystem.out.println(\"Exiting the program\");\n\t\t\t\tbreak; //exit the while loop\n//\t\t\t\twhen we exit the loop the program stops\n\t\t\t}\n\n\t\t\t// 1. displaying all employees\n\t\t\telse if (option == 1) {\n\t\t\t\tint result = MajorAssignment.getEmployeeCount(dbc2.getConnection());\n\t\t\t\tSystem.out.println(result);\n//\t\t\t\tthis was done already in the class\n\t\t\t\t// Output the result of the getEmployeeCount method which is implemented after the main method\n//\t\t\t\tWe have written the method, like all the other get methods written in the options, at the bottom of the document\n\t\t\t}\n\n\t\t\t// 2. displaying all employees \n\t\t\telse if (option == 2) {\n//\t\t\t\twe are writing the second option which will show all the employees in the oop_employees table\n//\t\t\t\twe are using the get all employee details method that we have written at the end of the document\n\t\t\t\tEmployee [] result = MajorAssignment.getAllEmployeesDetails(dbc2.getConnection());\n\t\t\t\tfor (Employee e:result) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. search for an employee by name\n//\t\t\tWe are writing the third option which outputs all the details from an employee when we enter their last name.\n\t\t\telse if (option == 3) {\n\n\t\t\t\t// Use the getEmployeebyLastName method\t\t\t\n//\t\t\t\tAsk for the user input\n\t\t\t\tSystem.out.println(\"Please enter the last name of the employee you are searching for: \");\n\n\t\t\t\tString input_last_name = sc.next();\n\n\t\t\t\tgetEmployeeByLastName(dbc2.getConnection(), input_last_name);\n\n\t\t\t}\n\t\t\t\n\t\t\t// 4. adding an employee\n\n\t\t\telse if (option == 4) {\n\n\t\t\t\t\n\n\t\t\t\t// We are asking for the user input and storing it with a constructor from employee.java\n\n\t\t\t\tEmployee newEmployee = new Employee();\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's employee number: \");\n\n\t\t\t\tint emp_no = sc.nextInt();\n\n\t\t\t\tnewEmployee.setEmpNumber(emp_no);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's date of birth in the format yyyy-MM-dd: \");\n\n\t\t\t\tString temp = sc.next();\n\n\t\t\t\tDate dob = Date.valueOf(temp);\n\n\t\t\t\tnewEmployee.setBirthDate(dob);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's first name: \");\n\n\t\t\t\tString f_name = sc.next();\n\n\t\t\t\tnewEmployee.setFirstName(f_name);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's last name: \");\n\n\t\t\t\tString l_name = sc.next();\n\n\t\t\t\tnewEmployee.setLastName(l_name);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's gender (M/F): \");\n\n\t\t\t\tString gender = sc.next();\n\n\t\t\t\tnewEmployee.setGender(gender);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee start date in the format yyyy-MM-dd: \");\n\n\t\t\t\tString temp2 = sc.next();\n\n\t\t\t\tDate hire_date = Date.valueOf(temp2); \n\n\t\t\t\tnewEmployee.setHireDate(hire_date);\n\n\t\t\t\t\n//\t\t\t\tWe are inserting the input into a string and formating it accordingly\n\t\t\t\tString insertEmp = String.format(\"CALL newEmployee('%d', '%s', '%s', '%s', '%s', '%s');\", newEmployee.getEmpNo(), newEmployee.getDateofBirth(), newEmployee.getFirstName(), newEmployee.getLastName(), newEmployee.getGender(), newEmployee.getHireDate());\n\n\t\t\t\t\n//\t\t\t\tSaving the formated String and calling the newEmployee method written below\n\t\t\t\tnewEmployee(dbc2.getConnection(), insertEmp);\n\n\t\t\t}\n//\t\t\tI have written the option 5 to show us employees salary when we ask for the employee nubmer\n\t\t\t// 5. Additional functionality \n\t\t\telse if (option == 5) {\t\t\n\n\t\t\t\tSystem.out.println(\"Please enter the number of the employee whose salary you would like to look up: \");\n\n\t\t\t\tint input_emp_no = sc.nextInt();\n//\t\t\t\tStoring the salary and calling the method\n\t\t\t\tgetEmployeeSalary(dbc2.getConnection(), input_emp_no);\n\n\t\t\t\n\t\t\t\t\n\t\t\t}\t\n\t\t\t// 6. Additional functionality \n//\t\t\tI have added the sixth option to show us all the employees with their last names and the department numbers in which they belog\n\t\t\telse if (option == 6) {\n\t\t\t\tgetEmployeeDepartmentNo(dbc2.getConnection());\n\t\t\t}\t\n\n\t\t\t// unknown option\n//\t\t\tthis will be printed in case there is no valid option, meaning if the numbers 0-6 are not entered\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid option.\");\n\t\t\t}\n\t\t}\n\t\t\n//\t\tthe loop runs unless 0 is selected\n\t\twhile(true); //loop until option 0 is selected\n\n\t\t// Close the connection\n\t\tdbc2.closeConnection();\n\t\t// Close the scanner\n\t\tsc.close();\n//\t\twe are calling that the program has ended\n\t\tSystem.out.println(\"MajorAssignment.java - ending main method\\n\");\n\n\t}", "public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\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\r\n\t\t\t\t\t\t//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tHR hr= new HR();\r\n\t\tConfirmedEmployee confirmedEmployee = new ConfirmedEmployee();\r\n\t\tconfirmedEmployee.netSalary();// To see how it can also work\r\n\t\tAccounts accounts = new Accounts();\r\n\t\t\r\n\t\taccounts.processSalary(confirmedEmployee);\r\n\t\tInterns interns= new Interns();\r\n\t\taccounts.processSalary(interns);\r\n\t\tContractEmployee contractEmployee=new ContractEmployee();\r\n\t\taccounts.processSalary(contractEmployee);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void executeMenuItem(int choice) {\n\n\t\tswitch (choice) {\n\t\tcase APP_EXIT:\n\n\t\t\tSystem.out.println(\"system exiting\");\n\t\t\tbreak;\n\t\tcase APP_ADD_BOOK:\n\t\t\tappController.addBook();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_MOD_BOOK:\n\t\t\tappController.changeBook();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_FIND_BOOK:\n\t\t\tappController.findBook();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_LIST_BOOK:\n\t\t\tappController.listBook();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_ADD_USER:\n\t\t\tappController.addUser();\n\t\t\t\n\t\t\tbreak;\n\t\tcase APP_MOD_USER:\n\t\t\tappController.changeUser();\n\t\t\t\n\t\t\tbreak;\n\t\tcase APP_FIND_USER:\n\t\t\tappController.findUser();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_LIST_USER:\n\t\t\tappController.listUser();\n\t\t\t\n\t\t\tbreak;\n\t\tcase APP_ADD_LOAN:\n\t\t\tappController.addBookLoan();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_MOD_LOAN:\n\t\t\tappController.changeBookLoan();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_FIND_LOAN:\n\t\t\tappController.findBookLoan();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_LIST_LOAN:\n\t\t\tappController.listBookLoans();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_DEL_BOOK:\n\t\t\tappController.deleteBook();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_DEL_USER:\n\t\t\tappController.deleteUser();\n\t\t\n\t\t\tbreak;\n\t\tcase APP_DEL_LOAN:\n\t\t\tappController.deleteBookLoan();\n\t\t\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tSystem.out.println(\"bad input, Please input a 0-15\");\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "public static void main(){\n\t\tint option = getUserOption();\n\t\t/** switch case option start below */\n\t\tswitch (option){\n\t\t\tcase 1 : ToScreen.listEmployee(employee.getAllEmployee(), true); main();\n\t\t\t\tbreak;\n\t\t\tcase 2 : listStaffByCategory();\n\t\t\t\tbreak;\n\t\t\tcase 3 : ToScreen.listAdminStaffTask(employee.getAllAdminStaff(), true);main();\n\t\t\t\tbreak;\n\t\t\tcase 4 : searchStaffByName();\n\t\t\t\tbreak;\n\t\t\tcase 5 : ToScreen.listAnimal(animals.getAllAnimals(), true); main();\n\t\t\t\tbreak;\n\t\t\tcase 6 : ListAnimalByType();\n\t\t\t\tbreak;\n\t\t\tcase 7 : searchAnimalByName();\n\t\t\t\tbreak;\n\t\t\tcase 8 : MenuReception.main();\n\t\t\t\tbreak;\n\t\t\tcase 9 : System.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tmain();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tBankO way=new BankO();\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.println(\"银行服务\");\r\n\t\t\tSystem.out.println(\"1------开户\");\r\n\t\t\tSystem.out.println(\"2------存钱\");\r\n\t\t\tSystem.out.println(\"3------取钱\");\r\n\t\t\tSystem.out.println(\"4------转账\");\r\n\t\t\tSystem.out.println(\"请选择您的业务\");\r\n\t\t\tScanner number=new Scanner(System.in);\r\n\t\t\tint number_=number.nextInt();\r\n\t\t\t\r\n\t\t\tif(number_==1) {\r\n\t\t\t\t\r\n\t\t\t\tway.Kaihu();\r\n\t\t\t\t\r\n\t\t\t}else if(number_==2) {\r\n\t\t\t\tway.Cunqian();\r\n\t\t\t}else if(number_==3) {\r\n\t\t\t\tway.Quqian();\r\n\t\t\t}else if(number_==4) {\r\n\t\t\t\tway.zhuanzhang();\r\n\t\t\t} else if(number_==6){\r\n\t\t\t\tway.findAll();\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"你的输入有误请重新选择\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(viewEmpIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tif(editEmpNameField.getText().isEmpty() || editEmpAccessField.getText().isEmpty() || \n\t\t\t\t\t\t\teditEmpSalaryField.getText().isEmpty() || editEmpPasswordField.getText().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Complete All Fields\");\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeId() == Integer.parseInt(viewEmpIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\temployee.setEmployeeName(editEmpNameField.getText());\n\t\t\t\t\t\t\t\temployee.setAccess(Integer.parseInt(editEmpAccessField.getText()));\n\t\t\t\t\t\t\t\temployee.setSalary(Double.parseDouble(editEmpSalaryField.getText()));\n\t\t\t\t\t\t\t\temployee.setPassword(Integer.parseInt(editEmpPasswordField.getText()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Updated\");\n\t\t\t\t\t\t\t\tviewEmpIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\teditEmpNameField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpAccessField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpSalaryField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpPasswordField.setText(\"\");\n\t\t\t\t\t\t\t\treturn;\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}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Employee.\");\n\t\t\t\t}\n\t\t\t}", "public void customerRole() throws Exception {\n\n\t\t// create service class object\n\t\tcarSelerService = new CarSellerServiceImpl();\n\t\t// create BufferReader class object\n\t\tinputs = new BufferedReader(new InputStreamReader(System.in));\n\t\t// create CustomerBean class object.\n\t\tcustomerBean = new CustomerBean();\n\t\t// create service class object\n\t\tcarSellerabstractService = new CarSellerServiceImpl();\n\n\t\tdo {\n\n\t\t\tSystem.out.println(\"Customer Portal\");\n\t\t\tSystem.out.println(\"Chose option you want to insert\");\n\t\t\tSystem.out.println(\"\\t 1.View car details\");\n\t\t\tSystem.out.println(\"\\t 2.Purchase new car\");\n\t\t\tSystem.out.println(\"\\t 3.Genrate bill\");\n\t\t\tSystem.out.println(\"\\t 4.Back to dashboard\");\n\t\t\tSystem.out.println(\"\\t 5.Exit\");\n\n\t\t\tint option = 0;\n\t\t\ttry {\n\t\t\t\toption = Integer.parseInt(inputs.readLine());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tswitch (option) {\n\t\t\t// View car details start\n\t\t\tcase 1:\n\t\t\t\twhile (true) {\n\t\t\t\t\tSystem.out.println(\"Chose option by viewing car\");\n\t\t\t\t\tSystem.out.println(\"\\t 1.By manufacture company name\");\n\t\t\t\t\tSystem.out.println(\"\\t 2.By model name\");\n\t\t\t\t\tSystem.out.println(\"\\t 3.By price\");\n\t\t\t\t\tSystem.out.println(\"\\t 4.Go to customer portal\");\n\t\t\t\t\tSystem.out.println(\"\\t 5.Exit\");\n\n\t\t\t\t\tint innerOption = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinnerOption = Integer.parseInt(inputs.readLine());\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (innerOption) {\n\t\t\t\t\t// view by manufacture company name start\n\t\t\t\t\tcase 1:\n\n\t\t\t\t\t\tSystem.out.println(\"View car details by company manufacture name \");\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\n\t\t\t\t\t\tSystem.out.println(\"Enter manufacture company name\");\n\t\t\t\t\t\tcustomerBean.setCarManufacturer(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_COMPANY_NAME);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCarManufacturer());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\n\t\t\t\t\t\t\t\t// display car details\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company Name :\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t// close the object\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by manufacture company name end\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t// case 2 for view car details by model name\n\n\t\t\t\t\t\tSystem.out.println(\"View car details by company model name\");\n\t\t\t\t\t\tcustomerBean.setCarModelName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_MODELNAME);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCarModelName());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company Name:\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by model name end\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t// case 3 for view car details by given price range\n\t\t\t\t\t\tSystem.out.println(\"View car details by given range\");\n\t\t\t\t\t\tSystem.out.println(\"Enter starting range\");\n\t\t\t\t\t\tcustomerBean\n\t\t\t\t\t\t\t\t.setStartRange(carSelerService.validatePrice(Double.parseDouble(inputs.readLine())));\n\n\t\t\t\t\t\tSystem.out.println(\"Enter ending range\");\n\t\t\t\t\t\tcustomerBean.setEndRange(carSelerService.validatePrice(Double.parseDouble(inputs.readLine())));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create PrepareStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_RANGE);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setDouble(1, customerBean.getStartRange());\n\t\t\t\t\t\t\tpreparedStatement.setDouble(2, customerBean.getEndRange());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company :\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t\tif (!resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"No car found by given price \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by price end\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t// case 4 for calls the customer portal\n\t\t\t\t\t\tcustomerRole();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Please insert correct option\");\n\t\t\t\t\t}// while end\n\t\t\t\t} // inner switch\n\n\t\t\tcase 2:\n\t\t\t\t// case 2 for purchase new car car\n\n\t\t\t\t//Read values from console, validate and set to the SalesExecutiveBean class\n\t\t\t\tSystem.out.println(\"Enetr customer name\");\n\t\t\t\tcustomerBean.setCustomerName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enter mobile number\");\n\t\t\t\tcustomerBean.setMolileNo(carSelerService.validateMobile(Long.parseLong(inputs.readLine())));\n\n\t\t\t\tSystem.out.println(\"Enter PAN (Permanent Account Number) no\");\n\t\t\t\tcustomerBean.setPanNo(carSelerService.validPanNo(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enter adhar number\");\n\t\t\t\tcustomerBean.setAdharNo(carSelerService.validateAdharNo(Long.parseLong(inputs.readLine())));\n\n\t\t\t\tSystem.out.println(\"Insert VIN (Veichle Identification Number) no\");\n\t\t\t\tcustomerBean.setVinNumber(carSellerabstractService.validateVinNumber(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enetr car model name\");\n\t\t\t\tcustomerBean.setCarModelName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t// get current system date\n\t\t\t\tString registerationDate = carSelerService.generateDate();\n\t\t\t\tcustomerBean.setRegisterationDate(registerationDate);\n\n\t\t\t\ttry {\n\t\t\t\t\t// create connection\n\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t// create PreparedStatement\n\t\t\t\t\tpreparedStatement = (PreparedStatement) con\n\t\t\t\t\t\t\t.prepareStatement(Constant.GET_CAR_PRICE_AND_AVAILABLE_STATUS);\n\t\t\t\t\t// set the value to preparedStatement\n\t\t\t\t\tpreparedStatement.setString(1, customerBean.getVinNumber());\n\t\t\t\t\t// execute query\n\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\n\t\t\t\t\t// for geting price from database\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tcustomerBean.setPrice(resultSet.getDouble(1));\n\t\t\t\t\t\tcustomerBean.setAvailabeStatus(resultSet.getString(2));\n\t\t\t\t\t}\n\t\t\t\t\tif (customerBean.getAvailabeStatus().equalsIgnoreCase(\"available\")) {\n\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.CUSTOMER_PURCHASE_CAR_DETAILS);\n\n\t\t\t\t\t\t// set the values to the preparedStatements\n\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCustomerName());\n\t\t\t\t\t\tpreparedStatement.setLong(2, customerBean.getMolileNo());\n\t\t\t\t\t\tpreparedStatement.setLong(3, customerBean.getAdharNo());\n\t\t\t\t\t\tpreparedStatement.setString(4, customerBean.getPanNo());\n\t\t\t\t\t\tpreparedStatement.setString(5, customerBean.getVinNumber());\n\t\t\t\t\t\tpreparedStatement.setString(6, customerBean.getCarModelName());\n\t\t\t\t\t\tpreparedStatement.setString(7, customerBean.getRegisterationDate());\n\t\t\t\t\t\tpreparedStatement.setDouble(8, customerBean.getPrice());\n\n\t\t\t\t\t\t// execute query\n\t\t\t\t\t\tcount = preparedStatement.executeUpdate();\n\t\t\t\t\t\t// check record inserted or not\n\t\t\t\t\t\tif (count != 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"Your information submitted sucessfully!!!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} // if\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new CarNotAvailableException();\n\t\t\t\t\t}\n\t\t\t\t} // try\n\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\t\tSystem.out.println(\"Wrong Input given\");\n\t\t\t\t} // catch\n\t\t\t\tcatch (NullPointerException npe) {\n\t\t\t\t\tSystem.out.println(\"Record Not Found.\");\n\t\t\t\t} finally {\n\t\t\t\t\tresultSet.close();\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// purchase new Car Ends\n\t\t\tcase 3:\n\t\t\t\t// case 3 for Generate Bill\n\t\t\t\ttry {\n\t\t\t\t\t// get connection\n\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t// create statement obj\n\t\t\t\t\tstatement = (Statement) con.createStatement();\n\t\t\t\t\t// exexute query\n\t\t\t\t\tresultSet = (ResultSet) statement.executeQuery(Constant.GENRATE_BILL);\n\t\t\t\t\tSystem.out.println(\"Bill Generated\");\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tcustomerBean.setCustomerName(resultSet.getString(1));\n\t\t\t\t\t\tcustomerBean.setMolileNo(resultSet.getLong(2));\n\t\t\t\t\t\tcustomerBean.setAdharNo(resultSet.getLong(3));\n\t\t\t\t\t\tcustomerBean.setPanNo(resultSet.getString(4));\n\t\t\t\t\t\tcustomerBean.setVinNumber(resultSet.getString(5));\n\t\t\t\t\t\tcustomerBean.setCarModelName(resultSet.getString(6));\n\t\t\t\t\t\tcustomerBean.setRegisterationDate(resultSet.getString(7));\n\t\t\t\t\t\tcustomerBean.setPrice(resultSet.getDouble(8));\n\t\t\t\t\t}\n\t\t\t\t\t// display customer information\n\t\t\t\t\tSystem.out.println(\"Customer Details\");\n\t\t\t\t\tSystem.out.println(\"Cotomer Name: \" + customerBean.getCustomerName());\n\t\t\t\t\tSystem.out.println(\"Contact Number: \" + customerBean.getMolileNo());\n\t\t\t\t\tSystem.out.println(\"Adhar Number: \" + customerBean.getAdharNo());\n\t\t\t\t\tSystem.out.println(\"Personal Identification Number(PAN) No: \" + customerBean.getPanNo());\n\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + customerBean.getVinNumber());\n\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + customerBean.getCarModelName());\n\t\t\t\t\tSystem.out.println(\"Registration Date :\" + customerBean.getRegisterationDate());\n\t\t\t\t\tSystem.out.println(\"Price :\" + customerBean.getPrice());\n\t\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t// create preparedStatement\n\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.UPDATE_CAR_AVAILABLE_STATUS);\n\t\t\t\t\tString availableStatus = \"SOLD\";\n\t\t\t\t\t// set the values to the preparedStatements\n\t\t\t\t\tpreparedStatement.setString(1, availableStatus);\n\t\t\t\t\tpreparedStatement.setString(2, customerBean.getVinNumber());\n\t\t\t\t\tpreparedStatement.setString(3, customerBean.getCarModelName());\n\t\t\t\t\t// execute query\n\t\t\t\t\tcount = preparedStatement.executeUpdate();\n\t\t\t\t\t// check record inserted or not\n\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Bill Not Generated\");\n\t\t\t\t\t}\n\t\t\t\t} // try\n\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\t} // catch\n\t\t\t\tfinally {\n\t\t\t\t\tresultSet.close();\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Case 4 for go to main Dashboard\n\t\t\t\tMain.carUsersRole();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Exit\n\t\t\t\tSystem.out.println(\"Thanks For Visiting Have a Nice Day !!!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"please insert correct option\");\n\t\t\t}// outer switch end\n\t\t} while (true);\n\t\t// close BufferedReader object\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tLong id = (Long) employeeTable.getValueAt(employeeTable.getSelectedRow(), 6);\n\t\t\t\tbuchungssystem.models.employee.Employee employee = new buchungssystem.models.employee.Employee(id);\n\t\t\t\tString firstName = (String) employeeTable.getValueAt(employeeTable.getSelectedRow(), 0);\n\t\t\t\tif ( !firstName.equals(\"Superadmin\") ) {\n\t\t\t\t\treturnCode = currentUser.SoftDeleteEmployee(employee);\n\t\t\t\t} else {\n\t\t\t\t\tMainFrame.popupWindow(\"Admin kann nicht gelöscht werden\", 400, 100, Color.RED);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (returnCode) {\n\t\t\t\t\tinitTable();\n\t\t\t\t\tgetEmployeeTableModel().fireTableDataChanged();\n\t\t\t\t\tMainFrame.popupWindow(\"Mitarbeiter erfolgreich gelöscht\", 300, 100, Color.RED);\n\t\t\t\t}\n\t\t\t}", "public void workFlow()\n {\n System.out.println(\"Enter the Option:\");\n options();\n int option = scanner.nextInt();\n switch (option) {\n case 1:\n file = new File(path);\n if(file.isDirectory()) {\n ascendingOrder(file);\n\n } else {\n System.out.println(\"Invalid path please select new context to continue\");\n }\n System.out.println(\"\\n\");\n operation();\n break;\n case 2:\n file = new File(path);\n if(file.isDirectory()) {\n createFile(path);\n System.out.println(\"[If you want to view the file added in the folder ,select option 1,else please continue]\");\n }else {\n System.out.println(\"Invalid path please select new context to continue\");\n }\n System.out.println(\"\\n\");\n operation();\n break;\n case 3:\n file = new File(path);\n if(file.isDirectory()) {\n deleteFile(path);\n System.out.println(\"\\n\");\n }else {\n System.out.println(\"Invalid path please select new context to continue\");\n }\n operation();\n break;\n case 4:\n file = new File(path);\n if(file.isDirectory()) {\n searchFile(path);\n System.out.println(\"\\n\");\n }else {\n System.out.println(\"Invalid path please select new context to continue\");\n }\n operation();\n break;\n case 5:\n file = new File(path);\n if(file.isDirectory()) {\n System.out.println(\"The current execution context is closed--------/\");\n System.out.println(\"\\n\");\n }else {\n System.out.println(\"-----------Invalid Input-----------\");\n }\n path=null;\n operation();\n break;\n case 6:\n System.out.println(\"--------------Thank You For Using File System------------\");\n break;\n default:\n System.out.println(\"The Option You Have Entered Does not exist ,Please enter the valid option:\");\n workFlow();\n }\n }", "public void employeeServiceApprove() {\n\t\t\n\t\tEmployee employee = new Employee();\n\t\t employee.approve();\n\t}", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "@Override\n\tpublic BankPrompt run() {\n\t\tBankUser user = bankAuthUtil.getCurrentUser();\n\t\t// if(bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\tList<Transactions> transactions = transactionsDao.findAll(user.getUserId(), user.getRole());\n\n\t\tfor (int i = 0; i < transactions.size(); i++) {\n\t\t\tTransactions thisTransaction = transactions.get(i);\n\t\t\tint userId = thisTransaction.getUserId();\n\t\t\tBankUser thisUser = bankUserDao.findById(userId);\n\t\t\tString fullname = thisUser.getFullname();\n\n\t\t\t// bankUserDao.findById(accounts.get(i).getUserId()).getFullname();\n\n\t\t\t// if (accounts.get(i).getActiveStatus() == 1) {\n\t\t\tSystem.out.println(\"Enter \" + i + \"for: \" + transactions.get(i).getUserId() + \" \" + fullname\n\t\t\t\t\t+ transactions.get(i).getBankAccountId() + \" \" + transactions.get(i).getAction() + \" \"\n\t\t\t\t\t+ transactions.get(i).getAmount());\n\t\t}\n\t\t// }\n\n\t\t// System.out.println(\"Sorry, something went wrong.\");\n\n\t\tif (bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\t\treturn new CustomerMainMenuPrompt();\n\t\t} else {\n\n\t\t\treturn new AdminMainMenuPrompt();\n\n\t\t}\n\n\t}", "public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}", "public static void main(String[] args) throws IOException {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Main Menu\");\r\n\t\tSystem.out.println(\"1. Add an Employee\");\r\n\t\tSystem.out.println(\"2. Display All\");\r\n\t\tSystem.out.println(\"3. Exit\");\r\n\t\tFile f= new File(\"EmployeeDetails.txt\");\r\n\t\tint choice=0;\r\n\t\tdo\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter your choice: \");\r\n\t\t\tchoice=s.nextInt();\r\n\t\t\tswitch(choice)\r\n\t\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Enter Employee ID: \");\r\n\t\t\t\tint emp_id=s.nextInt();\r\n\t\t\t\tSystem.out.println(\"Enter Employee Name: \");\r\n\t\t\t\tString emp_name=s.next();\r\n\t\t\t\tSystem.out.println(\"Enter Employee age: \");\r\n\t\t\t\tint emp_age=s.nextInt();\r\n\t\t\t\tSystem.out.println(\"Enter Employee Salary:\");\r\n\t\t\t\tdouble emp_salary=s.nextDouble();\r\n\t\t\t\tString str=emp_id+\" \"+emp_name+\" \"+emp_age+\" \"+emp_salary;\r\n\t\t\t\tFileWriter fwrite=new FileWriter(f.getAbsoluteFile(),true);\r\n\t\t\t\tfor(int i=0;i<str.length();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfwrite.write(str.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t\tfwrite.close();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tScanner fread= new Scanner(f);\r\n\t\t\t\tSystem.out.println(\"-----Report-----\");\r\n\t\t\t\twhile(fread.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(fread.nextLine());\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"-----End of Report-----\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"Exiting the system\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}while(choice<=3);\r\n\t\t\r\n\r\n\t}", "void checkUserChoice(int userChoice) {\n\t\tif (userChoice == 1) {\n\t\t\tNewBookRecord goToEnterABook = new NewBookRecord();\n\t\t\tgoToEnterABook.enterNewRecordForAbook();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 2) {\n\t\t\tRecordUpdater updateBook = new RecordUpdater();\n\t\t\tupdateBook.searchRecordToUpdate();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 3) {\n\t\t\tRecordRemover deleteAbook = new RecordRemover();\n\t\t\tdeleteAbook.searchRecordToDelete();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 4) {\n\t\t\tRecordLocator bookSearch = new RecordLocator();\n\t\t\tbookSearch.userChoosesSearchPref();\n\t\t}\n\t\telse if(userChoice == 5 ) {\n\t\t\tAccountOfAllRecords seeAllBooks = new AccountOfAllRecords();\n\t\t\tseeAllBooks.seeAllRecords();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t}", "public static void enterCustomer(Employee employee) {\n\t\tCustomer.setCustomerQuantity();\n\t\tString name;\n\t\tdo {\n\t\t\tname= JOptionPane.showInputDialog(\"Please enter a name of the customer.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setName(name)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setName(name));\n\t\t\n\t\tString phone;\n\t\tdo {\n\t\t\tphone = JOptionPane.showInputDialog(\"Please enter a phone number \"\n\t\t\t\t\t+ \"\\nFormat: 0001112222\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPhone(phone)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPhone(phone));\n\t\tString paymentInfo;\n\t\tdo {\n\t\t\tpaymentInfo = JOptionPane.showInputDialog(\"Please enter a payment information (Credit, Debit, or Cash)\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo));\n\t\tString address;\n\t\tdo {\n\t\t\taddress = JOptionPane.showInputDialog(\"Please enter a full address.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setAddress(address)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t}while (!employee.getVehicle().getCustomer().setAddress(address));\n\t\tString insuranceNumber;\n\t\tdo {\n\t\t\tinsuranceNumber = JOptionPane.showInputDialog(\"Please enter an insurance number.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber));\n\t\tJOptionPane.showMessageDialog(null, employee.getVehicle().getCustomer().toString());\n\t}", "protected void evalBranch(){\n List<Token> arguments = this.mainToken.getChilds();\n\n //Primer argumento es un string\n String stringExpression = arguments.get(0).getValue();\n //Removemos la referencia en la lista\n arguments.remove(0);\n\n String response = this.make(stringExpression, arguments);\n\n //Eliminar hojas\n this.setResponse(response);\n }", "public static void main(String[] args) {\n\t\tint ans;\n\t\t\n\t\t//Welcome Message\n\t\tSystem.out.println(\"Welcome to employee wage computation\\n\");\n\t\t\n\t\tEmployee_wage emp = new Employee_wage();\n\t\temp.print_company();\n\t\t\n\t\tdo {\n\t\t\tScanner sc=new Scanner(System.in);\n\t\t\tSystem.out.println(\"\\nEnter 1 to add company details or 2 to compute the wages for the company or 3 to get the total wages of a particular company or 4 to print the company list or 5 to exit the programto print the company list\");\n\t\t\tans=sc.nextInt();\n\t\t\tswitch (ans) {\n\t\t\tcase 1:\n\t\t\t\temp.add_company();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Enter the company name for computing employee wages\");\n\t\t\t\tString name = sc.next();\n\t\t\t\temp.search_company(name);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"Enter the name of the company you want the total wages\");\n\t\t\t\tname = sc.next();\n\t\t\t\temp.fetch_total_wages(name);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"Company details\");\n\t\t\t\temp.print_company();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"Exiting the program\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Not a valid option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(ans!=3);\n\t}", "public static void startMenu() {\n\t\tSystem.out.println(\"|**********************************|\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"| Welcome to the Anny BankingApp! |\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"************************************\");\n\n\t\tSystem.out.println(\"Please select your option:\");\n\t\tSystem.out.println(\"\\t[c]reate a new Account\");\n\t\tSystem.out.println(\"\\t[l]ogin to Your Account!\");\n\t\tSystem.out.println(\"\\t[a]dmin Menu\");\n\t\tSystem.out.println(\"\\t[e]mployee Menu\");\n\t\tSystem.out.println(\"\\t[o]Log Out\");\n\n\t\t//create variable to grab the input\n\t\tString option =scan.nextLine();\n\n\n\t\t//this switch case will based on chioce the users made////can be lowercase or uppercase letter\n\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"c\":\n\t\t\tcreateNewAccount();\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\t\tloginToAccount();\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"a\":\n\t\t\tadminMenu();\n\t\t\tbreak;\n\t\tcase \"e\":\n\t\t\temployeeMenu();\n\t\t\tbreak;\n\t\tcase \"o\":\n\t\t\tSystem.out.println(\"You Successfully logged out, back to main menu!!!\");\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again\");\n\t\t\tstartMenu();//Return to startmenu if choice not match\n\t\t\tbreak;\n\t\t}\n\n\t}", "public void getBranchCommand() {\n\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t// create an BasePlusCommEmployee object and assign it to employee\n\t\tBasePlusCommEmployee employee = new BasePlusCommEmployee();\n\n\t\t// prompt user\n\t\tSystem.out.println(\"Please enter the employee ID:\");\n\t\tint employeeId = Integer.parseInt(input.nextLine()); // read a line of text\n\t\temployee.setEmployeeID(employeeId);\n\n\t\tSystem.out.println(\"Please enter the name:\");\n\t\tString employeeName = input.nextLine(); // read a line of text\n\t\temployee.setName(employeeName);\n\n\t\tSystem.out.println(\"Please enter the base salary:\");\n\t\tint employeeSalary = Integer.parseInt(input.nextLine()); // read a line of text\n\t\temployee.setBaseSalary(employeeSalary);\n\n\t\tSystem.out.println(\"Please enter the commission rate:\");\n\t\tdouble employeeCmRate = Double.parseDouble(input.nextLine()); // read a line of text\n\t\temployee.setCommissionRate(employeeCmRate);\n\n\t\tSystem.out.println(\"Please enter the total sales:\");\n\t\tdouble employeeSale = Double.parseDouble(input.nextLine()); // read a line of text\n\t\temployee.setTotalSales(employeeSale);\n\n\t\tSystem.out.println(); // outputs a blank line\n\n\t\t//display\n\t\temployee.getEmployeeInfo();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tinitializeLists();\n\n\t\tSystem.out.println(\n\t\t\t\t\"Welcome to Jaron's banking application. Type in the number of the choice you would like or type \\\"back\\\" to return to the user selection or \\\"quit\\\" to end the application.\");\n\t\t\n\t\twhile (running) {\n\t\t\twhile (currentUser == null) {\n\t\t\t\tUserType type = getUserType();\n\n\t\t\t\tif (type == null)\n\t\t\t\t\tbreak;\n\n\t\t\t\tif (type.equals(UserType.Customer)) {\n\t\t\t\t\tSystem.out.println(\"1. New customer\");\n\t\t\t\t\tSystem.out.println(\"2. Existing customer\");\n\t\t\t\t\tString choice = input.nextLine();\n\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\tcase \"quit\":\n\t\t\t\t\t\trunning = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"back\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\tcurrentUser = newCustomer();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\tlogin(customerList);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"Please enter 1 if you are a new customer or 2 if you are an existing customer.\");\n\t\t\t\t\t}\n\t\t\t\t} else if (type.equals(UserType.Employee) || type.equals(UserType.Admin)) {\n\t\t\t\t\tSystem.out.println(\"1. New employee\");\n\t\t\t\t\tSystem.out.println(\"2. New admin\");\n\t\t\t\t\tSystem.out.println(\"3. Existing employee/admin\");\n\t\t\t\t\tString choice = input.nextLine();\n\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\tcase \"quit\":\n\t\t\t\t\t\trunning = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"back\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\tnewEmployee(UserType.Employee);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\tnewEmployee(UserType.Admin);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\t\tlogin(employeeList);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"Please enter 1 if you are a new employee, 2 if you are a new admin, or 3 if you are an existing employee/admin.\");\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"You may also type \\\"back\\\" to go back to the user selection or \\\"quit\\\" to end the application.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (running) {\n\t\t\t\tcurrentUser.showOptions();\n\t\t\t\tSystem.out.println(\"You may log into a different account now or type \\\"quit\\\" to end the application.\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Thank you for using Jaron's banking application.\");\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"Drivers\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver(); //Launch browser\r\n\t\tdriver.get(\"https://www.hdfcbank.com/branch-atm-locator\"); //Load webpage\r\n\t\tdriver.manage().window().maximize(); //maximize browser window\r\n\t\t\t\t\t\r\n\r\n\t\t//Select dropdown option using visible text.\r\n\t\tnew Select(driver.findElement(By.id(\"customState\")))\r\n\t\t.selectByVisibleText(\"Telangana\");\r\n\t\t\r\n\t\tThread.sleep(4000); //Static timeout to load cities\r\n\t\t\r\n\t\t//Select dropdown option using value property\r\n\t\tnew Select(driver.findElement(By.id(\"customCity\")))\r\n\t\t.selectByValue(\"hyderabad\");\r\n\t\t\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"customLocality\")).clear();\r\n\t\tdriver.findElement(By.id(\"customLocality\")).sendKeys(\"Gandhi nagar\");\r\n\t\tThread.sleep(4000); //Static timeout\r\n\t\t\r\n\t\t\r\n\t\t//Select dropdown option using index number\r\n\t\tnew Select(driver.findElement(By.id(\"customRadius\")))\r\n\t\t.selectByIndex(4); //Index number should declare in integer format\r\n\t\t\r\n\r\n\t\t//Select checkbox\r\n\t\tdriver.findElement(By.id(\"amenity_category_order_types50\")).click();\r\n\t\t\r\n\t\t//Click button\r\n\t\tdriver.findElement(By.xpath(\"//input[@value='SEARCH']\")).click();\r\n\t}", "public static void EmployeeJob() {\r\n\t\t\r\n\t\tJLabel e4 = new JLabel(\"Employee's Job:\");\r\n\t\te4.setFont(f);\r\n\t\tGUI1Panel.add(e4);\r\n\t\tGUI1Panel.add(employeeJobType);\r\n\t\te4.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e){\n int starNum = Integer.valueOf(JOptionPane.showInputDialog(\"Starting Balance?\"));\n \n String nam = JOptionPane.showInputDialog(\"Account Name?\");\n \n String type = JOptionPane.showInputDialog(\"Type Of Account?\");\n \n Account newAcc = null;\n \n if(type.equals(\"Checking\")) {\n \n newAcc = new CheckingAccount(nam, starNum);\n \n } else {\n \n newAcc = new SavingsAccount(nam, starNum);\n \n }\n \n bankSystem.addAcc(newAcc);\n \n current = newAcc;\n \n }", "@Override\n\t@BreadCrumb(\"%{model.titolo}\")\n\tpublic String execute() throws Exception {\n \t\n \t//eseguo la ricerca:\n \texecuteRicercaAccertamentoPerOrdinativo();\n\n\t\t//carica le labels:\n\t\tcaricaLabelsInserisci(2, model.getGestioneOrdinativoStep1Model().getOrdinativo().getUid() == 0);\n\t\t\n\t\t//controllo filo arianna:\n\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo()!=null){\n\t\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo().getAnno()==null){\n\t\t\t\t// significa che sono andato in inserimento -> consulta -> click su filo di arianna quote\n\t\t\t\treturn \"erroreFiloArianna\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//setto il tipo di oggeto trattato:\n\t\tteSupport.setOggettoAbilitaTE(OggettoDaPopolareEnum.ORDINATIVO_INCASSO.toString());\n\t\t\n\t\t//abilita o meno il bottone salva:\n\t\tattivaBottoneSalva();\n\t\t\n\t\t// effettua la somma delle righe delle quote\n\t\tif(model.isSonoInAggiornamentoIncasso()){\n\t\t\tsommatoriaQuoteSubOrdIncassoPerAggiorna();\n\t\t}else{\n\t\t\tsommatoriaQuoteSubOrdIncasso();\n\t\t}\n\t\t\n\t\tif (caricaListeBil(WebAppConstants.CAP_EG)) {\n\t\t\treturn INPUT;\n\t\t}\n\t\n\t\t//Constanti.ORDINATIVO_TIPO_PAGAMENTO\n\t\t// Jira - 1357 in caso di errore di caricamento dei dati\n\t\t// dei classificatori non viene segnalato alcun errore\n\t\t// ma carica la pagina, al massimo non verranno visualizzate le combo relative\n\t\t\n\t\tcaricaListeFin(TIPO_ACCERTAMENTO_A );\n\t\t\n\t\t//ricontrolliamo il siope che sia coerente:\n\t\tcodiceSiopeChangedInternal(teSupport.getSiopeSpesaCod());\n\t\t//\n\t\t\t\n\t\t// imposto la descrizione della quota ocn quella dell'accertamento \n\t\tString descrizioneQuota = \"\";\n\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()!=null && !model.getGestioneOrdinativoStep2Model().getListaAccertamento().isEmpty() &&\n\t\t\t\tmodel.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==1){\n\t\t\tdescrizioneQuota = model.getGestioneOrdinativoStep2Model().getListaAccertamento().get(0).getDescrizione();\n\t\t\tmodel.getGestioneOrdinativoStep2Model().setDescrizioneQuota(descrizioneQuota);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}", "@Transactional\n\t@Override\n\tpublic void createBranch(Branch branch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"create_branch\");\n\t\tMap<String, Object> culoMap = new HashMap<String, Object>();\n\t\tculoMap.put(\"Pname_branch\", branch.getNameBranch());\n\t\tculoMap.put(\"Paddress_branch\", branch.getAddressBranch());\n\t\tculoMap.put(\"Pphone_branch\", branch.getPhoneBranch());\n\t\t\n\t\t\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValues(culoMap);\n\t\tcall.execute(src);\n\t}", "@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString colorString = flowerColorHorizontalSelector.getSelected();\n\t\t\t\tString leafShapeString = leafShapeHorizontalSelector.getSelected();\n\t\t\t\tString leafMarginString = leafMarginHorizontalSelector.getSelected();\n\t\t\t\tString leafArrangementString = leafArrangementHorizontalSelector.getSelected();\n\t\t\t\t//Uncomfortable putting this here ////messy\n\t\t\t\tif (colorString!=null | leafShapeString!=null | leafMarginString!=null | leafArrangementString!=null){\n\t\t\t\t\tCursor cursor = ((MainActivity) getActivity()).getLeaves(colorString, leafShapeString,leafMarginString,leafArrangementString);\n\t\t\t mListener.fragmentToActivity(2, cursor);\n\t\t\t\t}else{\n\t\t\t\t\tshowText(\"Please select at least one option from one category.\");\n\t\t\t\t}\n\t\t\t}", "@When(\"The User clicks on Edit button and modifies data in the Edit popup and Clicks on Submit Button\")\n\tpublic void bbb() throws InterruptedException, FileNotFoundException, IOException {\n homePage.UIeditRecord();\n // homePage.UIaddsbmitpage();\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString firstName = (String) employeeTable.getValueAt(employeeTable.getSelectedRow(), 0);\n\t\t\t\tLong employeeID = (Long) employeeTable.getValueAt(employeeTable.getSelectedRow(), 6);\n\t\t\t\tif ( !firstName.equals(\"Superadmin\") ) {\n\t\t\t\t\temployeeUpdateDialog.setEmployeeID(employeeID);\n\t\t\t\t\temployeeUpdateDialog.setVisible(true);\n\t\t\t\t} else {\n\t\t\t\t\tMainFrame.popupWindow(\"Superadmin darf nicht geändert werden\", 400, 100, Color.RED);\n\t\t\t\t}\n\t\t\t}", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "public static void main(String[] args) {\n Manager hr = new Manager();\r\n\r\n //Manager hires employee \r\n hr.hireEmployee();\r\n \r\n //Manager instructs employee to go through orientation procedures\r\n hr.orientEmployee();\r\n \r\n //Manager verifies that orientation is 100% done\r\n hr.checkNewHireStatus();\r\n }", "public void prepareBusinessentity(ActionEvent event) {\n if (this.getSelected() != null && businessentityController.getSelected() == null) {\n businessentityController.setSelected(this.getSelected().getBusinessentity());\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tMap<String, String > empRecord = new HashMap<>();\n\t\t\n\t\tempRecord.put(\"CEO\", null);\n\t\tempRecord.put(\"DU Head\", \"CEO\");\n\t\tempRecord.put(\"Project Manager\", \"DU Head\");\n\t\tempRecord.put(\"Team Lead\", \"Project Manager\");\n\t\tempRecord.put(\"SSE\", \"Team Lead\");\n\t\tempRecord.put(\"SE\", \"SSE\");\n\t\tempRecord.put(\"ASE\" , \"SE\");\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the name of employee\");\n\t\tString emp = sc.nextLine();\n\t\tSystem.out.println(emp);\n\t\t\n\t\tdisplayManagerEmployee(empRecord, emp);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCheckBoxTreeNode node=(CheckBoxTreeNode) path.getLastPathComponent();\n\t\t\t\tString nodeName=(String) node.getUserObject();\n\t\t\t\ttry {\n\t\t\t\t\tRuntime.getRuntime().exec(\"explorer.exe \"+nodeName);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void logInAsManager(Connection connection) throws SQLException {\n\n while (true) {\n System.out.println(\"\\n1. Company list \\n2. Create a company \\n0. Back\");\n int choice = Integer.parseInt(scanner.nextLine());\n\n if (choice == 0) {\n break;\n\n } else if (choice == 1) {\n // List all the companies\n listAllCompanies(connection, \"manager\");\n\n } else if (choice == 2) {\n // Add new company\n createACompany(connection);\n }\n }\n\n }", "public final void go() {\n this.getView().showCountries(this.getModel().getCountries());\n CountryFindChoice choice;\n do {\n choice = this.getView().askUserFindChoice();\n } while (choice == CountryFindChoice.error);\n String codeOrName = this.getView().askCodeOrName(choice);\n Country country = null;\n switch (choice) {\n case byCode:\n country = this.getModel().getCountryByCode(codeOrName);\n break;\n case byName:\n country = this.getModel().getCountryByName(codeOrName);\n break;\n }\n if(country != null) {\n this.getView().printMessage(country.getHelloWorld().getMessage());\n }\n this.getModel().close();\n }", "private NodeLeaf processComp(GUIMain guiMn, CompartmentSBML comp, DefaultMutableTreeNode tissueBranch) {\n NodeLeaf leaf;\n if (comp == null) {\n // FIXME System.out.println(\"error null compartment\");\n }\n Tissue tiss = new Tissue();\n leaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n leaf.setName(comp.getName()); // NAME, NOT IDENTITY\n leaf.setCompartment(comp);\n // create compartment's node on wholebody tree\n DefaultMutableTreeNode compBranch = guiMn.simMain.st.addObject(\n guiMn, tissueBranch, leaf, true);\n// System.out.println(\"add leaf (processComp): \" + leaf.getName() + \" to tissue \" + tissueBranch);\n return leaf;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// Give all details of first employee\n\t\tSystem.out.println(\"Give the information about first employee\");\n\t\tSystem.out.println(\"Name of first employee\");\n\n\t\t// Take name of first employee from user\n\t\tString name1 = sc.next();\n\n\t\tSystem.out.println(\"Department id of first employee\");\n\n\t\t// Take department id of first employee from user\n\t\tString id1 = sc.next();\n\n\t\tSystem.out.println(\"Salary of first employee\");\n\n\t\t// Take salary of first employee from user\n\t\tint salary1 = sc.nextInt();\n\n\t\t// Provide details of first employee\n\t\tEmployeeQ7 e1 = new EmployeeQ7(name1, id1, salary1);\n\n\t\t// Give all details of second employee\n\t\tSystem.out.println(\"Give the information about second employee\");\n\t\tSystem.out.println(\"Name of second employee\");\n\n\t\t// Take name of second employee from user\n\t\tString name2 = sc.next();\n\n\t\tSystem.out.println(\"Department id of second employee\");\n\n\t\t// Take department id of second employee from user\n\t\tString id2 = sc.next();\n\n\t\tSystem.out.println(\"salary of second employee\");\n\n\t\t// Take salary of second employee from user\n\t\tint salary2 = sc.nextInt();\n\n\t\t// Provide details of second employee\n\t\tEmployeeQ7 e2 = new EmployeeQ7(name2, id2, salary2);\n\n\t\t// Call compareEmployeeSalary method and provide details of both\n\t\t// employee\n\t\tcompareEmployeeSalary(e1, e2);\n\n\t}", "@Override\n\tpublic void submitJobEmployee(int je_id, String caller) {\n\n\t}", "public static void architect() {\n NewProject.architect_name = getInput(\"Please enter the NEW name of the architect: \");\r\n\r\n NewProject.architect_tel = getInput(\"Please enter the NEW telephone number of the architect: \");\r\n\r\n NewProject.architect_email = getInput(\"Please enter the NEW email of the architect: \");\r\n\r\n NewProject.architect_address = getInput(\"Please enter the NEW address of the architect: \");\r\n\r\n UpdateData.updateArchitect();\r\n updateMenu();\t//Return back to previous menu.\r\n }", "public static void main(String[] args) throws Exception { \n\t\t\n/*------------------------------------------------------------------------------------------------*/\n\t//managname,h_id,dept_count\n\t\n\t //obj.joinempdept() ; }}\n\t\t//System.out.println(obj.toString());; \n\t\t\n/*------------------------------------------------------------------------------------------------*/\n\t\t\n\t\t\n//emptab k= new emptab(eId,departmentId,employeeName,gender,birthDate,joiningDate, panCard,adharNum,drivingLicense_num,employeeMobnum);\n\t\t//obj.jdate();\n\t\t\n\t\t//System.out.println(k);\n\t\t//obj.deptcount(); }}\n\t//Scanner sc = new Scanner(System.in);\n\t//System.out.println(\"Enter the Dept id\");\n\t//int deptid=sc.nextInt();\n\t//obj.empdept(gender, e_id)\n\t//obj.empdet(deptid);\n\t//EmployeeDetail e = new EmployeeDetail();\n\t\t//e.seteId1(-1);\n\t\t//e.setEId(-1);\n\t\t\n\t\t//obj.Allemp();\n\t\t//System.out.println(obj.toString());\n\t\n\n Scanner scan = new Scanner(System.in);\n Scanner scan2 = new Scanner(System.in);\n \n SelectQuery sq = new SelectQuery();\n InsertQuery iq = new InsertQuery();\n UpdateQuery uq = new UpdateQuery();\n DeleteQuery dq = new DeleteQuery(); \n empdetailsDAOImpl obj1 = new empdetailsDAOImpl();\n //deptcount Dc= new deptcount(obj1);\n \n \n \n Connection connection = dbconnection.getConnection();\n \n String con = \"y\";\n\n while(con.equalsIgnoreCase(\"y\"))\n {\n System.out.println(\"Enter Choice:\\n1.ViewData\\n2.Insert Data\\n3.Update Data\\n4.Delete Data\\n5.Department Members\\n6.DeptEmpName\");\n int choice = scan.nextInt();\n \n switch(String.valueOf(choice))\n {\n \n case \"1\":{sq.sel();} break;\n case \"2\":{iq.insert();} break; \n case \"3\":{uq.upd();} break;\n case \"4\":{dq.delete();} break;\n case \"5\":{obj1.deptcount(); } break;\n case \"6\":{\n \t Scanner ec = new Scanner(System.in);\n \t\tSystem.out.println(\" Enter employeeID ->\");\n \t\tint dId= ec.nextInt();\n \t \n \t obj1.empdet(dId);} break;\n default :{System.out.println(\"Wrong Choice\");} break; \n \n }\n System.out.println(\"\\n\\nContinue? (Y/N): \");\n con = scan2.nextLine();\n }\n }", "public void registerNewEmployee(Administrator user, List<Employee> employees, UserType userType){\n boolean flag;\n String dni;\n do{\n System.out.print(\"\\t Ingrese el dni: \");\n dni = new Scanner(System.in).nextLine();\n flag = user.verifyEmployeeDni(dni,employees);\n if(flag){\n System.out.println(\"El DNI ingresado ya pertenece a un empleado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el nombre: \");\n String name = new Scanner(System.in).nextLine();\n System.out.print(\"\\t Ingrese el apellido: \");\n String surname = new Scanner(System.in).nextLine();\n int age = this.enterNumber(\"la edad\");\n String username;\n do{\n System.out.print(\"\\t Ingrese el username: \");\n username = new Scanner(System.in).nextLine();\n flag = user.verifySystemUsername(username,employees);\n if(flag){\n System.out.println(\"Ese usuario ya esta registrado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el password: \");\n String password = new Scanner(System.in).nextLine();\n\n Employee employee = user.createEmployee(userType,name,surname,dni,age,username,password);\n employees.add(employee);\n }", "public boolean addBranch()\n\t{\n\t\tList<Branch> branches = this.company.getBranches();\n\t\tList<Stock> stocks = this.company.getStocks();\n\t\tint branchNumber = branches.length();\n\t\tint uniqueId = this.company.getBranchCounter();\n\n\t\tbranches.insert(new Branch(uniqueId, uniqueId));\n\n\t\tType t[] = Type.values();\n\t\tColor c[] = Color.values();\n\t\tList<Furniture> furniture = new List<Furniture>();\n\n\t\tint counter = 0;\n\n\t\t// insert chairs\n\t\tfor(int i=0; i<7; i++)\n\t\t{\n\t\t\tfor(int j=0; j<5; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[0], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert desks\n\t\tfor(int i=0; i<5; i++)\n\t\t{\n\t\t\tfor(int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[1], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert tables\n\t\tfor(int i=0; i<10; i++)\n\t\t{\n\t\t\tfor(int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[2], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert bookcases\n\t\tfor(int i=0; i<12; i++)\n\t\t{\n\t\t\tfurniture.insert(new Furniture(counter++, i, t[3], Color.NONE, branches.get(branchNumber), 5));\n\t\t}\n\n\t\t// insert cabinets\n\t\tfor(int i=0; i<12; i++)\n\t\t{\n\t\t\tfurniture.insert(new Furniture(counter++, i, t[4], Color.NONE, branches.get(branchNumber), 5));\n\t\t}\n\n\n\t\tstocks.insert(new Stock(uniqueId, furniture));\n\n\t\treturn true;\n\t}", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public static void branch(String arg){\n commitPointers.branches = commitPointers.readBranches();\n if (commitPointers.branches.containsKey(arg)){\n exitWithError(\"A branch with that name already exists.\");\n }\n\n String headID = commitPointers.readHeadCommit()[1];\n commitPointers.branches.put(arg, headID);\n commitPointers.saveBranches();\n }", "private void createOrderMenu()\n {\n String phoneEmployee = null;\n String phoneCustomer = null;\n HashMap<String, Integer> barcodes = new HashMap<>();\n boolean quit = false;\n\n while(!quit) {\n printCreateOrderMenu();\n int input = getInput();\n switch(input) {\n case 0: \n quit = true;\n break;\n case 1: \n phoneEmployee = addPerson();\n break;\n case 2: \n phoneCustomer = addPerson();\n break;\n case 3: \n addProduct(barcodes);\n break;\n case 4: \n quit = createOrder(phoneEmployee, phoneCustomer, barcodes);\n break;\n default: \n System.out.println(\"Vælg et tal fra menuen.\");\n System.out.println(\"\");\n break;\n }\n }\n\n }", "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 Bank(BankAccount b1, BankAccount b2, BankAccount b3, Employee e1, Employee e2, Employee e3, Employee e4, Employee e5)\n {\n isOpen = true;\n account1 = b1;\n account2 = b2;\n account3 = b3;\n president = e1;\n vicePresident = e2;\n teller1 = e3;\n teller2 = e4;\n teller3 = e5;\n }", "private static void executeMenuItem(int choice) { // From Assignment2 Starter Code by Dave Houtman\r\n\t\tswitch (choice) {\r\n\t\t\tcase ADD_NEW_REGISTRANT:\t\tviewAddNewRegistrant();\t\tbreak;\r\n\t\t\tcase FIND_REGISTRANT:\t\t\tviewFindRegistrant();\t\tbreak;\r\n\t\t\tcase LIST_REGISTRANTS:\t\t\tviewListOfRegistrants();\tbreak;\r\n\t\t\tcase DELETE_REGISTRANT:\t\t\tviewDeleteRegistrant();\t\tbreak;\r\n\t\t\tcase ADD_NEW_PROPERTY:\t\t\tviewAddNewProperty();\t\tbreak;\r\n\t\t\tcase DELETE_PROPERTY:\t\t\tviewDeleteProperty();\t\tbreak;\r\n\t\t\tcase CHANGE_PROPERTY_REGISTRANT:viewChangePropertyRegistrant();\tbreak;\r\n\t\t\tcase LIST_PROPERTY_BY_REGNUM:\tviewListPropertyByRegNum();\tbreak;\r\n\t\t\tcase LIST_ALL_PROPERTIES:\t\tviewListAllProperties();\tbreak;\r\n\t\t\tcase LOAD_LAND_REGISTRY_FROM_BACKUP:\r\n\t\t\t// Check if the user wants to overwrite the existing data\r\n\t\t\t\tSystem.out.print(\"You are about to overwrite existing records;\"\r\n\t\t\t\t\t\t\t\t+ \"do you wish to continue? (Enter ‘Y’ to proceed.) \");\r\n\t\t\t\tString input = getResponseTo(\"\");\r\n\t\t\t\tif (input.equals(\"Y\") || input.equals(\"y\")) {\r\n\t\t\t\tviewLoadLandRegistryFromBackUp();\r\n\t\t\t\tSystem.out.println(\"Land Registry has been loaded from backup file\");\r\n\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase SAVE_LAND_REGISTRY_TO_BACKUP:\t\r\n\t\t\t\tviewSaveLandRegistryToBackUp();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EXIT:\r\n\t\t\t\t// backup the land registry to file before closing the program\r\n\t\t\t\tSystem.out.println(\"Exiting Land Registry\\n\");\r\n\t\t\t\tgetRegControl().saveToFile(getRegControl().listOfRegistrants(), REGISTRANTS_FILE);\r\n\t\t\t\tgetRegControl().saveToFile(getRegControl().listOfAllProperties(), PROPERTIES_FILE);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Invalid choice: try again. (Select \" + EXIT + \" to exit.)\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(); // add blank line after each output\r\n\t}", "public void exibeMenu() {\n System.out.println(\"Digite o valor referente a operação desejada\");\r\n System.out.println(\"1. Busca Simples\");\r\n System.out.println(\"2. Busca Combinada\");\r\n System.out.println(\"3. Adicionar Personagem Manualmente\");\r\n System.out.println(\"4. Excluir Personagem\");\r\n System.out.println(\"5. Exibir Personagens\");\r\n int opcao = teclado.nextInt();\r\n if(opcao >= 7){\r\n do\r\n {\r\n System.out.println(\"Digite um numero valido\");\r\n opcao = teclado.nextInt();\r\n }while (opcao>=6);\r\n }\r\n ctrlPrincipal.opcaoMenu(opcao);\r\n }" ]
[ "0.6472937", "0.6241158", "0.6220441", "0.6179615", "0.60008556", "0.5971778", "0.590018", "0.5732735", "0.570891", "0.569796", "0.56481797", "0.56345654", "0.56184024", "0.56156087", "0.5598403", "0.55905235", "0.5579544", "0.5573222", "0.55728954", "0.55627304", "0.55316305", "0.5527104", "0.5524618", "0.5477821", "0.54590225", "0.5452975", "0.54448193", "0.5424157", "0.5418329", "0.5413605", "0.5413346", "0.5412479", "0.54108626", "0.5408303", "0.54012686", "0.5395831", "0.53656906", "0.5354991", "0.535337", "0.53259075", "0.53212196", "0.52873796", "0.5277554", "0.52769715", "0.5272709", "0.5263211", "0.526184", "0.5250635", "0.5249553", "0.52453816", "0.5245134", "0.5236782", "0.5233674", "0.5228928", "0.5226865", "0.5225544", "0.5216806", "0.5214174", "0.5202344", "0.5201011", "0.51900536", "0.5177552", "0.5176368", "0.5171699", "0.5165582", "0.51650757", "0.51630175", "0.5154996", "0.5148606", "0.5134517", "0.51326096", "0.51076925", "0.5101956", "0.5100157", "0.5089263", "0.5089035", "0.5088915", "0.5087616", "0.5049739", "0.50465876", "0.5037936", "0.5033593", "0.5032034", "0.5030049", "0.5029441", "0.50288343", "0.502173", "0.5020862", "0.5018811", "0.5016611", "0.5016041", "0.5014848", "0.5014722", "0.50077665", "0.5001982", "0.49973586", "0.49962005", "0.49915004", "0.49904186", "0.49881807" ]
0.6926588
0
This method adds a new Shipment to the System. It uses data class to add new Shipment.
public void enterShipment(){ Shipment shipment = new Shipment(); shipment.setShipmentID(data.numberOfShipment()); shipment.setReceiver(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser("Enter Receiver FirstName: "), GetChoiceFromUser.getStringFromUser("Enter Receiver Last Name: "),data.getBranchEmployee(ID).getBranchID())); shipment.setSender(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser("Enter Sender First Name: "), GetChoiceFromUser.getStringFromUser("Enter Sender Last Name: "),data.getBranchEmployee(ID).getBranchID())); shipment.setCurrentStatus(getStatus()); shipment.setTrackingNumber(getUniqueTrackingNumber()); shipment.setBranchID(data.getBranchEmployee(ID).getBranchID()); data.getBranch(shipment.getBranchID()).addShipment(shipment); data.addShipment(shipment,shipment.getReceiver()); System.out.printf("Your Shipment has added with tracking Number %d !\n",shipment.getTrackingNumber()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Shipment createShipment();", "void saveShipment(Shipment shipment);", "public void insertShipment(String custType, int xCoord, int yCoord, int capacity,int shipmentIndex)\r\n\t{\r\n\t\tVRPBShipment thisShip = new VRPBShipment(custType, xCoord, yCoord, capacity,shipmentIndex); //creates shipment\r\n\t\t//System.out.println(custType);\r\n\t\tinsertLast(thisShip); //and adds it to the linked list\r\n\t}", "ShipmentItem createShipmentItem();", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "public CreateShipmentResponse createShipment(CreateShipmentRequest request)\n throws MWSMerchantFulfillmentServiceException {\n return newResponse(CreateShipmentResponse.class);\n }", "@POST(\"/AddShip\")\n\tint addShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "public New_shipment() {\n initComponents();\n init();\n \n }", "@Override\n\tpublic void insert(CvcShippingEntity cvcShipping) {\n\t\tcvcShippingDao.insert(cvcShipping);\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}", "protected abstract void addBonusToShip(Ship ship);", "public void addShip(Ship ship) {\n\t\tint row = ship.getRow();\n\t\tint column = ship.getColumn();\n\t\tint direction = ship.getDirection();\n\t\tint shipLength = ship.getLength();\n\t\t//0 == Horizontal; 1 == Vertical\n\t\tif (direction == 0) {\n\t\t\tfor (int i = column; i < shipLength + column; i++) {\n\t\t\t\tthis.grid[row][i].setShip(true);\n\t\t\t\tthis.grid[row][i].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[row][i].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t\telse if (direction == 1) {\n\t\t\tfor (int i = row; i < shipLength + row; i++) {\n\t\t\t\tthis.grid[i][column].setShip(true);\n\t\t\t\tthis.grid[i][column].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[i][column].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void save(Shipper shipper) {\n\t\tshipperDao.save(shipper);\r\n\t}", "public void addShip(Ship ship){\n\n ship.setGamePlayers(this);\n myships.add(ship);\n }", "@Override\r\n\tpublic String allocateShipment(String referenceNumbers, String shipmentNumber) {\n\t\tsenderDataRepository.updateAirwayBill(referenceNumbers.split(\",\"), shipmentNumber,D2ZCommonUtil.getAETCurrentTimestamp());\r\n\t\tsenderDataRepository.allocateShipment(referenceNumbers, shipmentNumber);\r\n\t\treturn \"Shipment Allocated Successfully\";\r\n\t}", "public Future<CreateShipmentResponse> createShipmentAsync(CreateShipmentRequest request) {\n return newFuture(createShipment(request));\n }", "ShipmentAttribute createShipmentAttribute();", "public Ship(String name) {\r\n this.name = name;\r\n }", "ShipmentPackage createShipmentPackage();", "int insert(Shipping record);", "ShipmentType createShipmentType();", "public interface Shipment_Factory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tShipment_Factory eINSTANCE = org.abchip.mimo.biz.model.shipment.shipment.impl.Shipment_FactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Carrier Shipment Box Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Carrier Shipment Box Type</em>'.\n\t * @generated\n\t */\n\tCarrierShipmentBoxType createCarrierShipmentBoxType();\n\n\t/**\n\t * Returns a new object of class '<em>Carrier Shipment Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Carrier Shipment Method</em>'.\n\t * @generated\n\t */\n\tCarrierShipmentMethod createCarrierShipmentMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Delivery</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Delivery</em>'.\n\t * @generated\n\t */\n\tDelivery createDelivery();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment</em>'.\n\t * @generated\n\t */\n\tShipment createShipment();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Attribute</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Attribute</em>'.\n\t * @generated\n\t */\n\tShipmentAttribute createShipmentAttribute();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Box Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Box Type</em>'.\n\t * @generated\n\t */\n\tShipmentBoxType createShipmentBoxType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Contact Mech</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Contact Mech</em>'.\n\t * @generated\n\t */\n\tShipmentContactMech createShipmentContactMech();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Contact Mech Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Contact Mech Type</em>'.\n\t * @generated\n\t */\n\tShipmentContactMechType createShipmentContactMechType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Cost Estimate</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Cost Estimate</em>'.\n\t * @generated\n\t */\n\tShipmentCostEstimate createShipmentCostEstimate();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Config</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Config</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayConfig createShipmentGatewayConfig();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Config Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Config Type</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayConfigType createShipmentGatewayConfigType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Dhl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Dhl</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayDhl createShipmentGatewayDhl();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Fedex</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Fedex</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayFedex createShipmentGatewayFedex();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Ups</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Ups</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayUps createShipmentGatewayUps();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Usps</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Usps</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayUsps createShipmentGatewayUsps();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item</em>'.\n\t * @generated\n\t */\n\tShipmentItem createShipmentItem();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item Billing</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item Billing</em>'.\n\t * @generated\n\t */\n\tShipmentItemBilling createShipmentItemBilling();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item Feature</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item Feature</em>'.\n\t * @generated\n\t */\n\tShipmentItemFeature createShipmentItemFeature();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Method Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Method Type</em>'.\n\t * @generated\n\t */\n\tShipmentMethodType createShipmentMethodType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package</em>'.\n\t * @generated\n\t */\n\tShipmentPackage createShipmentPackage();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package Content</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package Content</em>'.\n\t * @generated\n\t */\n\tShipmentPackageContent createShipmentPackageContent();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package Route Seg</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package Route Seg</em>'.\n\t * @generated\n\t */\n\tShipmentPackageRouteSeg createShipmentPackageRouteSeg();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Route Segment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Route Segment</em>'.\n\t * @generated\n\t */\n\tShipmentRouteSegment createShipmentRouteSegment();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Status</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Status</em>'.\n\t * @generated\n\t */\n\tShipmentStatus createShipmentStatus();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Time Estimate</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Time Estimate</em>'.\n\t * @generated\n\t */\n\tShipmentTimeEstimate createShipmentTimeEstimate();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Type</em>'.\n\t * @generated\n\t */\n\tShipmentType createShipmentType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Type Attr</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Type Attr</em>'.\n\t * @generated\n\t */\n\tShipmentTypeAttr createShipmentTypeAttr();\n\n\t/**\n\t * Returns a new object of class '<em>Shipping Document</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipping Document</em>'.\n\t * @generated\n\t */\n\tShippingDocument createShippingDocument();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tShipment_Package getShipment_Package();\n\n}", "ShipmentCostEstimate createShipmentCostEstimate();", "public boolean addShip(Ships ship) {\n\t\tfor (int i = 0; i < this.aliveShips.length; i++) {\r\n\t\t\tif (this.aliveShips[i] == null) {\r\n\t\t\t\tthis.aliveShips[i] = ship;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "ShipmentItemFeature createShipmentItemFeature();", "ShipmentItemBilling createShipmentItemBilling();", "public Ship newShip(GameScreen screen){\n\t\tthis.ship = new Ship(screen);\n\t\treturn ship;\n\t}", "public StagedOrderSetShippingMethodActionBuilder shippingMethod(\n @Nullable final com.commercetools.api.models.shipping_method.ShippingMethodResourceIdentifier shippingMethod) {\n this.shippingMethod = shippingMethod;\n return this;\n }", "public boolean placeShipUser(Ship ship) {\r\n return fieldUser.addShip(ship);\r\n }", "public void setShipping(String newShipping){\n post.setType(newShipping);\n }", "public Spaceship(String shipName) {\n\t\tshieldLevel = 1;\n\t\tcurrentMoney = new Money(100);\n\t\tinventoryList = new ArrayList<Item>();\n\t\tpartsCollected = new ArrayList<Part>();\n\t\tthis.shipName = shipName;\n\t}", "@POST(\"/UpdateShip\")\n\tShip updateShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "public void addPassengerShip(Scanner sc){\n PassengerShip pShip = new PassengerShip(sc, portMap, shipMap, dockMap);\n if(hashMap.containsKey(pShip.getParent())){\n if(hashMap.get(pShip.getParent()).getIndex()>=10000 && hashMap.get(pShip.getParent()).getIndex() < 20000){\n currentPort = (SeaPort) hashMap.get(pShip.getParent());\n currentPort.setShips(pShip);\n currentPort.setAllShips(pShip);\n \n }\n else{\n currentDock = (Dock) hashMap.get(pShip.getParent());\n currentDock.addShip(pShip);\n currentPort = (SeaPort) hashMap.get(currentDock.getParent());\n currentPort.setAllShips(pShip);\n }\n \n \n }\n hashMap.put(pShip.getIndex(), pShip);\n shipMap.put(pShip.getIndex(), pShip);\n everything.add(pShip);\n }", "@Override\r\n\tpublic void addSurgeryTreatment(TreatmentDto dto) throws ProviderServiceExn {\n\t\tSurgeryType surType = dto.getSurgery();\r\n\t\tTreatment t = treatmentFactory.createSurgeryTreatment(dto.getDiagnosis(), surType.getDate());\r\n\t\ttreatmentDAO.addTreatment(t);\r\n\t}", "ShipmentGatewayFedex createShipmentGatewayFedex();", "ShipmentMethodType createShipmentMethodType();", "public void placeShip(Ship thisShip, String coordinate, int direction){\r\n\t\tthisShip.placed = true;\r\n\t\tint letterCoord = letterToIndex(coordinate.charAt(0));\r\n\t\tint numberCoord = Integer.parseInt(coordinate.substring(1))-1;\r\n\t\t\r\n\t\t\r\n\t\t\tif (direction == 1) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tthisShip.set_position(numberCoord+i, letterCoord);\r\n\t\t\t\t\t}\r\n\t\t\t} else if (direction == 2) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord, letterCoord+i);\r\n\t\t\t\t\t}\r\n\t\t\t} else if (direction == 3) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord-i, letterCoord);\r\n\t\t\t\t}\r\n\t\t\t} else if (direction == 4) {\r\n\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\tthisShip.set_position(numberCoord, letterCoord - i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif(thisShip.name == \"Carrier\"){\r\n\t\t\tmyBoard.carrier.placed=thisShip.placed;\r\n\t\t\tmyBoard.carrier.position=thisShip.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\telse if(thisShip.name == \"Battleship\"){\r\n\t\t\tmyBoard.battleship.placed=thisShip.placed;\r\n\t\t\tmyBoard.battleship.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Cruiser\"){\r\n\t\t\tmyBoard.cruiser.placed=thisShip.placed;\r\n\t\t\tmyBoard.cruiser.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Submarine\"){\r\n\t\t\tmyBoard.submarine.placed=thisShip.placed;\r\n\t\t\tmyBoard.submarine.position=thisShip.position;\r\n\t\t}\r\n\t\telse if(thisShip.name == \"Patrol Boat\"){\r\n\t\t\t\tmyBoard.patrolboat.placed=thisShip.placed;\r\n\t\t\t\tmyBoard.patrolboat.position=thisShip.position;\r\n\t\t}\r\n\t\t\t\r\n\t\t}", "ShippingDocument createShippingDocument();", "public CMSShippingRequest populateShippingRequest(CMSShippingRequest shippingRequest) \n\t\tthrows BusinessRuleException {\n\t\tshippingRequest.setAddressFormat(addressFormat);\n\t\tshippingRequest.setAddress(getAddressLine1());\n\t\tshippingRequest.setAddress2(getAddressLine2());\n\t\tshippingRequest.setCity(getCity());\n\t\tshippingRequest.setState(getState());\n\t\tshippingRequest.setCountry(getCountry());\n\t\tshippingRequest.setZipCode(getZipCode());\n\t\tshippingRequest.setPhone(getPhone1());\n\t\treturn shippingRequest;\n\t}", "@POST(\"/IDShip\")\n\tShip IDShip(@Body int id, @Body int shipID);", "ShipmentGatewayUps createShipmentGatewayUps();", "public String getShipmentCode() {\n return shipmentCode;\n }", "public static void addNewSupplier() {\r\n\t\tSystem.out.println(\"Please enter the following supplier details:\");\r\n\r\n\t\tSystem.out.println(\"Supplier Name:\");\r\n\r\n\t\tString supName = Validation.stringNoIntsValidation();\r\n\r\n\t\tSystem.out.println(\"---Supplier Address details---\");\r\n\r\n\r\n\t\tAddress supAddress = addAddress();\r\n\r\n\t\tint numOfEnums = EnumSet.allOf(SupRegion.class).size();\r\n\r\n\t\tPrintMethods.printEnumList(numOfEnums);\r\n\r\n\t\tSystem.out.println(\"\\nPlease choose the region of your supplier:\");\r\n\r\n\t\tint regionChoice = Validation.listValidation(numOfEnums);\r\n\r\n\t\tSupRegion supRegion = SupRegion.values()[regionChoice-1];\r\n\r\n\r\n\t\tArrayList<Product> supProducts = addProduct();\r\n\t\t\r\n\t\tFeedback tempFeedback = new Feedback(null, null, null);\r\n\t\tArrayList<Feedback> supFeedback = new ArrayList<Feedback>();\r\n\t\tsupFeedback.add(tempFeedback);\r\n\r\n\t\tRandom supCodeRandom = new Random(100);\r\n\t\tint supCode = supCodeRandom.nextInt();\r\n\r\n\t\tSupplier tempSupplier = new Supplier(supCode, supName, supAddress, supRegion, supProducts, supFeedback);\r\n\r\n\t\tPart02Tester.supArray.add(tempSupplier);\r\n\t}", "public static StagedOrderSetShippingMethodActionBuilder of() {\n return new StagedOrderSetShippingMethodActionBuilder();\n }", "ShipmentGatewayDhl createShipmentGatewayDhl();", "public void addItem(String id, String description, Integer quantity, BigDecimal amount, Long weight,\r\n BigDecimal shippingCost) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(new Item(id, description, quantity, amount, weight, shippingCost));\r\n }", "void addShippingServiceLevelFieldsToDocument(final SolrInputDocument document, final ShippingServiceLevel shippingServiceLevel) {\n\t\taddFieldToDocument(document, SolrIndexConstants.OBJECT_UID, String.valueOf(shippingServiceLevel.getUidPk()));\n\t\taddFieldToDocument(document, SolrIndexConstants.SERVICE_LEVEL_CODE, shippingServiceLevel.getCode());\n\t\taddFieldToDocument(document, SolrIndexConstants.ACTIVE_FLAG, String.valueOf(shippingServiceLevel.isEnabled()));\n\t\taddFieldToDocument(document, SolrIndexConstants.CARRIER, shippingServiceLevel.getCarrier());\n\t\taddFieldToDocument(document, SolrIndexConstants.REGION, shippingServiceLevel.getShippingRegion().getName());\n\t\taddFieldToDocument(document, SolrIndexConstants.SERVICE_LEVEL_NAME, shippingServiceLevel.getDisplayName(shippingServiceLevel.getStore()\n\t\t\t\t.getCatalog().getDefaultLocale(), true));\n\t\taddFieldToDocument(document, SolrIndexConstants.STORE_NAME, shippingServiceLevel.getStore().getName());\n\t\tLOG.trace(\"Finished adding basic fields\");\n\t}", "CarrierShipmentMethod createCarrierShipmentMethod();", "Update withReturnShipping(ReturnShipping returnShipping);", "@Override\r\n\tpublic int addOrder(Order order, List<OrderItem> OrderItem, OrderShipping orderShipping) {\n\t\treturn odi.addOrder(order, OrderItem, orderShipping);\r\n\t}", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "public PaymentRequest setShippingType(ShippingType type) {\r\n if (shipping == null) {\r\n shipping = new Shipping();\r\n }\r\n shipping.setType(type);\r\n return this;\r\n }", "public void setShipmentRate(int shipmentRate) {\n this.shipmentRate = Float.valueOf(shipmentRate);\n }", "@Override\r\n\tpublic void addDelivery(Transaction transaction) throws Exception {\n\t\ttranDao.updateDeliveryInfo(transaction);\r\n\t}", "public void setShippingTime (java.util.Date shippingTime) {\r\n\t\tthis.shippingTime = shippingTime;\r\n\t}", "public void addShippings( EAIMMCtxtIfc theCtxt, com.dosmil_e.mall.core.ifc.MallShippingIfc theShippings) throws EAIException;", "ShipmentStatus createShipmentStatus();", "@Override\r\n\tpublic void addDepartment(Department department) {\n\r\n\t\tgetHibernateTemplate().save(department);\r\n\t}", "public void setShippingKey(final String shippingKey);", "public void setShipDate(Date shipDate) {\n _shipDate = shipDate;\n }", "public String getShippingId() {\n return shippingId;\n }", "public GetShipmentResponse getShipment(GetShipmentRequest request) \n throws MWSMerchantFulfillmentServiceException {\n return newResponse(GetShipmentResponse.class);\n }", "public Ship(){\n\t}", "ShipmentTypeAttr createShipmentTypeAttr();", "public void setShipmentCode(String shipmentCode) {\n this.shipmentCode = shipmentCode == null ? null : shipmentCode.trim();\n }", "public void setShipping (com.jspgou.cms.entity.Shipping shipping) {\r\n\t\tthis.shipping = shipping;\r\n\t}", "private static String placeShip(Request req) {\n\n if( req.params(\"Version\").equals(\"Updated\") ) {\n\n BattleshipModelUpdated model = (BattleshipModelUpdated) getModelFromReq( req );\n\n model.resetArrayUpdated( model );\n model = model.PlaceShip( model, req );\n model.resetArrayUpdated( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }else{\n\n BattleshipModelNormal model = (BattleshipModelNormal) getModelFromReq( req );\n\n model.resetArrayNormal( model );\n model = model.PlaceShip( model, req );\n model.resetArrayNormal( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }\n }", "public void setShippingTime(Integer shippingTime) {\n this.shippingTime = shippingTime;\n }", "@When(\"^I enter Same Day Delivery shipping address on guest shipping page$\")\n public void I_enter_shipping_address_on_guest_shipping_page() {\n HashMap<String, String> opts = new HashMap<>();\n pausePageHangWatchDog();\n opts.put(\"sdd_eligible\", \"true\");\n if (macys()) {\n new Checkout(opts, false).fillShippingData(false);\n } else {\n new CheckoutPageBcom(opts, false).fillGuestShippingData(false);\n }\n resumePageHangWatchDog();\n }", "@Override\n\tpublic int addNewEmployee(String firstName, String lastName, String email, String designation, String location,\n\t\t\tint salary) {\n\t\treturn template.update(\n\t\t\t\t\"insert into employee(fname, lname, email, desig, location, salary) values(?, ?, ?, ?, ?, ?)\",\n\t\t\t\tfirstName, lastName, email, designation, location, salary);\n\t}", "public void setShippingAmount(MMDecimal shippingAmount) {\r\n this.shippingAmount = shippingAmount;\r\n }", "public void putShip(Ship ship) throws OverlapException{\r\n if(this.ship == null){\r\n this.ship = ship;\r\n }else{\r\n throw new OverlapException(row, column);\r\n }\r\n }", "@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t try {\n\t\tShippingAddress shippingAddress=customer.getShippingAddress();\n\t session.save(customer);\n\t session.save(shippingAddress);\n\t\n\t\treturn true;\n\t }\n\t catch(HibernateException e)\n\t {\n\t \t\n\t \te.printStackTrace();\n\t \treturn false;\n\t }\n\t}", "ShipmentContactMech createShipmentContactMech();", "public SpaceShip() {\r\n\t\tsuper();\r\n\t\tthis.radius = 15;\r\n\t\tgameController.setSpaceShip(this);\r\n\t\tArrayList<Point> shipList = new ArrayList<Point>();\r\n\t\tshipList.add(new Point(-10, -10));\r\n\t\tshipList.add(new Point(-10, 10));\r\n\t\tshipList.add(new Point(15, 0));\r\n\t\tthis.addShape(new Polygon(shipList, Color.WHITE, false));\r\n\t\t// this.addShape(new Circle(radius, this.getCenterPoint().copy(),\r\n\t\t// Color.RED, false));\r\n\t}", "public RetailStoreOrderShipment addRetailStoreOrder(YoubenbenUserContext userContext, String retailStoreOrderShipmentId, String buyerId, String sellerId, String title, BigDecimal totalAmount, String confirmationId, String approvalId, String processingId, String pickingId, String deliveryId , String [] tokensExpr) throws Exception;", "Delivery createDelivery();", "public void assignEnergyToShip(Ship ship, AbstractObject source) {\n\t\tenergyToShip.put(source.getId(), ship);\n\t}", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}", "public com.jspgou.cms.entity.Shipping getShipping () {\r\n\t\treturn shipping;\r\n\t}", "public Response addSos(SosDTO sosDto) {\n\t\tUser u = userRepository.findByUid(sosDto.user_id);\n\t\t\n\t\tUserDTO user = new UserDTO();\n\n\t\t\n\t\tSystem.out.println(u.getName());\t\t\n\t\tSos sos = new Sos();\t\t\n\t\tDate date = new Date();\n\t\t\n\t\tsos.occuredDate = date;\n\t\t\n\t\tsos.users=u;\n\t\tSystem.out.println(sos);\n\t\tsosRepository.save(sos);\n\t\t//sosRepository.save(String users.getUid());\n\t\treturn new Response(\"success\",\"New sos Details Added Successfully\",sos);\n\t}", "public void processReturnShipment() {\n \n }", "public void setShippingCost(double shippingCost) {\n\t\tthis.shippingCost = shippingCost;\n\t}", "public Ship getShip()\n {\n return ship;\n }", "public void execute() {\n\t\tif(p.getType().equals(\"Manufacturing\")) {\n\t\t\tArrayList<Item> items = DatabaseSupport.getItems();\n\t\t\tIterator<Item> it = items.iterator();\n\t\t\tItem i;\n\t\t\twhile(it.hasNext()) {\n\t\t\t\ti = it.next();\n\t\t\t\tint a = InputController.promptInteger(\"How many \"+i.getName()+\" were manufactured? (0 for none)\", 0, Integer.MAX_VALUE);\n\t\t\t\tif(a>0) {\n\t\t\t\t\tWarehouseFloorItem n = p.getFloorItemByItem(i);\n\t\t\t\t\tif(n==null) {\n\t\t\t\t\t\tString newFloorLocation = InputController.promptString(\"This item does not have a floor location.\\nPlease specify a new one for this item.\");\n\t\t\t\t\t\tp.addFloorLocation(new WarehouseFloorItem(newFloorLocation, i, a));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tn.setQuantity(n.getQuantity()+a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tArrayList<Shipment> shipments = DatabaseSupport.getIncomingOrders(p);\n\t\t\tif(shipments.size()>0) {\n\t\t\t\tIterator<Shipment> i;\n\t\t\t\tint k = -1;\n\t\t\t\tShipment a;\n\t\t\t\twhile(k!=0) {\n\t\t\t\t\ti = shipments.iterator();\n\t\t\t\t\tk = 0;\n\t\t\t\t\twhile(i.hasNext()) {\n\t\t\t\t\t\ta = i.next();\n\t\t\t\t\t\tk++;\n\t\t\t\t\t\tSystem.out.println(k+\". \"+a.getShipmentID()+\" - \"+a.getOrderSize()+\" different items\");\n\t\t\t\t\t}\n\t\t\t\t\tk = InputController.promptInteger(\"Please enter the number next to the shipment ID to\\nselect a shipment to handle (0 to quit)\",0,shipments.size());\n\t\t\t\t\tif(k!=0) {\n\t\t\t\t\t\ta = shipments.get(k);\n\t\t\t\t\t\tIterator<ShipmentItem> b = a.getShipmentItems().iterator();\n\t\t\t\t\t\tShipmentItem c;\n\t\t\t\t\t\tString temp;\n\t\t\t\t\t\twhile(b.hasNext()) {\n\t\t\t\t\t\t\tc = b.next();\n\t\t\t\t\t\t\tWarehouseFloorItem d = p.getFloorItemByItem(c.getItem());\n\t\t\t\t\t\t\tif(d==null) {\n\t\t\t\t\t\t\t\ttemp = InputController.promptString(c.getItem().getName()+\" does not have a floor location yet.\\nPlease input a floor location for it.\");\n\t\t\t\t\t\t\t\td = new WarehouseFloorItem(temp, c.getItem(),0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp = InputController.promptString(\"\\nItem: \"+c.getItem().getName()+\"\\nQuantity: \"+c.getQuantity()+\"\\n\\nPress enter once you are done loading this item.\");\n\t\t\t\t\t\t\td.setQuantity(d.getQuantity()+c.getQuantity());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\ta.setShipped();\n\t\t\t\t\t\tSystem.out.println(\"\\nShipment \"+a.getShipmentID()+\" loaded successfully\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"There are no incoming shipments.\");\n\t\t\t}\n\t\t}\n\t}", "public String getShipName() {\n return shipName;\n }", "public FamilyPlanningRecord addRecord(int communityMemberId, int serviceId, Date serviceDate,double quantity){\n\t try{\n\t\t\t\n\t\t\tSimpleDateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\",Locale.UK);\n\t\t\tString strDate=dateFormat.format(serviceDate);\n\t\t\treturn addRecord(communityMemberId,serviceId,strDate,quantity);\n\t\t}catch(Exception ex){\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "public int processShipment(AascShipmentOrderInfo aascShipmentOrderInfo, \n AascShipMethodInfo aascShipMethodInfo, \n AascIntlInfo aascIntlInfo, \n AascProfileOptionsBean aascProfileOptionsInfo, \n String fedExCarrierMode, String fedExKey, \n String fedExPassword, \n String cloudLabelPath) { \n logger.info(\"Entered processShipment()\" + fedExCarrierMode);\n String intFlag = \"\";\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n fedExWSChkReturnlabelstr = \"PRINTRETURNLABEL\";\n } else {\n fedExWSChkReturnlabelstr = \"NONRETURN\";\n }\n\n\n this.fedExCarrierMode = fedExCarrierMode;\n this.fedExKey = fedExKey;\n this.fedExPassword = fedExPassword;\n\n try {\n \n outputFile = cloudLabelPath;\n try {\n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n } catch (Exception e) {\n intFlag = \"\";\n }\n\n shipmentRequest = \"\"; // String that holds shipmentRequest \n aascShipmentHeaderInfo = \n aascShipmentOrderInfo.getShipmentHeaderInfo(); // returns header info bean object\n shipPackageInfo = \n aascShipmentOrderInfo.getShipmentPackageInfo(); // returns the linkedlist contains the package info bean objects \n\n int size = shipPackageInfo.size();\n\n Iterator packageIterator = shipPackageInfo.iterator();\n\n while (packageIterator.hasNext()) {\n AascShipmentPackageInfo shipPackageInfo = \n (AascShipmentPackageInfo)packageIterator.next();\n if (\"PRINTRETURNLABEL\".equalsIgnoreCase(shipPackageInfo.getReturnShipment())) {\n size++;\n }\n\n if (\"Y\".equalsIgnoreCase(shipPackageInfo.getHazMatFlag())) {\n size++;\n }\n }\n\n\n calendar = Calendar.getInstance();\n time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE) + \":\" + calendar.get(Calendar.SECOND);\n currentDate = new Date(stf.parse(time).getTime());\n shipFlag = aascShipmentHeaderInfo.getShipFlag();\n time = stf.format(currentDate);\n \n Timestamp time1 = aascShipmentHeaderInfo.getShipTimeStamp();\n logger.info(\"TimeStamp =========> ::\" + time1);\n\n String timeStr = time1.toString();\n\n timeStr = timeStr.substring(11, timeStr.length() - 2);\n fedExWsTimeStr = nullStrToSpc(timeStr);\n \n\n //fedExWsTimeStr = \"00:00:00\";\n\n\n orderNumber = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n customerTransactionIdentifier = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n ListIterator packageInfoIterator = shipPackageInfo.listIterator();\n if (aascShipmentOrderInfo != null && \n aascShipmentHeaderInfo != null && shipPackageInfo != null && \n aascShipMethodInfo != null) {\n carrierId = aascShipmentHeaderInfo.getCarrierId();\n\n if (carrierPayMethodCode.equalsIgnoreCase(\"PP\")) {\n\n senderAccountNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber()); // FedEx Account number for prepaid from shipment page\n \n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n } else {\n senderAccountNumber = \n nullStrToSpc(aascShipMethodInfo.getCarrierAccountNumber(carrierId));\n \n\n \n\n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n\n }\n\n\n fedExTestMeterNumber = \n nullStrToSpc(aascShipMethodInfo.getMeterNumber(carrierId));\n \n shipToCompanyName = \n nullStrToSpc(aascShipmentHeaderInfo.getCustomerName()); // retreiving ship to company name from header bean \n \n shipToCompanyName = encode(shipToCompanyName);\n\n shipToAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getAddress()); // retreiving ship to address from header bean \n shipToAddressLine1 = \n encode(shipToAddressLine1); //added by Jagadish\n shipToAddressCity = \n nullStrToSpc(aascShipmentHeaderInfo.getCity()); // retreiving ship to city from header bean \n shipToAddressPostalCode = \n nullStrToSpc(nullStrToSpc(aascShipmentHeaderInfo.getPostalCode())); // retreiving ship to postal code from header bean \n\n shipToAddressPostalCode = escape(shipToAddressPostalCode);\n\n shipToCountry = \n nullStrToSpc(aascShipmentHeaderInfo.getCountrySymbol()).toUpperCase(); // retreiving ship to country name from header bean \n \n shipToEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipToEmailId());\n \n shipToAddressState = \n nullStrToSpc(aascShipmentHeaderInfo.getState()).toUpperCase(); // retreiving ship to state from header bean \n \n residentialAddrFlag = aascShipmentHeaderInfo.getResidentialFlag(); \n \n shipDate = \n aascShipmentHeaderInfo.getShipmentDate(); // retreiving ship date from header bean \n shipFromAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine1()); // indicates ship From address \n shipFromAddressLine1 = \n encode(shipFromAddressLine1); //added by Jagadish\n shipFromAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine2()); // indicates ship From address \n shipFromAddressLine2 = \n encode(shipFromAddressLine2); //added by Jagadish \n shipFromAddressCity = \n aascShipmentHeaderInfo.getShipFromCity(); // indicates ship From address city \n shipFromAddressPostalCode = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPostalCode()); // indicates ship From postal code \n shipFromPersonName = \n aascShipmentHeaderInfo.getShipFromContactName();\n // System.out.println(\":::::::::::::::::::::::::::::::::::::: shipFromPersonName :::::::::::::::::::::: -- > in Fedex shipment \"+shipFromPersonName);\n shipFromAddressPostalCode = escape(shipFromAddressPostalCode);\n\n shipFromCountry = \n aascShipmentHeaderInfo.getShipFromCountry().toUpperCase(); // indicates ship From country \n shipFromAddressState = \n aascShipmentHeaderInfo.getShipFromState().toUpperCase();\n shipFromDepartment = \n nullStrToSpc(aascShipmentHeaderInfo.getDepartment()); // Retrieving the shipfrom department \n shipFromDepartment = encode(shipFromDepartment);\n shipMethodName = \n nullStrToSpc(aascShipmentHeaderInfo.getShipMethodMeaning()); // retreiving ship method meaning from header bean \n carrierCode = \n aascShipMethodInfo.getCarrierName(shipMethodName); // retreiving carrier code from ship method bean \n\n reference1 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n reference1 = encode(reference1);\n reference2 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n reference2 = encode(reference2);\n \n receipientPartyName = encode(aascShipmentHeaderInfo.getRecCompanyName());\n recipientPostalCode= encode(aascShipmentHeaderInfo.getRecPostalCode());\n //Mahesh added below code for Third Party development \n tpCompanyName = encode(aascShipmentHeaderInfo.getTpCompanyName());\n tpAddress= encode(aascShipmentHeaderInfo.getTpAddress());\n tpCity= encode(aascShipmentHeaderInfo.getTpCity());\n tpState= encode(aascShipmentHeaderInfo.getTpState());\n tpPostalCode= encode(aascShipmentHeaderInfo.getTpPostalCode());\n tpCountrySymbol= encode(aascShipmentHeaderInfo.getTpCountrySymbol());\n \n // khaja added code \n satShipFlag = \n nullStrToSpc(aascShipmentHeaderInfo.getSaturdayShipFlag()); // retreiving saturday ship flag from header bean \n //System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ satShipFlag :\"+satShipFlag);\n // khaja added code end\n size = shipPackageInfo.size();\n\n while (packageInfoIterator.hasNext()) {\n AascShipmentPackageInfo aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n pkgWtUom = nullStrToSpc(aascPackageBean.getUom());\n if (pkgWtUom.equalsIgnoreCase(\"LB\") || \n pkgWtUom.equalsIgnoreCase(\"KG\")) {\n pkgWtUom = (pkgWtUom + \"S\").toUpperCase();\n }\n pkgWtVal = aascPackageBean.getWeight();\n //pkgWtVal BY MADHAVI\n\n DecimalFormat fmt = new DecimalFormat();\n fmt.setMaximumFractionDigits(1);\n String str = fmt.format(pkgWtVal);\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n pkgWtVal = Float.parseFloat(str);\n \n } else {\n \n }\n\n dimensions = nullStrToSpc(aascPackageBean.getDimension());\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n\n if (dimensions != null && !dimensions.equals(\"\")) {\n\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n length = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n width = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n height = dimensions;\n \n }\n // Email Notification details\n emailFlag = aascShipmentHeaderInfo.getEmailNotificationFlag();\n SenderEmail = aascShipmentHeaderInfo.getShipFromEmailId();\n ShipAlertNotification = aascShipmentHeaderInfo.getShipNotificationFlag();\n ExceptionNotification = aascShipmentHeaderInfo.getExceptionNotification();\n DeliveryNotification = aascShipmentHeaderInfo.getDeliveryNotification();\n Format = aascShipmentHeaderInfo.getFormatType();\n recipientEmailAddress1 = aascShipmentHeaderInfo.getShipToEmailId();\n if(aascShipmentHeaderInfo.getEmailCustomerName().equalsIgnoreCase(\"Y\")){\n message = \"/ Customer : \"+nullStrToSpc(encode(aascShipmentHeaderInfo.getCustomerName()));\n }\n \n if (aascShipmentHeaderInfo.getReference1Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 1: \"+nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n }\n \n if (aascShipmentHeaderInfo.getReference2Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 2:\" + nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n }\n \n // Email Notification details\n\n codFlag = nullStrToSpc(aascPackageBean.getCodFlag());\n\n if (codFlag.equalsIgnoreCase(\"Y\")) {\n \n codAmt = aascPackageBean.getCodAmt();\n \n codAmtStr = String.valueOf(codAmt);\n\n int index = codAmtStr.indexOf(\".\");\n\n \n\n if (index < 1) {\n codAmtStr = codAmtStr + \".00\";\n \n } else if ((codAmtStr.length() - index) > 2) {\n codAmtStr = codAmtStr.substring(0, index + 3);\n \n } else {\n while (codAmtStr.length() != (index + 3)) {\n codAmtStr = codAmtStr + \"0\";\n \n }\n }\n codTag = \n \"<COD>\" + \"<CollectionAmount>\" + codAmtStr + \"</CollectionAmount>\" + \n \"<CollectionType>ANY</CollectionType>\" + \n \"</COD>\";\n } else {\n \n codTag = \"\";\n }\n\n halPhone = aascPackageBean.getHalPhone();\n halCity = aascPackageBean.getHalCity();\n halState = aascPackageBean.getHalStateOrProvince();\n halLine1 = aascPackageBean.getHalLine1();\n halLine2 = aascPackageBean.getHalLine2();\n halZip = aascPackageBean.getHalPostalCode();\n halFlag = aascPackageBean.getHalFlag();\n\n dryIceUnits = aascPackageBean.getDryIceUnits();\n chDryIce = aascPackageBean.getDryIceChk();\n dryIceWeight = aascPackageBean.getDryIceWeight();\n \n logger.info(\"DryIce Flag=\" + chDryIce);\n if (chDryIce.equalsIgnoreCase(\"Y\")) {\n logger.info(\"DryIce Flag is Y\");\n dryIceTag = \n \"<DryIce><WeightUnits>\" + dryIceUnits + \"</WeightUnits><Weight>\" + \n dryIceWeight + \"</Weight></DryIce>\";\n } else {\n logger.info(\"DryIce Flag is N\");\n dryIceTag = \"\";\n }\n\n\n\n String halLine2Tag = \"\";\n\n if (halLine2.equalsIgnoreCase(\"\") || halLine2 == null) {\n halLine2Tag = \"\";\n } else {\n halLine2Tag = \"<Line2>\" + halLine2 + \"</Line2>\";\n }\n\n\n if (halFlag.equalsIgnoreCase(\"Y\")) {\n \n hal = \n\"<HoldAtLocation><PhoneNumber>\" + halPhone + \"</PhoneNumber>\" + \n \"<Address><Line1>\" + halLine1 + \"</Line1>\" + halLine2Tag + \"<City>\" + \n halCity + \"</City>\" + \"<StateOrProvinceCode>\" + halState + \n \"</StateOrProvinceCode>\" + \"<PostalCode>\" + halZip + \n \"</PostalCode></Address></HoldAtLocation>\";\n\n } else {\n \n hal = \"\";\n }\n\n HazMatFlag = aascPackageBean.getHazMatFlag();\n HazMatType = aascPackageBean.getHazMatType();\n HazMatClass = aascPackageBean.getHazMatClass();\n \n\n String HazMatCertData = \"\";\n String ShippingName = \"\";\n String ShippingName1 = \"\";\n String ShippingName2 = \"\";\n String ShippingName3 = \"\";\n String Class = \"\";\n\n if (HazMatFlag.equalsIgnoreCase(\"Y\")) {\n \n if (!HazMatClass.equalsIgnoreCase(\"\")) {\n \n int classIndex = HazMatClass.indexOf(\"Class\", 1);\n if (classIndex == -1) {\n classIndex = HazMatClass.indexOf(\"CLASS\", 1);\n \n }\n \n int firstIndex = 0;\n \n\n firstIndex = HazMatClass.indexOf(\"-\");\n \n String HazMatClassStr = \n HazMatClass.substring(0, firstIndex);\n \n if (classIndex == -1) {\n \n ShippingName = \"\";\n \n \n try {\n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.indexOf(\" \"), \n HazMatClassStr.length()));\n } catch (Exception e) {\n Class = \"\";\n firstIndex = -1;\n }\n\n } else {\n \n ShippingName = \n HazMatClass.substring(0, classIndex - \n 1);\n \n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.lastIndexOf(\" \"), \n HazMatClassStr.length()));\n }\n \n if (HazMatClass.length() > firstIndex + 1 + 100) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n firstIndex + 1 + \n 100);\n ShippingName3 = \n HazMatClass.substring(firstIndex + 1 + \n 100, \n HazMatClass.length());\n } else if (HazMatClass.length() > \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n HazMatClass.length());\n } else if (HazMatClass.length() <= \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n HazMatClass.length());\n }\n \n fedExWsShippingName = ShippingName;\n fedExWsShippingName1 = ShippingName1+ShippingName2+ShippingName3;\n fedExWsShippingName2 = ShippingName2;\n fedExWsShippingName3 = ShippingName3;\n fedExWsClass = Class;\n HazMatCertData = \n \"<HazMatCertificateData>\" + \"<DOTProperShippingName>\" + \n ShippingName + \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName1 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName2 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName3 + \n \"</DOTProperShippingName>\" + \n \"<DOTHazardClassOrDivision>\" + Class + \n \"</DOTHazardClassOrDivision>\";\n // \"</HazMatCertificateData>\";\n\n }\n\n\n HazMatQty = aascPackageBean.getHazMatQty();\n HazMatUnit = aascPackageBean.getHazMatUnit();\n\n HazMatIdentificationNo = \n aascPackageBean.getHazMatIdNo();\n HazMatEmergencyContactNo = \n aascPackageBean.getHazMatEmerContactNo();\n HazMatEmergencyContactName = \n aascPackageBean.getHazMatEmerContactName();\n HazardousMaterialPkgGroup = \n nullStrToSpc(aascPackageBean.getHazMatPkgGroup());\n\n // Added on Jul-05-2011\n try {\n hazmatPkgingCnt = \n aascPackageBean.getHazmatPkgingCnt();\n } catch (Exception e) {\n hazmatPkgingCnt = 0.0;\n }\n hazmatPkgingUnits = \n nullStrToSpc(aascPackageBean.getHazmatPkgingUnits());\n hazmatTechnicalName = \n nullStrToSpc(aascPackageBean.getHazmatTechnicalName());\n //End on Jul-05-2011\n hazmatSignatureName = \n nullStrToSpc(aascPackageBean.getHazmatSignatureName());\n\n /* if(HazardousMaterialPkgGroup.equalsIgnoreCase(\"\"))\n {\n HazardousMaterialPkgGroup = aascPackageBean.getHazMatPkgGroup();\n }\n else {\n HazardousMaterialPkgGroup=\"\";\n }*/\n HazMatDOTLabelType = \n aascPackageBean.getHazMatDOTLabel();\n HazardousMaterialId = aascPackageBean.getHazMatId();\n\n String AccessibilityTag = \n \"<Accessibility>\" + HazMatType + \n \"</Accessibility>\";\n String additionalTag = \"\";\n String additionalTag1 = \"\";\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n \n AccessibilityTag = \"\";\n additionalTag = \n \"<Quantity>\" + HazMatQty + \"</Quantity><Units>\" + \n HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n additionalTag1 = \n \"<DOTIDNumber>\" + HazMatIdentificationNo + \n \"</DOTIDNumber>\" + \"<PackingGroup>\" + \n HazardousMaterialPkgGroup + \n \"</PackingGroup>\" + \"<DOTLabelType>\" + \n HazMatDOTLabelType + \"</DOTLabelType>\" + \n \"<TwentyFourHourEmergencyResponseContactName>\" + \n HazMatEmergencyContactName + \n \"</TwentyFourHourEmergencyResponseContactName>\" + \n \"<TwentyFourHourEmergencyResponseContactNumber>\" + \n HazMatEmergencyContactNo + \n \" </TwentyFourHourEmergencyResponseContactNumber>\";\n\n additionalTag = \n additionalTag1 + \"<Quantity>\" + HazMatQty + \n \"</Quantity><Units>\" + HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n\n } else {\n \n additionalTag = \"\" + \"</HazMatCertificateData>\";\n }\n\n HazMat = \n \"<DangerousGoods>\" + AccessibilityTag + HazMatCertData + \n additionalTag + \"</DangerousGoods>\";\n\n } else {\n \n HazMat = \"\";\n }\n\n // Added code for dimensions \n packageLength = aascPackageBean.getPackageLength();\n packageWidth = aascPackageBean.getPackageWidth();\n packageHeight = aascPackageBean.getPackageHeight();\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n //System.out.println(\"packageLength----------------------------in fedex shipment::\"+packageLength);\n // Added for dimensions \n if (packageLength != 0 && packageWidth != 0 && \n packageHeight != 0 && packageLength != 0.0 && \n packageWidth != 0.0 && packageHeight != 0.0) {\n header9 = \n \"<Dimensions>\" + \"<Length>\" + (int)packageLength + \n \"</Length>\" + \"<Width>\" + (int)packageWidth + \n \"</Width>\" + \"<Height>\" + (int)packageHeight + \n \"</Height>\" + \"<Units>\" + units + \"</Units>\" + \n \"</Dimensions>\";\n } else {\n header9 = \"\";\n }\n\n signatureOptions = \n nullStrToSpc(aascPackageBean.getSignatureOptions());\n\n\n returnShipment = \n nullStrToSpc(aascPackageBean.getReturnShipment());\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n rtnShipFromCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCompany().trim()));\n \n rtnShipToCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCompany().trim()));\n rtnShipFromContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromContact().trim()));\n rtnShipToContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToContact().trim()));\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnTagshipToContactPersonName = \"\";\n } else {\n rtnTagshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n rtnShipFromLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine1().trim()));\n\n rtnShipToLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine1().trim()));\n rtnShipFromLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine2().trim()));\n\n rtnShipToLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine2().trim()));\n rtnShipFromCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCity().trim()));\n rtnShipFromSate = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromSate().trim()));\n rtnShipFromZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromZip()));\n rtnShipToCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCity().trim()));\n rtnShipToState = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToState().trim()));\n rtnShipToZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToZip()));\n rtnShipFromPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromPhone().trim()));\n\n rtnShipFromPhone = rtnShipFromPhone.replace(\"(\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\")\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\"-\", \"\");\n\n rtnShipToPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToPhone().trim()));\n\n rtnShipToPhone = rtnShipToPhone.replace(\"(\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\")\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\"-\", \"\");\n\n rtnShipMethod = \n encode(nullStrToSpc(aascPackageBean.getRtnShipMethod()));\n rtnDropOfType = \n encode(nullStrToSpc(aascPackageBean.getRtnDropOfType()));\n rtnPackageList = \n encode(nullStrToSpc(aascPackageBean.getRtnPackageList()));\n //rtnPayMethod=nullStrToSpc(aascPackageBean.getRtnPayMethod());\n rtnPayMethod = \n encode((String)carrierPayMethodCodeMap.get(nullStrToSpc(aascPackageBean.getRtnPayMethod())));\n rtnPayMethodCode = \n encode(nullStrToSpc(aascPackageBean.getRtnPayMethodCode()));\n rtnACNumber = \n encode(nullStrToSpc(aascPackageBean.getRtnACNumber().trim()));\n rtnRMA = \n encode(nullStrToSpc(aascPackageBean.getRtnRMA().trim()));\n }\n // rtnTrackingNumber=nullStrToSpc(aascPackageBean.getRtnTrackingNumber().trim());\n //18/07/07(end)\n //25/07/07(start)\n String rtnShipTagToContact = \"\";\n String rtnshipToContactPersonName = \"\";\n String rtnShipTagFromContact = \"\";\n String rtnshipFromContactPersonName = \"\";\n if (rtnShipToCompany.equalsIgnoreCase(\"\") || \n rtnShipToCompany == null) {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnShipTagToContact = \"\";\n } else {\n rtnShipTagToContact = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnshipToContactPersonName = \"\";\n } else {\n rtnshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n\n }\n rtnShipTagToContact = \n rtnshipToContactPersonName + \"<CompanyName>\" + \n rtnShipToCompany + \"</CompanyName>\";\n\n }\n\n\n if (rtnShipFromCompany.equalsIgnoreCase(\"\") || \n rtnShipFromCompany == null) {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnShipTagFromContact = \"\";\n } else {\n rtnShipTagFromContact = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnshipFromContactPersonName = \"\";\n } else {\n rtnshipFromContactPersonName = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n\n }\n rtnShipTagFromContact = \n rtnshipFromContactPersonName + \"<CompanyName>\" + \n rtnShipFromCompany + \"</CompanyName>\";\n\n }\n //25/07/07(end)\n\n\n //24/07/07(start)\n String toLine2Tag = \"\";\n\n if (rtnShipToLine2.equalsIgnoreCase(\"\") || \n rtnShipToLine2 == null) {\n toLine2Tag = \"\";\n } else {\n toLine2Tag = \"<Line2>\" + rtnShipToLine2 + \"</Line2>\";\n }\n\n String fromLine2Tag = \"\";\n\n if (rtnShipFromLine2.equalsIgnoreCase(\"\") || \n rtnShipFromLine2 == null) {\n fromLine2Tag = \"\";\n } else {\n fromLine2Tag = \n \"<Line2>\" + rtnShipFromLine2 + \"</Line2>\";\n }\n //24/07/07(end)\n if (rtnRMA != null && !(rtnRMA.equalsIgnoreCase(\"\"))) {\n rmaTag = \n \"<RMA>\" + \"<Number>\" + rtnRMA + \"</Number>\" + \"</RMA>\";\n } else {\n rmaTag = \"\";\n }\n packageDeclaredValue = \n aascPackageBean.getPackageDeclaredValue();\n \n rtnPackageDeclaredValue = \n aascPackageBean.getRtnDeclaredValue();\n \n rtnPackageDeclaredValueStr = \n String.valueOf(rtnPackageDeclaredValue);\n\n int indexRtr = rtnPackageDeclaredValueStr.indexOf(\".\");\n\n if (indexRtr < 1) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \".00\";\n\n } else if ((rtnPackageDeclaredValueStr.length() - \n indexRtr) > 2) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (rtnPackageDeclaredValueStr.length() != \n (indexRtr + 3)) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \"0\";\n\n }\n }\n //31/07/07(end)\n\n packageDeclaredValueStr = \n String.valueOf(packageDeclaredValue);\n int index = packageDeclaredValueStr.indexOf(\".\");\n\n\n if (index < 1) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \".00\";\n\n } else if ((packageDeclaredValueStr.length() - index) > \n 2) {\n packageDeclaredValueStr = \n packageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (packageDeclaredValueStr.length() != \n (index + 3)) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \"0\";\n\n }\n }\n /*End 15-04-09 */\n\n\n packageSequence = \n nullStrToSpc(aascPackageBean.getPackageSequence());\n \n packageFlag = nullStrToSpc(aascPackageBean.getVoidFlag());\n \n packageTrackinNumber = \n nullStrToSpc(aascPackageBean.getTrackingNumber());\n\n packageCount = \n nullStrToSpc(aascPackageBean.getPackageCount());\n\n \n\n if (!packageCount.equalsIgnoreCase(\"1\")) {\n\n shipmentWeight = \n nullStrToSpc(String.valueOf(aascPackageBean.getWeight()));\n\n \n\n if (packageSequence.equalsIgnoreCase(\"1\")) {\n if (carrierCode.equalsIgnoreCase(\"FDXG\") || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n codFlag.equalsIgnoreCase(\"Y\")) || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n intFlag.equalsIgnoreCase(\"Y\"))) {\n shipMultiPieceFlag = 1;\n }\n masterTrackingNumber = \"\";\n masterFormID = \"\";\n /*shipWtTag = \"<ShipmentWeight>\"\n + aascHeaderInfo.getPackageWeight()\n + \"</ShipmentWeight>\"; */\n } else {\n if (shipFlag.equalsIgnoreCase(\"Y\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n masterFormID = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getMasterFormId()));\n \n } else {\n masterTrackingNumber = \n nullStrToSpc((String)hashMap.get(\"masterTrkNum\"));\n\n \n if (masterTrackingNumber == \"\" || \n masterTrackingNumber.equalsIgnoreCase(\"\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n\n //aascShipmentHeaderInfo.setWayBill(masterTrackingNumber);\n\n }\n //26/07/07(end)\n masterFormID = \n nullStrToSpc((String)hashMap.get(\"masterFormId\"));\n //shipWtTag = \"\";\n }\n\n }\n\n if (shipMultiPieceFlag == \n 1) { //shipWtTag + // \"<ShipmentWeight>\"+aascHeaderInfo.getPackageWeight()+\"</ShipmentWeight>\"+\n part1 = \n \"<MultiPiece>\" + \"<PackageCount>\" + packageCount + \n \"</PackageCount>\" + \n \"<PackageSequenceNumber>\" + \n packageSequence + \n \"</PackageSequenceNumber>\" + \n \"<MasterTrackingNumber>\" + \n masterTrackingNumber + \n \"</MasterTrackingNumber>\";\n part2 = \"\";\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n part2 = \n \"<MasterFormID>\" + masterFormID + \"</MasterFormID></MultiPiece>\";\n } else {\n part2 = \"</MultiPiece>\";\n }\n\n header4 = part1 + part2;\n }\n\n else {\n header4 = \"\";\n }\n }\n\n\n chkReturnlabel = \"NONRETURN\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n int ctr = 0;\n if (responseStatus == 151 && \n !(shipFlag.equalsIgnoreCase(\"Y\"))) {\n // aascHeaderInfo.setWayBill(\"\"); \n packageInfoIterator = shipPackageInfo.listIterator();\n\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n aascPackageBean.setMasterTrackingNumber(\"\");\n aascPackageBean.setMasterFormID(\"\");\n // aascPackageBean.setTrackingNumber(\"\");\n aascPackageBean.setPkgCost(0.0);\n aascPackageBean.setRtnShipmentCost(0.0);\n aascPackageBean.setRtnTrackingNumber(\"\");\n aascPackageBean.setSurCharges(0.0);\n }\n return responseStatus;\n }\n if (responseStatus == 151 && \n shipFlag.equalsIgnoreCase(\"Y\")) {\n\n packageInfoIterator = shipPackageInfo.listIterator();\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n }\n return responseStatus;\n }\n\n // }//End of Iterator \n\n customerCarrierAccountNumber = \n aascShipmentHeaderInfo.getCarrierAccountNumber(); // FedEx Account number of the client \n // Modified to retrieve the Ship From company name from Profile Options instead of from Header Info\n // shipFromCompanyName = nullStrToSpc(aascProfileOptionsInfo.getCompanyName());\n shipFromCompanyName = \n aascShipmentHeaderInfo.getShipFromCompanyName();\n logger.info(\"ship from company name::::\" + \n shipFromCompanyName);\n shipFromCompanyName = encode(shipFromCompanyName);\n \n shipFromPhoneNumber1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPhoneNumber1());\n //start\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = escape(shipFromPhoneNumber1);\n\n shipToContactPhoneNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getPhoneNumber()); // retreiving phone number from header bean \n\n shipToContactPhoneNumber = \n escape(shipToContactPhoneNumber);\n \n if (shipToContactPhoneNumber.equalsIgnoreCase(\"\")) {\n shipToContactPhoneNumber = shipFromPhoneNumber1;\n }\n\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"(\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\")\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"-\", \"\");\n \n shipFromEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipFromEmailId());\n \n carrierPayMethod = \n (String)carrierPayMethodCodeMap.get(nullStrToSpc(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n carrierPayMethodCode = \n nullStrToSpc(aascShipMethodInfo.getCarrierPayCode(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n if (\"RECIPIENT\".equalsIgnoreCase(carrierPayMethod) && \n \"FC\".equalsIgnoreCase(carrierPayMethodCode)) {\n carrierPayMethodCode = \"CG\";\n }\n dropoffType = \n nullStrToSpc(aascShipmentHeaderInfo.getDropOfType());\n service = \n aascShipMethodInfo.getConnectShipScsTag(shipMethodName);\n packaging = \n nullStrToSpc(aascShipmentHeaderInfo.getPackaging());\n portString = aascShipMethodInfo.getCarrierPort(carrierId);\n if (portString != null && !(portString.equals(\"\"))) {\n port = Integer.parseInt(portString);\n } else {\n logger.severe(\"portString is null \" + portString);\n }\n host = \naascShipMethodInfo.getCarrierServerIPAddress(carrierId);\n\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && \n carrierPayMethodCode.equalsIgnoreCase(\"FC\")) {\n aascShipmentHeaderInfo.setMainError(\"bill to type of collect is for ground services only \");\n responseStatus = 151;\n return responseStatus;\n }\n //By Madhavi\n String line2Tag = \"\";\n shipToAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipToAddrLine2());\n shipToAddressLine2 = shipToAddressLine2.trim();\n shipToAddressLine2=encode(shipToAddressLine2); //added by Jagadish\n \n if (shipToAddressLine2.equalsIgnoreCase(\"\") || \n shipToAddressLine2 == null) {\n line2Tag = \"\";\n } else {\n line2Tag = \"<Line2>\" + shipToAddressLine2 + \"</Line2>\";\n }\n op900LabelFormat = \n nullStrToSpc(aascShipMethodInfo.getHazmatOp900LabelFormat(carrierId));\n \n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n LinkedList coList = null;\n try {\n aascIntlHeaderInfo = aascIntlInfo.getIntlHeaderInfo();\n coList = aascIntlInfo.getIntlCommodityInfo();\n } catch (Exception e) {\n aascIntlHeaderInfo = new AascIntlHeaderInfo();\n coList = new LinkedList();\n }\n if (intFlag.equalsIgnoreCase(\"Y\")) {\n \n intPayerType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPayerType());\n \n intAccNumber = nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber());\n// nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber());\n//logger.info(\"intAccNumber:2167::\"+intAccNumber);\n // logger.info(\"nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()):2168::\"+nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()));\n\n intMaskAccNumber = \n nullStrToSpc(aascIntlHeaderInfo.getIntlMaskAccountNumber());\n intcountryCode = \n nullStrToSpc(aascIntlHeaderInfo.getIntlCountryCode());\n \n intTermsOfSale = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTermsOfSale());\n intTotalCustomsValue = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTotalCustomsValue());\n intFreightCharge = \n aascIntlHeaderInfo.getIntlFreightCharge();\n intInsuranceCharge = \n aascIntlHeaderInfo.getIntlInsuranceCharge();\n intTaxesOrMiscellaneousCharge = \n aascIntlHeaderInfo.getIntlTaxMiscellaneousCharge();\n intPurpose = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPurpose());\n intSenderTINOrDUNS = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedNumber());\n intSenderTINOrDUNSType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedType());\n packingListEnclosed = \n aascIntlHeaderInfo.getPackingListEnclosed();\n shippersLoadAndCount = \n aascIntlHeaderInfo.getShippersLoadAndCount();\n bookingConfirmationNumber = \n aascIntlHeaderInfo.getBookingConfirmationNumber();\n generateCI = aascIntlHeaderInfo.getGenerateCI();\n declarationStmt = \n aascIntlHeaderInfo.getIntlDeclarationStmt();\n \n importerName = aascIntlHeaderInfo.getImporterName();\n importerCompName = \n aascIntlHeaderInfo.getImporterCompName();\n importerAddress1 = \n aascIntlHeaderInfo.getImporterAddress1();\n importerAddress2 = \n aascIntlHeaderInfo.getImporterAddress2();\n importerCity = aascIntlHeaderInfo.getImporterCity();\n importerCountryCode = \n aascIntlHeaderInfo.getImporterCountryCode();\n \n importerPhoneNum = \n aascIntlHeaderInfo.getImporterPhoneNum();\n \n importerPostalCode = \n aascIntlHeaderInfo.getImporterPostalCode();\n importerState = aascIntlHeaderInfo.getImporterState();\n \n impIntlSedNumber = \n aascIntlHeaderInfo.getImpIntlSedNumber();\n \n impIntlSedType = \n aascIntlHeaderInfo.getImpIntlSedType();\n \n recIntlSedNumber = \n aascIntlHeaderInfo.getRecIntlSedNumber();\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n brokerName = aascIntlHeaderInfo.getBrokerName();\n brokerCompName = \n aascIntlHeaderInfo.getBrokerCompName();\n \n brokerAddress1 = \n aascIntlHeaderInfo.getBrokerAddress1();\n \n brokerAddress2 = \n aascIntlHeaderInfo.getBrokerAddress2();\n \n brokerCity = aascIntlHeaderInfo.getBrokerCity();\n \n brokerCountryCode = \n aascIntlHeaderInfo.getBrokerCountryCode();\n \n brokerPhoneNum = \n aascIntlHeaderInfo.getBrokerPhoneNum();\n \n brokerPostalCode = \n aascIntlHeaderInfo.getBrokerPostalCode();\n \n brokerState = aascIntlHeaderInfo.getBrokerState();\n \n\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n\n ListIterator CoInfoIterator = coList.listIterator();\n\n intHeader6 = \"\";\n String harCode = \"\";\n String uPrice = \"\";\n String exportLicense = \"\";\n\n while (CoInfoIterator.hasNext()) {\n AascIntlCommodityInfo aascIntlCommodityInfo = \n (AascIntlCommodityInfo)CoInfoIterator.next();\n\n numberOfPieces = \n aascIntlCommodityInfo.getNumberOfPieces();\n description = \n encode(aascIntlCommodityInfo.getDescription());\n countryOfManufacture = \n aascIntlCommodityInfo.getCountryOfManufacture();\n harmonizedCode = \n aascIntlCommodityInfo.getHarmonizedCode();\n weight = aascIntlCommodityInfo.getWeight();\n quantity = aascIntlCommodityInfo.getQuantity();\n quantityUnits = \n aascIntlCommodityInfo.getQuantityUnits();\n unitPrice = aascIntlCommodityInfo.getUnitPrice();\n customsValue = \n aascIntlCommodityInfo.getCustomsValue();\n exportLicenseNumber = \n aascIntlCommodityInfo.getExportLicenseNumber();\n exportLicenseExpiryDate = \n aascIntlCommodityInfo.getExportLicenseExpiryDate();\n String rdate = \"\";\n\n try {\n //String mon[]={\"\",\"JAN\",\"FEB\",\"MAR\",\"APR\",\"MAY\",\"JUN\",\"JUL\",\"AUG\",\"SEP\",\"OCT\",\"NOV\",\"DEC\"};\n // String exportLicenseExpiryDateStr = \n // exportLicenseExpiryDate.substring(0, 1);\n String convertDate = exportLicenseExpiryDate;\n\n // 18-FEB-08 2008-02-18\n int len = convertDate.length();\n int indexs = convertDate.indexOf('-');\n int index1 = convertDate.lastIndexOf('-');\n\n String syear = \n convertDate.substring(index1 + 1, \n len).trim();\n String sdate = \n convertDate.substring(0, indexs).trim();\n String smon = \n convertDate.substring(indexs + 1, index1).trim();\n String intMonth = \"\";\n if (smon.equalsIgnoreCase(\"JAN\"))\n intMonth = \"01\";\n else if (smon.equalsIgnoreCase(\"FEB\"))\n intMonth = \"02\";\n else if (smon.equalsIgnoreCase(\"MAR\"))\n intMonth = \"03\";\n else if (smon.equalsIgnoreCase(\"APR\"))\n intMonth = \"04\";\n else if (smon.equalsIgnoreCase(\"MAY\"))\n intMonth = \"05\";\n else if (smon.equalsIgnoreCase(\"JUN\"))\n intMonth = \"06\";\n else if (smon.equalsIgnoreCase(\"JUL\"))\n intMonth = \"07\";\n else if (smon.equalsIgnoreCase(\"AUG\"))\n intMonth = \"08\";\n else if (smon.equalsIgnoreCase(\"SEP\"))\n intMonth = \"09\";\n else if (smon.equalsIgnoreCase(\"OCT\"))\n intMonth = \"10\";\n else if (smon.equalsIgnoreCase(\"NOV\"))\n intMonth = \"11\";\n else if (smon.equalsIgnoreCase(\"DEC\"))\n intMonth = \"12\";\n\n rdate = \n \"20\" + syear + '-' + intMonth + '-' + sdate;\n rdate = exportLicenseExpiryDate;\n\n } catch (Exception e) {\n exportLicenseExpiryDate = \"\";\n rdate = \"\";\n }\n\n try {\n // String harmonizedCodeStr = \n // harmonizedCode.substring(0, 1);\n } catch (Exception e) {\n harmonizedCode = \"\";\n }\n if (harmonizedCode.equalsIgnoreCase(\"\")) {\n harCode = \"\";\n } else {\n harCode = \n \"<HarmonizedCode>\" + harmonizedCode + \"</HarmonizedCode>\";\n }\n if (unitPrice.equalsIgnoreCase(\"\")) {\n uPrice = \"\";\n } else {\n uPrice = \n \"<UnitPrice>\" + unitPrice + \"</UnitPrice>\";\n }\n try {\n // String expNoStr = \n // exportLicenseNumber.substring(0, 1);\n\n } catch (Exception e) {\n exportLicenseNumber = \"\";\n }\n if (exportLicenseNumber.equalsIgnoreCase(\"\")) {\n exportLicense = \"\";\n } else {\n exportLicense = \n \"<ExportLicenseNumber>\" + exportLicenseNumber + \n \"</ExportLicenseNumber>\" + \n \"<ExportLicenseExpirationDate>\" + \n rdate + \n \"</ExportLicenseExpirationDate>\";\n }\n\n\n intHeader6 = \n intHeader6 + \"<Commodity>\" + \"<NumberOfPieces>\" + \n numberOfPieces + \"</NumberOfPieces>\" + \n \"<Description>\" + description + \n \"</Description>\" + \n \"<CountryOfManufacture>\" + \n countryOfManufacture + \n \"</CountryOfManufacture>\" + harCode + \n \"<Weight>\" + weight + \"</Weight>\" + \n \"<Quantity>\" + quantity + \"</Quantity> \" + \n \"<QuantityUnits>\" + quantityUnits + \n \"</QuantityUnits>\" + uPrice + \n \"<CustomsValue>\" + customsValue + \n \"</CustomsValue>\" + exportLicense + \n \"</Commodity>\";\n\n\n }\n\n if (intPayerType.equalsIgnoreCase(\"THIRDPARTY\")) {\n intHeader1 = \n \"<DutiesPayor><AccountNumber>\" + intAccNumber + \n \"</AccountNumber>\" + \"<CountryCode>\" + \n intcountryCode + \"</CountryCode>\" + \n \"</DutiesPayor>\";\n intHeader2 = \n \"<DutiesPayment>\" + intHeader1 + \"<PayorType>\" + \n intPayerType + \"</PayorType>\" + \n \"</DutiesPayment>\";\n payorCountryCodeWS = intcountryCode;\n } else {\n intHeader2 = \n \"<DutiesPayment>\" + \"<PayorType>\" + intPayerType + \n \"</PayorType>\" + \"</DutiesPayment>\";\n }\n\n /*\n try{\n String ifc = intFreightCharge.substring(0,1);\n }catch(Exception e)\n {\n intFreightCharge = \"0.0\";\n }\n try{\n String iic = intInsuranceCharge.substring(0,1);\n }catch(Exception e)\n {\n intInsuranceCharge = \"0.0\";\n }\n try{\n String itmc = intTaxesOrMiscellaneousCharge.substring(0,1);\n }catch(Exception e)\n {\n intTaxesOrMiscellaneousCharge = \"0.0\";\n }\n */\n\n if (intPurpose.equalsIgnoreCase(\"\")) { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"</CommercialInvoice>\";\n } else { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"<Purpose>\" + intPurpose + \"</Purpose>\" + \n \"</CommercialInvoice>\";\n }\n /*\n intHeader4 = \"<Commodity>\"+\n \"<NumberOfPieces>1</NumberOfPieces> \"+\n \"<Description>Computer Keyboards</Description> \"+\n \"<CountryOfManufacture>US</CountryOfManufacture> \"+\n \"<HarmonizedCode>00</HarmonizedCode> \"+\n \"<Weight>5.0</Weight> \"+\n \"<Quantity>1</Quantity> \"+\n \"<QuantityUnits>PCS</QuantityUnits> \"+\n \"<UnitPrice>25.000000</UnitPrice> \"+\n \"<CustomsValue>25.000000</CustomsValue> \"+\n \"<ExportLicenseNumber>25</ExportLicenseNumber> \"+\n \"<ExportLicenseExpirationDate>25</ExportLicenseExpirationDate> \"+\n \"</Commodity>\";\n\n intHeader4 = \"\"; */\n\n if (!intSenderTINOrDUNS.equalsIgnoreCase(\"\")) {\n intHeader5 = \n \"<SED>\" + \"<SenderTINOrDUNS>\" + intSenderTINOrDUNS + \n \"</SenderTINOrDUNS>\" + \n \"<SenderTINOrDUNSType>\" + \n intSenderTINOrDUNSType + \n \"</SenderTINOrDUNSType>\" + \"</SED>\";\n } else {\n intHeader5 = \"\";\n }\n\n internationalTags = \n \"<International>\" + intHeader2 + \"<TermsOfSale>\" + \n intTermsOfSale + \"</TermsOfSale>\" + \n \"<TotalCustomsValue>\" + intTotalCustomsValue + \n \"</TotalCustomsValue>\" + intHeader3 + \n intHeader6 + intHeader5 + \"</International>\";\n\n\n } else {\n internationalTags = \"\";\n }\n\n\n // end of addition on 09/06/08\n\n // end of addition on 09/06/08\n\n // Start on Aug-01-2011\n try {\n shipToContactPersonName = \n nullStrToSpc(aascShipmentHeaderInfo.getContactName());\n shipToContactPersonName = \n encode(shipToContactPersonName); //Added by dedeepya on 28/05/08\n if (shipToContactPersonName.equalsIgnoreCase(\"\")) {\n tagshipToContactPersonName = \"\";\n } else {\n tagshipToContactPersonName = \n \"<PersonName>\" + shipToContactPersonName + \n \"</PersonName>\";\n }\n } catch (Exception e) {\n e.printStackTrace();\n tagshipToContactPersonName = \"\";\n }\n // End on Aug-01-2011\n\n\n \n chkReturnlabel = \"NONRETURN\";\n \n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel);\n sendfedexRequest(aascShipmentOrderInfo, aascShipMethodInfo, \n chkReturnlabel, aascProfileOptionsInfo, \n aascIntlInfo, cloudLabelPath);\n responseStatus = \n Integer.parseInt((String)hashMap.get(\"ResponseStatus\"));\n \n\n if (returnShipment.equals(\"PRINTRETURNLABEL\") && \n responseStatus == 150) {\n \n \n shipmentRequestHdr = \"\";\n\n\n \n\n chkReturnlabel = \"PRINTRETURNLABEL\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n\n //processReturnShipment();\n //Shiva modified code for FedEx Return Shipment\n \n rtnShipMethod = \n rtnShipMethod.substring(0, rtnShipMethod.indexOf(\"@@\"));\n // System.out.println(\"rtnShipMethod.indexOf(\\\"@@\\\")\"+rtnShipMethod.indexOf(\"@@\")+\"rtnShipMethod:::\"+rtnShipMethod); \n rtnShipMethod = \n aascShipMethodInfo.getShipMethodFromAlt(rtnShipMethod);\n \n carrierCode = \n aascShipMethodInfo.getCarrierName(rtnShipMethod);\n \n rtnShipMethod = \n aascShipMethodInfo.getConnectShipScsTag(rtnShipMethod);\n rtnACNumber = \n nullStrToSpc(aascPackageBean.getRtnACNumber().trim());\n\n \n rntHeader1 = \n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\" + \n \"<FDXShipRequest xmlns:api=\\\"http://www.fedex.com/fsmapi\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"FDXShipRequest.xsd\\\">\" + \n \"<RequestHeader>\" + \n \"<CustomerTransactionIdentifier>\" + \n customerTransactionIdentifier + \n \"</CustomerTransactionIdentifier>\" + \n \"<AccountNumber>\" + senderAccountNumber + \n \"</AccountNumber>\" + \"<MeterNumber>\" + \n fedExTestMeterNumber + \"</MeterNumber>\" + \n \"<CarrierCode>\" + carrierCode + \n \"</CarrierCode>\" + \"</RequestHeader>\" + \n \"<ShipDate>\" + shipDate + \"</ShipDate>\" + \n \"<ShipTime>\" + time + \"</ShipTime>\" + \n \"<DropoffType>\" + rtnDropOfType + \n \"</DropoffType>\" + \"<Service>\" + \n rtnShipMethod + \"</Service>\" + \"<Packaging>\" + \n rtnPackageList + \n \"</Packaging>\"; // added for package options\n rntHeader6 = \n \"<Origin>\" + \"<Contact>\" + rtnShipTagFromContact + \n header8 + \"<PhoneNumber>\" + rtnShipFromPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipFromLine1 + \"</Line1>\" + \n fromLine2Tag + \"<City>\" + rtnShipFromCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipFromSate + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipFromZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipFromCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Origin>\" + \"<Destination>\" + \n \"<Contact>\" + rtnShipTagToContact + \n \"<PhoneNumber>\" + rtnShipToPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipToLine1 + \"</Line1>\" + \n toLine2Tag + \"<City>\" + rtnShipToCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipToState + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipToZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipToCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Destination>\" + \"<Payment>\" + \n \"<PayorType>\" + rtnPayMethod + \"</PayorType>\";\n\n header4 = \"\";\n rntHeader5 = \n \"<ReturnShipmentIndicator>PRINTRETURNLABEL</ReturnShipmentIndicator>\"; // added for package options\n\n header2 = \n \"<WeightUnits>\" + pkgWtUom + \"</WeightUnits>\" + \n \"<Weight>\" + pkgWtVal + \"</Weight>\";\n\n listTag = \"<ListRate>true</ListRate>\";\n\n // added for package options\n header3 = \n \"<CurrencyCode>\" + currencyCode + \"</CurrencyCode>\";\n //Shiva modified code for FedEx Return Shipment\n sendfedexRequest(aascShipmentOrderInfo, \n aascShipMethodInfo, chkReturnlabel, \n aascProfileOptionsInfo, aascIntlInfo, \n cloudLabelPath);\n }\n\n\n \n shipmentDeclaredValueStr = \n String.valueOf(shipmentDeclaredValue);\n \n int i = shipmentDeclaredValueStr.indexOf(\".\");\n\n if (i < 1) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \".00\";\n \n } else if ((shipmentDeclaredValueStr.length() - index) > \n 2) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr.substring(0, \n index + 3);\n \n } else {\n while (shipmentDeclaredValueStr.length() != (i + 3)) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \"0\";\n\n }\n }\n \n\n\n } //iterator\n\n\n packageInfoIterator = shipPackageInfo.listIterator();\n\n int ctr1 = 0;\n\n while (packageInfoIterator.hasNext()) {\n ctr1 = ctr1 + 1;\n\n AascShipmentPackageInfo aascPackageBean1 = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n totalShipmentCost = \n totalShipmentCost + aascPackageBean1.getPkgCost();\n\n totalFreightCost = \n totalFreightCost + aascPackageBean1.getTotalDiscount();\n\n surCharges = surCharges + aascPackageBean1.getSurCharges();\n \n }\n \n\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n\n\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n surCharges = (Math.floor(surCharges * 100)) / 100;\n aascShipmentHeaderInfo.setTotalSurcharge(surCharges);\n\n } else {\n responseStatus = 151;\n aascShipmentHeaderInfo.setMainError(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n logger.info(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n }\n } catch (Exception exception) {\n aascShipmentHeaderInfo.setMainError(\"null values or empty strings passed in request\");\n logger.severe(\"Exception::\"+exception.getMessage());\n }\n logger.info(\"Exit from processShipment()\");\n return responseStatus;\n }", "public PaymentRequest setShipping(Shipping shipping) {\r\n this.shipping = shipping;\r\n return this;\r\n }", "@PostMapping(path = \"/\")\n public String addPlacementData(@RequestBody PlacementDto placementDto) {\n String username = userAuthenticationService.getUserName();\n return placementService.addPlacementData(placementDto, username);\n }", "public Ships(ShipTypes type) {\n this.type = type;\n }", "@Override\r\n\tpublic void update(Shipper shipper) {\n\t\tshipperDao.update(shipper);\r\n\t}", "void setShipping(BigDecimal shipping);", "public interface ShipmentRepository {\n /**\n * Return shipment for the specified order.\n *\n * @param orderId the order identifier\n *\n * @return the shipment for the specified order;\n * {@code null} if the shipment doesn't exist\n */\n Shipment getShipment(String orderId);\n\n /**\n * Save shipment details into the repository.\n *\n * @param shipment the shipment to save\n */\n void saveShipment(Shipment shipment);\n}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public void setShippingRequest(CMSShippingRequest shippingRequest) {\n\t\tsetAddressLine1(shippingRequest.getAddress());\n\t\tsetAddressLine2(shippingRequest.getAddress2());\n\t\tsetCity(shippingRequest.getCity());\n\t\tsetState(shippingRequest.getState());\n\t\tsetZipCode(shippingRequest.getZipCode());\n\t\tsetPhone1(shippingRequest.getPhone());\n\t}", "public void addCargoShip(Scanner sc){\n CargoShip cShip = new CargoShip(sc, portMap, shipMap, dockMap);\n if(hashMap.containsKey(cShip.getParent())){\n if(hashMap.get(cShip.getParent()).getIndex()>=10000 && hashMap.get(cShip.getParent()).getIndex() < 20000){\n currentPort = (SeaPort) hashMap.get(cShip.getParent());\n currentPort.setShips(cShip);\n currentPort.setAllShips(cShip);\n }\n else{\n currentDock = (Dock) hashMap.get(cShip.getParent());\n currentDock.addShip(cShip);\n currentPort = (SeaPort) hashMap.get(currentDock.getParent());\n currentPort.setAllShips(cShip);\n }\n \n \n }\n hashMap.put(cShip.getIndex(), cShip);\n shipMap.put(cShip.getIndex(), cShip);\n everything.add(cShip);\n }", "public void actionPerformed(ActionEvent event)\n {\n if (add)\n {\n if (validInput())\n {\n Ship newShip = map.addUserShip(\"Lobsterboat\",shipName,\n xcoord,ycoord,speed,direction);\n main.setUserShip(newShip);\n map.repaint();\n main.closeStartWindow();\n }\n }\n else\n {\n main.closeStartWindow();\n }\n }" ]
[ "0.6750663", "0.66599923", "0.63919216", "0.62001014", "0.6100613", "0.60893327", "0.60859704", "0.5972811", "0.5968861", "0.5894111", "0.58304584", "0.5826867", "0.58227533", "0.577377", "0.57031035", "0.56881875", "0.5671774", "0.56502444", "0.5627299", "0.5568342", "0.55277973", "0.55257225", "0.551752", "0.55088", "0.54911774", "0.54823196", "0.5476033", "0.54367054", "0.54291207", "0.53679657", "0.53286195", "0.5289897", "0.5285818", "0.52767897", "0.5274579", "0.52675855", "0.5240223", "0.5236255", "0.52251077", "0.52117735", "0.52064824", "0.52037454", "0.5202682", "0.5196847", "0.5189171", "0.5174574", "0.51536644", "0.5141375", "0.5136619", "0.5136065", "0.51244736", "0.5120789", "0.5106048", "0.5105519", "0.51004905", "0.50978535", "0.50956273", "0.50947744", "0.50883794", "0.50872624", "0.50865155", "0.50721246", "0.5066999", "0.504665", "0.5043548", "0.504213", "0.5029653", "0.50221664", "0.50115216", "0.5009348", "0.5003055", "0.50005585", "0.49980178", "0.4994932", "0.498527", "0.4980919", "0.4966216", "0.49653998", "0.4955694", "0.4940548", "0.4939518", "0.49357504", "0.49263188", "0.49234787", "0.49188262", "0.49132904", "0.49100885", "0.49088928", "0.49077752", "0.48953113", "0.4893943", "0.4893398", "0.48854607", "0.4884369", "0.48816296", "0.4878291", "0.4878291", "0.48723787", "0.48614126", "0.48508683" ]
0.7283163
0
This method removes a Shipment from the System. It uses data class to remove Shipment.
public void removeShipment(){ String message = "Choose one of the shipment to remove"; if (printData.checkAndPrintShipment(message,data.getBranchEmployee(ID).getBranchID())){ subChoice = GetChoiceFromUser.getSubChoice(data.numberOfShipment()); if (subChoice!=0){ data.getBranch(data.getShipment(subChoice-1).getBranchID()).removeShipment(data.getShipment(subChoice-1)); data.removeShipment(data.getShipment(subChoice-1),data.getShipment(subChoice-1).getReceiver()); System.out.println("Your Shipment has removed Successfully!"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ReceivingSpace planToRemoveGoodsListWithShippingSpace(ReceivingSpace receivingSpace, String shippingSpaceId, Map<String,Object> options)throws Exception;", "public void deleteSpaceship(Spaceship spaceship) throws SQLException, ExceptionsDatabase {\r\n connection();\r\n String updateRunway = \"update runway set status='FREE' where spaceship='\" + spaceship.getName() + \"'\";\r\n String delete = \"delete from spaceship where name='\" + spaceship.getName() + \"'\";\r\n Statement st = conexion.createStatement();\r\n try {\r\n conexion.setAutoCommit(false);\r\n st.executeUpdate(updateRunway);\r\n st.executeUpdate(delete);\r\n conexion.commit();\r\n } catch (SQLException ex) {\r\n conexion.rollback();\r\n throw new ExceptionsDatabase(ExceptionsDatabase.MULTIPLE_ACCTION_FAILED);\r\n } finally {\r\n st.close();\r\n conexion.setAutoCommit(true);\r\n }\r\n disconnect();\r\n }", "@POST(\"/DeleteShip\")\n\tint deleteShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "static void RemoveObserver(Ship a_ship){}", "int deleteByPrimaryKey(Byte shippingId);", "public void delete(Long id) {\n log.debug(\"Request to delete Shipping : {}\", id);\n shippingRepository.delete(id);\n }", "private void removeShip(){\n mainPanel.remove(this);\n gbc.gridheight=1;\n gbc.gridwidth=1;\n int placeX = getMy_x();\n int placeY = getMy_y();\n for(int i=0;i<getMy_length();i++){ //put free spaces by the length of the ship.\n if(getMy_dir().equals(\"Horizontal\")){\n placeX = getMy_x()+i;\n }\n if(getMy_dir().equals(\"Vertical\")){\n placeY = getMy_y()+i;\n }\n gbc.gridx = placeX;\n gbc.gridy = placeY;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(placeX,placeY));\n freeSpace.setPreferredSize(new Dimension(58,58));\n mainPanel.add(freeSpace,gbc); //add free space to the board.\n }\n mainPanel.revalidate();\n mainPanel.repaint();\n }", "public void moveSpaceShipDown() {\n\t\tSpaceship sp = getTheSpaceship();\n\t\tsp.moveDown();\n\t}", "public void unassignEnergyToShip(AbstractObject source) {\n\t\tenergyToShip.remove(source.getId());\n\t}", "@Override\n\tpublic int deleteFromLicenseGoodsShipByPrimaryKey(Integer id) {\n\t\treturn licenseGoodsShipMapper.deleteByPrimaryKey(id);\n\t}", "public void removeShippings( EAIMMCtxtIfc theCtxt, com.dosmil_e.mall.core.ifc.MallShippingIfc theShippings) throws EAIException;", "public void setShipmentCode(String shipmentCode) {\n this.shipmentCode = shipmentCode == null ? null : shipmentCode.trim();\n }", "public void delete(Shipping3VO vo) {\r\n\t\tentityManager.remove(vo);\r\n\t}", "void saveShipment(Shipment shipment);", "public boolean removeShip(int shipId) {\r\n\t\tif (!ships.containsKey(shipId))\r\n\t\t\treturn false;\r\n\t\tships.get(shipId).destroy();\r\n\t\tships.remove(shipId);\t\r\n\t\t--remainingShips;\r\n\t\treturn true;\r\n\t}", "public void removeFightsystem( Fightsystem fightsystem )\r\n {\n\r\n }", "public void removeFightsystem( Long fightsystemId )\r\n {\n\r\n }", "public void addOrRemoveScreenedShip(Spaceship aShip){\n int found = -1;\r\n for (int i = 0; i < screenedShips.size(); i++){\r\n if (aShip.getId() == screenedShips.get(i)){\r\n found = i;\r\n }\r\n }\r\n if (found > -1){ // ta bort den\r\n screenedShips.remove(found);\r\n }else{ // annars l�gg till den\r\n screenedShips.add(aShip.getId());\r\n }\r\n }", "void removeOrderItem(OrderItem target);", "public void removeByDataPackId(long dataPackId);", "public void moveSpaceShipUp() {\n\t\tSpaceship sp = getTheSpaceship();\n\t\tsp.moveUp();\n\t}", "public void remove() {\n int size = itinerary.size();\n if (size != 1) {\n \n // Removes last Flight in this Itinerary.\n Flight removedFlight = this.itinerary.remove(size - 1);\n \n // Gets the new last Flight in this Itinerary.\n Flight flight = this.itinerary.get(size - 2);\n \n // Updates all the relevant fields in this Itinerary.\n this.price -= removedFlight.getCost();\n this.arrivalDateTime = flight.getArrivalDateTime();\n this.destination = flight.getDestination();\n this.travelTime = arrivalDateTime.timeDiff(departDateTime);\n this.places.remove(size);\n }\n }", "@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}", "void btnRemoveDelivery(Delivery delivery);", "@Override\r\n\tpublic void delete(int id) {\n\t\tshipperDao.delete(id);\r\n\t}", "@Override\r\n\tpublic DonationPackage removePackageFromContainer() throws EmptyStackException {\n\t\tif(ContainerEmpty() == false) {\r\n\t\t\treturn (DonationPackage) containerLine.pop();\r\n\t\t} else{\r\n\t\t\tthrow new EmptyStackException();\r\n\t\t}\r\n\t}", "public void shipDestroyed() {\r\n\t\tplaceDebris(ship.getX(), ship.getY());\r\n\r\n\t\t// Null out the ship\r\n\t\tship = null;\r\n\r\n\t\topenShipSound();\r\n\r\n\t\t// Decrement lives\r\n\t\tlives--;\r\n\t\tdisplay.setLives(lives);\r\n\r\n\t\t// Since the ship was destroyed, schedule a transition\r\n\t\tscheduleTransition(END_DELAY);\r\n\t}", "public String getShipmentCode() {\n return shipmentCode;\n }", "public void remove() {\n\n }", "private void removeElement(PathwayElement affectedData)\n \t{\n \n \t}", "public void processRemoveStation() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Remove Station\", \"Are you sure you want to remove this station?\");\n \n // DO REMOVE LINE \n dataManager.removeStation(); \n }", "void removeCoordinateSystem(CoordinateSystem cs);", "public void decSpeed()\n\t{\n\t\t//only decrease 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)).decSpeed();\n\t\t\tSystem.out.println(\"Speed -10\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}", "public void removeSystemUser(DietTreatmentSystemUserBO systemUser)\n {\n _dietTreatment.removeSystemUsers(systemUser);\n\n }", "public void enterShipment(){\n Shipment shipment = new Shipment();\n shipment.setShipmentID(data.numberOfShipment());\n shipment.setReceiver(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Receiver FirstName: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Receiver Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setSender(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Sender First Name: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Sender Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setCurrentStatus(getStatus());\n shipment.setTrackingNumber(getUniqueTrackingNumber());\n shipment.setBranchID(data.getBranchEmployee(ID).getBranchID());\n data.getBranch(shipment.getBranchID()).addShipment(shipment);\n data.addShipment(shipment,shipment.getReceiver());\n System.out.printf(\"Your Shipment has added with tracking Number %d !\\n\",shipment.getTrackingNumber());\n }", "@Override\n\tpublic void remove(Savable savable) {\n\t\tif (savable instanceof Contact) {\n\t\t\tContact contact = (Contact)savable;\n\t\t\tthis.contacts.remove(contact.getId());\n\t\t}\n\t}", "public void removeOrder(){\n foods.clear();\n price = 0;\n }", "void remove(Order o);", "Shipment_Package getShipment_Package();", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "@JsonIgnore\r\n\tpublic ArrayList<ShippingTemplate> deleteShippingTemplate(String shippingTemplateId) {\r\n\t\tString results = EtsyService.deleteService(\"/shipping/templates/\"+shippingTemplateId);\r\n\t\treturn readResults(results);\r\n\t}", "public void decSpeed()\n\t{\n\t\t//only decrease if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).decSpeed();\n\t\t\t\tSystem.out.println(\"Speed decreased by 1\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "void removeStatement(Statement statement) throws ModelRuntimeException;", "@Override\n\tpublic int elimina(Solicitud bean) throws Exception {\n\t\treturn 0;\n\t}", "public void unassignAsteroidToShip(Asteroid asteroid) {\n\t\tasteroidToShip.remove(asteroid.getId());\n\t}", "void remove(Order order);", "private void shippedOrder() {\n FirebaseDatabase.getInstance().getReference(Common.ORDER_NEED_SHIP_TABLE)\n .child(Common.currentShipper.getPhone())\n .child(Common.currentKey)\n .removeValue()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //update status on request table\n Map<String,Object>update_status=new HashMap<>();\n update_status.put(\"status\",\"03\");\n FirebaseDatabase.getInstance().getReference(\"Requests\")\n .child(Common.currentKey)//which key\n .updateChildren(update_status)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //delete from shipping order\n FirebaseDatabase.getInstance().getReference(Common.SHIPPER_INFO_TABLE)\n .child(Common.currentKey)//parent node of key/\n .removeValue()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(TrackingOrder.this,\"Shipped\",Toast.LENGTH_SHORT).show();\n finish();\n }\n });\n }\n });\n }\n });\n }", "public void deleteRequest(Address pickupOrDelivery){\n Request requestToRemove = planningRequest.getRequestByAddress(pickupOrDelivery);\n ArrayList<Address> AddressOfRequest= new ArrayList<>();\n AddressOfRequest.add(requestToRemove.getPickupAddress());\n AddressOfRequest.add(requestToRemove.getDeliveryAddress());\n this.planningRequest.removeRequest(requestToRemove);\n if(!this.planningRequest.isEmpty()) {\n for (Address a : AddressOfRequest) {\n Path pathToRemove1 = this.tour.findPathDestination(a);\n Path pathToRemove2 = this.tour.findPathOrigin(a);\n try {\n Path newPath = this.findShortestPath(pathToRemove1.getDeparture(), pathToRemove2.getArrival());\n this.tour.replaceOldPaths(pathToRemove1, pathToRemove2, newPath);\n }catch (Exception e){\n //Do nothing here, this exception will never occur as find shortest path will only throw an\n //Exception if the the destination point is unreachable from the departure point\n //Which can never be true because if we are here it means that such a path exists\n //The proof is left as an exercise to the reader :)\n }\n }\n this.setChanged();\n notifyObservers();\n }else{\n this.tour.reset();\n this.setChanged();\n notifyObservers(\"We have erased all requests in the map\");\n }\n\n }", "Shipment createShipment();", "public void removeFromOrder(String dishToRemove){\n Order.remove(dishToRemove);\n }", "public void processReturnShipment() {\n \n }", "public com.jspgou.cms.entity.Shipping getShipping () {\r\n\t\treturn shipping;\r\n\t}", "@Override\n protected void executeRemove(final String requestId, DSRequest request, final DSResponse response)\n {\n JavaScriptObject data = request.getData();\n final ListGridRecord rec = new ListGridRecord(data);\n ContactDTO testRec = new ContactDTO();\n // copyValues(rec, testRec);\n testRec.setId(rec.getAttributeAsInt(contactIdField.getName()));\n service.remove(testRec, new AsyncCallback<Void>()\n {\n @Override\n public void onFailure(Throwable caught)\n {\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n SC.say(\"Contact Delete\", \"Contact has not been deleted!\");\n }\n\n @Override\n public void onSuccess(Void result)\n {\n ListGridRecord[] list = new ListGridRecord[1];\n // We do not receive removed record from server.\n // Return record from request.\n list[0] = rec;\n response.setData(list);\n processResponse(requestId, response);\n SC.say(\"Contact Delete\", \"Contact has been deleted!\");\n }\n });\n }", "void remove(Team team);", "public void removeWeapon(int weaponPosition){\n //Set the weapon entry to null and\n //remove the index from the entry tracker\n weapons.set(weaponPosition,new Pair<>(NO_WEAPON_ID, (short) 0));\n weaponEntryTracker.remove((Integer) weaponPosition);\n switch(weaponPosition) {\n case 1:\n System.out.println(\"Position is 1\");\n setCurrentWeapon(getWeapons().get(0));\n break;\n case 2:\n System.out.println(\"Position is 2\");\n if (getWeapons().get(1).getKey() != NO_WEAPON_ID) {\n System.out.println(\"Weapon at 1\");\n setCurrentWeapon(getWeapons().get(1));\n } else {\n System.out.println(\"Weapon at 2\");\n setCurrentWeapon(getWeapons().get(0));\n }\n break;\n }\n }", "public ShipSystem getSystem() {\n return system;\n }", "public GetShipmentResponse getShipment(GetShipmentRequest request) \n throws MWSMerchantFulfillmentServiceException {\n return newResponse(GetShipmentResponse.class);\n }", "@POST(\"/UpdateShip\")\n\tShip updateShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "@Test\n\tpublic void removeFromBackend()\n\t{\n\t\tData d=new Data();\n\t\td.set(24,-1);\n\t\tassertEquals(d.boardData[24].intValue(),-1);\n\n\t}", "public void remove(Order entity) {\n\t\tsuper.internalRemove(entity);\n\t}", "public Ship loadShip() {\n DbResponse d = db.select(DbTables.SHIP);\n Ship ship = null;\n\n try {\n if (d.r != null) {\n ResultSet rs = d.r;\n ship = new Ship(ShipType.values()[rs.getInt(\"ship_type\")], rs.getInt(\"fuel\"));\n ship.setWeaponSlots(rs.getInt(\"weapon\"));\n ship.setGadgetSlots(rs.getInt(\"gadget\"));\n ship.setShieldSlots(rs.getInt(\"shield\"));\n d.r.close();\n d.s.close();\n d.c.close();\n }\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n\n return ship;\n }", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "public String getShippingId() {\n return shippingId;\n }", "public void removeByequip_id(long equip_id);", "@FXML\n\tpublic void removeOrder() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == false) && (isPreparable == true) && (isPrepared == false) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"RemoveOrderStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else if ((isSeen == true) && (isPreparable == false) && (isPrepared == false) && (isDelivered == false)) {\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tremoveErrorLabel.setText(\"The order can't be removed!\");\n\t\t}\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void removePayment(PaymentMethod m){\n if(payment.remove(m)){\n totalPaid-=m.getAmount();\n }\n }", "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "public Object remove();", "public String getShipName() {\n return shipName;\n }", "public void removeByProductType(String productType);", "public void removeFromLocation() {\n if (getAssignedLocation() != location) {\n this.location.fireEmployee(this);\n this.location = null;\n //bidirectional relationship!\n }\n System.out.println(\"We are firing an employee! \" + getName());\n }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public final void remove () {\r\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "void removeCustomer(Customer customer);", "public void removePaymentGroup(String pPaymentGroupName);", "public void shootShip(Cell cell) {\n// int shipIndex = cell.getShipIndex();\n// if (shipIndex == -1) return;\n//\n// System.out.println(shipIndex);\n// if(shipCellMap.get(shipIndex)!=null)\n// \tshipCellMap.get(shipIndex).remove(cell);\n//\n// if (shipCellMap.get(shipIndex)!=null && shipCellMap.get(shipIndex).size() == 0)\n// {\n// String infoString;\n// if (isEnemy)\n// {\n// infoString = \"An enemy ship is sinking! Enemy still has %d ships\";\n// } else\n// {\n// infoString = \"One of your ships is sinking! You still have %d ships\";\n// }\n// if(shipCellMap.get(shipIndex)!=null)\n// \tshipCellMap.remove(shipIndex);\n// removeOneShip();\n//\n// String alertString = String.format(infoString, shipNumOnBoard);\n// // The ship is sinking\n// Alert alert = new Alert(Alert.AlertType.INFORMATION,\n// alertString,\n// ButtonType.YES);\n// alert.showAndWait();\n//\n// }\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "public void removeOrderDetail(OrderDetail orderDetail)throws OrderDetailUnableSaveException;", "@Override\r\n\tString getShipType() {\r\n\t\treturn \"empty\"; \r\n\t}", "public void remove () {}", "public void remove(RepairRequest data) {\n int position = requests.indexOf(data);\n DataManager.getInstance().removeRepairRequest(data.getRequestId());\n notifyItemRemoved(position);\n }", "@Override\n\tpublic int dbRemove(MovementPK primarykey, String deleteStm)\tthrows DAOSysException\t{\n\t\tMovementPK pk = primarykey;\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStm = null;\n\t\tint result = 0;\n\n\t\ttry\t{\n\t\t\tconnection = connectToDB();\n\t\t\tpreparedStm = connection.prepareStatement(deleteStm);\n\t\t\tpreparedStm.setInt(1, pk.getMovementNumber());\n\t\t\tpreparedStm.setString(2, pk.getMovementName());\n\t\t\tresult = preparedStm.executeUpdate();\n\n\t\t\tif (result == 0)\t{\n\t\t\t\tthrow new SQLException(\n\t\t\t\t\t\t\"Failed to remove Movement <\"\n\t\t\t\t\t\t+ pk.toString() + \">.\");\n\t\t\t}\n\n\t\t}\tcatch (SQLException sex)\t{\n\t\t\tthrow new DAOSysException(\n\t\t\t\t\t\"dbRemove() SQL Exception <\" + pk.toString() + \"> \" + sex.getMessage());\n\n\t\t}\tfinally\t{\n\t\t\ttry\t{\n\t\t\t\treleaseAll(null, preparedStm, connection);\n\t\t\t} catch (SQLException sqlex)\t{\n\t\t\t\tthrow new DAOSysException(sqlex.toString());\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public void remove(Student s1){\r\n this.studentList.remove(s1);\r\n }", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void delete() {\n if (this.sourceInfo != null) {\n this.sourceInfo.removeSSRC(this);\n }\n }", "void remove(ReferenceData instance) throws DataException;" ]
[ "0.57523704", "0.57322043", "0.5725555", "0.5674175", "0.56398463", "0.55312115", "0.54914486", "0.5411409", "0.54006326", "0.53943086", "0.5352044", "0.5305933", "0.52453583", "0.52216136", "0.52176225", "0.5198723", "0.5188002", "0.51800823", "0.5161361", "0.5152594", "0.51281494", "0.50939995", "0.50891846", "0.50882554", "0.50852525", "0.50608504", "0.50578266", "0.50432384", "0.50272423", "0.5026309", "0.50233555", "0.5002221", "0.49769598", "0.49763098", "0.49749324", "0.49623", "0.49586993", "0.4935079", "0.49024436", "0.48989072", "0.48854455", "0.48854455", "0.48854455", "0.48826313", "0.487055", "0.48616064", "0.48578528", "0.48578528", "0.48573127", "0.48537076", "0.4850047", "0.48265472", "0.48253918", "0.48246878", "0.48142707", "0.48082733", "0.4805812", "0.48049402", "0.48047486", "0.48036534", "0.48011553", "0.4769581", "0.4764781", "0.47638226", "0.4762535", "0.4759973", "0.47517413", "0.47478735", "0.47440594", "0.4741738", "0.47410598", "0.47346288", "0.47346288", "0.47335204", "0.4732353", "0.47290477", "0.47271988", "0.47240028", "0.4717672", "0.47176462", "0.47176462", "0.47176462", "0.47176462", "0.47176462", "0.47153637", "0.47146058", "0.4708489", "0.4703732", "0.47034743", "0.47027165", "0.46979904", "0.4697808", "0.46967912", "0.4694354", "0.46941155", "0.46927857", "0.4684561", "0.4682797", "0.46825972", "0.4679565" ]
0.7470369
0
This method updates the status of Shipment. It uses data class to updates the status.
public void updateStatusOfShipment(String name,int id){ int k; for ( k = 0; k < 45; k++) System.out.print("-"); System.out.print("\n"+" "); System.out.println("Welcome Employee " + name + " to the Status Updating Panel."); for ( k = 0; k < 45; k++) System.out.print("-"); System.out.print("\n"); String message = "Choose one of the shipment to update Status"; if (printData.checkAndPrintShipment(message,id)){ subChoice = GetChoiceFromUser.getSubChoice(data.numberOfShipment()); if (subChoice!=0){ data.getShipment(subChoice-1).setCurrentStatus(getStatus()); System.out.println("Shipment Status has changed Successfully!"); } } else{ System.out.println("To change status please add a shipment."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int updateShipInfoById(int ship_time, int ship_status, int so_id) {\n\t\treturn orderInfoDao.updateShipInfoById(ship_time, ship_status, so_id);\r\n\t}", "public void setShipStatus(Boolean shipStatus) {\n this.shipStatus = shipStatus;\n }", "public void setStatus(OrderStatus updatedStatus) {\n this.status = updatedStatus;\n }", "ShipmentStatus createShipmentStatus();", "public Boolean getShipStatus() {\n return shipStatus;\n }", "@Override\r\n\tpublic void update(Shipper shipper) {\n\t\tshipperDao.update(shipper);\r\n\t}", "@Override\n\tpublic void update(OrderStatus t) throws Exception {\n\t\tsessionFactory.getCurrentSession().update(t);\n\t\t\n\t}", "public void enterShipment(){\n Shipment shipment = new Shipment();\n shipment.setShipmentID(data.numberOfShipment());\n shipment.setReceiver(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Receiver FirstName: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Receiver Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setSender(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Sender First Name: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Sender Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setCurrentStatus(getStatus());\n shipment.setTrackingNumber(getUniqueTrackingNumber());\n shipment.setBranchID(data.getBranchEmployee(ID).getBranchID());\n data.getBranch(shipment.getBranchID()).addShipment(shipment);\n data.addShipment(shipment,shipment.getReceiver());\n System.out.printf(\"Your Shipment has added with tracking Number %d !\\n\",shipment.getTrackingNumber());\n }", "Update withReturnShipping(ReturnShipping returnShipping);", "public void updateSpaceshipMaintenance(Spaceship spaceship) throws SQLException {\r\n connection();\r\n Statement st = conexion.createStatement();\r\n String updateSpaceship = \"update spaceship set status='LANDED' where name='\" + spaceship.getName() + \"'\";\r\n st.executeUpdate(updateSpaceship);\r\n st.close();\r\n disconnect();\r\n }", "public void setShipped(){\n this.shipped = new Date();\n }", "Transfer updateStatus(Long id, Payment.Status status);", "public void update(Spaceship ship) {\n Log.d(\"Powerstate\", \"ShieldPowerState\");\n ship.paint.setColor(Color.argb(255,47,247,250));\n ship.isHit = false;\n\n\n }", "@Override\n public void updateStatus(Status status) {\n this.status = status;\n }", "@Override\n\t\tprotected void postUpdate(EspStatusDTO t) throws SQLException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void update(AbstractShip ship,int updataType) {\n\t\t\n\t\tif(updataType==UPDATATYPE.INIT_UPDATA){\n\t\t\tif(mapCheck.initCheck(ship.locs)==false){\n\t\t\t\tthrow new ShipLocationException(\"Init location error\");\n\t\t\t}\n\n\t\t\tthis.ship=ship;\t\t\n\t\t\tfor(int i=0;i<ship.length;i++){\n\t\t\t\tmapGrid[ship.locs[i].locaX][ship.locs[i].locaY]=GRIDTYPE.LIVE_SHIP;\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(updataType==UPDATATYPE.HURT_UPDATA){\n\t\t\tif(mapCheck.hurtCheck(ship.hurtLoc)==false){\n\t\t\t\tthrow new ShipLocationException(\"Hurt location error\");\n\t\t\t}\n\t\t\tthis.ship=ship;\n\t\t\t\n\t\t\tif(mapGrid[ship.hurtLoc.locaX][ship.hurtLoc.locaY]==GRIDTYPE.NO_SHIP){\n\t\t\t\tmapGrid[ship.hurtLoc.locaX][ship.hurtLoc.locaY]=GRIDTYPE.HURT_GRID;\n\t\t\t\tSystem.out.println(\"no ship hurt\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(mapGrid[ship.hurtLoc.locaX][ship.hurtLoc.locaY]==GRIDTYPE.LIVE_SHIP){\n\t\t\t\tmapGrid[ship.hurtLoc.locaX][ship.hurtLoc.locaY]=GRIDTYPE.DEAD_SHIP;\n\t\t\t\tSystem.out.println(\"ship hurt\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"something in mapmodel change\");\n\t}", "void saveShipment(Shipment shipment);", "@Override\n\tpublic AssignBooking updateStatus(int id, AssignBooking deatchedPojo) {\n\t\tAssignBooking existingBooking=aDao.findById(id).get();\n\t\tif(existingBooking!=null) {\n\t\t\texistingBooking.setBookingId(deatchedPojo.getBookingId());\n\t\t\texistingBooking.setCustomerId(deatchedPojo.getCustomerId());\n\t\t\texistingBooking.setJobId(deatchedPojo.getJobId());\n\t\t\texistingBooking.setWorkerId(deatchedPojo.getWorkerId());\n\t\t\texistingBooking.setBookingStatus(deatchedPojo.getBookingStatus());\n\t\t\tBooking booking=service.updateBooking(existingBooking.getBookingId());\n\t\t\tif(booking!=null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"updated\");\n\t\t\t}\n\t\t\treturn aDao.save(existingBooking);\n\t\t}\n\t\treturn null;\n\t}", "int updateByPrimaryKey(Shipping record);", "public abstract void updateStatus() throws Throwable;", "@Override\n\tpublic void updateStatus(String order_Code,String status) {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tString hql = \"UPDATE mOrders set O_Status_Code = :status \" + \n\t\t \"WHERE O_Code = :order_Code\";\n\t\t\tQuery query = getSession().createQuery(hql);\n\t\t\tquery.setParameter(\"status\", status);\n\t\t\tquery.setParameter(\"order_Code\", order_Code);\n\t\t\tint result = query.executeUpdate();\n\t\t\tcommit();\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "public void setDeliveryStatus(int Id,String status,boolean pending,boolean completed);", "public void updateStatus() {\n var taskStatuses = new ArrayList<OptimizationTaskStatus>();\n\n synchronized (tasks) {\n for (var task : tasks.values()) {\n taskStatuses.add(task.getStatus());\n }\n }\n\n wrapper.setStatus(JsonSerializer.toJson(new OptimizationToolStatus(taskStatuses)));\n }", "Order setDeliveredStatus(Order order, User user, Date deliveredTime);", "public void processReturnShipment() {\n \n }", "@Override\n public void notifyUpdate() {\n Update();\n //Invia all'activity di questo frammento il totale speso per aggiornare la sezione di controllo del budget\n onSendTotSpent.ReceiveTotSpent(contactGiftAdapter.totSpent());\n }", "public void setShipDate(Date shipDate) {\n _shipDate = shipDate;\n }", "@Override\r\n\tpublic String updateinvoicing(String toAllocate, String shipmentNumber) {\n\t\tSystem.out.println(\"airway\"+shipmentNumber);\r\n\t\tint count = senderdata_InvoicingRepository.updateinvoicingairway(shipmentNumber,toAllocate.split(\",\"));\r\n\t\tSystem.out.println(\"updated\"+count);\r\n\t\t//senderdata_InvoicingRepository.selectinvoicing(toAllocate.split(\",\"));\r\n\t\treturn \"Updated Succesfully\";\r\n\t}", "public int updateFundingStatusByFundingNo(String funding_status, int funding_no) throws Exception;", "@Override\n\tpublic Item update() {\n\t\t\n\t\treadAll();\n\t\n\t\tLOGGER.info(\"State the shoe name you wish to update\");\n\t\tString name = util.getString().toLowerCase();;\n\t\tLOGGER.info(\"State the size you wish to update\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Change price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Change amount in stock\");\n\t\tlong stock = util.getLong();\n\t\tLOGGER.info(\"\\n\");\n\t\treturn itemDAO.update(new Item(name,size,price,stock));\n\t\t\n\t\t\n\t\t\n\t}", "void updateOrderStatus(String orderNr, String status, Long businessId);", "public void setStatus(CMnServicePatch.RequestStatus st) {\n status = st;\n }", "@Override\n\tpublic void updateOrderStatus(String id) {\n\t\tQueryRunner qr= new QueryRunner(dataSource);\n\t\tString sql = \"update orders set status=3 where id=?\";\n\t\ttry {\n\t\t\tqr.update(sql, id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"更新订单状态失败\");\n\t\t}\n\t}", "public Response<Boolean> updateCustomerStatus(CustomerStatusReqDto requestDto) {\n\t\tResponse<Boolean> responseDto = new Response<>();\n\t\tOptional<Customer> getCustomer = customerRepo.findByCustomerId(requestDto.getCustomerId());\n\t\tif (!getCustomer.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\tCustomer updateStatus = getCustomer.get();\n\t\tupdateStatus.setCustomerStatus(requestDto.getCustomerStatus());\n\t\tupdateStatus.setModifiedBy(requestDto.getUserId());\n\t\tupdateStatus.setModifiedDate(new Date());\n\t\tcustomerRepo.save(updateStatus);\n\t\tOptional<User> user = userRepo.findByCustomer(updateStatus);\n\t\tif (!user.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\tUser userStatus = user.get();\n\t\tuserStatus.setUserStatus(requestDto.getCustomerStatus());\n\t\tuserStatus.setModifiedBy(requestDto.getUserId());\n\t\tuserStatus.setModifiedDate(new Date());\n\t\tuserRepo.save(userStatus);\n\t\tresponseDto.setError(false);\n\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_STATUS);\n\t\tresponseDto.setStatus(HttpServletResponse.SC_OK);\n\t\treturn responseDto;\n\t}", "public void updateStatus() {\n\n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n\n try {\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n rs = st.executeQuery(\"select * from account where a_id = \" + super.id);\n\n //updating the status\n if (rs.next()) {\n //premium seller\n if (rs.getString(3).equalsIgnoreCase(\"premium\")) {\n //update the item status\n i.setI_status(\"Valid\");\n\n } else {\n //regular seller\n if (rs.getString(3).equalsIgnoreCase(\"regular\")) {\n //checking price lower or higher than 100\n if (i.getI_price() <= 100) {\n //update status valid\n i.setI_status(\"Valid\");\n } else {\n //update status pending\n i.setI_status(\"Invalid\");\n }\n }\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n con.close();\n st.close();\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n }", "public boolean updateStaffStatus(int Id,String status);", "boolean updateOrderStatus(long orderId, Order.Status status) throws DaoProjectException;", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }", "public void setStatus(JobStatus status);", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "interface WithState {\n /**\n * Specifies the state property: If specified, the value must be Shipping, which tells the Import/Export\n * service that the package for the job has been shipped. The ReturnAddress and DeliveryPackage properties\n * must have been set either in this request or in a previous request, otherwise the request will fail. .\n *\n * @param state If specified, the value must be Shipping, which tells the Import/Export service that the\n * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been\n * set either in this request or in a previous request, otherwise the request will fail.\n * @return the next definition stage.\n */\n Update withState(String state);\n }", "@Override\n\tpublic int updateStatus(HashMap<String, Object> map) {\n\t\treturn paymentDao.updateStatus(map);\n\t}", "public void setSOrderStatus(String sOrderStatus) {\n this.sOrderStatus = sOrderStatus;\n }", "@Override\n\tpublic void changeStatus(Boolean status, Integer id, String userName) {\n\n\n\t\tloggerService\n\t\t\t\t.logServiceInfo(\"Start changeStatus Method with status == \"\n\t\t\t\t\t\t+ status + \" and id == \" + id\n\t\t\t\t\t\t+ \"user name \" + userName);\n\t\ttry {\n\t\t\tString query = \"update SupplierProduct model set model.status =\"\n\t\t\t\t\t+ status + \" where model.id=\" + id;\n\t\t\tbaseDao.executeDynamicQuery(query, SupplierProduct.class, true);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tloggerService.logServiceError(\"can't changeStatus \", e);\n\t\t}\n\n\t\tloggerService.logServiceInfo(\"End changeStatus Method \");\n\n\t\n\t\n\t}", "public int changePackageCourier(StoremanData data)\n {\n Courier courier = targetCourier(data);\n session.beginTransaction();\n \n Query q = session.createQuery(\"UPDATE StoremanData SET ID_courier = :c, DeliveredStatus =:s WHERE ID = :id\");\n q.setParameter(\"c\", courier.getId());\n q.setParameter(\"s\", DeliveryStatus.toDelivery.toString());\n q.setParameter(\"id\", data.getID());\n \n int result = q.executeUpdate(); //TODO: usunac inta albo zrobic return\n \n session.getTransaction().commit();\n return result;\n }", "@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"shipment_state_id\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdState getShipmentState() {\n return shipmentState;\n }", "@Override\n\tpublic int update(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "public void Update(StokContract entity) {\n\t\t\n\t}", "@Override\n\tpublic void updateOrder(StageOrder stageOrder,\n\t\t\tMessageService messageService, UserInfo userinfo) {\n\t\tstageOrderDao.update(stageOrder);\n\t\tmessageService.sendMessage(messageService,\"您的一件积分兑换商品已经发货!\", userinfo.getUserinfoId(), stageOrder.getUser().getUserinfoId(),\n\t\t\t\t\"stageOrderAction_opensale.action\", null, null);\n\t}", "@Override\r\n\tpublic void update(snstatus sns) {\n\t\tsuper.getHibernateTemplate().update(sns); \r\n\t}", "public void setOrderStatus(java.lang.String param){\n \n this.localOrderStatus=param;\n \n\n }", "public int processShipment(AascShipmentOrderInfo aascShipmentOrderInfo, \n AascShipMethodInfo aascShipMethodInfo, \n AascIntlInfo aascIntlInfo, \n AascProfileOptionsBean aascProfileOptionsInfo, \n String fedExCarrierMode, String fedExKey, \n String fedExPassword, \n String cloudLabelPath) { \n logger.info(\"Entered processShipment()\" + fedExCarrierMode);\n String intFlag = \"\";\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n fedExWSChkReturnlabelstr = \"PRINTRETURNLABEL\";\n } else {\n fedExWSChkReturnlabelstr = \"NONRETURN\";\n }\n\n\n this.fedExCarrierMode = fedExCarrierMode;\n this.fedExKey = fedExKey;\n this.fedExPassword = fedExPassword;\n\n try {\n \n outputFile = cloudLabelPath;\n try {\n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n } catch (Exception e) {\n intFlag = \"\";\n }\n\n shipmentRequest = \"\"; // String that holds shipmentRequest \n aascShipmentHeaderInfo = \n aascShipmentOrderInfo.getShipmentHeaderInfo(); // returns header info bean object\n shipPackageInfo = \n aascShipmentOrderInfo.getShipmentPackageInfo(); // returns the linkedlist contains the package info bean objects \n\n int size = shipPackageInfo.size();\n\n Iterator packageIterator = shipPackageInfo.iterator();\n\n while (packageIterator.hasNext()) {\n AascShipmentPackageInfo shipPackageInfo = \n (AascShipmentPackageInfo)packageIterator.next();\n if (\"PRINTRETURNLABEL\".equalsIgnoreCase(shipPackageInfo.getReturnShipment())) {\n size++;\n }\n\n if (\"Y\".equalsIgnoreCase(shipPackageInfo.getHazMatFlag())) {\n size++;\n }\n }\n\n\n calendar = Calendar.getInstance();\n time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE) + \":\" + calendar.get(Calendar.SECOND);\n currentDate = new Date(stf.parse(time).getTime());\n shipFlag = aascShipmentHeaderInfo.getShipFlag();\n time = stf.format(currentDate);\n \n Timestamp time1 = aascShipmentHeaderInfo.getShipTimeStamp();\n logger.info(\"TimeStamp =========> ::\" + time1);\n\n String timeStr = time1.toString();\n\n timeStr = timeStr.substring(11, timeStr.length() - 2);\n fedExWsTimeStr = nullStrToSpc(timeStr);\n \n\n //fedExWsTimeStr = \"00:00:00\";\n\n\n orderNumber = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n customerTransactionIdentifier = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n ListIterator packageInfoIterator = shipPackageInfo.listIterator();\n if (aascShipmentOrderInfo != null && \n aascShipmentHeaderInfo != null && shipPackageInfo != null && \n aascShipMethodInfo != null) {\n carrierId = aascShipmentHeaderInfo.getCarrierId();\n\n if (carrierPayMethodCode.equalsIgnoreCase(\"PP\")) {\n\n senderAccountNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber()); // FedEx Account number for prepaid from shipment page\n \n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n } else {\n senderAccountNumber = \n nullStrToSpc(aascShipMethodInfo.getCarrierAccountNumber(carrierId));\n \n\n \n\n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n\n }\n\n\n fedExTestMeterNumber = \n nullStrToSpc(aascShipMethodInfo.getMeterNumber(carrierId));\n \n shipToCompanyName = \n nullStrToSpc(aascShipmentHeaderInfo.getCustomerName()); // retreiving ship to company name from header bean \n \n shipToCompanyName = encode(shipToCompanyName);\n\n shipToAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getAddress()); // retreiving ship to address from header bean \n shipToAddressLine1 = \n encode(shipToAddressLine1); //added by Jagadish\n shipToAddressCity = \n nullStrToSpc(aascShipmentHeaderInfo.getCity()); // retreiving ship to city from header bean \n shipToAddressPostalCode = \n nullStrToSpc(nullStrToSpc(aascShipmentHeaderInfo.getPostalCode())); // retreiving ship to postal code from header bean \n\n shipToAddressPostalCode = escape(shipToAddressPostalCode);\n\n shipToCountry = \n nullStrToSpc(aascShipmentHeaderInfo.getCountrySymbol()).toUpperCase(); // retreiving ship to country name from header bean \n \n shipToEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipToEmailId());\n \n shipToAddressState = \n nullStrToSpc(aascShipmentHeaderInfo.getState()).toUpperCase(); // retreiving ship to state from header bean \n \n residentialAddrFlag = aascShipmentHeaderInfo.getResidentialFlag(); \n \n shipDate = \n aascShipmentHeaderInfo.getShipmentDate(); // retreiving ship date from header bean \n shipFromAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine1()); // indicates ship From address \n shipFromAddressLine1 = \n encode(shipFromAddressLine1); //added by Jagadish\n shipFromAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine2()); // indicates ship From address \n shipFromAddressLine2 = \n encode(shipFromAddressLine2); //added by Jagadish \n shipFromAddressCity = \n aascShipmentHeaderInfo.getShipFromCity(); // indicates ship From address city \n shipFromAddressPostalCode = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPostalCode()); // indicates ship From postal code \n shipFromPersonName = \n aascShipmentHeaderInfo.getShipFromContactName();\n // System.out.println(\":::::::::::::::::::::::::::::::::::::: shipFromPersonName :::::::::::::::::::::: -- > in Fedex shipment \"+shipFromPersonName);\n shipFromAddressPostalCode = escape(shipFromAddressPostalCode);\n\n shipFromCountry = \n aascShipmentHeaderInfo.getShipFromCountry().toUpperCase(); // indicates ship From country \n shipFromAddressState = \n aascShipmentHeaderInfo.getShipFromState().toUpperCase();\n shipFromDepartment = \n nullStrToSpc(aascShipmentHeaderInfo.getDepartment()); // Retrieving the shipfrom department \n shipFromDepartment = encode(shipFromDepartment);\n shipMethodName = \n nullStrToSpc(aascShipmentHeaderInfo.getShipMethodMeaning()); // retreiving ship method meaning from header bean \n carrierCode = \n aascShipMethodInfo.getCarrierName(shipMethodName); // retreiving carrier code from ship method bean \n\n reference1 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n reference1 = encode(reference1);\n reference2 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n reference2 = encode(reference2);\n \n receipientPartyName = encode(aascShipmentHeaderInfo.getRecCompanyName());\n recipientPostalCode= encode(aascShipmentHeaderInfo.getRecPostalCode());\n //Mahesh added below code for Third Party development \n tpCompanyName = encode(aascShipmentHeaderInfo.getTpCompanyName());\n tpAddress= encode(aascShipmentHeaderInfo.getTpAddress());\n tpCity= encode(aascShipmentHeaderInfo.getTpCity());\n tpState= encode(aascShipmentHeaderInfo.getTpState());\n tpPostalCode= encode(aascShipmentHeaderInfo.getTpPostalCode());\n tpCountrySymbol= encode(aascShipmentHeaderInfo.getTpCountrySymbol());\n \n // khaja added code \n satShipFlag = \n nullStrToSpc(aascShipmentHeaderInfo.getSaturdayShipFlag()); // retreiving saturday ship flag from header bean \n //System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ satShipFlag :\"+satShipFlag);\n // khaja added code end\n size = shipPackageInfo.size();\n\n while (packageInfoIterator.hasNext()) {\n AascShipmentPackageInfo aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n pkgWtUom = nullStrToSpc(aascPackageBean.getUom());\n if (pkgWtUom.equalsIgnoreCase(\"LB\") || \n pkgWtUom.equalsIgnoreCase(\"KG\")) {\n pkgWtUom = (pkgWtUom + \"S\").toUpperCase();\n }\n pkgWtVal = aascPackageBean.getWeight();\n //pkgWtVal BY MADHAVI\n\n DecimalFormat fmt = new DecimalFormat();\n fmt.setMaximumFractionDigits(1);\n String str = fmt.format(pkgWtVal);\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n pkgWtVal = Float.parseFloat(str);\n \n } else {\n \n }\n\n dimensions = nullStrToSpc(aascPackageBean.getDimension());\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n\n if (dimensions != null && !dimensions.equals(\"\")) {\n\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n length = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n width = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n height = dimensions;\n \n }\n // Email Notification details\n emailFlag = aascShipmentHeaderInfo.getEmailNotificationFlag();\n SenderEmail = aascShipmentHeaderInfo.getShipFromEmailId();\n ShipAlertNotification = aascShipmentHeaderInfo.getShipNotificationFlag();\n ExceptionNotification = aascShipmentHeaderInfo.getExceptionNotification();\n DeliveryNotification = aascShipmentHeaderInfo.getDeliveryNotification();\n Format = aascShipmentHeaderInfo.getFormatType();\n recipientEmailAddress1 = aascShipmentHeaderInfo.getShipToEmailId();\n if(aascShipmentHeaderInfo.getEmailCustomerName().equalsIgnoreCase(\"Y\")){\n message = \"/ Customer : \"+nullStrToSpc(encode(aascShipmentHeaderInfo.getCustomerName()));\n }\n \n if (aascShipmentHeaderInfo.getReference1Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 1: \"+nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n }\n \n if (aascShipmentHeaderInfo.getReference2Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 2:\" + nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n }\n \n // Email Notification details\n\n codFlag = nullStrToSpc(aascPackageBean.getCodFlag());\n\n if (codFlag.equalsIgnoreCase(\"Y\")) {\n \n codAmt = aascPackageBean.getCodAmt();\n \n codAmtStr = String.valueOf(codAmt);\n\n int index = codAmtStr.indexOf(\".\");\n\n \n\n if (index < 1) {\n codAmtStr = codAmtStr + \".00\";\n \n } else if ((codAmtStr.length() - index) > 2) {\n codAmtStr = codAmtStr.substring(0, index + 3);\n \n } else {\n while (codAmtStr.length() != (index + 3)) {\n codAmtStr = codAmtStr + \"0\";\n \n }\n }\n codTag = \n \"<COD>\" + \"<CollectionAmount>\" + codAmtStr + \"</CollectionAmount>\" + \n \"<CollectionType>ANY</CollectionType>\" + \n \"</COD>\";\n } else {\n \n codTag = \"\";\n }\n\n halPhone = aascPackageBean.getHalPhone();\n halCity = aascPackageBean.getHalCity();\n halState = aascPackageBean.getHalStateOrProvince();\n halLine1 = aascPackageBean.getHalLine1();\n halLine2 = aascPackageBean.getHalLine2();\n halZip = aascPackageBean.getHalPostalCode();\n halFlag = aascPackageBean.getHalFlag();\n\n dryIceUnits = aascPackageBean.getDryIceUnits();\n chDryIce = aascPackageBean.getDryIceChk();\n dryIceWeight = aascPackageBean.getDryIceWeight();\n \n logger.info(\"DryIce Flag=\" + chDryIce);\n if (chDryIce.equalsIgnoreCase(\"Y\")) {\n logger.info(\"DryIce Flag is Y\");\n dryIceTag = \n \"<DryIce><WeightUnits>\" + dryIceUnits + \"</WeightUnits><Weight>\" + \n dryIceWeight + \"</Weight></DryIce>\";\n } else {\n logger.info(\"DryIce Flag is N\");\n dryIceTag = \"\";\n }\n\n\n\n String halLine2Tag = \"\";\n\n if (halLine2.equalsIgnoreCase(\"\") || halLine2 == null) {\n halLine2Tag = \"\";\n } else {\n halLine2Tag = \"<Line2>\" + halLine2 + \"</Line2>\";\n }\n\n\n if (halFlag.equalsIgnoreCase(\"Y\")) {\n \n hal = \n\"<HoldAtLocation><PhoneNumber>\" + halPhone + \"</PhoneNumber>\" + \n \"<Address><Line1>\" + halLine1 + \"</Line1>\" + halLine2Tag + \"<City>\" + \n halCity + \"</City>\" + \"<StateOrProvinceCode>\" + halState + \n \"</StateOrProvinceCode>\" + \"<PostalCode>\" + halZip + \n \"</PostalCode></Address></HoldAtLocation>\";\n\n } else {\n \n hal = \"\";\n }\n\n HazMatFlag = aascPackageBean.getHazMatFlag();\n HazMatType = aascPackageBean.getHazMatType();\n HazMatClass = aascPackageBean.getHazMatClass();\n \n\n String HazMatCertData = \"\";\n String ShippingName = \"\";\n String ShippingName1 = \"\";\n String ShippingName2 = \"\";\n String ShippingName3 = \"\";\n String Class = \"\";\n\n if (HazMatFlag.equalsIgnoreCase(\"Y\")) {\n \n if (!HazMatClass.equalsIgnoreCase(\"\")) {\n \n int classIndex = HazMatClass.indexOf(\"Class\", 1);\n if (classIndex == -1) {\n classIndex = HazMatClass.indexOf(\"CLASS\", 1);\n \n }\n \n int firstIndex = 0;\n \n\n firstIndex = HazMatClass.indexOf(\"-\");\n \n String HazMatClassStr = \n HazMatClass.substring(0, firstIndex);\n \n if (classIndex == -1) {\n \n ShippingName = \"\";\n \n \n try {\n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.indexOf(\" \"), \n HazMatClassStr.length()));\n } catch (Exception e) {\n Class = \"\";\n firstIndex = -1;\n }\n\n } else {\n \n ShippingName = \n HazMatClass.substring(0, classIndex - \n 1);\n \n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.lastIndexOf(\" \"), \n HazMatClassStr.length()));\n }\n \n if (HazMatClass.length() > firstIndex + 1 + 100) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n firstIndex + 1 + \n 100);\n ShippingName3 = \n HazMatClass.substring(firstIndex + 1 + \n 100, \n HazMatClass.length());\n } else if (HazMatClass.length() > \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n HazMatClass.length());\n } else if (HazMatClass.length() <= \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n HazMatClass.length());\n }\n \n fedExWsShippingName = ShippingName;\n fedExWsShippingName1 = ShippingName1+ShippingName2+ShippingName3;\n fedExWsShippingName2 = ShippingName2;\n fedExWsShippingName3 = ShippingName3;\n fedExWsClass = Class;\n HazMatCertData = \n \"<HazMatCertificateData>\" + \"<DOTProperShippingName>\" + \n ShippingName + \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName1 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName2 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName3 + \n \"</DOTProperShippingName>\" + \n \"<DOTHazardClassOrDivision>\" + Class + \n \"</DOTHazardClassOrDivision>\";\n // \"</HazMatCertificateData>\";\n\n }\n\n\n HazMatQty = aascPackageBean.getHazMatQty();\n HazMatUnit = aascPackageBean.getHazMatUnit();\n\n HazMatIdentificationNo = \n aascPackageBean.getHazMatIdNo();\n HazMatEmergencyContactNo = \n aascPackageBean.getHazMatEmerContactNo();\n HazMatEmergencyContactName = \n aascPackageBean.getHazMatEmerContactName();\n HazardousMaterialPkgGroup = \n nullStrToSpc(aascPackageBean.getHazMatPkgGroup());\n\n // Added on Jul-05-2011\n try {\n hazmatPkgingCnt = \n aascPackageBean.getHazmatPkgingCnt();\n } catch (Exception e) {\n hazmatPkgingCnt = 0.0;\n }\n hazmatPkgingUnits = \n nullStrToSpc(aascPackageBean.getHazmatPkgingUnits());\n hazmatTechnicalName = \n nullStrToSpc(aascPackageBean.getHazmatTechnicalName());\n //End on Jul-05-2011\n hazmatSignatureName = \n nullStrToSpc(aascPackageBean.getHazmatSignatureName());\n\n /* if(HazardousMaterialPkgGroup.equalsIgnoreCase(\"\"))\n {\n HazardousMaterialPkgGroup = aascPackageBean.getHazMatPkgGroup();\n }\n else {\n HazardousMaterialPkgGroup=\"\";\n }*/\n HazMatDOTLabelType = \n aascPackageBean.getHazMatDOTLabel();\n HazardousMaterialId = aascPackageBean.getHazMatId();\n\n String AccessibilityTag = \n \"<Accessibility>\" + HazMatType + \n \"</Accessibility>\";\n String additionalTag = \"\";\n String additionalTag1 = \"\";\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n \n AccessibilityTag = \"\";\n additionalTag = \n \"<Quantity>\" + HazMatQty + \"</Quantity><Units>\" + \n HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n additionalTag1 = \n \"<DOTIDNumber>\" + HazMatIdentificationNo + \n \"</DOTIDNumber>\" + \"<PackingGroup>\" + \n HazardousMaterialPkgGroup + \n \"</PackingGroup>\" + \"<DOTLabelType>\" + \n HazMatDOTLabelType + \"</DOTLabelType>\" + \n \"<TwentyFourHourEmergencyResponseContactName>\" + \n HazMatEmergencyContactName + \n \"</TwentyFourHourEmergencyResponseContactName>\" + \n \"<TwentyFourHourEmergencyResponseContactNumber>\" + \n HazMatEmergencyContactNo + \n \" </TwentyFourHourEmergencyResponseContactNumber>\";\n\n additionalTag = \n additionalTag1 + \"<Quantity>\" + HazMatQty + \n \"</Quantity><Units>\" + HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n\n } else {\n \n additionalTag = \"\" + \"</HazMatCertificateData>\";\n }\n\n HazMat = \n \"<DangerousGoods>\" + AccessibilityTag + HazMatCertData + \n additionalTag + \"</DangerousGoods>\";\n\n } else {\n \n HazMat = \"\";\n }\n\n // Added code for dimensions \n packageLength = aascPackageBean.getPackageLength();\n packageWidth = aascPackageBean.getPackageWidth();\n packageHeight = aascPackageBean.getPackageHeight();\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n //System.out.println(\"packageLength----------------------------in fedex shipment::\"+packageLength);\n // Added for dimensions \n if (packageLength != 0 && packageWidth != 0 && \n packageHeight != 0 && packageLength != 0.0 && \n packageWidth != 0.0 && packageHeight != 0.0) {\n header9 = \n \"<Dimensions>\" + \"<Length>\" + (int)packageLength + \n \"</Length>\" + \"<Width>\" + (int)packageWidth + \n \"</Width>\" + \"<Height>\" + (int)packageHeight + \n \"</Height>\" + \"<Units>\" + units + \"</Units>\" + \n \"</Dimensions>\";\n } else {\n header9 = \"\";\n }\n\n signatureOptions = \n nullStrToSpc(aascPackageBean.getSignatureOptions());\n\n\n returnShipment = \n nullStrToSpc(aascPackageBean.getReturnShipment());\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n rtnShipFromCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCompany().trim()));\n \n rtnShipToCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCompany().trim()));\n rtnShipFromContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromContact().trim()));\n rtnShipToContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToContact().trim()));\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnTagshipToContactPersonName = \"\";\n } else {\n rtnTagshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n rtnShipFromLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine1().trim()));\n\n rtnShipToLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine1().trim()));\n rtnShipFromLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine2().trim()));\n\n rtnShipToLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine2().trim()));\n rtnShipFromCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCity().trim()));\n rtnShipFromSate = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromSate().trim()));\n rtnShipFromZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromZip()));\n rtnShipToCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCity().trim()));\n rtnShipToState = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToState().trim()));\n rtnShipToZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToZip()));\n rtnShipFromPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromPhone().trim()));\n\n rtnShipFromPhone = rtnShipFromPhone.replace(\"(\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\")\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\"-\", \"\");\n\n rtnShipToPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToPhone().trim()));\n\n rtnShipToPhone = rtnShipToPhone.replace(\"(\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\")\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\"-\", \"\");\n\n rtnShipMethod = \n encode(nullStrToSpc(aascPackageBean.getRtnShipMethod()));\n rtnDropOfType = \n encode(nullStrToSpc(aascPackageBean.getRtnDropOfType()));\n rtnPackageList = \n encode(nullStrToSpc(aascPackageBean.getRtnPackageList()));\n //rtnPayMethod=nullStrToSpc(aascPackageBean.getRtnPayMethod());\n rtnPayMethod = \n encode((String)carrierPayMethodCodeMap.get(nullStrToSpc(aascPackageBean.getRtnPayMethod())));\n rtnPayMethodCode = \n encode(nullStrToSpc(aascPackageBean.getRtnPayMethodCode()));\n rtnACNumber = \n encode(nullStrToSpc(aascPackageBean.getRtnACNumber().trim()));\n rtnRMA = \n encode(nullStrToSpc(aascPackageBean.getRtnRMA().trim()));\n }\n // rtnTrackingNumber=nullStrToSpc(aascPackageBean.getRtnTrackingNumber().trim());\n //18/07/07(end)\n //25/07/07(start)\n String rtnShipTagToContact = \"\";\n String rtnshipToContactPersonName = \"\";\n String rtnShipTagFromContact = \"\";\n String rtnshipFromContactPersonName = \"\";\n if (rtnShipToCompany.equalsIgnoreCase(\"\") || \n rtnShipToCompany == null) {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnShipTagToContact = \"\";\n } else {\n rtnShipTagToContact = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnshipToContactPersonName = \"\";\n } else {\n rtnshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n\n }\n rtnShipTagToContact = \n rtnshipToContactPersonName + \"<CompanyName>\" + \n rtnShipToCompany + \"</CompanyName>\";\n\n }\n\n\n if (rtnShipFromCompany.equalsIgnoreCase(\"\") || \n rtnShipFromCompany == null) {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnShipTagFromContact = \"\";\n } else {\n rtnShipTagFromContact = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnshipFromContactPersonName = \"\";\n } else {\n rtnshipFromContactPersonName = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n\n }\n rtnShipTagFromContact = \n rtnshipFromContactPersonName + \"<CompanyName>\" + \n rtnShipFromCompany + \"</CompanyName>\";\n\n }\n //25/07/07(end)\n\n\n //24/07/07(start)\n String toLine2Tag = \"\";\n\n if (rtnShipToLine2.equalsIgnoreCase(\"\") || \n rtnShipToLine2 == null) {\n toLine2Tag = \"\";\n } else {\n toLine2Tag = \"<Line2>\" + rtnShipToLine2 + \"</Line2>\";\n }\n\n String fromLine2Tag = \"\";\n\n if (rtnShipFromLine2.equalsIgnoreCase(\"\") || \n rtnShipFromLine2 == null) {\n fromLine2Tag = \"\";\n } else {\n fromLine2Tag = \n \"<Line2>\" + rtnShipFromLine2 + \"</Line2>\";\n }\n //24/07/07(end)\n if (rtnRMA != null && !(rtnRMA.equalsIgnoreCase(\"\"))) {\n rmaTag = \n \"<RMA>\" + \"<Number>\" + rtnRMA + \"</Number>\" + \"</RMA>\";\n } else {\n rmaTag = \"\";\n }\n packageDeclaredValue = \n aascPackageBean.getPackageDeclaredValue();\n \n rtnPackageDeclaredValue = \n aascPackageBean.getRtnDeclaredValue();\n \n rtnPackageDeclaredValueStr = \n String.valueOf(rtnPackageDeclaredValue);\n\n int indexRtr = rtnPackageDeclaredValueStr.indexOf(\".\");\n\n if (indexRtr < 1) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \".00\";\n\n } else if ((rtnPackageDeclaredValueStr.length() - \n indexRtr) > 2) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (rtnPackageDeclaredValueStr.length() != \n (indexRtr + 3)) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \"0\";\n\n }\n }\n //31/07/07(end)\n\n packageDeclaredValueStr = \n String.valueOf(packageDeclaredValue);\n int index = packageDeclaredValueStr.indexOf(\".\");\n\n\n if (index < 1) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \".00\";\n\n } else if ((packageDeclaredValueStr.length() - index) > \n 2) {\n packageDeclaredValueStr = \n packageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (packageDeclaredValueStr.length() != \n (index + 3)) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \"0\";\n\n }\n }\n /*End 15-04-09 */\n\n\n packageSequence = \n nullStrToSpc(aascPackageBean.getPackageSequence());\n \n packageFlag = nullStrToSpc(aascPackageBean.getVoidFlag());\n \n packageTrackinNumber = \n nullStrToSpc(aascPackageBean.getTrackingNumber());\n\n packageCount = \n nullStrToSpc(aascPackageBean.getPackageCount());\n\n \n\n if (!packageCount.equalsIgnoreCase(\"1\")) {\n\n shipmentWeight = \n nullStrToSpc(String.valueOf(aascPackageBean.getWeight()));\n\n \n\n if (packageSequence.equalsIgnoreCase(\"1\")) {\n if (carrierCode.equalsIgnoreCase(\"FDXG\") || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n codFlag.equalsIgnoreCase(\"Y\")) || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n intFlag.equalsIgnoreCase(\"Y\"))) {\n shipMultiPieceFlag = 1;\n }\n masterTrackingNumber = \"\";\n masterFormID = \"\";\n /*shipWtTag = \"<ShipmentWeight>\"\n + aascHeaderInfo.getPackageWeight()\n + \"</ShipmentWeight>\"; */\n } else {\n if (shipFlag.equalsIgnoreCase(\"Y\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n masterFormID = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getMasterFormId()));\n \n } else {\n masterTrackingNumber = \n nullStrToSpc((String)hashMap.get(\"masterTrkNum\"));\n\n \n if (masterTrackingNumber == \"\" || \n masterTrackingNumber.equalsIgnoreCase(\"\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n\n //aascShipmentHeaderInfo.setWayBill(masterTrackingNumber);\n\n }\n //26/07/07(end)\n masterFormID = \n nullStrToSpc((String)hashMap.get(\"masterFormId\"));\n //shipWtTag = \"\";\n }\n\n }\n\n if (shipMultiPieceFlag == \n 1) { //shipWtTag + // \"<ShipmentWeight>\"+aascHeaderInfo.getPackageWeight()+\"</ShipmentWeight>\"+\n part1 = \n \"<MultiPiece>\" + \"<PackageCount>\" + packageCount + \n \"</PackageCount>\" + \n \"<PackageSequenceNumber>\" + \n packageSequence + \n \"</PackageSequenceNumber>\" + \n \"<MasterTrackingNumber>\" + \n masterTrackingNumber + \n \"</MasterTrackingNumber>\";\n part2 = \"\";\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n part2 = \n \"<MasterFormID>\" + masterFormID + \"</MasterFormID></MultiPiece>\";\n } else {\n part2 = \"</MultiPiece>\";\n }\n\n header4 = part1 + part2;\n }\n\n else {\n header4 = \"\";\n }\n }\n\n\n chkReturnlabel = \"NONRETURN\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n int ctr = 0;\n if (responseStatus == 151 && \n !(shipFlag.equalsIgnoreCase(\"Y\"))) {\n // aascHeaderInfo.setWayBill(\"\"); \n packageInfoIterator = shipPackageInfo.listIterator();\n\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n aascPackageBean.setMasterTrackingNumber(\"\");\n aascPackageBean.setMasterFormID(\"\");\n // aascPackageBean.setTrackingNumber(\"\");\n aascPackageBean.setPkgCost(0.0);\n aascPackageBean.setRtnShipmentCost(0.0);\n aascPackageBean.setRtnTrackingNumber(\"\");\n aascPackageBean.setSurCharges(0.0);\n }\n return responseStatus;\n }\n if (responseStatus == 151 && \n shipFlag.equalsIgnoreCase(\"Y\")) {\n\n packageInfoIterator = shipPackageInfo.listIterator();\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n }\n return responseStatus;\n }\n\n // }//End of Iterator \n\n customerCarrierAccountNumber = \n aascShipmentHeaderInfo.getCarrierAccountNumber(); // FedEx Account number of the client \n // Modified to retrieve the Ship From company name from Profile Options instead of from Header Info\n // shipFromCompanyName = nullStrToSpc(aascProfileOptionsInfo.getCompanyName());\n shipFromCompanyName = \n aascShipmentHeaderInfo.getShipFromCompanyName();\n logger.info(\"ship from company name::::\" + \n shipFromCompanyName);\n shipFromCompanyName = encode(shipFromCompanyName);\n \n shipFromPhoneNumber1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPhoneNumber1());\n //start\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = escape(shipFromPhoneNumber1);\n\n shipToContactPhoneNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getPhoneNumber()); // retreiving phone number from header bean \n\n shipToContactPhoneNumber = \n escape(shipToContactPhoneNumber);\n \n if (shipToContactPhoneNumber.equalsIgnoreCase(\"\")) {\n shipToContactPhoneNumber = shipFromPhoneNumber1;\n }\n\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"(\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\")\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"-\", \"\");\n \n shipFromEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipFromEmailId());\n \n carrierPayMethod = \n (String)carrierPayMethodCodeMap.get(nullStrToSpc(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n carrierPayMethodCode = \n nullStrToSpc(aascShipMethodInfo.getCarrierPayCode(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n if (\"RECIPIENT\".equalsIgnoreCase(carrierPayMethod) && \n \"FC\".equalsIgnoreCase(carrierPayMethodCode)) {\n carrierPayMethodCode = \"CG\";\n }\n dropoffType = \n nullStrToSpc(aascShipmentHeaderInfo.getDropOfType());\n service = \n aascShipMethodInfo.getConnectShipScsTag(shipMethodName);\n packaging = \n nullStrToSpc(aascShipmentHeaderInfo.getPackaging());\n portString = aascShipMethodInfo.getCarrierPort(carrierId);\n if (portString != null && !(portString.equals(\"\"))) {\n port = Integer.parseInt(portString);\n } else {\n logger.severe(\"portString is null \" + portString);\n }\n host = \naascShipMethodInfo.getCarrierServerIPAddress(carrierId);\n\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && \n carrierPayMethodCode.equalsIgnoreCase(\"FC\")) {\n aascShipmentHeaderInfo.setMainError(\"bill to type of collect is for ground services only \");\n responseStatus = 151;\n return responseStatus;\n }\n //By Madhavi\n String line2Tag = \"\";\n shipToAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipToAddrLine2());\n shipToAddressLine2 = shipToAddressLine2.trim();\n shipToAddressLine2=encode(shipToAddressLine2); //added by Jagadish\n \n if (shipToAddressLine2.equalsIgnoreCase(\"\") || \n shipToAddressLine2 == null) {\n line2Tag = \"\";\n } else {\n line2Tag = \"<Line2>\" + shipToAddressLine2 + \"</Line2>\";\n }\n op900LabelFormat = \n nullStrToSpc(aascShipMethodInfo.getHazmatOp900LabelFormat(carrierId));\n \n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n LinkedList coList = null;\n try {\n aascIntlHeaderInfo = aascIntlInfo.getIntlHeaderInfo();\n coList = aascIntlInfo.getIntlCommodityInfo();\n } catch (Exception e) {\n aascIntlHeaderInfo = new AascIntlHeaderInfo();\n coList = new LinkedList();\n }\n if (intFlag.equalsIgnoreCase(\"Y\")) {\n \n intPayerType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPayerType());\n \n intAccNumber = nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber());\n// nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber());\n//logger.info(\"intAccNumber:2167::\"+intAccNumber);\n // logger.info(\"nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()):2168::\"+nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()));\n\n intMaskAccNumber = \n nullStrToSpc(aascIntlHeaderInfo.getIntlMaskAccountNumber());\n intcountryCode = \n nullStrToSpc(aascIntlHeaderInfo.getIntlCountryCode());\n \n intTermsOfSale = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTermsOfSale());\n intTotalCustomsValue = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTotalCustomsValue());\n intFreightCharge = \n aascIntlHeaderInfo.getIntlFreightCharge();\n intInsuranceCharge = \n aascIntlHeaderInfo.getIntlInsuranceCharge();\n intTaxesOrMiscellaneousCharge = \n aascIntlHeaderInfo.getIntlTaxMiscellaneousCharge();\n intPurpose = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPurpose());\n intSenderTINOrDUNS = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedNumber());\n intSenderTINOrDUNSType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedType());\n packingListEnclosed = \n aascIntlHeaderInfo.getPackingListEnclosed();\n shippersLoadAndCount = \n aascIntlHeaderInfo.getShippersLoadAndCount();\n bookingConfirmationNumber = \n aascIntlHeaderInfo.getBookingConfirmationNumber();\n generateCI = aascIntlHeaderInfo.getGenerateCI();\n declarationStmt = \n aascIntlHeaderInfo.getIntlDeclarationStmt();\n \n importerName = aascIntlHeaderInfo.getImporterName();\n importerCompName = \n aascIntlHeaderInfo.getImporterCompName();\n importerAddress1 = \n aascIntlHeaderInfo.getImporterAddress1();\n importerAddress2 = \n aascIntlHeaderInfo.getImporterAddress2();\n importerCity = aascIntlHeaderInfo.getImporterCity();\n importerCountryCode = \n aascIntlHeaderInfo.getImporterCountryCode();\n \n importerPhoneNum = \n aascIntlHeaderInfo.getImporterPhoneNum();\n \n importerPostalCode = \n aascIntlHeaderInfo.getImporterPostalCode();\n importerState = aascIntlHeaderInfo.getImporterState();\n \n impIntlSedNumber = \n aascIntlHeaderInfo.getImpIntlSedNumber();\n \n impIntlSedType = \n aascIntlHeaderInfo.getImpIntlSedType();\n \n recIntlSedNumber = \n aascIntlHeaderInfo.getRecIntlSedNumber();\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n brokerName = aascIntlHeaderInfo.getBrokerName();\n brokerCompName = \n aascIntlHeaderInfo.getBrokerCompName();\n \n brokerAddress1 = \n aascIntlHeaderInfo.getBrokerAddress1();\n \n brokerAddress2 = \n aascIntlHeaderInfo.getBrokerAddress2();\n \n brokerCity = aascIntlHeaderInfo.getBrokerCity();\n \n brokerCountryCode = \n aascIntlHeaderInfo.getBrokerCountryCode();\n \n brokerPhoneNum = \n aascIntlHeaderInfo.getBrokerPhoneNum();\n \n brokerPostalCode = \n aascIntlHeaderInfo.getBrokerPostalCode();\n \n brokerState = aascIntlHeaderInfo.getBrokerState();\n \n\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n\n ListIterator CoInfoIterator = coList.listIterator();\n\n intHeader6 = \"\";\n String harCode = \"\";\n String uPrice = \"\";\n String exportLicense = \"\";\n\n while (CoInfoIterator.hasNext()) {\n AascIntlCommodityInfo aascIntlCommodityInfo = \n (AascIntlCommodityInfo)CoInfoIterator.next();\n\n numberOfPieces = \n aascIntlCommodityInfo.getNumberOfPieces();\n description = \n encode(aascIntlCommodityInfo.getDescription());\n countryOfManufacture = \n aascIntlCommodityInfo.getCountryOfManufacture();\n harmonizedCode = \n aascIntlCommodityInfo.getHarmonizedCode();\n weight = aascIntlCommodityInfo.getWeight();\n quantity = aascIntlCommodityInfo.getQuantity();\n quantityUnits = \n aascIntlCommodityInfo.getQuantityUnits();\n unitPrice = aascIntlCommodityInfo.getUnitPrice();\n customsValue = \n aascIntlCommodityInfo.getCustomsValue();\n exportLicenseNumber = \n aascIntlCommodityInfo.getExportLicenseNumber();\n exportLicenseExpiryDate = \n aascIntlCommodityInfo.getExportLicenseExpiryDate();\n String rdate = \"\";\n\n try {\n //String mon[]={\"\",\"JAN\",\"FEB\",\"MAR\",\"APR\",\"MAY\",\"JUN\",\"JUL\",\"AUG\",\"SEP\",\"OCT\",\"NOV\",\"DEC\"};\n // String exportLicenseExpiryDateStr = \n // exportLicenseExpiryDate.substring(0, 1);\n String convertDate = exportLicenseExpiryDate;\n\n // 18-FEB-08 2008-02-18\n int len = convertDate.length();\n int indexs = convertDate.indexOf('-');\n int index1 = convertDate.lastIndexOf('-');\n\n String syear = \n convertDate.substring(index1 + 1, \n len).trim();\n String sdate = \n convertDate.substring(0, indexs).trim();\n String smon = \n convertDate.substring(indexs + 1, index1).trim();\n String intMonth = \"\";\n if (smon.equalsIgnoreCase(\"JAN\"))\n intMonth = \"01\";\n else if (smon.equalsIgnoreCase(\"FEB\"))\n intMonth = \"02\";\n else if (smon.equalsIgnoreCase(\"MAR\"))\n intMonth = \"03\";\n else if (smon.equalsIgnoreCase(\"APR\"))\n intMonth = \"04\";\n else if (smon.equalsIgnoreCase(\"MAY\"))\n intMonth = \"05\";\n else if (smon.equalsIgnoreCase(\"JUN\"))\n intMonth = \"06\";\n else if (smon.equalsIgnoreCase(\"JUL\"))\n intMonth = \"07\";\n else if (smon.equalsIgnoreCase(\"AUG\"))\n intMonth = \"08\";\n else if (smon.equalsIgnoreCase(\"SEP\"))\n intMonth = \"09\";\n else if (smon.equalsIgnoreCase(\"OCT\"))\n intMonth = \"10\";\n else if (smon.equalsIgnoreCase(\"NOV\"))\n intMonth = \"11\";\n else if (smon.equalsIgnoreCase(\"DEC\"))\n intMonth = \"12\";\n\n rdate = \n \"20\" + syear + '-' + intMonth + '-' + sdate;\n rdate = exportLicenseExpiryDate;\n\n } catch (Exception e) {\n exportLicenseExpiryDate = \"\";\n rdate = \"\";\n }\n\n try {\n // String harmonizedCodeStr = \n // harmonizedCode.substring(0, 1);\n } catch (Exception e) {\n harmonizedCode = \"\";\n }\n if (harmonizedCode.equalsIgnoreCase(\"\")) {\n harCode = \"\";\n } else {\n harCode = \n \"<HarmonizedCode>\" + harmonizedCode + \"</HarmonizedCode>\";\n }\n if (unitPrice.equalsIgnoreCase(\"\")) {\n uPrice = \"\";\n } else {\n uPrice = \n \"<UnitPrice>\" + unitPrice + \"</UnitPrice>\";\n }\n try {\n // String expNoStr = \n // exportLicenseNumber.substring(0, 1);\n\n } catch (Exception e) {\n exportLicenseNumber = \"\";\n }\n if (exportLicenseNumber.equalsIgnoreCase(\"\")) {\n exportLicense = \"\";\n } else {\n exportLicense = \n \"<ExportLicenseNumber>\" + exportLicenseNumber + \n \"</ExportLicenseNumber>\" + \n \"<ExportLicenseExpirationDate>\" + \n rdate + \n \"</ExportLicenseExpirationDate>\";\n }\n\n\n intHeader6 = \n intHeader6 + \"<Commodity>\" + \"<NumberOfPieces>\" + \n numberOfPieces + \"</NumberOfPieces>\" + \n \"<Description>\" + description + \n \"</Description>\" + \n \"<CountryOfManufacture>\" + \n countryOfManufacture + \n \"</CountryOfManufacture>\" + harCode + \n \"<Weight>\" + weight + \"</Weight>\" + \n \"<Quantity>\" + quantity + \"</Quantity> \" + \n \"<QuantityUnits>\" + quantityUnits + \n \"</QuantityUnits>\" + uPrice + \n \"<CustomsValue>\" + customsValue + \n \"</CustomsValue>\" + exportLicense + \n \"</Commodity>\";\n\n\n }\n\n if (intPayerType.equalsIgnoreCase(\"THIRDPARTY\")) {\n intHeader1 = \n \"<DutiesPayor><AccountNumber>\" + intAccNumber + \n \"</AccountNumber>\" + \"<CountryCode>\" + \n intcountryCode + \"</CountryCode>\" + \n \"</DutiesPayor>\";\n intHeader2 = \n \"<DutiesPayment>\" + intHeader1 + \"<PayorType>\" + \n intPayerType + \"</PayorType>\" + \n \"</DutiesPayment>\";\n payorCountryCodeWS = intcountryCode;\n } else {\n intHeader2 = \n \"<DutiesPayment>\" + \"<PayorType>\" + intPayerType + \n \"</PayorType>\" + \"</DutiesPayment>\";\n }\n\n /*\n try{\n String ifc = intFreightCharge.substring(0,1);\n }catch(Exception e)\n {\n intFreightCharge = \"0.0\";\n }\n try{\n String iic = intInsuranceCharge.substring(0,1);\n }catch(Exception e)\n {\n intInsuranceCharge = \"0.0\";\n }\n try{\n String itmc = intTaxesOrMiscellaneousCharge.substring(0,1);\n }catch(Exception e)\n {\n intTaxesOrMiscellaneousCharge = \"0.0\";\n }\n */\n\n if (intPurpose.equalsIgnoreCase(\"\")) { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"</CommercialInvoice>\";\n } else { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"<Purpose>\" + intPurpose + \"</Purpose>\" + \n \"</CommercialInvoice>\";\n }\n /*\n intHeader4 = \"<Commodity>\"+\n \"<NumberOfPieces>1</NumberOfPieces> \"+\n \"<Description>Computer Keyboards</Description> \"+\n \"<CountryOfManufacture>US</CountryOfManufacture> \"+\n \"<HarmonizedCode>00</HarmonizedCode> \"+\n \"<Weight>5.0</Weight> \"+\n \"<Quantity>1</Quantity> \"+\n \"<QuantityUnits>PCS</QuantityUnits> \"+\n \"<UnitPrice>25.000000</UnitPrice> \"+\n \"<CustomsValue>25.000000</CustomsValue> \"+\n \"<ExportLicenseNumber>25</ExportLicenseNumber> \"+\n \"<ExportLicenseExpirationDate>25</ExportLicenseExpirationDate> \"+\n \"</Commodity>\";\n\n intHeader4 = \"\"; */\n\n if (!intSenderTINOrDUNS.equalsIgnoreCase(\"\")) {\n intHeader5 = \n \"<SED>\" + \"<SenderTINOrDUNS>\" + intSenderTINOrDUNS + \n \"</SenderTINOrDUNS>\" + \n \"<SenderTINOrDUNSType>\" + \n intSenderTINOrDUNSType + \n \"</SenderTINOrDUNSType>\" + \"</SED>\";\n } else {\n intHeader5 = \"\";\n }\n\n internationalTags = \n \"<International>\" + intHeader2 + \"<TermsOfSale>\" + \n intTermsOfSale + \"</TermsOfSale>\" + \n \"<TotalCustomsValue>\" + intTotalCustomsValue + \n \"</TotalCustomsValue>\" + intHeader3 + \n intHeader6 + intHeader5 + \"</International>\";\n\n\n } else {\n internationalTags = \"\";\n }\n\n\n // end of addition on 09/06/08\n\n // end of addition on 09/06/08\n\n // Start on Aug-01-2011\n try {\n shipToContactPersonName = \n nullStrToSpc(aascShipmentHeaderInfo.getContactName());\n shipToContactPersonName = \n encode(shipToContactPersonName); //Added by dedeepya on 28/05/08\n if (shipToContactPersonName.equalsIgnoreCase(\"\")) {\n tagshipToContactPersonName = \"\";\n } else {\n tagshipToContactPersonName = \n \"<PersonName>\" + shipToContactPersonName + \n \"</PersonName>\";\n }\n } catch (Exception e) {\n e.printStackTrace();\n tagshipToContactPersonName = \"\";\n }\n // End on Aug-01-2011\n\n\n \n chkReturnlabel = \"NONRETURN\";\n \n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel);\n sendfedexRequest(aascShipmentOrderInfo, aascShipMethodInfo, \n chkReturnlabel, aascProfileOptionsInfo, \n aascIntlInfo, cloudLabelPath);\n responseStatus = \n Integer.parseInt((String)hashMap.get(\"ResponseStatus\"));\n \n\n if (returnShipment.equals(\"PRINTRETURNLABEL\") && \n responseStatus == 150) {\n \n \n shipmentRequestHdr = \"\";\n\n\n \n\n chkReturnlabel = \"PRINTRETURNLABEL\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n\n //processReturnShipment();\n //Shiva modified code for FedEx Return Shipment\n \n rtnShipMethod = \n rtnShipMethod.substring(0, rtnShipMethod.indexOf(\"@@\"));\n // System.out.println(\"rtnShipMethod.indexOf(\\\"@@\\\")\"+rtnShipMethod.indexOf(\"@@\")+\"rtnShipMethod:::\"+rtnShipMethod); \n rtnShipMethod = \n aascShipMethodInfo.getShipMethodFromAlt(rtnShipMethod);\n \n carrierCode = \n aascShipMethodInfo.getCarrierName(rtnShipMethod);\n \n rtnShipMethod = \n aascShipMethodInfo.getConnectShipScsTag(rtnShipMethod);\n rtnACNumber = \n nullStrToSpc(aascPackageBean.getRtnACNumber().trim());\n\n \n rntHeader1 = \n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\" + \n \"<FDXShipRequest xmlns:api=\\\"http://www.fedex.com/fsmapi\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"FDXShipRequest.xsd\\\">\" + \n \"<RequestHeader>\" + \n \"<CustomerTransactionIdentifier>\" + \n customerTransactionIdentifier + \n \"</CustomerTransactionIdentifier>\" + \n \"<AccountNumber>\" + senderAccountNumber + \n \"</AccountNumber>\" + \"<MeterNumber>\" + \n fedExTestMeterNumber + \"</MeterNumber>\" + \n \"<CarrierCode>\" + carrierCode + \n \"</CarrierCode>\" + \"</RequestHeader>\" + \n \"<ShipDate>\" + shipDate + \"</ShipDate>\" + \n \"<ShipTime>\" + time + \"</ShipTime>\" + \n \"<DropoffType>\" + rtnDropOfType + \n \"</DropoffType>\" + \"<Service>\" + \n rtnShipMethod + \"</Service>\" + \"<Packaging>\" + \n rtnPackageList + \n \"</Packaging>\"; // added for package options\n rntHeader6 = \n \"<Origin>\" + \"<Contact>\" + rtnShipTagFromContact + \n header8 + \"<PhoneNumber>\" + rtnShipFromPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipFromLine1 + \"</Line1>\" + \n fromLine2Tag + \"<City>\" + rtnShipFromCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipFromSate + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipFromZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipFromCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Origin>\" + \"<Destination>\" + \n \"<Contact>\" + rtnShipTagToContact + \n \"<PhoneNumber>\" + rtnShipToPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipToLine1 + \"</Line1>\" + \n toLine2Tag + \"<City>\" + rtnShipToCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipToState + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipToZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipToCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Destination>\" + \"<Payment>\" + \n \"<PayorType>\" + rtnPayMethod + \"</PayorType>\";\n\n header4 = \"\";\n rntHeader5 = \n \"<ReturnShipmentIndicator>PRINTRETURNLABEL</ReturnShipmentIndicator>\"; // added for package options\n\n header2 = \n \"<WeightUnits>\" + pkgWtUom + \"</WeightUnits>\" + \n \"<Weight>\" + pkgWtVal + \"</Weight>\";\n\n listTag = \"<ListRate>true</ListRate>\";\n\n // added for package options\n header3 = \n \"<CurrencyCode>\" + currencyCode + \"</CurrencyCode>\";\n //Shiva modified code for FedEx Return Shipment\n sendfedexRequest(aascShipmentOrderInfo, \n aascShipMethodInfo, chkReturnlabel, \n aascProfileOptionsInfo, aascIntlInfo, \n cloudLabelPath);\n }\n\n\n \n shipmentDeclaredValueStr = \n String.valueOf(shipmentDeclaredValue);\n \n int i = shipmentDeclaredValueStr.indexOf(\".\");\n\n if (i < 1) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \".00\";\n \n } else if ((shipmentDeclaredValueStr.length() - index) > \n 2) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr.substring(0, \n index + 3);\n \n } else {\n while (shipmentDeclaredValueStr.length() != (i + 3)) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \"0\";\n\n }\n }\n \n\n\n } //iterator\n\n\n packageInfoIterator = shipPackageInfo.listIterator();\n\n int ctr1 = 0;\n\n while (packageInfoIterator.hasNext()) {\n ctr1 = ctr1 + 1;\n\n AascShipmentPackageInfo aascPackageBean1 = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n totalShipmentCost = \n totalShipmentCost + aascPackageBean1.getPkgCost();\n\n totalFreightCost = \n totalFreightCost + aascPackageBean1.getTotalDiscount();\n\n surCharges = surCharges + aascPackageBean1.getSurCharges();\n \n }\n \n\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n\n\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n surCharges = (Math.floor(surCharges * 100)) / 100;\n aascShipmentHeaderInfo.setTotalSurcharge(surCharges);\n\n } else {\n responseStatus = 151;\n aascShipmentHeaderInfo.setMainError(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n logger.info(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n }\n } catch (Exception exception) {\n aascShipmentHeaderInfo.setMainError(\"null values or empty strings passed in request\");\n logger.severe(\"Exception::\"+exception.getMessage());\n }\n logger.info(\"Exit from processShipment()\");\n return responseStatus;\n }", "@Override\n\tpublic boolean update(StatusDetail item) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void setStatus(long status) {\n\t\t_buySellProducts.setStatus(status);\n\t}", "public void setStatus(Status newStatus){\n status = newStatus;\n }", "public void setShipmentRate(int shipmentRate) {\n this.shipmentRate = Float.valueOf(shipmentRate);\n }", "public void updateStatus(final Long fileIdentifier, final ProcessingStatus status) {\n FileEntity entity = new FileEntity();\n entity.setId(fileIdentifier);\n entity.setStatus(status.getStorageValue());\n\n Optional<FileEntity> result = fileStatusRepository.findById(fileIdentifier);\n\n if (result.isPresent()) {\n entity.setName(result.get().getName());\n }\n fileStatusRepository.save(entity);\n LOGGER.debug(\"Saved entity {} \", entity);\n\n }", "public void updateData() {}", "@Transactional\n\tpublic void updateSessionPackageStatus(String packageSessionUuid, SessionPackageStatus status) {\n\t\tpackageRepository.updateSessionPackageStatus(packageSessionUuid, status.toString());\n\t}", "@Override\n\tpublic void updatePengdingWaybill(WaybillPendingEntity entity) {\n\t\t\n\t}", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "public void setShipDate(String value) {\n\t\t\tthis.shipDate = value;\n\t\t}", "private void updateAccountStatus() {\n\r\n }", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void UpdateSatus(String username) {\n\t\t\r\n\t}", "public void doUpdateStatus() throws GameException\r\n {\n \r\n }", "public void updateStatus(String s1)\n {\n s = s1;\n notifyObservers();\n }", "public void updateGame(GameStatusMessage gameStatus) {\n logger.info(\"Game update: \" + gameStatus.toString());\n this.gameStatus = gameStatus;\n gameUpdated = true;\n selectedTile = null;\n moved = false;\n }", "@Override\r\n\tpublic void update(BbsDto dto) {\n\t\t\r\n\t}", "@Override\r\n public void update() {\r\n this.highestRevenueRestaurant = findHighestRevenueRestaurant();\r\n this.total = calculateTotal();\r\n }", "void setDataStatus(String dataStatus);", "public void setStatus(String Status) {\n this.Status = Status;\n }", "public void setStatus(String Status) {\n this.Status = Status;\n }", "public static JSONObject saveTrackDetailStatus(JSONObject input, String kitchenName, String orderNo) throws JSONException{\n\t\tJSONObject status = new JSONObject();\n\t\tboolean updated = false;\n\t\tif(input.getString(\"status\").equalsIgnoreCase(\"SHIPPED\")){\n\t\t\tSystem.out.println(\"Driver \"+input.getString(\"driver_name\")+\" is shipped from '\"+kitchenName+\"' successfully!!\");\n\t\t\ttry {\n\t\t\t\tSQL1:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_order_tracking SET driver_pickup_time = current_timestamp \"\n\t\t\t\t\t\t+ \"WHERE order_id = (select order_id from fapp_orders where order_no = ?) \"\n\t\t\t\t\t\t+ \" AND kitchen_id = (select kitchen_id from fapp_kitchen where kitchen_name = ?) AND rejected='N'\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\t//preparedStatement.setString(1, input.getString(\"driver_name\"));\n\t\t\t\t\t//\tpreparedStatement.setString(2, input.getString(\"driver_number\"));\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t\t/*sendMessageForDeliveryBoy(getCustomerMobile(input.getString(\"order_id\"), \"REGULAR\"), \n\t\t\t\t\t\t\t\t\tinput.getString(\"driver_number\"), input.getString(\"driver_name\"),\n\t\t\t\t\t\t\t\t\t\"dummyLat\",\"dummyLong\",\"dummySubNo\");*/\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\n\t\t\tSQL2:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_orders SET order_status_id=5 WHERE order_no = ?\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\t//\tpreparedStatement.setString(1, input.getString(\"driver_name\"));\n\t\t\t\t\t//\tpreparedStatement.setString(2, input.getString(\"driver_number\"));\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t\t/*sendMessageForDeliveryBoy(getCustomerMobile(input.getString(\"order_id\"), \"REGULAR\"), \n\t\t\t\t\t\t\t\t\tinput.getString(\"driver_number\"), input.getString(\"driver_name\"));\n\t\t\t\t\t\t */\t\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}else if(input.getString(\"status\").equalsIgnoreCase(\"COMPLETE\")){\n\t\t\tSystem.out.println(\"Driver \"+input.getString(\"driver_name\")+\" is completed the order from '\"+kitchenName+\"' successfully!!\");\n\n\t\t\ttry {\n\t\t\t\tSQL1:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_order_tracking SET delivery_time = current_timestamp,delivered='Y' \"\n\t\t\t\t\t\t+ \" WHERE order_id = (select order_id from fapp_orders where order_no = ?) and kitchen_id=\"\n\t\t\t\t\t\t+ \" (select kitchen_id from fapp_kitchen where kitchen_name = ?) AND rejected='N'\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t\t/*sendMessageToMobile(getCustomerMobile(orderNo, \"REGULAR\"), \n\t\t\t\t\t\t\t\t\torderNo, \"orderTime\" , 7);*/\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\n\t\t\tSQL2:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_orders SET order_status_id=6 WHERE order_no = ?\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t\t/*sendMessageToMobile(getCustomerMobile(orderNo, \"REGULAR\"), \n\t\t\t\t\t\t\t\t\torderNo, \"orderTime\" , 7);*/\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\tif(isAllKitchenDelivered(orderNo)){\n\t\t\t\tSQL3:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_orders SET order_status_id=7,delivery_date_time=current_timestamp,is_message_send='Y' WHERE order_no = ?\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t\tsendMessageToMobile(getCustomerMobile(orderNo, \"REGULAR\"), \n\t\t\t\t\t\t\t\torderNo, \"orderTime\" , 7);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\n\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}else if(input.getString(\"status\").equalsIgnoreCase(\"REACHED_PICKUP\")){\n\t\t\tSystem.out.println(\"Driver \"+input.getString(\"driver_name\")+\" is reached from road runner to '\"+kitchenName+\"' successfully!!\");\n\t\t\ttry {\n\t\t\t\tSQL:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_order_tracking SET driver_arrival_time = current_timestamp \"\n\t\t\t\t\t\t+ \"WHERE order_id = (select order_id from fapp_orders where order_no = ?)\"\n\t\t\t\t\t\t+ \" AND kitchen_id = (select kitchen_id from fapp_kitchen where kitchen_name = ?) AND rejected='N'\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, orderNo);\n\t\t\t\t\tpreparedStatement.setString(2, kitchenName);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"Driver \"+input.getString(\"driver_name\")+\" is assigned from road runner to '\"+kitchenName+\"' successfully!!\");\n\t\t\ttry {\n\t\t\t\tSQL1:{\n\t\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tString sql = \"UPDATE fapp_order_tracking SET driver_name = ?,driver_number = ?,driver_assignment_time=current_timestamp \"\n\t\t\t\t\t\t+ \"WHERE order_id = (select order_id from fapp_orders where order_no = ?) \"\n\t\t\t\t\t\t+ \" AND kitchen_id = (select kitchen_id from fapp_kitchen where kitchen_name = ?) AND rejected='N'\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, input.getString(\"driver_name\"));\n\t\t\t\t\tpreparedStatement.setString(2, input.getString(\"driver_number\"));\n\t\t\t\t\tpreparedStatement.setString(3, orderNo);\n\t\t\t\t\tpreparedStatement.setString(4, kitchenName);\n\t\t\t\t\tint count = preparedStatement.executeUpdate();\n\t\t\t\t\tif(count>0){\n\t\t\t\t\t\tupdated = true;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\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\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t//updated = true;\n\t\t}\n\t\t/*if(saveOrderStatus(input))\n\t\t\tstatus.put(\"status\", true);\n\t\telse\n\t\t\tstatus.put(\"status\", false);\n\t\treturn status;*/\n\t\tif(updated){\n\t\t\tstatus.put(\"status\", true);\n\t\t}else{\n\t\t\tstatus.put(\"status\", false);\n\t\t}\n\t\treturn status;\n\t}", "public void setShippingTime (java.util.Date shippingTime) {\r\n\t\tthis.shippingTime = shippingTime;\r\n\t}", "public void setUpdateStatus(Byte updateStatus) {\n this.updateStatus = updateStatus;\n }", "@POST(\"/UpdateShip\")\n\tShip updateShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }", "public String getShipmentCode() {\n return shipmentCode;\n }", "public void setShippingTime(Integer shippingTime) {\n this.shippingTime = shippingTime;\n }", "public void setStatus(ProcessModelStatus status) {\r\n this.status = status;\r\n }", "public void setStatus(String st) {\n status = CMnServicePatch.getRequestStatus(st);\n }", "private void shippedOrder() {\n FirebaseDatabase.getInstance().getReference(Common.ORDER_NEED_SHIP_TABLE)\n .child(Common.currentShipper.getPhone())\n .child(Common.currentKey)\n .removeValue()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //update status on request table\n Map<String,Object>update_status=new HashMap<>();\n update_status.put(\"status\",\"03\");\n FirebaseDatabase.getInstance().getReference(\"Requests\")\n .child(Common.currentKey)//which key\n .updateChildren(update_status)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //delete from shipping order\n FirebaseDatabase.getInstance().getReference(Common.SHIPPER_INFO_TABLE)\n .child(Common.currentKey)//parent node of key/\n .removeValue()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(TrackingOrder.this,\"Shipped\",Toast.LENGTH_SHORT).show();\n finish();\n }\n });\n }\n });\n }\n });\n }", "private static String placeShip(Request req) {\n\n if( req.params(\"Version\").equals(\"Updated\") ) {\n\n BattleshipModelUpdated model = (BattleshipModelUpdated) getModelFromReq( req );\n\n model.resetArrayUpdated( model );\n model = model.PlaceShip( model, req );\n model.resetArrayUpdated( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }else{\n\n BattleshipModelNormal model = (BattleshipModelNormal) getModelFromReq( req );\n\n model.resetArrayNormal( model );\n model = model.PlaceShip( model, req );\n model.resetArrayNormal( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }\n }", "@Test\n public void testSetStatus() {\n System.out.println(\"setStatus\");\n Member instance = member;\n \n String status = \"APPLIED\";\n instance.setStatus(status);\n \n String expResult = status;\n String result = instance.getStatus();\n \n assertEquals(expResult,result);\n }", "public void setShipping(String newShipping){\n post.setType(newShipping);\n }", "public void setShipmentCode(String shipmentCode) {\n this.shipmentCode = shipmentCode == null ? null : shipmentCode.trim();\n }", "public void setStatus(BugStatus newStatus)\n\t{\n\t\tstatus = newStatus;\n\t\tdateModified = new Date();\n\t}", "public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "public Vector<RationaleStatus> updateStatus()\r\n\t{\r\n\t\t//don't update status of the parent element!\r\n\t\tif ((this.name.compareTo(\"Tradeoffs\") == 0) ||\r\n\t\t\t\t(this.name.compareTo(\"Co-occurrences\") == 0))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//need to replace with real content!\r\n\t\tVector<RationaleStatus> newStat = new Vector<RationaleStatus>();\r\n\t\tTradeoffInferences inf = new TradeoffInferences();\r\n\t\tnewStat = inf.updateTradeoffStatus(this);\r\n\t\treturn newStat;\r\n\t\t\r\n\t}", "public void setShipInfo(Point xy, int state, int shipType) {\r\n\t\tshipTypeMap.put(xy, shipType);\r\n\t\tshipStateMap.put(xy, state);\r\n\t}", "int updateByPrimaryKeySelective(Shipping record);", "public abstract void updateStatus(PresenceType presenceType);", "Update withDeliveryPackage(DeliveryPackageInformation deliveryPackage);", "@Override\n\tpublic int updateState(TransactionalInformationDTO transactionalInformationDTO) {\n\t\treturn session.update(\"ProductMapper.updateState\", transactionalInformationDTO);\n\t}", "public void setStatus(MarketStatus status){\n this.status = status;\n }", "@Override\n public void setFollowableStatusByFSTID(Long fstId, Followable.FollowableStatus status) {\n logger.debug(\"setFollowableStatusByFSTID(fstId: {}, status: {})\", fstId, status);\n // get FST\n FollowStateTracker fst = fstRepository.findById(fstId)\n .orElseThrow( () -> new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Le suivi n'existe pas.\") );\n // process update\n this.setFollowableStatusByFST(fst, status);\n }" ]
[ "0.6548316", "0.65453935", "0.63656664", "0.6276706", "0.61616147", "0.6095673", "0.5995455", "0.5973753", "0.5832098", "0.58275557", "0.5813004", "0.58037513", "0.5796833", "0.5788366", "0.5762056", "0.57027173", "0.5692547", "0.5663408", "0.55946296", "0.55580616", "0.5508915", "0.5504379", "0.5503993", "0.54711217", "0.5458913", "0.54575783", "0.54545677", "0.54369825", "0.54283315", "0.5391569", "0.53905016", "0.53873897", "0.53760993", "0.53544664", "0.5350235", "0.534962", "0.534291", "0.53410244", "0.5329099", "0.532071", "0.53149384", "0.5314252", "0.5305639", "0.52968127", "0.528448", "0.52767104", "0.5275693", "0.526944", "0.52671385", "0.526435", "0.5263059", "0.5251261", "0.5247724", "0.5236302", "0.5234773", "0.5228722", "0.52265716", "0.5220525", "0.5217693", "0.5216016", "0.5214656", "0.52135074", "0.5212526", "0.52078253", "0.5200137", "0.51963735", "0.5194154", "0.51833576", "0.5180189", "0.5173253", "0.5171155", "0.5171109", "0.5165559", "0.5158133", "0.5158133", "0.51542586", "0.51538664", "0.51511294", "0.5135981", "0.5133205", "0.5132089", "0.5128729", "0.5125392", "0.5125122", "0.5122217", "0.51132214", "0.5113032", "0.5110848", "0.51079667", "0.5099204", "0.5096759", "0.50942975", "0.50855315", "0.50792795", "0.5078914", "0.50773084", "0.5076947", "0.5075171", "0.50721675", "0.5064991" ]
0.67330396
0
This method adds a new Customer to the System. It uses data class to add new Customer.
public void addCustomer(){ Customer customer = new Customer(); customer.setId(data.numberOfCustomer()); customer.setFirstName(GetChoiceFromUser.getStringFromUser("Enter First Name: ")); customer.setLastName(GetChoiceFromUser.getStringFromUser("Enter Last Name: ")); data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID())); System.out.println("Customer has added Successfully!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}", "@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }", "private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }", "public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }", "public Customermodel addCustomer(Customermodel customermodel) {\n\t\t return customerdb.save(customermodel);\n\t }", "@Override\n\tpublic void addCustomer(Customer customer) {\n\t\tcustomerDao.addCustomer(customer);\n\t}", "public void add(Customer customer) {\n\t\tSessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n\t\t//Step 2. Create/Obtain Session object\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//Step 3. Start/Participate in a Transaction\n\t\tTransaction tx = session.beginTransaction();\n\t\t\n\t\t//Now we can insert/update/delete/select whatever we want\n\t\tsession.save(customer); //save method generates insert query\n\t\t\n\t\ttx.commit();\n\t}", "public void addCustomer(Customer customer) {\r\n if (hasID(customer.getID())) {\r\n return;\r\n }\r\n\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] == null) {\r\n customers[i] = customer;\r\n return;\r\n }\r\n }\r\n\r\n System.err.println(\"No more room in database!\");\r\n }", "private Customer addCustomer(String title, String firstName, String lastName, String phone, String email, String addressLine1, String addressLine2, String city, String state, String postCode, String country) {\r\n out.print(title);\r\n out.print(firstName);\r\n out.print(lastName);\r\n out.print(phone);\r\n out.print(email);\r\n out.print(addressLine1);\r\n out.print(addressLine2);\r\n out.print(city);\r\n out.print(state);\r\n out.print(postCode);\r\n out.print(country);\r\n\r\n Customer customer = new Customer();\r\n customer.setCustomerTitle(title);\r\n customer.setCustomerFirstName(firstName);\r\n customer.setCustomerLastName(lastName);\r\n customer.setCustomerPhone(phone);\r\n customer.setCustomerEmail(email);\r\n customer.setCustomerAddressLine1(addressLine1);\r\n customer.setCustomerAddressLine2(addressLine2);\r\n customer.setCustomerCity(city);\r\n customer.setCustomerState(state);\r\n customer.setCustomerPostCode(postCode);\r\n customer.setCustomerCountry(country);\r\n\r\n em.persist(customer);\r\n return customer;\r\n }", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "public int addCustomer(Customer customer) {\n return model.addCustomer(customer);\n }", "@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean addCustomer(CustomerBean customer);", "public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}", "@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tint result=0;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = DBConnection.makeConnection();\n\t\t\tPreparedStatement Statement = connection.prepareStatement(INSERT_CUSTOMER_QUERY);\n\t\t\tStatement.setInt(1, customer.getCustomerId());\n\t\t\tStatement.setString(2, customer.getCustomerName());\n\t\t\tStatement.setString(3, customer.getCustomerAddress());\n\t\t\t\tStatement.setInt(4, customer.getBillAmount());\n\t\t\t\tresult=Statement.executeUpdate();\n\n\t\t} \n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\n\t\tif(result==0)\n\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Mobile Customer Add()\");\n\t}", "@Override\r\n\tpublic int insertNewCustomer(Customer cust) throws CustException {\n\t\tmanager.persist(cust);\r\n\t\treturn 1;\r\n\t}", "public boolean addCustomer(Customer customer) throws DatabaseOperationException;", "@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}", "@PostMapping(\"/customers\")\r\n\tpublic Customer addCustomer(@RequestBody Customer customer) {\n\t\tcustomer.setId(0);\r\n\t\t\r\n\t\tcustomerService.saveCustomer(customer);\r\n\t\treturn customer;\r\n\t}", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public au.gov.asic.types.AccountIdentifierType addNewCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().add_element_user(CUSTOMER$0);\n return target;\n }\n }", "@Override\r\n\tpublic Customer addCustomer(Customer customer) {\r\n\r\n\t\tif (!inputValidator.nameValidator(customer.getName()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid Customer Name.\");\r\n\t\tif (!inputValidator.userIdValidator(customer.getUserId()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid UserId.\");\r\n\t\tif (!inputValidator.contactValidator(customer.getContactNo()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Contact Number.\");\r\n\t\tif (!inputValidator.emailValidator(customer.getEmail()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Email.\");\r\n\t\tCustomer customer2 = customerRepository.save(customer);\r\n\t\treturn customer2;\r\n\r\n\t}", "public Customer addCustomer(Customer customer) {\n customer.setMemberSince(LocalDate.now());\n customer.setStatus(MembershipStatus.ACTIVE);\n return customerRepository.save(customer);\n }", "static void addCustomer(customer customer) {\n\n }", "@PostMapping( value = CustomerRestURIConstants.POST_CUSTOMER )\n\tpublic ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n\t\tlong id = customerService.save(customer);\n\t return ResponseEntity.ok().body(\"New Customer has been saved with ID:\" + id);\n\t}", "@Path(\"customer\")\n @Service({\"customer\"})\n public ResponseMessage addCustomer(Customer customer) {\n return csi.addCustomer(customer);\n }", "@PostMapping(\"/customers\")\n public Customer addCustomer(@RequestBody Customer theCustomer)\n {\n //also just in case they pass an id in JSON .. set id to o\n //this is to force a save of new item ... instead od update\n theCustomer.setId(0);\n customerService.save(theCustomer);\n return theCustomer;\n }", "public void addCustomer(Customer customer) throws UserExistsException {\r\n if (customerExists(customer)){\r\n throw new UserExistsException(\"Customer \"+ customer.getF_Name()+\" already exists\");\r\n }\r\n customers.add(customer);\r\n }", "@RequestMapping(value = \"/customers\", method = RequestMethod.POST)\n public ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n Customer aNewCustomer = customerService.newCustomer(customer);\n return new ResponseEntity<>(aNewCustomer, HttpStatus.CREATED);\n }", "public void addCustomer(CustomerWithGoods customer) {\n\t\tthis.allCustomers.add(customer);\n\t}", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "public int insertCustomer() {\n\t\treturn 0;\r\n\t}", "public void addUser(Customer user) {}", "public static DAO AddCustomer(Customer customer) throws CustomerIDExistsException, IllegalStateException\r\n\t{\r\n\t\treturn instance.addCustomer(customer);\r\n\t}", "public static boolean addCustomer(Customer customer) throws SQLException {\n \n if (customerInDatabase(customer.getCustomer())) {\n System.out.println(\"Customer \" + customer.getCustomer() + \" already in DB (addCustomer)\");\n return false;\n }\n else if (customer.getCustomer().isEmpty()) {\n System.out.println(\"Customer given is empty (addCustomer\");\n return false;\n }\n String insertStatement = \"INSERT INTO customer(customerName, addressId, active, createDate, createdBy, lastUpdateBy) \" +\n \"VALUES (?,?,?,?,?,?)\";\n \n DBQueryPrepared.setPreparedStatement(CONN, insertStatement);\n ps = DBQueryPrepared.getPreparedStatement();\n ps.setString(1, customer.getCustomer());\n ps.setString(2, String.valueOf(customer.getAddressId()));\n ps.setString(3, \"1\");\n ps.setString(4, model.timeConversion.getTime().toString());\n ps.setString(5, \"currentUser\");\n ps.setString(6, \"currentUser\");\n ps.execute();\n return true; \n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public boolean insertCustomer(Customer customer){\n\n ContentValues cv = new ContentValues();\n\n cv.put(\"customer_name\", customer.getName());\n cv.put(\"customer_description\", customer.getDescription());\n\n long insert = _db.insert(\"Customer\", null, cv);\n\n // Checks if rows have been updated.\n if(insert == -1){\n return false;\n }\n\n return true;\n }", "@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}", "public void register(Customer c) {\n\t\tUser.customers.add(c);\n\t}", "public static void createCustomer() throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\tSystem.out.println(\"[CUSTOMER CREATOR]\\n\");\r\n\t\tSystem.out.println(\"Enter the name of the customer you would like to create:\");\r\n\t\t\r\n\t\t// create a new customer with a user-defined name\r\n\t\tCustomer c = new Customer(inputString(false));\r\n\t\t// add the customer to the ArrayList\r\n\t\tcustomers.add(c);\r\n\t\t// display the edit screen for the customer\r\n\t\teditCustomer(c);\r\n\t}", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public void create(Customer customer) {\r\n this.entityManager.persist(customer);\r\n }", "public void addCustomer(CustomerSignup p)\n {\n Session session = this.sessionFactory.getCurrentSession();\n \n session.persist(p);\n \n CustomerLogin cl=new CustomerLogin();\n cl.setUsername(p.getUsername());\n cl.setPassword(p.getPassword());\n cl.setId(p.getId());\n session.persist(cl);\n \n Authorities a = new Authorities();\n a.setUsername(p.getUsername());\n a.setAuthority(\"ROLE_USER\");\n a.setId(p.getId());\n session.saveOrUpdate(a);\n\n session.flush();\n \n logger.info(\"Customer saved successfully, Customer Details=\"+p);\n }", "public void newCustomer () {\r\n\t\t//input category id.\r\n\t\t//TODO\r\n boolean ok = false;\r\n do { \r\n my.printCategoies();\r\n try {\r\n System.out.println(\"Category:\");\r\n Scanner scan = new Scanner(System.in);\r\n String cat = scan.next();\r\n \r\n Category c = my.getCategory(cat);\r\n //\r\n if (c!=null ) {\r\n // add the new customer to a category\r\n //input new customer.\r\n Customer theNewCustomer = readCustomer(cat);\r\n if ( theNewCustomer != null ) {\r\n my.add(c, theNewCustomer);\r\n ok = true;\r\n }\r\n \r\n }else{\r\n System.out.println(\"Category not exist\");\r\n }\r\n \r\n } catch (Exception e) {\r\n System.out.println(\"Sorry, try again\");\r\n }\r\n } while (ok == false);\r\n \r\n\t\t\r\n\t}", "public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}", "@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t try {\n\t\tShippingAddress shippingAddress=customer.getShippingAddress();\n\t session.save(customer);\n\t session.save(shippingAddress);\n\t\n\t\treturn true;\n\t }\n\t catch(HibernateException e)\n\t {\n\t \t\n\t \te.printStackTrace();\n\t \treturn false;\n\t }\n\t}", "public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "private Customer addCustomerDetails(CustomerRegRequestDto requestDto) {\n\t\tString customerId = null;\n\n\t\tOptional<Utility> details = utilityRepo.findByUtilityId(requestDto.getCustomerUtilityId());\n\t\tif (!details.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.UTILITY_NOT_FOUND);\n\n\t\tOptional<Customer> getCustomer = customerRepo.findFirstByOrderByModifiedDateDesc();\n\t\tif (getCustomer.isPresent()) {\n\t\t\tif (getCustomer.get().getCustomerId().charAt(0) == CustomerConstants.CUSTOMER_STARTING)\n\t\t\t\tcustomerId = Helper.generateNextCustomerId(getCustomer.get().getCustomerId(),\n\t\t\t\t\t\tdetails.get().getUtilityName());\n\t\t\telse\n\t\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t} else {\n\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t}\n\t\tmodelMapper.getConfiguration().setAmbiguityIgnored(true);\n\t\tCustomer addNewCustomer = modelMapper.map(requestDto, Customer.class);\n\t\taddNewCustomer.setCustomerId(customerId);\n\t\taddNewCustomer.setActive(true);\n\t\taddNewCustomer.setCreatedBy(requestDto.getUserId());\n\t\taddNewCustomer.setCreatedDate(new Date());\n\t\taddNewCustomer.setModifiedBy(requestDto.getUserId());\n\t\taddNewCustomer.setModifiedDate(new Date());\n\t\treturn customerRepo.save(addNewCustomer);\n\t}", "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 }", "@Test(alwaysRun=true, priority=15,enabled=true)\n\tpublic void addNewCustomer() throws InterruptedException, IOException {\t\n\t\tadminPage.addNewCustomer(driver);\n\t}", "void createAndManageCustomer() {\r\n\t\tSystem.out.println(\"\\nCreating and managing a customer:\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c = new Customer2(\"Sami\", \"Cemil\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c);\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tc.setLastName(\"Kamil\");\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\tem.close();\r\n\t}", "@PostMapping(\"/addcustomer\")\n\tpublic String save(@ModelAttribute(\"customer\") Customer theCustomer) {\n\t\tcustomerServices.save(theCustomer);\n\t\treturn \"redirect:/dairymilk/customers\";\n\t}", "public boolean addCustomer(String newCustomerName, double firstTransaction) {\n Customer foundCustomer = findCustomer(newCustomerName);\n\n if (foundCustomer != null) {\n System.out.println(newCustomerName + \" was found on file\");\n return false;\n }\n\n this.customers.add(new Customer(newCustomerName, firstTransaction));\n return true;\n }", "public void addCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_ADD_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.emailad);\n\t\t callStmt.setString(2,this.fname);\n\t\t callStmt.setString(3,this.lname);\n\t\t callStmt.setString(4,this.username);\n\t\t callStmt.setString(5,this.password);\n\t\t callStmt.setString(6,this.adminUsername);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}", "public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }", "void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }", "public static void addNewCustomer(final ArrayList<Car> carList, ArrayList<Customer> customerList, HashSet<Integer> idHashSet)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Input Customer ID and Customer Name\");\n\t\tint custIdInput = sc.nextInt();\n\t\t\n\t\t//Check if the Entered ID is unique and is not used by any other customer\n\t\tif(ValidationCheck.isIdUnique(custIdInput, idHashSet) != true)\n\t\t{\n\t\t\tSystem.out.println(\"Please Enter a Unique Customer Id\");\n\t\t\treturn;\n\t\t}\n\t\tidHashSet.add(custIdInput);\n\t\tString custNameInput = sc.next();\n\t\t\n\t\t//check if Name consists of valid characters\n\t\tif(ValidationCheck.isValidName(custNameInput) != true)\n\t\t{\n\t\t\tSystem.out.println(\"Please enter a valid Customer Name\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t Customer customerObj = new Customer(custIdInput, custNameInput, carList);\n\t customerList.add(customerObj);\n\t}", "@Override\n\t@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tcustomerDAO.saveCustomer(theCustomer);\n\t\t\n\t}", "public DAO addCustomer(Customer customer) throws CustomerIDExistsException, IllegalStateException\r\n\t{\r\n\t\tsynchronized (lock)\r\n\t\t{\r\n\t\t\tif (!isInitialized)\r\n\t\t\t{\r\n\t\t\t\tthrow new IllegalStateException(\"The DAO isn't initialized\", initializationError);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (findCustomerById(customer.getId()) != null)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomerIDExistsException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcustomers.add(customer);\r\n\t\t\t\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}", "public void add(Customer customer) throws CustomerAlreadyExistsException{\n\t\tList<Customer> checkLastName = repository.findByLastName(customer.getLastName());\n\t\tList<Customer> checkFirstName = repository.findByFirstName(customer.getFirstName());\n\t\t\n\t\tif ( (!checkLastName.isEmpty() ) && (!checkFirstName.isEmpty() ) ) {\n\t\t\tthrow new CustomerAlreadyExistsException(\"Customer already exists!\");\n\t\t}\n\t\trepository.save(customer);\n\t}", "@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}", "public void registerNewCustomers(Customer c) {\n if (!newCustomers.contains(c)\n && !modifiedCustomers.contains(c)) {\n newCustomers.add(c);\n }\n }", "public boolean createCustomer() throws ClassNotFoundException, SQLException {\n\t\tString name = KeyboardUtil.getString(\"Enter your name\");\n\t\tString password = KeyboardUtil.getString(\"Enter your password\");\n\t\tString city = KeyboardUtil.getString(\"Enter your city\");\n\t\tString state = KeyboardUtil.getString(\"Enter your state\");\n\t\tint zip = KeyboardUtil.getInt(\"Enter ZIP\");\n\t\tString country = KeyboardUtil.getString(\"Enter your country\");\n\t\t\n\t\tCustomer newCust = new Customer(password, city, state, zip, country);\n\t\ttry {\n\t\t\tConnection con = DAO.getConnection();\n\t\t\tnewCust.setCustomerName(name);\n\t\t\tString insertQuery = \"insert into Customer(Customer_Name, Password, City, State, Zip, Country) values(?, ?, ?, ?, ?, ?)\";\n\t\t\tPreparedStatement stmt = con.prepareStatement(insertQuery);\n\t\t\tstmt.setString(1, newCust.getCusomerName());\n\t\t\tstmt.setString(2, newCust.getPassword());\n\t\t\tstmt.setString(3, newCust.getCity());\n\t\t\tstmt.setString(4, newCust.getState());\n\t\t\tstmt.setInt(5, newCust.getZip());\n\t\t\tstmt.setString(6, newCust.getCountry());\n\t\t\tstmt.executeUpdate();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(InvalidNameException e) {\n\t\t\tSystem.out.println(\"Name should not contain numbers or special characters and should be atleast 6 characters long!\");\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\treturn false;\n\t}", "public Customer(String name, double initialAmount) { //constructor for our customer class\r\n this.name = name;\r\n addId++;\r\n this.custId=addId;\r\n this.transactions = new ArrayList<>();\r\n balance=initialAmount;\r\n transactions.add(initialAmount);\r\n }", "@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = POST, consumes = { APPLICATION_JSON_UTF8_VALUE })\n\tpublic Mono<ResponseEntity<?>> addCustomer(@RequestBody @Valid Customer newCustomer) {\n\n\t\treturn Mono.justOrEmpty(newCustomer.getId())\n\t\t\t.flatMap(id -> repo.existsById(id))\n\t\t\t.defaultIfEmpty(Boolean.FALSE)\n\t\t\t.flatMap(exists -> {\n\n\t\t\t\tif (exists) {\n\t\t\t\t\tthrow new CustomerServiceException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\"Customer already exists, to update an existing customer use PUT instead.\");\n\t\t\t\t}\n\n\t\t\t\treturn repo.save(newCustomer).map(saved -> {\n\t\t\t\t\treturn created(URI.create(format(\"/customers/%s\", saved.getId()))).build();\n\t\t\t\t});\n\t\t\t});\n\t}", "@RequestMapping(value = \"/createCustomer\", method = RequestMethod.POST)\n\tpublic String createCustomer(@RequestBody Customer customer) throws Exception {\n\n\t\tlog.log(Level.INFO, \"Customer zawiera\", customer.toString());\n\t\tcustomerRepository.save(customer); // Zapis do bazy\n\t\tSystem.out.println(\"##################### Utworzono klienta: \" + customer);\n\t\treturn \"Klient zostal stworzony\" + customer;\n\t}", "public boolean add(String firstName, String lastName, String email, String phoneNumber) {\n Customer c = new Customer(firstName, lastName, email, phoneNumber);\n return customerCrudInterface.add(c);\n\n }", "@Transactional\n\t@Override\n\tpublic Customer createCustomer(String name) {\n\t\t\n\t\tvalidateName(name);\n\t\tLocalDateTime now = LocalDateTime.now();\n\t\tAccount account = new Account(5000.0, now);\n\t\taccountRepository.save(account);\n\t\tSet<Item> set = new HashSet<>();\n\t\tCustomer customer = new Customer(name, account,set);\n\t\tcustRepository.save(customer);\n\t\treturn customer;\n\t\t\n\t}", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"[email protected]\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"[email protected]\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"[email protected]\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"[email protected]\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"[email protected]\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "@PostMapping(\"/customer\")\n\tpublic Customer createCustomer(@RequestBody Customer customer) {\n\t\treturn customerRepository.save(customer);\n\t}", "public void addCustomerTest() {\n\t\tassertNotNull(\"Test if there is valid Customer arraylist to add to\", CustomerList);\r\n\t\t\r\n\t\t//Given an empty list, after adding 1 item, the size of the list is 1 - normal\r\n\t\t//The item just added is as same as the first item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust1);\t\t\r\n\t\tassertEquals(\"Test that Customer arraylist size is 1\", 1, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust1, CustomerList.get(0));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 2? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust2);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 2, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust2, CustomerList.get(1));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 3? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust3);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 3, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust3, CustomerList.get(2));\r\n\t}", "@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}", "@Override\n\tpublic void create(Customer t) {\n\n\t}", "public Customer putCustomer(final Customer customer) {\n return dbClient.put(customer);\n }", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public int newCustomer(Map customerMap, Map allData) {\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "@PostMapping(\"/customers\")\n\tpublic Customer savecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomer.setId(0); //here 0 is not id, we are telling saveorupdate() DAO method to insert the customer object coz it inserts if id is empty(so give 0 or null)\n\t\tthecustomerService.saveCustomer(thecustomer);\n\t\treturn thecustomer;\n\t}", "@PostMapping(value = \"/customers\", consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void createCustomer(@RequestBody CustomerDTO custDTO) {\n\t\tlogger.info(\"Creation request for customer {}\", custDTO);\n\t\tcustService.createCustomer(custDTO);\n\t}", "void insert(Customer customer);", "public void AddCustomer(View v) {\r\n try {\r\n if (edtCustName.getText().toString().equalsIgnoreCase(\"\") || edtCustPhoneNo.getText().toString().equalsIgnoreCase(\"\") || edtCustAddress.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please fill all details before adding customer\");\r\n } else if (edtCustPhoneNo.getText().toString().length()!= 10)\r\n {\r\n MsgBox.Show(\"Warning\", \"Please fill 10 digit customer phone number\");\r\n return;\r\n } else{\r\n Cursor crsrCust = dbBillScreen.getCustomer(edtCustPhoneNo.getText().toString());\r\n if (crsrCust.moveToFirst()) {\r\n MsgBox.Show(\"Note\", \"Customer Already Exists\");\r\n } else {\r\n String gstin = etCustGSTIN.getText().toString().trim().toUpperCase();\r\n if (gstin == null) {\r\n gstin = \"\";\r\n }\r\n boolean mFlag = GSTINValidation.checkGSTINValidation(gstin);\r\n if(mFlag)\r\n {\r\n if( !GSTINValidation.checkValidStateCode(gstin,this))\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please Enter Valid StateCode for GSTIN\");\r\n }\r\n else {\r\n InsertCustomer(edtCustAddress.getText().toString(), edtCustPhoneNo.getText().toString(),\r\n edtCustName.getText().toString(), 0, 0, 0, gstin);\r\n //ResetCustomer();\r\n //MsgBox.Show(\"\", \"Customer Added Successfully\");\r\n Toast.makeText(myContext, \"Customer Added Successfully\", Toast.LENGTH_SHORT).show();\r\n ControlsSetEnabled();\r\n checkForInterStateTax();\r\n }\r\n }else\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please enter valid GSTIN for customer\");\r\n }\r\n\r\n }\r\n }\r\n } catch (Exception ex) {\r\n MsgBox.Show(\"Error\", ex.getMessage());\r\n }\r\n }", "public boolean newCustomer(String customerName, double transactions){\n Customer newCustomer = findCustomer(customerName);\n if(newCustomer == null){\n this.customers.add(new Customer(customerName,transactions));\n return true;\n }\n return false;\n }", "@Override\r\n\tpublic void insert(Customer customer) throws SQLException {\r\n\r\n\t\tString insertSql = \"INSERT INTO \" + tableName\r\n\t\t\t\t+ \"(name, surname, birth_date, birth_place, address, city, province, cap, phone_number, newsletter, email)\"\r\n\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(insertSql);\r\n\t\t\tpreparedStatement.setString(1, customer.getName());\r\n\t\t\tpreparedStatement.setString(2, customer.getSurname());\r\n\t\t\tpreparedStatement.setDate(3, (Date) customer.getBirthdate());\r\n\t\t\tpreparedStatement.setString(4, customer.getBirthplace());\r\n\t\t\tpreparedStatement.setString(5, customer.getAddress());\r\n\t\t\tpreparedStatement.setString(6, customer.getCity());\r\n\t\t\tpreparedStatement.setString(7, customer.getProvince());\r\n\t\t\tpreparedStatement.setInt(8, customer.getCap());\r\n\t\t\tpreparedStatement.setString(9, customer.getPhoneNumber());\r\n\t\t\tpreparedStatement.setInt(10, customer.getNewsletter());\r\n\t\t\tpreparedStatement.setString(11, customer.getEmail());\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t}", "public Customer(String name) {\n this.name = name;\n }", "public void register(Customer customer) {\n\t\tcustomerDao.register(customer);\r\n\t}", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "public void createCustomerTransaction(String customerId, TransactionData transData) {\n \t\n \tTransaction transEntity = new Transaction();\n \t\n \tBeanUtils.copyProperties(transData, transEntity);\n \ttransEntity.setCustomerId(customerId.trim().toUpperCase());\n \t//Save and flush\n \ttransactionRepository.saveAndFlush(transEntity);\n }", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "@Override\n\t@Transactional\n\tpublic void save(Customer customer) {\n\t\tcustomerDAO.save(customer);\n\t}", "public void addCustomerTest(String firstName, String lastName, String email){\n db = DatabaseHelper.getInstance(InstrumentationRegistry.getInstrumentation()\n .getTargetContext());\n DatabaseHelper.CustomerTable.Status stat = db.insertCustomerData(firstName, lastName, email);\n\n Customer customer = db.getCustomerByEmail(email);\n if (stat.getCode() == DatabaseHelper.CustomerTable.Status.SUCCESS.getCode() && customer != null) {\n // - add to the libs\n\n Utils.addCustomerToServiceUtils(customer);\n\n\n }\n }", "public boolean addCustomer(int phone, int discount, String name, String address, String group)\n\t{\n\t\tCustomer customer = new Customer(phone,discount,name,address,group);\n\t\treturn CustomerContainer.getInstance().addCustomer(customer);\n\t}" ]
[ "0.8048293", "0.7826554", "0.76512337", "0.7632747", "0.75968766", "0.7514099", "0.74985725", "0.74736106", "0.74726194", "0.74323136", "0.74165744", "0.7386761", "0.73710483", "0.736072", "0.73230976", "0.72543514", "0.7244313", "0.7216874", "0.7192936", "0.71867514", "0.7168817", "0.7168527", "0.7129177", "0.71211493", "0.71075976", "0.71014196", "0.7081601", "0.7076007", "0.7065693", "0.7049242", "0.7042794", "0.70372915", "0.70305794", "0.69689286", "0.69668365", "0.69472396", "0.6925173", "0.69098634", "0.6897661", "0.68647623", "0.68533254", "0.6824263", "0.6818112", "0.681259", "0.6799941", "0.6785058", "0.6777103", "0.67732435", "0.6772465", "0.6756526", "0.6735712", "0.6734073", "0.67157996", "0.6699294", "0.6698756", "0.6677368", "0.6656964", "0.664466", "0.6641599", "0.66415864", "0.6617048", "0.66165996", "0.66152245", "0.6592046", "0.658361", "0.6578806", "0.65687406", "0.6567433", "0.6566793", "0.6563398", "0.65522593", "0.65516996", "0.6551202", "0.6549057", "0.65442383", "0.6537926", "0.6531598", "0.65253687", "0.6519322", "0.6499776", "0.648597", "0.648597", "0.648597", "0.648597", "0.64751613", "0.64689314", "0.646368", "0.64625776", "0.6455235", "0.64531785", "0.64450634", "0.6432563", "0.6427457", "0.6426047", "0.642254", "0.6413995", "0.64055276", "0.64023715", "0.6393242", "0.63863504" ]
0.8425702
0
This method removes a Customer from the System. It uses data class to remove Customer.
public void removeCustomer(){ String message = "Choose one of the Customer to remove it"; if (printData.checkAndPrintCustomer(message)){ subChoice = GetChoiceFromUser.getSubChoice(data.numberOfCustomer()); if (subChoice!=0){ data.removeCustomer(data.getCustomer(subChoice-1),data.getBranch(data.getBranchEmployee(ID).getBranchID())); System.out.println("Customer has removed Successfully!"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "void removeCustomer(Customer customer);", "BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);", "@Override\n\tpublic void removeCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName() == null)\n\t\t\tthrow new Exception(\"No Such customer Exists.\");\n\t\t\n\t\tif(custCheck.getCustName().equalsIgnoreCase(customer.getCustName()) && customer.getId() == custCheck.getId()) {\n\t\t\ttry {\n\t\t\t\t\tStatement st = con.createStatement();\n\t\t\t\t\tString remove = String.format(\"delete from customer where id in('%d')\", \n\t\t\t\t\t\tcustomer.getId());\n\t\t\t\t\tst.executeUpdate(remove);\n\t\t\t\t\tSystem.out.println(\"Customer removed successfully\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB\");\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void removeCustomer(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Customers here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input customer id\n\t\t\tSystem.out.print(\"Enter Customer Id to delete the customer: \");\n\t\t\tint customerId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeCustomer(session,customerId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void remove(Customer c) {\n customers.remove(c);\n\n fireTableDataChanged();\n }", "public Boolean removeCustomer() {\r\n boolean ok = false;\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\tif (f != null) {\r\n ok = my.remove(f);\r\n\t\t\t\r\n\t\t}\r\n\t\telse alert(\"Customer not found\\n\");\t\r\n return ok;\r\n\t}", "public void removeUser(Customer user) {}", "public Customer removeCustomer(){\n Customer removed = customerArray[outIndex];\n outIndex++;\n if(outIndex== cMaxCustomerQueue) outIndex=0;\n numCustomers--;\n return removed;\n }", "void removeCustomer(String code) throws CustomerCodeNotExistsException;", "public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }", "void deleteCustomerById(int customerId);", "@Override\r\n\tpublic Customer removeCustomer(String custId) {\r\n\r\n\t\tOptional<Customer> optionalCustomer = customerRepository.findById(custId);\r\n\t\tCustomer customer = null;\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\tcustomerRepository.deleteById(custId);\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityDeletionException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "void deleteCustomerById(Long id);", "public void removeACustomer(long id) {\r\n\t\tSystem.out.println(\"\\nRemoving the customer: \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tCustomer2 customer = em.find(Customer2.class, id);\r\n\t\tif(customer == null){\r\n\t\t\tSystem.out.println(\"\\nNo such customer with id: \" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nCustomer info: \" + customer);\r\n\t\tem.remove(customer);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "@Override\n\tpublic void deleteCoustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().delete(customer);\n\t}", "public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}", "public boolean deleteCustomer(String custId);", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(Customer customer) {\n\t\thibernateTemplate.delete(customer);\n\n\t\tSystem.out.println(customer + \"is deleted\");\n\t}", "public static DAO RemoveCustomer(Customer customer) throws IllegalStateException\r\n\t{\r\n\t\treturn instance.removeCustomer(customer);\r\n\t}", "public void deleteCustomer(Customer customer) {\n\n\t\tcustomers.remove(customer);\n\n\t\tString sql = \"UPDATE customer SET active = 0 WHERE customerId = ?\";\n\n\t\ttry ( Connection conn = DriverManager.getConnection(URL, USER_NAME, PASSWORD);\n\t\t\t\tPreparedStatement prepstmt = conn.prepareStatement(sql); ) {\n\n\t\t\tint customerId = Customer.getCustomerId(customer);\n\t\t\tprepstmt.setInt(1, customerId);\n\t\t\tprepstmt.executeUpdate();\n\n\t\t} catch (SQLException e){\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}", "public int removeCustomer(long id) {\n return model.deleteCustomer(id);\n }", "public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }", "@DeleteMapping()\n public Customer deleteCustomer(@RequestBody Customer customer ) {\n customerRepository.delete(customer);\n return customerRepository.findById(customer.getId()).isPresent() ? customer : null;\n }", "public void delete(Customer customer) throws CustomerNotFoundException {\r\n customer = this.entityManager.merge(customer);\r\n this.entityManager.remove(customer);\r\n }", "void delete(Customer customer);", "@Test\n public void testCustomerFactoryRemove() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n customerController.removeCustomer(CUSTOMER_NAME,1);\n assertEquals(0, customerController.getCustomerList().size());\n }", "public static void removeBankAccount(Customer customer) {\r\n\t\tcustomerBankAccountList.remove(customer);\t\r\n\t}", "public void removeCustomer(int id) {\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] != null && customers[i].getID() == id) {\r\n customers[i] = null;\r\n return;\r\n }\r\n }\r\n System.err.println(\"Could not find a customer with id: \" + id);\r\n }", "@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}", "public void deleteSalerCustomer(int uid) {\n\t\tthis.salerCustomerMapper.deleteSalerCustomer(uid);\n\t}", "public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}", "@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}", "@Test\r\n\tpublic void removeCustomerTest() {\n\t\tassertNotNull(\"Test if there is valid Customer arraylist to add to\", CustomerList);\r\n\t\t\r\n\t\t//Given an empty list, after adding 1 item, the size of the list is 1 - normal\r\n\t\t//The item just added is as same as the first item of the list\r\n\t\tCustomerMain.removeCustomer(CustomerList);\t\t\r\n\t\tassertEquals(\"Test that Customer arraylist size is 1\", 1, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is deleted\", cust1, CustomerList.get(0));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 2? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.removeCustomer(CustomerList);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 2, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is deleted\", cust2, CustomerList.get(1));\t\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 3? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.removeCustomer(CustomerList);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 3\", 3, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is deleted\", cust3, CustomerList.get(2));\t\r\n\t}", "@Override\n public void deleteCustomer(UUID id) {\n log.debug(\"Customer has been deleted: \"+id);\n }", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.DELETE)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void removeCustomer(@PathVariable(\"id\") int id){\n //simply remove the customer using the id. If it does not exist, nothing will happen anyways\n service.removeCustomer(id);\n }", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}", "public void delete(Customer customer) {\r\n EntityManagerHelper.beginTransaction();\r\n CUSTOMERDAO.delete(customer);\r\n EntityManagerHelper.commit();\r\n renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()).requestRender();\r\n //renderManager.removeRenderer(renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()));\r\n }", "public void onRemoveRequest(CustomerRequest request);", "@Override\n\tpublic void delete(Customer o) {\n\n\t\tif (o.getId() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString deleteQuery = \"DELETE FROM TB_customer WHERE \" + COLUMN_NAME_ID + \"=\" + o.getId();\n\n\t\ttry (Statement deleteStatement = dbCon.createStatement()) {\n\t\t\tdeleteStatement.execute(deleteQuery);\n\t\t} catch (SQLException s) {\n\t\t\tSystem.out.println(\"Delete of customer \" + o.getId() + \" falied : \" + s.getMessage());\n\t\t}\n\t}", "public boolean deleteCustomer() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void deleteOne(Customer c) {\n\t\tthis.getHibernateTemplate().delete(c);\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}", "public boolean deleteCustomer(int id, int customerID)\n throws RemoteException, DeadlockException;", "public DAO removeCustomer(Customer customer) throws IllegalStateException\r\n\t{\r\n\t\tsynchronized (lock)\r\n\t\t{\r\n\t\t\tif (!isInitialized)\r\n\t\t\t{\r\n\t\t\t\tthrow new IllegalStateException(\"The DAO isn't initialized\", initializationError);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcustomers.remove(customer);\r\n\t\t\t\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}", "public void DeleteCust(String id);", "void removeAuthorisationsOfCustomer(CustomerModel customer);", "public static int deleteCustomer(long custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = pool.getConnection();\n\t\t\tStatement stmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(\"DELETE FROM customersCoupons WHERE customerID=\" + custID);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CouponSystemException(\"Customer Not Deleted\");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }", "@PreRemove\n public void removeCouponFromCustomer(){\n for (Customer customer: purchases){\n customer.getCoupons().remove(this);\n }\n }", "private void endCustomer(MyCustomer customer){ \n\tDo(\"Table \" + customer.tableNum + \" is cleared!\");\n\thost.msgTableIsFree(customer.tableNum);\n\tcustomers.remove(customer);\n\tstateChanged();\n }", "@Override\n\tpublic void remove(CustomerLogin customerLogin) {\n\t\tdao.delete(customerLogin);\n\t}", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\n\t public ResponseEntity<?> deleteCustomer(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.deleteCustomer(id, customer);\n\t }", "public void exitCustomer(int i)\r\n\t{\r\n\t\tcustomers.add(inStore.get(i));\r\n\t\tinStore.remove(i);\r\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n Session session =sessionFactory.getCurrentSession();\n Customer customer= getCustomer(customerId);\n session.delete(customer);\n\t\treturn true;\n\t}", "public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}", "@DeleteMapping(\"/customers/{customerId}\")\n public String deleteCustomer(@PathVariable int customerId) {\n CustomerHibernate customerHibernate = customerService.findById(customerId);\n\n if (customerHibernate == null) {\n throw new RuntimeException(\"Customer id not found - \" + customerId);\n }\n customerService.deleteById(customerId);\n\n return String.format(\"Deleted customer id - %s \", customerId);\n }", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}", "@Then(\"^user deletes customer \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void user_deletes_customer(String arg1) throws Throwable {\n\t DeleteCustomer delete=new DeleteCustomer();\r\n\t StripeCustomer.response=delete.deleteCustomer(new PropertFileReader().getTempData(arg1));\r\n\t}", "@DELETE\n\t@Path(\"/delete\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void delCustomer(String id)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Delete the customers table\n\t\tdb.Delete(\"DELETE FROM CUSTOMERS WHERE id='\" + id + \"'\");\n\n\t\t// Delete the bookings table\n\t\tdb.Delete(\"DELETE FROM BOOKINGS WHERE CUSTOMERID='\" + id + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "@DeleteMapping(\"/customer/id/{id}\")\r\n\tpublic Customer deleteCustomerbyId(@PathVariable(\"id\") int customerId) {\r\n\tif(custService.deleteCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.deleteCustomerbyId(customerId);\r\n\t}", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void deleteCustomer(Integer id) {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query for deleting the account\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\t\"delete from Customer where customerId=:id\",Customer.class);\n\t\tquery.setParameter(id, id);\n\t\tquery.executeUpdate();\n\t}", "@ApiOperation(value = \"Delete a customer\", notes = \"\")\n @DeleteMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public void deleteCustomer(@PathVariable Long customerId) {\n\n customerService.deleteCustomerById(customerId);\n\n }", "public void deleteCustomer(String id) {\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\ttry {\n\t\t\tStatement deleteStatement = connection.createStatement();\n\t\t\t\n\t\t\tString deleteQuery = \"DELETE FROM Customer WHERE CustomerID='\"+id+\"')\";\n\t\t\tdeleteStatement.executeUpdate(deleteQuery);\t\n\t\t\t\n\t\t\t//TODO delete all DB table entries related to this entry:\n\t\t\t//address\n\t\t\t//credit card\n\t\t\t//All the orders?\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\n\t}", "Customer removeCustomer()\r\n {\r\n // If queue is empty, return NULL.\r\n if (this.first == null)\r\n return null;\r\n \r\n // Store previous first and move first one node ahead\r\n Customer temp = this.first;\r\n \r\n this.first = this.first.next;\r\n \r\n // If first becomes NULL, then change rear also as NULL\r\n if (this.first == null)\r\n this.last = null;\r\n return temp;\r\n }", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "@Override\r\n\tpublic void delete(String cust_ID) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setString(1, cust_ID);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void clearCustomers()\r\n\t{\r\n\t\tfor(int i=0;i<inStore.size();i++)\r\n\t\t{\r\n\t\t\tcustomers.add(inStore.get(i));\r\n\t\t}\r\n\t\tinStore.clear();\r\n\t}", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now delete the customer using parameter theId i.e., Customer id (primary key)\n\t\t//HQL query\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\n\t\t//prev parameter theId is assigned to customerId\n\t\ttheQuery.setParameter(\"customerId\",theId);\n\n\t\t//this works with update, delete , so on ...\n\t\ttheQuery.executeUpdate();\n\n\t}", "public static void deleteCustomer(int customerID) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String deleteStatement = \"DELETE from customers WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, deleteStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.setInt(1,customerID);\r\n ps.execute();\r\n\r\n if (ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n } else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "@Override\n\t/**\n\t * Removes all Coupons from the Coupon table in the database related to\n\t * Customer ID received\n\t */\n\tpublic void deleteCouponsByCustomerID(int custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to remove Coupons related to specified\n\t\t\t// Customer ID from the Coupon table via prepared statement\n\t\t\tString deleteCouponsByCustomerIDSQL = \"delete from coupon where id in (select couponid from custcoupon where customerid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(deleteCouponsByCustomerIDSQL);\n\t\t\t// Set Customer ID from variable that method received\n\t\t\tpstmt.setInt(1, custID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint resRemByCust3 = pstmt.executeUpdate();\n\t\t\tif (resRemByCust3 != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupons of specified Customer have been deleted from Coupon table successfully\");\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupons related to\n\t\t\t\t// specified Customer not found in the database\n\t\t\t\tSystem.out.println(\"Coupons removal has been failed - subject entries not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon removal from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupons removal has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "boolean delete(CustomerOrder customerOrder);", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "private void deleteCustomerById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int idCustomer = Integer.parseInt(request.getParameter(\"id\"));\n CustomerDao.deleteCustomer(idCustomer);\n response.sendRedirect(\"/\");\n }", "private void deletePurchase(CustomerService customerService) throws DBOperationException\n\t{\n\t\tSystem.out.println(\"To delete coupon purchase enter coupon ID\");\n\t\tString idStr = scanner.nextLine();\n\t\tint id;\n\t\ttry\n\t\t{\n\t\t\tid=Integer.parseInt(idStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid id\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// retrieve all coupons of this customer\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tCoupon coupon = null;\n\t\t\n\t\t// find coupon whose purchase to be deleted\n\t\tfor(Coupon tempCoupon : coupons)\n\t\t\tif(tempCoupon.getId() == id)\n\t\t\t{\n\t\t\t\tcoupon = tempCoupon;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t// delete purchase of the coupon\n\t\tif(coupon != null)\n\t\t{\n\t\t\tcustomerService.deletePurchase(coupon);\n\t\t\tSystem.out.println(customerService.getClientMsg());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Customer dors not have coupon with this id\");\n\t}", "void deleteCustomerDDPayById(int id);", "@GetMapping(\"/delete\")\r\n\tpublic String deleteCustomer(@RequestParam(\"customerId\") int id){\n\t\tcustomerService.deleteCustomer(id);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"redirect:/customer/list\";\r\n\t}", "public boolean removeCustomer(String c){\n\t\tif(containsCustomer(c)){\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\tlist.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void detachACustomer() {\r\n\t\tSystem.out.println(\"\\nDetaching a customer\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\ttx.begin();\r\n\r\n\t\tCustomer2 customer= em.find(Customer2.class, (long)90);\r\n\t\tSystem.out.println(customer);\r\n\t\t\r\n\t\ttx.commit(); \r\n\r\n\t\t// customer koparilmis(detached) durumda. Yapilan degisiklikleri VT'ye yazmak icin\r\n\t\t// merge yapilmali.\r\n\t\tcustomer.setLastName(\"Detached\");\r\n\t\tSystem.out.println(\"Does persistent context have customer? \" + em.contains(customer));\r\n\t\tem.close();\r\n\t\t\r\n\t\tem = emf.createEntityManager();\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tem.merge(customer);\r\n\t\ttx.commit();\r\n\t\t\r\n\t\tCustomer2 retrievedCustomer = em.find(Customer2.class, (long)90);\r\n\t\tSystem.out.println(retrievedCustomer);\r\n\t\r\n\t\tem.close();\r\n\t}", "public Builder clearCustomer() {\n if (customerBuilder_ == null) {\n customer_ = null;\n onChanged();\n } else {\n customer_ = null;\n customerBuilder_ = null;\n }\n\n return this;\n }", "@DeleteMapping(\"/customers/{customer_id}\")\n\tpublic String deletecustomer(@PathVariable(\"customer_id\") int customerid ) {\n\t\t\n\t\t//first check if there is a customer with that id, if not there then throw our exception to be handled by @ControllerAdvice\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t//if it is happy path(customer found) then go ahead and delete the customer\n\t\tthecustomerService.deleteCustomer(customerid);\n\t\treturn \"Deleted Customer with id: \"+customerid;\n\t}", "public void removeCustomerCompany(Long id) \n\t{\n\t\tQuery queryUsers = this.entityManager.createNamedQuery(\"CompanyUser.removeByCompanyId\");\n\t\tqueryUsers.setParameter(\"prCompanyId\", id);\n\t\tqueryUsers.executeUpdate();\n\t\tQuery queryCompany = this.entityManager.createNamedQuery(\"CustomerCompany.removeById\");\n\t\tqueryCompany.setParameter(\"prId\", id);\n\t\tqueryCompany.executeUpdate();\n\t}", "@Override\n\tpublic Uni<Boolean> deleteCustomerById(Long cid) {\n\t\treturn repo.deleteById(cid).chain(repo::flush).onItem().transform(ignore ->true);\n\t}", "@Test\r\n\tpublic void deleteTeamCustomerByManagerCustFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamCustomerByManagerCustFk \r\n\t\tInteger team_teamId_2 = 0;\r\n\t\tInteger related_customerbymanagercustfk_customerId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamCustomerByManagerCustFk(team_teamId_2, related_customerbymanagercustfk_customerId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamCustomerByManagerCustFk\r\n\t}", "@GET\n\t@Path(\"DeleteCustomer\")\n\tpublic Reply deleteCustomer(@QueryParam(\"id\") int id) {\n\t\treturn ManagerHelper.getCustomerManager().deleteCustomer(id);\n\t}", "@Test\n\t// @Disabled\n\tvoid testDeleteCustomer() {\n\t\tCustomer customer = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tcustRep.deleteById(1);\n\t\tCustomer persistedCust = custService.deleteCustomerbyId(1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t\tassertEquals(\"tommy\", persistedCust.getFirstName());\n\n\t}", "@Atomic\n public void deleteAdhocCustomer(AdhocCustomer adhocCustomer) {\n }", "@Override\n\tpublic void remove(cp_company cp) {\n\t\t\n\t}", "public void deleteCustomer(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"DELETE FROM Customer WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCID(CID);\n pStmt.setInt(1, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "private void removeToken(String customerId, String token) {\n // TODO remove the token\n }", "public void deleteOneForCustomer(Customer customer, int todoListNum) {\n TodoList todoList = todoListDao.findByCustomerAndNum(customer, todoListNum);\n todoListDao.deleteById(todoList.getId());\n computeTodoListNum(customer);\n }" ]
[ "0.80665255", "0.7975913", "0.7946325", "0.7829185", "0.7336204", "0.7209788", "0.7201746", "0.7184889", "0.70751864", "0.7058915", "0.7058674", "0.7029129", "0.6990208", "0.6974343", "0.69660836", "0.6939038", "0.6922966", "0.6865151", "0.68455213", "0.68455213", "0.6836039", "0.6816751", "0.67983854", "0.6779324", "0.6762548", "0.6748606", "0.6712906", "0.6690932", "0.66804636", "0.6644382", "0.6640555", "0.66219443", "0.6613442", "0.6610659", "0.66009283", "0.6536488", "0.64853984", "0.64685345", "0.6466203", "0.6428868", "0.6428599", "0.6405259", "0.6405095", "0.6404649", "0.64039886", "0.64027584", "0.6399131", "0.63911134", "0.6387576", "0.63843316", "0.6379076", "0.6376945", "0.635688", "0.63302267", "0.6323841", "0.6298525", "0.62901455", "0.6281244", "0.62742037", "0.6262764", "0.6249107", "0.62465686", "0.6202292", "0.6163135", "0.6160535", "0.6158377", "0.6152581", "0.6140753", "0.61215407", "0.611006", "0.6106752", "0.61051375", "0.60982436", "0.6094304", "0.6081265", "0.60745513", "0.6073976", "0.6073097", "0.606264", "0.6057327", "0.60553026", "0.60533786", "0.6045517", "0.6034885", "0.6013356", "0.59999996", "0.5967246", "0.59603524", "0.59588206", "0.5906229", "0.5874579", "0.5868714", "0.5841854", "0.58317596", "0.5825842", "0.5812846", "0.58050007", "0.5804894", "0.57910216", "0.57883173" ]
0.779623
4
This method creates a Random unique number between 100000 and 999999.
public int getUniqueTrackingNumber(){ boolean is_used = false; int number; do { number = (int)(Math.random() * 999999 + 100000); for (int i = 0; i < trackingNumbers.size() ; i++) { if (trackingNumbers.get(i) == number){ is_used=true; } } }while (is_used); trackingNumbers.add(number); return number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "public static String randomNumberGenerator() {\r\n\t\tint max = 999999999; // e.g. 714053349 (9 digits)\r\n\t\tRandom rand = new Random();\r\n\t\tint min = 0;\r\n\t\tint randomNum = rand.nextInt(max - min + 1) + min;\r\n\t\treturn Integer.toString(randomNum);\r\n\t}", "public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }", "private int generateRandomNumber() {\n\t\treturn (int) Math.floor(Math.random() * Constants.RANDOM_NUMBER_GENERATOR_LIMIT);\n\t}", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "void setRandomNo() {\n\t\tno = 10000000 + (int) (Math.random() * 90000000);\n\t}", "public static long getID() {\n int localizador = 0;\n Long min = 1000000000L;\n Long max = 9999999999L;\n\n do {\n localizador = (int) Math.floor(Math.random() * (max - min + 1) + min);\n } while (Integer.toString(localizador).length() != 10);\n return localizador;\n }", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public static long generateCode() {\n long code = (long) (100000 + Math.random() * 899999l);\n return code;\n }", "public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}", "public static int randNum() {\r\n\t\tint rand = (int)(Math.random()*((100)+1)); // Num generated between [0, 100]\r\n\t\treturn rand;\r\n\t}", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "public static String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(9999999);\n\n // this will convert any number sequence into 6 character.\n return String.format(\"%07d\", number);\n }", "public String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(899999) + 100000;\n\n // this will convert any number sequence into 6 character.\n String formatted_code = String.format(\"%06d\", number);\n\n return formatted_code;\n }", "public static int getRandomNumberString() {\n // It will generate 6 digit random Number.\n // from 0 to 999999\n Random rnd = new Random();\n int number = rnd.nextInt(999999);\n\n // this will convert any number sequence into 6 character.\n return number;\n }", "public static int generateDigit() {\n\t\t\n\t\treturn (int)(Math.random() * 10);\n\t}", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static int getRandomInt()\n {\n return ThreadLocalRandom.current().nextInt(1000000000, 2147483647);\n }", "public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}", "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public static int generateUniqueId(){\r\n String returnme = GregorianCalendar.getInstance().getTimeInMillis() + \"\";\r\n return Integer.parseInt(returnme.substring(returnme.length() - 9, returnme.length()));\r\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "public static int randomNext() { return 0; }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "public long getRandLong()\n {\n long lowerBound = 2000;\n long upperBound = 6000;\n Random r = new Random();\n \n long randLong = lowerBound + (long)(r.nextDouble()*(upperBound - lowerBound));\n return randLong;\n }", "public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}", "public static int randomRound(){\r\n int max = 1000;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n return randNum;\r\n }", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "private int _randomCode () {\n Random random = new Random();\n code = random.nextInt(999999);\n return code;\n }", "public static int customRandom(int range)\n {\n \tint random = (int)(Math.random()*10)%range;\n\t\n\treturn random;\n }", "public static int randomNumber100(){\r\n int max = 100;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "private static String createRandomInteger(int aStart, long aEnd,Random aRandom){\n \tif ( aStart > aEnd ) {\n\t throw new IllegalArgumentException(\"Start cannot exceed End.\");\n\t }\n\t long range = aEnd - (long)aStart + 1;\n\t long fraction = (long)(range * aRandom.nextDouble());\n\t long randomNumber = fraction + (long)aStart;\n\t return Long.toString(randomNumber);\n\t }", "public int randomNum()\r\n {\r\n Random rand = new Random();\r\n int n = rand.nextInt(52)+1;\r\n return n;\r\n }", "private int getRandomNumber(int limit) {\n\t\tlong seed = System.currentTimeMillis();\n\t\tRandom rand = new Random(seed);\n\t\treturn rand.nextInt(limit) + 1;\n\t}", "public int idGenerator() {\n Random random = new Random();\n int id;\n return id = random.nextInt(10000);\n }", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "public static int randomNumber(){\r\n int max = 10;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "private void getRandomNumber() {\n\t\tRandom random = new Random();\n\t\tint randomCount = 255;\n\t\tint randNum = 0; \n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\trandNum = random.nextInt(randomCount);\n\t\t\tswitch (numberType) {\n\t\t\tcase 1:\n\t\t\t\trandomNumbers.add(Integer.toString(randNum));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(randNum > 15)\n\t\t\t\t\trandomNumbers.add(String.format(\"%8s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\telse\n\t\t\t\t\trandomNumbers.add(String.format(\"%4s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trandomNumbers.add(Integer.toHexString(randNum));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "public static String generateMobNum() {\n\t\tString number = RandomStringUtils.randomNumeric(10);\t\n\t\treturn (number);\n\t}", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "public static int getRandomNumber(){\n int random = 0; // set variable to 0\r\n random = (int)(Math.random()*10) + 1; //generate random number between 1 and 10\r\n return random; //return random number\r\n }", "UUID generateRandomUuid();", "private static int generateRandomNumber(int min, int max) {\n return (int)Math.floor(Math.random() * (max - min + 1)) + min;\n }", "public static int randomNumberAlg(){\r\n int max = 10;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "public static String generateTempSafePalNumber(int minimum, int maximum){\n Random rn = new Random();\n int n = maximum - minimum + 1;\n int i = rn.nextInt() % n;\n int randomNum = minimum + i;\n //changes the negative number to positve\n if(randomNum<0){randomNum= -randomNum;}\n\n return \"TMP_SPL\" + Integer.toString(randomNum);\n }", "public NUID() {\n // Generate a cryto random int, 0 <= val < max to seed pseudorandom\n seq = nextLong(PRAND, maxSeq);\n inc = minInc + nextLong(PRAND, maxInc - minInc);\n pre = new char[preLen];\n for (int i = 0; i < preLen; i++) {\n pre[i] = '0';\n }\n randomizePrefix();\n }", "private static int newNumber()\n\t{\n\t\tdouble initial = Math.random();\n\t\tdouble rangeAdjusted = initial * (10000 - 1001) + 1000;\n\t\tint rounded = (int)Math.round(rangeAdjusted);\n\t\treturn rounded;\n\t}", "public static long randomId() {\n UUID uuid = UUID.randomUUID();\n long mostSignificantBits = uuid.getMostSignificantBits();\n long leastSignificantBits = uuid.getLeastSignificantBits();\n return (mostSignificantBits ^ leastSignificantBits) & Long.MAX_VALUE;\n }", "private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "private int getUniqueAccountNumber () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentAccountNumbers =\n hashMapOfAllAccts.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int acctNum : listOfCurrentAccountNumbers) {\n if (candidateNumber == acctNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "public static long generateUniqueId() {\n // A UUID represents a 128-bit value, that is 16 bytes long value.\n final UUID uuid = UUID.randomUUID();\n return Math.abs(uuid.getMostSignificantBits());\n }", "private static long zeroTo(final long maximum) {\n return (long) (Math.random() * maximum);\n }", "protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "private int generateWholoeNumInRange( int min, int max ) {\r\n\r\n // Evaluate random number from min to max including min and max\r\n return (int)(Math.random()*(max - min + 1) + min);\r\n\r\n }", "private String getRandomUniqueId() {\r\n return \"WEBSOCKET.\" + new Random().nextInt(100);\r\n }", "public static String getRandomString() {\n \tif (random == null)\n \t\trandom = new Random();\n \treturn new BigInteger(1000, random).toString(32);\n }", "public int randomNum() {\n\t\treturn 1 + (int) (Math.random() * 3); // randomNum = minimum + (int)(Math.random() * maximum);\n\t}", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "int getRandom(int limit){\n Random rand = new Random();\n int upperBound = limit;\n return rand.nextInt(upperBound) + 1;\n }", "private static int generateRandom(int min, int max) {\n // max - min + 1 will create a number in the range of min and max, including max. If you don´t want to include it, just delete the +1.\n // adding min to it will finally create the number in the range between min and max\n return r.nextInt(max-min+1) + min;\n }", "public static long randomLong() {\n return randomLong(Long.MIN_VALUE, Long.MAX_VALUE);\n }", "public static long randomFastLong() {\n return ThreadLocalRandom.current().nextLong();\n }", "public static UUID randomFastUUID() {\n return new UUID(RANDOM_UUID_MSBS, ThreadLocalRandom.current().nextLong());\n }", "public static final BigInteger generateRandomNumber(BigInteger maxValue, Random random)\r\n\t{\r\n\t\tBigInteger testValue;\r\n\t\tdo{\r\n\t\t\ttestValue = new BigInteger(maxValue.bitLength(), random);\r\n\t\t}while(testValue.compareTo(maxValue) >= 0);\r\n\t\t\r\n\t\treturn testValue;\r\n\t}", "private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }", "protected String generateRandomId(String prefix) {\n int nextInt = RANDOM.nextInt();\n nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);\n return prefix + \"_\" + String.valueOf(nextInt);\n }", "public Set<Integer> generateLotteryNumbers ()\n {\n\t Set<Integer> randomGenerator = new HashSet<Integer>(6); \n\t Random randomnum = new Random();\n\t \n\t\n\n\t \n\t for (Integer i=0; i<6;i++) \n\t {\n\t\t //keep looping until able to add a add number into a set that does not not exist and is between 1 and49\n\t\t \n\t\t while (randomGenerator.add(1+randomnum.nextInt(49)) == false) {\n\t\t\t \n\t\t\t\n\t\t }\n\t\t \n\n\t }\n\t \n\t \n\t \n return randomGenerator;\n \n }", "static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "public static String createRandomNum() {\n\t\tlogger.debug(\"Navigating to URL\");\n\t\tString num = \"\";\n\t\ttry {\n\t\t\tnum = RandomStringUtils.random(4, true, true);\n\t\t\tlogger.debug(\"Generated Random Number is : \" + num);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t}", "public UUID generate() {\n return UUID.randomUUID();\n }", "public static int generarNumeroAleatorio(int limite){ //Entre 0 y limite - 1\n return (int) (Math.random()*limite);\n }", "private int generateRandomNb(int min, int max) {\n Random random = new Random();\n\n return random.nextInt((max - min) + 1) + min;\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "public String generateTrackingNumber() {\n String randChars = \"ABCDEFGHIJ0123456789\";\n StringBuilder trackingNumber = new StringBuilder();\n Random rand = new Random();\n \n while(trackingNumber.length() < 12) {\n int i = (int) (rand.nextFloat() * randChars.length());\n trackingNumber.append(randChars.charAt(i));\n }\n String trackingNum = trackingNumber.toString();\n return trackingNum;\n }", "public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "private String getRandomSeed() {\n long newSeed = 0;\n Random randBoolean = new Random(randomSeed);\n for (int i = 0; i < 48; i++) {\n if (randBoolean.nextBoolean()) {\n newSeed += 1 << i;\n }\n }\n if (newSeed < 0) {\n newSeed = Math.abs(newSeed);\n }\n\n String s = \"\";\n if (newSeed == 0) {\n s += \"0\";\n } else {\n while (newSeed != 0) {\n long num = (newSeed & (0xF));\n if (num < 10) {\n s = num + s;\n } else {\n s = ((char) (num + 55)) + s;\n }\n newSeed = newSeed >> 4;\n }\n }\n return s;\n }", "public static String nextUuId() {\n UUID uuid = UUID.randomUUID();\n\n StringBuilder buff = new StringBuilder(32);\n long2string(uuid.getMostSignificantBits(), buff);\n long2string(uuid.getLeastSignificantBits(), buff);\n\n return buff.toString();\n }", "public static int makeSegID() {\n int newID = (int) (Math.random() * 100000000);\n return newID;\n }", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "public String generateNumber(int length) {\n int maxNumber = Integer.parseInt(new String(new char[length]).replace(\"\\0\", \"9\"));\n int intAccountNumber = ThreadLocalRandom.current().nextInt(0, maxNumber + 1);\n int accountNumberLength = String.valueOf(intAccountNumber).length();\n StringBuilder stringBuilder = new StringBuilder();\n if (accountNumberLength < length) {\n stringBuilder.append(new String(new char[length - accountNumberLength]).replace(\"\\0\", \"0\"));\n }\n stringBuilder.append(intAccountNumber);\n return stringBuilder.toString();\n }", "public String generateId() {\n return RandomStringUtils.randomAlphabetic(32);\n }", "@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }", "public int geraNumeroUnico()\r\n {\r\n Random numero = new Random();\r\n numUnico = numero.nextInt(99999);\r\n numUnico = numUnico + 1000;\r\n \r\n if(conjNumeros.contains(numUnico) == true)\r\n isUnico = false;\r\n else \r\n isUnico = true;\r\n \r\n while(isUnico == false)\r\n { \r\n numUnico = numero.nextInt(99999);\r\n numUnico = numUnico + 1000;\r\n \r\n if(conjNumeros.contains(numUnico) == true)\r\n isUnico = false;\r\n else\r\n isUnico = true;\r\n } \r\n conjNumeros.add(numUnico);\r\n \r\n return numUnico;\r\n }", "public void randomNumberTest() {\n //Generating streams of random numbers\n Random random = new Random();\n random.ints(5)//(long streamSize, double randomNumberOrigin, double randomNumberBound)\n .sorted()\n .forEach(System.out::println);\n /*\n -1622707470\n -452508309\n 1346762415\n 1456878623\n 1783692417\n */\n }" ]
[ "0.7450962", "0.7420014", "0.7139777", "0.7105852", "0.6974985", "0.6958924", "0.6944076", "0.6877995", "0.68757933", "0.6856146", "0.6831336", "0.6781355", "0.674746", "0.667093", "0.6661545", "0.663667", "0.66273427", "0.65845215", "0.658073", "0.65805423", "0.6580203", "0.65734345", "0.6560062", "0.6556632", "0.6547188", "0.6538012", "0.6527608", "0.65187424", "0.64920455", "0.6446096", "0.64459455", "0.6444516", "0.6436129", "0.64337957", "0.6428748", "0.6417772", "0.6414472", "0.640954", "0.6393374", "0.63759696", "0.6369959", "0.63666624", "0.6353938", "0.6348097", "0.6347356", "0.6338364", "0.632284", "0.6315396", "0.6311327", "0.62882054", "0.62747663", "0.625646", "0.62540853", "0.6249228", "0.6246251", "0.6246025", "0.62288135", "0.6215068", "0.6214452", "0.62094104", "0.62043273", "0.62036365", "0.61964875", "0.6195505", "0.61750203", "0.6164198", "0.61613935", "0.61542475", "0.6146987", "0.61303765", "0.6126547", "0.61254084", "0.61076903", "0.61002874", "0.60957456", "0.6092228", "0.6090954", "0.6086021", "0.6082584", "0.6082546", "0.6074826", "0.60671616", "0.6062924", "0.6058415", "0.6053142", "0.60515517", "0.6043982", "0.60429716", "0.6041173", "0.6041063", "0.6036909", "0.60198456", "0.6014734", "0.60097414", "0.6004486", "0.60030776", "0.59986234", "0.5990911", "0.59847176", "0.59829587" ]
0.6242256
56
This method is to determine status of the shipment.
public String getStatus(){ int chosen; System.out.println("Choose a Shipment Status ?"); System.out.println("[1] Pending "); System.out.println("[2] Picked Up"); System.out.println("[3] In transit to destination."); System.out.println("[4] Delivered."); System.out.println("[5] Out of Delivery."); System.out.print( "Answer: "); chosen = GetChoiceFromUser.getSubChoice(5); switch (chosen){ case 1 : return "Pending"; case 2: return "Picked Up"; case 3 : return "In transit to destination."; case 4: return "Delivered"; case 5: return "Out of Delivery."; default: return "No info"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getShipStatus() {\n return shipStatus;\n }", "ShipmentStatus createShipmentStatus();", "public void setShipStatus(Boolean shipStatus) {\n this.shipStatus = shipStatus;\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus();", "io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus();", "im.turms.common.constant.MessageDeliveryStatus getDeliveryStatus();", "public String\t\tgetOrderStatus();", "public String getShipmentCode() {\n return shipmentCode;\n }", "public void updateStatusOfShipment(String name,int id){\n int k;\n for ( k = 0; k < 45; k++) System.out.print(\"-\");\n System.out.print(\"\\n\"+\" \");\n System.out.println(\"Welcome Employee \" + name + \" to the Status Updating Panel.\");\n for ( k = 0; k < 45; k++) System.out.print(\"-\");\n System.out.print(\"\\n\");\n String message = \"Choose one of the shipment to update Status\";\n if (printData.checkAndPrintShipment(message,id)){\n subChoice = GetChoiceFromUser.getSubChoice(data.numberOfShipment());\n if (subChoice!=0){\n data.getShipment(subChoice-1).setCurrentStatus(getStatus());\n System.out.println(\"Shipment Status has changed Successfully!\");\n }\n }\n else{\n System.out.println(\"To change status please add a shipment.\");\n }\n }", "int getDeliveryStatusValue();", "public Boolean getStatus() {return status;}", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic int getStatus();", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "cosmos.gov.v1beta1.ProposalStatus getStatus();", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "@Override\r\n\tpublic int updateShipInfoById(int ship_time, int ship_status, int so_id) {\n\t\treturn orderInfoDao.updateShipInfoById(ship_time, ship_status, so_id);\r\n\t}", "public boolean getStatus() {\n\treturn status;\n }", "public void processReturnShipment() {\n \n }", "@java.lang.Override\n public int getStatus() {\n return status_;\n }", "public boolean getStatus(){\n return activestatus;\n }", "public static boolean getOrderStatus() {\r\n \treturn orderSucceed;\r\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "com.lvl6.proto.EventQuestProto.QuestRedeemResponseProto.QuestRedeemStatus getStatus();", "public String getRewardPointsTransactionStatus() {\n return rewardPointsTransactionStatus;\n }", "public int getStatus ()\n {\n return status;\n }", "public int getStatus ()\n {\n return status;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "@Override\n\tpublic int getStatus() {\n\t\treturn model.getStatus();\n\t}", "@Override\n\tpublic int getStatus() {\n\t\treturn model.getStatus();\n\t}", "private boolean isCompleted(OBWSHIPShipping shipping) {\n return shipping.getDocumentStatus().equals(\"CO\");\n }", "public String getStatus()\n \t{\n \t\treturn m_strStatus;\n \t}", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "@Override\n\tpublic boolean isStatus() {\n\t\treturn _candidate.isStatus();\n\t}", "public Status getStatus();", "@Override\n\tpublic boolean getStatus() {\n\t\treturn _candidate.getStatus();\n\t}", "public boolean getStatus() {\n\t\treturn status;\n\t}", "@java.lang.Override\n public int getStatus() {\n return status_;\n }", "StatusItem getReconcileStatus();", "public java.lang.String getOrderStatus(){\n return localOrderStatus;\n }", "RequestStatus getStatus();", "public int getStatus();", "public int getStatus();", "public int getStatus();", "public String getStatus() { return status; }", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String 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 OrderStatus getStatus() {\n return this.status;\n }", "io.opencannabis.schema.commerce.Payments.PaymentStatus 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 final xlsreport.proxies.Yes_no getStatus()\r\n\t{\r\n\t\treturn getStatus(getContext());\r\n\t}", "public Status getStatus() {\r\n\t return status;\r\n\t }", "public int getStatus()\n {\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 String getStatus(){\r\n\t\treturn status;\r\n\t}", "public Boolean getOrderStatus() {\n return orderStatus;\n }", "public String getStatus () {\r\n return status;\r\n }", "protected String getStatus()\n { return call_state; \n }", "public String getRebillStatus()\n\t{\n\t\tif(response.containsKey(\"status\")) {\n\t\t\treturn response.get(\"status\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\t\tpublic int getStatus() {\n\t\t\treturn 0;\n\t\t}", "public String getShipMode() {\n return (String)getAttributeInternal(SHIPMODE);\n }", "@Override\n public Status getStatus() {\n return status;\n }", "public abstract String currentStatus();" ]
[ "0.7836632", "0.74947613", "0.7109335", "0.6283105", "0.6283105", "0.62743956", "0.6265531", "0.62196106", "0.6207863", "0.6192311", "0.6099325", "0.60951126", "0.60755956", "0.60755956", "0.6051705", "0.6051705", "0.6051705", "0.6027781", "0.60034966", "0.5965253", "0.5965253", "0.5965253", "0.5965253", "0.59627616", "0.5952357", "0.59492004", "0.59378594", "0.5930085", "0.5922133", "0.59220505", "0.59220505", "0.59220505", "0.59219885", "0.5913877", "0.5913823", "0.5913823", "0.5912272", "0.5912272", "0.5912272", "0.5910893", "0.5910893", "0.59066623", "0.5893807", "0.58931714", "0.58931714", "0.58931714", "0.5893171", "0.5889432", "0.5862839", "0.5854411", "0.5849496", "0.5844066", "0.5839616", "0.5833671", "0.58304495", "0.58304495", "0.58304495", "0.58285594", "0.58275974", "0.58275974", "0.58275974", "0.58275974", "0.58275974", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5817766", "0.5813156", "0.58008784", "0.58002925", "0.58002925", "0.58002925", "0.58002925", "0.58002925", "0.5799319", "0.57984173", "0.5796277", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952404", "0.57952064", "0.57921046", "0.5789846", "0.5788821", "0.5786598", "0.57729715", "0.5766042", "0.57627606", "0.57572246" ]
0.5978115
19
An interface which describes a single component. It contains information about component type, its available properties and more. A component descriptor provides information about the real implementation of the component, whilst a component definition describes its configuration.
public interface IComponentDescriptor { /** * Returns the component type. * * @return class of the described component */ Class<?> getComponentType(); // /** // * Returns all properties descriptions (meta-properties) of this component. // * // * @return list of meta properties // */ // Collection<MetaProperty> getProperties(); // /** // * Returns required properties descriptions (meta-properties) of this component. These properties are required to // * proper component initialization. // * // * @return list of required meta properties // */ // Collection<MetaProperty> getRequriedProperties(); // /** // * Returns optional properties descriptions (meta-properties) of this component. These properties are not required // * for proper component initialization. // * // * @return list of optional meta properties // */ // Collection<MetaProperty> getOptionalProperties(); /** * Returns list containing sequences of parameters types of available constructors. * * @return list of available constructor parameters */ List<List<Class<?>>> getConstructorParametersTypes(); /** * Checks if described component contains a property with a given name. * * @param name * name of a property * @return true if this described component contains a needed property */ boolean containsProperty(String name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}", "@Override\n public DescribeComponentResult describeComponent(DescribeComponentRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeComponent(request);\n }", "public interface IDescriptorViewer\r\n{\r\n\t/**\r\n\t * Get the description for this descriptor\r\n\t * @return\r\n\t */\r\n\tpublic String getDescription();\r\n\t\r\n\t@Override\r\n\tpublic String toString();\r\n}", "public interface Displayable {\n\n /**\n * Updates the DetailWindow with the information of the Component currently\n * selected\n */\n public void updateDetailWindow();\n\n /**\n * Retrieves the type of the displayable\n * @return A string representing the type of the component\n */\n public String getType();\n\n /**\n * Retrieves the ID of the displayable\n * @return A string representing the ID of the component\n */\n public String getID();\n \n \n /**\n * Retrieves the name of the displayable\n * @return A string representing the name of the displayable\n */\n public String getName();\n}", "public interface Datum {\n\n Component createComponent(ComponentContext c);\n}", "public interface DomainBuilderComponent extends PropertyChangeListener {\n\t/**\n\t * get name of the component\n\t * @return\n\t */\n\tpublic String getName();\n\t\n\t/**\n\t * get icon for the component\n\t * @return\n\t */\n\tpublic Icon getIcon();\n\t\n\t\n\t/**\n\t * get component\n\t * @return\n\t */\n\tpublic Component getComponent();\n\t\n\t\n\t/**\n\t * get menu bar\n\t * @return\n\t */\n\tpublic JMenuBar getMenuBar();\n\t\n\t\n\t/**\n\t * load whatever resources one needs to get this piece working \n\t */\n\tpublic void load();\n\t\n\t/**\n\t * dispose of this component\n\t */\n\tpublic void dispose();\n}", "public ComponentTypeDescription getComponentDescription() {\n return m_type;\n }", "public interface ComponentInterface {\n\t\n\t/** \n\t * Execute component once and calculate metric values\n\t * \n\t * @param inputData Input data set\n\t * @return List of Objects containing component outputs\n\t */\n\t public java.util.List<Object> execute(java.util.List<Object> inputData);\n\t \n\t /** \n\t * Calculate metrics\n\t * \n\t * @param outputValues Output values of component execution\n\t * @param truthValues Component-generated truth values\n\t * @return List of Objects containing computed values of metrics\n\t */\n\t public java.util.List<Object> calculateMetrics(java.util.List<Object> outputValues, java.util.List<Object> truthValues);\n\t \n\t /**\n\t * Generate an input data set\n\t * @param genericProperties Generic parameters for data set generation (e.g., number of data points)\n\t * @return List of Objects containing generated input values\n\t */\n\t public java.util.List<Object> generateDataSet(java.util.List<Object> genericProperties);\n\t \n\t /**\n\t * Generate truth values \n\t * \n\t * @return List of Objects containing generated truth values\n\t */\n\t public java.util.List<Object> generateTruthValues();\n\t \n\t /**\n\t * Generate values for control variables\n\t * \n\t * @return List of Objects containing generated control variable values\n\t */\n\t public java.util.List<Object> generateControlVars();\n\t \n\t /**\n\t * Set control variable values to use in subsequent executions\n\t * \n\t * @param controlValues Values for control variables\n\t */\n\t public void setControlVars(java.util.List<Object> controlValues);\n\n}", "ComponentBodyType getComponentInfo();", "public interface Component {\n\n /** Property name for the 'cost' property. */\n public static final String PROP_COST = \"cost\";\n /** Property name for the 'label' property. */\n public static final String PROP_LABEL = \"label\";\n\n /**\n * Add a PropertyChangeListener to the listener list.\n *\n * @param listener the PropertyChangeListener to be added.\n */\n void addPropertyChangeListener(PropertyChangeListener listener);\n\n /**\n * Returns the value of the property with the specified key. Only\n * properties added with <code>putClientProperty</code> will return\n * a non-null value.\n *\n * @param key the key being queried.\n * @return the value of this property or <code>null</code>.\n */\n Object getClientProperty(Object key);\n\n /**\n * Returns the cost of the edge.\n *\n * @return distance between the two endpoints.\n */\n double getCost();\n\n /**\n * Returns the string label for this edge. This will never return a\n * null reference, as it will create an empty string if there is not\n * a label already set.\n *\n * @return label for this edge.\n */\n String getLabel();\n\n /**\n * Returns the component model this component belongs to.\n *\n * @return component model for this component.\n */\n Model getModel();\n\n /**\n * Adds an arbitrary key/value \"client property\" to this component.\n *\n * <p>The <code>get/putClientProperty</code> methods provide access\n * to a small per-instance hashtable. Callers can use\n * get/putClientProperty to annotate components that were created\n * by another module.</p>\n *\n * <p>If value is <code>null</code> this method will remove the\n * property. Changes to client properties are reported with\n * <code>PropertyChange</code> events. The name of the property\n * (for the sake of PropertyChange events) is\n * <code>key.toString()</code>.</p>\n *\n * @param key the new client property key.\n * @param value the new client property value; if\n * <code>null</code> the property will be removed.\n */\n void putClientProperty(Object key, Object value);\n\n /**\n * Remove a PropertyChangeListener from the listener list.\n *\n * @param listener the PropertyChangeListener to be removed.\n */\n void removePropertyChangeListener(PropertyChangeListener listener);\n\n /**\n * Sets the cost of the edge. Once the cost is set it will not be\n * modified until subsequent calls to this method.\n *\n * @param cost new cost for this edge.\n */\n void setCost(double cost);\n\n /**\n * Sets the string label of this edge.\n *\n * @param label new label for this edge.\n */\n void setLabel(String label);\n}", "public interface IContentComponent extends IMPDElement {\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetAccessibility()\n */\n public Vector<Descriptor> GetAccessibility ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetRole()\n */\n public Vector<Descriptor> GetRole ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetRating()\n */\n public Vector<Descriptor> GetRating ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetViewpoint()\n */\n public Vector<Descriptor> GetViewpoint ();\n\n /**\n * Returns an unsigned integer that specifies an identifier for this media component.\n * The attribute shall be unique in the scope of the containing Adaptation Set.\n * @return an unsigned integer\n */\n public int GetId ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetLang()\n */\n public String GetLang ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetContentType()\n */\n public String GetContentType ();\n\n /**\n * @copydoc dash::mpd::IAdaptationSet::GetPar()\n */\n public String GetPar ();\n}", "public interface DescriptorAccess extends DescriptorRead\n{\n /**\n * Sets Descriptor (full replace).\n *\n * @param inDescriptor replaces the Descriptor associated with the\n * component implementing this interface. If the inDescriptor is invalid for the\n * type of Info object it is being set for, an exception is thrown. If the\n * inDescriptor is null, then the Descriptor will revert to its default value\n * which should contain, at a minimum, the descriptor name and descriptorType.\n *\n * @see #getDescriptor\n */\n public void setDescriptor(Descriptor inDescriptor);\n}", "public Element getDescription() {\n Element instance = new Element(\"Instance\", \"\");\n instance.addAttribute(new Attribute(\"name\", getName())); // Name\n // State\n if (m_state == ComponentInstance.STOPPED) {\n instance.addAttribute(new Attribute(\"state\", \"stopped\"));\n }\n if (m_state == ComponentInstance.VALID) {\n instance.addAttribute(new Attribute(\"state\", \"valid\"));\n }\n if (m_state == ComponentInstance.INVALID) {\n instance.addAttribute(new Attribute(\"state\", \"invalid\"));\n }\n if (m_state == ComponentInstance.DISPOSED) {\n instance.addAttribute(new Attribute(\"state\", \"disposed\"));\n }\n // Bundle\n instance.addAttribute(new Attribute(\"bundle\", Long.toString(m_bundleId)));\n \n // Component Type\n instance.addAttribute(new Attribute(\"component.type\", m_type.getName()));\n \n // Handlers\n for (int i = 0; i < m_handlers.length; i++) {\n instance.addElement(m_handlers[i].getHandlerInfo());\n }\n // Created Object (empty is composite)\n for (int i = 0; i < m_createdObjects.length; i++) {\n Element obj = new Element(\"Object\", \"\");\n obj.addAttribute(new Attribute(\"name\", ((Object) m_createdObjects[i]).toString()));\n instance.addElement(obj);\n }\n // Contained instance (exposing architecture) (empty if primitive)\n if (m_containedInstances.length > 0) {\n Element inst = new Element(\"ContainedInstances\", \"\");\n for (int i = 0; i < m_containedInstances.length; i++) {\n inst.addElement(m_containedInstances[i].getDescription());\n instance.addElement(inst);\n }\n }\n return instance;\n \n }", "public interface PIComponent {\n\t\n\t\n\t/**\n\t * returns the current height of the component.\n\t * @return the components height\n\t */\n\tpublic float getHeight();\n\t\n\t\n\t/**\n\t * returns the current width of the component.\n\t * @return the components width\n\t */\n\tpublic float getWidth();\n\t\n\t\n\t/**\n\t * Resizes the component so that it has width width and height height. \n\t * @param width the new width of the component\n \t * @param height the new height of the component\n\t */\n\tpublic void setSize(float width, float height);\n\t\n\t\n\t/**\n\t * Returns the current x coordinate of the components origin.\n\t * @return the current x coordinate of the components origin\n\t */\n\tpublic float getX();\n\t\n\t\n\t/**\n\t * Returns the current y coordinate of the components origin.\n\t * @return the current y coordinate of the components origin\n\t */\n\tpublic float getY();\n\t\n\t\n\t/**\n\t * sets the location of the component\n\t * @param x the x value\n\t * @param y the y value\n\t */\n\tpublic void setLocation(float x, float y);\n\t\n\n\t/**\n\t * checks if the components contains x and y for the sake of e.g. mouse processing. \n\t * @param x the x coordinate of the point\n\t * @param y the y coordinate of the point\n\t * @return true if the component contains x and y\n\t */\n\tpublic boolean contains(float x, float y);\n\t\n\t\n\t/**\n\t * returns the component's unique id.\n\t * @return the component's unique id. \n\t */\n\tpublic UUID getComponentId();\n\t\n\t\n\t/**\n\t * to draw the component onto the canvas\n\t */\n\tpublic void draw();\n\n}", "public interface ItemDescriptor {\n\n /**\n * Get the ID of the item\n *\n * @return item id\n */\n public int getID();\n\n /**\n * Get the name of the item\n *\n * @return item name\n */\n public String getName();\n\n /**\n * Get the type descriptor\n *\n * @return item type\n */\n public ItemType getType();\n\n}", "public Component() {\n\t\tlocation = new Point(0, 0);\n\t\tsize = new Dimension(100, 80);\n\t\tproperties = new LinkedHashMap<>();\n\t\tsubJobContainer= new LinkedHashMap<>();\n\t\tleftPortCount = 0;\n\t\trightPortCount = 0;\n\t\tbottomPortCount = 0;\n\t\tinputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\n\t\tinputLinks = new ArrayList<Link>();\n\t\toutputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\t\toutputLinks = new ArrayList<Link>();\n\t\tinputportTerminals = new ArrayList<String>();\n\t\toutputPortTerminals = new ArrayList<String>();\n\t\twatcherTerminals = new HashMap();\n\t\tnewInstance = true;\n\t\tvalidityStatus = ValidityStatus.WARN.name();\n\t\tcomponentName = DynamicClassProcessor.INSTANCE.getClazzName(this\n\t\t\t\t.getClass());\n\n\t\tcomponentLabel = new ComponentLabel(componentName);\n\t\tcomponentLabelMargin = 16;\n\n\t\tprefix = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\t\n\t\tdefaultPrefix=XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\tinitPortSettings();\n\t\ttoolTipErrorMessages = new LinkedHashMap<>();\n\t\tstatus = ComponentExecutionStatus.BLANK;\n\t}", "public interface ComponentSystem {\n /**\n * AddListener's common function, according event type to add certain listener\n * \n * @param listener listener to be add\n */\n public void addListener(EventListener listener);\n\n /**\n * @return listener type\n */\n public ListenerType getListenerType();\n\n /**\n * Set the component name\n * \n * @param name name of component\n */\n public void setComponentName(ComponentName name);\n\n /**\n * @return component name\n */\n public ComponentName getComponentName();\n}", "public interface IECComponent extends Identifier {\r\n}", "public void testGetComponentDef() throws Exception {\n ComponentDef component = Aura.getDefinitionService().getDefinition(\"auratest:testComponent1\",\n ComponentDef.class);\n\n Map<String, RegisterEventDef> red = component.getRegisterEventDefs();\n assertEquals(1, red.size());\n assertNotNull(red.get(\"testEvent\"));\n\n Collection<EventHandlerDef> ehd = component.getHandlerDefs();\n assertEquals(0, ehd.size());\n // assertEquals(\"testEvent\",ehd.iterator().next().getName());\n\n List<DefDescriptor<ModelDef>> mdd = component.getModelDefDescriptors();\n assertEquals(1, mdd.size());\n assertEquals(\"TestJavaModel\", mdd.get(0).getName());\n\n List<DefDescriptor<ControllerDef>> cds = component.getControllerDefDescriptors();\n assertEquals(1, cds.size());\n assertEquals(\"JavaTestController\", cds.get(0).getName());\n\n DefDescriptor<ModelDef> lmdd = component.getLocalModelDefDescriptor();\n assertEquals(\"TestJavaModel\", lmdd.getName());\n\n ModelDef model = component.getModelDef();\n assertEquals(\"TestJavaModel\", model.getName());\n\n ControllerDef controller = component.getControllerDef();\n assertEquals(\"testComponent1\", controller.getName());\n\n DefDescriptor<RendererDef> rd = component.getRendererDescriptor();\n assertEquals(\"testComponent1\", rd.getName());\n\n DefDescriptor<StyleDef> td = component.getStyleDescriptor();\n assertEquals(\"testComponent1\", td.getName());\n }", "ComponentType createComponentType();", "public interface ComponentTracker<C> {\n public static final int DEFAULT_MAX_COMPONENTS = Integer.MAX_VALUE;\n public static final int DEFAULT_TIMEOUT = 1800000;\n\n Collection<C> allComponents();\n\n Set<String> allKeys();\n\n void endOfLife(String str);\n\n C find(String str);\n\n int getComponentCount();\n\n C getOrCreate(String str, long j);\n\n void removeStaleComponents(long j);\n}", "Component createComponent();", "Component createComponent();", "@Override\n\tpublic void printDescription() {\n\t\tfor(IComponent obj:components) {\n\t\t\tobj.printDescription();\n\t\t}\n\t\t\n\t}", "ComponentRefType createComponentRefType();", "public interface ComponentAllocationPackage extends EPackage {\r\n\t/**\r\n\t * The package name.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tString eNAME = \"componentAllocation\";\r\n\r\n\t/**\r\n\t * The package namespace URI.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tString eNS_URI = \"http://www.example.org/componentAllocation\";\r\n\r\n\t/**\r\n\t * The package namespace name.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tString eNS_PREFIX = \"componentAllocation\";\r\n\r\n\t/**\r\n\t * The singleton instance of the package.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tComponentAllocationPackage eINSTANCE = componentAllocation.impl.ComponentAllocationPackageImpl.init();\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.ComponentImpl <em>Component</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.ComponentImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getComponent()\r\n\t * @generated\r\n\t */\r\n\tint COMPONENT = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Name</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMPONENT__COMP_NAME = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Res Consumptions</b></em>' reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMPONENT__RES_CONSUMPTIONS = 1;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Component</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMPONENT_FEATURE_COUNT = 2;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Component</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMPONENT_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.CompUnitImpl <em>Comp Unit</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.CompUnitImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tint COMP_UNIT = 1;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Cpu Avail</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT__CPU_AVAIL = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Mem Available</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT__MEM_AVAILABLE = 1;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Power Avail</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT__POWER_AVAIL = 2;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Unit Name</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT__COMP_UNIT_NAME = 3;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Res Consumptions</b></em>' reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT__RES_CONSUMPTIONS = 4;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Comp Unit</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT_FEATURE_COUNT = 5;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Comp Unit</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint COMP_UNIT_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.TradeOffVectorImpl <em>Trade Off Vector</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.TradeOffVectorImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getTradeOffVector()\r\n\t * @generated\r\n\t */\r\n\tint TRADE_OFF_VECTOR = 2;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Cpu Factor</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint TRADE_OFF_VECTOR__CPU_FACTOR = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Memory Factor</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint TRADE_OFF_VECTOR__MEMORY_FACTOR = 1;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Power Factor</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint TRADE_OFF_VECTOR__POWER_FACTOR = 2;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Trade Off Vector</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint TRADE_OFF_VECTOR_FEATURE_COUNT = 3;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Trade Off Vector</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint TRADE_OFF_VECTOR_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.ResConsumptionImpl <em>Res Consumption</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.ResConsumptionImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tint RES_CONSUMPTION = 3;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Cpu Cons</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION__CPU_CONS = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Memory Cons</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION__MEMORY_CONS = 1;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Power Cons</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION__POWER_CONS = 2;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Component</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION__COMPONENT = 3;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Unit</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION__COMP_UNIT = 4;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Res Consumption</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION_FEATURE_COUNT = 5;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Res Consumption</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint RES_CONSUMPTION_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.AllocationConstraintImpl <em>Allocation Constraint</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.AllocationConstraintImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tint ALLOCATION_CONSTRAINT = 4;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Component</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_CONSTRAINT__COMPONENT = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Unit</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_CONSTRAINT__COMP_UNIT = 1;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Allocation Constraint</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_CONSTRAINT_FEATURE_COUNT = 2;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Allocation Constraint</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_CONSTRAINT_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.AntiAllocationConstraintImpl <em>Anti Allocation Constraint</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.AntiAllocationConstraintImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAntiAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tint ANTI_ALLOCATION_CONSTRAINT = 5;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Unit</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ANTI_ALLOCATION_CONSTRAINT__COMP_UNIT = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Component</b></em>' reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ANTI_ALLOCATION_CONSTRAINT__COMPONENT = 1;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Anti Allocation Constraint</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ANTI_ALLOCATION_CONSTRAINT_FEATURE_COUNT = 2;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Anti Allocation Constraint</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ANTI_ALLOCATION_CONSTRAINT_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * The meta object id for the '{@link componentAllocation.impl.AllocationProblemImpl <em>Allocation Problem</em>}' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @see componentAllocation.impl.AllocationProblemImpl\r\n\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tint ALLOCATION_PROBLEM = 6;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Components</b></em>' containment reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__COMPONENTS = 0;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Trade Offvector</b></em>' containment reference.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__TRADE_OFFVECTOR = 1;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Comp Units</b></em>' containment reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__COMP_UNITS = 2;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Allocation Constraints</b></em>' containment reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__ALLOCATION_CONSTRAINTS = 3;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Anti Allocation Constraints</b></em>' containment reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__ANTI_ALLOCATION_CONSTRAINTS = 4;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>Res Consumptions</b></em>' containment reference list.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__RES_CONSUMPTIONS = 5;\r\n\r\n\t/**\r\n\t * The feature id for the '<em><b>ID</b></em>' attribute.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM__ID = 6;\r\n\r\n\t/**\r\n\t * The number of structural features of the '<em>Allocation Problem</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM_FEATURE_COUNT = 7;\r\n\r\n\t/**\r\n\t * The number of operations of the '<em>Allocation Problem</em>' class.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t * @ordered\r\n\t */\r\n\tint ALLOCATION_PROBLEM_OPERATION_COUNT = 0;\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.Component <em>Component</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Component</em>'.\r\n\t * @see componentAllocation.Component\r\n\t * @generated\r\n\t */\r\n\tEClass getComponent();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.Component#getCompName <em>Comp Name</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Comp Name</em>'.\r\n\t * @see componentAllocation.Component#getCompName()\r\n\t * @see #getComponent()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getComponent_CompName();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference list '{@link componentAllocation.Component#getResConsumptions <em>Res Consumptions</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference list '<em>Res Consumptions</em>'.\r\n\t * @see componentAllocation.Component#getResConsumptions()\r\n\t * @see #getComponent()\r\n\t * @generated\r\n\t */\r\n\tEReference getComponent_ResConsumptions();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.CompUnit <em>Comp Unit</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Comp Unit</em>'.\r\n\t * @see componentAllocation.CompUnit\r\n\t * @generated\r\n\t */\r\n\tEClass getCompUnit();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.CompUnit#getCpuAvail <em>Cpu Avail</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Cpu Avail</em>'.\r\n\t * @see componentAllocation.CompUnit#getCpuAvail()\r\n\t * @see #getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getCompUnit_CpuAvail();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.CompUnit#getMemAvailable <em>Mem Available</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Mem Available</em>'.\r\n\t * @see componentAllocation.CompUnit#getMemAvailable()\r\n\t * @see #getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getCompUnit_MemAvailable();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.CompUnit#getPowerAvail <em>Power Avail</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Power Avail</em>'.\r\n\t * @see componentAllocation.CompUnit#getPowerAvail()\r\n\t * @see #getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getCompUnit_PowerAvail();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.CompUnit#getCompUnitName <em>Comp Unit Name</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Comp Unit Name</em>'.\r\n\t * @see componentAllocation.CompUnit#getCompUnitName()\r\n\t * @see #getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getCompUnit_CompUnitName();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference list '{@link componentAllocation.CompUnit#getResConsumptions <em>Res Consumptions</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference list '<em>Res Consumptions</em>'.\r\n\t * @see componentAllocation.CompUnit#getResConsumptions()\r\n\t * @see #getCompUnit()\r\n\t * @generated\r\n\t */\r\n\tEReference getCompUnit_ResConsumptions();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.TradeOffVector <em>Trade Off Vector</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Trade Off Vector</em>'.\r\n\t * @see componentAllocation.TradeOffVector\r\n\t * @generated\r\n\t */\r\n\tEClass getTradeOffVector();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.TradeOffVector#getCpuFactor <em>Cpu Factor</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Cpu Factor</em>'.\r\n\t * @see componentAllocation.TradeOffVector#getCpuFactor()\r\n\t * @see #getTradeOffVector()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getTradeOffVector_CpuFactor();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.TradeOffVector#getMemoryFactor <em>Memory Factor</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Memory Factor</em>'.\r\n\t * @see componentAllocation.TradeOffVector#getMemoryFactor()\r\n\t * @see #getTradeOffVector()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getTradeOffVector_MemoryFactor();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.TradeOffVector#getPowerFactor <em>Power Factor</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Power Factor</em>'.\r\n\t * @see componentAllocation.TradeOffVector#getPowerFactor()\r\n\t * @see #getTradeOffVector()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getTradeOffVector_PowerFactor();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.ResConsumption <em>Res Consumption</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Res Consumption</em>'.\r\n\t * @see componentAllocation.ResConsumption\r\n\t * @generated\r\n\t */\r\n\tEClass getResConsumption();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.ResConsumption#getCpuCons <em>Cpu Cons</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Cpu Cons</em>'.\r\n\t * @see componentAllocation.ResConsumption#getCpuCons()\r\n\t * @see #getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getResConsumption_CpuCons();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.ResConsumption#getMemoryCons <em>Memory Cons</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Memory Cons</em>'.\r\n\t * @see componentAllocation.ResConsumption#getMemoryCons()\r\n\t * @see #getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getResConsumption_MemoryCons();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.ResConsumption#getPowerCons <em>Power Cons</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>Power Cons</em>'.\r\n\t * @see componentAllocation.ResConsumption#getPowerCons()\r\n\t * @see #getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getResConsumption_PowerCons();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.ResConsumption#getComponent <em>Component</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Component</em>'.\r\n\t * @see componentAllocation.ResConsumption#getComponent()\r\n\t * @see #getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tEReference getResConsumption_Component();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.ResConsumption#getCompUnit <em>Comp Unit</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Comp Unit</em>'.\r\n\t * @see componentAllocation.ResConsumption#getCompUnit()\r\n\t * @see #getResConsumption()\r\n\t * @generated\r\n\t */\r\n\tEReference getResConsumption_CompUnit();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.AllocationConstraint <em>Allocation Constraint</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Allocation Constraint</em>'.\r\n\t * @see componentAllocation.AllocationConstraint\r\n\t * @generated\r\n\t */\r\n\tEClass getAllocationConstraint();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.AllocationConstraint#getComponent <em>Component</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Component</em>'.\r\n\t * @see componentAllocation.AllocationConstraint#getComponent()\r\n\t * @see #getAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationConstraint_Component();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.AllocationConstraint#getCompUnit <em>Comp Unit</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Comp Unit</em>'.\r\n\t * @see componentAllocation.AllocationConstraint#getCompUnit()\r\n\t * @see #getAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationConstraint_CompUnit();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.AntiAllocationConstraint <em>Anti Allocation Constraint</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Anti Allocation Constraint</em>'.\r\n\t * @see componentAllocation.AntiAllocationConstraint\r\n\t * @generated\r\n\t */\r\n\tEClass getAntiAllocationConstraint();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.AntiAllocationConstraint#getCompUnit <em>Comp Unit</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Comp Unit</em>'.\r\n\t * @see componentAllocation.AntiAllocationConstraint#getCompUnit()\r\n\t * @see #getAntiAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tEReference getAntiAllocationConstraint_CompUnit();\r\n\r\n\t/**\r\n\t * Returns the meta object for the reference '{@link componentAllocation.AntiAllocationConstraint#getComponent <em>Component</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the reference '<em>Component</em>'.\r\n\t * @see componentAllocation.AntiAllocationConstraint#getComponent()\r\n\t * @see #getAntiAllocationConstraint()\r\n\t * @generated\r\n\t */\r\n\tEReference getAntiAllocationConstraint_Component();\r\n\r\n\t/**\r\n\t * Returns the meta object for class '{@link componentAllocation.AllocationProblem <em>Allocation Problem</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for class '<em>Allocation Problem</em>'.\r\n\t * @see componentAllocation.AllocationProblem\r\n\t * @generated\r\n\t */\r\n\tEClass getAllocationProblem();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference list '{@link componentAllocation.AllocationProblem#getComponents <em>Components</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference list '<em>Components</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getComponents()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_Components();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference '{@link componentAllocation.AllocationProblem#getTradeOffvector <em>Trade Offvector</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference '<em>Trade Offvector</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getTradeOffvector()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_TradeOffvector();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference list '{@link componentAllocation.AllocationProblem#getCompUnits <em>Comp Units</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference list '<em>Comp Units</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getCompUnits()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_CompUnits();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference list '{@link componentAllocation.AllocationProblem#getAllocationConstraints <em>Allocation Constraints</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference list '<em>Allocation Constraints</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getAllocationConstraints()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_AllocationConstraints();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference list '{@link componentAllocation.AllocationProblem#getAntiAllocationConstraints <em>Anti Allocation Constraints</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference list '<em>Anti Allocation Constraints</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getAntiAllocationConstraints()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_AntiAllocationConstraints();\r\n\r\n\t/**\r\n\t * Returns the meta object for the containment reference list '{@link componentAllocation.AllocationProblem#getResConsumptions <em>Res Consumptions</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the containment reference list '<em>Res Consumptions</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getResConsumptions()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEReference getAllocationProblem_ResConsumptions();\r\n\r\n\t/**\r\n\t * Returns the meta object for the attribute '{@link componentAllocation.AllocationProblem#getID <em>ID</em>}'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the meta object for the attribute '<em>ID</em>'.\r\n\t * @see componentAllocation.AllocationProblem#getID()\r\n\t * @see #getAllocationProblem()\r\n\t * @generated\r\n\t */\r\n\tEAttribute getAllocationProblem_ID();\r\n\r\n\t/**\r\n\t * Returns the factory that creates the instances of the model.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the factory that creates the instances of the model.\r\n\t * @generated\r\n\t */\r\n\tComponentAllocationFactory getComponentAllocationFactory();\r\n\r\n\t/**\r\n\t * <!-- begin-user-doc -->\r\n\t * Defines literals for the meta objects that represent\r\n\t * <ul>\r\n\t * <li>each class,</li>\r\n\t * <li>each feature of each class,</li>\r\n\t * <li>each operation of each class,</li>\r\n\t * <li>each enum,</li>\r\n\t * <li>and each data type</li>\r\n\t * </ul>\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tinterface Literals {\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.ComponentImpl <em>Component</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.ComponentImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getComponent()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass COMPONENT = eINSTANCE.getComponent();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Name</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute COMPONENT__COMP_NAME = eINSTANCE.getComponent_CompName();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Res Consumptions</b></em>' reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference COMPONENT__RES_CONSUMPTIONS = eINSTANCE.getComponent_ResConsumptions();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.CompUnitImpl <em>Comp Unit</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.CompUnitImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getCompUnit()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass COMP_UNIT = eINSTANCE.getCompUnit();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Cpu Avail</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute COMP_UNIT__CPU_AVAIL = eINSTANCE.getCompUnit_CpuAvail();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Mem Available</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute COMP_UNIT__MEM_AVAILABLE = eINSTANCE.getCompUnit_MemAvailable();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Power Avail</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute COMP_UNIT__POWER_AVAIL = eINSTANCE.getCompUnit_PowerAvail();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Unit Name</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute COMP_UNIT__COMP_UNIT_NAME = eINSTANCE.getCompUnit_CompUnitName();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Res Consumptions</b></em>' reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference COMP_UNIT__RES_CONSUMPTIONS = eINSTANCE.getCompUnit_ResConsumptions();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.TradeOffVectorImpl <em>Trade Off Vector</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.TradeOffVectorImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getTradeOffVector()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass TRADE_OFF_VECTOR = eINSTANCE.getTradeOffVector();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Cpu Factor</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute TRADE_OFF_VECTOR__CPU_FACTOR = eINSTANCE.getTradeOffVector_CpuFactor();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Memory Factor</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute TRADE_OFF_VECTOR__MEMORY_FACTOR = eINSTANCE.getTradeOffVector_MemoryFactor();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Power Factor</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute TRADE_OFF_VECTOR__POWER_FACTOR = eINSTANCE.getTradeOffVector_PowerFactor();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.ResConsumptionImpl <em>Res Consumption</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.ResConsumptionImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getResConsumption()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass RES_CONSUMPTION = eINSTANCE.getResConsumption();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Cpu Cons</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute RES_CONSUMPTION__CPU_CONS = eINSTANCE.getResConsumption_CpuCons();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Memory Cons</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute RES_CONSUMPTION__MEMORY_CONS = eINSTANCE.getResConsumption_MemoryCons();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Power Cons</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute RES_CONSUMPTION__POWER_CONS = eINSTANCE.getResConsumption_PowerCons();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Component</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference RES_CONSUMPTION__COMPONENT = eINSTANCE.getResConsumption_Component();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Unit</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference RES_CONSUMPTION__COMP_UNIT = eINSTANCE.getResConsumption_CompUnit();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.AllocationConstraintImpl <em>Allocation Constraint</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.AllocationConstraintImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAllocationConstraint()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass ALLOCATION_CONSTRAINT = eINSTANCE.getAllocationConstraint();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Component</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_CONSTRAINT__COMPONENT = eINSTANCE.getAllocationConstraint_Component();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Unit</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_CONSTRAINT__COMP_UNIT = eINSTANCE.getAllocationConstraint_CompUnit();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.AntiAllocationConstraintImpl <em>Anti Allocation Constraint</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.AntiAllocationConstraintImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAntiAllocationConstraint()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass ANTI_ALLOCATION_CONSTRAINT = eINSTANCE.getAntiAllocationConstraint();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Unit</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ANTI_ALLOCATION_CONSTRAINT__COMP_UNIT = eINSTANCE.getAntiAllocationConstraint_CompUnit();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Component</b></em>' reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ANTI_ALLOCATION_CONSTRAINT__COMPONENT = eINSTANCE.getAntiAllocationConstraint_Component();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '{@link componentAllocation.impl.AllocationProblemImpl <em>Allocation Problem</em>}' class.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @see componentAllocation.impl.AllocationProblemImpl\r\n\t\t * @see componentAllocation.impl.ComponentAllocationPackageImpl#getAllocationProblem()\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEClass ALLOCATION_PROBLEM = eINSTANCE.getAllocationProblem();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Components</b></em>' containment reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__COMPONENTS = eINSTANCE.getAllocationProblem_Components();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Trade Offvector</b></em>' containment reference feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__TRADE_OFFVECTOR = eINSTANCE.getAllocationProblem_TradeOffvector();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Comp Units</b></em>' containment reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__COMP_UNITS = eINSTANCE.getAllocationProblem_CompUnits();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Allocation Constraints</b></em>' containment reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__ALLOCATION_CONSTRAINTS = eINSTANCE.getAllocationProblem_AllocationConstraints();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Anti Allocation Constraints</b></em>' containment reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__ANTI_ALLOCATION_CONSTRAINTS = eINSTANCE\r\n\t\t\t\t.getAllocationProblem_AntiAllocationConstraints();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>Res Consumptions</b></em>' containment reference list feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEReference ALLOCATION_PROBLEM__RES_CONSUMPTIONS = eINSTANCE.getAllocationProblem_ResConsumptions();\r\n\r\n\t\t/**\r\n\t\t * The meta object literal for the '<em><b>ID</b></em>' attribute feature.\r\n\t\t * <!-- begin-user-doc -->\r\n\t\t * <!-- end-user-doc -->\r\n\t\t * @generated\r\n\t\t */\r\n\t\tEAttribute ALLOCATION_PROBLEM__ID = eINSTANCE.getAllocationProblem_ID();\r\n\r\n\t}\r\n\r\n}", "public DescriptorImpl() {\n\t\t\tsuper(SemanticVersionBuildWrapper.class);\n\t\t\tlogger.debug(\"### DescriptorImpl\");\n\t\t\tload();\n\t\t}", "public interface DesignerModel {\n\n\tDesignTreeModel getTreeModel();\n\n\tDesignComponent getRootComponent();\n\n\tvoid setCurrentSelection(DesignTreeNode node);\n\n\tDesignTreeNode getCurrentSelection();\n\n\tvoid replaceSelected(ArooaConfiguration config) throws ArooaParseException;\n\n\tDesignComponent getCurrentComponent();\n\n\tvoid viewSelectedAsXML() throws ArooaPropertyException;\n\n\tvoid addObserver(Observer observer);\n\n\tvoid addPropertyChangeListener(PropertyChangeListener listener);\n\n\tvoid removePropertyChangeListener(PropertyChangeListener listener);\n\n\tvoid addPropertyChangeListener(String property, PropertyChangeListener listener);\n\n\tvoid removePropertyChangeListener(String property, PropertyChangeListener listener);\n}", "public interface Component {\n void doSomething();\n}", "@Override\n public abstract String getComponentType();", "public Component getComponent() {\n\treturn component;\n}", "public String getDescriptor() {\n/* 218 */ return this.desc;\n/* */ }", "public Component getComponent() {\n return component;\n }", "public interface InspectorComponent<PropMgr extends PropertiesManager<PropMgr>> {\n\n /**\n * Update the properties used\n *\n * @param components the components selected\n * @param properties that are now available\n * @param propertiesManager the current properties manager\n */\n void updateProperties(@NotNull List<NlComponent> components,\n @NotNull Map<String, NlProperty> properties,\n @NotNull PropMgr propertiesManager);\n\n /**\n * Return the maximum number of rows that attachToInspector may generate.\n * A row is either a title, separator, or a component row\n */\n int getMaxNumberOfRows();\n\n /**\n * Add rows of controls to the inspector panel for this inspector.\n */\n void attachToInspector(@NotNull InspectorPanel<PropMgr> inspector);\n\n /**\n * Refresh the values shown in this inspector.\n */\n void refresh();\n\n /**\n * Get the editors created by this inspector.\n */\n @NotNull\n List<NlComponentEditor> getEditors();\n\n /**\n * If customized handling of field visibility is required, use this method\n * to set the visibility of the fields.\n * Filtering in the inspector will change any visibility settings done by this\n * {@code InspectorComponent}. Use this method to override the visibility when\n * there is no filter active. When a filter is active this method should not\n * do anything.\n */\n default void updateVisibility() {\n }\n}", "public interface ConfigurableComponentProvider extends ComponentProvider {\n\n}", "public interface Component {\n void show();\n\n}", "public interface IComponent {\n \n double getCosto();\n void setCosto(double valor);\n String getFunciona();\n \n}", "public String getComponent() {\r\n\t\treturn component;\r\n\t}", "public abstract interface DescriptiveFramework \n\textends InterchangeObject {\r\n\n\t/**\n\t * <p>Return the identifier of the {@linkplain DescriptiveMarker descriptive marker} that strongly references \n\t * this descriptive framework instance. This is an optional property.</p>\n\t * \n\t * @return Identifier of the descriptive marker that strongly references this descriptive framework instance.\n\t * \n\t * @throws PropertyNotPresentException The optional linked descriptive framework plugin property\n\t * is not present for this descriptive framework.\n\t * \n\t * @see DescriptiveMarker#getDescriptiveMetadataPluginID()\n\t */\n\tpublic AUID getLinkedDescriptiveFrameworkPluginID()\n\t\tthrows PropertyNotPresentException;\n\t\n\t/**\n\t * <p>Sets the identifier of the {@linkplain DescriptiveMarker descriptive marker} that strongly references \n\t * this descriptive framework instance. Set this optional property to <code>null</code> to\n\t * omit it.</p>\n\t * \n\t * @param linkedDescriptiveFrameworkPluginID Identifier of the Descriptive marker that strongly references this \n\t * descriptive framework instance.\n\t */\n\tpublic void setLinkedDescriptiveFrameworkPluginID(\n\t\t\tAUID linkedDescriptiveFrameworkPluginID);\n\t\n\t/**\n\t * <p>Create a cloned copy of this descriptive framework.</p>\n\t *\n\t * @return Cloned copy of this descriptive framework.\n\t */\n\tpublic DescriptiveFramework clone();\n\t\r\n}", "public interface ContainerColorDefinition extends EObject\n{\n}", "public interface\t\t\tComponentModelArchitectureI\nextends\t\tArchitectureI\n{\n\t/**\n\t * get the URI of the described architecture.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\ttrue\t\t\t// no precondition.\n\t * post\tret != null\n\t * </pre>\n\t *\n\t * @return\tthe URI of the described architecture.\n\t */\n\tpublic String\t\t\tgetArchitectureURI() ;\n\n\t/**\n\t * return the component model descriptor associated to the given\n\t * model URI.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\ttrue\t\t\t// no precondition.\n\t * post\ttrue\t\t\t// no postcondition.\n\t * </pre>\n\t *\n\t * @param uri\tURI of a model in the architecture.\n\t * @return\t\tthe component model descriptor of the given model.\n\t */\n\tpublic ComponentModelDescriptorI\tgetModelDescriptor(String uri) ;\n\n\t/**\n\t * return the URI of the reflection inbound port of the component holding\n\t * the corresponding model.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\t{@code modelURI != null && this.isModel(modelURI)}\n\t * post\ttrue\t\t\t// no postcondition.\n\t * </pre>\n\t *\n\t * @param modelURI\tthe URI of a model in this simulation architecture.\n\t * @return\t\t\tthe URI of the reflection inbound port of the component holding the corresponding model.\n\t */\n\tpublic String\t\tgetReflectionInboundPortURI(String modelURI) ;\n\n\t/**\n\t * connect the component holding the root model of this architecture with\n\t * the componnent <code>creator</code> (usually a supervisor component)\n\t * through the returned simulation plug-in management outbound port.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\tcreator != null\n\t * post\ttrue\t\t\t// no postcondition.\n\t * </pre>\n\t *\n\t * @param creator\tcomponent that will hold the returned simulation plug-in management outbound port.\n\t * @return\t\t\tthe simulation plug-in management outbound port.\n\t */\n\tpublic SimulatorPluginManagementOutboundPort\tconnectRootModelComponent(\n\t\tAbstractComponent creator\n\t\t) ;\n\n\t/**\n\t * compose the simulation architecture subtree having the model with URI\n\t * <code>modelURI</code> at its root by recursively composing the submodels\n\t * and creating the required coupled model on the component\n\t * <code>creator</code> that must hold it in the assembly, which has\n\t * created the required plug-in <code>plugin</code>.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\tmodelURI != null\n\t * pre\tcreator != null\n\t * pre\t{@code plugin != null && plugin.getPluginURI().equals(modelURI)}\n\t * post\ttrue\t\t\t// no postcondition.\n\t * </pre>\n\t *\n\t * @param modelURI\t\tURI of the coupled model to be composed.\n\t * @param creator\t\tcomponent that executes the method and that holds the model.\n\t * @param pnipURI\t\tparent notification inbound port URI of the creator component.\n\t * @param plugin\t\tcoordination plug-in of the <code>creator</code>.\n\t * @return\t\t\t\tthe reference to the simulation engine executing the model.\n\t * @throws Exception\t<i>todo</i>.\n\t */\n\tpublic ModelDescriptionI\tcompose(\n\t\tString modelURI,\n\t\tAbstractComponent creator,\n\t\tString pnipURI,\n\t\tAbstractSimulatorPlugin plugin\n\t\t) throws Exception ;\n}", "public Component(String myName, String myType, double myWeight, double myPrice, String myDescription, boolean myObsolete, boolean myApproved)\n {\n this.name = myName;\n this.partNumber = numberOfParts++;\n this.type = myType;\n this.weight = myWeight;\n this.price = myPrice;\n this.description = myDescription;\n this.isObsolete = myObsolete;\n this.isApproved = myApproved;\n }", "public interface ILexComponent {\n\n\t/**\n\t * Sets the parent attribute of the ILexComponent object\n\t * \n\t * @param parent\n\t * The new parent value\n\t */\n\tpublic void setParent(ILexComponent parent);\n\n\t/**\n\t * Gets the parent attribute of the ILexComponent object\n\t * \n\t * @return The parent value\n\t */\n\tpublic ILexComponent getParent();\n\n\t/**\n\t * Sets the parentId attribute of the LexComponent object\n\t * \n\t * @param parentId\n\t * The new parentId value\n\t */\n\tpublic void setParentId(java.lang.Integer parentId);\n\n\t/**\n\t * Gets the parent attribute of the LexComponent object\n\t * \n\t * @return The parent value\n\t */\n\n\t/**\n\t * Gets the parentId attribute of the LexComponent object\n\t * \n\t * @return The parentId value\n\t */\n\tpublic java.lang.Integer getParentId();\n\n\t/**\n\t * Gets the label attribute of the ILexComponent object\n\t * \n\t * @return The label value\n\t * @since\n\t */\n\tpublic java.lang.String getLabel();\n\n\t/**\n\t * Gets the metaId attribute of the ILexComponent object\n\t * \n\t * @return The metaId value\n\t * @since\n\t */\n\tpublic java.lang.Integer getMetaId();\n\n\t/**\n\t * Sets the metaId attribute of the ILexComponent object\n\t * \n\t * @param metaId\n\t * The new metaId value\n\t * @since\n\t */\n\tpublic void setMetaId(java.lang.Integer metaId);\n\n\t/**\n\t * Gets the translations attribute of the ILexComponent object\n\t * \n\t * @return The translations value\n\t * @since\n\t */\n\t// public java.util.Set getTranslations();\n\n\t/**\n\t * Sets the translations attribute of the ILexComponent object\n\t * \n\t * @return The deleted value\n\t * @since\n\t */\n\t//public void setTranslations( java.util.Set translations );\n\n\t/**\n\t * Gets the deleted attribute of the ILexComponent object\n\t * \n\t * @return The deleted value\n\t * @since\n\t */\n\tpublic java.lang.Boolean getDeleted();\n\n\t/**\n\t * Sets the deleted attribute of the ILexComponent object\n\t * \n\t * @param deleted\n\t * The new deleted value\n\t * @since\n\t */\n\tpublic void setDeleted(java.lang.Boolean deleted);\n\n\t/**\n\t * Gets the analyticalNotes attribute of the ILexComponent object\n\t * \n\t * @return The analyticalNotes value\n\t * @since\n\t */\n\tpublic java.util.List getAnalyticalNotes();\n\n\t/**\n\t * Sets the analyticalNotes attribute of the ILexComponent object\n\t * \n\t * @param analyticalNotes\n\t * The new analyticalNotes value\n\t * @since\n\t */\n\tpublic void setAnalyticalNotes(java.util.List analyticalNotes);\n\n\t/**\n\t * Gets the meta attribute of the ILexComponent object\n\t * \n\t * @return The meta value\n\t * @since\n\t */\n\tpublic org.thdl.lex.component.Meta getMeta();\n\n\t/**\n\t * Sets the meta attribute of the ILexComponent object\n\t * \n\t * @param meta\n\t * The new meta value\n\t * @since\n\t */\n\tpublic void setMeta(org.thdl.lex.component.Meta meta);\n\n\t/**\n\t * Description of the Method\n\t * \n\t * @param properties\n\t * Description of Parameter\n\t * @exception LexComponentException\n\t * Description of Exception\n\t * @since\n\t */\n\tpublic void populate(java.util.Map properties) throws LexComponentException;\n\n\t/**\n\t * Description of the Method\n\t * \n\t * @param component\n\t * Description of the Parameter\n\t * @exception LexComponentException\n\t * Description of the Exception\n\t */\n\tpublic void populate(ILexComponent component) throws LexComponentException;\n\n\t/**\n\t * Adds a feature to the SiblingList attribute of the LexComponentNode\n\t * object\n\t * \n\t * @param component\n\t * The feature to be added to the SiblingList attribute\n\t * @param list\n\t * The feature to be added to the SiblingList attribute\n\t * @param parent\n\t * The feature to be added to the SiblingList attribute\n\t * @exception LexComponentException\n\t * Description of the Exception\n\t */\n\tpublic void addSiblingList(ILexComponent parent, ILexComponent component,\n\t\t\tList list) throws LexComponentException;\n}", "void generate(JavaComponentDefinition definition, LogicalComponent<? extends JavaImplementation> component) throws GenerationException;", "@Override\n\tpublic DescriptorImpl getDescriptor() {\n\t\treturn (DescriptorImpl) super.getDescriptor();\n\t}", "public interface Component {\n\n public void operation();\n}", "public ComponentConfiguration getConfiguration();", "public interface ComponentC {\n\n void doSomethingElse();\n\n}", "public interface ServerComponent extends Service {\r\n\r\n\t/**\r\n\t * Set a configuration for this component\r\n\t * \r\n\t * @param conf\r\n\t */\r\n\tpublic void injectConfiguration(ComponentConfiguration conf);\r\n\r\n\t/**\r\n\t * Set a server context for this component\r\n\t * \r\n\t * @param context\r\n\t */\r\n\tpublic void injectContext(ComponentContext context);\r\n\r\n\t/**\r\n\t * Retrive the current configuration for this component\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic ComponentConfiguration getConfiguration();\r\n}", "public interface IGUIFactory {\n Component label(String text);\n Component labelEmpty();\n Component fieldReadOnly(int length, String text);\n Component fieldEditable(int length, String text);\n Component fieldCalc(int length, String text, boolean readonly);\n Component button(String text);\n Component button(String text, ActionListener listener);\n Component button(ImageIcon image, ActionListener listener);\n Component password();\n Container panelEmpty();\n Container panel(LayoutManager manager);\n Container panelBordered();\n TablePanel tablePanel(IGUIEditor parent, Table table);\n TablePanel tablePanel(IGUIEditor parent, TableModel tableModel);\n Table table(TableModel tableModel);\n Component comboBoxFilled(Collection priorities);\n Component checkBox(String text);\n Component checkBox(String text, boolean flag);\n LayoutManager boxLayout(Container comp, int direction);\n LayoutManager gridLayout(int rows, int cols);\n Dimension size(int width, int height);\n JTabbedPane tabbedPane();\n JMenuItem menuItem(String text, Icon icon);\n JMenu menu(String text);\n JMenuBar menuBar();\n WindowEvent windowEvent(Window source, int id);\n}", "public ComponentType getComponentType()\n {\n return this.componentType;\n }", "public interface HasComponent<C> {\n C getComponent();\n}", "public interface ComponentPainter\n //////////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////////\n {\n\n public void paint (\n JComponent component,\n Graphics2D graphics );\n\n //////////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////////\n }", "public ClassDescriptor getDescriptor() {\n return descriptor;\n }", "public EntityDescriptor getDescriptor() {\n return descriptor;\n }", "String componentTypeName();", "@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl) super.getDescriptor();\n }", "@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl) super.getDescriptor();\n }", "public interface GFXComponent {\n\t// Registration methods\n\tpublic void registerGFXEngine(String path);\n\n\tpublic void deregisterGFXEngine();\n\n\t// Object that contains graphics information\n\tpublic void setGFXCell(GFXDataCell gfxCell);\n\n\tpublic GFXDataCell getGFXCell();\n\n\t// Through this method, make the object update its DataCell\n\tpublic void updateDataCell();\n\n\t// Drawing method\n\tpublic void draw();\n\n\t// Use this to determine object is to be displayed\n\tpublic boolean Drawable();\n\n}", "public DeploymentDescriptor getDeploymentDescriptor(ComponentDeploymentData component) {\n\t\treturn getDeploymentDescriptor(component.getApplicationShortName());\n\t}", "@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl)super.getDescriptor();\n }", "@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl)super.getDescriptor();\n }", "public DsoaComponentInstanceDescription(ComponentTypeDescription type, DsoaComponentInstanceManager instance) {\n super(type, instance);\n }", "public String getComponent() {\n return this.component;\n }", "public Entity getComponent() {\n return component;\n }", "ComponentsType createComponentsType();", "public interface DescribedObject \n{ \n /** Get a description for the object\n * @return a description */\n public String getDescription(); \n \n /** Subinterface for described objects which can change the description */\n public static interface Mutable extends DescribedObject\n { \n /** Set description\n * @param _desc description. */\n public void setDescription(String _desc);\n }\n}", "public PizzaTodopizzaAbstracta obtenerComponente(){\n\t\treturn componente;\n\t}", "public String getDescription () {\n return impl.getDescription ();\n }", "public Class<?> getComponentType();", "@Override\n public DescribeComponentConfigurationResult describeComponentConfiguration(DescribeComponentConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeDescribeComponentConfiguration(request);\n }", "public static Description getGenericDescription() {\n return new Description(CLASS_NAME);\n }", "public interface AbstractComponentDecorator extends Component {\n void setComponent(Component component);\n}", "public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }", "public static TypeDescription getTypeDescription(){\n return new TypeDescription(ToscaInputsAnnotation.class);\n\t}", "public String getDescription() {\n\t\treturn \"Object class description\";\n\t}", "public interface IFeedComponentService {\n C28197y getFeedAdapterService();\n\n C28680d getFeedExperimentService();\n\n C28649y getFeedFragmentPanelService();\n\n C28681e getFeedWidgetService();\n\n C28394j getGuideService();\n\n C28134ag getVideoViewHolderService();\n}", "public interface ComponentmodelFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tComponentmodelFactory eINSTANCE = org.reuseware.air.language.componentmodel.impl.ComponentmodelFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Variation Point</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Variation Point</em>'.\r\n\t * @generated\r\n\t */\r\n\tVariationPoint createVariationPoint();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Composer</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Composer</em>'.\r\n\t * @generated\r\n\t */\r\n\tComposer createComposer();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Slot</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Slot</em>'.\r\n\t * @generated\r\n\t */\r\n\tSlot createSlot();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Location</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Location</em>'.\r\n\t * @generated\r\n\t */\r\n\tLocation createLocation();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Abstract Variation Point Name</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Abstract Variation Point Name</em>'.\r\n\t * @generated\r\n\t */\r\n\tAbstractVariationPointName createAbstractVariationPointName();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Variation Point Name</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Variation Point Name</em>'.\r\n\t * @generated\r\n\t */\r\n\tVariationPointName createVariationPointName();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Abstract Fragment Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Abstract Fragment Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tAbstractFragmentType createAbstractFragmentType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Fragment Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Fragment Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tFragmentType createFragmentType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Fragment Type Slot</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Fragment Type Slot</em>'.\r\n\t * @generated\r\n\t */\r\n\tFragmentTypeSlot createFragmentTypeSlot();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tComponentmodelPackage getComponentmodelPackage();\r\n\r\n}", "public ModuleDescriptor getDescriptor() {\n return descriptor;\n }", "public interface BondComponent {\n double getPrice();\n }", "public interface IPortletDefinitionParameter {\n \n // Getter methods\n \n /**\n * Get the name of the channel parameter.\n * @return the name of the channel parameter.\n */\n public String getName();\n \n /**\n * Get the default value of the channel parameter.\n * @return the default value for this channel parameter.\n */\n public String getValue();\n \n /**\n * Get a description of this channel parameter.\n * @return a description of this channel parameter.\n */\n public String getDescription();\n\n \n // Setter methods\n \n /**\n * Set the default value for this channel parameter.\n * @param value the default value for this channel parameter.\n */\n public void setValue(String value);\n \n /**\n * Set the description of this channel parameter.\n * @param descr description of this channel parameter.\n */\n public void setDescription(String descr);\n\n}", "public DescriptorImpl() {\n super();\n load();\n }", "public interface MessageComponent {\n}", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "public interface ComponentBuilder {\n interface CommonComponent {\n\n /**\n * The name of the component\n *\n * @return the name of the component\n */\n ComponentBuilder named(String label);\n }\n\n interface Command extends CommonComponent {\n\n /**\n * Used to handle the execution of the command\n * @param commandExecute execution handler\n */\n Command handleExecute(CommandExecute commandExecute);\n\n Command addCommand(Consumer<Command> commandBuilder);\n\n <T extends Argument> Command addArg(T argument, Consumer<T> argumentBuilderConsumer);\n\n Command addArg(Consumer<Argument> consumer);\n }\n\n interface Argument<T> extends CommonComponent {\n\n /**\n * Handle tab completion at the place of the argument\n *\n * @param complete handler for the completion\n */\n Argument<T> handleTabComplete(@NonNull TabComplete complete);\n\n /**\n * Parse input into object\n *\n * @param parser function which parses string into object\n */\n Argument<T> parse(Function<String, ParseResult<T>> parser);\n\n /**\n * Should the argument be optional? Remember that optional arguments should be last\n *\n * @param optional if the argument should be optional\n */\n Argument<T> optional(boolean optional);\n }\n}", "@Override\n public String getDescription() {\n return getClass().getName();\n }", "public final void mT__22() throws RecognitionException {\n try {\n int _type = T__22;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:21:7: ( 'component' )\n // InternalMyDsl.g:21:9: 'component'\n {\n match(\"component\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public interface PetriNetViewComponent {\n /**\n * Delete the petri net view component\n */\n void delete();\n\n /**\n * Each subclass should know how to add itself to a PetriNetTab\n * @param container to add itself to\n */\n void addToContainer(Container container);\n\n\n}", "DsmlComponent createDsmlComponent();", "protected ComponentModel getComponentModel()\n {\n return componentModel;\n }", "public interface CompItem {\n String getName();\n}", "public Descriptor getDescriptor()\n\t{\n\t\treturn Descriptor.fromNumber( mMessage.getInt( B1_DESCRIPTOR ) );\n\t}", "public interface CompItem\n{\n String getName();\n}", "public interface StructureDefinition {\n}", "public interface ComponentService {\n\n Component upsertComponent(final Component component) throws ComponentOperationFailedException, IllegalArgumentException;\n\n List<Component> findComponents(final EntityFilter filter) throws ComponentOperationFailedException, IllegalArgumentException;\n\n boolean deleteComponent(final Component component) throws ComponentOperationFailedException, IllegalArgumentException;\n\n}", "public interface Displayable {\n\n\tpublic String getDisplayName();\n\n\tpublic String getDisplayTooltip();\n\t\n}", "public interface ComponentAgent extends QueryAgent{\r\n\t\r\n\t/**\r\n\t * get ID. of the component.\r\n\t * \r\n\t * @return ID or null if it hasn't.\r\n\t */\r\n\tString getId();\r\n\t\r\n\t/**\r\n\t * get UUID. of the component.\r\n\t * \r\n\t * @return UUID.\r\n\t */\r\n\tString getUuid();\r\n\t\r\n\t/**\r\n\t * get attribute by specify name.\r\n\t * \r\n\t * @param name\r\n\t * attribute name.\r\n\t * @return attribute value or null if not found or otherwise.\r\n\t */\r\n\tObject getAttribute(String name);\r\n\r\n\t/**\r\n\t * get children agents.\r\n\t * \r\n\t * @return always return a list of children (may be empty).\r\n\t */\r\n\tList<ComponentAgent> getChildren();\r\n\r\n\t/**\r\n\t * get child by specify index.\r\n\t * \r\n\t * @param index\r\n\t * @return child agent or null if index is out of boundary.\r\n\t */\r\n\tComponentAgent getChild(int index);\r\n\t\r\n\t/**\r\n\t * Returns the associated owner component of this agent\r\n\t * @return\r\n\t */\r\n\t<T extends Component> T getOwner();\r\n\r\n\t/**\r\n\t * Returns the first child, if any.\r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the first child agent or null.\r\n\t */\r\n\tComponentAgent getFirstChild();\r\n\t\r\n\t/**\r\n\t * Returns the last child, if any.\r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the last child agent or null.\r\n\t */\r\n\tComponentAgent getLastChild();\r\n\t\r\n\t/**\r\n\t * Returns the next sibling, if any. \r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the next sibling agent or null.\r\n\t */\r\n\tComponentAgent getNextSibling();\r\n\t\r\n\t/**\r\n\t * Returns the previous sibling, if any. \r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the previous sibling agent or null.\r\n\t */\r\n\tComponentAgent getPreviousSibling();\r\n\r\n\t/**\r\n\t * get parent agent.\r\n\t * \r\n\t * @return parent agent or null if this is root agent.\r\n\t */\r\n\tComponentAgent getParent();\r\n\r\n\t/**\r\n\t * get desktop agent this component belonged to.\r\n\t * \r\n\t * @return desktop agent.\r\n\t */\r\n\tDesktopAgent getDesktop();\r\n\r\n\t/**\r\n\t * get page agent this component belonged to.\r\n\t * \r\n\t * @return page agent.\r\n\t */\r\n\tPageAgent getPage();\r\n\t\r\n\t/**\r\n\t * Click on this component, A short cut of {@link ClickAgent#click()} <p/>\r\n\t * If this component doesn't support {@link ClickAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see ClickAgent\r\n\t */\r\n\tvoid click();\r\n\t\r\n\t/**\r\n\t * Type on this component, it is a short cut of {@link InputAgent#type(String)} <p/>\r\n\t * If this component doesn't support {@link InputAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see InputAgent\r\n\t */\r\n\tvoid type(String value);\r\n\t\r\n\t/**\r\n\t * Input to this component, it is a short cut of {@link InputAgent#input(Object)} <p/>\r\n\t * If this component doesn't support {@link InputAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see InputAgent\r\n\t */\r\n\tvoid input(Object value);\r\n\t\r\n\t/**\r\n\t * Focus this component, it is a short cut of {@link FocusAgent#focus()} <p/>\r\n\t * If this component doesn't support {@link FocusAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see FocusAgent\r\n\t */\r\n\tvoid focus();\r\n\t\r\n\t/**\r\n\t * Blur this component, it is a short cut of {@link FocusAgent#blur()} <p/>\r\n\t * If this component doesn't support {@link FocusAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see FocusAgent\r\n\t */\r\n\tvoid blur();\r\n\t\r\n\t/**\r\n\t * Check this component, it is a short cut of {@link CheckAgent#check(boolean)}<p/>\r\n\t * If this component doesn't support {@link CheckAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see CheckAgent\r\n\t */\r\n\tvoid check(boolean checked);\r\n\t\r\n\t/**\r\n\t * Stroke a key on this component, it is a short cut of {@link KeyStrokeAgent#stroke(String)}<p/>\r\n\t * If this component doesn't support {@link KeyStrokeAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see KeyStrokeAgent\r\n\t */\r\n\tvoid stroke(String key);\r\n\t\r\n\t/**\r\n\t * Select this component, it is a short cut of {@link SelectAgent#select()}<p/>\r\n\t * If this component doesn't support {@link SelectAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see SelectAgent\r\n\t */\r\n\tvoid select();\r\n}", "ComponentParameterInstance createComponentParameterInstance();", "ComponentAllocationFactory getComponentAllocationFactory();", "public interface ComponentUsageReportService {\n\n /**\n * Gets report view.\n *\n * @return the report view\n */\n String getReportView();\n\n /**\n * Base path string.\n *\n * @return the string\n */\n String basePath();\n\n /**\n * Tool path string.\n *\n * @return the string\n */\n String toolPath();\n\n /**\n * Include libs component boolean.\n *\n * @return the boolean\n */\n boolean includeLibsComponent();\n\n /**\n * Open page in edit mode boolean.\n *\n * @return the boolean\n */\n boolean openPageInEditMode();\n\n /**\n * Gets used component list.\n *\n * @param resourceResolver the resource resolver\n * @param conditions the conditions\n * @param excludeChildrenPages the exclude children pages\n * @return the used component list\n */\n Query getUsedComponentList(final ResourceResolver resourceResolver, List<String> conditions,boolean excludeChildrenPages);\n\n /**\n * Gets component usage number.\n *\n * @param componentPath the component path\n * @param resourceResolver the resource resolver\n * @param paths the paths\n * @param excludeChildrenPages the exclude children pages\n * @return the component usage number\n */\n int getComponentUsageNumber(final String componentPath, final ResourceResolver resourceResolver,String[] paths,boolean excludeChildrenPages);\n\n /**\n * Gets nodes component used at.\n *\n * @param componentPath the component path\n * @param resourceResolver the resource resolver\n * @param paths the paths\n * @param excludeChildrenPages the exclude children pages\n * @return the nodes component used at\n */\n Iterator<Resource> getNodesComponentUsedAt(final String componentPath, final ResourceResolver resourceResolver, String[] paths,boolean excludeChildrenPages) ;\n}" ]
[ "0.6812544", "0.6252245", "0.60931414", "0.60791904", "0.60635316", "0.60496914", "0.59579444", "0.5810795", "0.5799973", "0.5770415", "0.5751907", "0.5701249", "0.5694328", "0.5681513", "0.56789124", "0.56437117", "0.5643639", "0.56216395", "0.56040865", "0.55914", "0.55537444", "0.5547084", "0.5547084", "0.5545931", "0.55265254", "0.5521271", "0.54894376", "0.5474121", "0.5472344", "0.54703176", "0.54674494", "0.5465706", "0.54543155", "0.542685", "0.5420592", "0.54079455", "0.5407605", "0.53876066", "0.5386688", "0.53806025", "0.53787845", "0.53602964", "0.53396124", "0.53331447", "0.5332693", "0.5322421", "0.5315102", "0.53128046", "0.53059006", "0.5298957", "0.5295589", "0.529293", "0.52770793", "0.52730477", "0.52663606", "0.5250176", "0.52497405", "0.52497405", "0.52418834", "0.5241656", "0.52375275", "0.52375275", "0.52283156", "0.5210234", "0.5200894", "0.51870304", "0.51671785", "0.51622283", "0.5161767", "0.5155758", "0.51554", "0.5155298", "0.51439106", "0.5142607", "0.5140889", "0.513362", "0.51324266", "0.51270396", "0.51179", "0.51127094", "0.5109472", "0.5109063", "0.5106782", "0.510517", "0.51035744", "0.51006764", "0.5100198", "0.50988936", "0.50969994", "0.50797474", "0.5077958", "0.507426", "0.5063973", "0.5037956", "0.5035033", "0.5030244", "0.5029708", "0.5024598", "0.5018088", "0.50173473" ]
0.8056945
0
Returns the component type.
Class<?> getComponentType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String componentTypeName();", "public ComponentType getComponentType()\n {\n return this.componentType;\n }", "public Class<?> getComponentType();", "public String getComponentTagType()\n {\n return componentTagType;\n }", "public ComponentTypeDescription getComponentDescription() {\n return m_type;\n }", "public static Class getComponentType(final Node n) {\r\n return (Class) n.getProperty(COMPONENT_TYPE);\r\n }", "public static String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn TYPE_NAME;\n\t}", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public final String getType() {\n return this.getClass().getName();\n }", "public Type getType() {\n \t\tif(type == null) {\n \t\t\ttry {\n \t\t\t\tsetType(B3BackendActivator.instance.getBundle().loadClass(getQualifiedName()));\n \t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO: ?? Need to handle this, so the \"not found\" surfaces to the user...\n\t\t\t\t// Handled via model validation - type can not be null\n \t\t\t}\n \t\t}\n \t\treturn type;\n \t}", "public int getType() {\n\tif (num_comp == 0)\n\t return(UNCLASSIFIED);\n\treturn(type[num_comp-1]);\n }", "@Override\n public abstract String getComponentType();", "public String getType() {\n return (String) getObject(\"type\");\n }", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "public String getType () {\n return type;\n }", "public java.lang.String getType() {\n return type;\n }", "public java.lang.String getType() {\n return type;\n }", "public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\r\n\t\treturn type;\r\r\n\t}", "public final String type() {\n return type;\n }", "public String getType()\n\t{\n\t\treturn type;\n\t}", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n return type;\n }", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public List<ComponentType> getComponentsType() {\r\n\t\treturn ctDao.findAll();\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\n\t\treturn _type;\n\t}", "ComponentTypes.AccessPoint getType();", "public synchronized String getType() {\n\t\treturn type;\n\t}", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }" ]
[ "0.8193752", "0.78920263", "0.76624095", "0.7539023", "0.74572814", "0.73268455", "0.7058376", "0.7021243", "0.702058", "0.69734", "0.6942619", "0.69126433", "0.69093144", "0.6897714", "0.68954647", "0.68954647", "0.68954647", "0.68886614", "0.68886614", "0.6868061", "0.68555194", "0.6855171", "0.6852844", "0.68473303", "0.68473303", "0.6844352", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6842444", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.6836713", "0.68354124", "0.6830924", "0.6830924", "0.6830924", "0.68250626", "0.68250626", "0.68250626", "0.68250626", "0.68250626", "0.68194747", "0.6808907", "0.68031377", "0.6801034", "0.6801034", "0.6801034", "0.6801034", "0.6801034", "0.6801034" ]
0.73645407
5
/ Returns all properties descriptions (metaproperties) of this component.
List<List<Class<?>>> getConstructorParametersTypes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PropertyDescriptor[] getPropertyDescriptors () {\n return desc;\n }", "PropertyDesc[] getPropertyDesc()\r\n\t{\r\n\t\tPropertyDesc[] p = new PropertyDesc[properties.size()];\r\n\t\tint i = 0;\r\n\t\tfor (Variable v : properties)\r\n\t\t{\r\n\t\t\tp[i++] = new PropertyDesc(v.name, v.varType, v.classID);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "public org.LexGrid.commonTypes.Properties getProperties() {\n return properties;\n }", "ArrayList<PropertyMetadata> getProperties();", "public Hashtable getProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getProperties();\n }", "public String getDescription() {\n return getProperty(Property.DESCRIPTION);\n }", "@Override\n public ConfigurablePropertyMap getProperties() {\n return properties;\n }", "public PropertyMetaData[] getPropertyMetaData() \n {\n return METADATA;\n }", "public Map<String, String> getAllProperties()\n {\n return _propertyEntries;\n }", "public List<IPropertyDescriptor<T>> getProperties();", "@ApiModelProperty(value = \"The customized properties that are present\")\n public List<PropertyDefinitionResource> getProperties() {\n return properties;\n }", "public PropertyDescription[] getPropertiesDescriptions() {\n\t\tPropertyDescription[] pds = new PropertyDescription[3];\n\t\tpds[0] =\n\t\t\tnew PropertyDescription(\n\t\t\t\t\"binMethod\",\n\t\t\t\t\"Discretization Method\",\n\t\t\t\t\"The method to use for discretization. Select 1 to create bins\"\n\t\t\t\t\t+ \" by weight. This will create bins with an equal number of items in \"\n\t\t\t\t\t+ \"each slot. Select 0 to do uniform discretization by specifying the number of bins. \"\n\t\t\t\t\t+ \"This will result in equally spaced bins between the minimum and maximum for \"\n\t\t\t\t\t+ \"each scalar column.\");\n\t\tpds[1] =\n\t\t\tnew PropertyDescription(\n\t\t\t\t\"binWeight\",\n\t\t\t\t\"Number of Items per Bin\",\n\t\t\t\t\"When binning by weight, this is the number of items\"\n\t\t\t\t\t+ \" that will go in each bin. However, the bins may contain more or fewer values than \"\n\t\t\t\t\t+ \"weight values, depending on how many items equal the bin limits. Typically \"\n\t\t\t\t\t+ \"the last bin will contain less or equal to weight values and the rest of the \"\n\t\t\t\t\t+ \"bins will contain a number that is equal or greater to weight values.\");\n\t\tpds[2] =\n\t\t\tnew PropertyDescription(\n\t\t\t\t\"numberOfBins\",\n\t\t\t\t\"Number of Bins\",\n\t\t\t\t\"Define the number of bins absolutely. \"\n\t\t\t\t\t+ \"This will give equally spaced bins between \"\n\t\t\t\t\t+ \"the minimum and maximum for each scalar \"\n\t\t\t\t\t+ \"column.\");\n\t\treturn pds;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Hashtable getProperties() {\n\t\treturn _props;\n\t}", "public Map<String, Object> getProperties()\n {\n return m_props;\n }", "public Map<String, Property> getProperties()\n {\n return properties;\n }", "public Properties getProperties() {\n\t\treturn this.properties;\n\t}", "public Map<String, String> properties() {\n return this.properties;\n }", "public Map<String, String> getProperties() {\n\t\treturn this.properties;\n\t}", "EProperties getProperties();", "public Object getProperties() {\n return this.properties;\n }", "public Collection<ModuleProperty> getProperties();", "public Map<String, String> getProperties() {\n return properties;\n }", "public Map<String, String> getProperties() {\n return properties;\n }", "public Properties getProperties() { return props; }", "java.lang.String getProperties();", "public Map<String, String> getProperties() {\n return properties;\n }", "public Set<ProductSectionProperty> getProperties() {\n return properties;\n }", "public PropertyDescription [] getPropertiesDescriptions () {\n\t PropertyDescription [] pds = new PropertyDescription [1];\n\t pds[0] = new PropertyDescription (\"errorFunctionName\", \"Error Function\", \"The name of the error function, can be Absolute, Classification, Likelihood or Variance.\");\n\t return pds;\n }", "public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }", "public HasDisplayableProperties getProperties();", "public Map<String, Object> getProperties() {\n return properties;\n }", "public Map<String, Object> getProperties() {\n return properties;\n }", "public Map<String, Object> getProperties() {\n return properties;\n }", "public Properties getProperties()\n {\n return this.properties;\n }", "@Override\n public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }", "@ApiModelProperty(value = \"The custom properties of this entity\")\n public Map<String, String> getProperties() {\n return properties;\n }", "public Map<String, Object> getProperties() {\n return mProperties;\n }", "public List<PropertySchema> getProperties() {\n return _properties;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getDescription() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(DESCRIPTION_PROP.get());\n }", "Properties getProperties();", "@Override\n\t\tpublic Map<String, Object> getAllProperties() {\n\t\t\treturn null;\n\t\t}", "public Properties getProperties() {\n return properties;\n }", "public Properties getProperties() {\n return properties;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getDescription() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(DESCRIPTION_PROP.get());\n }", "public Properties getProperties()\n {\n Properties properties = null;\n List<Props.Entry> props = this.props.getEntry();\n if ( props.size() > 0 )\n {\n properties = new Properties();\n //int size = props.size();\n for ( Props.Entry entry : props )\n {\n String key = entry.getKey();\n String val = entry.getValue();\n properties.setProperty( key, val );\n }\n }\n return properties;\n }", "public abstract AbstractProperties getProperties();", "protected java.util.Map getProperties() {\n return properties;\n }", "public static List<DisplayProperty> getDisplayProperties() {return DISPLAY_PROPERTIES;}", "Property[] getProperties();", "public final PropertyDescriptor[] getPropertyDescriptors()\n {\n try{\n final PropertyDescriptor[] res={\n prop(\"Color\", \"Color to paint highlight\"),\n prop(\"Size\", \"size to paint highlight (pixels\"),\n };\n return res;\n }\n catch(Exception e)\n {\n MWC.Utilities.Errors.Trace.trace(e);\n return super.getPropertyDescriptors();\n }\n\n }", "public Map<String, Schema> getProperties() {\n\t\treturn properties;\n\t}", "public String[] getProperties() \n {\n String[] props = {\"discussionSearch.subject\", \"discussionSearch.content\"}; \n return props;\n }", "public String description() {\n return this.innerProperties() == null ? null : this.innerProperties().description();\n }", "public String description() {\n return this.innerProperties() == null ? null : this.innerProperties().description();\n }", "public String description() {\n return this.innerProperties() == null ? null : this.innerProperties().description();\n }", "public String description() {\n return this.innerProperties() == null ? null : this.innerProperties().description();\n }", "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }", "public List<String> getDescription()\n {\n return description;\n }", "public Description description() {\n return this.innerProperties() == null ? null : this.innerProperties().description();\n }", "public Properties getProperties();", "protected List getProperties() {\n return null;\n }", "public Set<Property> getProperties() {\r\n\t\treturn properties;\r\n\t}", "public Dictionary<String, Object> getProperties();", "@ZAttr(id=-1)\n public String[] getDescription() {\n return getMultiAttr(Provisioning.A_description);\n }", "public Map getProperties();", "public IProperties getGeneralProperties() {\n return getPropertyGroups().getProperties(PROPGROUP_GENERAL);\n }", "public abstract Properties getProperties();", "Properties getProps()\n {\n return props;\n }", "public String getDescription() {\n return metadata_.description;\n }", "public java.util.Map<String,String> getProperties() {\n \n if (properties == null) {\n properties = new java.util.HashMap<String,String>();\n }\n return properties;\n }", "public Set<Pp> getProperties() {\n return properties;\n }", "public java.lang.String[] getDescription() {\n return description;\n }", "public List getDescriptions() {\n return descriptions;\n }", "public abstract List<PropertyType> getBuiltInProperties();", "public java.lang.Object getDescription() {\n return description;\n }", "@ApiModelProperty(example = \"null\", value = \"The properties of the reporting task.\")\n public Map<String, String> getProperties() {\n return properties;\n }", "@JsonProperty(\"properties\")\n public PropertyBag getProperties() {\n return properties;\n }", "CommonProperties getProperties();", "@Override\n public String getDescription() {\n String desc = \"\";\n desc += \"Width: \" + getWidth() + \" Length: \" + getLength() + \"\\n\";\n desc += \"Monsters:\\n\";\n for (Monster m: monsters) {\n desc += m.getDescription() + \"\\n\";\n }\n desc += \"Treasures:\\n\";\n for (Treasure t: treasures) {\n desc += t.getDescription() + \"\\n\";\n }\n\n return desc;\n }", "@Override\r\n\tpublic Properties getProperties() {\n\t\treturn null;\r\n\t}", "Map<String, String> getProperties();", "Map<String, String> getProperties();", "public static void viewListAllProperties() {\n\t\tArrayList<Property> prop_list = getRegControl().listOfAllProperties();\r\n\t\t// if the prop_list is empty, print out the warning message and stop the method\r\n\t\tif (prop_list.size() == 0) {\r\n\t\t\tSystem.out.println(\"Property Registry empty; no properties to display\\n\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// loop through all found properties and print out their toString()\r\n\t\tfor (Property property : prop_list) {\r\n\t\t\tSystem.out.println(property.toString());\r\n\t\t}\r\n\t}", "Map<String, String> properties();", "Map<String, String> properties();", "@Value.Default\n public Dict getDescription() {\n\treturn Dict.of();\n }", "private ConfigProperties getProperties() {\n return properties;\n }", "public String getDescs() {\n return descs;\n }", "public java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> getPropsList() {\n if (propsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(props_);\n } else {\n return propsBuilder_.getMessageList();\n }\n }", "protected String getPropertyStrings() {\n\t\treturn \"Active:\" + activeProperty().getValue() + \", FromDataset:\" + isFromDataset() + \", Modified:\" + isModified();\n\t}", "public static Properties getProperties() {\r\n return getProperties(false);\r\n }", "public static void prtProperties() {\n prop.list(System.out);\n }", "public java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> getPropsList() {\n return props_;\n }", "public String getDescription() {\n return this.Description;\n }", "@Override\n\tpublic Map<String, Object> getProperties() {\n\t\treturn null;\n\t}", "@ApiModelProperty(value = \"Details of the issue properties identified in the request.\")\n public Map<String, Object> getProperties() {\n return properties;\n }", "public String getDescription() {\r\n return Description; \r\n }", "public String getDescription() {\n return this.description;\n }", "StringMap getProperties();", "@Schema(description = \"Details of properties for the worklog. Optional when creating or updating a worklog.\")\n public List<EntityProperty> getProperties() {\n return properties;\n }", "List<? extends T> getDeclaredProperties();" ]
[ "0.74304706", "0.7413891", "0.73414075", "0.7290083", "0.72764575", "0.7234794", "0.72070205", "0.7168926", "0.7138581", "0.711978", "0.7064575", "0.70402426", "0.7036547", "0.702307", "0.7015033", "0.70040995", "0.6990774", "0.6989723", "0.69835114", "0.69396436", "0.6921711", "0.6907023", "0.6907023", "0.69052815", "0.6896119", "0.6895236", "0.68829525", "0.6869914", "0.68447065", "0.68382406", "0.68270457", "0.68270457", "0.6822078", "0.68164265", "0.68058985", "0.6797369", "0.6793032", "0.6761907", "0.6735873", "0.66949767", "0.66922516", "0.6691897", "0.6687637", "0.6687386", "0.666426", "0.66642535", "0.66609806", "0.6656543", "0.6639443", "0.6638173", "0.66333395", "0.6601449", "0.66014105", "0.66014105", "0.66014105", "0.66014105", "0.6588796", "0.65660703", "0.6562127", "0.6547582", "0.65418947", "0.6533642", "0.6531294", "0.6529285", "0.6515591", "0.6513921", "0.64973384", "0.6497179", "0.6496661", "0.6478977", "0.6478349", "0.6478033", "0.6470725", "0.6456293", "0.6455691", "0.6453992", "0.6451494", "0.64344996", "0.6433914", "0.64294744", "0.64117163", "0.64117163", "0.63889694", "0.6388551", "0.6388551", "0.6386364", "0.63760215", "0.6353506", "0.63519084", "0.6346806", "0.63467467", "0.633327", "0.63274866", "0.63135475", "0.63119626", "0.63112193", "0.6309944", "0.6307736", "0.63042706", "0.63030845", "0.6302365" ]
0.0
-1
Checks if described component contains a property with a given name.
boolean containsProperty(String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPropertyLike(String name);", "public boolean hasProperty(String name) {\n for(Pp property : properties){\n if(property.getId().equals(name))\n return true;\n }\n return false;\n }", "public boolean hasProperty(String name) {\n return properties.has(name);\n }", "boolean hasProperty(String propertyName);", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "public boolean propertyExists(String name)\n {\n return _propertyEntries.containsKey(name);\n }", "public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}", "public boolean hasProperty( String key );", "boolean propertyExists(Object name) throws JMSException;", "boolean hasProperty(String key);", "public void _hasPropertyByName() {\n requiredMethod(\"getProperties()\");\n tRes.tested(\"hasPropertyByName()\",\n (\n (oObj.hasPropertyByName(IsThere.Name)) &&\n (!oObj.hasPropertyByName(\"Jupp\")) )\n );\n }", "private boolean findProperty(String name,\n PropertyDescriptor[] propertyDescriptors) {\n for (int i = 0; i < propertyDescriptors.length; i++) {\n if (propertyDescriptors[i].getName().equals(name)) {\n return true;\n }\n }\n return false;\n }", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "abstract boolean hasXMLProperty(XMLName name);", "Object getPropertyexists();", "String getPropertyExists();", "public static boolean checkPropertyExists(String propertyName) {\n\t\treturn CatPawConfig.getConfig().containsKey(propertyName);\n\n\t}", "public static boolean checkPropertyExists(String propertyName) {\n checkArgument(propertyName != null, \"Property name cannot be null\");\n return getConfig().containsKey(propertyName);\n }", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "boolean hasGetProperty();", "public static boolean propertyExists(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n boolean exists = props.containsKey(aKey);\n return exists;\n }", "public abstract boolean getProperty(String propertyName);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "public boolean has(String propertyName) {\n return this.propertyBag.has(propertyName);\n }", "private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}", "public boolean hasProperty(Pp property) {\n return properties.contains(property);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "boolean hasProperty1();", "boolean hasProperty0();", "public void _getPropertyByName() {\n requiredMethod(\"getProperties()\");\n boolean result;\n try {\n Property prop = oObj.getPropertyByName(IsThere.Name);\n result = (prop != null);\n } catch (com.sun.star.beans.UnknownPropertyException e) {\n log.println(\"Exception occurred while testing\" +\n \" getPropertyByName with existing property\");\n e.printStackTrace(log);\n result = false;\n }\n\n try {\n oObj.getPropertyByName(\"Jupp\");\n log.println(\"No Exception thrown while testing\"+\n \" getPropertyByName with non existing property\");\n result = false;\n }\n catch (UnknownPropertyException e) {\n result = true;\n }\n tRes.tested(\"getPropertyByName()\", result);\n return;\n }", "boolean containsProperties(\n java.lang.String key);", "public boolean containsKey(String key) throws Exception {\n //return properties.containsKey(key);\n if (config != null) {\n Configuration[] props = config.getChildren(\"property\");\n for (int i = 0; i < props.length; i++) {\n if (props[i].getAttribute(\"name\") != null && props[i].getAttribute(\"name\").equals(key)) return true;\n }\n }\n return false;\n }", "@Override\n public boolean isPropertySupported(String name) {\n // !!! TBI: not all these properties are really supported\n return mConfig.isPropertySupported(name);\n }", "boolean hasProperty2();", "public boolean exists(String property) { // e.g. th:unless=\"${errors.exists('seaName')}\"\n return messages.hasMessageOf(property);\n }", "public boolean isProperty();", "@java.lang.Override\n public boolean containsProperties(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetProperties().getMap().containsKey(key);\n }", "public boolean equals(Property inProperty){\n return (inProperty.getName().equals(this.getName()));\n }", "boolean hasSetProperty();", "@java.lang.Override\n public boolean containsProperties(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetProperties().getMap().containsKey(key);\n }", "private boolean isPropertyRelevant(String property) {\n return relevantProperties == null || relevantProperties.contains(property);\n }", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "@Override\n\tpublic boolean hasProperty(String fieldName, String value) {\n\t\tString[] fields = doc.getValues(fieldName);\n\t\tif (fields != null) {\n\t\t\tfor (String field : fields) {\n\t\t\t\tif (value.equals(field)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "<T> boolean containsValue(Property<T> property);", "public boolean hasProperty(String key) {\n return commandData.containsKey(key);\n }", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "boolean hasValue(PropertyValue<?, ?> value);", "public boolean removeProperty(String name) {\n for(Pp property : properties){\n if(property.getId().equals(name))\n return removeProperty(property);\n }\n return false;\n }", "@Override\r\n public boolean isNameProperty() throws Exception\r\n {\n return false;\r\n }", "public boolean containsKey(final String key) {\n return key != null && _properties.containsKey(key);\n }", "private static boolean isPropertyEnabled(Dictionary<?, ?> properties,\n String propertyName) {\n boolean enabled = false;\n try {\n String flag = Tools.get(properties, propertyName);\n enabled = isNullOrEmpty(flag) ? enabled : flag.equals(\"true\");\n } catch (ClassCastException e) {\n // No propertyName defined.\n enabled = false;\n }\n return enabled;\n }", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "public final boolean superHasPublicProperty(String name)\n {\n return getSuperClass().getProperty(name) != null;\n }", "public static boolean hasProperty(String propID)\n throws DBException\n {\n SystemProps.Key propKey = new SystemProps.Key(propID);\n return propKey.exists();\n }", "public boolean hasProperty( Property propertyId ) {\n return nodeProperties != null && nodeProperties.containsKey(propertyId);\n }", "public boolean isMissing(String propname)\n\t\t{\n\t\t\treturn m_missingInformation.contains(propname) || m_missingInformation.contains(Validator.escapeUrl(propname));\n\t\t}", "@MethodContract(\n post = @Expression(\"_pe != null && elementExceptions[pe.propertyName] != null && \" +\n \"exists(PropertyException pe : elementExceptions[pe.propertyName]) {pe.like(_pe)}\")\n )\n public final boolean contains(PropertyException pe) {\n if (pe == null) {\n return false;\n }\n Set<PropertyException> pes = $elementExceptions.get(pe.getPropertyName());\n if (pes == null) {\n return false;\n }\n for (PropertyException candidate : pes) {\n if (candidate.like(pe)) {\n return true;\n }\n }\n return false;\n }", "@SuppressWarnings(\"rawtypes\")\n public static boolean isPropName(String varName) {\n if (varName == null)\n return false;\n varName = varName.toUpperCase().trim();\n for (Class<? extends Enum> c : CMProps.PROP_CLASSES) {\n if (CMath.s_valueOf(c, varName) != null)\n return true;\n }\n return false;\n }", "private static boolean isListProperty(String prop) {\n prop = prop.intern();\n for (int i = 0; i < listProperties.length; i++) {\n if (prop == listProperties[i]) {\n return true;\n }\n }\n return false;\n }", "public synchronized boolean hasListeners(java.lang.String propertyName) {\r\n\treturn getPropertyChange().hasListeners(propertyName);\r\n}", "protected boolean isSupportedProperty(String propertyName, Namespace namespace) {\n if (!WebdavConstants.DAV_NAMESPACE.equals(namespace)) {\n return true;\n }\n \n return DAV_PROPERTIES.contains(propertyName);\n }", "public boolean configurationValueExists(String name);", "public boolean isProperty(String classPath, String fieldName)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOField field = getJDOField(classPath, fieldName);\n return (field != null && field.isProperty());\n }", "Property findProperty(String propertyName);", "public boolean hasParam(String name)\r\n {\r\n try {\r\n return lookup.get(name) != null;\r\n } catch(Exception e) {}\r\n \r\n return false;\r\n }", "public Object expectProperty(String name) {\n return getProperty(name).orElseThrow(() -> new IllegalArgumentException(String.format(\n \"Property `%s` is not part of %s, `%s`\", name, getClass().getSimpleName(), this)));\n }", "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "public boolean isAnimProperty(String aPropertyName)\n{\n // Declare anim properties\n String animProps[] = { \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\", \"SkewX\", \"SkewY\", \"Opacity\",\n \"Radius\", // Bogus - for RMRectangle\n \"StartAngle\", \"SweepAngle\", // Bogus - for RMOval\n \"Depth\", \"Yaw\", \"Pitch\", \"Roll3D\", \"FocalLenth\", \"OffsetZ\", // for RMScene3D\n \"Playing\", // Bogus - for RMSound\n \"Morphing\", // Bogus - for RMMorphShape\n \"Distance\", \"PreservesOrientation\" // Bogus - for RMAnimPath\n };\n \n // Return true if is anim property\n return RMArrayUtils.contains(animProps, aPropertyName);\n}", "public boolean isLabelProperty(Object element, String property) {\n\t\t\treturn false;\r\n\t\t}", "boolean equalProps(InstanceProperties props) {\n String propsName = props.getString(PROPERTY_NAME, null);\n return propsName != null\n ? propsName.equals(name)\n : name == null;\n }", "public boolean hasProperty(Contribution contrib, String property) {\n // update, updates, updatable, upgrade\n if (property.startsWith(\"updat\") || property.startsWith(\"upgrad\")) {\n return hasUpdates(contrib);\n }\n if (property.startsWith(\"instal\") && !property.startsWith(\"installabl\")) {\n return contrib.isInstalled();\n }\n if (property.equals(\"tool\")) {\n return contrib.getType() == Contribution.Type.TOOL;\n }\n if (property.startsWith(\"lib\")) {\n return contrib.getType() == Contribution.Type.LIBRARY\n || contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n if (property.equals(\"mode\")) {\n return contrib.getType() == Contribution.Type.MODE;\n }\n if (property.equals(\"compilation\")) {\n return contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n \n return false;\n }", "public boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\n\t}", "public boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\n\t}", "public boolean isLabelProperty(Object element, String property) {\r\n\t\treturn true;\r\n\t}", "public boolean isLabelProperty(Object element, String property) {\r\n\t\treturn true;\r\n\t}", "public abstract boolean isMatching(Properties p);", "public boolean isProperty(Integer id, boolean searchPrototype) throws ExpException {\n return false;\n }", "@Override\r\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\r\n\t}", "public boolean containsKey (String key)\n\t{\n\t\treturn properties.containsKey(key);\n\t}", "String getProperty(String name);", "@Override\n public boolean isLabelProperty(Object element, String property) {\n return false;\n }", "public synchronized boolean hasListeners(java.lang.String propertyName) {\n\t\treturn getPropertyChange().hasListeners(propertyName);\n\t}", "@Override\n public boolean hasModifierProperty(@PsiModifier.ModifierConstant @NonNull String s) {\n return hasExplicitModifier(s);\n }", "public String getProperty(String name);", "@Override\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isLabelProperty(Object element, String property) {\n\t\treturn false;\n\t}", "private boolean hasValue(final String name, final String key) {\n\t\treturn bundleConstants.containsKey(name + SEPERATOR + key);\n\t}", "public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }", "Object getProperty(String name);", "boolean hasAttribute(String name);", "public String propertyMissing(String name) {\n\t\treturn bnd.propertyMissing(name);\n\t}", "private static boolean hasProperty(int settings, int property){\n\t\tint bit = 0; // log2(property)\n\t\twhile ((property >>= 1) > 0) bit ++;\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "public boolean hasProperty() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public boolean hasProperty() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }" ]
[ "0.8133681", "0.81180406", "0.8038427", "0.80217177", "0.79049987", "0.7745588", "0.7721605", "0.7404203", "0.7306223", "0.7305819", "0.72496444", "0.72394806", "0.72099614", "0.72099614", "0.72099614", "0.71844393", "0.71023643", "0.7059665", "0.7029529", "0.7028409", "0.7022432", "0.69689536", "0.69597405", "0.6911879", "0.6830292", "0.67660016", "0.6759518", "0.674571", "0.668888", "0.668888", "0.66789794", "0.6663453", "0.6643948", "0.66290855", "0.6625816", "0.66232497", "0.6507545", "0.64828056", "0.6475859", "0.6445553", "0.64343333", "0.64302146", "0.6404608", "0.6391954", "0.6371206", "0.63266885", "0.62830025", "0.6282134", "0.62393194", "0.6166842", "0.6152513", "0.6141555", "0.6082719", "0.6073072", "0.60722023", "0.605801", "0.6055335", "0.6052699", "0.60520005", "0.6032126", "0.60289764", "0.59792334", "0.5973998", "0.59738415", "0.5932144", "0.5925187", "0.59154886", "0.5895684", "0.58746266", "0.5830007", "0.58201844", "0.5792615", "0.5785383", "0.5773564", "0.57676506", "0.57676506", "0.5763403", "0.5763403", "0.5751167", "0.5742616", "0.5731041", "0.5731041", "0.5731041", "0.5721397", "0.57074976", "0.5679074", "0.56693965", "0.565498", "0.56422466", "0.5634358", "0.5634358", "0.5634358", "0.56216", "0.56037027", "0.55644035", "0.55464685", "0.5524857", "0.55087656", "0.55043954", "0.5496326" ]
0.85901207
0
add object to stack
public void push(E object) {stackList.insertAtFront(object);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(Object obj) {\n if (top < stack.length - 1) {\n stack[++top] = obj;\n }\n else\n {\n increaseStackSize(1);\n stack[++top] = obj; \n }\n }", "private final void push(Object ob) {\r\n\t\teval_stack.add(ob);\r\n\t}", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public void push(Object obj) {\n stack.push(requireNonNull(obj));\n }", "public void push( Object obj )\n {\n this.top = new Node( obj, this.top );\n \n this.count++;\n }", "public void push(Object object) {\n fStack.push(object);\n if (object instanceof IJavaObject) {\n disableCollection((IJavaObject) object);\n }\n }", "public void push(E obj) {\n super.add(obj);\n }", "public void push (E item){\n this.stack.add(item);\n }", "@Override\n public E push(final E obj) {\n // TODO\n top = new Node<>(obj, top);\n return obj;\n }", "void push(E Obj);", "public void push(Item item){\n this.stack.add(item);\n\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "public void push(T o) {\r\n\t\tadd(o);\t\r\n\t}", "void push(RtfCompoundObject state) {\r\n _top = new RtfCompoundObjectStackCell(_top, state);\r\n }", "public final void push(final Object object)\n {\n synchronized (this.stack)\n {\n try\n {\n this.stack[this.pointer++] = object;\n }\n catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException)\n {\n ArrayList<Object> list = new ArrayList<Object>(Arrays.asList(this.stack));\n list.add(null);\n this.stack = list.toArray();\n this.pointer--;\n this.push(object);\n }\n }\n }", "void push(Object elem);", "public void push(T value) {\n \tstack.add(value);\n }", "void push(Object item);", "private void push( Card card ) {\r\n undoStack.add( card );\r\n }", "public synchronized void push(T object) throws PoolException {\n trace(\"push: \");\n if ((getMaxSize() != INFINITE && getStack().size() >= getMaxSize()) || !isValid(object)) {\n doDestroy(object);\n } else if (getStack().contains(object)) {\n throw new PoolException(\"can't check in object more than once: \" + object);\n } else {\n getStack().add(object);\n inUse--;\n }\n }", "public void push(AnyType e) throws StackException;", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(E o) \r\n {\r\n list.add(o);\r\n }", "public void push(E o) {\n list.add(o);\n }", "@Override\r\n\tpublic void push(AnyType data) throws StackException {\n\t\ttop = new Node<AnyType>(data,top);\r\n\t}", "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public void push(ILocation item)\n {\n stack.add(top, item);\n top++;\n }", "public Object push(Object o) {\n\t\tadd(o);\n\t\treturn o;\n\t}", "public void push(Object anElement);", "@Test\n public void addAllTypesTest(){\n stack.addToAllTypes(stack2);\n ResourceStack stack3 = new ResourceStack(3, 5, 7, 9);\n assertEquals(stack3.toString(), stack.toString());\n\n stack.addToAllTypes(stack2);\n stack3 = new ResourceStack(5, 8, 11, 14);\n assertEquals(stack3.toString(), stack.toString());\n }", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "public void add(HayStack stack){\n if(canMoveTo(stack.getPosition())){\n mapElement.put(stack.getPosition(), stack);\n }\n else{\n throw new IllegalArgumentException(\"UnboundedMap.add - This field is occupied\");\n }\n }", "public void push(T data) {\n top = new StackNode(data, top);\n }", "public void push(E inValue)\n {\n stack.insertFirst(inValue);\n }", "public void add(final E obj)\n {\n final Queue<E> level = getTailLevel();\n level.add(obj);\n size++;\n }", "public void push(Object value) {\n\t\tthis.add(value);\n\t}", "public void push(E e) {\n\t\ttop = new SNode<E>(e, top);\n\t}", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "void push(Location loc) {\n // -\n top = new LocationStackNode(loc, top);\n }", "public void addElement(Object obj);", "public void addObject(final PhysicalObject obj) {\n \t\tmyScene.addChild(obj.getGroup());\n \t\tmyObjects.add(obj);\n \t}", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "public void push(Object element) {\r\n\t\tal.add(element, al.listSize);\r\n\t}", "public static void push(Object data) {\n list.add(data);\n }", "boolean add(Object object) ;", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "@Override\n public void push(T element){\n arrayAsList.add(element);\n stackPointer++;\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "void Add(Object obj );", "public void push(E item);", "public MyStack() {\n objects = new LinkedList<>();\n helper = new LinkedList<>();\n }", "void pushEvaluationStack(RTObject obj) {\n\t\tListValue listValue = null;\r\n\t\tif (obj instanceof ListValue)\r\n\t\t\tlistValue = (ListValue) obj;\r\n\r\n\t\tif (listValue != null) {\r\n\t\t\t// Update origin when list is has something to indicate the list\r\n\t\t\t// origin\r\n\t\t\tInkList rawList = listValue.getValue();\r\n\t\t\tList<String> names = rawList.getOriginNames();\r\n\t\t\tif (names != null) {\r\n\t\t\t\tArrayList<ListDefinition> origins = new ArrayList<ListDefinition>();\r\n\t\t\t\tfor (String n : names) {\r\n\t\t\t\t\tListDefinition def = story.getListDefinitions().getDefinition(n);\r\n\t\t\t\t\tif (!origins.contains(def))\r\n\t\t\t\t\t\torigins.add(def);\r\n\t\t\t\t}\r\n\t\t\t\trawList.origins = origins;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tevaluationStack.add(obj);\r\n\t}", "public abstract boolean push(Object E);", "public void addElement(Replicated obj)\r\n\t{\n\t\tinsert(obj, seq.size());\r\n\t}", "public void add() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->add() unimplemented!\\n\");\n }", "public void push(E data);", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "public void push(TYPE element);", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "public void addToTop(Card card) {\n downStack.add(0, card);\n }", "public StackImpl<T> push(T ele) {\r\n\t\tNode oldTop = top;\r\n\t\ttop = new Node(ele);\r\n\t\ttop.next = oldTop;\r\n\t\tsize++;\r\n\t\t\r\n\t\treturn this;\r\n\t}", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "public void push(T item);", "public void addItem(Object obj) {\n items.add(obj);\n }", "public synchronized void push(Object o) {\n itemcount++;\n addElement(o);\n notify();\n }", "public void push(int x) {\n stack.add(x);\n }", "public void push(T newEntry) {\n ensureCapacity();\n stack[topIndex + 1] = newEntry;\n topIndex++;\n }", "@Override\r\n\tpublic void push(E e) {\n\t\t\r\n\t}", "private void pushStackStackForward( ThroughNode aNode ) {\n List<ThroughNode> curStack = nodeStackStack.peek();\n List<ThroughNode> newStack = new ArrayList<>(curStack.size()+1);\n newStack.add(aNode);\n newStack.addAll(curStack);\n nodeStackStack.push(newStack);\n }", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push(AsciiImage img) {\r\n\t\thead = new AsciiStackNode(img, head);\r\n\t}", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void push(Character data)\r\n\t{\r\n\t\tstack[top] = data;\r\n\t\ttop++;\r\n\t}", "public void push(int x) {\n this.stack1.add(x);\n }", "public void push(E element);", "@Override\r\n\tpublic boolean push(T e) {\r\n\t\tif(!isFull()) {\r\n\t\t\tstack[topIndex + 1] = e;\r\n\t\t\ttopIndex++;\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 void addObject(Objects object)\n {\n items.put(object.getItemName(), object);\n }", "public void push(State s0) {\n\t\tsList.add(s0);\r\n\t}", "public void push(Item item)\n {\n top = new Node<Item>(item, top);\n N++;\n }", "public void push(T dato );", "public void push(int element) {\n stack1.push(element);\n }", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public void push(T data) {\n if((stackPointer + 1) == Array.getLength(this.elements))\n expandStack();\n this.elements[++stackPointer] = data;\n }", "public void push(Card card){\n\t\t//Make sure the stack is not the deck or draw pile\n\t\tif(StackID > 1){\n\t\t\t//If it's one of the foundations...\n\t\t\tif(StackID < 6){\n\t\t\t\t//If the foundation wasn't empty, unhighlight the top card before putting the new card on it\n\t\t\t\tif(!Solitaire.foundations[StackID-2].isEmpty())\n\t\t\t\t\tSolitaire.foundations[StackID-2].peek().highlightOff();\n\t\t\t\t//Put the card on the right foundation\n\t\t\t\tSolitaire.foundations[StackID-2].place(card);\n\t\t\t//If it's one of the piles...\n\t\t\t} else if(StackID <= 12){\n\t\t\t\t//If the pile wasn't empty, unhighlight the top card before putting the new card on it\n\t\t\t\tif(!Solitaire.piles[StackID-6].isEmpty())\n\t\t\t\t\tSolitaire.piles[StackID-6].peek().highlightOff();\n\t\t\t\t//Put the card on the right pile\n\t\t\t\tSolitaire.piles[StackID-6].place(card);\n\t\t\t}\n\t\t}\n\t}", "void push(T item);", "void push(T item);", "public void push(E element){\n\t\tNode<E> temp = new Node<E>(element);\n\t\ttemp.next = top;\n\t\ttop = temp;\n\t}", "public void add(Object o);", "public void\npush(SoState state)\n{\n\tsuper.push(state);\n SoLazyElement prevElt = (SoLazyElement)getNextInStack();\n this.coinstate.copyFrom( prevElt.coinstate);\n}", "public ObjectStack() {collection = new ArrayIndexedCollection();}", "public void push(E value);", "public Card push(Card card)\n {\n if (card != null)\n {\n cards.add(card);\n card.setBounds(0, 0, CARD_WIDTH, CARD_HEIGHT);\n add(card, 0);\n }\n \n return card;\n }", "public void push(T newItem);", "@Override\n public void push(E z){\n if(isFull()){\n expand();\n System.out.println(\"Stack expanded by \"+ expand+ \" cells\");\n }\n stackArray[count] = z;\n count++;\n }", "public void push(int x) {\n load();\n stack.push(x);\n unload();\n }" ]
[ "0.7860529", "0.7623007", "0.7547661", "0.74907255", "0.740841", "0.73550576", "0.726548", "0.7222957", "0.71987987", "0.71379435", "0.71163964", "0.6918915", "0.6882911", "0.687632", "0.6869973", "0.68636835", "0.67997885", "0.67644453", "0.668135", "0.66712856", "0.664235", "0.6594132", "0.65455", "0.65339667", "0.65096205", "0.6499809", "0.6486715", "0.64773136", "0.6468404", "0.64513373", "0.6418005", "0.6376783", "0.63681275", "0.6352299", "0.6349509", "0.6341943", "0.63180196", "0.63041353", "0.630072", "0.62992615", "0.62738043", "0.6271568", "0.623596", "0.6218541", "0.62019694", "0.6199694", "0.61881644", "0.6186776", "0.61558264", "0.61474603", "0.61418104", "0.61409754", "0.61377764", "0.61371535", "0.6123233", "0.6116645", "0.61124045", "0.61096144", "0.60972786", "0.6095634", "0.60832065", "0.6079572", "0.60675013", "0.60672206", "0.60672104", "0.60645705", "0.6061651", "0.605294", "0.6049803", "0.6035665", "0.60291934", "0.6022729", "0.6021885", "0.60198486", "0.60172844", "0.60121745", "0.6006363", "0.600432", "0.6004216", "0.60018736", "0.6001282", "0.59964246", "0.599465", "0.5992682", "0.5992062", "0.59832954", "0.59749055", "0.59650975", "0.5962218", "0.5955794", "0.5955794", "0.5955583", "0.5954222", "0.5952909", "0.5946535", "0.5941441", "0.59318775", "0.5924419", "0.59203756", "0.5920277" ]
0.8100505
0
remove object from stack
public E pop() throws NoSuchElementException{ return stackList.removeFromFront(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object remove();", "public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }", "Object pop();", "public Object remove();", "public void remove() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "public void pop() {\n myCStack.delete();\n }", "public Object pop();", "public void pop();", "public void removeByObject()\r\n\t{\n\t}", "private void removeObject() {\n\t\tif(this.curr_obj != null) {\n this.canvas.uRemove(this.curr_obj);\n\t\t\tthis.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n\n this.curr_obj = null;\n }\n\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void removeChild(TaskStack stack) {\n super.removeChild((TaskStackContainers) stack);\n removeStackReferenceIfNeeded(stack);\n }", "public void remove () {}", "public void popScope() {\n this.stack.removeFirst();\n }", "private void pop() {\r\n pop( false );\r\n }", "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public abstract Object pop();", "public Object pop() {\n return stack.pop();\n }", "void remover(Object o);", "public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }", "public void popFrame(){\n runStack.popFrame();\n }", "public void removeObject(java.lang.Object object) {}", "public void pop() {\n // if the element happen to be minimal, pop it from minStack\n if (stack.peek().equals(minStack.peek())){\n \tminStack.pop();\n }\n stack.pop();\n\n }", "void remove();", "void remove();", "void remove();", "void remove();", "void remove();", "Object removeFirst();", "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "public TYPE pop();", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}", "public void remove () { this.setAsDown(); n.remove(); }", "public boolean remove(Object obj);", "public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }", "public AnyType pop() throws StackException;", "public void removeObject(AdvObject obj) {\n\t\tobjects.remove(obj); // Replace with your code\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void remove() {\n\t}", "public void remove() {\n\t}", "public void remove() {\r\n //\r\n }", "@Override\n\tpublic void remove() { }", "public Object pop() {\n return fStack.pop();\n }", "public void remove(){\n }", "@Override\n\tpublic void remove(Object o) {\n\t\t\n\t}", "public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 1928) \n public static final SubLObject clear_stack(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_num(stack, ZERO_INTEGER);\n _csetf_stack_struc_elements(stack, NIL);\n return stack;\n }", "public void remove(GameObject object) {\n\t\tgameObjects.remove(object);\t\n\t}", "public void pop() {\n s.pop();\n }", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public void remove(GObject object);", "public void remove() {\r\n return;\r\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public final void remove () {\r\n }", "@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}", "public void pop() {\n if(!empty()){\n \tstack.pop();\n }\n }", "public void remove(Comparable obj)\n {\n \t fixup(root, deleteNode(root, obj));\n }", "public boolean remove(objectType obj);", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n public void remove() {\n }", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "public void remove() {\n\n }", "public boolean removeElement(Object obj);", "public Node removeFromChain();", "@Override\n public void remove() {\n }", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "public T pop();", "@Test\n public void removeFromAllTypesTest(){\n ResourceStack stack5 = new ResourceStack(50, 50, 50, 50);\n ResourceStack stack6 = new ResourceStack(10, 15, 20, 25);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(40, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(35, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(30, stack5.getResource(ResourceType.COINS));\n assertEquals(25, stack5.getResource(ResourceType.STONES));\n\n stack6 = new ResourceStack(123, 432235, 55, 1);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(0, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(0, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(0, stack5.getResource(ResourceType.COINS));\n assertEquals(24, stack5.getResource(ResourceType.STONES));\n }", "public void erase()\n {\n this.top = null;\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "abstract void pop();", "public E remove();", "public E remove();", "boolean remove(Object obj);", "boolean remove(Object obj);", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "T pop();" ]
[ "0.72853553", "0.7174294", "0.71641797", "0.707622", "0.70049614", "0.70049614", "0.6908359", "0.68988407", "0.689138", "0.6852298", "0.6840705", "0.6810217", "0.6810217", "0.6810217", "0.6810217", "0.6810217", "0.6808429", "0.67883146", "0.6783508", "0.6700224", "0.66952497", "0.66772777", "0.6667652", "0.66663295", "0.66542464", "0.66103256", "0.6573031", "0.6556661", "0.6541734", "0.6541734", "0.6541734", "0.6541734", "0.6541734", "0.65051645", "0.65022767", "0.64948976", "0.6484232", "0.6482206", "0.6482206", "0.6482206", "0.6477303", "0.6476618", "0.6457259", "0.6452932", "0.64471966", "0.64409566", "0.64354146", "0.64354146", "0.6431592", "0.6431592", "0.63824934", "0.63810414", "0.63804924", "0.6380338", "0.6379924", "0.6377687", "0.63729894", "0.6369648", "0.63642186", "0.63618666", "0.63618666", "0.6348687", "0.6342733", "0.63403547", "0.63308454", "0.6310401", "0.63051695", "0.6299283", "0.6294222", "0.6293466", "0.6293466", "0.6293466", "0.6293466", "0.6293466", "0.6293466", "0.6293466", "0.6293466", "0.6272533", "0.62709135", "0.6265772", "0.6263142", "0.62377435", "0.6236027", "0.6230938", "0.6230938", "0.6230938", "0.6230938", "0.6230938", "0.6230938", "0.6230938", "0.6230938", "0.6230171", "0.62296456", "0.6218992", "0.6214904", "0.62143815", "0.62143815", "0.62073946", "0.62073946", "0.61963296", "0.6192663" ]
0.0
-1
determine if stack is empty
public boolean isEmpty() {return stackList.isEmpty();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "public boolean empty() {\n return stack.empty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}", "public boolean isEmpty() {\n return stackImpl.isEmpty();\n }", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return downStack.isEmpty();\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean empty() {\n return stack1.empty();\n }", "public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean isEmpty(){\n return (top == 0);\n }", "public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }", "public boolean isEmpty() {\r\n return (top == null);\r\n }", "public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "boolean isFull(Stack stack){\n\t\tif(stack.getStackSize() >= 100) return true;\r\n\t\telse return false;\t\r\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }", "boolean isEmpty() {\r\n\t\treturn top==0;\r\n\t}", "public boolean isEmpty()\r\n {\n return this.top == null;\r\n }", "public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}", "public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }", "public boolean empty(){\n return this.top == -1;\n }", "public boolean isEmpty() {\n\n return (top == null);\n }", "public boolean isEmpty() {\n return top==-1;\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return top == null;\n }", "public boolean isEmpty() {\n return (this.top == 0);\n }", "public boolean isEmpty() {\n return this.top == null;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn top < 0;\n\t}", "public boolean isEmpty(){\n \treturn top==-1;\n\t}", "public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}", "public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 2117) \n public static final SubLObject stack_empty_p(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n return Types.sublisp_null(stack_struc_elements(stack));\n }", "public boolean empty() \n { \n\treturn(top==-1);\n \n }", "public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }", "public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }", "boolean isEmpty() {\n // -\n if(top == null)\n return true;\n return false;\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean empty() {\n return storeStack.isEmpty();\n }", "public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }", "@Test\n public void testIsEmpty() {\n System.out.println(\"isEmpty\");\n instance = new Stack();\n assertTrue(instance.isEmpty());\n instance.push(\"ab\");\n instance.push(\"cd\");\n assertFalse(instance.isEmpty());\n instance.pop();\n instance.pop();\n assertTrue(instance.isEmpty());\n }", "@Test\r\n public void testIsEmptyShouldReturnFalseWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(90);\r\n stackInstance.push(5);\r\n boolean actualOutput=stackInstance.isEmpty();\r\n assertEquals(false,actualOutput);\r\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "@Test\n public void isEmpty() {\n SimpleStack stack = new DefaultSimpleStack();\n\n // then the stack is empty\n assertTrue(stack.isEmpty());\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn topIndex < 0;\r\n\t}", "public boolean isEmpty() {\n return topIndex < 0;\n }", "@Test /*Test 18 - implemented isEmpty() method to NumStack class. Refactored isEmpty() to now \n call the size() method of the Stack object in NumStack to determine if it is empty, rather than \n always returning true.*/\n public void testIsEmpty() {\n assertTrue(\"NumStack object should be empty after creation\", numStackTest.isEmpty());\n }", "public boolean empty() {\n return push.isEmpty();\n }", "@Test\n public void testIsEmpty(){\n ms = new MyStack();\n assertTrue(ms.IsEmpty());\n }", "public boolean isEmpty()\n\t{ \n\t\treturn (front==-1);\n\t}", "public boolean isCarStackFull() {\n boolean carStackFull = false;\n if(top >= 4) {\n carStackFull = true;\n }\n return carStackFull;\n }", "@Test\n public void isEmptyTest() {\n ResourceStack stack5 = new ResourceStack(1,0,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,1,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,1,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,0,1);\n assertFalse(stack5.isEmpty());\n\n stack5 = new ResourceStack(0,0,0,0);\n assertTrue(stack5.isEmpty());\n }", "public boolean isEmpty() {\n\t\treturn front == null;\n\t}", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean isFull() {\n if(this.top==(size - 1)) {\n return true;\n }\n return false;\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "public static boolean isEmpty()\n { return currentSize==0; }", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "void onStackEmpty();", "boolean isEmpty()\n\t{\n\t\treturn front==-1;\n\t}", "public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}", "private boolean isEmpty()\r\n\t{\r\n\t\treturn getRoot() == null;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "boolean isEmpty() \r\n { \r\n //Write your code here\r\n if(top==-1)\r\n return true;\r\n else\r\n return false;\r\n }", "public boolean isEmpty(){\n\t\treturn tail <= 0;\n\t}", "public boolean isEmpty(){\n return myHeap.getLength() == 0;\n }" ]
[ "0.8802639", "0.87166715", "0.8657691", "0.86563385", "0.8606655", "0.85825735", "0.85529655", "0.84676194", "0.84614295", "0.8453391", "0.84482294", "0.84256136", "0.8420987", "0.8420987", "0.8393726", "0.83681774", "0.8355475", "0.8345752", "0.8342336", "0.8314724", "0.82751006", "0.8271512", "0.82626194", "0.8219718", "0.81891376", "0.81823736", "0.8176165", "0.8174402", "0.8163054", "0.81492573", "0.8121977", "0.8053503", "0.79909366", "0.79814917", "0.79760206", "0.79668534", "0.79155695", "0.79003346", "0.7898808", "0.78964764", "0.7888295", "0.7885689", "0.78766185", "0.7842543", "0.7823139", "0.77811", "0.7762573", "0.7757216", "0.77563196", "0.77508634", "0.77478385", "0.7744875", "0.77429044", "0.77409714", "0.7731291", "0.7731291", "0.77294886", "0.77277935", "0.7717164", "0.7709994", "0.7709893", "0.76521194", "0.761653", "0.7612789", "0.75744295", "0.756527", "0.75301594", "0.749939", "0.749939", "0.749939", "0.7461522", "0.7443067", "0.74414134", "0.7432633", "0.7374558", "0.73633736", "0.73358345", "0.732326", "0.72389174", "0.7210246", "0.7196026", "0.718128", "0.71574485", "0.7152841", "0.7119541", "0.70986575", "0.7085521", "0.7080184", "0.7073517", "0.70633084", "0.7054881", "0.7048654", "0.70452774", "0.70411384", "0.703611", "0.702787", "0.702787", "0.70203185", "0.7017545", "0.697648" ]
0.86350924
4
Constructor for a new instance of the game map processor. This processor will be bound to one map.
@SuppressWarnings("nls") public GameMapProcessor(@NonNull final GameMap parentMap) { super("Map Processor"); parent = parentMap; unchecked = new TLongArrayList(); running = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map() {\n\n\t\t}", "public MapGenerator(GameMap map) {\n\n gameMap = map;\n setGuiHashMap();\n firstCountryFlag=true;\n validator = new MapValidator(gameMap);\n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "public MapTile() {}", "public MapGenerator(GameLogic logic) {\n g_logic = logic;\n }", "public MapContainer() {\n this(new OpenStreetMapProvider());\n }", "public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "@SuppressWarnings(\"all\")\r\n\tpublic Map(String map, Location mapLocation){\r\n\t\tMapPreset preset = MapPreset.presets.get(map);\r\n\t\tif (preset != null){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfinal World world = mapLocation.getWorld();\r\n\t\t\t\tfinal double x = mapLocation.getX();\r\n\t\t\t\tfinal double y = mapLocation.getY();\r\n\t\t\t\tfinal double z = mapLocation.getZ();\r\n\t\t\t\tfinal float pitch = mapLocation.getPitch();\r\n\t\t\t\tfinal float yaw = mapLocation.getYaw();\r\n\t\t\t\t\t\t\r\n\t\t\t\tfinal Float[] alliesBase = preset.getSpawnAllies();\r\n\t\t\t\tfinal Float[] axisBase = preset.getSpawnAxis();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] bombA = preset.getBombA();\r\n\t\t\t\tfinal Float[] bombB = preset.getBombB();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] domA = preset.getDomA();\r\n\t\t\t\tfinal Float[] domB = preset.getDomB();\r\n\t\t\t\tfinal Float[] domC = preset.getDomC();\r\n\t\t\t\t\r\n\t\t\t\tmainSpawn = mapLocation;\r\n\t\t\t\talliesSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + alliesBase[0], \r\n\t\t\t\t\t\ty + alliesBase[1], \r\n\t\t\t\t\t\tz + alliesBase[2],\r\n\t\t\t\t\t\talliesBase[3], \r\n\t\t\t\t\t\talliesBase[4]);\r\n\t\t\t\t\r\n\t\t\t\taxisSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + axisBase[0], \r\n\t\t\t\t\t\ty + axisBase[1], \r\n\t\t\t\t\t\tz + axisBase[2],\r\n\t\t\t\t\t\taxisBase[3], \r\n\t\t\t\t\t\taxisBase[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombA[0], \r\n\t\t\t\t\t\ty + bombA[1], \r\n\t\t\t\t\t\tz + bombA[2],\r\n\t\t\t\t\t\tbombA[3], \r\n\t\t\t\t\t\tbombA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombB[0], \r\n\t\t\t\t\t\ty + bombB[1], \r\n\t\t\t\t\t\tz + bombB[2],\r\n\t\t\t\t\t\tbombB[3], \r\n\t\t\t\t\t\tbombB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domA[0], \r\n\t\t\t\t\t\ty + domA[1], \r\n\t\t\t\t\t\tz + domA[2],\r\n\t\t\t\t\t\tdomA[3], \r\n\t\t\t\t\t\tdomA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domB[0], \r\n\t\t\t\t\t\ty + domB[1], \r\n\t\t\t\t\t\tz + domB[2],\r\n\t\t\t\t\t\tdomB[3], \r\n\t\t\t\t\t\tdomB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domC = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domC[0], \r\n\t\t\t\t\t\ty + domC[1], \r\n\t\t\t\t\t\tz + domC[2],\r\n\t\t\t\t\t\tdomC[3], \r\n\t\t\t\t\t\tdomC[4]);\r\n\t\t\t\t\r\n\t\t\t\tfor (Float[] spawnpoint : preset.getSpawnpoints()){\r\n\t\t\t\t\tspawnsList.add(new Location(\r\n\t\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\t\tx + spawnpoint[0], \r\n\t\t\t\t\t\t\ty + spawnpoint[1], \r\n\t\t\t\t\t\t\tz + spawnpoint[2], \r\n\t\t\t\t\t\t\tspawnpoint[3], \r\n\t\t\t\t\t\t\tspawnpoint[4]));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmapID = maps.size()+1;\r\n\t\t\t\tmapName = map;\r\n\t\t\t\tmapAvailable.add(mapID);\r\n\t\t\t\tmaps.put(maps.size()+1, this);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\tFPSCaste.log(\"Something went wrong! disabling map: \" + map, Level.WARNING);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFPSCaste.log(\"Could not initialise the Map \" + map, Level.WARNING);\r\n\t\t}\r\n\t}", "protected MapImpl() {\n }", "public GameMap(int mapNum) {\n numRow = 0;\n numCol = 0;\n String path;\n switch(mapNum) {\n\n case 1:\n path = Constants.PATH_TO_MAP_11;\n break;\n case 2:\n path = Constants.PATH_TO_MAP_12;\n break;\n case 3:\n path = Constants.PATH_TO_MAP_21;\n break;\n case 4:\n path = Constants.PATH_TO_MAP_22;\n break;\n default: //this should never happen\n path = Constants.PATH_TO_MAP_11;\n }\n\n\n //the following line populates the double ArrayList of SquareAbstract (squares)\n List<String> readList = generateSquareStructureFromFile(path);\n\n //now we're gonna link all the squares (to build a graph) inside the generated square structure\n linkSquares(readList);\n\n generateRooms();\n\n populateRooms();\n }", "public MapController() {\r\n\t}", "public Map(int canvasWidth, int canvasHeight, GraphicsContext canvas, boolean grid) {\n this.canvasWidth = canvasWidth;\n this.canvasHeight = canvasHeight;\n this.correction = null;\n this.drawGrid = grid;\n this.claimedArea = new ArrayList();\n this.canvas = canvas;\n\n instance = this;\n\n // Do a first calculation of the map size\n calculateMapSize(false);\n\n playerTracking = new ArrayList();\n listeners = new ArrayList();\n }", "public Map() {\n\t\t//intially empty\n\t}", "public abstract void createMap();", "public Game(String customMapName) {\n genericWorldMap = new GenericWorldMap(customMapName);\n players = new LinkedList<Player>();\n dice = new Dice();\n observers = new LinkedList<>();\n gameState = GameState.MESSAGE;\n }", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "Map(int width, int height, long tileWidth, Boolean[][] clip, String[][] hooks)\n {\n this.width = width;\n this.height = height;\n this.tileWidth = tileWidth;\n this.clip = clip;\n this.hooks = hooks;\n\n hookCurrent = \"default_map\";\n hookSpawn = \"spawn\";\n }", "public MapCalculator(ZanMinimap minimap) {\n \t\tmap = minimap.map;\n \t}", "public GridMapPanel() {\n super();\n initialize();\n }", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "MAP createMAP();", "public MapEntity() {\n\t}", "public Mapping() { this(null); }", "public Map(int x, int y) {\n\n height_ = y;\n width_ = x;\n\n map_grid_ = new MapTile[height_][width_];\n for (int i = 0; i < height_; ++i) {\n for (int j = 0; j < width_; ++j) {\n map_grid_[i][j] = new MapTile(j, i); //switch rows and columns\n }\n }\n entity_list_ = new LinkedHashMap<String, Entity>();\n items_list_ = new LinkedList<Item>();\n time_measured_in_turns = 0;\n try {\n my_internet_ = new MapInternet(this);\n } catch (Exception e) {\n // No clue what causes this\n e.printStackTrace();\n System.exit(-6);\n return;\n }\n }", "public PacketMap(PppParser parent) {\n this.parent = parent;\n this.packetFactories = new HashMap<Integer, PacketFactory>();\n }", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "public Map(final int aWorldId, final int aLevelId, final GameContainer aGC, final Player aPlayer)\r\n\t{\r\n\t\tmWorldId = (byte) aWorldId;\r\n\t\tmLevelId = (byte) aLevelId;\r\n\t\tmScreen = new Screen(aGC.getWidth(), aGC.getHeight());\r\n\t\tmScreen.init(this);\r\n\t\tmPlayer = aPlayer;\r\n\t\treload();\r\n\t\taddPlayer(mPlayer);\r\n\t\tmPlayer.respawn();\r\n\t\tmWidth = mBlocks.length;\r\n\t\tif (mWidth > 0) mHeight = mBlocks[0].length;\r\n\t\telse mHeight = 0;\r\n\t\tDataManager.instance().playMusic(MusicName.get(mWorldId % 6));\r\n\t}", "public Map(SpriteLoader sprites) {\n\n this.sprites = sprites;\n\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "public ProcessDataMapper() {\t}", "protected WumpusMap() {\n\t\t\n\t}", "public OutputBufferMap () {\n }", "public MmapFactoryImpl() {\n\t\tsuper();\n\t}", "public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }", "public MapPanel() {\n painter = NONE_PAINTER;\n setBackground(BACKGROUND_COLOR);\n mapBounds = new Rectangle2D.Double(0, 0, MIN_WIDTH, MIN_HEIGHT);\n mouseClick = SwingObservable.mouse(this, SwingObservable.MOUSE_CLICK)\n .toFlowable(BackpressureStrategy.LATEST)\n .filter(ev -> ev.getID() == MouseEvent.MOUSE_CLICKED)\n .map(this::mapMouseEvent);\n logger.atDebug().log(\"Created\");\n }", "public MapOther() {\n }", "public MapperBase() {\r\n }", "public ConnectedMap() {\n }", "public abstract void createMap(Game game) throws FreeColException;", "public abstract void createMap(Game game) throws FreeColException;", "public MapNode()\n\t{\n\t\t// Call alternative constructor\n\t\tthis((AbstractNode)null);\n\t}", "public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}", "public Map(){\r\n map = new Square[0][0];\r\n }", "public GameEngine(Console p_Console, AdapterMapEditor p_MapEditor) {\n d_Console = p_Console;\n d_MapEditor = p_MapEditor;\n d_PlayerList = new ArrayList<Player>();\n d_NeutralPlayer = new NeutralPlayer();\n d_AdminCommandsBuffer = new ArrayList<>();\n d_OrderBuffer = new ArrayList<>();\n d_GameSaveLoad = new GameSaveLoad(this);\n d_PreMapLoadPhase = new PreMapLoadPhase(this);\n d_PostMapEditLoadPhase = new PostMapEditLoadPhase(this);\n d_StartupPhase = new StartupPhase(this);\n d_IssueOrdersPhase = new IssueOrdersPhase(this);\n d_ExecuteOrdersPhase = new ExecuteOrdersPhase(this);\n d_GameOverPhase = new GameOverPhase(this);\n d_TournamentModePhase = new Tournament(this);\n d_CurrentPlayer = new Player(\"temp\", this);\n d_CurrentNumberOfTurns = 0;\n d_TournamentEnded = false;\n d_TournamentMode = false;\n d_GameOver = false;\n\n d_CurrentPhase = d_PreMapLoadPhase;\n d_LogEntryBuffer.attach(new LogerOberver());\n d_PlayerPassed = false;\n }", "public MiniMap(Grid grid) {\n\t\tcurrent = this;\n\t\timg = new PImage(grid.cols, grid.rows);\n\t\tint x = Rogue.stage.width - WIDTH;\n\t\tthis.grid = grid;\n\t\tthis.pos = new Int2D(x, 0);\n\t\tbg = createBG();\n\t\tupdate();\n\t\tignoreDiscovered = Registry.getBoolean(\"game.clear_minimap\");\n\t}", "public MKMapView() {}", "public MapView(android.content.Context param0) {\n super(param0);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0));\n } else {\n this.setGInstance(new GImpl(param0));\n }\n wrapper = false;\n }", "public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}", "public Street (SimpleMap roadMap) {\n if (roadMap != null) roadMap.addToMap(this);\n }", "public AbstractGameMode(GameMap map)\n\t{\n\t\tgameMap = map;\n\t\tghosts = new Ghost[getNumberGhosts()];\n\t\tplayer1Modifier = 0.25f;\n\t\tplayer2Modifier = 0.25f;\n\t\tfor(int i = 0; i < getNumberGhosts(); i++)\n\t\t{\n\t\t\tspawnGhost(i, GameMap.SPAWNER);\n\t\t}\n\t\tplayer1 = new Player(\"Player 1\", 130, 2 + 32 + 11 * 16);\n\t\tplayer2 = new Player(\"Player 2\", 130, 2 + 32 + 14 * 16);\n\t}", "public MapGameRequest(String map){\n super(map);\n this.content=\"MapRequest\";\n }", "public GameState() {\n positionToPieceMap = new HashMap<Position, Piece>();\n }", "public FactoryMapImpl()\n {\n super();\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "public void initMap(String path) {\n \tgameState = StateParser.makeGame(path);\n\t\tintel = gameState.getCtrlIntel();\t\n\t\tsnakes = gameState.getSnake();\n\t\tmap = gameState.getMap();\n }", "public MapNode(\n\t\tAbstractNode\tparent)\n\t{\n\t\t// Call superclass constructor\n\t\tsuper(parent);\n\n\t\t// Initialise instance variables\n\t\tpairs = new LinkedHashMap<>();\n\t}", "public Map(Dimension dim){\r\n\t\tthis.dim = dim;\r\n\t\tinitiateMap();\r\n\t\tcreateWorldMap();\r\n\t}", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "public MapView(android.content.Context param0, android.util.AttributeSet param1) {\n super(param0, param1);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1));\n } else {\n this.setGInstance(new GImpl(param0, param1));\n }\n wrapper = false;\n }", "public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public QuadGramMap()\n\t{\n\t\tsuper();\n\t}", "public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }", "public Map(Config config) {\n this.mapCells = new Cell[100][100];\n this.cellGrid= new Cell[20][20][20];\n this.config = config;\n this.origin = config.getOrigin();\n generateMap();\n }", "public Map(){\n this.matrix = new int[10][10];\n }", "public MapView(android.content.Context param0, android.util.AttributeSet param1, int param2) {\n super(param0, param1, param2);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1, param2));\n } else {\n this.setGInstance(new GImpl(param0, param1, param2));\n }\n wrapper = false;\n }", "public Board(String lineMap) {\n objectsOnTheBoard = new LinkedList<GameObject>();\n }", "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 Board(Map<Integer, Space> spaces)\r\n\t{\r\n\t\t_spaces = spaces;\r\n\t}", "public Map(PApplet p, String id, float x, float y, float width, float height, boolean useMask,\n \t\t\tboolean useDistortion, AbstractMapProvider provider) {\n \t\tthis.p = p;\n \n \t\tthis.id = id;\n \t\tthis.x = x;\n \t\tthis.y = y;\n \t\tthis.width = width;\n \t\tthis.height = height;\n \n \t\tthis.mapDisplay = MapDisplayFactory.getMapDisplay(p, id, x, y, width, height, useMask,\n \t\t\t\tuseDistortion, provider);\n \t\t\n \t\tpanCenterZoomTo(PRIME_MERIDIAN_EQUATOR_LOCATION, DEFAULT_ZOOM_LEVEL);\n \t}", "public Simulator useMap(Map map) {\n this.map = map;\n return this;\n }", "public IntMap()\r\n {\r\n this(16);\r\n }", "public MapResult() {\n }", "public SnagImageMap(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t\tthis.context=context;\n\t//\tsm=getSnag();\n\t}", "public OBOMapper() {\n this(true);\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public MapGraphExtra()\n\t{\n\t\t// TODO: Implement in this constructor in WEEK 3\n\t\tmap = new HashMap<GeographicPoint, MapNode> ();\n\t}", "public Map(PApplet p, String id) {\n \t\tthis(p, id, 0, 0, p.width, p.height, false, false, null);\n \t}", "protected ForwardingMap() {}", "public AB2FccSwitchMap() {\n\t\tnpc[0] = 3;\n\t\tnpc[1] = 1;\n\t}", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "private MapContainer(MapProvider provider, String htmlApiKey) {\n super(new BorderLayout());\n internalNative = (InternalNativeMaps)NativeLookup.create(InternalNativeMaps.class);\n if(internalNative != null) {\n if(internalNative.isSupported()) {\n currentMapId++;\n mapId = currentMapId;\n PeerComponent p = internalNative.createNativeMap(mapId);\n \n // can happen if Google play services failed or aren't installed on an Android device\n if(p != null) {\n addComponent(BorderLayout.CENTER, p);\n return;\n }\n } \n internalNative = null;\n }\n if(provider != null) {\n internalLightweightCmp = new MapComponent(provider) {\n private boolean drg = false;\n\n @Override\n public void pointerDragged(int x, int y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerDragged(int[] x, int[] y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerReleased(int x, int y) {\n super.pointerReleased(x, y); \n if(!drg) {\n fireTapEvent(x, y);\n }\n drg = false;\n }\n\n };\n addComponent(BorderLayout.CENTER, internalLightweightCmp);\n } else {\n internalBrowser = new BrowserComponent();\n\n internalBrowser.putClientProperty(\"BrowserComponent.fireBug\", Boolean.TRUE);\n\n Location loc = LocationManager.getLocationManager().getLastKnownLocation();\n internalBrowser.setPage(\n \"<!DOCTYPE html>\\n\" +\n \"<html>\\n\" +\n \" <head>\\n\" +\n \" <title>Simple Map</title>\\n\" +\n \" <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0\\\">\\n\" +\n \" <meta charset=\\\"utf-8\\\">\\n\" +\n \" <style>\\n\" +\n \" /* Always set the map height explicitly to define the size of the div\\n\" +\n \" * element that contains the map. */\\n\" +\n \" #map {\\n\" +\n \" height: 100%;\\n\" +\n \" }\\n\" +\n \" /* Optional: Makes the sample page fill the window. */\\n\" +\n \" html, body {\\n\" +\n \" height: 100%;\\n\" +\n \" margin: 0;\\n\" +\n \" padding: 0;\\n\" +\n \" }\\n\" +\n \" </style>\\n\" +\n \" </head>\\n\" +\n \" <body>\\n\" +\n \" <div id=\\\"map\\\"></div>\\n\" +\n \" <script>\\n\" + \n \" var map;\\n\" +\n \" function initMap() {\\n\" +\n \" var origin = {lat: \"+ loc.getLatitude() + \", lng: \" + loc.getLongitude() + \"};\\n\" +\n \" map = new google.maps.Map(document.getElementById('map'), {\\n\" +\n \" center: origin,\\n\" +\n \" zoom: 8\\n\" +\n \" });\\n\" +\n \" var clickHandler = new ClickEventHandler(map, origin);\\n\" +\n \" }\\n\" +\n \" var ClickEventHandler = function(map, origin) {\\n\" +\n \" var self = this;\\n\" +\n \" this.origin = origin;\\n\" +\n \" this.map = map;\\n\" +\n \" //this.directionsService = new google.maps.DirectionsService;\\n\" +\n \" //this.directionsDisplay = new google.maps.DirectionsRenderer;\\n\" +\n \" //this.directionsDisplay.setMap(map);\\n\" +\n \" //this.placesService = new google.maps.places.PlacesService(map);\\n\" +\n \" //this.infowindow = new google.maps.InfoWindow;\\n\" +\n \" //this.infowindowContent = document.getElementById('infowindow-content');\\n\" +\n \" //this.infowindow.setContent(this.infowindowContent);\\n\" +\n \"\\n\" +\n// \" google.maps.event.addListener(this.map, 'click', function(evt) {\\n\" +\n// \" self.handleClick(evt);\\n\" +\n// \" });\" +\n \"this.map.addListener('click', this.handleClick.bind(this));\\n\" +\n \" };\\n\" +\n \" ClickEventHandler.prototype.handleClick = function(event) {\\n\" + \n \" //document.getElementById('map').innerHTML = 'foobar';\\n\" +\n \" cn1OnClickCallback(event);\" +\n \" };\\n\" +\n \" </script>\\n\" +\n \" <script src=\\\"https://maps.googleapis.com/maps/api/js?key=\" + \n htmlApiKey +\n \"&callback=initMap\\\"\\n\" +\n \" async defer></script>\\n\" +\n \" </body>\\n\" +\n \"</html>\", \"/\");\n browserContext = new JavascriptContext(internalBrowser);\n internalBrowser.addWebEventListener(\"onLoad\", new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n JSObject window = (JSObject)browserContext.get(\"window\");\n window.set(\"cn1OnClickCallback\", new JSFunction() {\n public void apply(JSObject self, Object[] args) {\n Log.p(\"Click\");\n }\n });\n }\n });\n addComponent(BorderLayout.CENTER, internalBrowser);\n }\n setRotateGestureEnabled(true);\n }", "public MapPanel(MapObject[][] map, int pixels_per_grid) {\n \tthis.map = map.clone();\n \tif (pixels_per_grid == 0)\n \t\tthis.pixels_per_grid = GRID_SIZE;\n \telse\n \t\tthis.pixels_per_grid = pixels_per_grid;\n }", "public Game(){\n new Window(800, 800, \"Survival Game\", this);\n handler = new Handler();\n camera = new Camera(0,0);\n this.addKeyListener(new KeyInput(handler));\n\n //create the map\n map = new Map(handler);\n map.generateMap();\n map.drawWorld();\n\n player = new Player(100, 100, ID.Player, handler);\n handler.addObject(player);\n handler.addObject(new Bear(600, 600, ID.Bear, player));\n handler.addObject(new Deer(400, 400, ID.Deer, player));\n\n start();\n }", "public Main()\r\n\t{\r\n\t\tload=new Load();\r\n\t\tmyMap=new MyMap();\r\n\t\tload.myMap=myMap;\r\n\t}", "public Map(int levelWidth, int levelHeight, ArrayList<Planet> planets, ArrayList<Entity> enemies, Player player, Camera camera)\n {\n this.levelWidth = levelWidth;\n this.levelHeight = levelHeight;\n\n double levelSizeRatio = (double)(levelWidth) / levelHeight;\n\n this.mapHeight = defaultMapHeight;\n this.mapWidth = (int)(mapHeight * levelSizeRatio);\n\n this.scale = ((double)(mapHeight)) / levelHeight;\n\n this.topLeftX = defaultTopLeftX;\n this.topLeftY = defaultTopLeftY;\n\n this.planets = planets;\n this.enemies = enemies;\n this.player = player;\n this.camera = camera;\n }", "public Zombie(int x, int y, Map map) {\r\n\t\tsuper(x, y, imagePath, map);\r\n\t\t\r\n\t}", "public FMap(String rute) {\n super(rute);\n init(rute);\n }", "public AB2Fcc2SwitchMap() {\n\t\tnpc[0] = 3;\n\t\tnpc[1] = 3;\n\t}", "public BoardGame()\n\t{\n\t\tplayerPieces = new LinkedHashMap<String, GamePiece>();\n\t\tplayerLocations = new LinkedHashMap<String, Location>();\n\t\t\n\t}", "public Mapping(final ClassLoader loader) {\r\n if (loader == null) {\r\n _classLoader = getClass().getClassLoader();\r\n } else {\r\n _classLoader = loader;\r\n }\r\n }", "public MapScreen() {\n\t\tthis(DEFAULT_WIDTH, DEFAULT_HEIGHT); // default size for map screen.\n\t}", "public EnemySpawner(String mapName) {\n\n map = new Map(mapName);\n enemiesLeft = new int[]{0};\n }", "private void startMapCreater() {\n\t\tNavigator navi = new Navigator(pilot);\n\t\tnavi.addWaypoint(0,0);\n\t\tnavi.addWaypoint(0,5000);\n\t\tBehavior forward = new Forward(navi);\n\t\tBehavior ultrasonic = new UltrasonicSensor(ultrasonicSensorAdaptor,pilot, sonicWheel,dis,dos,navi);\n\t\tBehavior stopEverything = new StopRobot(Button.ESCAPE);\n\t\tBehavior[] behaiverArray = {forward, ultrasonic, stopEverything};\n\t\tarb = new Arbitrator(behaiverArray);\n\t\t\n\t arb.go();\n\t\t\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "public pacman(int size_of_map) {\n this.positionX = (this.positionY = 0);\n this.size_of_map = size_of_map;\n }", "private void copyMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (map[i][j] instanceof Player) {\n\t\t\t\t\tnewMap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Mho) {\n\t\t\t\t\tnewMap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Fence) {\n\t\t\t\t\tnewMap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.69704187", "0.69173604", "0.68567556", "0.663488", "0.6634614", "0.66280276", "0.6625752", "0.6618921", "0.65106606", "0.6488688", "0.6474593", "0.6428719", "0.6283282", "0.62820965", "0.6259853", "0.62524146", "0.6244565", "0.6239921", "0.6234099", "0.62292594", "0.62226385", "0.62071836", "0.62009555", "0.6194052", "0.6190395", "0.6180173", "0.61755854", "0.6173084", "0.61719435", "0.6171263", "0.6135718", "0.6131693", "0.6114174", "0.610387", "0.6095343", "0.6092848", "0.60921484", "0.6069467", "0.60692024", "0.60633826", "0.60633826", "0.6060585", "0.6051448", "0.6041758", "0.6036525", "0.6031653", "0.6005166", "0.59976107", "0.599638", "0.5984868", "0.5970912", "0.59706026", "0.59587246", "0.59466636", "0.59411687", "0.5933552", "0.59307986", "0.59302896", "0.5929435", "0.5929427", "0.5915168", "0.59150815", "0.58998364", "0.5897337", "0.5893192", "0.5890745", "0.58880395", "0.5883098", "0.58736", "0.58713907", "0.5870601", "0.586874", "0.5868387", "0.5865373", "0.58637124", "0.58581734", "0.5850245", "0.58368665", "0.5834304", "0.58332616", "0.5829243", "0.582429", "0.58215594", "0.58215046", "0.5819201", "0.5817174", "0.5816535", "0.5800927", "0.57930905", "0.57883495", "0.57828075", "0.57759374", "0.5775705", "0.5775575", "0.57616514", "0.57475924", "0.5741299", "0.573758", "0.57353467", "0.57292837" ]
0.7339413
0
This method starts or resumes the map processor.
@Override public synchronized void start() { pauseLoop = false; if (running) { synchronized (unchecked) { unchecked.notify(); } } else { running = true; super.start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(map!=null)\n\t\t{\n\t\t\tsetup();\n\t\t}\n\t}", "@Override\n public void onResume() {\n super.onResume();\n mMap.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n mapView.onResume();\r\n }", "@Override\n protected void onStart() {\n super.onStart();\n top10_MPV_map.onStart();\n }", "@Override\n protected void onResume() {\n super.onResume();\n if (mMap != null) {\n requestLocation();\n }\n }", "@Override\n protected void onResume() {\n mapView.onResume();\n super.onResume();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tSalinlahiFour.getBgm().start();\n\t}", "@Override\n public void onResume() {\n super.onResume();\n mMapView.onResume();\n if (mLocationClient != null) {\n mLocationClient.startLocation();\n }\n }", "@Override\n public void onResume() {\n mMapView.onResume();\n super.onResume();\n }", "public void start() {\n process(0);\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "@Override\n\tpublic void startProcessing() {\n\n\t}", "@Override\n public void onResume() {\n super.onResume();\n MaintenanceMapView.onResume();\n }", "public void startProcessingImage() {\n if (loadBitmap()) {\n this.mImageProcessHelper.start(this.mBitmap);\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tnearby_mapview.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tString log_msg = \"onResume()\";\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t\tsuper.onResume();\n\t\t\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "private void startWrite() {\n\t\tlock.lock();\n\t\tif (newMap == null) // Write not already started\n\t\t\tnewMap = ArrayListMultimap.create(map);\n\t}", "private void startMapCreater() {\n\t\tNavigator navi = new Navigator(pilot);\n\t\tnavi.addWaypoint(0,0);\n\t\tnavi.addWaypoint(0,5000);\n\t\tBehavior forward = new Forward(navi);\n\t\tBehavior ultrasonic = new UltrasonicSensor(ultrasonicSensorAdaptor,pilot, sonicWheel,dis,dos,navi);\n\t\tBehavior stopEverything = new StopRobot(Button.ESCAPE);\n\t\tBehavior[] behaiverArray = {forward, ultrasonic, stopEverything};\n\t\tarb = new Arbitrator(behaiverArray);\n\t\t\n\t arb.go();\n\t\t\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(\"STATO\",\"RESUME\");\n applyMapSettings();\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "protected void startMap(){\n Intent activityChangeIntent = new Intent(MainActivity.this, MapActivity.class);\n startActivity(activityChangeIntent);\n }", "public final void onResume() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onResume()\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onResume();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onResume()\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onResume();\n }\n }", "public void start() {\n this.f3567pI.start();\n }", "@Override\n protected void onResume() {\n\n super.onResume();\n getdatatext();\n if( MapActivity.activityPaused()==true){\n loadImageFromStorage();\n\n }\n }", "public Context runMap() throws InstantiationException, IllegalAccessException, IOException {\n\t\tContext tempoContext = new Context();\n\t\tthis.setup(tempoContext);\n\t\t//Read the input file\n\t\tString[] inputLines = this.inputSplit.getLines();\n\t\t//Map process\n\t\tfor (int i=0; i<inputLines.length; i++) {\n\t\t\tthis.map(Integer.toString(i), inputLines[i], tempoContext);\n\t\t}\n\t\treturn tempoContext;\n\t}", "public final void onStart() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onStart()\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onStart();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onStart()\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onStart();\n }\n }", "public void start() {\n\t\tint pixelNum = 0;\n\n\t\tfor (int y = 0; y < camera.height(); y++) {\n\t\t\tfor (int x = 0; x < camera.width(); x++) {\n\t\t\t\tcamera.setPixel(pixelNum++, trace(camera.shootRay(x, y)));\n\t\t\t}\n\t\t}\n\n\t\tcamera.writePPM();\n\t}", "@Override\n\t\tpublic void resume() {\n\t\t \n\t\t}", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadPersistencePreferences();\n checkIfMapViewNeedsBackgroundUpdate();\n // Refresh control beacuse any changes can be changed\n for (MapControl mic : mapView.getControls()) {\n mic.refreshControl(GetFeatureInfoLayerListActivity.BBOX_REQUEST,\n GetFeatureInfoLayerListActivity.BBOX_REQUEST, null);\n }\n\n // Some debug\n Intent i = getIntent();\n if (i != null) {\n String a = i.getAction();\n Log.v(TAG, \"onResume() Action:\" + a);\n }\n }", "@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\n public void resume() {\n }", "@Override\n\t\tprotected void onResume() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tthis.mLocationOverlay.enableMyLocation();\n\t\t\t\tmOsmv.setTileSource(TileSourceFactory.getTileSource(1));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tToast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\tsuper.onResume();\n\t\t}", "@Override\n public synchronized void start() {\n init();\n }", "public void doStart() {\n if (this.mActive == null) {\n a();\n } else {\n com.alipay.mobile.common.task.Log.v(TAG, \"StandardPipeline.start(a task is running, so don't call scheduleNext())\");\n }\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "@Override\r\n public void resume() {\n }", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "@Override\n public void start() {\n smDrive.start();\n smArm.start();\n }", "private void start() {\n\n\t}", "@Override\n\tpublic void resume() {\n\t}", "@Override\n\tpublic void resume() {\n\t}", "@Override\n\tpublic void resume() {\n\t}", "@Override\n\tpublic void resume() {\n\t}", "@Override\n\tpublic void resume() {\n\t}", "private void startAPICall() {\n if (currentBitMap == null) {\n TextView textView = findViewById(R.id.showCal);\n textView.setText(\"Please take a photo / select a photo\");\n return;\n }\n new ProcessPhoto.ProcessImageTask(TakePhotoActivity.this, requestQueue).execute(currentBitMap);\n }", "@Override\r\n\tpublic void resume() {\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "@Override\n public void resume() { }", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}", "@Override\r\n public void resume() {\r\n\r\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void loadStartingMap(int up_offset, int down_offset, int left_offset,\n int right_offset) {\n int counter = 0;\n for (int y = 0; y < MAP_HEIGHT; y++) {\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap[counter], true);\n backGroundTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_base[counter], true);\n grassTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_grass[counter], true);\n counter++;\n }\n }\n\n for (int i = 0; i < up_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustUp();\n }\n }\n for (int i = 0; i < down_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustDown();\n }\n }\n for (int i = 0; i < left_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustLeft();\n }\n }\n for (int i = 0; i < right_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustRight();\n }\n }\n\n this.setGrassTileRaw(Constants.testMap_grass); // used for IsInGrass\n this.id = 1;\n }", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "@Override\n\tpublic void resume() {\n\t\t\n\t}", "public void start()\r\n\t{\r\n\t\tif (state == State.STOPPED) {\r\n\t\t\tstate = State.EXITING;\r\n\t\t\tsetSprite(\"pedestrians/\"+spriteName);\r\n\t\t}\r\n\t\t//if the pedestrian is in the entering state, and never stops, it won't go into the exiting phase.\r\n\t\telse if ( state == State.ENTERING) {\r\n\t\t\tif(isInArea(lane.getStoppingArea())){\r\n\t\t\t\tstate = State.EXITING;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetSpeed(speed);\r\n\t}", "@Override\n public void start() {\n cache.start();\n patchReconciler.start();\n }", "protected void resume() {\n resume(mainThread);\n }", "public void run() {\n try {\n handler.process( client, map );\n }\n catch ( java.io.IOException ioe ) {\n System.err.println( ioe );\n }\n }" ]
[ "0.7299477", "0.6882886", "0.6416284", "0.6416284", "0.63852406", "0.6384617", "0.6370282", "0.63337684", "0.6310307", "0.62679005", "0.6246823", "0.61768705", "0.6169235", "0.6069559", "0.6054199", "0.6021858", "0.59706616", "0.5944657", "0.5937096", "0.5936147", "0.59230214", "0.59068125", "0.59024316", "0.5872271", "0.58713967", "0.5837078", "0.58203876", "0.5789356", "0.5782402", "0.57782644", "0.5765473", "0.56596446", "0.5652703", "0.5638814", "0.5636072", "0.5610329", "0.5610329", "0.5610329", "0.5606525", "0.5606215", "0.56060624", "0.5602338", "0.5602338", "0.5602338", "0.55899584", "0.55799323", "0.5575772", "0.5567938", "0.5567938", "0.5567938", "0.5567938", "0.5567938", "0.55672336", "0.55670154", "0.5565337", "0.5564568", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.55512154", "0.5550464", "0.5542102", "0.5536684", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.5525933", "0.55217785", "0.55176", "0.5512761", "0.5502665" ]
0.0
-1
Procedure function that is used to collect data from the map of the game. Do not call this function from any other class.
@Override public boolean execute(final long key, @NonNull final MapTile tile) { synchronized (unchecked) { unchecked.add(key); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadMap(){\n level= dataBase.getData(\"MAP\",\"PLAYER\");\n }", "private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}", "public void displaymap(AircraftData data);", "private void loadMapData(Context context, int pixelsPerMeter,int px,int py){\n\n char c;\n\n //keep track of where we load our game objects\n int currentIndex = -1;\n\n //calculate the map's dimensions\n mapHeight = levelData.tiles.size();\n mapWidth = levelData.tiles.get(0).length();\n\n //iterate over the map to see if the object is empty space or a grass\n //if it's other than '.' - a switch is used to create the object at this location\n //if it's '1'- a new Grass object it's added to the arraylist\n //if it's 'p' the player it's initialized at the location\n\n for (int i = 0; i < levelData.tiles.size(); i++) {\n for (int j = 0; j < levelData.tiles.get(i).length(); j++) {\n\n c = levelData.tiles.get(i).charAt(j);\n //for empty spaces nothing to load\n if(c != '.'){\n currentIndex ++;\n switch (c){\n case '1' :\n //add grass object\n gameObjects.add(new Grass(j,i,c));\n break;\n\n case 'p':\n //add the player object\n gameObjects.add(new Player(context,px,py,pixelsPerMeter));\n playerIndex = currentIndex;\n //create a reference to the player\n player = (Player)gameObjects.get(playerIndex);\n break;\n }\n\n //check if a bitmap is prepared for the object that we just added in the gameobjects list\n //if not (the bitmap is still null) - it's have to be prepared\n if(bitmapsArray[getBitmapIndex(c)] == null){\n //prepare it and put in the bitmap array\n bitmapsArray[getBitmapIndex(c)] =\n gameObjects.get(currentIndex).prepareBitmap(context,\n gameObjects.get(currentIndex).getBitmapName(),\n pixelsPerMeter);\n }\n\n }\n\n }\n\n }\n }", "@Override\n\tpublic void getStat(Map<String, String> map) {\n\t\t\n\t}", "private void collectData() {\n this.collectContest();\n this.collectProblems();\n this.collectPreCollegeParticipants();\n this.collectObservers();\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "private void returnDriverLocationstoMaps() {\n }", "@Override\r\n\t\t\tpublic void onMapLoadFinish() {\n\t\t\t}", "public void notifyMapLoaded();", "void populateData();", "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 void map() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tSystem.out.println(object);\n\t}", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}", "public int askMap();", "protected Properties loadData() {\n/* 362 */ Properties mapData = new Properties();\n/* */ try {\n/* 364 */ mapData.load(WorldMapView.class.getResourceAsStream(\"worldmap-small.properties\"));\n/* 365 */ } catch (IOException e) {\n/* 366 */ e.printStackTrace();\n/* */ } \n/* */ \n/* 369 */ return mapData;\n/* */ }", "public static void getMapDetails(){\n\t\tmap=new HashMap<String,String>();\r\n\t map.put(getProjName(), getDevID());\r\n\t //System.out.println(\"\\n[TEST Teamwork]: \"+ map.size());\r\n\t \r\n\t // The HashMap is currently empty.\r\n\t\tif (map.isEmpty()) {\r\n\t\t System.out.println(\"It is empty\");\r\n\t\t \r\n\t\t System.out.println(\"Trying Again:\");\r\n\t\t map=new HashMap<String,String>();\r\n\t\t map.put(getProjName(), getDevID());\r\n\t\t \r\n\t\t System.out.println(map.isEmpty());\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t//retrieving values from map\r\n\t Set<String> keys= map.keySet();\r\n\t for(String key : keys){\r\n\t \t//System.out.println(key);\r\n\t System.out.println(key + \": \" + map.get(key));\r\n\t }\r\n\t \r\n\t //searching key on map\r\n\t //System.out.println(\"Map Value: \"+map.containsKey(toStringMap()));\r\n\t System.out.println(\"Map Value: \"+map.get(getProjName()));\r\n\t \r\n\t //searching value on map\r\n\t //System.out.println(\"Map Key: \"+map.containsValue(getDevID()));\r\n\t \r\n\t\t\t\t\t // Put keys into an ArrayList and sort it.\r\n\t\t\t\t\t\t//ArrayList<String> list = new ArrayList<String>();\r\n\t\t\t\t\t\t//list.addAll(keys);\r\n\t\t\t\t\t\t//Collections.sort(list);\r\n\t\t\t\t\r\n\t\t\t\t\t\t// Display sorted keys and their values.\r\n\t\t\t\t\t\t//for (String key : list) {\r\n\t\t\t\t\t\t// System.out.println(key + \": \" + map.get(key));\r\n\t\t\t\t\t\t//}\t\t\t \r\n\t}", "public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMarkerClickListener(this);\n\n\n // Add a marker in Sydney and move the camera\n\n getData(All_urls.values.mapData);\n\n\n\n\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void refreshMapInformation() {\n\t\t((JLabel)components.get(\"timeElapsedLabel\")).setText(Integer.toString(ABmap.instance().getTimeElapsed()));\n\t\t((JLabel)components.get(\"oilInMapLabel\")).setText(Integer.toString(ABmap.instance().getOilInMap()));\n\t\t((JLabel)components.get(\"oilInStorageLabel\")).setText(Integer.toString(ABmap.instance().getOilInStorage()));\n\t\t((JProgressBar)components.get(\"oilCleanedProgressBar\")).setValue(100-((ABmap.instance().getOilInMap()*100)/ABmap.instance().initialOilCount));\n\t\t((JLabel)components.get(\"fuelUsedLabel\")).setText(Integer.toString(ABmap.instance().getFuelUsed()));\n\t\t((JLabel)components.get(\"simCompletedLabel\")).setText(Boolean.toString(ABmap.instance().isDone()));\n\t}", "void updateMap(MapData map);", "public static void populateData() {\n\n }", "void fetchStartHousesData();", "public abstract void createMap(Game game) throws FreeColException;", "public abstract void createMap(Game game) throws FreeColException;", "private void populateMap(Cursor data) {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n String language = preferences.getString(getActivity().getString(R.string.pref_key_language), getActivity().getString(R.string.pref_language_english));\n\n if (mMap != null && data.moveToFirst()) {\n //Get visibile bounds of map\n LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds;\n if (data.moveToFirst()) {\n do {\n int stationId = data.getInt(StationContract.COL_STATION_ID);\n if (bounds.contains(new LatLng(data.getDouble(StationContract.COL_STATION_LAT), data.getDouble(StationContract.COL_STATION_LONG)))) {\n\n if (mMarkerMap.indexOfKey(stationId)<0) {\n int bikesAvailable = data.getInt(StationContract.COL_BIKES_AVAILABLE);\n int spacesAvailable = data.getInt(StationContract.COL_SPACES_AVAILABLE);\n int markerDrawable = Utilities.getMarkerIconDrawable(bikesAvailable, spacesAvailable);\n String snippet = getString(R.string.snippet_string_bikes) + String.valueOf(bikesAvailable) + \" \" + getString(R.string.snippet_string_spaces) + String.valueOf(spacesAvailable);\n\n\n String title;\n if (language.equals(getActivity().getString(R.string.pref_language_english))) {\n title = data.getString(StationContract.COL_STATION_NAME_EN);\n } else if(language.equals(getActivity().getString(R.string.pref_language_pinyin))){\n int stringId = getResources().getIdentifier(\"station\" + String.valueOf(stationId), \"string\", getActivity().getPackageName());\n title = getString(stringId);\n }\n else {\n title = data.getString(StationContract.COL_STATION_NAME_ZH);\n }\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getDouble(StationContract.COL_STATION_LAT), data.getDouble(StationContract.COL_STATION_LONG))).title(title);\n markerOptions.snippet(snippet);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(markerDrawable));\n Marker marker = mMap.addMarker(markerOptions);\n mIdMap.put(marker, stationId);\n mMarkerMap.put(stationId, marker);\n }\n } else {\n //If the marker was previously on screen, remove it from the map and hashmap\n if (mMarkerMap.indexOfKey(stationId)>=0) {\n mMarkerMap.get(stationId).remove();\n mMarkerMap.remove(stationId);\n }\n }\n\n } while (data.moveToNext());\n }\n //If a station ID has been set from detail fragment, display its info window\n if (mStationId != -1) {\n Marker currentMarker = mMarkerMap.get(mStationId);\n if (currentMarker != null) {\n currentMarker.showInfoWindow();\n }\n }\n }\n }", "void loadData();", "void loadData();", "Map<String, Object> getStats();", "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 }", "private java.util.Map<java.lang.String, java.lang.Object> collectInformation() {\n /*\n // Method dump skipped, instructions count: 418\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ironsource.mediationsdk.utils.GeneralPropertiesWorker.collectInformation():java.util.Map\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n getCodes(googleMap);\n\n }", "protected void loadData()\n {\n }", "public void populateGlobalHotspots() {\n\t\tnew Thread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tairlineData = DataLookup.airlineStats();\n\t\t\t\tairportData = DataLookup.airportStats();\n\t\t\t\tmHandler.post(new Runnable(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tsetHotspotListData();\n\t\t\t\t\t}});\n\t\t\t}}).start();\n\t}", "void process(GameData gameData, Map<String, Entity> world, Entity entity);", "public void printMap(GameMap map);", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public Map<String, Object> getInfo();", "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 fillData() {\n\t\tfor(Entry<String, HashMap<String, Double>> entry : m.map.entrySet()) {\n\t\t\tfor(Entry<String, Double> subEntry : entry.getValue().entrySet()) {\n\t\t\t\tMappingData item = new MappingData(entry.getKey(), subEntry.getKey(), subEntry.getValue());\n\t\t\t\tdataList.add(item);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }", "public void doScan() {\n\t\tSystemMapObject[] results = scan();\r\n\t\t// add to its current map.\r\n\t\t// System.out.println(toStringInternalMap());\r\n\t\tupdateMowerCords();\r\n\t\t// NorthWest\r\n\t\tif (y + 1 >= this.map.size()) {\r\n\t\t\tthis.map.add(new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(y + 1).add(0, results[7]);\r\n\t\t} else if (x - 1 <= 0) {\r\n\t\t\tthis.map.get(y + 1).add(x, results[7]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x - 1, results[7]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// West\r\n\t\tif (this.map.get(y).size() < 2) {\r\n\t\t\tthis.map.get(y).add(0, results[6]);\r\n\t\t} else if (x - 1 < 0) {\r\n\t\t\tthis.map.get(y).add(0, results[6]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y).set(x - 1, results[6]);\r\n\t\t}\r\n\t\t// SouthWest\r\n\t\tupdateMowerCords();\r\n\t\tif (y - 1 < 0) {\r\n\t\t\tthis.map.add(0, new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(0).add(0, results[5]);\r\n\t\t} else if (this.map.get(y - 1).size() < 2) {\r\n\t\t\tthis.map.get(y - 1).add(0, results[5]);\r\n\t\t} else if (this.map.get(y - 1).size() <= x - 1) {\r\n\t\t\tthis.map.get(y - 1).add(results[5]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x - 1, results[5]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// North\r\n\t\tif (y + 1 < this.map.size() && x >= this.map.get(y + 1).size()) {\r\n\t\t\tif (x >= this.map.get(y + 1).size()) {\r\n\t\t\t\tthis.map.get(y+1).add(results[0]);\r\n\t\t\t} else {\r\n\t\t\t\tthis.map.get(y + 1).add(x, results[0]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x, results[0]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// NorthEast\r\n\t\tif (this.map.get(y + 1).size() <= x + 1) {\r\n\t\t\tthis.map.get(y + 1).add(results[1]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x + 1, results[1]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// East\r\n\t\tif (this.map.get(y).size() <= x + 1) {\r\n\t\t\tthis.map.get(y).add(results[2]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y).set(x + 1, results[2]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\r\n\t\t// South\r\n\t\tif (y - 1 < 0) {\r\n\t\t\tthis.map.add(0, new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(0).add(results[4]);\r\n\t\t} else if (x >= this.map.get(y - 1).size()) {\r\n\t\t\tthis.map.get(y - 1).add(results[4]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x, results[4]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// South East\r\n\t\tif (this.map.get(y - 1).size() <= x + 1) {\r\n\t\t\tthis.map.get(y - 1).add(results[3]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x + 1, results[3]);\r\n\t\t}\r\n\r\n\t\tupdateMowerCords();\r\n\t\t// System.out.println(\"This is your X:\" + this.x);\r\n\t\t// System.out.println(\"This is your Y:\" + this.y);\r\n\t\t//\r\n\t\t// System.out.println(toStringInternalMap());\r\n\t\t// System.out.println(\"-------------------------------------------------------------------------------------\");\r\n\r\n\t}", "@Override\n\tpublic Map<String, Object> readAllHitos() {\n\t\treturn hitosDao.readAllHitos();\n\t}", "Map getSPEXDataMap();", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public abstract Collection<Entry<K, V>> dataToServe();", "private void _Setup_GetLocData() {\n\t\tString log_msg = \"CONS.LocData.LONGITUDE=\"\n\t\t\t\t\t+ String.valueOf(CONS.LocData.LONGITUDE);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t\tIntent i = this.getIntent();\n\t\t\n\t\tthis.longitude\t= i.getDoubleExtra(\n\t\t\t\t\t\t\tCONS.IntentData.iName_Showmap_Longitude,\n\t\t\t\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\tthis.latitude\t= i.getDoubleExtra(\n\t\t\t\tCONS.IntentData.iName_Showmap_Latitude,\n\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\t// Log\n\t\tlog_msg = \"this.latitude=\" + String.valueOf(this.latitude)\n\t\t\t\t\t\t+ \"/\"\n\t\t\t\t\t\t+ \"this.longitude=\" + String.valueOf(this.longitude);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t}", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void printMiniMap() { }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tfillWithDictionaries();\n\t\t\t\t\t}", "public GameMap map() {\n\t\treturn map;\n\t}", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "void fetchForRentHousesData();", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }", "public abstract void createMap();", "public Map<String, Object> getCurrentData() throws Exception;", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public static void adicionaMap2() {\n\t\t\t\tcDebitos_DFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"dam\", new Integer[] { 6, 18 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"fiti\", new Integer[] { 19, 26 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"cartorio\", new Integer[] { 39, 76 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"valor\", new Integer[] { 77, 90 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\t\t\t\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"processo\", new Integer[] { 21, 34 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"data_Venc\", new Integer[] { 35, 46 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"tributos\", new Integer[] { 47, 60 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"historico\", new Integer[] { 61, 78 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"valor\", new Integer[] { 79, 90 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\t\t\t\t\r\n\t\t\t\t\r\n\r\n\r\n\t\t\r\n\r\n\t\t// No DAM ANO DATA VENC No. PROCESSO\r\n\t\t// No. PARCELAMENTO VALOR JUROS TOTAL\r\n\t\tcDebitos_JFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_JFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_JFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_JFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_JFlorianopolis.put(\"processo\", new Integer[] { 39, 55 });\r\n\t\tcDebitos_JFlorianopolis.put(\"nParcelamento\", new Integer[] { 55, 76 });\r\n\t\tcDebitos_JFlorianopolis.put(\"valor\", new Integer[] { 77, 104 });\r\n\t\tcDebitos_JFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_JFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t// DAM LIV/FOLHA/CERT. DATA INSC HISTORICO\r\n\t\t// INSCRICAO VALOR\r\n\r\n\t\tcDebitos_J1Florianopolis.put(\"dam\", new Integer[] { 1, 13 });\r\n\t\tcDebitos_J1Florianopolis.put(\"liv_Folha_Cert\", new Integer[] { 14, 34 });\r\n\t\tcDebitos_J1Florianopolis.put(\"data_Insc\", new Integer[] { 35, 46 });\r\n\t\tcDebitos_J1Florianopolis.put(\"historico\", new Integer[] { 47, 92 });\r\n\t\tcDebitos_J1Florianopolis.put(\"inscricao\", new Integer[] { 93, 119 });\r\n\t\tcDebitos_J1Florianopolis.put(\"valor\", new Integer[] { 120, 132 });\r\n\t\t\r\n\t\t\r\n\t\t// No DAM ANO DATA VENC HISTORICO PROCESSO VALOR JUROS TOTAL\r\n\t\tcDebitos_LFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_LFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_LFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_LFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_LFlorianopolis.put(\"historico\", new Integer[] { 39, 76 });\r\n\t\tcDebitos_LFlorianopolis.put(\"processo\", new Integer[] { 77, 91 });\r\n\t\tcDebitos_LFlorianopolis.put(\"valor\", new Integer[] { 92, 104 });\r\n\t\tcDebitos_LFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_LFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\r\n\t}", "protected abstract void retrievedata();", "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 setUpOverview() {\n mapInstance = GameData.getInstance();\n //get reference locally for the database\n db = mapInstance.getDatabase();\n\n //retrieve the current player and the current area\n currentPlayer = mapInstance.getPlayer();\n\n }", "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "protected final Map<String, Object> getAllData() throws IOException, InterruptedException {\n final Map<String, Object> res = new HashMap<String, Object>(this.getRg().getCommonData());\r\n // plus les données de ce generateur en particulier\r\n res.putAll(this.getData());\r\n return res;\r\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(map!=null)\n\t\t{\n\t\t\tsetup();\n\t\t}\n\t}", "private List<Map<String,Object>> listAccessibleMaps() {\r\n \r\n List<Map<String, Object>> accessMapData = null;\r\n \r\n ArrayList args = new ArrayList();\r\n String accessClause = userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_usage\", \"owner_name\", args, \"read\");\r\n try {\r\n accessMapData = magicDataTpl.queryForList(\r\n \"SELECT name, title, description FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n accessClause + \" ORDER BY title\", args.toArray()\r\n );\r\n /* Determine which maps the user can additionally edit and delete */\r\n ArrayList wargs = new ArrayList();\r\n List<Map<String,Object>> writeMapData = magicDataTpl.queryForList(\r\n \"SELECT name FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_edit\", \"owner_name\", wargs, \"update\") + \" ORDER BY title\", wargs.toArray()\r\n );\r\n ArrayList dargs = new ArrayList();\r\n List<Map<String,Object>> deleteMapData = magicDataTpl.queryForList(\r\n \"SELECT name FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_edit\", \"owner_name\", dargs, \"delete\") + \" ORDER BY title\", dargs.toArray()\r\n );\r\n for (Map<String,Object> mapData : accessMapData) {\r\n mapData.put(\"w\", \"no\");\r\n mapData.put(\"d\", \"no\");\r\n String name = (String)mapData.get(\"name\");\r\n writeMapData.stream().map((wData) -> (String)wData.get(\"name\")).filter((wName) -> (wName.equals(name))).forEachOrdered((_item) -> {\r\n mapData.put(\"w\", \"yes\");\r\n });\r\n deleteMapData.stream().map((dData) -> (String)dData.get(\"name\")).filter((dName) -> (dName.equals(name))).forEachOrdered((_item) -> {\r\n mapData.put(\"d\", \"yes\");\r\n });\r\n }\r\n } catch(DataAccessException dae) {\r\n accessMapData = new ArrayList();\r\n System.out.println(\"Failed to determine accessible maps for user, error was : \" + dae.getMessage());\r\n }\r\n return(accessMapData);\r\n }", "@Override\r\n\tpublic IMapInfo getMapInfo() {\r\n\t\treturn replay.mapInfo;\r\n\t}", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n WorldCreator wc = new WorldCreator(this.mapName);\n World world = wc.createWorld();\n world.setAutoSave(false);\n world.setPVP(false);\n world.setDifficulty(Difficulty.PEACEFUL);\n world.setGameRuleValue(\"doDaylightCycle\", \"false\");\n world.setGameRuleValue(\"mobGriefing\", \"false\");\n world.setGameRuleValue(\"doMobSpawning\", \"false\");\n world.setGameRuleValue(\"doFireTick\", \"false\");\n world.setGameRuleValue(\"keepInventory\", \"true\");\n world.setGameRuleValue(\"commandBlockOutput\", \"false\");\n world.setSpawnFlags(false, false);\n\n try {\n final JsonParser parser = new JsonParser();\n final FileReader reader =\n new FileReader(this.plugin.getDataFolder() + \"/maps/\" + this.mapName + \"/config.json\");\n final JsonElement element = parser.parse(reader);\n this.map = JumpyJumpMap.fromJson(element.getAsJsonObject());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "Map getIDPEXDataMap();", "private static void collectData(Cell cell){\n float distMidX = midX-cell.x;\n float distMidY = midY-cell.y;\n float thisDist = (float) (Math.sqrt(distMidX*distMidX+distMidY*distMidY));\n int thisAng = (int) (180.f*Math.atan2(distMidY,distMidX)/Math.PI);\n thisAng = (thisAng<0) ? thisAng+360 : (thisAng>360) ? thisAng-360 : thisAng;\n float tempT = (cell.quiescent) ? Pars.divMax/Pars.divConv : 1.f/(cell.envRespDiv()*Pars.divConv);\n Data.findDistStats(thisDist,thisAng,tempT,cell.envRespSp()/Pars.speedConv,cell.prevDiv/Pars.divConv,cell.prevSp/Pars.speedConv);//collect -> Data.popR\n Data.findIR(cell.x, cell.y, cell.pop);//collect infected and recruited sample\n }", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadMap(){\r\n\t\t//Datei anlegen, falls nicht vorhanden\r\n\t\ttry {\r\n\t\t\tFile file = new File(homeFileLocation);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t\tSystem.out.println(\"Created new File.\");\r\n\r\n\t\t\t\t//Leere Map schreiben\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\t\toos.writeObject(new HashMap<String, String>());\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\r\n\t\t\t\tSystem.out.println(\"Wrote empty HashMap.\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Map laden\r\n\t\ttry {\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(homeFileLocation));\r\n\t\t\tthis.map = (HashMap<String, String>) ois.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void loadMapGame(LoadedMap map)throws BadMapException{\n ArrayList<Boat> boats = createLoadedBoats(map);\n\n Board board = new Board(map.getInterMatrix().length, map.getInterMatrix()[0].length, 0);\n\n //CREATE A GAME\n GameData gameData = new GameData(board, boats, false);\n\n //POSITION BOATS INTO MATRIX\n loadPosBoats(gameData);\n Game.getInstance().setGameData(gameData);\n Game.getInstance().setEnded(false);\n }", "public MapDisplay getMap(){\n\t\treturn map; //gibt die Karte zurück\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "public void updateMap(HashMap<Coordinate, MapTile> currentView) {\n\t\t\tfor (Coordinate key : currentView.keySet()) {\n\t\t\t\tif (!map.containsKey(key)) {\n\t\t\t\t\tMapTile value = currentView.get(key);\n\t\t\t\t\tmap.put(key, value);\n\t\t\t\t\tif (value.getType() == MapTile.Type.TRAP) {\n\t\t\t\t\t\tTrapTile value2 = (TrapTile) value; // downcast to find type\n\t\t\t\t\t\tif (value2.getTrap().equals(\"parcel\") && possibleTiles.contains(key)) {\n\t\t\t\t\t\t\tparcelsFound++;\n\t\t\t\t\t\t\tparcels.add(key);\n\t\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\t\tphase = \"search\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"lava\")) {\n\t\t\t\t\t\t\tlava.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"health\")) {\n\t\t\t\t\t\t\thealth.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"water\")) {\n\t\t\t\t\t\t\twater.add(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.getType() == MapTile.Type.FINISH) {\n\t\t\t\t\t\texitFound = true;\n\t\t\t\t\t\texit.add(key);\n\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\tphase = \"search\";\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}", "public void generateRandomMap() {\n\n\t}", "HashMap <String, Command> getMap();", "public abstract String fetchSnpData(HashMap<String,String> paramMap) throws RetrievalException;", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "protected abstract void loadData();", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "private void initData() {\n requestServerToGetInformation();\n }", "public void saveMap(){\n dataBase.updateMap(level);\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"servicio gestor arrancado\");\n\t\tmemoria = new HashMap<String, List<Trino>>();\n\t}", "private void fetchCafes(){\n DatabaseReference cafeRef = Singleton.get(mainActivity).getDatabase()\n .child(\"cafes\");\n\n // Add Listener when info is recieved or changed\n cafeRef.addValueEventListener(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, MyLatLng> latLngList = new HashMap<>();\n ArrayList<Cafe> cafes = new ArrayList<>();\n for (DataSnapshot locationSnapshot : dataSnapshot.getChildren()) {\n\n\n MyLatLng latLng = locationSnapshot.getValue(MyLatLng.class);\n Cafe cafe = locationSnapshot.getValue(Cafe.class);\n cafes.add(cafe);\n\n latLngList.put(locationSnapshot.getKey(), latLng);\n\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(cafe.getLatitude(), cafe.getLongitude())).title(cafe.getName()));\n marker.setTag(cafe.getId());\n marker.showInfoWindow();\n markers.add(marker);\n\n }\n setOnSearchInputChanged(cafes);\n //listener.onLoadLocationSuccess(latLngList);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "public HashMap<SensorPosition, Integer> receiveGripperSensorData();", "private void Initialized_Data() {\n\t\t\r\n\t}", "public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}", "public void printMap() {\n\t\tmap.printMap();\n\t}", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getHome_aDataFromMap((Map<String,Object>) dataSnapshot.getValue());\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n firebaseLoadData(googleMap);\n\n //get user input data\n Intent intent = getIntent();\n Double latitude = intent.getDoubleExtra(\"LATITUDE\", 0);\n Double longitude = intent.getDoubleExtra(\"LONGITUDE\", 0);\n String location = intent.getStringExtra(\"LOCATION\");\n String description = intent.getStringExtra(\"DESCRIPTION\");\n\n createCustomMapMarkers(googleMap, new LatLng(latitude, longitude), location, description);\n\n\n //set map listeners to handle events.\n useMapClickListener(googleMap);\n useMarkerClickListener(googleMap);\n useMarkerDragListener(googleMap);\n useMapOnLongClickListener(googleMap);\n }" ]
[ "0.6636699", "0.6455242", "0.63685656", "0.6332243", "0.63316965", "0.6329172", "0.63163227", "0.6133385", "0.6039197", "0.60190994", "0.6004875", "0.5990543", "0.59809875", "0.5967218", "0.5965942", "0.5953283", "0.5933062", "0.59034055", "0.5888229", "0.58830154", "0.5855328", "0.58497924", "0.58450204", "0.5843839", "0.58300304", "0.58200383", "0.58175325", "0.580199", "0.580199", "0.57815385", "0.57718295", "0.57718295", "0.57681215", "0.57629025", "0.57621056", "0.57435536", "0.5736478", "0.5735598", "0.57171607", "0.56828654", "0.56795925", "0.5675899", "0.5675246", "0.56634957", "0.5659982", "0.5648499", "0.5622524", "0.5614655", "0.56069624", "0.5601573", "0.55982345", "0.55918473", "0.5577181", "0.55568635", "0.5543773", "0.55412143", "0.55398065", "0.5526641", "0.55237067", "0.5521571", "0.5514372", "0.55138445", "0.55105036", "0.55081713", "0.5507309", "0.549806", "0.54950064", "0.5489918", "0.5486202", "0.5486093", "0.5477299", "0.5476154", "0.54724", "0.547095", "0.5465871", "0.5456242", "0.5456026", "0.5454991", "0.54506737", "0.5443026", "0.54404265", "0.54227513", "0.542082", "0.54189754", "0.5418081", "0.54171026", "0.54113555", "0.5403258", "0.5401968", "0.5398646", "0.53952265", "0.5394797", "0.53915286", "0.5390991", "0.53894186", "0.53888214", "0.5387169", "0.5384131", "0.5383691", "0.53836805", "0.5372389" ]
0.0
-1
The main method of the game map processor.
@SuppressWarnings("nls") @Override public void run() { while (running) { while (pauseLoop) { try { synchronized (unchecked) { unchecked.wait(); } } catch (final InterruptedException e) { LOGGER.debug("Unexpected wakeup during pause.", e); } } performInsideCheck(); if (hasAndProcessUnchecked()) { continue; } try { synchronized (unchecked) { unchecked.wait(); } } catch (final InterruptedException e) { LOGGER.debug("Unexpected wake up of the map processor", e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) { \n \tprintAvailableMaps();\n \t\n\t\tGame game = new Game();\n\t\tScanner input = game.openFile();\n \tgame.readMapFile(input);\n \tgame.prepareTable();\n \tTapeHead player = game.preparePlayer();\n \t//game.print();\n \twhile(true) {\n \t\tgame.GameRunning(player);\n \t} \n }", "public static void main(String[] args) {\n \n while (true) {\n Map.Initialize(); \n Map.MakeMove(MakeMove());\n }\n \n }", "public static void main(String[] args) {\n Map map=new Map();\n Actions actions=new Actions();\n Random rnd = new Random();\n int end = rnd.nextInt((110 - 70) + 1) + 70;\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"\\033[36m\"+\" You wake up on a abandoned spaceship. Try to survive.\"+\"\\033[0m\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(map.getMapObject(3,1).getDescriptionObject());\n while(actions.getMoves()<end&&!actions.getEscapePod()){\n if(actions.getMoves()%8==0)\n System.out.println(\"The ship is creeking!\");\n System.out.println(\"x: \"+actions.getX()+\"\\n\" +\n \"y: \"+actions.getY());\n map.printMap(actions.getX(), actions.getY());\n actions.input();\n }\n if(actions.getMoves()>20)\n {\n System.out.println(\"Game Over\");\n }\n else\n {\n System.out.println(\"Mission complete\");\n System.out.println(\"You beat the game in \"+actions.getMoves()+\" moves.\");\n }\n }", "public static void main(String[] args) {\n\t\tDisplay.openWorld(\"maps/pasture.map\");\n\n Display.setSize(15, 15);\n Display.setSpeed(7);\n Robot andre = new Wanderer(int i, int j);\n for(int n = 0; n<36; n++) {\n for(int k=0; k<36; k++) {\n andre.wander(); \n }\n explode();\n \n\t\t// TODO Create an instance of a Horse inside the pasture\n\t\t// TODO Have the horse wander for 36 steps with a timer of 7\n\t\t// TODO Have the horse explode()\n\t}\n\n}", "public static void main(String[] args) {\n IWorldMap mapRectangular = new RectangularMap(10,5);\n Animal cat = new Animal(mapRectangular,new Vector2d(3,4));\n System.out.println(cat);\n mapRectangular.place(new Animal(mapRectangular));\n mapRectangular.place(new Animal(mapRectangular,new Vector2d(3,4)));\n\n System.out.println(mapRectangular);\n MoveDirection[] directions = new OptionsParser().parse(args);\n mapRectangular.run(directions);\n System.out.println(mapRectangular);\n\n\n IWorldMap mapGrass = new GrassField(10);\n Animal a = new Animal(mapGrass);\n Animal b = new Animal(mapGrass,new Vector2d(3,4));\n mapGrass.place(a);\n mapGrass.place(b);\n System.out.println(mapGrass);\n mapGrass.run(directions);\n System.out.println(mapGrass);\n\n }", "public static void main(String[] args) {\n\t\tnew bounce_ball_design_map();\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tmapName = \"\";\r\n\t\ttrack = false;\r\n\t\tdrawingDataLines = false;\r\n\t\tLog.getLog().setFilter(Log.NONE);\r\n\t\tint argindex = \t0;\r\n\t\twhile(argindex<args.length) {\r\n\t\t\tString arg = args[argindex];\r\n\t\t\tif(arg.compareTo(\"-map\")==0) {\r\n\t\t\t\tmapName = args[argindex+1];\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-pigeon\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpigeonCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-sparrow\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsparrowCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-hawk\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\thawkCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-track\")==0) {\r\n\t\t\t\ttrack=true;\r\n\t\t\t\targindex+=1;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-draw\")==0) {\r\n\t\t\t\tdrawingDataLines=true;\r\n\t\t\t\targindex+=1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Unknown Argument: '\"+arg+\"'\");\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(mapName.compareTo(\"\")!=0) {\r\n\t\t\ttry {\r\n\t\t\t\tloadmap(mapName);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(\"Could not load: '\"+mapName+\"'\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tRandomBoids(pigeonCt,sparrowCt,hawkCt);\r\n\t\t\r\n\t\tSystem.out.println(\"Welcome to Boids!\");\r\n\t\tWindow = graphics.Screen.initScreen(1000,800); \r\n\t\tTimer clock = new Timer(\"Clock\",20);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//add birds to screen\r\n\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\tWindow.getToDraw().add((Drawable)Bird.getAllBirds().get(i));\r\n\t\t}\r\n\t\t//add map objecst\r\n\t\tfor(int i=0;i<mapobjects.size();i++) {\r\n\t\t\tWindow.getToDraw().add(mapobjects.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t//main loop\r\n\t\tboolean done = false;\r\n\t\twhile(!done) {\r\n\t\t\t\r\n\t\t\t//clear for calculations\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).preBehaviour();\r\n\t\t\t}\r\n\t\t\t//see each bird\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size()-1;i++) {\r\n\t\t\t\tfor(int ii=i+1;ii<Bird.getAllBirds().size();ii++) {\r\n\t\t\t\t\tBoid.sight(Bird.getAllBirds().get(i), Bird.getAllBirds().get(ii));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//run formula\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).behaviour();\r\n\t\t\t}\r\n\t\t\t//move birds\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).movement();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//myLog.println(a, DEBUG_CODE);\r\n\t\t\tif(track) {\r\n\t\t\t\tWindow.getViewPoint().copy(Bird.getAllBirds().get(0).getPositionVector());\r\n\t\t\t}\r\n\t\t\tWindow.updateFrameBuffer();\r\n\t\t\tWindow.repaint();\r\n\t\t\ttry {\r\n\t\t\t\tclock.sleep();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public static void main(String[] args) {\n GridMap map = null;\n try {\n map = GridMap.fromFile(\"map.txt\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n\n if (map == null)\n throw new RuntimeException(\"Unable to obtain discretized map.\");\n\n // Prints map\n System.out.println(\"Map to analyze:\");\n System.out.println(map);\n\n // Executes search\n int[] rowColIni = map.getStart();\n int[] rowColFim = map.getGoal();\n Block initial = new Block(rowColIni[0], rowColIni[1], BlockType.FREE);\n Block target = new Block(rowColFim[0], rowColFim[1], BlockType.FREE);\n GreedySearch search = new GreedySearch(map, initial, target);\n RobotAction[] ans = search.solve();\n\n // Shows answer\n if (ans == null) {\n System.out.println(\"No answer found for this problem.\");\n } else {\n\n Block current = initial;\n System.out.print(\"Answer: \");\n for (RobotAction a : ans) {\n System.out.print(\", \" + a);\n Block next = map.nextBlock(current, a);\n map.setRoute(next.row, next.col);\n current = next;\n }\n\n // Shows map with the route found\n System.out.println();\n System.out.println(\"Route found:\");\n System.out.println(map);\n }\n }", "public abstract void createMap(Game game) throws FreeColException;", "public abstract void createMap(Game game) throws FreeColException;", "public static void main(String[] args){\n\t\t/* \n\t\t * Retrieve the variables for width and height of the dungeon\n\t\t */\n\t\tint width;\n\t\tint height;\n\t\ttry{\n\t\t\twidth = Integer.parseInt(args[0]);\n\t\t\theight = Integer.parseInt(args[1]);\n\t\t} catch(NumberFormatException e) { \n\t\t\tSystem.out.println(\"Invalid width and/or height\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\tchar[][] map = genMap(width, height, 3, 10);\n\t\t\n\t\tfor(int i=0; i<height; i++){\n String line = \"\";\n for(int j=0; j<width; j++){\n line += map[i][j];\n }\n System.out.println(line);\n }\n\t}", "public static void main(String[] args) {\n MainGameClass mg=new MainGameClass();\n mg.start();\n \n \n \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 game();\n }", "public static void main(String[] args) {\n // Interact\n System.out.println(\"Welcome to my terrain checker:\");\n loadPgm(); actionPrompt();\n System.out.println(\"Bye.\");\n }", "public static void main(String args[]) {\r\n\t PApplet.main(new String[] { \"--present\", \"cs422.test.GeoMap\" });\r\n\t }", "public static void main(String[] args){\n\t\t\r\n\t\ttry {\r\n\t\t\tnew map().map7();\r\n\t\t\tSystem.out.println(\"ok\");\r\n\t\t} catch (SQLException | IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public static void main(String[] args) {\n DemoRepositoryCreator repositoryCreator = new DemoRepositoryCreator();\n\n WorldMapRepository worldMapRepository = repositoryCreator.getWorldMapRepository();\n MonsterRepository monsterRepository = repositoryCreator.getMonsterRepository();\n PlayerRepository playerRepository = new PlayerRepository();\n\n GameEngine gameEngine = new GameEngine(\n worldMapRepository.loadCurrentMap(),\n monsterRepository,\n playerRepository\n );\n\n CommandParser commandParser = new CommandParser();\n ScreenManager screenManager = new ScreenManager(System.in, System.out); // java.io.Console doesn't work on IDE!!!\n\n Player currentPlayer = null;\n\n boolean gameCompleted = false;\n do {\n\n screenManager.prompt(currentPlayer);\n String cmdLine = screenManager.nextLine();\n\n Optional<GameCommand> optionalGameCommand = commandParser.parseCommand(cmdLine, (currentPlayer == null));\n if (optionalGameCommand.isPresent()) {\n\n GameCommand currentGameCommand = optionalGameCommand.get();\n CommandResponseDTO cmdResult = gameEngine.enterCommand(currentPlayer, currentGameCommand);\n if (cmdResult.getCurrentPlayer() != null) {\n currentPlayer = cmdResult.getCurrentPlayer();\n }\n screenManager.printCommandResult(currentPlayer, monsterRepository, cmdResult);\n\n if (currentGameCommand instanceof ExitCommand) {\n gameCompleted = true;\n }\n\n } else {\n screenManager.printInvalidCommand(cmdLine);\n }\n\n } while(!gameCompleted);\n\n }", "public void run() {\n\t\tprepareVariables(true);\n\t\t\n\t\t// Prepares Map Tables for Song and Key Info.\n\t\tprepareTables();\n\t\t\n\t\t// Selects a Random Song.\n\t\tchooseSong(rgen.nextInt(0, songlist.size()-1));\n\t\t\n\t\t// Generates layout.\n\t\tgenerateLabels();\n\t\tgenerateLines();\n\t\t\n\t\t// Listeners\n\t\taddMouseListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t// Game Starts\n\t\tplayGame();\n\t}", "public static void main(String[] args) {\n Properties props = new Properties();\n try {\n props.load(ResourceLoader.getResourceAsStream(\"game.properties\"));\n Config config = new Config(props);\n Game game = new Game(\"PlatformerState\");\n AppGameContainer app = new AppGameContainer(game);\n app.setIcons( new String[] {\"res/icon/16x16.png\", \"res/icon/32x32.png\"} ); //load icons\n app.setDisplayMode(config.getInteger(Config.WINDOW_WIDTH_CONFIG_KEY), \n config.getInteger(Config.WINDOW_HEIGHT_CONFIG_KEY), \n config.getBoolean(Config.WINDOW_FULLSCREEN_CONFIG_KEY));\n app.setTargetFrameRate(60);\n app.setShowFPS(false);\n app.start();\n } catch(IOException e) {\n e.printStackTrace();\n } catch(SlickException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n String[][] playerMap = new String[10][10];\n String[][] computerMap = new String[10][10];\n\n\n /*PASISVEIKINIMOM ZINUTE*/\n System.err.println(\" **** JŪRŲ MŪŠIS ****\");\n\n\n ElementsEmpty elementsEmpty = new ElementsEmpty();\n Game game = new Game();\n PlaceComputerShip computerShip = new PlaceComputerShip();\n PlacePlayerShip playerShip = new PlacePlayerShip();\n\n elementsEmpty.empty(playerMap, computerMap);\n game.createBoard(playerMap);\n playerShip.placePlayerShips(playerMap);\n game.createBoard(playerMap);\n computerShip.placeComputerShips(computerMap, playerMap);\n game.battle(computerMap, playerMap);\n }", "public static void main(String[] args) {\n\t\t// System.out.println(Tile.class.getName());\n\t\tAppGameContainer app = null;\n\t\ttry {\n\t\t\tapp = new AppGameContainer(new GameStart());\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\t// app.setMinimumLogicUpdateInterval(TICK_TIME);\n\t\t\t// app.setMaximumLogicUpdateInterval(TICK_TIME);\n\t\t\tapp.setDisplayMode(WINDOW_WIDTH, WINDOW_HEIGHT, false);\n\t\t\tapp.start();\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception{\n locations = World.getInstance();\n player = Player.getInstance();\n\n startMessage();\n\n try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))){\n playerName = reader.readLine();\n printConstantMessage(Constants.HELLO_MSG, playerName);\n System.out.println();\n\n player.moveTo(locations.stream().findFirst().get());\n\n while(runGame){\n System.out.print(Constants.PRE_INPUT_TEXT);\n parseInput(reader.readLine());\n }\n }\n }", "public static void main(String[] args){\n\t\tnew GamePanel(790,630); //Sonst grauer Streifen an den Rändern rechts und unten\n\t}", "public static void main(String[] args) {\n Map<Character, Integer> myMap = new HashMap<>();\n\n createMap(myMap); // create map based on user input\n displayMap(myMap); // display map content\n }", "public static void main(String[] args) {\n\t\t\t\tAdditonGameMethod();\n\t\t\t}", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public static void main(String arg[]){\r\n GameContainer gc = new GameContainer(new GameManager());\r\n\r\n gc.setWidth(400);\r\n gc.setHeight(300);\r\n gc.setScale(2);\r\n\r\n gc.setClearScreen(true);\r\n gc.setLightEnable(true);\r\n gc.setDynamicLights(true);\r\n gc.start();\r\n }", "public void createWorldMap() {\r\n\t\tdo {\r\n\t\t\t//\t\t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Recursive map generation method over here@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\t\t\t//Generation loop 1 *ADDS VEIN STARTS AND GRASS*\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif (Math.random()*10000>9999) { //randomly spawn a conore vein start\r\n\t\t\t\t\t\ttileMap[i][j] = new ConoreTile (conore, true);\r\n\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t}else if (Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new KannaiteTile(kanna, true);\r\n\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new FuelTile(fuel, true);\r\n\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999) {\r\n\t\t\t\t\t\ttileMap[i][j] = new ForestTile(forest, true);\r\n\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new OilTile(oil,true);\r\n\t\t\t\t\t}else if(Math.random()*10000>9997) {\r\n\t\t\t\t\t\ttileMap[i][j] = new MountainTile(mountain, true);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\ttileMap[i][j] = new GrassTile(dirt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // End for loop \r\n\t\t\t} // End for loop\r\n\t\t\t//End generation loop 1\r\n\r\n\t\t\t//Generation loop 2 *EXPANDS ON THE VEINS*\r\n\t\t\tdo {\r\n\t\t\t\tif (conoreCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ConoreTile (conore,true);\r\n\t\t\t\t\tconoreCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tconorePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (kannaiteCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new KannaiteTile (kanna,true);\r\n\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (fuelCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new FuelTile (fuel,true);\r\n\t\t\t\t\tfuelCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (forestCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ForestTile (forest,true);\r\n\t\t\t\t\tforestCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tforestPass = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 2\r\n\r\n\t\t\t//Generation loop 3 *COUNT ORES*\r\n\t\t\tint loop3Count = 0;\r\n\t\t\tconorePass = false;\r\n\t\t\tkannaitePass = false;\r\n\t\t\tfuelPass = false;\r\n\t\t\tforestPass = false;\r\n\t\t\tdo {\r\n\t\t\t\tconoreCount = 0;\r\n\t\t\t\tkannaiteCount = 0;\r\n\t\t\t\tfuelCount = 0;\r\n\t\t\t\tforestCount = 0;\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\t\t\tforestCount++;\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\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (conoreCount < 220) {\r\n\t\t\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tconorePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (kannaiteCount < 220) {\r\n\t\t\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (fuelCount< 220) {\r\n\t\t\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (forestCount < 220) {\r\n\t\t\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tforestPass = true;\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\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tloop3Count++;\r\n\t\t\t\tif (loop3Count > 100) {\r\n\t\t\t\t\tSystem.out.println(\"map generation failed! restarting\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\t\t\t//END OF LOOP 3\r\n\r\n\t\t\t//LOOP 4: THE MOUNTAIN & OIL LOOP\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildMountain(i,j);\r\n\t\t\t\t\tbuildOil(i,j);\r\n\t\t\t\t}\r\n\t\t\t}//End of THE Mountain & OIL LOOP\r\n\r\n\t\t\t//ADD MINIMUM AMOUNT OF ORES\r\n\r\n\t\t\t//Generation Loop 5 *FINAL SETUP*\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif(i == 1 || j == 1 || i == tileMap.length-2 || j == tileMap[i].length-2) {\r\n\t\t\t\t\t\ttileMap[i][j] = new DesertTile(desert);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i == 0 || j == 0 || i == tileMap.length-1 || j == tileMap[i].length-1) {\r\n\t\t\t\t\t\ttileMap[i][j] = new WaterTile(water);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 5\r\n\t\t\t//mapToString();//TEST RUN\r\n\t\t} while(!conorePass || !kannaitePass || !fuelPass || !forestPass); // End createWorldMap method\r\n\t}", "public static void main(String[] args) {\n\t\tG7 obj = new G7();\r\n\t\tobj.getInput();\r\n\t\tobj.map[0][0] = 1;\r\n\t\tobj.process(0, 0, 1);\r\n\t\tSystem.out.println(obj.count);\r\n\t}", "public static void main (String[] args) throws MapException, GraphException {\n\t\n\tbs hi=new bs(\"map0.txt\");\n\t}", "public static void main(String args[]){\n Game game = new GameImpl(new TestFactory());\n WorldStrategy worldStrategy = new ThirdPartyWorldAdapter();\n worldStrategy.createWorld(game);\n\n // Print World as it is \"seen\" by the Game\n for ( int r = 0; r < GameConstants.WORLDSIZE; r++ ) {\n String line = \"\";\n for ( int c = 0; c < GameConstants.WORLDSIZE; c++ ) {\n String type = game.getTiles().get(new Position(r,c)).getTypeString();\n\n if (type.equals(GameConstants.OCEANS)){ line += '.';}\n if (type.equals(GameConstants.PLAINS)){ line += 'o';}\n if (type.equals(GameConstants.MOUNTAINS)){ line += 'M';}\n if (type.equals(GameConstants.FOREST)){ line += 'f';}\n if (type.equals(GameConstants.HILLS)){ line += 'h';}\n }\n System.out.println(line);\n }\n\n }", "public static void main(String[] args) {\n init();\n\n //take input from the players before starting the game\n input();\n\n //the gameplay begins from here\n System.out.println();\n System.out.println();\n System.out.println(\"***** Game starts *****\");\n play();\n }", "public static void main(String[] args) {\n\t\t\tGameStore4(1); // Lab 5 Part 4\n\n\t}", "public static void main(String[] args) {\n Game game = new Game(\"Programming 2 Project\",600,600);\n game.start();\n \n }", "public static void main(String[] args) {\n\t\tguardarHashMap();\r\n//\t\tgrabarArchivoPaciente();\r\n//\t\tborrarArchivo(\"125\");\r\n\t}", "public static void main(String[] args) {\n setUpGamePlayer();\r\n \r\n //display of game board for computer\r\n setUpGameComp();\r\n System.out.println();\r\n \r\n System.out.println();\r\n System.out.println();\r\n \r\n //starting game\r\n // code incomplete to play game\r\n //playGame();\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tResources.setEncoding(Resources.ENCODING_UTF_8);\r\n\t\tGame.setInfo(\"gameInfo.xml\");\r\n\t\tGame.init();\r\n\t\tGame.getRenderEngine().setBaseRenderScale((float) 2);\r\n\t\tGame.getScreenManager().setResolution(Resolution.custom(1280, 720, \"1280*720\"));\r\n\t\tGame.getScreenManager().addScreen(new mainMenu());\r\n\t\tGame.getScreenManager().addScreen(mainGameScreen.getInstance());\r\n\t\tGame.getScreenManager().displayScreen(mainMenu.NAME);\r\n\t\tGame.start();\r\n\t\tSystem.out.println(\"Game version is: \" + Game.getInfo().getVersion());\r\n\t\tSystem.out.println(\"Currently active screen: \" + Game.getScreenManager().getCurrentScreen().getName());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws Exception{\n Main main = new Main();\n main.printMap();\n }", "public static void main(String[] args) {\n\t\tgame(1);\r\n\t}", "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}", "public void Define() {\n manager = new Manager(); // Initialize other classes\n save = new Save();\n store = new Store();\n menu = new Menu();\n postgame = new PostGame();\n\n map = new ImageIcon(\"res/map.png\").getImage(); // Load background image\n \t\n \n // Load the track image\n track = new ImageIcon(\"res/TrackCorner.png\").getImage(); // Initialize the track image file\n \n // Load images for the towers\n tileset_towers[0] = new ImageIcon(\"res/redlasertower.png\").getImage();\n tileset_towers[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_towers[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n \n // Load images for the indicators\n tileset_indicators[0] = new ImageIcon(\"res/button.png\").getImage();\n tileset_indicators[1] = new ImageIcon(\"res/money.png\").getImage();\n tileset_indicators[2] = new ImageIcon(\"res/heart.png\").getImage();\n \n // Load images for the buttons\n tileset_buttons[0] = new ImageIcon(\"res/redLaserTower.png\").getImage();\n tileset_buttons[1] = new ImageIcon(\"res/blueLaserTower.png\").getImage();\n tileset_buttons[2] = new ImageIcon(\"res/goldLaserTower.png\").getImage();\n tileset_buttons[3] = new ImageIcon(\"res/trash.png\").getImage();\n \n // Load images for the solider\n tileset_soldier[0] = new ImageIcon(\"res/enemyD1.png\").getImage();\n tileset_soldier[1] = new ImageIcon(\"res/enemyD2.png\").getImage();\n \n tileset_soldier[2] = new ImageIcon(\"res/enemyR1.png\").getImage();\n tileset_soldier[3] = new ImageIcon(\"res/enemyR2.png\").getImage();\n \n tileset_soldier[4] = new ImageIcon(\"res/enemyL1.png\").getImage();\n tileset_soldier[5] = new ImageIcon(\"res/enemyL2.png\").getImage();\n \n tileset_soldier[6] = new ImageIcon(\"res/enemyU1.png\").getImage();\n tileset_soldier[7] = new ImageIcon(\"res/enemyU2.png\").getImage();\n \n // Save the configuration of the track\n save.loadSave(new File(\"save/mission.txt\"));\n save.loadHighScore();\n \n // Initialize enemy objects\n for(int i = 0; i < enemies.length; i++) {\n \tenemies[i] = new Enemy();\n }\n \n }", "public static void main(String[] args) {\n\t\tGnomenWald map = new GnomenWald();\n\t\tVillage v1 = new Village(\"Rochester\");\n\t\tGnome v1g1 = new Gnome(\"Thomas\", \"Red\", 1);\n\t\tGnome v1g2 = new Gnome(\"Jerry\", \"Blue\", 0);\n\t\tGnome v1g3 = new Gnome(\"Jordan\", \"Yellow\", 2);\n\t\tGnome v1g4 = new Gnome(\"Philips\", \"Purple\", 1);\n\t\tv1.addGnomes(v1g1); v1.addGnomes(v1g2); v1.addGnomes(v1g3); v1.addGnomes(v1g4);\n\t\tVillage v2 = new Village(\"Syracuse\");\n\t\tGnome v2g1 = new Gnome(\"Sarah\", \"Pink\", 3);\n\t\tGnome v2g2 = new Gnome(\"John\", \"Black\", 2);\n\t\tGnome v2g3 = new Gnome(\"Yelson\", \"White\", 1);\n\t\tGnome v2g4 = new Gnome(\"Jeremy\", \"Lightblue\", 4);\n\t\tv2.addGnomes(v2g1); v2.addGnomes(v2g2); v2.addGnomes(v2g3); v2.addGnomes(v2g4);\n\t\tVillage v3 = new Village(\"Ithaca\");\n\t\tGnome v3g1 = new Gnome(\"Frank\", \"Jet black\", 0);\n\t\tGnome v3g2 = new Gnome(\"Mark\", \"Brown\", 3);\n\t\tGnome v3g3 = new Gnome(\"Alan\", \"Cyan\", 0);\n\t\tGnome v3g4 = new Gnome(\"Ray\", \"Red\", 0);\n\t\tv3.addGnomes(v3g1); v3.addGnomes(v3g2); v3.addGnomes(v3g3); v3.addGnomes(v3g4);\n\t\tVillage v4 = new Village(\"New York\");\n\t\tGnome v4g1 = new Gnome(\"Jimmy\", \"White\", 2);\n\t\tGnome v4g2 = new Gnome(\"Joseph\", \"Red\", 2);\n\t\tGnome v4g3 = new Gnome(\"Amy\", \"Yellow\", 3);\n\t\tGnome v4g4 = new Gnome(\"Greenwich\", \"Green\", 1);\n\t\tv4.addGnomes(v4g1); v4.addGnomes(v4g2); v4.addGnomes(v4g3); v4.addGnomes(v4g4);\n\t\tVillage v5 = new Village(\"San Francisco\");\n\t\tGnome v5g1 = new Gnome(\"Bob\", \"Green\", 4);\n\t\tGnome v5g2 = new Gnome(\"Paul\", \"Pink\", 4);\n\t\tGnome v5g3 = new Gnome(\"Staple\", \"Jet Black\", 3);\n\t\tGnome v5g4 = new Gnome(\"Mary\", \"Purple\", 1);\n\t\tv5.addGnomes(v5g1); v5.addGnomes(v5g2); v5.addGnomes(v5g3); v5.addGnomes(v5g4);\n\t\t\n\t\tmap.addVillage(v1);\n\t\tmap.addVillage(v2);\n\t\tmap.addVillage(v3);\n\t\tmap.addVillage(v4);\n\t\tmap.addVillage(v5);\n\t\t\n\t\tmap.printVillages();\n\t\tv1.printGnomes();\n\t}", "public static void main(String[] args) {\r\n\t\t//double lat = 36.149 + (0.001 * Math.random());\r\n\t\t//double lon = -86.800 + (0.001 * Math.random());\r\n\t\t\r\n\t\t// Note: The game area must already be set for this to work!\r\n\t\t\r\n\t\t// This puts a land mine in the middle of the parking lot\r\n\t\t// between ISIS and 21st.\r\n\t\tdouble lat = 36.14923059940338;\r\n\t\tdouble lon = -86.79988324642181;\r\n\t\tdouble rad = 5.0;\r\n\t\tLandMine lm = new LandMine(lat, lon, rad);\r\n\t\t//doLandMinePost(lm);\r\n\t\tdoLandMineRemove(lm);\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(TimeUtility.getTime());\n//\t\tFreeBaseMap map = new FreeBaseMap(LocalFileInfo.getNodeIdAndKeywordAndEdgeZipPath(), 2000000);\n//\t\tFreeBaseMap map = new FreeBaseMap(LocalFileInfo.getBasePath() + \"orginal_code\\\\data\\\\testedges.zip\");\n\t\tSystem.out.println(TimeUtility.getTime());\n//\t\tmap.display();\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "@Override\n public void run() {\n gameFinished = false;\n state.loadMap();\n\n //Timing Stuff\n double previous = System.currentTimeMillis();\n double current;\n double elapsed;\n double lag = 0.0D;\n\n if (Map.map != null)\n GAME_LOOP:while (!gameFinished || !keyPressed) {\n\n current = System.currentTimeMillis();\n elapsed = current - previous;\n previous = current;\n lag += elapsed;\n\n //Updating Client\n if (CoOpManager.isClient())\n Map.map = CoOpManager.get();\n\n while (lag >= MS_PER_UPDATE) {\n state.update();\n lag -= MS_PER_UPDATE;\n }\n\n //Syncing Client and server\n if (CoOpManager.isClient())\n CoOpManager.send(state.currentMap);\n if (CoOpManager.isServer()) {\n CoOpManager.send(state.currentMap);\n Map.map = CoOpManager.get();\n }\n\n gameFrame.render(state);\n\n try {\n Thread.sleep((long) (Math.max(0, MAX_FPS_TIME - (System.currentTimeMillis() - previous))));\n } catch (InterruptedException e) {\n System.err.println(\"Unexpected Occasion.Game will Terminate\");\n break;\n }\n\n if (paused) {\n gameFrame.render(state);\n //Show Paused Dialogue\n switch (JOptionPane.showOptionDialog(gameFrame\n , \"Game Paused !\", \"Paused\"\n , JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE\n , null, new Object[]{\"Continue\", \"Save And Quit\", \"Quit\"}, \"Continue\")) {\n case JOptionPane.CLOSED_OPTION:\n case JOptionPane.YES_OPTION:\n System.out.println(\"Game continues\");\n paused = false;\n previous = System.currentTimeMillis();\n continue;\n case JOptionPane.NO_OPTION:\n System.out.println(\"Save and Quits\");\n Map.map.mapLives = GameState.lives;//Saving lives of player\n Map.saveMap(state.currentMap);\n break GAME_LOOP;\n case JOptionPane.CANCEL_OPTION:\n\n System.out.println(\"Game Quits\");\n break GAME_LOOP;\n default:\n System.out.println(\"Unexpected\");\n break;\n }\n }\n\n gameFinished = state.gameOver || state.gameCompleted;\n\n if (!gameFinished)\n keyPressed = false;\n\n }\n\n if (gameFinished) {\n gameFrame.render(state);\n gameFrame.setPanel(MainMenu.panel);\n } else {\n //when player quits by pausing\n paused = false;\n gameFrame.setPanel(MainMenu.panel);\n }\n\n\n //Game is Finished Here\n if (CoOpManager.isServer() || CoOpManager.isClient())\n CoOpManager.disconnect();\n Map.map = null;//Delete current Game Progress\n state.gameOver = false;//Game is On ;)\n state.gameCompleted = false;\n keyPressed = false;\n\n }", "private void setup()\r\n {\r\n \r\n char[][] examplemap = {\r\n { 'e','w','e','e','e','e','e','e','e','e' },\r\n { 'e','w','e','w','w','w','w','e','w','w' },\r\n { 'e','w','e','w','e','w','w','e','w','e' },\r\n { 'e','e','e','w','e','w','e','e','w','e' },\r\n { 'e','w','e','e','e','w','e','e','w','e' },\r\n { 'e','w','w','w','e','w','e','w','w','e' },\r\n { 'e','e','e','e','e','e','e','w','e','e' },\r\n { 'e','w','w','e','w','e','w','w','w','e' },\r\n { 'e','e','w','e','e','w','w','e','e','e' },\r\n { 'e','e','w','e','e','e','e','e','e','w' }};\r\n for (int i=0; i<map.length; i++)\r\n {\r\n for (int n=0; n<map[i].length; n++)\r\n {\r\n if (examplemap[n][i] == 'e')\r\n map[i][n].setBackground(Color.white);\r\n else\r\n map[i][n].setBackground(Color.black);\r\n }\r\n }\r\n \r\n map[0][0].setBackground(Color.red);\r\n this.Playerpos[0]=0;\r\n this.Playerpos[1]=0;\r\n \r\n \r\n map[9][8].setBackground(Color.blue);\r\n this.Goalpos[0]=9;\r\n this.Goalpos[1]=8;\r\n \r\n \r\n \r\n \r\n }", "public static void main(String[] args) {\n // Factory method makes the appropriate type of Map subclass.\n SimpleAbstractMap<String, Integer> map = makeMap(args[0]);\n\n // Add some elements to the Map.\n map.put(\"I\", 1);\n map.put(\"am\", 2); \n map.put(\"Ironman\", 7);\n\n // Print out the key/values pairs in the Map.\n for (Map.Entry<String, Integer> s : map.entrySet())\n System.out.println\n (\"key = \"\n + s.getKey()\n + \" value = \"\n + s.getValue());\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"This is a 10 * 10 map, x axis and y axis start from 0 - 9.\");\n\t\tSystem.out.println(\"There are totally \"+MINE_NUMBER+\" mines, and your task is to find all the mines.\");\n\n\t\t// generate 10*10 grid\n\t\t/*\n\t\t * 0: not mine 1: mine 2: mine found 3: not mine shot\n\t\t * \n\t\t */\n\t\tint[][] map = new int[10][10];\n\t\t// repeated at least 5 times generate 5 mines\n\t\tint i = 0;\n\t\twhile (i < MINE_NUMBER) {\n\t\t\t// generate mines generally\n\t\t\tint x = (int) (Math.random() * 10); // 0-9\n\t\t\tint y = (int) (Math.random() * 10); // 0-9\n\t\t\tif (map[x][y] == 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmap[x][y] = 1;\n\t\t\ti++;\n\t\t}\n\n\t\t// ready to accept user input\n\t\tScanner input = new Scanner(System.in);\n\t\t// how many mines been found\n\t\tint find = 0;\n\n\t\t// start to accept user input\n\t\twhile (find < MINE_NUMBER) {\n\t\t\tint clickX, clickY;\n\t\t\tSystem.out.println(\"please enter the x axis of mine\");\n\t\t\tclickX = input.nextInt();\n\t\t\tSystem.out.println(\"please enter the y axis of mine \");\n\t\t\tclickY = input.nextInt();\n\n\t\t\tif (map[clickX][clickY] == 1) {\n\t\t\t\tmap[clickX][clickY] = 2;\n\t\t\t\tfind++;\n\t\t\t\tSystem.out.println(\"You find a mine! Now you found \" + find + \" mines and \" + (MINE_NUMBER - find) + \" left!\");\n\n\t\t\t} else if (map[clickX][clickY] == 2) {\n\t\t\t\tSystem.out.println(\"You have found this target, try again!\");\n\t\t\t} else {\n\t\t\t\tmap[clickX][clickY] = 3;\n\t\t\t\tSystem.out.println(\"You miss!\");\n\t\t\t\thint(map, clickX, clickY);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"You found all the mines! You win!\");\n\t\tinput.close();\n\t}", "public static void main(String[] args) {\n\t\tinit();\n\t\tdraw();\n\t\tnew LandMine();\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "@SuppressWarnings(\"nls\")\n public GameMapProcessor(@NonNull final GameMap parentMap) {\n super(\"Map Processor\");\n parent = parentMap;\n unchecked = new TLongArrayList();\n running = false;\n }", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\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 {\n //Create an instance of the game\n game Game = new game(PAGE_HEIGHT,PAGE_WIDTH,PAGE_TITLE);\n \n //Start the game loop\n Game.start();\n }", "public static void main( String args[] ) {\r\n\t\tGameContainer gc = \r\n\t\tnew GameContainer(DEFAULT_GAME_SIZE,DEFAULT_GAME_SIZE);\r\n\t}", "public static void main(String[] args) {\n Model model = new Model();\n View view = new View(model);\n Controller controller = new Controller(model, view);\n\n /*main program (each loop):\n -player token gets set\n -game status gets shown visually and user input gets requested\n -game grid gets updated\n -if the game is determined: messages gets shown and a system exit gets called*/\n while (model.turnCounter < 10) {\n model.setToken();\n view.IO();\n controller.update();\n if (controller.checker()){\n System.out.println(\"player \" + model.playerToken + \" won!\");\n System.exit(1);\n }\n System.out.println(\"draw\");\n }\n }", "public static void main(String[] args) {\r\n\t\tnew GameFullVersion();\r\n\t\t\r\n\t\t//initialize game board\r\n\t\tboard.addRandom();\r\n\t\tboard.addRandom();\r\n\t\t\r\n\t\t//show instructions\r\n\t\tJOptionPane.showMessageDialog(null, \"Use the arrow keys to move the \"\r\n\t\t\t\t+ \"tiles.\", \"Directions:\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\r\n\t\t//game loop\r\n\t\twhile (!winCheck(board)) {\r\n\t\t\tif (board.getFreeList().isEmpty() && canMerge(board).isEmpty()) {\r\n\t\t\t\tint answer = JOptionPane.showConfirmDialog(null, \"GAME OVER!!! \"\r\n\t\t\t\t\t\t+ \"\\nWould you like to restart?\", \"Sorry.\", \r\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\t\t\tif (answer == JOptionPane.YES_OPTION) {\r\n\t\t\t\t\tboard = new GameBoard();\r\n\t\t\t\t\tboard.addRandom();\r\n\t\t\t\t\tboard.addRandom();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}", "public static void main (String args[]) {\t \n\t\tint playerId;\n\t\tString name;\n\t\tplayers = new Player [GameData.NUM_PLAYERS_PLUS_NEUTRALS];\n\n\t\t\n\t\t// display blank board\n\t\tui.displayMap();\n\t\t\n\t\t\n\t\t// get player names\n\t\tfor (playerId=0; playerId<GameData.NUM_PLAYERS; playerId++) {\n\t\t\tui.displayString(\"Enter the name of Player \" + (playerId+1));\n\t\t\tname = ui.getCommand();\n\t\t\tui.displayString(\"> \" + name);\n\t\t\tui.displayString(name + \"'s colour is \"+ PlayerColourString(playerId) + \"\\n\");\n\t\t\tplayers[playerId]= new Player(playerId, name);\n\t\t}\n\t\t\t\n\t\t//Set the neutral names\n\t\tfor(; playerId<GameData.NUM_PLAYERS_PLUS_NEUTRALS; playerId++) {\n\t\t\tplayers[playerId]= new Player( playerId, PlayerColourString(playerId) + \" Neutral\");\n\t\t\tui.displayString(players[playerId].getName() + \"'s colour is \"+ PlayerColourString(playerId) + \"\\n\");\n\t\t}\n\n\t\tTerritory.initialiseTerritories(playerId, board, players, deckOfCards);\n\n\t\t\n\t\t// display map\n\t\tui.displayMap();\n\n\t\t\n\t\tReinforcements.setUpArmies(players, ui, board);\n\n\t\tTurn.turn(players, board, ui, deckOfCards);\n\n\t\treturn;\n\t}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public static void main(String[] args) {\n\t\tMapTest mTest = new MapTest();\r\n\t\tmTest.testPut();\r\n\t\tmTest.testKeySet();\r\n\t\tmTest.testEntrySet();\r\n\t}", "public static void main(String[] args){\n DotComBust game = new DotComBust();\n game.setUpGame();\n game.startPlaying();\n }", "public static void main(String[] args) throws Exception {\n ServerSocket listener = new ServerSocket(8102);\n System.out.println(\"Server is Running\");\n try {\n while (true) {\n\n Panel panel = new Panel();\n Game game = new Game();\n Object[] map = panel.generator(game);\n gamesArchive.add(game);\n Game.Player playerX = game.new Player(listener.accept(), 'X');\n Game.Player playerO = game.new Player(listener.accept(), 'O');\n playerX.setOpponent(playerO);\n playerO.setOpponent(playerX);\n game.thisPlayer = playerX;\n game.setPanel(map, panel.getLocationX(), panel.getLocationO());\n playerX.start();\n playerO.start();\n panel.printMap(map);\n }\n } finally {\n listener.close();\n }\n }", "public static void main(String[] args) {\n\t\tint[][] grid = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } \n\t };\n\t\tplay(grid);\n\t\t\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Welcome to TEAM-11 Game\");\n new GameEngine().start();\n }", "@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}", "@Override\n\tpublic void gameLoop() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tLabyrinthMap map = getLabyrinthMap();\n\t\tDirection d;\n\t\twhile (!map.isDone()) {\n\t\t\trenderManager.render(map);\n\t\t\td = readDirectionFromKeyboard(scanner);\n\t\t\tmap.updateMap(d);\n\t\t}\n\t\tSystem.out.println(\"Labirinto Finalizado!\");\n\t}", "public static void main(String[] args) {\n boolean errored = false;\n\n String oiClassName = System.getProperty(\"robotinspector.oimap.class\");\n\n if (oiClassName == null) {\n System.out.println(\"OI class not set, so not checking\");\n } else {\n try {\n Class<?> mapClass = RobotInspector.class.getClassLoader()\n .loadClass(oiClassName);\n System.out.println(\"Checking operator interface at \"\n + mapClass.getName() + \"...\");\n OI oi = new OI(mapClass, false);\n System.out.println(\"Validating...\");\n oi.validate();\n System.out.println(\"Mapping...\");\n oi.drawMaps();\n System.out.println(\"Robot ports successfully mapped.\");\n } catch (ClassNotFoundException e) {\n System.err.printf(\"Could not find robot map class: %s\",\n oiClassName);\n errored = true;\n } catch (BadOIMapException e) {\n System.err.println(\"OI error: \" + e.getMessage());\n System.err.println(\"Check your OIMap file!\");\n errored = true;\n } catch (IOException e) {\n System.err.println(\n \"IOException occured while making joystick diagram: \"\n + e.getMessage());\n System.err.println(\n \"We can continue with the build, but you don't get any diagrams.\");\n }\n }\n\n String mapClassName = System\n .getProperty(\"robotinspector.robotmap.class\");\n\n if (mapClassName == null) {\n System.out\n .println(\"Robot Map class is not set, so nothing to check\");\n } else {\n try {\n Class<?> mapClass = RobotInspector.class.getClassLoader()\n .loadClass(mapClassName);\n System.out.println(\n \"Checking robot map at \" + mapClass.getName() + \"...\");\n new PortMapper().mapPorts(mapClass);\n System.out.println(\"Robot ports successfully mapped.\");\n } catch (ClassNotFoundException e) {\n System.err.printf(\"Could not find robot map class: %s\",\n mapClassName);\n errored = true;\n } catch (DuplicatePortException | InvalidPortException e) {\n System.err.println(\"Wiring error: \" + e.getMessage());\n System.err.println(\"Check your RobotMap file!\");\n errored = true;\n } catch (IOException e) {\n System.err.println(\n \"IOException occured while making wiring diagram: \"\n + e.getMessage());\n System.err.println(\n \"We can continue with the build, but you don't get any diagrams.\");\n }\n }\n\n if (errored) {\n System.exit(-1);\n }\n }", "public static void main(String[] args) {\n\n ShapeGame shapeGame = new ShapeGame();\n shapeGame.run();\n }", "public static void main(String[] args) {\n Tron.init();\n\n //We'll want to keep track of the turn number to make debugging easier.\n int turnNumber = 0;\n\n // Execute loop forever (or until game ends)\n while (true) {\n //Update turn number:\n turnNumber++;\n\n /* Get an integer map of the field. Each int\n * can either be Tron.Tile.EMPTY, Tron.Tile.ME,\n * Tron.Tile.OPPONENT, Tron.Tile.TAKEN_BY_ME,\n * Tron.Tile.TAKEN_BY_OPPONENT, or Tron.Tile.WALL */\n ArrayList<ArrayList<Tron.Tile>> mList = Tron.getMap();\n int[][] m = new int[mList.size()][mList.get(0).size()];\n for (int i = 0; i < mList.size(); i++) {\n for (int j = 0; j < mList.get(i).size(); j++) {\n m[i][j] = mList.get(i).get(j).ordinal();\n }\n }\n\n //Let's figure out where we are:\n int myLocX = 0, myLocY = 0;\n for(int y = 0; y < 16; y++) {\n for(int x = 0; x < 16; x++) {\n //I want to note that this is a little bit of a disgusting way of doing this comparison, and that you should change it later, but Java makes this uglier than C++\n if(Tron.Tile.values()[m[y][x]] == Tron.Tile.ME) {\n myLocX = x;\n myLocY = y;\n }\n }\n }\n\n //Let's find out which directions are safe to go in:\n boolean [] safe = emptyAdjacentSquares(m, myLocX, myLocY);\n\n //Let's look at the counts of empty squares around the possible squares to go to:\n int [] dirEmptyCount = new int[4];\n for(int a = 0; a < 4; a++) {\n if(safe[a]) {\n //Get the location we would be in if we went in a certain direction (specified by a).\n int[] possibleSquare = getLocation(myLocX, myLocY, a);\n //Make sure that square exists:\n if(possibleSquare[0] != -1 && possibleSquare[1] != -1) {\n //Find the squares around that square:\n boolean [] around = emptyAdjacentSquares(m, possibleSquare[0], possibleSquare[1]);\n //Count the number of empty squares around that square and set it in our array:\n dirEmptyCount[a] = 0;\n for(int b = 0; b < 4; b++) if(around[b]) dirEmptyCount[a]++;\n }\n }\n else dirEmptyCount[a] = 5; //Irrelevant, but we must ensure it's as large as possible because we don't want to go there.\n }\n\n //Log some basic information.\n Tron.log(\"-----------------------------------------------------\\nDebug for turn #\" + turnNumber + \":\\n\");\n for(int a = 0; a < 4; a++) Tron.log(\"Direction \" + stringFromDirection(a) + \" is \" + (safe[a] ? \"safe.\\n\" : \"not safe.\\n\"));\n\n /* Send your move. This can be Tron.Direction.NORTH,\n * Tron.Direction.SOUTH, Tron.Direction.EAST, or\n * Tron.Direction.WEST. */\n int minVal = 1000, minValLoc = 0;\n for(int a = 0; a < 4; a++) {\n if(dirEmptyCount[a] < minVal) {\n minVal = dirEmptyCount[a];\n minValLoc = a;\n }\n }\n Tron.sendMove(Tron.Direction.values()[minValLoc]);\n }\n }", "public static void main(String[] args) {\n \tboolean debug = true;\n \tif(debug) {\n \t\tCustomExecutor executor = new CustomExecutor.Builder()\n \t\t\t.setVisual(true)\n\t \t.setTickLimit(8000)\n \t\t\t.setPO(true)\n\t \t.build();\n \t\t\n\t \tEnumMap<GHOST, IndividualGhostController> controllers = new EnumMap<>(GHOST.class);\n\n MyPacMan agent = new MyPacMan(true, MODULE_TYPE.THREE_MULTITASK, 2);\n //MyPacMan badboy = new MyPacMan(true, MODULE_TYPE.TWO_MODULES, 15);\n \n\t //create ghost controllers\n controllers.put(GHOST.INKY, new POGhost(GHOST.INKY));\n controllers.put(GHOST.BLINKY, new POGhost(GHOST.BLINKY));\n controllers.put(GHOST.PINKY, new POGhost(GHOST.PINKY));\n controllers.put(GHOST.SUE, new POGhost(GHOST.SUE));\n \n boolean secondViewer = true; // View in PO and non-PO mode\n executor.runGameTimed(agent, new MASController(controllers), secondViewer);\n\t System.out.println(\"Evaluation over\");\n \t} else {\n \t\t\n\t Executor executor = new Executor.Builder()\n\t \t\t.setVisual(true)\n\t \t \t.setTickLimit(8000)\n\t \t \t.build();\t\t\n\t \n\t \tEnumMap<GHOST, IndividualGhostController> controllers = new EnumMap<>(GHOST.class);\n\n\t MyPacMan agent = new MyPacMan();\n\t \n\t controllers.put(GHOST.INKY, new POGhost(GHOST.INKY));\n\t controllers.put(GHOST.BLINKY, new POGhost(GHOST.BLINKY));\n\t controllers.put(GHOST.PINKY, new POGhost(GHOST.PINKY));\n\t controllers.put(GHOST.SUE, new POGhost(GHOST.SUE));\n\t \n\t executor.runGameTimed(agent, new MASController(controllers));\n\t System.out.println(\"Evaluation over\");\n\t \n \t}\n }", "public static void main(String[] args) {\n\t\tGame game = new Game();\n\t\t//game.playGame();\n\t}", "public static void main(String[] args) {\n\n Map<String,String> nameAndStatePair = new HashMap<>();\n\n Map<Integer,String> groupNumLeaderNamePair = new HashMap<>();\n\n Map<String,Double> groceryNameAndPricePair = new HashMap<>();\n\n Map<String,Boolean> voterAndEligibilityPair = new HashMap<>();\n\n Map<String,Integer> gameNameAndScoreMap = new HashMap<>();\n\n Map<String,Character> QuestionNumAndCorrectAnswerPair = new HashMap<>();\n\n }", "public static void main(String[] args) {\n\t\tClientMapConstructor mapRobot = new ClientMapConstructor();\n\t\ttry {\n\t\t\tmapRobot.setup();\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "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}", "public static void main(String[] args) {\r\n\t\tPApplet.main(\"ruizhizi_xue_oscar_assignment6.edu.nyu.cs.yx2021.rx513.PlayGame\");\r\n\t}", "public void printMiniMap() { }", "public static void main(String[] args) {\n\t\tMap<String, Integer> myMap = new HashMap<>();\n\n\t\tcreateMap(myMap); // cria mapa com base na entrada do usuário\n\t\tdisplayMap(myMap); // exibe o conteúdo do mapa\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void map() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tSystem.out.println(object);\n\t}", "public static void main(String[] args) {\r\n Window w = new Window();\r\n w.msg(\"The Almighty Council of Trevor has just found you guilty of committing crimes against Skyrim and her people. \\n \\n They used their quantum entanglement technology to imprison you(in fortnite) in a vast maze. \\n \\n They have summoned the silent Minotaur, known only as \\\"The Pipe\\\" that will chase you unerringly, as well as the three ratlike Hartogs, who patrol the halls. \\n \\n However, your boy Jonah smuggled in a sword for you to use, though it's a cheap ass sword so it'll only work once. Thanks, Obama! \\n \\n All you need to do is make it to the exit of the maze, and the Almighty Council of Trevor will pardon your crimes since you've demonstrated your epicness. \\n \\n Now don't fuck this up, or Trevor and Ronald will absorb your soul.\");\r\n Overseer _o = new Overseer();\r\n _o._s.updateMap(_o._p, _o._m, _o._r1, _o._r2, _o._r3, _o._v, _o._z);\r\n while (_o._p.checkAlive()) {\r\n _o.move(_o.getPlayerMovement());\r\n _o._s.updateMap(_o._p, _o._m, _o._r1, _o._r2, _o._r3, _o._v, _o._z);\r\n _o.gamecheck();\r\n }\r\n }", "public static void main(String[] args) {\n\t\tnew GameBoard();\n\t}", "public static void main (String [] args) {\n \n // Welcome message\n JOptionPane.showMessageDialog(null, \"Welcome to the EcoSystem Simulation!\");\n \n // Declare variables for getting user input and for the program to use\n boolean customize = false;\n String answer; // Get user input as a string\n int row, column;\n int plantSpawnRate;\n int plantHealth, sheepHealth, wolfHealth;\n int numSheepStart, numWolfStart, numPlantStart;\n int numTurns; // Keeps track of the number of turns\n int newX, newY; // Updates animal positions\n int [] keepRunning = new int [] {0, 0, 0}; // Keeping track of animal population to determine when the program should end\n \n // Get whether the user wants a custom map or not\n int customizable = JOptionPane.showConfirmDialog(null, \"Would you like to customize the map?\");\n if (customizable == 0) {\n customize = true;\n }\n \n // Get user inputs for a custom map\n if (customize == true) {\n answer = JOptionPane.showInputDialog(\"Number of rows and columns (side length, it will be a square): \");\n row = Integer.parseInt(answer);\n column = row;\n answer = JOptionPane.showInputDialog(\"Plant spawn rate (plants/turn): \");\n plantSpawnRate = Integer.parseInt(answer);\n \n answer = JOptionPane.showInputDialog(\"Sheep health: \");\n sheepHealth = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Wolf health: \");\n wolfHealth = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Plant nutrition: \");\n plantHealth = Integer.parseInt(answer);\n \n answer = JOptionPane.showInputDialog(\"Beginning number of sheep: \");\n numSheepStart = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Beginning number of wolves: \");\n numWolfStart = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Beginning number of plants: \");\n numPlantStart = Integer.parseInt(answer);\n \n // Initialise inputs for a non-custom map\n } else {\n row = 25;\n column = 25;\n plantSpawnRate = 3;\n plantHealth = 15;\n sheepHealth = 40;\n wolfHealth = 60;\n numPlantStart = 100;\n numSheepStart = 120;\n numWolfStart = 20;\n }\n \n // Initialise new map with the dimensions given \n map = new Species [row][column];\n \n // Make the initial grid\n makeGrid(map, numSheepStart, numWolfStart, numPlantStart, sheepHealth, plantHealth, wolfHealth, plantSpawnRate);\n DisplayGrid grid = new DisplayGrid(map);\n grid.refresh();\n \n // Get whether the user is ready or not to load in objects\n int ready = JOptionPane.showConfirmDialog(null, \"Are you ready?\");\n \n // While user is ready\n if (ready == 0) {\n \n numTurns = 0;\n \n // Run the simulation, updating every second\n do { \n try{ Thread.sleep(1000); }catch(Exception e) {};\n \n // Update the map each second with all actions\n EcoSystemSim.updateMap(map, plantHealth, sheepHealth, wolfHealth, plantSpawnRate); // Update grid each turn\n \n keepRunning = population(); // Check for the populations\n \n // If board is getting too full, kill off species\n if ((keepRunning[0] + keepRunning[1] + keepRunning[2]) >= ((row * column) - 5)) {\n \n // Count 5 to kill off species\n for (int j = 0; j <= 5; j++) {\n \n // Generate random coordinates\n int y = (int)(Math.random() * map[0].length);\n int x = (int)(Math.random() * map.length);\n \n // Kill species\n map[y][x] = null;\n \n }\n }\n \n numTurns += keepRunning[3]; // Updates number of turns\n \n grid.refresh(); // Refresh each turn\n \n } while ((keepRunning[0] != 0) && (keepRunning[1] != 0) && (keepRunning[2] != 0)); // Check for whether any population is extinct\n \n // Output final populations and number of turns\n JOptionPane.showMessageDialog(null, \"The number of plants left are: \" + keepRunning[0]);\n JOptionPane.showMessageDialog(null, \"The number of sheep left are: \" + keepRunning[1]);\n JOptionPane.showMessageDialog(null, \"The number of wolves left are: \" + keepRunning[2]);\n JOptionPane.showMessageDialog(null, \"The number of turns taken is: \" + numTurns);\n }\n\n }", "public void initializeMaps() {\n\t\t//can use any map\n\n\t\t//left map\n\t int x = 0, y = 0;\n\t int Lvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyLeft.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tLvalue = Integer.parseInt(str);\n\t \t\t\tleftMap[x][y] = Lvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //right map\n\t x = 0;\n\t y = 0;\n\t int Rvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \t//change to map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyRight.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tRvalue = Integer.parseInt(str);\n\t \t\t\trightMap[x][y] = Rvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //print each map for testing\n\t for(int i = 0; i < leftMap.length; i++ )\n\t \tfor(int j = 0; j < leftMap[i].length; j++ )\n\t \t\tSystem.out.println(leftMap[i][j]);\n\t System.out.println(\"*-----------------*\");\n\t for(int i = 0; i < rightMap.length; i++ )\n\t \tfor(int j = 0; j < rightMap[i].length; j++ )\n\t \t\tSystem.out.println(rightMap[i][j]);\n\t}", "public static void main(String[] args) {\n if (args.length == 0) {\n System.err.println(\"Missing command line arguments\");\n System.exit(1);\n }\n\n // Map\n // 8 x 8 by default\n ArrayList<String> map = new ArrayList<>();\n String upperBound = \"| _ _ _ _ _ _ _ _ |\";\n String lowerBound = \"| _ _ _ _ _ _ _ _ |\";\n\n map.add(upperBound);\n map.add(\"|<. . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(lowerBound);\n\n for (String w: map) {\n System.out.println(w);\n }\n }", "public static void main(String args[]) {\n (new Game()).start();\n }", "public void gameStarted() {\n\t\treset();\n\t\tSystem.out.println(\"Game Started\");\n\n\t\t// allow me to manually control units during the game\n\t\tbwapi.enableUserInput();\n\t\t\n\t\t// set game speed to 30 (0 is the fastest. Tournament speed is 20)\n\t\t// You can also change the game speed from within the game by \"/speed X\" command.\n\t\tbwapi.setGameSpeed(20);\n\t\t\n\t\t// analyze the map\n\t\tbwapi.loadMapData(true);\n\t\t\n\n\t\t// This is called at the beginning of the game. You can \n\t\t// initialize some data structures (or do something similar) \n\t\t// if needed. For example, you should maintain a memory of seen \n\t\t// enemy buildings.\n\t\tbwapi.printText(\"This map is called \"+bwapi.getMap().getName());\n\t\tbwapi.printText(\"Enemy race ID: \"+String.valueOf(bwapi.getEnemies().get(0).getRaceID()));\t// Z=0,T=1,P=2\n\t\t\n\t\tmanagers.put(ArmyManager.class.getSimpleName(), ArmyManager.getInstance());\n\t\tmanagers.put(BuildManager.class.getSimpleName(), BuildManager.getInstance());\n\t\tmanagers.put(ResourceManager.class.getSimpleName(), ResourceManager.getInstance());\n\t\tmanagers.put(ScoutManager.class.getSimpleName(), ScoutManager.getInstance());\n\t\tmanagers.put(TrashManager.class.getSimpleName(), TrashManager.getInstance());\n\t\tmanagers.put(UnitManager.class.getSimpleName(), UnitManager.getInstance());\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.reset();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\trestart();\r\n\t\t\r\n\t\twhile (validMoveAvailable()) {\r\n\t\t\tDisplay.clear();\r\n\t\t\tDisplay.printRemainingCards();\r\n\t\t\tDisplay.printPiles();\r\n\t\t\tDisplay.printHand();\r\n\t\t\tString move = Input.getInput();\r\n\t\t\tif (!parse(move))\r\n\t\t\t\tDisplay.printInvalidMove();\r\n\t\t\t\r\n\t\t\tif (Hand.getHandSize() < 7) Hand.fillHand();\r\n\t\t}\r\n\t\t\r\n\t\tif (CardPool.isEmpty()) Display.printWin();\r\n\t\telse Display.printLose();\r\n\t}", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "public static void main(String[] args) {\n\r\n\t\r\n\t\r\n\tplace();\r\n\t}", "public void printMap(GameMap map);", "public static void main(String[] args) {\n HighScoresTable highScoresTable = null;\n // trying to read the high score file\n try {\n highScoresTable = HighScoresTable.loadFromFile((new File(\"highScores.txt\")));\n } catch (IOException e) {\n e.printStackTrace();\n } // if the table is empty\n if (highScoresTable.getHighScores().isEmpty()) {\n highScoresTable = new HighScoresTable(5);\n }\n final HighScoresTable scoresTable = highScoresTable;\n GUI gui = new GUI(\"arknoid\", 800, 600);\n // creating a runner\n final AnimationRunner runner = new AnimationRunner(gui);\n final KeyboardSensor keyborad = runner.getGui().getKeyboardSensor();\n // creating a menu\n Menu<Task<Void>> mainMenu = new MenuAnimation<Task<Void>>(\"chicken invaders\", keyborad);\n mainMenu.addSelection(\"s\", \"Start game\", new Task<Void>() {\n // run the levels\n public Void run() {\n // creating a level information object to run over finally\n LevelInformation spaceInvader = new SpaceInvadersLevel();\n GameFlow flow = new GameFlow(800, 600, scoresTable, gui, keyborad);\n flow.runLevels(spaceInvader);\n return null;\n }\n }); // the option for watching the high score table\n mainMenu.addSelection(\"h\", \"High Scores\", new Task<Void>() {\n // show the highScoreAnimation with the scores table\n public Void run() {\n runner.run(new KeyPressStoppableAnimation(keyborad, KeyboardSensor.SPACE_KEY,\n new HighScoresAnimation(scoresTable)));\n return null;\n }\n }); // the option of quiting\n mainMenu.addSelection(\"q\", \"Exit\", new Task<Void>() {\n // q to quit game\n public Void run() {\n System.exit(0);\n return null;\n }\n });\n while (true) {\n // run the main menu\n runner.run(mainMenu);\n Task<Void> task = mainMenu.getStatus();\n // as long the task is not null - run it.\n if (task != null) {\n task.run();\n mainMenu.setStop(false);\n }\n }\n\n }", "public static void main(String[] args) {\n int SIZE=4;\n double entropy=0.15;\n MSGeneratorMap map = new MSGeneratorMap(SIZE,entropy);\n String[][] p = map.getBoard();\n System.out.println(map.toString());\n\n }", "public static void main(String[] args){\n try {\n GameClient.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "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 gameInitialize() {\n this.world = new BufferedImage(GameConstants.GAME_SCREEN_WIDTH,\n GameConstants.GAME_SCREEN_HEIGHT,\n BufferedImage.TYPE_3BYTE_BGR);\n\n gameObjs = new ArrayList<>();\n try {\n background = (BufferedImage)Resource.getHashMap().get(\"wallpaper\");\n /*\n * note class loaders read files from the out folder (build folder in Netbeans) and not the\n * current working directory.\n */\n InputStreamReader isr = new InputStreamReader(Objects.requireNonNull(RainbowReef.class.getClassLoader().getResourceAsStream(\"map/map1\")));\n BufferedReader mapReader = new BufferedReader(isr);\n\n String row = mapReader.readLine();\n if (row == null) {\n throw new IOException(\"nothing here\");\n }\n String[] mapInfo = row.split(\"\\t\");\n int numCols = Integer.parseInt(mapInfo[0]);\n int numRows = Integer.parseInt(mapInfo[1]);\n for (int curRow = 0; curRow < numRows; curRow++){\n row = mapReader.readLine();\n mapInfo = row.split(\"\\t\");\n for(int curCol = 0; curCol< numCols; curCol++){\n switch (mapInfo[curCol]) {\n case \"2\" -> {\n UnbreakableWall sowall = new UnbreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"SolidBlock\"));\n gameObjs.add(sowall);\n }\n case \"3\" -> {\n BreakableWall pwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"PinkBlock\"));\n gameObjs.add(pwall);\n }\n case \"4\" -> {\n BreakableWall ywall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"YellowBlock\"));\n gameObjs.add(ywall);\n }\n case \"5\" -> {\n BreakableWall rwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"RedBlock\"));\n gameObjs.add(rwall);\n }\n case \"6\" -> {\n BreakableWall gwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"GreenBlock\"));\n gameObjs.add(gwall);\n }\n case \"7\" -> {\n Health health = new Health(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"HealthBlock\"));\n gameObjs.add(health);\n }\n case \"8\" -> {\n BulletBlock bigbullet = new BulletBlock(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"BulletBlock\"));\n gameObjs.add(bigbullet);\n }\n case \"9\" -> {\n Goblin bl = new Goblin(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"Goblin\"));\n gameObjs.add(bl);\n }\n }\n }\n }\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n ex.printStackTrace();\n }\n\n Katch t1 = new Katch(290, 440, 0, 0, 0, (BufferedImage) Resource.getHashMap().get(\"Katch\"));\n KatchControl tc1 = new KatchControl(t1, KeyEvent.VK_D, KeyEvent.VK_A, KeyEvent.VK_SPACE);\n this.setBackground(Color.BLACK);\n this.lf.getJf().addKeyListener(tc1);\n this.gameObjs.add(t1);\n\n }", "public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }", "public static void main(String args[]) throws IOException\n{\n if(args.length == 0)\n {\n System.out.println(\"Parámetros: mapa [camino]\");\n System.exit(0);\n }\n\n String mapa = args[0],\n camino = args.length==2 ? args[1] : null;\n\n Mapa m = new Mapa(mapa, camino);\n System.out.println(m);\n m.mostrar();\n}", "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}" ]
[ "0.7781919", "0.7172654", "0.7132278", "0.7032179", "0.6881986", "0.67308426", "0.6674647", "0.6644992", "0.6639561", "0.6631444", "0.6631444", "0.66180354", "0.6541948", "0.65335304", "0.65142363", "0.65018356", "0.6500582", "0.6499457", "0.64713913", "0.64709437", "0.6457354", "0.6434577", "0.6408222", "0.6374244", "0.6370204", "0.63542694", "0.63384813", "0.63332343", "0.63186765", "0.62913495", "0.6261342", "0.625512", "0.6247193", "0.62385553", "0.62245405", "0.6224262", "0.62230504", "0.62210673", "0.62162083", "0.6214069", "0.6212521", "0.61996645", "0.6198228", "0.6171296", "0.6168869", "0.6168569", "0.6152263", "0.61479914", "0.61467564", "0.613836", "0.61366165", "0.6133049", "0.61314934", "0.6122597", "0.61175704", "0.61149114", "0.6104792", "0.610339", "0.60751915", "0.60747975", "0.606", "0.60477245", "0.6028328", "0.6025884", "0.60176605", "0.601416", "0.6013955", "0.6009733", "0.6009224", "0.6008035", "0.6002584", "0.5996774", "0.59886456", "0.59793925", "0.59771574", "0.5973534", "0.5969068", "0.5957315", "0.5956878", "0.59549516", "0.5952002", "0.5950964", "0.59496135", "0.59471947", "0.59447736", "0.5941551", "0.5940363", "0.59372246", "0.59315777", "0.59307724", "0.59213805", "0.5921184", "0.59208876", "0.5918305", "0.59156287", "0.59132385", "0.59108645", "0.59107697", "0.5906496", "0.59003544", "0.5885468" ]
0.0
-1
Perform a check if the player character is inside a building. In case the inside status differs for any level from the state before the check, all tiles are added to the list of tiles that need to be checked once more.
private void performInsideCheck() { if (checkInsideDone) { return; } checkInsideDone = true; final Location playerLoc = World.getPlayer().getLocation(); final int currX = playerLoc.getScX(); final int currY = playerLoc.getScY(); int currZ = playerLoc.getScZ(); boolean nowOutside = false; boolean isInside = false; for (int i = 0; i < 2; ++i) { currZ++; if (isInside || parent.isMapAt(currX, currY, currZ)) { if (!insideStates[i]) { insideStates[i] = true; synchronized (unchecked) { unchecked.add(Location.getKey(currX, currY, currZ)); } } isInside = true; } else { if (insideStates[i]) { insideStates[i] = false; nowOutside = true; } } } /* * If one of the values turned from inside to outside, all tiles are added to the list to be checked again. */ if (nowOutside) { synchronized (unchecked) { unchecked.clear(); parent.processTiles(this); } } World.getWeather().setOutside(!isInside); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canBuildBlock(Tile t);", "public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}", "private void openFloor(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n if (t.getSurroudingBombs() == 0) { \r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if (!(r == tileRow && c == tileCol) && inspectionTile.isHidden() \r\n && !inspectionTile.getFlagged()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if ((r != tileRow - 1 && c != tileCol - 1) ||\r\n (r != tileRow - 1 && c != tileCol + 1) ||\r\n (r != tileRow + 1 && c != tileCol - 1) ||\r\n (r != tileRow + 1 && c != tileCol + 1) && \r\n !(r == tileRow && c == tileCol) && inspectionTile.isHidden()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "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 }", "boolean canBuildDome(Tile t);", "public void checkInside() {\n checkInsideDone = false;\n }", "public static NPCHouse isBox(World worldIn, BlockPos pos, EnumFacing side)\n\t{\n\t\tBlockPos une = pos, unw = pos, use = pos, usw = pos, dne = pos, dnw = pos, dse = pos, dsw = pos;\n\t\tboolean isBuilding = false;\n\t\t\n\t\t//D-U-N-S-W-E\n\t\tassess:\n\t\tswitch(side.getIndex())\n\t\t{\n\t\t\tcase 0:\t//assume ceiling\n\t\t\t\t\t//while not wall && wood, go in direction to find wall\n\t\t\t\t\t//know is ceiling, so we can us a block at least 2 below && can only click ceiling from inside, so one in any Cardinal direction can be assumed as wood for wall checks\n\t\t\t\t\t//move east and west, checking if wall with 2 blocks down and 1 block north (neCorner\n\t\t\t\t\tune = pos.north().east();\n\t\t\t\t\tunw = pos.north().west();\n\t\t\t\t\tuse = pos.south().east();\n\t\t\t\t\tusw = pos.south().west();\n\t\t\t\t\t//make sure all start corners are actually wood, else fail\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//these are clearly not wooden, but we need them to check for walls, when they become wooden, we have found walls\n\t\t\t\t\tdne = une.down();\n\t\t\t\t\tdnw = unw.down();\n\t\t\t\t\tdse = use.down();\n\t\t\t\t\tdsw = usw.down();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//move corners to find walls in order, north, south, east, west\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw))\n\t\t\t\t\t{\n\t\t\t\t\t\t//if we're no longer looking at wood, then it's not a domicile, so fail\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.north();\n\t\t\t\t\t\tunw = unw.north();\n\t\t\t\t\t\tdne = dne.north();\n\t\t\t\t\t\tdnw = dnw.north();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\t//if we're no longer looking at wood, then it's not a domicile, so fail\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuse = use.south();\n\t\t\t\t\t\tusw = usw.south();\n\t\t\t\t\t\tdse = dse.south();\n\t\t\t\t\t\tdsw = dsw.south();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse))\n\t\t\t\t\t{\n\t\t\t\t\t\t//if we're no longer looking at wood, then it's not a domicile, so fail\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, use)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.east();\n\t\t\t\t\t\tuse = use.east();\n\t\t\t\t\t\tdne = dne.east();\n\t\t\t\t\t\tdse = dse.east();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\t//if we're no longer looking at wood, then it's not a domicile, so fail\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunw = unw.west();\n\t\t\t\t\t\tusw = usw.west();\n\t\t\t\t\t\tdnw = dnw.west();\n\t\t\t\t\t\tdsw = dsw.west();\n\t\t\t\t\t}\n\t\t\t\t\t//We now have the real upper corners of the building, let's find out if we have a floor! :)\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//for some reason it's going past all of them and I've no fucking clue why.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdne = dne.down();\n\t\t\t\t\t\tdnw = dnw.down();\n\t\t\t\t\t\tdse = dse.down();\n\t\t\t\t\t\tdsw = dsw.down();\n\t\t\t\t\t}\n\t\t\t\t\t//This should be all of our corners. Let's run another check on every wall and floor just to make sure its' not missing pieces on us. :D\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\n\t\t\t\t\tbreak assess;\n\t\t\tcase 1:\t//assume floor\t\n\t\t\t\t\tdne = pos.north().east();\n\t\t\t\t\tdnw = pos.north().west();\n\t\t\t\t\tdse = pos.south().east();\n\t\t\t\t\tdsw = pos.south().west();\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tune = dne.up();\n\t\t\t\t\tunw = dnw.up();\n\t\t\t\t\tuse = dse.up();\n\t\t\t\t\tusw = dsw.up();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//Start finding Walls in order: N-S-E-W\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.north();\n\t\t\t\t\t\tunw = unw.north();\n\t\t\t\t\t\tdne = dne.north();\n\t\t\t\t\t\tdnw = dnw.north();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuse = use.south();\n\t\t\t\t\t\tusw = usw.south();\n\t\t\t\t\t\tdse = dse.south();\n\t\t\t\t\t\tdsw = dsw.south();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.east();\n\t\t\t\t\t\tuse = use.east();\n\t\t\t\t\t\tdne = dne.east();\n\t\t\t\t\t\tdse = dse.east();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunw = unw.west();\n\t\t\t\t\t\tusw = usw.west();\n\t\t\t\t\t\tdnw = dnw.west();\n\t\t\t\t\t\tdsw = dsw.west();\n\t\t\t\t\t}\n\t\t\t\t\t//Find the Roof!\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.up();\n\t\t\t\t\t\tunw = unw.up();\n\t\t\t\t\t\tuse = use.up();\n\t\t\t\t\t\tusw = usw.up();\n\t\t\t\t\t}\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\n\t\t\t\t\tbreak assess;\n\t\t\t\t\t\n\t\t\tcase 2: //assume ewWall (North facing side)\n\t\t\t\t\tuse = pos.up().east();\n\t\t\t\t\tusw = pos.up().west();\n\t\t\t\t\tdse = pos.down().east();\n\t\t\t\t\tdsw = pos.down().west();\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tune = use.north();\n\t\t\t\t\tunw = usw.north();\n\t\t\t\t\tdne = dse.north();\n\t\t\t\t\tdnw = dsw.north();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//First, we check Ceiling and Floor\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.up();\n\t\t\t\t\t\tunw = unw.up();\n\t\t\t\t\t\tuse = use.up();\n\t\t\t\t\t\tusw = usw.up();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdne = dne.down();\n\t\t\t\t\t\tdnw = dnw.down();\n\t\t\t\t\t\tdse = dse.down();\n\t\t\t\t\t\tdsw = dsw.down();\n\t\t\t\t\t}\n\t\t\t\t\t//Now we check the Eastern and Western Walls\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.east();\n\t\t\t\t\t\tuse = use.east();\n\t\t\t\t\t\tdne = dne.east();\n\t\t\t\t\t\tdse = dse.east();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunw = unw.west();\n\t\t\t\t\t\tusw = usw.west();\n\t\t\t\t\t\tdnw = dnw.west();\n\t\t\t\t\t\tdsw = dsw.west();\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, we check for the North Wall\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.north();\n\t\t\t\t\t\tunw = unw.north();\n\t\t\t\t\t\tdne = dne.north();\n\t\t\t\t\t\tdnw = dnw.north();\n\t\t\t\t\t}\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\t\n\t\t\t\t\tbreak assess;\n\t\t\tcase 3:\t//assume ewWall (South facing Wall - North wall of room)\n\t\t\t\t\tune = pos.up().east();\n\t\t\t\t\tunw = pos.up().west();\n\t\t\t\t\tdne = pos.down().east();\n\t\t\t\t\tdnw = pos.down().west();\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tuse = une.south();\n\t\t\t\t\tusw = unw.south();\n\t\t\t\t\tdse = dne.south();\n\t\t\t\t\tdsw = dnw.south();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//First, we check Ceiling and Floor\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, unw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.up();\n\t\t\t\t\t\tunw = unw.up();\n\t\t\t\t\t\tuse = use.up();\n\t\t\t\t\t\tusw = usw.up();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdne = dne.down();\n\t\t\t\t\t\tdnw = dnw.down();\n\t\t\t\t\t\tdse = dse.down();\n\t\t\t\t\t\tdsw = dsw.down();\n\t\t\t\t\t}\n\t\t\t\t\t//Now we check the Eastern and Western Walls\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, dne)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.east();\n\t\t\t\t\t\tuse = use.east();\n\t\t\t\t\t\tdne = dne.east();\n\t\t\t\t\t\tdse = dse.east();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunw = unw.west();\n\t\t\t\t\t\tusw = usw.west();\n\t\t\t\t\t\tdnw = dnw.west();\n\t\t\t\t\t\tdsw = dsw.west();\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, we check for the South Wall\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dse) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuse = use.south();\n\t\t\t\t\t\tusw = usw.south();\n\t\t\t\t\t\tdse = dse.south();\n\t\t\t\t\t\tdsw = dsw.south();\n\t\t\t\t\t}\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\t\n\t\t\t\t\tbreak assess;\n\t\t\tcase 4:\t//assume nsWall (West Facing Wall - Eastern wall of room)\n\t\t\t\t\tune = pos.up().north();\n\t\t\t\t\tuse = pos.up().south();\n\t\t\t\t\tdne = pos.down().north();\n\t\t\t\t\tdse = pos.down().south();\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tunw = une.west();\n\t\t\t\t\tusw = use.west();\n\t\t\t\t\tdnw = dne.west();\n\t\t\t\t\tdsw = dse.west();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//First we check the Ceiling and Floor\n\t\t\t\t\t//First, we check Ceiling and Floor\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, use)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.up();\n\t\t\t\t\t\tunw = unw.up();\n\t\t\t\t\t\tuse = use.up();\n\t\t\t\t\t\tusw = usw.up();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdne = dne.down();\n\t\t\t\t\t\tdnw = dnw.down();\n\t\t\t\t\t\tdse = dse.down();\n\t\t\t\t\t\tdsw = dsw.down();\n\t\t\t\t\t}\n\t\t\t\t\t//Next we are gonna check the North and South Walls\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, dne)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.north();\n\t\t\t\t\t\tunw = unw.north();\n\t\t\t\t\t\tdne = dne.north();\n\t\t\t\t\t\tdnw = dnw.north();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuse = use.south();\n\t\t\t\t\t\tusw = usw.south();\n\t\t\t\t\t\tdse = dse.south();\n\t\t\t\t\t\tdsw = dsw.south();\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, we move West!\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunw = unw.west();\n\t\t\t\t\t\tusw = usw.west();\n\t\t\t\t\t\tdnw = dnw.west();\n\t\t\t\t\t\tdsw = dsw.west();\n\t\t\t\t\t}\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\n\t\t\t\t\tbreak assess;\n\t\t\tcase 5:\t//assume nsWall (East Facing Wall - Western wall of room)\n\t\t\t\t\tunw = pos.up().north();\n\t\t\t\t\tusw = pos.up().south();\n\t\t\t\t\tdnw = pos.down().north();\n\t\t\t\t\tdsw = pos.down().south();\n\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tune = unw.east();\n\t\t\t\t\tuse = usw.east();\n\t\t\t\t\tdne = dnw.east();\n\t\t\t\t\tdse = dsw.east();\n\t\t\t\t\tif((BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\t//First we check the Ceiling and Floor\n\t\t\t\t\t//First, we check Ceiling and Floor\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, usw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.up();\n\t\t\t\t\t\tunw = unw.up();\n\t\t\t\t\t\tuse = use.up();\n\t\t\t\t\t\tusw = usw.up();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, dnw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdne = dne.down();\n\t\t\t\t\t\tdnw = dnw.down();\n\t\t\t\t\t\tdse = dse.down();\n\t\t\t\t\t\tdsw = dsw.down();\n\t\t\t\t\t}\n\t\t\t\t\t//Next we are gonna check the North and South Walls\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, unw) && BlockHelper.isWooden(worldIn, dnw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.north();\n\t\t\t\t\t\tunw = unw.north();\n\t\t\t\t\t\tdne = dne.north();\n\t\t\t\t\t\tdnw = dnw.north();\n\t\t\t\t\t}\n\t\t\t\t\twhile(!BlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, usw) && BlockHelper.isWooden(worldIn, dsw)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuse = use.south();\n\t\t\t\t\t\tusw = usw.south();\n\t\t\t\t\t\tdse = dse.south();\n\t\t\t\t\t\tdsw = dsw.south();\n\t\t\t\t\t}\n\t\t\t\t\t//Finally, we move East!\n\t\t\t\t\twhile(!BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!(BlockHelper.isWooden(worldIn, une) && BlockHelper.isWooden(worldIn, use) && BlockHelper.isWooden(worldIn, dne) && BlockHelper.isWooden(worldIn, dse)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisBuilding = false;\n\t\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tune = une.east();\n\t\t\t\t\t\tuse = use.east();\n\t\t\t\t\t\tdne = dne.east();\n\t\t\t\t\t\tdse = dse.east();\n\t\t\t\t\t}\n\t\t\t\t\tif((BlockHelper.isSolidPlatform(worldIn, une, unw, use, usw) && BlockHelper.isSolidPlatform(worldIn, dne, dnw, dse, dsw) && BlockHelper.isSolidEWWall(worldIn, une, unw, dne, dnw) &&\n\t\t\t\t\t\t\tBlockHelper.isSolidEWWall(worldIn, use, usw, dse, dsw) && BlockHelper.isSolidNSWall(worldIn, une, use, dne, dse) && BlockHelper.isSolidNSWall(worldIn, unw, usw, dnw, dsw)))\n\t\t\t\t\t{\n\t\t\t\t\t\tisBuilding = true;\n\t\t\t\t\t\tbreak assess;\n\t\t\t\t\t}\n\t\t\t\t\tisBuilding = false;\n\t\t\t\t\tbreak assess;\n\t\t}\n\t\tNPCHouse house =new NPCHouse(unw, une, usw, use, dnw, dne, dsw, dse, isBuilding);\n\t\treturn house;\n\t}", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "void doPlaceBuilding() {\r\n\t\tint idx = buildingTable.getSelectedRow();\r\n\t\tif (idx >= 0) {\r\n\t\t\tidx = buildingTable.convertRowIndexToModel(idx);\r\n\t\t\tTileEntry te = buildingTableModel.rows.get(idx);\r\n\t\t\tif (renderer.selectedRectangle != null && renderer.selectedRectangle.width > 0) {\r\n\t\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\t\t\r\n\t\t\t\tRectangle clearRect = new Rectangle(renderer.selectedRectangle);\r\n\t\t\t\tclearRect.width = ((clearRect.width + te.tile.width) / (te.tile.width + 1)) * (te.tile.width + 1) + 1;\r\n\t\t\t\tclearRect.height = ((clearRect.height + te.tile.height) / (te.tile.height + 1)) * (te.tile.height + 1) + 1;\r\n\t\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, clearRect, true);\r\n\t\t\t\t\r\n\t\t\t\tfor (int x = renderer.selectedRectangle.x; x < renderer.selectedRectangle.x + renderer.selectedRectangle.width; x += te.tile.width + 1) {\r\n\t\t\t\t\tfor (int y = renderer.selectedRectangle.y; y > renderer.selectedRectangle.y - renderer.selectedRectangle.height; y -= te.tile.height + 1) {\r\n\t\t\t\t\t\tBuilding bld = new Building(te.buildingType, te.surface);\r\n\t\t\t\t\t\tbld.makeFullyBuilt();\r\n\t\t\t\t\t\tbld.location = Location.of(x + 1, y - 1);\r\n\t\t\t\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\t\t\tplaceTile(te.tile, bld.location.x, bld.location.y, SurfaceEntityType.BUILDING, bld);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tplaceRoads(te.surface);\r\n\t\t\t\tundo.setAfter();\r\n\t\t\t\taddUndo(undo);\r\n\t\t\t\trenderer.repaint();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkCollisionwithMonster() {\n\t\tr1.set(this.getX(),this.getY(),this.getWidth(),this.getHeight());\r\n\t\t\r\n\t\t//check collision with monsters\t\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(TreeMonster treeMon : treeMonArray){\r\n\t\t\t\tif(treeMon.isVisible()){\r\n\t\t\t\t\tr2.set(treeMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\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\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(SlimeMonster slimeMon : slimeMonArray){\r\n\t\t\t\tif(slimeMon.isVisible()){\r\n\t\t\t\t\tr2.set(slimeMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\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\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(FireMonster fireMon : fireMonArray){\r\n\t\t\t\tif(fireMon.isVisible()){\r\n\t\t\t\t\tr2.set(fireMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight parPieceWeight, StructureVillagePieces.Start parStart, List<StructureComponent> parPiecesList, Random parRand, int parMinX, int parMinY, int parMinZ, EnumFacing parFacing, int parType) {\n/* 50 */ System.out.println(\"TekHouse6 buildComponent() at \" + parMinX + \", \" + parMinY + \", \" + parMinZ);\n/* */ \n/* 52 */ StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(parMinX, parMinY, parMinZ, 0, 0, 0, 9, 7, 12, parFacing);\n/* 53 */ return (canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(parPiecesList, structureboundingbox) == null) ? (StructureVillagePieces.Village)new TekHouse6(parStart, parType, parRand, structureboundingbox, parFacing) : null;\n/* */ }", "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "public void buildWall() {\n for (int i = 0; i < worldWidth; i += 1) {\n for (int j = 0; j < worldHeight; j += 1) {\n if (world[i][j].equals(Tileset.NOTHING)\n && isAdjacentFloor(i, j)) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }", "private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}", "private void checkBuildHouse() {\n\t\tdouble moneyToSpend = calculateMoneyToSpend();\n\t\tif(moneyToSpend > 0) {\n\t\t\tArrayList<PropertyCard> cardsToBuildOn = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\tif(isCollectionFull(c)) {\n\t\t\t\t\tcardsToBuildOn.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sorts so that the most expensive properties are at the start\n\t\t\tCollections.sort(cardsToBuildOn, Collections.reverseOrder());\n\t\t\tint moneySpent = 0;\n\t\t\tfor(PropertyCard c: cardsToBuildOn) {\n\t\t\t\twhile(c.getHousePrice()+moneySpent<=moneyToSpend && c.hasSpaceForHouse()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, getName()+ \" built a house on \" + c.getName());\n\t\t\t\t\tbuildHouse(c);\n\t\t\t\t\tmoneySpent+=c.getHousePrice();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}", "public static void CheckArea(double wallSize, Scene scene, Group root)\r\n\t{ //check player area\r\n\t\tfor (int a = 0; a < GenerateMaze.rows; a++){ \r\n\t\t\tfor (int b = 0; b < GenerateMaze.columns; b++){\t\t\t\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 0){ //if player is in open\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"Open\"); //debug open\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 1){ //if player is in wall\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2) && camY >=-wallSize/2){\r\n\t\t\t\t\t\tSystem.out.println(\"Wall\");//debug wall\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tCollision.Collide(GameController.camera, wallSize, b, a, false);\r\n\t\t\t\t\t\tSystem.out.println(\"Wall Collided at: \" + b + \", \" + a);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 3){ //if player is at start\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"At Start\");//debug start\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (GenerateMaze.maze[a][b] == 9){ //if player is at finish\r\n\t\t\t\t\tif (camX >= (a*wallSize) - (wallSize/2) && camX <= (a*wallSize) + (wallSize/2)\r\n\t\t\t\t\t\t\t&& camZ >= (b*wallSize) - (wallSize/2) && camZ <= (b*wallSize) + (wallSize/2)){\r\n\t\t\t\t\t\tSystem.out.println(\"At Finish, maze completed!\");//debug finish\r\n\t\t\t\t\t\t//set record of positions\r\n\t\t\t\t\t\tlocX = b;\r\n\t\t\t\t\t\tlocY = a;\r\n\t\t\t\t\t\tif (lastLocX != locX) lastLocX = locX;\r\n\t\t\t\t\t\tif (lastLocY != locY) lastLocY = locY;\r\n\t\t\t\t\t\tFinished = true; //set finish to true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (camX < 0 && camZ < 0) {\r\n\t\t\tSystem.out.println(\"Player isn't even on map\"); //debug player isn't on map\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Current location: \" + locX + \", \" + locY + \". \"\r\n\t\t\t\t\t+ \"Last Recorded Position: \" + lastLocX + \", \" + lastLocY); //debug player current position in maze\r\n\t\t}\r\n\t}", "public List<Piece> inCheck(int kingX, int kingY){ // returns list of attacking pieces.\n // Also have to look for opponent king to avoid moving into check.\n // In this case only care whether or not a check occurs, not how many so breaks still ok\n // for regular check tests, want to know if 1 or 2 checks, cannot have multiple diagonal checks.\n List<Piece> attackers = new ArrayList<>();\n // knights\n int knight = turn == WHITE ? BLACK_KNIGHT : WHITE_KNIGHT;\n knightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (kingX + dx >= 0 && kingX + dx < 8 && kingY + dy >= 0 && kingY + dy < 8){\n if (board[kingY+dy][kingX+dx] == knight){\n attackers.add(new Piece(knight, kingX+dx, kingY+dy));\n break knightSearch; // can only be checked by 1 knight at a time\n }\n }\n if (kingX + dy >= 0 && kingX + dy < 8 && kingY + dx >= 0 && kingY + dx < 8){\n if (board[kingY+dx][kingX+dy] == knight){\n attackers.add(new Piece(knight, kingX+dy, kingY+dx));\n break knightSearch;\n }\n }\n }\n }\n // bishop/queen/pawn/king\n int pawn = turn == WHITE ? BLACK_PAWN : WHITE_PAWN;\n int bish = turn == WHITE ? BLACK_BISHOP : WHITE_BISHOP;\n int queen = turn == WHITE ? BLACK_QUEEN : WHITE_QUEEN;\n int king = turn == WHITE ? BLACK_KING : WHITE_KING;\n diagSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (kingX + dx*i >= 0 && kingX + dx*i < 8 && kingY + dy*i >= 0 && kingY + dy*i < 8){\n int piece = board[kingY + dy*i][kingX + dx*i];\n if (piece != 0){\n if (piece == bish || piece == queen || (piece == pawn && i == 1 && dy == turn)\n || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY+dy*i));\n break diagSearch;\n }\n break;\n }\n i++;\n }\n }\n }\n // rook/queen/king\n int rook = turn == WHITE ? BLACK_ROOK : WHITE_ROOK;\n straightSearch:\n for (int dx = -1; dx <= 1; dx += 2){\n int i = 1;\n while (kingX + i*dx >= 0 && kingX + i*dx < 8){\n int piece = board[kingY][kingX + dx*i];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX+dx*i, kingY));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n i = 1;\n while (kingY + i*dx >= 0 && kingY + i*dx < 8){\n int piece = board[kingY+dx*i][kingX];\n if (piece != 0){\n if (piece == rook || piece == queen || (piece == king && i == 1)){\n attackers.add(new Piece(piece, kingX, kingY+dx*i));\n break straightSearch;\n }\n break;\n }\n i++;\n }\n }\n return attackers;\n }", "public void buildingPipeCheck(int x, int y, Building m){\r\n\r\n\t\tItem item=null;\r\n\t\t//find an item to send to pipe\r\n\t\tfor(int k=0;k<m.getOutputInventorySize();k++) {\r\n\t\t\t//check for items in the inventory\r\n\t\t\tif(m.getOutputItem(k)!=null) {\r\n\t\t\t\titem=m.getOutputItem(k);\r\n\t\t\t\tk=99; //leave the for loop\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//only check for pipes if there is an item in question\r\n\t\tif(item!=null) {\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (x-1>=0) && (tileMap[x-1][y].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x-1][y].getBuilding()).getInput().equals(\"right\")) ) {\t\t\t\t\r\n\t\t\t\tBuilding pipe= tileMap[x-1][y].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t} \r\n\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (x+1<201) && (tileMap[x+1][y].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x+1][y].getBuilding()).getInput().equals(\"left\")) ) {\r\n\r\n\t\t\t\tBuilding pipe= tileMap[x+1][y].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (y-1>=0) && (tileMap[x][y-1].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x][y-1].getBuilding()).getInput().equals(\"down\")) ) {\r\n\r\n\t\t\t\tBuilding pipe= tileMap[x][y-1].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif( (y+1<201) && (tileMap[x][y+1].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x][y+1].getBuilding()).getInput().equals(\"up\")) ) {\r\n\r\n\t\t\t\tSystem.out.println(\"pipe found\");\r\n\t\t\t\tBuilding pipe= tileMap[x][y+1].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean itemonfloor(){\n\t\tint XI = 0;\n\t\tint YI = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length;p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tYI = i;\n\t\t\t\t\tXI = p;\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(YI==Yyou && XI==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean check(boolean isWhite) {\n Tile kingTile = null;\n ArrayList<Position> opponentMoves = new ArrayList<>();\n // find king's tile and populate opponent moves\n for (Tile[] t : this.board) {\n for (Tile tile : t) {\n if (tile.piece instanceof King && tile.piece.isWhite() == isWhite) {\n kingTile = tile;\n }\n if (tile.hasPiece && tile.piece.isWhite() != isWhite) {\n for(Position move : tile.piece.getLegalMoves()) opponentMoves.add(move);\n }\n }\n }\n // compare every position with king's position\n for (Position opponentMove : opponentMoves) {\n if (opponentMove.equals(kingTile.position)) {\n return true;\n }\n }\n return false;\n }", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "void check(){\n if(!data.up.isEmpty()){\r\n if(data.floor == data.up.get(0)){\r\n data.up.remove(0);\r\n data.state = 0;\r\n data.statePrv = 1;\r\n data.isMoving = false;\r\n }\r\n }\r\n if(!data.down.isEmpty()){\r\n if(data.floor == data.down.get(0)){\r\n data.down.remove(0);\r\n data.state = 0;\r\n data.statePrv = -1;\r\n data.isMoving = false;\r\n }\r\n }\r\n }", "void deleteEntitiesOf(Map<Location, SurfaceEntity> map, Rectangle rect, boolean checkBuildings) {\r\n\t\t// find buildings falling into the selection box\r\n\t\tif (rect != null) {\r\n\t\t\tBuilding bld = null;\r\n\t\t\tfor (int a = rect.x; a < rect.x + rect.width; a++) {\r\n\t\t\t\tfor (int b = rect.y; b > rect.y - rect.height; b--) {\r\n\t\t\t\t\tSurfaceEntity se = map.get(Location.of(a, b));\r\n\t\t\t\t\tif (se != null) {\r\n\t\t\t\t\t\tint x = a - se.virtualColumn;\r\n\t\t\t\t\t\tint y = b + se.virtualRow;\r\n\t\t\t\t\t\tfor (int x0 = x; x0 < x + se.tile.width; x0++) {\r\n\t\t\t\t\t\t\tfor (int y0 = y; y0 > y - se.tile.height; y0--) {\r\n\t\t\t\t\t\t\t\tmap.remove(Location.of(x0, y0));\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\tif (checkBuildings) {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.buildings.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tbld = renderer.surface.buildings.get(i);\r\n\t\t\t\t\t\t\tif (bld.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.buildings.remove(i);\r\n\t\t\t\t\t\t\t\tif (bld == currentBuilding) {\r\n\t\t\t\t\t\t\t\t\trenderer.buildingBox = null;\r\n\t\t\t\t\t\t\t\t\tcurrentBuilding = null;\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} else {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.features.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tSurfaceFeature sf = renderer.surface.features.get(i);\r\n\t\t\t\t\t\t\tif (sf.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.features.remove(i);\r\n\t\t\t\t\t\t\t\tif (sf.equals(currentBaseTile)) {\r\n\t\t\t\t\t\t\t\t\tcurrentBaseTile = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (checkBuildings && bld != null) {\r\n\t\t\t\tplaceRoads(bld.techId);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "public void pipeCheck(int x, int y, Building pipe) {\t\r\n\t\tif(pipe.getInputItem(0)!=null) {\r\n\r\n\r\n\t\t\t//make variable for item in pipe\r\n\t\t\tItem pipeItem=pipe.getInputItem(0);\r\n\r\n\t\t\t//If the pipes output is upwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"left\")) {\r\n\r\n\t\t\t\t//error check\r\n\t\t\t\tif(x-1>=0) {\r\n\t\t\t\t\t//Check if it can send items up and if its a pipe\r\n\t\t\t\t\tif((tileMap[x-1][y].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x-1][y].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"right\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x-1][y].getBuilding()!=null) && (tileMap[x-1][y].getBuilding().getInputInventorySize()>0)) {\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x-1][y].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x-1][y].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y+1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\t\t\t//If the pipes output is downwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"right\")) {\r\n\r\n\t\t\t\tif(x+1<201){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x+1][y].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x+1][y].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is up\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"left\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x+1][y].getBuilding()!=null) && (tileMap[x+1][y].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x+1][y].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x+1][y].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x+1][y].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\r\n\t\t\t//If the pipes output is left\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"up\")) {\r\n\r\n\r\n\t\t\t\tif (y-1>=0){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x][y-1].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x][y-1].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"down\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x][y-1].getBuilding()!=null) && (tileMap[x][y-1].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x][y-1].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x][y-1].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y-1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\t\t\t//If the pipes output is downwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"down\")) {\r\n\r\n\r\n\t\t\t\tif(y+1<201){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x][y+1].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x][y+1].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"up\")) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"ffound pipe\");\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x][y+1].getBuilding()!=null) && (tileMap[x][y+1].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x][y+1].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x][y+1].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y+1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\t\t}//end of null item if\r\n\t}", "public boolean check(double xDelt,double yDelt) {\r\n \tBounds pBound= player1.player.getBoundsInParent();\r\n \t\r\n \tfor( Node object: enemy1.hostileG.getChildren()) {\r\n \t\t\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\t\teHealth -= inventory.getpDamage();\r\n \t\t\tpHealth -= 1;\r\n\r\n \t\t\tSystem.out.println(\"eHealth \"+ eHealth);\r\n \t\t\tSystem.out.println(\"pHealth \"+ pHealth);\r\n \t\t\t\r\n \t\t\t//\"Deaths of the sprites\"\r\n \t\t\tif(pHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(player1.player);\r\n \t\t\t\tSystem.out.println(\"You died!\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(eHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(enemy1.enemy);\r\n \t\t\t\tenemy1.enemy.setLayoutX(-10000);\r\n \t\t\t\tenemy1.enemy.setLayoutY(-10000);\r\n \t\t\t}\r\n \t\treturn false;\r\n \t\t}\r\n }\r\n \t\r\n \tfor( Node object: map1.walls.getChildren()) {\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())) return false;\r\n \t}\r\n \t\r\n \tfor( Node chest: map1.chests.getChildren()) {\r\n \tif(chest.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\tmap1.chests.getChildren().remove(chest);\r\n \t chestchose=inventory.getchestchose();\r\n \t \r\n \t if(chestchose==1) {\r\n \t \tinventory.sworda.setVisible(true);\r\n \t \tinventory.setpDamage(3);\r\n \t }\r\n \t if(chestchose==2) {\r\n \t \tinventory.healthbag.setVisible(true);\r\n \t }\r\n \t \r\n \t return false;\r\n \t} \r\n }\t\r\n \t\r\n return true;\r\n }", "public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final boolean hasOnePerTileItem(int floorLevel) {\n/* 4849 */ return (this.vitems != null && this.vitems.hasOnePerTileItem(floorLevel));\n/* */ }", "private void checkIfOccupied(int row, int col) {\n if (status == MotionStatus.DOWN || AIisAttacking) {\n\n// if (player && playerAttacks != null) {\n// // Ignore touch if player has previously committed an attack on that cell.\n// for (int i = 0; i < playerAttacks.size(); i++) {\n// if (playerAttacks.get(i).equals(row,col)) {\n// Log.i(\"for\", \"You Hit this Previously!\");\n// }\n// }\n// }\n\n for (int i = 0; i < occupiedCells.size(); i++) {\n if (occupiedCells.get(i).x == row && occupiedCells.get(i).y == col) {\n Point p = new Point(row, col);\n selectedShip = findWhichShip(p); //Touching View Updated\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n setHit(true);\n break;\n }\n }\n\n if (selectedShip == null) {\n setHit(false);\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n }\n\n } else if (status == MotionStatus.MOVE) {//MotionStatus.MOVE\n if (selectedShip != null) {//Need to make sure none of the current ship parts will overlap another.\n int rowHolder = selectedShip.getHeadCoordinatePoint().x;\n int colHolder = selectedShip.getHeadCoordinatePoint().y;\n int tempRow, tempCol;\n selectedShip.moveShipTo(row, col);\n for (Ship s : ships) {\n if (s != selectedShip) {\n\n for (int i = 0; i < selectedShip.getShipSize(); i++) {\n tempRow = selectedShip.getBodyLocationPoints()[i].x;\n tempCol = selectedShip.getBodyLocationPoints()[i].y;\n\n for (int j = 0; j < s.getShipSize(); j++) {\n if (tempRow == s.getBodyLocationPoints()[j].x && tempCol == s.getBodyLocationPoints()[j].y) {\n selectedShip.moveShipTo(rowHolder, colHolder);\n }\n }//for\n }//for\n }\n }//for\n }\n }//Move\n }", "private boolean buildEntity() {\r\n\t\t/****************** Tower Creation ******************/\r\n\t\tif (this.type.contains(\"tower\")) {\r\n\t\t\tif (this.type.equals(\"tower0\")) {\r\n\t\t\t\t// Basic starting tower\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.speed = 2;\r\n\t\t\t\tthis.health = 500;\r\n\t\t\t\tthis.attack = 0;\r\n\t\t\t\tthis.price = 110;\r\n\t\t\t\tthis.frames = 1;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"tower1\")) {\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.speed = 1;\r\n\t\t\t\tthis.health = 90;\r\n\t\t\t\tthis.attack = 30;\r\n\t\t\t\tthis.price = 50;\r\n\t\t\t\tthis.frames = 5;\r\n\t\t\t\tthis.weaponFrames = 1;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"tower2\")) {\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.health = 160;\r\n\t\t\t\tthis.attack = 25;\r\n\t\t\t\tthis.price = 210;\r\n\t\t\t\tthis.frames = 6;\r\n\t\t\t\tthis.speed = 1;\r\n\t\t\t\tthis.weaponFrames = 8;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"tower3\")) {\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.health = 245;\r\n\t\t\t\tthis.attack = 25;\r\n\t\t\t\tthis.price = 245;\r\n\t\t\t\tthis.speed = 1;\r\n\t\t\t\tthis.frames = 9;\r\n\t\t\t\tthis.weaponFrames =1;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"tower4\")) {\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.speed = 1;\r\n\t\t\t\tthis.health = 200;\r\n\t\t\t\tthis.attack = 3000;\r\n\t\t\t\tthis.price = 500;\r\n\t\t\t\tthis.frames = 9;\r\n\t\t\t\tthis.weaponFrames = 8;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"tower5\")) {\r\n\t\t\t\tthis.base = \"tower\";\r\n\t\t\t\tthis.weaponFrames = 3;\r\n\t\t\t\tthis.health = 100;\r\n\t\t\t\tthis.attack = 25;\r\n\t\t\t\tthis.price = 90;\r\n\t\t\t\tthis.speed = 1;\r\n\t\t\t\tthis.frames = 7;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/****************** Enemy Creation ******************/\r\n\t\tif (this.type.contains(\"zombie\")) {\r\n\t\t\tif (this.type.equals(\"zombie0\")) {\r\n\t\t\t\tthis.base = \"zombie\";\r\n\t\t\t\tthis.health = 150;\r\n\t\t\t\tthis.attack = 5;\r\n\t\t\t\tthis.speed = 75;\r\n\t\t\t\tthis.deathFrames = 9;\r\n\t\t\t\tthis.walkFrames = 9;\r\n\t\t\t\tthis.attackFrames =7;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"zombie1\")) {\r\n\t\t\t\tthis.base = \"zombie\";\r\n\t\t\t\tthis.health = 500;\r\n\t\t\t\tthis.attack = 5;\r\n\t\t\t\tthis.speed = 50;\r\n\t\t\t\tthis.deathFrames = 5;\r\n\t\t\t\tthis.walkFrames = 6;\r\n\t\t\t\tthis.attackFrames =8;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"zombie2\")) {\r\n\t\t\t\tthis.base = \"zombie\";\r\n\t\t\t\tthis.health = 250;\r\n\t\t\t\tthis.attack = 5;\r\n\t\t\t\tthis.speed = 50;\r\n\t\t\t\tthis.deathFrames = 5;\r\n\t\t\t\tthis.walkFrames = 6;\r\n\t\t\t\tthis.attackFrames =7;\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"zombie3\")) {\r\n\t\t\t\tthis.base = \"zombie\";\r\n\t\t\t\tthis.health = 100;\r\n\t\t\t\tthis.attack = 25;\r\n\t\t\t\tthis.speed = 25;\r\n\t\t\t\tthis.deathFrames = 5;\r\n\t\t\t\tthis.walkFrames = 8;\r\n\t\t\t\tthis.attackFrames =7;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/****************** Object Creation ******************/\r\n\t\tif (this.type.contains(\"object\")) {\r\n\t\t\tif (this.type.equals(\"object0\")) {\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object1\")) {\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object2\")) {\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object3\")) {\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object4\")) {\r\n\t\t\t\t// Jail building\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object5\")) {\r\n\t\t\t\t// Inn building\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object6\")) {\r\n\t\t\t\t// Bar building\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object7\")) {\r\n\t\t\t\t// Watchtower building\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object8\")) {\r\n\t\t\t\t// Plus path\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object9\")) {\r\n\t\t\t\t// NS Path\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object10\")) {\r\n\t\t\t\t// EW Path\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object11\")) {\r\n\t\t\t\t// Cobble Ground\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object12\")) {\r\n\t\t\t\t// Tombstone with dirt\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object13\")) {\r\n\t\t\t\t// Tombstone\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t\telse if (this.type.equals(\"object14\")) {\r\n\t\t\t\t// Wood grave marker\r\n\t\t\t\tthis.base = \"object\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/****************** Out of Creation ******************/\r\n\t\t// Check if a type was created and return results\r\n\t\tif (this.base != null) {\r\n\t\t\t// Successful creation\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t// Unsuccessful creation\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean kingCheck(ArrayList<Piece> pieces) {\r\n boolean check = false;\r\n int[] kingCoords = new int[]{this.getX(), this.getY()};\r\n\r\n for (Piece piece : pieces) {\r\n if (piece.getColor() != this.getColor()) { // If the color does not match the king's color...\r\n for (int[] coordinate : piece.range) {\r\n if (coordinate[0] == kingCoords[0] && coordinate[1] == kingCoords[1]) { // Checks to see if the king is in range of enemy pieces\r\n check = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return check;\r\n }", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "boolean isLegal(String move) {\n int[][] theStatusBoard;\n if (_playerOnMove == ORANGE) {\n theStatusBoard = _orangeStatusBoard;\n } else {\n theStatusBoard = _violetStatusBoard;\n }\n Pieces thispiece = new Pieces();\n String piecename = move.substring(0, 1);\n int col = getCoordinate(move.substring(1, 2));\n int row = getCoordinate(move.substring(2, 3));\n int ori = Integer.parseInt(move.substring(3, 4));\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 if (row + depth - 1 > 13 || col + length - 1 > 13) {\n System.out.println(\"Your move makes your piece out of the board, try again!\");\n return false;\n }\n\n boolean has1 = false;\n boolean no2 = true;\n\n int i, j;\n for (i = 0; i < depth; i++) {\n for (j = 0; j < length; j++) {\n if (finalPositions[i][j] == 1) {\n if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 1) {\n has1 = true;\n } else if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 2) {\n return false;\n }\n }\n }\n }\n System.out.println(\"has1: \" + has1);\n return has1;\n }", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "@Test\r\n public void testBuildingPlaceOverlap(){\r\n BetterHelper h = new BetterHelper();\r\n LoopManiaWorld world = h.testWorld;\r\n \r\n world.loadCard(\"ZombiePitCard\");\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 1, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 1, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 5, 5));\r\n }", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public boolean buildBuilding(String buildingType) {\n\t\tString type = buildingType.toLowerCase();\n\t\tthis.gc.placeBuilding(type);\n\n\t\tboolean placementSuccesfull = this.gc.isPlacementSuccesfull();\n\n\t\treturn placementSuccesfull;\n\n\t}", "boolean testIsTouchingIGamePiece(Tester t) {\n return t.checkExpect(los2.isTouching(ship2), false)\n && t.checkExpect(los3.isTouching(bullet8), true)\n && t.checkExpect(lob2.isTouching(ship2), true)\n && t.checkExpect(lob3.isTouching(ship11), false)\n && t.checkExpect(lob3.isTouching(ship3), true)\n && t.checkExpect(mt.isTouching(ship6), false);\n }", "public void addSubbedTile(Tile t) { subbedTiles.add(t); }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "private boolean canEntityBuild(User user, Location location) {\n Collection<TownBlock> blocks = TownyUniverse.getInstance().getDataSource().getAllTownBlocks();\n\n int x = (int)Math.floor(location.getX() / 16.0);\n int z = (int)Math.floor(location.getZ() / 16.0);\n\n TownyWorld world;\n try {\n world = TownyUniverse.getInstance().getDataSource().getWorld(location.getWorld().getName());\n } catch (Exception e) {\n return true;\n }\n\n TownBlock block = new TownBlock(x, z, world);\n\n return !blocks.contains(block);\n }", "public boolean checkPowerLine(int x,int y,int radius) {\r\n\r\n\t\tfor(int k=1;k<radius+1;k++) { //Add power to tiles around building if its possible\r\n\r\n\t\t\t//Checks to see if tiles around it can be checked first\r\n\t\t\tif(x-k>=0) {\r\n\t\t\t\tBuilding m=tileMap[x-k][y].getBuilding();\r\n\r\n\t\t\t\t//If a acceptable power generating building is near the power line then it is considered powered as well;\r\n\t\t\t\tif( (m instanceof PowerLine) || (m instanceof LargePowerLine) || (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\t\t\t\t\tif(((PoweredBuilding) m).getPower()) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[x][y].getBuilding()).setPower(true); //Enable if has power\r\n\t\t\t\t\t\treturn true; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tif(x+k<201) {\r\n\t\t\t\tBuilding m =tileMap[x+k][y].getBuilding();\r\n\r\n\t\t\t\t//If a acceptable power generating building is near the power line then it is considered powered as well\r\n\t\t\t\tif( (m instanceof PowerLine) || (m instanceof LargePowerLine) || (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\t\t\t\t\tif(((PoweredBuilding) m).getPower()) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[x][y].getBuilding()).setPower(true); //Enable if has power\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(y-k>=0) {\r\n\t\t\t\tBuilding m=tileMap[x][y-k].getBuilding();\r\n\r\n\t\t\t\t//If a acceptable power generating building is near the power line then it is considered powered as well\r\n\t\t\t\tif( (m instanceof PowerLine) || (m instanceof LargePowerLine) || (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\t\t\t\t\tif(((PoweredBuilding) m).getPower()) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[x][y].getBuilding()).setPower(true); //Enable if has power\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif(y+k<201) {\r\n\t\t\t\tBuilding m=tileMap[x][y+k].getBuilding();\r\n\r\n\t\t\t\t//If a acceptable power generating building is near the power line then it is considered powered as well\r\n\t\t\t\tif( (m instanceof PowerLine) || (m instanceof LargePowerLine) || (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\t\t\t\t\tif(((PoweredBuilding) m).getPower()) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[x][y].getBuilding()).setPower(true); //Enable if has power\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t((PoweredBuilding) tileMap[x][y].getBuilding()).setPower(false); //Disable it since no power was found\r\n\t\treturn false; //Return false if no power source was found\r\n\t}", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "public boolean canBuild(Location location, Player player) {\n if (!location.getWorld().getEnvironment().equals(Environment.NORMAL)) {\n // If theyre not in the overworld, they cant build\n return false;\n } else if (landIsClaimed(location)) {\n if(isOwner(location,player)) {\n return true;\n } else if(landPermissionCode(location).equals(\"p\")) {\n return true;\n } else if(landPermissionCode(location).equals(\"c\")) {\n String owner_uuid=REDIS.get(\"chunk\" + location.getChunk().getX() + \",\" + location.getChunk().getZ() + \"owner\");\n String owner_clan=REDIS.get(\"clan:\"+owner_uuid);\n String player_clan=REDIS.get(\"clan:\"+player.getUniqueId().toString());\n if(owner_clan.equals(player_clan)) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return true;\n }\n }", "public int checksStatus(int indexX, int indexY) {\n if (allTiles[indexX][indexY].getType() == 10) {\n return -1;\n }\n int numOfCoveredTiles = 0;\n\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (allTiles[i][j].isCover() == true)\n numOfCoveredTiles++;\n }\n }\n\n if (numOfCoveredTiles==bombs)\n return 1;\n return 0;\n }", "public boolean canBuild(int numToBuild) \n\t{\n\t\t return (numBuildings+numToBuild) <= MAX_NUM_UNITS;\n\t}", "@Test\n public void isCollidingTestBodyOfInnerFor(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,200);\n assertTrue(tileMap.isColliding(cBox));\n assertEquals(true, tileMap.isColliding(cBox));\n }", "public boolean isInsideTile(int x, int y){\n\t\treturn (x >= tileX && x <= tileX+tileImage.getWidth() && y >= tileY && y <= tileY+tileImage.getHeight());\n\t}", "public void update(ResourcesMap resourcemap, TileSelector tileselector, List<Building> buildings) {\n\t\tthis.tileSelector = tileselector;\n\t\tthis.resourceMap = resourcemap;\n\t\tthis.infoString = \"\";\n\t\tthis.range.setRadius(0);\n\t\t\n\t\tthis.position = new Vector2i(this.tileSelector.selectedTile.x,this.tileSelector.selectedTile.y);\n\t\tthis.actualTile = this.tileMap.get(position.y).get(position.x);\n\t\t\n\t\t// show Tile info\n\t\tthis.infoString += \"Tile position : {\" + position.x + \", \" + position.y + \"}\\n\";\n\t\tthis.infoString += \"TILE_TYPE : \" + this.actualTile.getTileType().toString() + \"\\n\";\n\t\tfor(Resource.ResourceType resource : Resource.ResourceType.values()) {\n\t\t\tif(resourcemap.getResources(this.position.x, this.position.y).get(resource) > 0) {\n\t\t\t\tthis.infoString += \"\\t\" + resource.toString() + \" : \" + resourcemap.getResources(this.position.x, this.position.y).get(resource) + \"\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// show Building info\n\t\tfor(Building b : buildings) {\n\t\t\tif(b.getHitbox().contains(position)) {\n\t\t\t\tthis.building = b;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(this.building != null) {\n\t\t\tthis.infoString += \"BUILDING_NAME : \" + this.building.getType().toString() + \"[\" + this.building.getId() + \"] \\n\";\n\t\t\tthis.infoString += \"Level : \" + this.building.getLevel() + \"\\n\";\n\t\t\t\n\t\t\t// Get the resources available for the building.\n\t\t\tResourcesStack availableResources = new ResourcesStack();\n\t\t\t\n\t\t\tfor(int x = this.building.getHitbox().left ; x < this.building.getHitbox().left + this.building.getHitbox().width ; ++x) {\n\t\t\t\tfor(int y = this.building.getHitbox().top ; y < this.building.getHitbox().top + this.building.getHitbox().height ; ++y) {\n\t\t\t\t\tavailableResources.add(resourcemap.getResources(new Vector2i(x, y)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(Resource.ResourceType resource : Resource.ResourceType.values()) {\n\t\t\t\t// show %\n\t\t\t\tfor(Need need : this.building.getNeeds()) {\n\t\t\t\t\tif(need.type.equals(resource)){\n\t\t\t\t\t\tthis.infoString += \"\\t\" + resource.toString() + \" : \" + availableResources.get(resource);\n\t\t\t\t\t\tthis.infoString += \" : \" + (int)((availableResources.get(resource) / need.amount) * 100) + \" %\";\n\t\t\t\t\t\tthis.infoString += \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.infoString += \"Halted : \" + this.building.isHalted() + \"\\n\";\n\t\t\t\n\t\t\tthis.infoString += \"Inhabitants : \" + this.building.getInhabitants().size();\n\t\t\tif(this.building.getUnemployedInhabitantCount() != -1)\n\t\t\t\tthis.infoString += \" (\" + this.building.getUnemployedInhabitantCount() + \" unemployed)\";\n\t\t\tthis.infoString += \"\\n\";\n\t\t\t\n\t\t\tthis.infoString += \"Clients : \" + this.building.getClients().size() + \"\\n\";\n\t\t\tthis.infoString += \"Employees : \" + this.building.getEmployees().size() + \"\\n\";\n\t\t}\n\t\t\n\t\t// we set the text\n\t\tthis.infoText.setString(infoString);\n\t\tthis.infoText.setPosition(this.position.x*16 +20, this.position.y*16 +20);\n\t\t\n\t\t// we set the rectangle\n\t\tthis.rectangleShape.setPosition(this.position.x *16, this.position.y*16);\n\t\tthis.rectangleShape.setSize(new Vector2f(this.infoText.getGlobalBounds().width + 30,this.infoText.getGlobalBounds().height + 30));\n\t\t\n\t\t// we set the range\n\t\tif(this.building != null) {\n\t\t\tthis.range.setPosition(this.building.getHitbox().left * 16 + this.building.getHitbox().width * 8, this.building.getHitbox().top * 16 + this.building.getHitbox().height * 8);\n\t\t\tthis.range.setRadius(this.building.getHitbox().width * 8 + this.building.getRange() * 16);\n\t\t\tthis.range.setOrigin((this.range.getLocalBounds().left + this.range.getLocalBounds().width) / 2.f, (this.range.getLocalBounds().top + this.range.getLocalBounds().height) / 2.f);\n\t\t}\n\t\t\n\t\t// we reset the building\n\t\tthis.building = null;\n\t\t\n\t}", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public static boolean isEveryTileFilled() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (tiles.get(new Coordinates(i, j)).getTextFromTile().getText().equals(\"\")) {\n return false;\n }\n }\n }\n return true;\n }", "public static boolean isLegal(int[][] board) {\nif (!isRectangleLegal(board, 0, 2, 0, 2, \"Block 1\")) return false;\nif (!isRectangleLegal(board, 3, 5, 0, 2, \"Block 2\")) return false;\nif (!isRectangleLegal(board, 6, 8, 0, 2, \"Block 3\")) return false;\nif (!isRectangleLegal(board, 0, 2, 3, 5, \"Block 4\")) return false;\nif (!isRectangleLegal(board, 3, 5, 3, 5, \"Block 5\")) return false;\nif (!isRectangleLegal(board, 6, 8, 3, 5, \"Block 6\")) return false;\nif (!isRectangleLegal(board, 0, 2, 6, 8, \"Block 7\")) return false;\nif (!isRectangleLegal(board, 3, 5, 6, 8, \"Block 8\")) return false;\nif (!isRectangleLegal(board, 6, 8, 6, 8, \"Block 9\")) return false;\n \n// check the nine columns\nif (!isRectangleLegal(board, 0, 0, 0, 8, \"Column 0\")) return false;\nif (!isRectangleLegal(board, 1, 1, 0, 8, \"Column 1\")) return false;\nif (!isRectangleLegal(board, 2, 2, 0, 8, \"Column 2\")) return false;\nif (!isRectangleLegal(board, 3, 3, 0, 8, \"Column 3\")) return false;\nif (!isRectangleLegal(board, 4, 4, 0, 8, \"Column 4\")) return false;\nif (!isRectangleLegal(board, 5, 5, 0, 8, \"Column 5\")) return false;\nif (!isRectangleLegal(board, 6, 6, 0, 8, \"Column 6\")) return false;\nif (!isRectangleLegal(board, 7, 7, 0, 8, \"Column 7\")) return false;\nif (!isRectangleLegal(board, 8, 8, 0, 8, \"Column 8\")) return false;\n \n// check the nine rows\nif (!isRectangleLegal(board, 0, 8, 0, 0, \"Row 0\")) return false;\nif (!isRectangleLegal(board, 0, 8, 1, 1, \"Row 1\")) return false;\nif (!isRectangleLegal(board, 0, 8, 2, 2, \"Row 2\")) return false;\nif (!isRectangleLegal(board, 0, 8, 3, 3, \"Row 3\")) return false;\nif (!isRectangleLegal(board, 0, 8, 4, 4, \"Row 4\")) return false;\nif (!isRectangleLegal(board, 0, 8, 5, 5, \"Row 5\")) return false;\nif (!isRectangleLegal(board, 0, 8, 6, 6, \"Row 6\")) return false;\nif (!isRectangleLegal(board, 0, 8, 7, 7, \"Row 7\")) return false;\nif (!isRectangleLegal(board, 0, 8, 8, 8, \"Row 8\")) return false;\nreturn true;\n }", "protected void checkForWalls(int x, int y, ArrayList<Position> walls) {\n int x1 = x - 1;\n int x2 = x + 2;\n int y1 = y - 1;\n int y2 = y + 2;\n\n if (x == 0) // We want to avoid an OutOfBounds exception\n x1 = x;\n if (x == sizeOfFloor - 1)\n x2 = sizeOfFloor;\n if (y == 0)\n y1 = y;\n if (y == sizeOfFloor - 1)\n y2 = sizeOfFloor;\n\n\n for (int i = x1; i < x2; i++) {\n for (int j = y1; j < y2; j++) {\n if (layout[i][j].getContent() == 'a')\n walls.add(layout[i][j]);\n }\n }\n }", "public boolean canMove(int forX , int forY)\n {\n\n\n int tankX = locX + width/2;\n int tankY = locY + height/2;\n\n\n for(WallMulti wall : walls)\n {\n if(wall.getType().equals(\"H\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = ((wall.getX()+wall.getLength())-tankX)*((wall.getX()+wall.getLength())-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disEnd<=1700)\n {\n int dis2 = ((wall.getX()+wall.getLength())-(tankX+forX))*((wall.getX()+wall.getLength())-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n if(tankX >= wall.getX() && tankX <= (wall.getX() + wall.getLength()))\n {\n //tank upper than wall\n if( tankY+20 < wall.getY() && wall.getY()-(tankY+40)<=20 )\n {\n if( wall.getY() <= (tankY+20 + forY) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankY-35) > wall.getY() && (tankY-35)-wall.getY()<=25 )\n {\n if( wall.getY() >= (tankY - 35 + forY) )\n {\n return false;\n }\n }\n }\n }\n\n if(wall.getType().equals(\"V\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = (wall.getX()-tankX)*(wall.getX()-tankX) + ((wall.getY()+wall.getLength())-tankY)*((wall.getY()+wall.getLength())-tankY);\n if(disEnd<=3600)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + ((wall.getY()+wall.getLength())-(tankY+forY))*((wall.getY()+wall.getLength())-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n\n if(tankY >= wall.getY() && tankY <= (wall.getY() + wall.getLength()))\n {\n //tank at the left side of the wall\n if( tankX+20 < wall.getX() && wall.getX()-(tankX+40)<=20 )\n {\n if( wall.getX() <= (tankX+20 + forX) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankX-35) > wall.getX() && (tankX-35)-wall.getX()<=25 )\n {\n if( wall.getX() >= (tankX - 35 + forX) )\n {\n return false;\n }\n }\n }\n }\n }\n return true;\n }", "public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}", "protected boolean selectTile(String player, int coordinate, String area, MBproduction.buildingType build){\n String culture = null;\n boolean AIflag = false;\n boolean placeFlag = false;\n MBproduction.terrainTypeEnum selected;\n String normalizeSelected;\n /*******************************/\n player=player.toLowerCase();\n switch(player.toLowerCase()){\n case\"human\":\n culture = playBoard.humanCulture();\n break;\n case\"ai1\":\n culture = playBoard.AICulture1();\n break;\n case\"ai2\":\n culture = playBoard.AICulture2();\n break;\n default:\n break;\n }\n selected = playBoard.getIndiTerrain(coordinate);\n normalizeSelected = \n selected.toString().substring(0, selected.toString().length()-1);\n switch(culture.toLowerCase()){\n //norse\n case\"norse\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < norseProduction.size(); i ++){\n if (norseProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n norseProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n norseProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < norseCity.size(); i ++){\n if (norseCity.get(i).getIcon() == null){\n norseCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n }\n }\n break;\n default:\n break;\n }\n break;\n //greek \n case\"greek\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < greekProduction.size(); i ++){\n if (greekProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n greekProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n greekProduction.remove(i);\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected); \n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break;\n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < greekCity.size(); i ++){\n if (greekCity.get(i).getIcon() == null){\n greekCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n //egypt\n case\"egypt\":\n switch(area.toLowerCase()){\n case\"production\":\n for (int i = 0; i < egyptProduction.size(); i ++){\n if (egyptProduction.get(i).getName().equalsIgnoreCase(normalizeSelected)){\n egyptProduction.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(selected.getPath())));\n playBoard.updateProductionResourceCube(player, selected);\n playBoard.exileTerrain(selected);\n egyptProduction.remove(i);\n tileSelection.get(coordinate).setEnabled(false);\n stackAI.remove(stackAI.indexOf(coordinate));\n placeFlag = true;AIflag = true;\n break; \n }\n }\n break;\n //!!!!!!!!WARNNING!!!!!!!! NEED TO MODIFY FOR ITERATION II\n case\"city\":\n for (int i = 0; i < egyptCity.size(); i ++){\n if (egyptCity.get(i).getIcon() == null){\n egyptCity.get(i).setIcon(new javax.swing.ImageIcon(\n getClass().getResource(build.getPath())));\n placeFlag = true;\n break;\n } \n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n if ((!placeFlag)&&(player.equalsIgnoreCase(\"human\"))){\n JOptionPane.showMessageDialog(\n null, \"No suitable tile for \" + player , \"Information\",\n JOptionPane.WARNING_MESSAGE);\n }\n return AIflag; \n }", "public boolean work() {\n // get the next block so the cart knows where to mine\n Vec3 next = getNextblock();\n // save thee coordinates for easy access\n int x = (int) next.xCoord;\n int y = (int) next.yCoord;\n int z = (int) next.zCoord;\n\n // loop through the blocks in the \"hole\" in front of the cart\n\n for (int i = -getRange(); i <= getRange(); i++) {\n for (int j = -getRange(); j <= getRange(); j++) {\n // calculate the coordinates of this \"hole\"\n int coordX = x + i;\n int coordY = y - 1;\n int coordZ = z + j;\n\n if (farm(coordX, coordY, coordZ)) {\n return true;\n } else if (till(coordX, coordY, coordZ)) {\n return true;\n } else if (plant(coordX, coordY, coordZ)) {\n return true;\n }\n }\n }\n\n return false;\n }", "void doCopy(boolean surface, boolean building) {\r\n\t\tif (renderer.surface == null || renderer.selectedRectangle == null || renderer.selectedRectangle.width == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter out = new PrintWriter(sw);\r\n\t\t\r\n\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\tout.printf(\"<map x='%d' y='%d' width='%d' height='%d'>%n\", renderer.selectedRectangle.x, renderer.selectedRectangle.y, renderer.selectedRectangle.width, renderer.selectedRectangle.height);\r\n\t\t\r\n\t\tMap<Object, Object> memory = new IdentityHashMap<Object, Object>();\r\n\t\tfor (int i = renderer.selectedRectangle.x; i < renderer.selectedRectangle.x + renderer.selectedRectangle.width; i++) {\r\n\t\t\tfor (int j = renderer.selectedRectangle.y; j > renderer.selectedRectangle.y - renderer.selectedRectangle.height; j--) {\r\n\t\t\t\tif (surface) {\r\n\t\t\t\t\tfor (SurfaceFeature sf : renderer.surface.features) {\r\n\t\t\t\t\t\tif (sf.containsLocation(i, j)) {\r\n\t\t\t\t\t\t\tif (memory.put(sf, sf) == null) {\r\n\t\t\t\t\t\t\t\tout.printf(\" <tile x='%d' y='%d' id='%s' type='%s'/>%n\", sf.location.x, sf.location.y, sf.id, sf.type);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (building) {\r\n\t\t\t\t\tfor (Building b : renderer.surface.buildings) {\r\n\t\t\t\t\t\tif (b.containsLocation(i, j)) {\r\n\t\t\t\t\t\t\tif (memory.put(b, b) == null) {\r\n\t\t\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\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\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout.printf(\"%n\");\r\n\t\t}\r\n\t\t\r\n\t\tout.printf(\"</map>%n\");\r\n\t\tout.flush();\r\n\t\t\r\n\t\tStringSelection sel = new StringSelection(sw.toString());\r\n\t\tToolkit.getDefaultToolkit().getSystemClipboard().setContents(sel, sel);\r\n\t}", "private boolean roomShouldHaveMonsters() {\n return contents.contains(roomContents.MONSTERS)\n || contents.contains(roomContents.EXPLORATION)\n || contents.contains(roomContents.KEY)\n || contents.contains(roomContents.FINAL_KEY);\n }", "boolean checkWin(Tile initialTile);", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public static void generateFloor(GameState state) {\n char[][] layout = LayoutGenerator.generateLayout();\n \n state.setBoard(new Entity[layout.length * ROOM_SIZE][layout[0].length * ROOM_SIZE]);\n // Fill all spaces with wall entities.\n for(int column = 0; column < state.getBoard().length; column++) {\n for(int row = 0; row < state.getBoard().length; row++) {\n state.getBoard()[column][row] = new Wall();\n }\n }\n \n // Read the layout and convert that into rooms in the board\n for(int layoutColumn = 0; layoutColumn < LayoutGenerator.MAX_LAYOUT_SIZE; layoutColumn++) {\n for(int layoutRow = 0; layoutRow < LayoutGenerator.MAX_LAYOUT_SIZE; layoutRow++) {\n if(layout[layoutColumn][layoutRow] == LayoutGenerator.START) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.START));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.FINISH) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.FINISH));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.NORMAL) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.NORMAL));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.TREASURE) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.TREASURE));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.ENEMY) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.ENEMY));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.DOOR) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.DOOR));\n } else if (layout[layoutColumn][layoutRow] == LayoutGenerator.KEY) {\n putRoomInBoard(state, layout, layoutColumn, layoutRow, pickRoom(LayoutGenerator.KEY));\n\n }\n }\n }\n\n }", "public boolean checkIfFull() {\n this.isFull = true;\n for(int i=0; i<this.size; i++) {\n for(int j=0; j<this.size; j++) if(this.state[i][j].isEmpty) this.isFull = false;\n }\n }", "public void backGroundCheck(HexCell currentCell){\n // When Cell already clicked, do nothing\n boolean checkStatus = true;\n int checkLevel = 1;\n\n while (checkStatus){\n\n ArrayList<HexCell> toDoStack = new ArrayList<>();\n ArrayList<HexCell> checkedStack = new ArrayList<>();\n ArrayList<HexCell> appliedStack = new ArrayList<>();\n\n // fill all adjacent cells into toDoStack\n for(MyValues.HEX_POSITION position: MyValues.HEX_POSITION.values()){\n HexCell adjacentCell = getAdjacentCell(currentCell, position);\n if(adjacentCell != null && adjacentCell.level == checkLevel){\n toDoStack.add(adjacentCell);\n }\n // work off all todoStack elements\n while(!toDoStack.isEmpty()){\n HexCell currentTodo = toDoStack.get(0);\n if(currentTodo.level == checkLevel){\n if(!appliedStack.contains(currentTodo)){\n appliedStack.add(currentTodo);\n }\n if(!checkedStack.contains(currentTodo)) {\n checkedStack.add(currentTodo);\n }\n\n // check all adjacent cells\n for(MyValues.HEX_POSITION toDoPosition: MyValues.HEX_POSITION.values()){\n HexCell adjacentToDoCell = getAdjacentCell(currentTodo, toDoPosition);\n // if new Cell, add it\n if((adjacentToDoCell != null) && !toDoStack.contains(adjacentToDoCell) && !checkedStack.contains(adjacentToDoCell) && !appliedStack.contains(adjacentToDoCell)){\n toDoStack.add(adjacentToDoCell);\n }\n }\n }\n toDoStack.remove(0);\n }\n }\n // Raise Check level\n checkLevel +=1;\n\n if(appliedStack.size() >= MyValues.MERGE_THRESHOLD){\n // Sum up all scores of applied cells\n int summedScore = 0;\n for(HexCell toBeMergedCell: appliedStack){\n summedScore += toBeMergedCell.score;\n toBeMergedCell.setToZero();\n }\n currentCell.level=checkLevel;\n currentCell.score = summedScore;\n currentCell.drawHexCell();\n } else {\n checkStatus = false;\n break;\n }\n }\n }", "public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "private boolean isCellOccupied(Cell c) {\n Worm[] opponentWorms = opponent.worms;\n Worm[] playerWorms = player.worms;\n int i = 0;\n int j = 0;\n boolean foundOpponentWorm = false;\n boolean foundPlayerWorm = false;\n while ((i < opponentWorms.length) && (!foundOpponentWorm)) {\n if ((opponentWorms[i].position.x == c.x) && (opponentWorms[i].position.y == c.y)) {\n foundOpponentWorm = true;\n } else {\n i++;\n }\n }\n while ((j < playerWorms.length) && (!foundPlayerWorm)) {\n if ((playerWorms[j].position.x == c.x) && (playerWorms[j].position.y == c.y)) {\n foundPlayerWorm = true;\n } else {\n j++;\n }\n }\n return (foundOpponentWorm || foundPlayerWorm);\n }", "public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }", "public String requiredBuildingsStatus(){\r\n\t\tString unbuiltBuildings = \"\";\r\n\t\tif (!myBuildings.getWell()){\r\n\t\t\tunbuiltBuildings += \"Well \";\r\n\t\t}\r\n\t\tif (!myBuildings.getFence()){\r\n\t\t\tunbuiltBuildings += \"Fence \";\r\n\t\t}\r\n\t\tif (!myBuildings.getHouse()){\r\n\t\t\tunbuiltBuildings += \"House \";\r\n\t\t}\r\n\t\treturn unbuiltBuildings;\r\n\t}", "private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void buildBlock(Tile t);", "protected int winnable(Board b){\r\n\t\t//checks if two tiles are the same (and not empty) and checks if\r\n\t\t//the third tile required to win is empty for a winning condition\r\n\t\tint condition = 0;\r\n\t\tif ((b.getTile(1) == b.getTile(2)) && (b.getTile(3) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\t\tcondition =3;\r\n\t\telse if ((b.getTile(1) == b.getTile(3)) && (b.getTile(2) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\tcondition = 2;\r\n\t\telse if ((b.getTile(2) == b.getTile(3)) && (b.getTile(1) == ' ')\r\n\t\t\t\t&& (b.getTile(2) != ' ') && (b.getTile(2) == this.getSymbol()))\r\n\t\t\tcondition = 1;\r\n\t\telse if ((b.getTile(4) == b.getTile(5)) && (b.getTile(6) == ' ')\r\n\t\t\t\t&& (b.getTile(4) != ' ') && (b.getTile(4) == this.getSymbol()))\r\n\t\t\tcondition = 6;\r\n\t\telse if ((b.getTile(4) == b.getTile(6)) && (b.getTile(5) == ' ')\r\n\t\t\t\t&& (b.getTile(4) != ' ') && (b.getTile(5) == this.getSymbol()))\r\n\t\t\tcondition = 5;\r\n\t\telse if ((b.getTile(5) == b.getTile(6)) && (b.getTile(4) == ' ')\r\n\t\t\t\t&& (b.getTile(5) != ' ') && (b.getTile(5) == this.getSymbol()))\r\n\t\t\tcondition = 4;\r\n\t\telse if ((b.getTile(7) == b.getTile(8)) && (b.getTile(9) == ' ')\r\n\t\t\t\t&& (b.getTile(7) != ' ') && (b.getTile(7) == this.getSymbol()))\r\n\t\t\tcondition = 9;\r\n\t\telse if ((b.getTile(7) == b.getTile(9)) && (b.getTile(8) == ' ')\r\n\t\t\t\t&& (b.getTile(7) != ' ') && (b.getTile(7) == this.getSymbol()))\r\n\t\t\tcondition = 8;\r\n\t\telse if ((b.getTile(8) == b.getTile(9)) && (b.getTile(7) == ' ')\r\n\t\t\t\t&& (b.getTile(8) != ' ') && (b.getTile(8) == this.getSymbol()))\r\n\t\t\tcondition = 7;\r\n\t\telse if ((b.getTile(1) == b.getTile(4)) && (b.getTile(7) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\tcondition = 7;\r\n\t\telse if ((b.getTile(1) == b.getTile(7)) && (b.getTile(4) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\tcondition = 4;\r\n\t\telse if ((b.getTile(4) == b.getTile(7)) && (b.getTile(1) == ' ')\r\n\t\t\t\t&& (b.getTile(4) != ' ') && (b.getTile(4) == this.getSymbol()))\r\n\t\t\tcondition = 1;\r\n\t\telse if ((b.getTile(2) == b.getTile(5)) && (b.getTile(8) == ' ')\r\n\t\t\t\t&& (b.getTile(2) != ' ') && (b.getTile(2) == this.getSymbol()))\r\n\t\t\tcondition = 8;\r\n\t\telse if ((b.getTile(2) == b.getTile(8)) && (b.getTile(5) == ' ')\r\n\t\t\t\t&& (b.getTile(2) != ' ') && (b.getTile(2) == this.getSymbol()))\r\n\t\t\tcondition = 5;\r\n\t\telse if ((b.getTile(5) == b.getTile(8)) && (b.getTile(2) == ' ')\r\n\t\t\t\t&& (b.getTile(5) != ' ') && (b.getTile(5) == this.getSymbol()))\r\n\t\t\tcondition = 2;\r\n\t\telse if ((b.getTile(3) == b.getTile(6)) && (b.getTile(9) == ' ')\r\n\t\t\t\t&& (b.getTile(3) != ' ') && (b.getTile(3) == this.getSymbol()))\r\n\t\t\tcondition = 9;\r\n\t\telse if ((b.getTile(3) == b.getTile(9)) && (b.getTile(6) == ' ')\r\n\t\t\t\t&& (b.getTile(3) != ' ') && (b.getTile(3) == this.getSymbol()))\r\n\t\t\tcondition = 6;\r\n\t\telse if ((b.getTile(6) == b.getTile(9)) && (b.getTile(3) == ' ')\r\n\t\t\t\t&& (b.getTile(6) != ' ') && (b.getTile(6) == this.getSymbol()))\r\n\t\t\tcondition = 3;\r\n\t\telse if ((b.getTile(1) == b.getTile(5)) && (b.getTile(9) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\tcondition = 9;\r\n\t\telse if ((b.getTile(1) == b.getTile(5)) && (b.getTile(5) == ' ')\r\n\t\t\t\t&& (b.getTile(1) != ' ') && (b.getTile(1) == this.getSymbol()))\r\n\t\t\tcondition = 5;\r\n\t\telse if ((b.getTile(5) == b.getTile(9)) && (b.getTile(1) == ' ')\r\n\t\t\t\t&& (b.getTile(5) != ' ') && (b.getTile(5) == this.getSymbol()))\r\n\t\t\tcondition = 1;\r\n\t\telse if ((b.getTile(3) == b.getTile(5)) && (b.getTile(7) == ' ')\r\n\t\t\t\t&& (b.getTile(3) != ' ') && (b.getTile(3) == this.getSymbol()))\r\n\t\t\tcondition = 7;\r\n\t\telse if ((b.getTile(3) == b.getTile(7)) && (b.getTile(5) == ' ')\r\n\t\t\t\t&& (b.getTile(3) != ' ') && (b.getTile(3) == this.getSymbol()))\r\n\t\t\tcondition = 5;\r\n\t\telse if ((b.getTile(5) == b.getTile(7)) && (b.getTile(3) == ' ')\r\n\t\t\t\t&& (b.getTile(5) != ' ') && (b.getTile(5) == this.getSymbol()))\r\n\t\t\tcondition = 3;\r\n\t\treturn condition;\r\n\t}", "void loadBuildingProperties() {\r\n\t\tif (currentBuilding != null) {\r\n\t\t\t// locate the building in the buildings list\r\n\t\t\tint i = 0;\r\n\t\t\tfor (TileEntry te : buildingTableModel.rows) {\r\n\t\t\t\tif (te.buildingType.tileset.get(te.surface) == currentBuilding.tileset) {\r\n\t\t\t\t\tint idx = buildingTable.convertRowIndexToView(i);\r\n\t\t\t\t\tbuildingTable.getSelectionModel().addSelectionInterval(idx, idx);\r\n\t\t\t\t\tbuildingTable.scrollRectToVisible(buildingTable.getCellRect(idx, 0, true));\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\t\r\n\t\t\tdisplayBuildingInfo();\r\n\t\t} else {\r\n\t\t\tui.buildingInfoPanel.apply.setEnabled(false);\r\n\t\t}\r\n\t}", "private ArrayList processBuilding(int[][] building, int minArea, Random rand){\n\t\tint a = RescueMapToolkit.area(building);\n\t\t//System.out.println(minArea+\", \"+a);\n\t\tif(a < 1000) //kill these ones...\n\t\t\treturn new ArrayList(0);\n\t\tif(a < minArea){ //primary base case\n\t\t\tArrayList l = new ArrayList(1);\n\t\t\tl.add(building);\n\t\t\treturn l;\n\t\t}\n\t\tint lower = (int)(rand.nextDouble()*minArea);\n\t\tlower = lower*4;\n\t\tif(a < lower){ //probabilistic base case\n\t\t\tArrayList l = new ArrayList(1);\n\t\t\tl.add(building);\n\t\t\treturn l;\n\t\t}\n\t\t//find the max and min points\n\t\tint minX = building[0][0];\n\t\tint minY = building[0][1];\n\t\tint maxX = building[0][0];\n\t\tint maxY = building[0][1];\n\t\tfor(int i = 1; i < building.length; i++){\n\t\t\tif(minX > building[i][0]) minX = building[i][0];\n\t\t\tif(maxX < building[i][0]) maxX = building[i][0];\n\t\t\tif(minY > building[i][1]) minY = building[i][1];\n\t\t\tif(maxY < building[i][1]) maxY = building[i][1];\n\t\t}\n\t\tint midX = (minX+maxX)/2;\n\t\tint midY = (minY+maxY)/2;\n\t\t//split the building in half\n\t\tint[][][] split;\n\t\tif(maxX-minX > maxY-minY)\n\t\t\tsplit = RescueMapToolkit.split(building,midX,minY,midX,maxY);\n\t\telse\n\t\t\tsplit = RescueMapToolkit.split(building,minX,midY,maxX,midY);\n\n\t\tif(split == null || RescueMapToolkit.area(split[0]) == 0 || RescueMapToolkit.area(split[1]) == 0)\n\t\t\treturn new ArrayList(0);\n\n\t\t//and recurse\n\t\tArrayList a1 = processBuilding(split[0],minArea,rand);\n\t\tArrayList a2 = processBuilding(split[1],minArea,rand);\n\t\tArrayList toRet = new ArrayList(a1.size()+a2.size());\n\t\tfor(int i = 0; i < a1.size(); i++)\n\t\t\ttoRet.add(a1.get(i));\n\t\tfor(int i = 0; i < a2.size(); i++)\n\t\t\ttoRet.add(a2.get(i));\n\t\treturn toRet;\n\t}", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "public boolean letTheRoundBegin (Color color){\n friendlyPieces.clear();\n hostilePieces.clear();\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n if (board[i][j]!=null){\n if (board[i][j].getColor()==color){\n friendlyPieces.add(board[i][j]);\n } else {\n hostilePieces.add(board[i][j]);\n }\n }\n }\n }\n Collections.shuffle(friendlyPieces);\n \n //instantiating friendly king\n int i = 0;\n while (i<friendlyPieces.size() && !(friendlyPieces.get(i) instanceof King)){\n i++;\n }\n friendlyKing = friendlyPieces.get(i);\n \n //calculating if it is check or not\n List<ChessPiece> threats = new ArrayList();\n for (ChessPiece hostilePiece : hostilePieces) {\n if (hostilePiece.canCaptureKing(board, friendlyKing)){\n threats.add(hostilePiece);\n }\n }\n if (!threats.isEmpty()){\n return handleCheck(threats);\n }\n \n //if there's no check, regular round takes place\n checkFlag = false;\n for (ChessPiece actualPiece : friendlyPieces) {\n if (attemptToCapture(actualPiece)) return true;\n }\n for (ChessPiece actualPiece : friendlyPieces) {\n if (attemptToMove(actualPiece)) return true;\n }\n return false;\n }", "boolean CheckAndAddCardInBuild(Card_Model cardToBeAdded, Card_Model cardInBuild, int currentPlayer, Vector<Card_Model> playerHand) {\n\n boolean isCardInBuild = false;\n Vector<Card_Model> tempBuild = buildOfCards;\n int aceAs1 = 0;\n int aceAs14 = 0;\n Card_Model cardAdded;\n\n // Cycling through the cards in the build and see if the card the user selected is actually in the build\n for(int i = 0; i < buildOfCards.size(); i++) {\n if(buildOfCards.get(i).GetCard().equals(cardInBuild.GetCard())) {\n isCardInBuild = true;\n }\n }\n\n // If the card the user wants to add to a build exists and they are not the owner...\n if(isCardInBuild && owner != currentPlayer) {\n\n // Push the card the player wants to add to the build onto a temporary copy of the build to\n // be added if the numbers correctly add up to a card in their hand\n tempBuild.add(cardToBeAdded);\n cardAdded = cardToBeAdded;\n\n // Iterate through the build with the card added and see what number it adds up to\n for (int i = 0; i < tempBuild.size(); i++) {\n if (tempBuild.get(i).GetNumber() != 'A') {\n aceAs1 += playerModel.CardNumber(tempBuild.get(i).GetNumber());\n aceAs14 += playerModel.CardNumber(tempBuild.get(i).GetNumber());\n } else {\n aceAs1++;\n aceAs14 += 14;\n }\n }\n\n // Then iterate through the players hand and check and see with the card they want to add being added,\n // Does it equal one of the cards in their hand\n for (int i = 0; i < playerHand.size(); i++) {\n\n if(cardToBeAdded.GetCard().equals(playerHand.get(i).GetCard())) {\n continue;\n }\n\n // If it does equal, update the build with the added card and return true\n if (playerModel.CardNumber(playerHand.get(i).GetNumber()) == aceAs1 ||\n playerModel.CardNumber(playerHand.get(i).GetNumber()) == aceAs14 ||\n playerHand.get(i).GetNumber() == 'A' && aceAs1 == 14) {\n buildOfCards = tempBuild;\n owner = currentPlayer;\n\n if (playerHand.get(i).GetNumber() != 'A') {\n cardValueOfBuild = playerModel.CardNumber(playerHand.get(i).GetNumber());\n } else {\n cardValueOfBuild = 14;\n }\n\n return true;\n }\n }\n\n // If we get out of the for loop then that means that it never added up to a card in the player's hand\n tempBuild.remove(tempBuild.lastElement());\n return false;\n }\n\n // You can not add to the existing build\n else {\n return false;\n }\n }", "@Test\n\t\t\tpublic void testRoomEntry()\n\t\t\t{\n\t\t\t\t// two steps from a room two steps away\n\t\t\t\tboard.calcTargets(13, 10, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 9)));\n\t\t\t\t\n\t\t\t\t//Test entering a door when steps are greater than distance to room\n\t\t\t\tboard.calcTargets(8, 7, 8);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 6)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public boolean checkWin(int x, int y, int player)\n {\n int[][] area = new int[REGION_SIZE][REGION_SIZE];\n // Copy region of board to do win checking\n for (int i = REGION_START; i <= REGION_STOP; i++) {\n for (int j = REGION_START; j <= REGION_STOP; j++) {\n area[i - REGION_START][j - REGION_START] = getTile(x + i, y + j);\n }\n }\n \n //Check Horizontal\n int count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[4][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Vertical\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][4] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '/'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[REGION_SIZE - 1 - i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '\\'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n return false;\n }", "private void checkIslandArround(char[][] grid, int i, int j) {\n grid[i][j] = '0';\n if(i>0) {\n if(grid[i-1][j] == '1') {\n checkIslandArround(grid, i-1, j);\n }\n }\n \n if(j>0) {\n if(grid[i][j-1] == '1') {\n checkIslandArround(grid, i, j-1);\n } \n }\n \n if(i<grid.length-1) {\n if(grid[i+1][j] == '1') {\n checkIslandArround(grid, i+1, j);\n }\n }\n \n if(j<grid[i].length -1) {\n if(grid[i][j+1] == '1') {\n checkIslandArround(grid, i, j+1);\n }\n }\n }", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "private boolean tryAttack(Tile fromTile) {\r\n\t\tint size = getBoard().getTiles().length;\r\n\r\n\t\t// if attacker is on power-up tile\r\n\t\tif (fromTile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.SHARK && fromTile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.EAGLE && fromTile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t} else if (fromTile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// if the defender is on power-up tile\r\n\t\tif (tile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.SHARK && tile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE && tile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t} else if (tile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (fromTile.getPiece().getPower() >= tile.getPiece().getPower()) {\r\n\t\t\tif (tile.getPiece().getTYPE() == PieceType.FLAG) {\r\n\t\t\t\tfromTile.getPiece().setHasEnemyFlag(true);\r\n\t\t\t\tUtilities.infoAlert(\"Enemy Flag Captured!\", \"Get that piece with the flag back to your territory quickly!\");\r\n\t\t\t} else {\r\n\t\t\t\tif (tile.getPiece().getHasEnemyFlag() == true) {\r\n\t\t\t\t\tUtilities.infoAlert(\"Flag Recaptured!\", \"Enemy piece carrying your flag has been killed.\\nYour flag has respawned in your territory.\");\r\n\r\n\t\t\t\t\t// generate the dropped flag at its original position\r\n\t\t\t\t\t// or generate the dropped flag on first available tile on first or last row\r\n\t\t\t\t\t// if the default position has a piece on it\r\n\t\t\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE) {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][(size / 2) - 1].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][(size / 2) - 1].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int sharkCol = 0; sharkCol < getBoard().getTiles().length; sharkCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][sharkCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][sharkCol].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\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} else {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[0][size / 2].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[0][size / 2].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int eagleCol = 0; eagleCol < getBoard().getTiles().length; eagleCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[0][eagleCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[0][eagleCol].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn movePiece(fromTile);\r\n\t\t} else {\r\n\t\t\tUtilities.infoAlert(\"Invalid action\", \"Enemy power level higher at level \" + tile.getPiece().getPower()\r\n\t\t\t\t\t+ \". \" + \"\\nYour current piece is not able to defeat it and has cowered back in fear.\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isRunning()\n {\n WebElement box = driver.findElement(By.cssSelector(\"#box\"));\n String lv = box.getAttribute(\"class\");\n int level = lv.charAt(2) - 48;\n\n WebElement timeElem = driver.findElement(By.cssSelector(\"#room > header > span.time\"));\n String timeStr = timeElem.getText();\n int time = stringToInt(timeStr);\n\n return level != 1 && time != 1;\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "public void updateBuildingManager(){\n for(int onFloor = 0; onFloor < passengerArrivals.size(); onFloor++){\n for(int i = 0; i < passengerArrivals.get(onFloor).size(); i++){\n PassengerArrival aPassengerArrival = passengerArrivals.get(onFloor).get(i);\n if(SimClock.getTime() % aPassengerArrival.getTimePeriod() == 0){\n \n aBuildingManager.updatePassengerRequestsOnFloor(onFloor, aPassengerArrival.getNumPassengers(),\n aPassengerArrival.getDestinationFloor());\n } \n }\n }\n }", "private void drawTiles(Graphics g)\n {\n for (int x = 0; x < 19; x++)\n {\n for (int y = 0; y < 15; y++)\n {\n tileset.getSprite(5, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n switch(board[x][y])\n {\n case 1:\n {\n tileset.getSprite(4, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 2:\n {\n tileset.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 3:\n {\n if (bombs[x][y].getTimeLeft() > 80)\n {\n bombImage.getSprite(0, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 80 && bombs[x][y].getTimeLeft() > 50)\n {\n bombImage.getSprite(1, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 50 && bombs[x][y].getTimeLeft() > 20)\n {\n bombImage.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 20)\n {\n bombImage.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n //4 is player\n case 5:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n case 6:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(15, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n }\n }\n }\n }", "public boolean isButtonPushedAtFloor(int floor) {\r\n\r\n return (getNumberOfPeopleWaitingAtFloor(floor) > 0);\r\n }", "public static boolean insideBounds(GameTile tile) {\n\n if (tile == null) {\n return false;\n } else {\n\n int x = tile.getXCoord();\n int y = tile.getYCoord();\n\n return !(x < 0 || y < 0) && !(x > TILE_COLS || y > TILE_ROWS);\n\n }\n\n }", "private void decorateMountains(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states,boolean enemyAddedBefore)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "void checkTrees(Box tree);", "public void checkHealth(){\n if (this.getHealth() < this.initialHealth/2){\n this.setImgSrc(\"/students/footballstudent1.png\");\n this.getTile().setImage(\"/students/footballstudent1.png\");\n }\n }", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\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}" ]
[ "0.5778915", "0.57781494", "0.56923646", "0.5666223", "0.5569713", "0.5369405", "0.5340398", "0.5339447", "0.53018844", "0.5297373", "0.52416646", "0.52237517", "0.5204222", "0.5197498", "0.5195929", "0.51880234", "0.5168187", "0.5164152", "0.5160862", "0.5149619", "0.5128376", "0.5119148", "0.51083803", "0.51013863", "0.50965774", "0.5094733", "0.50463164", "0.5020216", "0.5017025", "0.50145924", "0.5013307", "0.50063413", "0.50052977", "0.49995956", "0.49877605", "0.4973917", "0.4970341", "0.49690884", "0.49675238", "0.49672958", "0.49588522", "0.49491942", "0.4940351", "0.49341348", "0.49338204", "0.49298736", "0.49238333", "0.49217063", "0.49204025", "0.490461", "0.49041817", "0.48847932", "0.48790354", "0.48727524", "0.48589215", "0.48561352", "0.48551068", "0.485268", "0.4849709", "0.48489556", "0.48461366", "0.48409", "0.48361042", "0.48358792", "0.48358783", "0.48315313", "0.4826987", "0.481854", "0.4813897", "0.48067373", "0.48004305", "0.48000643", "0.4799262", "0.47987282", "0.47893766", "0.4785825", "0.47851038", "0.47847983", "0.47829458", "0.47792393", "0.4778561", "0.47764713", "0.4776199", "0.47759062", "0.47749338", "0.47736725", "0.47675774", "0.47671273", "0.47644937", "0.4757692", "0.47553614", "0.47540748", "0.47538498", "0.4753338", "0.47522122", "0.47469315", "0.47463176", "0.47451848", "0.4743348", "0.47415876" ]
0.73108524
0
Add a key of a map location to the processor that contains a location on the map that was yet unchecked.
public void reportUnchecked(final long key) { synchronized (unchecked) { if (unchecked.contains(key)) { unchecked.add(key); } unchecked.notify(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute(final long key, @NonNull final MapTile tile) {\n synchronized (unchecked) {\n unchecked.add(key);\n }\n \n return true;\n }", "public void setOtherLocation( Object key, InputLocation location )\n {\n if ( location != null )\n {\n if ( this.locations == null )\n {\n this.locations = new java.util.LinkedHashMap<Object, InputLocation>();\n }\n this.locations.put( key, location );\n }\n }", "private void addToGeoLocationContext(String key, Object value) {\n if (key != null && value != null && !key.isEmpty() ||\n (value instanceof String) && !((String) value).isEmpty()) {\n this.geoLocationPairs.put(key, value);\n }\n }", "void doLogicalPutUnlocked(final TCServerMap map, final Object key, final Object value);", "protected MapElement(long key) {\r\n super(key);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate boolean checkAndAdd(Object key, Object obj, @SuppressWarnings(\"rawtypes\") TreeMap map){\n if (map.containsKey(key))\n return(false);\n else\n map.put(key,obj);\n\n return(true);\n }", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "public MapElement put(long key, long startCpuTime, long startSystemTime) {\r\n // pass in thread data to differentiate between indirect and direct \r\n putElement(key, null); \r\n MapElement elt = (MapElement) getElement(key);\r\n if (null != elt) {\r\n elt.setTimes(startCpuTime, startSystemTime);\r\n }\r\n return elt;\r\n }", "ValueType put(long key, ValueType entry);", "private void addToHashmap(String key, Long timestamp){\r\n\t\tkeyHashMap.putIfAbsent(key, new PriorityQueue<Long>());\r\n\t\tsynchronized(keyHashMap.get(key)){\r\n\t\t\tSystem.out.println(\"Added Key: \" + key + \" Time: \" + timestamp);\r\n\t\t\tkeyHashMap.get(key).add(timestamp);\r\n\t\t}\r\n\t}", "public abstract void removeFromMap();", "@SuppressWarnings(\"serial\")\n protected void addInstance(\n Map<String, Object> keyMap, String key, CIMInstance instance)\n throws BaseCollectionException {\n try {\n Object result = keyMap.get(key);\n if (keyMap.containsKey(key) && result instanceof List<?>) {\n @SuppressWarnings(\"unchecked\")\n List<CIMInstance> cimInstanceList = (List<CIMInstance>) keyMap\n .get(key);\n\n cimInstanceList.add(instance);\n keyMap.put(key, cimInstanceList);\n } else {\n keyMap.put(key, instance);\n }\n } catch (Exception ex) {\n throw new BaseCollectionException(\n \"Error while adding CIMInstance to Map : \" + instance.getObjectPath(), ex) {\n @Override\n public int getErrorCode() {\n // To-Do errorCode\n return -1;\n }\n };\n }\n }", "private void add(String key) {\n dict = add(dict, key, 0);\n }", "Object doLogicalPutIfAbsentUnlocked(final TCServerMap map, final Object key, final Object value,\n MetaDataDescriptor mdd)\n throws AbortedOperationException;", "public boolean put( AnyType key , AnyType value)\n { \n int currentPos = findPos( key );\t//TODO: test this\n \n if( array[ currentPos ] == null )\n ++occupied;\n array[ currentPos ] = new HashEntry<>(key, value);\n \n theSize++;\n \n // Rehash\n if( occupied > array.length / 2 )\n rehash( );\n \n return true;\n }", "@SuppressWarnings(\"nls\")\n public GameMapProcessor(@NonNull final GameMap parentMap) {\n super(\"Map Processor\");\n parent = parentMap;\n unchecked = new TLongArrayList();\n running = false;\n }", "public void put (String key, Object value) {\n if (trace) {\n getProfiler().checkPoint(\n String.format(\" %s='%s' [%s]\", key, value, Thread.currentThread().getStackTrace()[2])\n );\n }\n getMap().put (key, value);\n synchronized (this) {\n notifyAll();\n }\n }", "public void addKey(String key){\n itemMap.put(key, new ArrayList<>());\n }", "public void remove(Object key){\n map.remove(key);\n }", "@SuppressWarnings(\"serial\")\n protected void addPath(\n Map<String, Object> keyMap, String key, CIMObjectPath path)\n throws BaseCollectionException {\n try {\n Object result = keyMap.get(key);\n if (keyMap.containsKey(key) && result instanceof List<?>) {\n @SuppressWarnings(\"unchecked\")\n List<CIMObjectPath> cimPathList = (List<CIMObjectPath>) keyMap\n .get(key);\n cimPathList.add(path);\n keyMap.put(key, cimPathList);\n } else {\n keyMap.put(key, path);\n }\n } catch (Exception ex) {\n throw new BaseCollectionException(\n \"Error while adding CIMObject Path to Map : \" + path, ex) {\n @Override\n public int getErrorCode() {\n // To-Do errorCode\n return -1;\n }\n };\n }\n }", "@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }", "@Override\n public void process(String key, String value) {\n logger.info(\"Adding record to state store\");\n this.wordStateStore.put(key, value);\n }", "public Value put(Key key, Value thing) ;", "private InputLocation getOtherLocation( Object key )\n {\n return ( locations != null ) ? locations.get( key ) : null;\n }", "public void put(int key, String name){\n\t\tif(get(key)==null){\n\t\t\thashMap[key] = name;\n\t\t\tSystem.out.println(name + \" stored in map under this key \" + key);\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(key + \" is already in the map\");\n\t\treturn;\n\t}", "private void hashMapPutPlusOne(Map<String, Integer> map, String key) {\n Integer value = map.get(key);\n if (value == null)\n map.put(key, 1);\n else\n map.put(key, value + 1);\n }", "Object put(Object key, Object value) throws NullPointerException;", "protected void binaryValueUnused( BinaryKey key ) {\n }", "public void push(String keyName, ValueWrapper valueWrapper) {\n\t\tmap.compute(keyName, (key, old) -> old == null ? \n\t\t\t\tnew MultistackEntry(null, valueWrapper) : new MultistackEntry(old, valueWrapper));\n\t}", "public synchronized boolean add(String key, String content) {\n if (store.get(key) != null) {\n logger.warning(\"Key \" + key + \" already in store\");\n return false;\n }\n logger.info(\"Adding key \" + key);\n ensureMapSize();\n MapData mapData = new MapData();\n mapData.setContent(content);\n mapData.setTime((new Date()).getTime());\n store.put(key, mapData);\n tally.put(key, 0);\n return true;\n }", "Object getValueUnlocked(final TCServerMap map, final Object key) throws AbortedOperationException;", "public abstract boolean insert(Key key);", "public int insert( Map x ) {\n throw new UnsupportedOperationException(\n \"Method insert( Map ) not supported in MRC\" );\n }", "public MapElement(int key) {\n this.key = key;\n }", "void add(String key);", "void put(Object indexedKey, Object key);", "private static boolean mapAlreadyHasMarkerForLocation(String location, HashMap<String, String> markerLocation) {\n return (markerLocation.containsValue(location));\n }", "private void elementHit(K key) {\n\t\tint i = hitMap.get(key);\n\t\ti++;\n\t\thitMap.put(key, i);\n\t}", "public void add(long key, C value) {\n if(Long.toString(key).length() != 8) {\n \t//System.out.println(\"Sequence Error: Length is not 8.\\n\");\n return;\n }\n\n //clear the old key\n try {\n this.remove(key); \n } catch(Exception e) {\n sequence.add(new Entry<C>(key, value));\n size++;\n return;\n }\n //System.out.println(\"Found duplicate for key \" + key + \".\\n\"); \n sequence.add(new Entry<C>(key, value));\n size++;\n }", "public void addKey(int par1, Object par2Obj)\n {\n this.keySet.add(Integer.valueOf(par1));\n int j = computeHash(par1);\n int k = getSlotIndex(j, this.slots.length);\n\n for (IntHashMapEntry inthashmapentry = this.slots[k]; inthashmapentry != null; inthashmapentry = inthashmapentry.nextEntry)\n {\n if (inthashmapentry.hashEntry == par1)\n {\n inthashmapentry.valueEntry = par2Obj;\n return;\n }\n }\n\n ++this.versionStamp;\n this.insert(j, par1, par2Obj, k);\n }", "void doLogicalPutUnlockedVersioned(TCServerMap map, Object key, Object value, long version);", "@Override\n public void put(PairNode<K, V> node) {\n super.put(node);\n keySet.add(node.getKey());\n }", "void addBroken(String key, String val) {\n List<String> list = map.get(key);\n if (list == null) {\n list = Collections.synchronizedList(new ArrayList<>());\n map.put(key, list);\n }\n list.add(val);\n }", "int insertMapSelective(Map<String, Object> record);", "@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }", "public void addObjectPartForAbsentKey(Object key, Object value) {\n throw new IllegalAccessError(\"inappropriate use of ObjectPartList\");\n }", "public abstract void map(String key, String value) throws Exception;", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate boolean checkAndAdd(DefinitionName key, DmsDefinition obj, HashMap map){\n if (map.containsKey(key))\n return(false);\n else\n map.put(key,obj);\n\n return(true);\n }", "public void reDistributeKeys() {\n predKey = chord.getPredecessorKey();\n if (predKey == 0) {\n return;\n }\n if (map.isEmpty()) {\n return;\n }\n\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<Integer, FileLocation> entry = (Map.Entry) it.next();\n //If I am not a successor of this Entry, put in in toDistribute Stack\n if (!Hasher.isBetween(predKey, entry.getKey(), nodeKey)) {\n toDistribute.push(new Entry(entry));\n }\n }\n\n }", "@Override\r\n\tpublic void addToMap(MapView arg0) {\n\t\tsuper.addToMap(arg0);\r\n\t}", "public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }", "protected void checkKey(Object key) {\n\tif (!canContainKey(key)) {\n throw new IllegalArgumentException(\n \"key is not valid for this LeaseMap\");\n }\n }", "public E tryAdd(E o) {\r\n E found = this.map.get(o.hashCode());\r\n if (found != null) {\r\n return found;\r\n }\r\n this.map.put(o.hashCode(), o);\r\n return o;\r\n }", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "public void remove(int key) {\n store[key] = -1; // If the key is removed, the value of that key is replaced with -1, \n \t\t\t\t// that the item doesn't exist because hashmap requires removal of keys.\n }", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "private void addToMap(int x, int y, MapBox piece){\n\t\tBoxContainer type;\r\n\t\t\n\t\t// determine the type of this square\n\t\ttype = BoxContainer.Open;\r\n\t\t\n\t\tif (piece.hasKey()){\n\t\t\t// this is a key so mark it as such and add it to our array\n\t\t\ttype = BoxContainer.Key;\n\t\t\tPoint thisPoint = new Point(x, y, BoxContainer.Key);\n\t\t\tif (!checkForPointInArr(keys, thisPoint)){ // make sure it's not already in the array\n\t\t\t\tkeys.add(thisPoint); // add this to our key array\n\t\t\t}\n\t\t} else if (piece.isEnd()){\n\t\t\t// this is an exit so mark it as such and add it to our array\n\t\t\ttype = BoxContainer.Exit;\n\t\t\tPoint thisPoint = new Point(x, y, BoxContainer.Exit);\n\t\t\tif (!checkForPointInArr(exits, thisPoint)){ // make sure it's not already in the array\n\t\t\t\texits.add(new Point(x, y, BoxContainer.Exit)); // add this to our exit array\n\t\t\t}\n\t\t}\r\n\t\t\n\t\t// add it to the map\r\n\t\t\n\t\tmap.addElement(x, y, type);\n\t\t\n\t\t// add its surroundings to the map\n\t\tPoint[] surrondings = new Point[4];\r\n\t\t\n\t\tsurrondings[0] = new Point(x, y + 1, castToBoxContainer(piece.North)); // add the north piece\n\t\tsurrondings[1] = new Point(x, y - 1, castToBoxContainer(piece.South)); // add the south piece\n\t\tsurrondings[2] = new Point(x + 1, y, castToBoxContainer(piece.East)); // add the east piece\n\t\tsurrondings[3] = new Point(x - 1, y, castToBoxContainer(piece.West)); // add the west piece\n\t\t\n\t\tfor (int i = 0; i < surrondings.length; i++){\n\t\t\t// check if this is a key or an exit and if so add it to the respective arrays if it not already there\n\t\t\tif (surrondings[i].type == BoxContainer.Exit){\n\t\t\t\tif (!checkForPointInArr(exits, surrondings[i])){ // make sure it's not already there\n\t\t\t\t\texits.add(surrondings[i]);\n\t\t\t\t}\n\t\t\t} else if (surrondings[i].type == BoxContainer.Key){\n\t\t\t\tif (!checkForPointInArr(keys, surrondings[i])){ // make sure it's not already there\n\t\t\t\t\tkeys.add(surrondings[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmap.addElement(surrondings[i].x, surrondings[i].y, surrondings[i].type);\n\t\t}\n\t}", "public boolean add(E key)\r\n {\r\n if(this.contains(key))\r\n {\r\n return false;\r\n }\r\n\r\n else\r\n {\r\n super.add(key);\r\n }\r\n return true;\r\n }", "public NetworkMapKey(NetworkMapKey source) {\n this._pid = source._pid;\n }", "@Override\n public final void onMiss(final K key) {\n if (!freqMissMap.containsKey(key)) {\n freqMissMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqMissMap.put(key, freqMissMap.get(key) + 1);\n }", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "public int addMap(NodePositionsSet otherMap, int otherID){\r\n\t\tif(otherMap.getMap() == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tallMaps.put(otherID, otherMap);\r\n\t\tsynced = -1;\r\n\t\treturn 0;\r\n\t}", "public void updateMap(HashMap<Coordinate, MapTile> currentView) {\n\t\t\tfor (Coordinate key : currentView.keySet()) {\n\t\t\t\tif (!map.containsKey(key)) {\n\t\t\t\t\tMapTile value = currentView.get(key);\n\t\t\t\t\tmap.put(key, value);\n\t\t\t\t\tif (value.getType() == MapTile.Type.TRAP) {\n\t\t\t\t\t\tTrapTile value2 = (TrapTile) value; // downcast to find type\n\t\t\t\t\t\tif (value2.getTrap().equals(\"parcel\") && possibleTiles.contains(key)) {\n\t\t\t\t\t\t\tparcelsFound++;\n\t\t\t\t\t\t\tparcels.add(key);\n\t\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\t\tphase = \"search\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"lava\")) {\n\t\t\t\t\t\t\tlava.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"health\")) {\n\t\t\t\t\t\t\thealth.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"water\")) {\n\t\t\t\t\t\t\twater.add(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.getType() == MapTile.Type.FINISH) {\n\t\t\t\t\t\texitFound = true;\n\t\t\t\t\t\texit.add(key);\n\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\tphase = \"search\";\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}", "protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }", "protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }", "public void insertIntoMap(String key, String name) {\n\t\tif (mapNames.containsKey(key)) {\n\t\t\t// Add new name onto the end of the existing ArrayList.\n\t\t\tmapNames.get(key).add(name);\n\t\t} else {\n\n\t\t\t// Create new ArrayList with the unparsed name as the value\n\t\t\tArrayList<String> arrName = new ArrayList<String>();\n\t\t\tarrName.add(name);\n\t\t\tmapNames.put(key, arrName);\n\t\t}\n\t}", "@Override\n\tpublic int keyUpdate(Map<String, String> map) {\n\t\treturn mapper.keyUpdate(map);\n\t}", "public void setLocation( Object key, InputLocation location )\n {\n if ( key instanceof String )\n {\n switch ( ( String ) key )\n {\n case \"\" :\n {\n this.location = location;\n return;\n }\n case \"connection\" :\n {\n connectionLocation = location;\n return;\n }\n case \"developerConnection\" :\n {\n developerConnectionLocation = location;\n return;\n }\n case \"tag\" :\n {\n tagLocation = location;\n return;\n }\n case \"url\" :\n {\n urlLocation = location;\n return;\n }\n case \"childScmConnectionInheritAppendPath\" :\n {\n childScmConnectionInheritAppendPathLocation = location;\n return;\n }\n case \"childScmDeveloperConnectionInheritAppendPath\" :\n {\n childScmDeveloperConnectionInheritAppendPathLocation = location;\n return;\n }\n case \"childScmUrlInheritAppendPath\" :\n {\n childScmUrlInheritAppendPathLocation = location;\n return;\n }\n default :\n {\n setOtherLocation( key, location );\n return;\n }\n }\n }\n else\n {\n setOtherLocation( key, location );\n }\n }", "protected ForwardingMapEntry() {}", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}", "public void put(String key, V value) {\n map.computeIfAbsent(key, k -> keepOrder ? new LinkedHashSet<>() : new HashSet<>()).add(value);\n }", "@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}", "void addTransientEntry(K key, V value);", "private boolean distributeAddByKey(Entry<ProcessorDistributionKey, Collection<Geometry>> addEntry,\n Map<ProcessorDistributionKey, Collection<Geometry>> removeKeyToGeoms)\n {\n boolean processorCreated = false;\n final ProcessorDistributionKey key = addEntry.getKey();\n final Collection<Geometry> geometries = addEntry.getValue();\n GeometryProcessor<? extends Geometry> processor = myGeometryProcessorsMap.get(key);\n if (!geometries.isEmpty() && processor == null)\n {\n Set<Geometry> inactive = myInactiveGeometries.get(key);\n if (inactive == null)\n {\n final boolean process = inProcessRange(key, myActiveTimeSpans);\n if (process)\n {\n setProcessorConstraints(key);\n processor = myProcessorBuilder.createProcessorForClass(key.getGeometryType());\n processorCreated = processor != null;\n }\n else\n {\n inactive = New.set(geometries);\n myInactiveGeometries.put(key, inactive);\n }\n }\n else\n {\n inactive.addAll(geometries);\n }\n }\n\n if (processor != null)\n {\n final Collection<? extends Geometry> procAdds = geometries;\n final Collection<? extends Geometry> procRemoves = removeKeyToGeoms.remove(key);\n processor.receiveObjects(this, procAdds, procRemoves == null ? Collections.<Geometry>emptyList() : procRemoves);\n if (processorCreated)\n {\n myGeometryProcessorsMap.put(addEntry.getKey(), processor);\n }\n if (LOGGER.isDebugEnabled())\n {\n if (processorCreated)\n {\n LOGGER.debug(\"Created processor for distribution key \" + addEntry.getKey());\n }\n LOGGER.debug(\"Added \" + geometries.size() + \", removed \" + (procRemoves == null ? 0 : procRemoves.size())\n + \" for processor \" + processor);\n }\n }\n\n return processorCreated;\n }", "@Override\n\tpublic Entry<K, V> insert(K key, V value) throws InvalidKeyException {\n\t\treturn null;\n\t}", "public void put(int id) {\n\t\tignoreLocations.put(id, System.currentTimeMillis());\n\t}", "@Override\n\tpublic void putAll(Map<? extends K, ? extends V> arg0) {\n\t\t\n\t}", "void doLogicalRemoveUnlocked(final TCServerMap map, final Object key);", "boolean add(Object key, Object value);", "@Override\n\t\t\tpublic AnalysisResult put(PathwayImpl key, AnalysisResult value) {\n\t\t\t\treturn null;\n\t\t\t}", "public void add(HayStack stack){\n if(canMoveTo(stack.getPosition())){\n mapElement.put(stack.getPosition(), stack);\n }\n else{\n throw new IllegalArgumentException(\"UnboundedMap.add - This field is occupied\");\n }\n }", "public synchronized V put(K key, V value)\n {\n // COH-6009: map mutations must be synchronized with event dispatch\n // to ensure in-order delivery\n return super.put(key, value);\n }", "public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }", "public boolean addVertex(GeographicPoint location)\n\t{\n\t\t// TODO: Implement this method in WEEK 3\n\t\tif (location == null) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (!map.containsKey(location)) {\n\t\t\tmap.put(location, new MapNode(location));\n\t\t\tnumVertices++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean addAll(MapP2P<K, V> mapP2P);", "public void remove(int key) {\n map.remove(key);\n }", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }", "@Override\n public void putAll(Map<? extends K, ? extends V> map) {\n throw new UnsupportedOperationException();\n }", "@Override\r\n\tpublic void putAll( Map<? extends K, ? extends V> m ) {\r\n\t\tif(this.spaceLeft() - countNewElements( m ) < 0)\r\n\t\t\tthrow new IllegalStateException(\"There is not enough space to put whole passed map.\");\r\n\t\tsuper.putAll( m );\r\n\t}", "@Override\r\n public void store(long key, O object) throws OBException {\n }", "public void put(Comparable key, Stroke stroke) {\n/* 120 */ ParamChecks.nullNotPermitted(key, \"key\");\n/* 121 */ this.store.put(key, stroke);\n/* */ }", "Object put(Object key, Object value);", "@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t\treturn v;\n\t}", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "void add(KeyType key, ValueType value);", "public void insert(K key, E val) {\n MapEntry<K, E> newEntry = new MapEntry<K, E>(key, val);\n int b = hash(key);\n for (SLLNode<MapEntry<K,E>> curr = buckets[b]; curr != null; curr = curr.succ) {\n if (key.equals(((MapEntry<K, E>) curr.element).key)) {\n curr.element = newEntry;\n return;\n }\n }\n buckets[b] = new SLLNode<MapEntry<K,E>>(newEntry, buckets[b]);\n }", "@Override\r\n\tpublic boolean insertAddress(Map<String, String> address) {\n\t\treturn ado.insertAddress(address);\r\n\t}", "@Test\n public void testPut_ExistingNoChange() {\n map.put(\"Hello\", \"World\");\n configureAnswer();\n\n testObject.put(\"Hello\", \"World\");\n\n verifyZeroInteractions(helper);\n }", "public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}" ]
[ "0.63689995", "0.6090081", "0.5754156", "0.5687844", "0.56416804", "0.5588914", "0.5541873", "0.5522061", "0.5456941", "0.5443192", "0.5435107", "0.5367936", "0.53450704", "0.53197664", "0.5303374", "0.5271285", "0.5270526", "0.5248692", "0.52465206", "0.5213614", "0.51999116", "0.51963013", "0.51844156", "0.5176396", "0.516531", "0.5148126", "0.5143964", "0.5142288", "0.5140225", "0.5139685", "0.5138861", "0.51313955", "0.51298743", "0.511356", "0.511102", "0.5110712", "0.50895995", "0.5063594", "0.505651", "0.5053646", "0.5049167", "0.5046458", "0.5045812", "0.50364864", "0.5033554", "0.5031368", "0.50294495", "0.50142044", "0.50128025", "0.5008999", "0.5002402", "0.4979921", "0.49761814", "0.49743837", "0.4957384", "0.49553564", "0.4950103", "0.4945335", "0.4932148", "0.49257606", "0.4923213", "0.4914374", "0.49140373", "0.49128383", "0.49083647", "0.4903353", "0.48883113", "0.48878217", "0.48798814", "0.48773655", "0.4876411", "0.48654684", "0.4861042", "0.48596817", "0.48560798", "0.48553374", "0.48545226", "0.4852378", "0.48443082", "0.4840706", "0.48404565", "0.48364627", "0.48310888", "0.48308194", "0.4826566", "0.48173162", "0.48144385", "0.48111024", "0.48094806", "0.48063567", "0.48015285", "0.4797012", "0.47964138", "0.47957003", "0.4794594", "0.47798795", "0.47793695", "0.47774577", "0.47767308", "0.4773308" ]
0.52135694
20
Add all tiles in the visible perspective below one location to the list of unchecked tiles again.
private void addAllBelow(@NonNull final Location searchLoc, final int limit) { int currX = searchLoc.getScX(); int currY = searchLoc.getScY(); int currZ = searchLoc.getScZ(); while (currZ >= limit) { currX += MapDisplayManager.TILE_PERSPECTIVE_OFFSET; currY -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET; currZ--; final long foundKey = Location.getKey(currX, currY, currZ); synchronized (unchecked) { if (!unchecked.contains(foundKey)) { unchecked.add(foundKey); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void setAllUnexplored() {\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (in_start(row, col) || in_goal(row, col)) {\n grid[row][col].setIsExplored(true);\n } else {\n grid[row][col].setIsExplored(false);\n }\n }\n }\n }", "private void revealTiles() {\n\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isRevealed()\n && !minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setText(\"<html><b>\" + minefield.getMinefield()[i][j].getMinedNeighbours() + \"</html></b>\");\n tile[i][j].setBackground(new Color(208, 237, 243));\n switch (tileLabel[i][j].getText()) {\n case \"<html><b>0</html></b>\":\n tileLabel[i][j].setText(\"\");\n break;\n case \"<html><b>1</html></b>\":\n tileLabel[i][j].setForeground(Color.blue);\n break;\n case \"<html><b>2</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 100, 0));\n break;\n case \"<html><b>3</html></b>\":\n tileLabel[i][j].setForeground(Color.red);\n break;\n case \"<html><b>4</html></b>\":\n tileLabel[i][j].setForeground(new Color(75, 0, 130));\n break;\n case \"<html><b>5</html></b>\":\n tileLabel[i][j].setForeground(new Color(130, 0, 0));\n break;\n case \"<html><b>6</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 153, 153));\n break;\n case \"<html><b>7</html></b>\":\n tileLabel[i][j].setForeground(Color.black);\n break;\n case \"<html><b>8</html></b>\":\n tileLabel[i][j].setForeground(Color.darkGray);\n break;\n }\n }\n }\n }\n frame.repaint();\n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }", "private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void setTray(ArrayList<Tile> newTray){ this.tray = newTray; }", "private void uncoverTiles(Set<Tile> tiles) {\r\n\t\tfor (Tile tile : tiles) {\r\n\t\t\t// Update status\r\n\t\t\ttile.setStatus(TileStatus.UNCOVERED);\r\n\r\n\t\t\t// Update button\r\n\t\t\tJButton button = boardButtons[tile.getX()][tile.getY()];\r\n\t\t\tbutton.setEnabled(false);\r\n\t\t\tbutton.setText(tile.getRank() == 0 ? \"\" : String.valueOf(tile.getRank()));\r\n\t\t}\r\n\t}", "private void moveTiles(ArrayList<MahjongSolitaireTile> from, ArrayList<MahjongSolitaireTile> to)\n {\n // GO THROUGH ALL THE TILES, TOP TO BOTTOM\n for (int i = from.size()-1; i >= 0; i--)\n {\n MahjongSolitaireTile tile = from.remove(i);\n \n // ONLY ADD IT IF IT'S NOT THERE ALREADY\n if (!to.contains(tile))\n to.add(tile);\n } \n }", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public static void clearAllTileTypes(){\n\t\tTileType.allTileTypes.clear();\n\t}", "private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }", "public ArrayList<Tile> getEmptyTiles(){\n\t\tArrayList<Tile> emptyTiles = new ArrayList<Tile>();\n\t\tArrayList<Tile> boardTiles = getAllBoardTiles();\n\t\tfor (Tile tile : boardTiles) {\n\t\t\tif(tile.getPiece()== null && tile.getColor1()== PrimaryColor.BLACK) {\n\t\t\t\temptyTiles.add(tile);\n\t\t\t}\n\t\t}\n\t\treturn emptyTiles;\n\t}", "@Override\n public void revealAllMines() {\n for (Tile[] tiles : grid) {\n for (Tile t : tiles) {\n if (t.getType() == Tile.MINE) {\n t.setState(Tile.REVEALED);\n }\n }\n }\n }", "public static ArrayList<FloorTile> getEffectedTiles() {\r\n\r\n ArrayList<FloorTile> temp = new ArrayList<>();\r\n for(int i = GameControl.ytile-1; i < GameControl.ytile + 2; i++) {\r\n for(int j = GameControl.xtile-1; j < GameControl.xtile + 2; j++) {\r\n if(i >= 0 && i < board.length && j >= 0 && j < board[0].length) {\r\n temp.add(board[i][j]);\r\n }\r\n }\r\n }\r\n return temp;\r\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\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 ArrayList<Tile> getAllBoardTiles() {\n\n\t\tArrayList<ArrayList<Tile>> tilesMapValues=new ArrayList<ArrayList<Tile>>(getTilesMap().values()) ;\n\t\tArrayList<Tile> allTiles =new ArrayList<Tile>() ;\n\t\tfor(ArrayList<Tile> tileList : tilesMapValues) {\n\t\t\tallTiles.addAll(tileList);\n\n\t\t}\n\t\treturn allTiles;\n\t}", "public void clearInvisible() {\n\n Collection<NotificationPopup> syncList = Collections.synchronizedCollection(this);\n \n synchronized(syncList) {\n Collection del = new LinkedList();\n for (NotificationPopup n : syncList) {\n if (n.isVisible() == false) {\n del.add(n);\n }\n }\n\n syncList.removeAll(del);\n }\n\n }", "public void updateClearedTiles() {\r\n clearedTiles++;\r\n String text = String.format(\"Cleared tiles: %s / %s\",\r\n clearedTiles,\r\n tileList.size() - MINES);\r\n clearedTilesLabel.clear().drawText(text, 10, 10);\r\n\r\n // Check if cleared game\r\n if (clearedTiles == (tileList.size() - MINES)) {\r\n gameEngine.setScreen(new WinScreen(gameEngine));\r\n }\r\n }", "public void shuffleTiles() {\n\t\tdo {\n\t\t\tCollections.shuffle(tiles);\n\n\t\t\t// Place the blank tile at the end\n\t\t\ttiles.remove(theBlankTile);\n\t\t\ttiles.add(theBlankTile);\n\n\t\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\t\ttileViews.get(row * gridSize + column).setCurrentTile(\n\t\t\t\t\t\t\ttiles.get(row * gridSize + column));\n\t\t\t\t}\n\t\t\t}\n\t\t} while (!isSolvable());\n\t\tmoveCount = 0;\n\n\t}", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "public void hideInnerMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if(maze[i][j] == VISIBLESPACE){\n maze[i][j] = NOTVISIBLESPACE;\n }\n }\n }\n\n //SET OUTER WALL TO VISIBLE\n for(int i = 0; i < 20; i ++){\n maze[i][0] = VISIBLEWALL;\n maze[i][14] = VISIBLEWALL;\n }\n for(int i = 0; i < 15; i ++){\n maze[0][i] = VISIBLEWALL;\n maze[19][i] = VISIBLEWALL;\n }\n }", "private void enableAllTiles() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tplayerBoard[j][i].setEnabled(true);\n\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"t\");\n\t\t\t\tplayerBoard[j][i].setForeground(Color.lightGray);\n\t\t\t\tplayerBoard[j][i].setBackground(Color.darkGray);\n\t\t\t}\n\t\t}\n\t}", "public void removeTile(int i)\n {\n int c = 0;\n for(Tile t: tiles)\n {\n if(t != null)\n c += 1;\n }\n c -=1;\n \n \n if(!(c < 2))\n {\n if(i == c)\n {\n tiles[i] = null;\n previews[i] = null;\n previewGradients[i] = null;\n previewHover[i] = false;\n activeTile = i-1;\n createPreviewGradients();\n return;\n }\n else\n {\n int last = 0;\n for(int j = i; j < c; j++)\n {\n tiles[j] = tiles[j+1];\n if(tiles[j] != null)\n tiles[j].setTileLevel(j);\n previews[j] = previews[j+1];\n previewGradients[j] = previewGradients[j+1];\n previewHover[j] = previewHover[j+1];\n last = j;\n }\n last += 1;\n tiles[last] = null;\n previews[last] = null;\n previewGradients[last] = null;\n previewHover[last] = false;\n createPreviewGradients();\n \n return;\n }\n }\n \n }", "public void flipHidden()\n {\n for(int i=0;i<7;i++)\n {\n if(tableauVisible[i].isEmpty() && !tableauHidden[i].isEmpty())\n tableauVisible[i].forcePush(tableauHidden[i].pop());\n } \n }", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "private void updateAllTiles() {\r\n mEntireBoard.updateDrawableState();\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large].updateDrawableState();\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small].updateDrawableState();\r\n }\r\n }\r\n }", "private static void addUnexploredTile(DisplayTile tile, HashMap<DisplayTile, DisplayTile> chainedTiles, LinkedList<DisplayTile> tilesToExplore) {\n\t\tif (!tile.isRoomTile() && tile.isPassage()) {\n\t\t\tchainedTiles.put(tile, null);\n\t\t\ttile = tile.getPassageConnection();\n\t\t}\n\t\ttilesToExplore.add(tile);\n\t}", "public void updateColoredTileListAfterOrange(){\n\t\tArrayList<Tile> tiles = null;\n\t\tif(Game.getInstance().getTurn().getLastPieceMoved() != null) {\n\t\t\tif(Game.getInstance().getTurn().getLastPieceMoved().getEatingCntr() > 0 || Game.getInstance().getTurn().isLastTileRed()) {\n\t\t\t\ttiles = Game.getInstance().getTurn().getLastPieceMoved().getPossibleMoves(Game.getInstance().getCurrentPlayerColor());\n\t\t\t}\n\t\t}else {\n\t\t\ttiles = Board.getInstance().getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\n\t\t}\n\n\t\tArrayList<Tile> coloredTilesToRemove=new ArrayList<Tile>();\t\t\n\t\tfor(Tile t:this.coloredTilesList) {\n\t\t\tif(tiles.contains(t)) {\n\n\t\t\t\tcoloredTilesToRemove.add(t);\n\t\t\t}\n\n\t\t}\n\n\t\tthis.coloredTilesList.removeAll(coloredTilesToRemove);\n\t\tthis.coloredTilesList.addAll(this.orangeTiles);\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\t}", "public void markDangerTiles() {\n List<Tile> dangerTiles = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y);\n if (dangerTiles.contains(this.gb.get(this.us_head_x, this.us_head_y)))\n return; // Don't force fill if our head is there\n for (Tile t : dangerTiles)\n t.setForceFilled(true);\n }", "public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }", "public void moveAllTilesToStack()\n {\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> cellStack = tileGrid[i][j];\n moveTiles(cellStack, stackTiles);\n }\n } \n }", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "private void clearHighlightAfterMove() {\n //clear start\n getTileAt(start).clear();\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).clear();\n }\n }", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\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 moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "protected void mergeVisible ()\n {\n List<Integer> visible = getVisibleLayers();\n // remove the first layer and call that the \"mergeTo\" layer\n int mergeTo = visible.remove(0); // remove first value, not value 0!\n\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (visible.contains(_scene.getLayer(key))) {\n _scene.setLayer(key, mergeTo);\n }\n }\n\n // kill the layers, highest to lowest\n for (Integer layer : Lists.reverse(visible)) {\n _tableModel.removeLayer(layer);\n }\n fireStateChanged();\n }", "public void removeAllAgents()\n/* 76: */ {\n/* 77:125 */ this.mapPanel.removeAllAgents();\n/* 78: */ }", "public void createTiles() {\r\n Session session = sessionService.getCurrentSession();\r\n Campaign campaign = session.getCampaign();\r\n\r\n tilePane.getChildren().clear();\r\n List<Pc> pcs = null;\r\n try {\r\n pcs = characterService.getPlayerCharacters();\r\n } catch (MultiplePlayersException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (pcs != null) {\r\n pcs = pcs.stream().filter(pc -> campaign.getPcs().stream().anyMatch(\r\n campaignPc -> campaignPc.getId().equalsIgnoreCase(pc.getId())\r\n )).collect(Collectors.toList());\r\n\r\n for (Pc pc : pcs) {\r\n SortedMap<String, String> items = getTileItems(pc);\r\n Tile tile = new Tile(pc.getId(), pc.getName(), items);\r\n tile.setOnMouseClicked(mouseEvent -> {\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), tile.getObjectId());\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n parentController.updateSession(sessionService.getCurrentSession());\r\n parentController.switchView();\r\n });\r\n tilePane.getChildren().add(tile);\r\n }\r\n }\r\n }", "private ArrayList<Tile> getPossibleRedTiles(){\n\t\tArrayList<Tile> toReturn = new ArrayList<>();\n\n\t\tGame game=Game.getInstance();\n\t\tArrayList<Tile> legalTiles= getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tArrayList<Tile> blockedTiles=new ArrayList<Tile>();\n\t\tlegalTiles.removeAll(coloredTilesList);\n\n\t\t//\t\tonly one soldier can move\n\t\tif(game.getTurn().isLastTileRed()) {\n\t\t\tPiece lastPMoved = game.getTurn().getLastPieceMoved();\n\t\t\tArrayList<Tile> possibleTiles=lastPMoved.getPossibleMoves(game.getCurrentPlayerColor());\n\t\t\tpossibleTiles.removeAll(coloredTilesList);\n\t\t\tif(!possibleTiles.isEmpty()) {\n\t\t\t\tfor(Tile t: possibleTiles) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(lastPMoved instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tblockedTiles.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpossibleTiles.removeAll(blockedTiles);\n\t\t\t}\n\t\t\ttoReturn = possibleTiles;\n\t\t}\n\t\telse {\n\t\t\tHashMap<Tile, ArrayList<Piece>> tempCollection = new HashMap<>();\n\n\t\t\tfor(Tile t:legalTiles) {\n\t\t\t\tfor(Piece p : getColorPieces(Game.getInstance().getCurrentPlayerColor())){\n\t\t\t\t\tboolean canMove = false;\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(canMove) {\n\t\t\t\t\t\tArrayList<Piece> pp = null;\n\t\t\t\t\t\tif(!tempCollection.containsKey(t)) {\n\t\t\t\t\t\t\tpp = new ArrayList<>();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpp = tempCollection.get(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpp.add(p);\n\t\t\t\t\t\ttempCollection.put(t, pp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tArrayList<Tile> tilesToRemove = new ArrayList<>();\n\n\t\t\tfor(Tile t : tempCollection.keySet()) {\n\t\t\t\tArrayList<Piece> pieces= tempCollection.get(t);\n\t\t\t\tfor(Piece p : pieces) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(p instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tif(!tilesToRemove.contains(t))\n\t\t\t\t\t\t\ttilesToRemove.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Tile t : tilesToRemove) {\n\t\t\t\ttempCollection.remove(t);\n\t\t\t}\n\n\t\t\ttoReturn = new ArrayList<Tile>(tempCollection.keySet());\t\n\t\t}\n\t\treturn toReturn;\n\t}", "private void setAtomsToUnPlaced(IMolecule molecule) {\n\t\tfor (int i = 0; i < molecule.getAtomCount(); i++) {\n\t\t\tmolecule.getAtom(i).setFlag(CDKConstants.ISPLACED, false);\n\t\t}\n\t}", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "public static void removeSomeWalls(TETile[][] t) {\n for (int x = 1; x < WIDTH - 1; x++) {\n for (int y = 1; y < HEIGHT - 1; y++) {\n if (t[x][y] == Elements.TREE\n && t[x + 1][y] == Elements.FLOOR) {\n if (t[x - 1][y] == Elements.FLOOR\n && t[x][y + 1] == Elements.FLOOR) {\n if (t[x][y - 1] == Elements.FLOOR\n && t[x + 1][y + 1] == Elements.FLOOR) {\n if (t[x + 1][y - 1] == Elements.FLOOR\n && t[x - 1][y + 1] == Elements.FLOOR) {\n if (t[x - 1][y - 1] == Elements.FLOOR) {\n t[x][y] = Elements.FLOOR;\n }\n }\n }\n }\n }\n }\n }\n }", "private void disableRestrictedTiles(int x, int y) {\n\t\tif (shipsToPlace == 3) {\n\t\t\tfor (int i = 6; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[i][j].setEnabled(false);\n\t\t\t\t\tplayerBoard[i][j].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[i][j].setName((j) + \"\" + (i) + \"f\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (shipsToPlace == 2) {\n\t\t\t// disables long ship tiles\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (y - i >= 0) {\n\t\t\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setName((x + j) + \"\" + (y - i) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disables restricted tiles\n\t\t\tfor (int i = 8; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the second ship\");\n\t\t} else if (shipsToPlace == 1) {\n\t\t\t// disable medium ship tiles\n\t\t\tif (y - 1 >= 0) {\n\t\t\t\tplayerBoard[x][y - 1].setEnabled(false);\n\t\t\t\tplayerBoard[x][y - 1].setBackground(Color.lightGray);\n\t\t\t\tplayerBoard[x][y - 1].setName(x + \"\" + (y - 1) + \"f\");\n\t\t\t}\n\t\t\tplayerBoard[x][y].setEnabled(false);\n\t\t\tplayerBoard[x][y + 1].setEnabled(false);\n\t\t\tplayerBoard[x][y + 2].setEnabled(false);\n\n\t\t\tplayerBoard[x][y].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 1].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 2].setBackground(Color.lightGray);\n\n\t\t\tplayerBoard[x][y].setName(x + \"\" + y + \"f\");\n\t\t\tplayerBoard[x][y + 1].setName(x + \"\" + (y + 1) + \"f\");\n\t\t\tplayerBoard[x][y + 2].setName(x + \"\" + (y + 2) + \"f\");\n\n\t\t\t// disables long ship tiles\n\t\t\tfor (int counter1 = 0; counter1 < 2; counter1++) {\n\t\t\t\tif (longShipCoords[1] - counter1 >= 0) {\n\n\t\t\t\t\tfor (int longcount = 0; longcount < 5; longcount++) {\n\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setName((longShipCoords[0] + longcount) + \"\" + (longShipCoords[1] - counter1) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disable restricted tiles\n\t\t\tfor (int i = 9; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the third ship\");\n\t\t} else {\n\t\t\tenableAllTiles();\n\t\t}\n\t}", "private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "private void setAvailableFromLastMove(int small) {\r\n clearAvailable();\r\n // Make all the tiles at the destination available\r\n if (small != -1) {\r\n for (int dest = 0; dest < 9; dest++) {\r\n Tile tile = mSmallTiles[small][dest];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n // If there were none available, make all squares available\r\n if (mAvailable.isEmpty()) {\r\n setAllAvailable();\r\n }\r\n }", "public ArrayList<Movable> getProjectiles(){\n\t\tArrayList<Movable> moving = new ArrayList<Movable>(temp);\n\t\ttemp = new ArrayList<Movable>();\n\t\treturn moving;\n\t}", "public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }", "public static void DeterminarArregloDeMisiles() {\n\t\tVectorDeMisilesCrucerosPorNivel[3] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[4] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[7] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[8] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[11] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[12] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[15] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[16] = true;\n\t}", "public void displayTiles() {\n System.out.println(\"\\n Tiles of this game : \");\n String phrase = \"No army deployed on this tile !\";\n for (Tile tile : this.board.getAllTiles()) {\n if (!tile.isEmpty()) {\n System.out.print(\" { Type tile : \" + tile.getCharacter() + \", Position Y : \" + tile.getPosX() +\", Position X : \" + tile.getPosY() + \", State : Occuped, Player : \" + tile.getPlayer().getName() + \", Army : \" + tile.getPersonnage().getName() + \", Army size : \" +((Army) tile.getPersonnage()).getArmySize() + \"}\\n\");\n } else {\n System.out.print(\" { Type tile : \" + tile.getCharacter() +\", Position Y : \" + tile.getPosX() +\", Position X : \" + tile.getPosY()+ \", State : \"+ phrase + \" }\\n\");\n }\n }\n }", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean isTileFriendly(){\n return false;\n }", "public void removeAll()\r\n {\r\n if (level ==2)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(SmallPlatform.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Tomato.class)); \r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n player.setLocation();\r\n }\r\n if (level == 3)\r\n {\r\n removeObjects(getObjects(Tomato.class));\r\n removeObject(door2);\r\n removeObjects(getObjects(Canon.class));\r\n removeObjects(getObjects(CanonBullet.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Pedestal.class));\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n }\r\n if (level == 4)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Text.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Boss.class)); \r\n removeObjects(getObjects(Thorns.class));\r\n player.setLocation();\r\n }\r\n }", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "public void removeAllMissiles(){\n\t\tfor (Missile missile : this.missiles){\n\t\t\tif(!missile.isDestroyed() && missile != null){\n\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\tmissile = null;\n\t\t\t}\n\t\t}\n\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\tfMissile = null;\n\t\t\t}\n\t\t}\n\t}", "private void huntMode() {\n if (!alreadyHit(hitLocationX+1, hitLocationY)){ // tests to see if they're already shot at\n if (hitLocationX < 9) { // doesn't add if they're on a border\n huntList.add(new Point(hitLocationX + 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY+1)){\n if (hitLocationY < 9) {\n huntList.add(new Point(hitLocationX, hitLocationY + 1));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX-1, hitLocationY)){\n if (hitLocationX > 0) {\n huntList.add(new Point(hitLocationX - 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY-1)){\n if (hitLocationY > 0) {\n huntList.add(new Point(hitLocationX, hitLocationY - 1));\n huntCount++;\n huntModeActive++;\n }\n }\n }", "private void shootLaser() {\n\t\tfor(int i = 0; i<lasers.size(); i++) {\n\t\t\tif(lasers.get(i).getLayoutY() > -lasers.get(i).getBoundsInParent().getHeight() ) { //-37 wenn unterhalb des windows \n\t\t\t\tlasers.get(i).relocate(lasers.get(i).getLayoutX(), lasers.get(i).getLayoutY() - 3); //um 3 pixel nach oben bewegen\n\t\t\t}\n\t\t\telse { //wenn oberhalb des windows \n\t\t\t\t\n\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\tlasers.remove(i);\n\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t}\n\t\t}\n\t}", "public void paintVisible(Graphics g){\n\n for (int i = 0; i < listOfTiles.size(); i++) {\n //In setPixels, the 3rd arguement is essentially the \"z\" height\n TileView holder = listOfTiles.get(i);\n\n //The tile Y pixels should be increased based on the z coordinate per column\n yPixel -= 8; //Now this will be the same as paintMapObjects\n holder.setPixels(xPixel, yPixel);\n holder.paintComponent(g);\n }\n }", "void move_missiles() {\n // Ship missiles\n ship.moveMissiles();\n for (int i = 0; i < ship_missile_image_views.size(); i++) {\n ship_missile_image_views.get(i).setY(ship.missiles.get(i).y_position);\n }\n\n // Enemy missiles\n Alien.moveMissiles();\n for (int i = 0; i < alien_missile_image_views.size(); i++) {\n alien_missile_image_views.get(i).setY(Alien.missiles.get(i).y_position);\n }\n }", "@Override\n protected void generateTiles() {\n }", "private void checkMoves(Tile t, MouseEvent e, ImageView img)\n {\n for(Tile tile : gb.getTiles())\n {\n tile.setStyle(null);\n tile.setOnMouseClicked(null);\n }\n ArrayList<Move> moves = t.getPiece().availableMoves(gb);\n for(Move m : moves)\n {\n gb.getTile(m.getX(),m.getY()).setStyle(\"-fx-background-color: #98FB98;\");\n gb.getTile(m.getX(),m.getY()).setOnMouseClicked(ev -> {\n if(ev.getTarget().getClass() == Tile.class)\n {\n movePiece(e,ev,t,img,moves);\n }\n else\n {\n ImageView img1 = (ImageView) ev.getTarget();\n Tile t2 = (Tile) img1.getParent();\n if(t2.isOccupied())\n {\n if(t2.getPiece().getClass() == King.class)\n {\n gb.setBlackKing(false);\n if(gameLogic.game(mainPane,gb.isBlackKing()))\n {\n cleanUp();\n }\n else {\n Platform.exit();\n }\n }\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n\n }\n else\n {\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n }\n cleanUpTile(moves);\n ev.consume();\n e.consume();\n }\n });\n }\n e.consume();\n }", "private void addAllAbove(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ <= limit) {\n currX -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ++;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}", "public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tboard.fillSpace(GridSquare.Type.EMPTY, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public boolean hasTiles()\r\n\t{\r\n\t\treturn _tiles.size() != 0;\r\n\t}", "public ArrayList<ObjectInMap> getVisibleObjects() {\n //To ensure Obstacles will be drawn at last\n objectsInMap.sort((o1, o2) -> {\n if (o1 instanceof Bush)\n return 1;\n else if (o2 instanceof Bush)\n return -1;\n else if (o1 instanceof Obstacle)\n return -1;\n else if (o2 instanceof Obstacle)\n return 1;\n else\n return 0;\n });\n\n Polygon visible = new Polygon(new int[]{viewPoint.x, ((int) (viewPoint.x + zoom * GAME_WIDTH)), ((int) (viewPoint.x + zoom * GAME_WIDTH)), viewPoint.x}\n , new int[]{viewPoint.y, viewPoint.y, ((int) (viewPoint.y + zoom * GAME_HEIGHT)), ((int) (viewPoint.y + zoom * GAME_HEIGHT))}, 4);\n\n return objectsInMap.stream().filter(o -> o.intersects(visible)).collect(Collectors.toCollection(ArrayList::new));\n }", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "public void moveTileBack()\n {\n if(!(activeTile-1 < 0) && activeTile > 0)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile-1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile-1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile-1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile-1].getEndColor());\n \n tiles[activeTile-1].setTileLevel(tiles[activeTile-1].getTileLevel()+1);\n tiles[activeTile] = tiles[activeTile-1];\n previews[activeTile] = previews[activeTile-1];\n previewGradients[activeTile] = previewGradients[activeTile-1];\n previewHover[activeTile] = previewHover[activeTile-1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()-1);\n tiles[activeTile-1] = tmpTile;\n tiles[activeTile-1].setStartColor(tiles[activeTile-1].getStartColor());\n previews[activeTile-1] = tmpPreview;\n previewGradients[activeTile-1] = tmpPreviewGradients;\n previewHover[activeTile-1] = tmpPreviewHover;\n \n activeTile -= 1;\n createPreviewGradients();\n }\n }", "void removeFromAvailMoves(int x, int y) {\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tavailMoves[x][y][i] = false;\n\t\t}\n\t}", "private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }", "private void moveTileItemToOther(int i) {\n if (this.mTiles.size() > this.mSpanCount * 2) {\n ((SystemUIStat) Dependency.get(SystemUIStat.class)).handleControlCenterEvent(new QuickTilesRemovedEvent(this.mTiles.get(i).spec));\n this.mQSControlCustomizer.addInTileAdapter(this.mTiles.get(i), false);\n this.mTiles.remove(i);\n notifyItemRemoved(i);\n saveSpecs(this.mHost, false);\n }\n }", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "private void layTiles(TiledMapManager mapManager) {\n board = new Tile[height][width];\n for (int row = 0; row < height; row++) {\n for (int col = 0; col < width; col++) {\n TiledMapTile tile = mapManager.getCell(\"TILES\", row, col).getTile();\n String tileType = (String) tile.getProperties().get(\"Type\");\n Tile currentTile;\n switch (tileType) {\n case \"GEAR\":\n boolean clockwise = (boolean) tile.getProperties().get(\"Clockwise\");\n currentTile = new Gear(row, col, clockwise);\n break;\n case \"HOLE\":\n currentTile = new Hole(row, col);\n break;\n case \"DOCK\":\n int number = (Integer) tile.getProperties().get(\"Number\");\n currentTile = new Dock(number, row, col);\n docks.add((Dock) currentTile);\n break;\n case \"CONVEYOR_BELT\":\n currentTile = installConveyorBelt(mapManager, row, col);\n break;\n case \"REPAIR_SITE\":\n currentTile = new RepairSite(row, col);\n break;\n default:\n currentTile = new Tile(row, col);\n break;\n }\n layTile(currentTile);\n }\n }\n Collections.sort(docks);\n }", "private void addAttacks(){\n while(!attacksToAdd.isEmpty()){\n attacks.add(attacksToAdd.remove());\n }\n }", "public void showMapFilters() {\n filterPane.getChildren().clear();\n }", "private void begin(){\n for(int i = 0; i < height; i++){ //y\n for(int j = 0; j < width; j++){ //x\n for(int k = 0; k < ids.length; k++){\n if(m.getTileids()[j][i].equals(ids[k])){\n map[j][i] = Handler.memory.getTiles()[k];\n //Handler.debug(\"is tile null: \" + (Handler.memory.getTiles()[k] == null));\n \n k = ids.length;\n }else if(k == (ids.length - 1)){\n Handler.debug(\"something went wrong\", true);\n\n }\n }\n }\n }\n mt.setCleared(clear);\n mt.setMap(map);\n \n \n }", "public void pullPlayerTiles() {\r\n\t\tRandom r = new Random();\r\n\t\tfor (int i=0; i < 7; i++) {\r\n\t\t\tint random = r.nextInt(Launch.getBoneyard().size());\r\n\t\t\t//System.out.println(\"[debug] random = \"+random);\r\n\t\t\t//System.out.println(\"[debug] index\"+random+\" in BONEYARD = \"+Arrays.toString(Launch.BONEYARD.get(random).getDots()));\r\n\t\t\tif (Utils.isSet(Launch.getBoneyard(), random)) {\r\n\t\t\t\tPLAYER_DOMINOS.add(Launch.getBoneyard().get(random));\r\n\t\t\t\tLaunch.getBoneyard().remove(random);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void recalcSpecs() {\n if (!(this.mCurrentSpecs == null || this.mAllTiles == null)) {\n this.mTiles.clear();\n this.mOtherTiles.clear();\n ArrayList arrayList = new ArrayList(this.mAllTiles);\n for (int i = 0; i < this.mCurrentSpecs.size(); i++) {\n TileQueryHelper.TileInfo andRemoveOther = getAndRemoveOther(this.mCurrentSpecs.get(i), arrayList);\n if (andRemoveOther != null) {\n this.mTiles.add(andRemoveOther);\n }\n }\n this.mTileDividerIndex = this.mTiles.size();\n this.mOtherTiles.addAll(arrayList);\n this.mEditIndex = this.mTiles.size();\n notifyDataSetChanged();\n }\n }" ]
[ "0.6263487", "0.61789846", "0.60559464", "0.6032589", "0.60176754", "0.59807056", "0.59075505", "0.58395463", "0.5792919", "0.57321894", "0.572714", "0.570131", "0.56808156", "0.5663819", "0.5655627", "0.564519", "0.5644494", "0.56344193", "0.5587106", "0.5552259", "0.5509951", "0.5497164", "0.54787743", "0.54627794", "0.54469603", "0.5418069", "0.53992677", "0.53946984", "0.5378811", "0.53753203", "0.5371439", "0.53701586", "0.5346365", "0.5334664", "0.5334201", "0.53207684", "0.53169703", "0.5300515", "0.5284987", "0.5277774", "0.5277593", "0.526708", "0.52572703", "0.52528703", "0.5249651", "0.52398926", "0.5235725", "0.5216025", "0.5211771", "0.5201858", "0.5198079", "0.5184766", "0.51768595", "0.5171381", "0.5166704", "0.5156635", "0.51549584", "0.51461846", "0.51368934", "0.5134578", "0.51287633", "0.5128575", "0.51275295", "0.5127031", "0.5119468", "0.5114758", "0.51108235", "0.51081395", "0.5106719", "0.509893", "0.5098783", "0.50808656", "0.5075053", "0.5069091", "0.50676626", "0.5064596", "0.5056625", "0.5055134", "0.503635", "0.5035383", "0.5034018", "0.50235367", "0.5015149", "0.50131017", "0.49975824", "0.49950632", "0.49875477", "0.4986141", "0.4984957", "0.4984195", "0.49837628", "0.49778563", "0.4977449", "0.4975926", "0.49746186", "0.4974574", "0.49742576", "0.4967669", "0.49650577", "0.49647102" ]
0.5062259
76
Add all tiles in the visible perspective above one location to the list of unchecked tiles again.
private void addAllAbove(@NonNull final Location searchLoc, final int limit) { int currX = searchLoc.getScX(); int currY = searchLoc.getScY(); int currZ = searchLoc.getScZ(); while (currZ <= limit) { currX -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET; currY += MapDisplayManager.TILE_PERSPECTIVE_OFFSET; currZ++; final long foundKey = Location.getKey(currX, currY, currZ); synchronized (unchecked) { if (!unchecked.contains(foundKey)) { unchecked.add(foundKey); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "public void setAllUnexplored() {\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (in_start(row, col) || in_goal(row, col)) {\n grid[row][col].setIsExplored(true);\n } else {\n grid[row][col].setIsExplored(false);\n }\n }\n }\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }", "private void revealTiles() {\n\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isRevealed()\n && !minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setText(\"<html><b>\" + minefield.getMinefield()[i][j].getMinedNeighbours() + \"</html></b>\");\n tile[i][j].setBackground(new Color(208, 237, 243));\n switch (tileLabel[i][j].getText()) {\n case \"<html><b>0</html></b>\":\n tileLabel[i][j].setText(\"\");\n break;\n case \"<html><b>1</html></b>\":\n tileLabel[i][j].setForeground(Color.blue);\n break;\n case \"<html><b>2</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 100, 0));\n break;\n case \"<html><b>3</html></b>\":\n tileLabel[i][j].setForeground(Color.red);\n break;\n case \"<html><b>4</html></b>\":\n tileLabel[i][j].setForeground(new Color(75, 0, 130));\n break;\n case \"<html><b>5</html></b>\":\n tileLabel[i][j].setForeground(new Color(130, 0, 0));\n break;\n case \"<html><b>6</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 153, 153));\n break;\n case \"<html><b>7</html></b>\":\n tileLabel[i][j].setForeground(Color.black);\n break;\n case \"<html><b>8</html></b>\":\n tileLabel[i][j].setForeground(Color.darkGray);\n break;\n }\n }\n }\n }\n frame.repaint();\n }", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "private void uncoverTiles(Set<Tile> tiles) {\r\n\t\tfor (Tile tile : tiles) {\r\n\t\t\t// Update status\r\n\t\t\ttile.setStatus(TileStatus.UNCOVERED);\r\n\r\n\t\t\t// Update button\r\n\t\t\tJButton button = boardButtons[tile.getX()][tile.getY()];\r\n\t\t\tbutton.setEnabled(false);\r\n\t\t\tbutton.setText(tile.getRank() == 0 ? \"\" : String.valueOf(tile.getRank()));\r\n\t\t}\r\n\t}", "public void setTray(ArrayList<Tile> newTray){ this.tray = newTray; }", "public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }", "private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "private void moveTiles(ArrayList<MahjongSolitaireTile> from, ArrayList<MahjongSolitaireTile> to)\n {\n // GO THROUGH ALL THE TILES, TOP TO BOTTOM\n for (int i = from.size()-1; i >= 0; i--)\n {\n MahjongSolitaireTile tile = from.remove(i);\n \n // ONLY ADD IT IF IT'S NOT THERE ALREADY\n if (!to.contains(tile))\n to.add(tile);\n } \n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "public void clearInvisible() {\n\n Collection<NotificationPopup> syncList = Collections.synchronizedCollection(this);\n \n synchronized(syncList) {\n Collection del = new LinkedList();\n for (NotificationPopup n : syncList) {\n if (n.isVisible() == false) {\n del.add(n);\n }\n }\n\n syncList.removeAll(del);\n }\n\n }", "public void flipHidden()\n {\n for(int i=0;i<7;i++)\n {\n if(tableauVisible[i].isEmpty() && !tableauHidden[i].isEmpty())\n tableauVisible[i].forcePush(tableauHidden[i].pop());\n } \n }", "public static ArrayList<FloorTile> getEffectedTiles() {\r\n\r\n ArrayList<FloorTile> temp = new ArrayList<>();\r\n for(int i = GameControl.ytile-1; i < GameControl.ytile + 2; i++) {\r\n for(int j = GameControl.xtile-1; j < GameControl.xtile + 2; j++) {\r\n if(i >= 0 && i < board.length && j >= 0 && j < board[0].length) {\r\n temp.add(board[i][j]);\r\n }\r\n }\r\n }\r\n return temp;\r\n }", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public void hideInnerMaze(){\n for(int i = 0; i < 20; i ++){\n for(int j = 0; j < 15; j ++){\n if(maze[i][j] == VISIBLESPACE){\n maze[i][j] = NOTVISIBLESPACE;\n }\n }\n }\n\n //SET OUTER WALL TO VISIBLE\n for(int i = 0; i < 20; i ++){\n maze[i][0] = VISIBLEWALL;\n maze[i][14] = VISIBLEWALL;\n }\n for(int i = 0; i < 15; i ++){\n maze[0][i] = VISIBLEWALL;\n maze[19][i] = VISIBLEWALL;\n }\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\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}", "@Override\n public void revealAllMines() {\n for (Tile[] tiles : grid) {\n for (Tile t : tiles) {\n if (t.getType() == Tile.MINE) {\n t.setState(Tile.REVEALED);\n }\n }\n }\n }", "protected void mergeVisible ()\n {\n List<Integer> visible = getVisibleLayers();\n // remove the first layer and call that the \"mergeTo\" layer\n int mergeTo = visible.remove(0); // remove first value, not value 0!\n\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (visible.contains(_scene.getLayer(key))) {\n _scene.setLayer(key, mergeTo);\n }\n }\n\n // kill the layers, highest to lowest\n for (Integer layer : Lists.reverse(visible)) {\n _tableModel.removeLayer(layer);\n }\n fireStateChanged();\n }", "public ArrayList<Tile> getEmptyTiles(){\n\t\tArrayList<Tile> emptyTiles = new ArrayList<Tile>();\n\t\tArrayList<Tile> boardTiles = getAllBoardTiles();\n\t\tfor (Tile tile : boardTiles) {\n\t\t\tif(tile.getPiece()== null && tile.getColor1()== PrimaryColor.BLACK) {\n\t\t\t\temptyTiles.add(tile);\n\t\t\t}\n\t\t}\n\t\treturn emptyTiles;\n\t}", "private void setAtomsToUnPlaced(IMolecule molecule) {\n\t\tfor (int i = 0; i < molecule.getAtomCount(); i++) {\n\t\t\tmolecule.getAtom(i).setFlag(CDKConstants.ISPLACED, false);\n\t\t}\n\t}", "public void markDangerTiles() {\n List<Tile> dangerTiles = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y);\n if (dangerTiles.contains(this.gb.get(this.us_head_x, this.us_head_y)))\n return; // Don't force fill if our head is there\n for (Tile t : dangerTiles)\n t.setForceFilled(true);\n }", "public void updateClearedTiles() {\r\n clearedTiles++;\r\n String text = String.format(\"Cleared tiles: %s / %s\",\r\n clearedTiles,\r\n tileList.size() - MINES);\r\n clearedTilesLabel.clear().drawText(text, 10, 10);\r\n\r\n // Check if cleared game\r\n if (clearedTiles == (tileList.size() - MINES)) {\r\n gameEngine.setScreen(new WinScreen(gameEngine));\r\n }\r\n }", "private void clearHighlightAfterMove() {\n //clear start\n getTileAt(start).clear();\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).clear();\n }\n }", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }", "public static void clearAllTileTypes(){\n\t\tTileType.allTileTypes.clear();\n\t}", "public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }", "public void removeTile(int i)\n {\n int c = 0;\n for(Tile t: tiles)\n {\n if(t != null)\n c += 1;\n }\n c -=1;\n \n \n if(!(c < 2))\n {\n if(i == c)\n {\n tiles[i] = null;\n previews[i] = null;\n previewGradients[i] = null;\n previewHover[i] = false;\n activeTile = i-1;\n createPreviewGradients();\n return;\n }\n else\n {\n int last = 0;\n for(int j = i; j < c; j++)\n {\n tiles[j] = tiles[j+1];\n if(tiles[j] != null)\n tiles[j].setTileLevel(j);\n previews[j] = previews[j+1];\n previewGradients[j] = previewGradients[j+1];\n previewHover[j] = previewHover[j+1];\n last = j;\n }\n last += 1;\n tiles[last] = null;\n previews[last] = null;\n previewGradients[last] = null;\n previewHover[last] = false;\n createPreviewGradients();\n \n return;\n }\n }\n \n }", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "private void enableAllTiles() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tplayerBoard[j][i].setEnabled(true);\n\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"t\");\n\t\t\t\tplayerBoard[j][i].setForeground(Color.lightGray);\n\t\t\t\tplayerBoard[j][i].setBackground(Color.darkGray);\n\t\t\t}\n\t\t}\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 }", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public ArrayList<Tile> getAllBoardTiles() {\n\n\t\tArrayList<ArrayList<Tile>> tilesMapValues=new ArrayList<ArrayList<Tile>>(getTilesMap().values()) ;\n\t\tArrayList<Tile> allTiles =new ArrayList<Tile>() ;\n\t\tfor(ArrayList<Tile> tileList : tilesMapValues) {\n\t\t\tallTiles.addAll(tileList);\n\n\t\t}\n\t\treturn allTiles;\n\t}", "private static void addUnexploredTile(DisplayTile tile, HashMap<DisplayTile, DisplayTile> chainedTiles, LinkedList<DisplayTile> tilesToExplore) {\n\t\tif (!tile.isRoomTile() && tile.isPassage()) {\n\t\t\tchainedTiles.put(tile, null);\n\t\t\ttile = tile.getPassageConnection();\n\t\t}\n\t\ttilesToExplore.add(tile);\n\t}", "public void shuffleTiles() {\n\t\tdo {\n\t\t\tCollections.shuffle(tiles);\n\n\t\t\t// Place the blank tile at the end\n\t\t\ttiles.remove(theBlankTile);\n\t\t\ttiles.add(theBlankTile);\n\n\t\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\t\ttileViews.get(row * gridSize + column).setCurrentTile(\n\t\t\t\t\t\t\ttiles.get(row * gridSize + column));\n\t\t\t\t}\n\t\t\t}\n\t\t} while (!isSolvable());\n\t\tmoveCount = 0;\n\n\t}", "private void addAllBelow(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ >= limit) {\n currX += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ--;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "private void moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public ArrayList<ObjectInMap> getVisibleObjects() {\n //To ensure Obstacles will be drawn at last\n objectsInMap.sort((o1, o2) -> {\n if (o1 instanceof Bush)\n return 1;\n else if (o2 instanceof Bush)\n return -1;\n else if (o1 instanceof Obstacle)\n return -1;\n else if (o2 instanceof Obstacle)\n return 1;\n else\n return 0;\n });\n\n Polygon visible = new Polygon(new int[]{viewPoint.x, ((int) (viewPoint.x + zoom * GAME_WIDTH)), ((int) (viewPoint.x + zoom * GAME_WIDTH)), viewPoint.x}\n , new int[]{viewPoint.y, viewPoint.y, ((int) (viewPoint.y + zoom * GAME_HEIGHT)), ((int) (viewPoint.y + zoom * GAME_HEIGHT))}, 4);\n\n return objectsInMap.stream().filter(o -> o.intersects(visible)).collect(Collectors.toCollection(ArrayList::new));\n }", "public void updateColoredTileListAfterOrange(){\n\t\tArrayList<Tile> tiles = null;\n\t\tif(Game.getInstance().getTurn().getLastPieceMoved() != null) {\n\t\t\tif(Game.getInstance().getTurn().getLastPieceMoved().getEatingCntr() > 0 || Game.getInstance().getTurn().isLastTileRed()) {\n\t\t\t\ttiles = Game.getInstance().getTurn().getLastPieceMoved().getPossibleMoves(Game.getInstance().getCurrentPlayerColor());\n\t\t\t}\n\t\t}else {\n\t\t\ttiles = Board.getInstance().getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\n\t\t}\n\n\t\tArrayList<Tile> coloredTilesToRemove=new ArrayList<Tile>();\t\t\n\t\tfor(Tile t:this.coloredTilesList) {\n\t\t\tif(tiles.contains(t)) {\n\n\t\t\t\tcoloredTilesToRemove.add(t);\n\t\t\t}\n\n\t\t}\n\n\t\tthis.coloredTilesList.removeAll(coloredTilesToRemove);\n\t\tthis.coloredTilesList.addAll(this.orangeTiles);\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\t}", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "private void updateAllTiles() {\r\n mEntireBoard.updateDrawableState();\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large].updateDrawableState();\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small].updateDrawableState();\r\n }\r\n }\r\n }", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "public void moveAllTilesToStack()\n {\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> cellStack = tileGrid[i][j];\n moveTiles(cellStack, stackTiles);\n }\n } \n }", "public void removeAllAgents()\n/* 76: */ {\n/* 77:125 */ this.mapPanel.removeAllAgents();\n/* 78: */ }", "private void setAvailableFromLastMove(int small) {\r\n clearAvailable();\r\n // Make all the tiles at the destination available\r\n if (small != -1) {\r\n for (int dest = 0; dest < 9; dest++) {\r\n Tile tile = mSmallTiles[small][dest];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n // If there were none available, make all squares available\r\n if (mAvailable.isEmpty()) {\r\n setAllAvailable();\r\n }\r\n }", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public static void DeterminarArregloDeMisiles() {\n\t\tVectorDeMisilesCrucerosPorNivel[3] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[4] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[7] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[8] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[11] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[12] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[15] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[16] = true;\n\t}", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "private void shootLaser() {\n\t\tfor(int i = 0; i<lasers.size(); i++) {\n\t\t\tif(lasers.get(i).getLayoutY() > -lasers.get(i).getBoundsInParent().getHeight() ) { //-37 wenn unterhalb des windows \n\t\t\t\tlasers.get(i).relocate(lasers.get(i).getLayoutX(), lasers.get(i).getLayoutY() - 3); //um 3 pixel nach oben bewegen\n\t\t\t}\n\t\t\telse { //wenn oberhalb des windows \n\t\t\t\t\n\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\tlasers.remove(i);\n\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t}\n\t\t}\n\t}", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "public ArrayList<Movable> getProjectiles(){\n\t\tArrayList<Movable> moving = new ArrayList<Movable>(temp);\n\t\ttemp = new ArrayList<Movable>();\n\t\treturn moving;\n\t}", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public boolean isTileFriendly(){\n return false;\n }", "private void addAllNeighbours(@NonNull final Location searchLoc) {\n for (int x = -1; x < 2; x++) {\n for (int y = -1; y < 2; y++) {\n if ((x == 0) && (y == 0)) {\n continue;\n }\n final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y,\n searchLoc.getScZ());\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }\n \n final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }", "public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void resetFog()\n {\n confirmedVisibles.clear();\n for( int y = 0; y < mapHeight; ++y )\n {\n for( int x = 0; x < mapWidth; ++x )\n {\n isFogged[x][y] = true;\n }\n }\n // then reveal what we should see\n if (null == viewer)\n return;\n for( Army army : master.game.armies )\n {\n if( viewer.isEnemy(army) )\n continue;\n for( Commander co : army.cos )\n {\n for( Unit unit : co.units )\n {\n for( XYCoord coord : Utils.findVisibleLocations(this, unit, false) )\n {\n revealFog(coord, false);\n }\n // We need to do a second pass with piercing vision so we can know whether to reveal the units\n for( XYCoord coord : Utils.findVisibleLocations(this, unit, true) )\n {\n revealFog(coord, true);\n }\n }\n for( XYCoord xyc : co.ownedProperties )\n {\n revealFog(xyc, true); // Properties can see themselves and anything on them\n MapLocation loc = master.getLocation(xyc);\n for( XYCoord coord : Utils.findVisibleLocations(this, loc.getCoordinates(), Environment.PROPERTY_VISION_RANGE) )\n {\n revealFog(coord, false);\n }\n }\n }\n }\n }", "public void createTiles() {\r\n Session session = sessionService.getCurrentSession();\r\n Campaign campaign = session.getCampaign();\r\n\r\n tilePane.getChildren().clear();\r\n List<Pc> pcs = null;\r\n try {\r\n pcs = characterService.getPlayerCharacters();\r\n } catch (MultiplePlayersException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (pcs != null) {\r\n pcs = pcs.stream().filter(pc -> campaign.getPcs().stream().anyMatch(\r\n campaignPc -> campaignPc.getId().equalsIgnoreCase(pc.getId())\r\n )).collect(Collectors.toList());\r\n\r\n for (Pc pc : pcs) {\r\n SortedMap<String, String> items = getTileItems(pc);\r\n Tile tile = new Tile(pc.getId(), pc.getName(), items);\r\n tile.setOnMouseClicked(mouseEvent -> {\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), tile.getObjectId());\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n parentController.updateSession(sessionService.getCurrentSession());\r\n parentController.switchView();\r\n });\r\n tilePane.getChildren().add(tile);\r\n }\r\n }\r\n }", "private void disableRestrictedTiles(int x, int y) {\n\t\tif (shipsToPlace == 3) {\n\t\t\tfor (int i = 6; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[i][j].setEnabled(false);\n\t\t\t\t\tplayerBoard[i][j].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[i][j].setName((j) + \"\" + (i) + \"f\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (shipsToPlace == 2) {\n\t\t\t// disables long ship tiles\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (y - i >= 0) {\n\t\t\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setName((x + j) + \"\" + (y - i) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disables restricted tiles\n\t\t\tfor (int i = 8; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the second ship\");\n\t\t} else if (shipsToPlace == 1) {\n\t\t\t// disable medium ship tiles\n\t\t\tif (y - 1 >= 0) {\n\t\t\t\tplayerBoard[x][y - 1].setEnabled(false);\n\t\t\t\tplayerBoard[x][y - 1].setBackground(Color.lightGray);\n\t\t\t\tplayerBoard[x][y - 1].setName(x + \"\" + (y - 1) + \"f\");\n\t\t\t}\n\t\t\tplayerBoard[x][y].setEnabled(false);\n\t\t\tplayerBoard[x][y + 1].setEnabled(false);\n\t\t\tplayerBoard[x][y + 2].setEnabled(false);\n\n\t\t\tplayerBoard[x][y].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 1].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 2].setBackground(Color.lightGray);\n\n\t\t\tplayerBoard[x][y].setName(x + \"\" + y + \"f\");\n\t\t\tplayerBoard[x][y + 1].setName(x + \"\" + (y + 1) + \"f\");\n\t\t\tplayerBoard[x][y + 2].setName(x + \"\" + (y + 2) + \"f\");\n\n\t\t\t// disables long ship tiles\n\t\t\tfor (int counter1 = 0; counter1 < 2; counter1++) {\n\t\t\t\tif (longShipCoords[1] - counter1 >= 0) {\n\n\t\t\t\t\tfor (int longcount = 0; longcount < 5; longcount++) {\n\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setName((longShipCoords[0] + longcount) + \"\" + (longShipCoords[1] - counter1) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disable restricted tiles\n\t\t\tfor (int i = 9; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the third ship\");\n\t\t} else {\n\t\t\tenableAllTiles();\n\t\t}\n\t}", "private void begin(){\n for(int i = 0; i < height; i++){ //y\n for(int j = 0; j < width; j++){ //x\n for(int k = 0; k < ids.length; k++){\n if(m.getTileids()[j][i].equals(ids[k])){\n map[j][i] = Handler.memory.getTiles()[k];\n //Handler.debug(\"is tile null: \" + (Handler.memory.getTiles()[k] == null));\n \n k = ids.length;\n }else if(k == (ids.length - 1)){\n Handler.debug(\"something went wrong\", true);\n\n }\n }\n }\n }\n mt.setCleared(clear);\n mt.setMap(map);\n \n \n }", "public void paintVisible(Graphics g){\n\n for (int i = 0; i < listOfTiles.size(); i++) {\n //In setPixels, the 3rd arguement is essentially the \"z\" height\n TileView holder = listOfTiles.get(i);\n\n //The tile Y pixels should be increased based on the z coordinate per column\n yPixel -= 8; //Now this will be the same as paintMapObjects\n holder.setPixels(xPixel, yPixel);\n holder.paintComponent(g);\n }\n }", "public void showMapFilters() {\n filterPane.getChildren().clear();\n }", "public static void removeSomeWalls(TETile[][] t) {\n for (int x = 1; x < WIDTH - 1; x++) {\n for (int y = 1; y < HEIGHT - 1; y++) {\n if (t[x][y] == Elements.TREE\n && t[x + 1][y] == Elements.FLOOR) {\n if (t[x - 1][y] == Elements.FLOOR\n && t[x][y + 1] == Elements.FLOOR) {\n if (t[x][y - 1] == Elements.FLOOR\n && t[x + 1][y + 1] == Elements.FLOOR) {\n if (t[x + 1][y - 1] == Elements.FLOOR\n && t[x - 1][y + 1] == Elements.FLOOR) {\n if (t[x - 1][y - 1] == Elements.FLOOR) {\n t[x][y] = Elements.FLOOR;\n }\n }\n }\n }\n }\n }\n }\n }", "private ArrayList<Tile> getPossibleRedTiles(){\n\t\tArrayList<Tile> toReturn = new ArrayList<>();\n\n\t\tGame game=Game.getInstance();\n\t\tArrayList<Tile> legalTiles= getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tArrayList<Tile> blockedTiles=new ArrayList<Tile>();\n\t\tlegalTiles.removeAll(coloredTilesList);\n\n\t\t//\t\tonly one soldier can move\n\t\tif(game.getTurn().isLastTileRed()) {\n\t\t\tPiece lastPMoved = game.getTurn().getLastPieceMoved();\n\t\t\tArrayList<Tile> possibleTiles=lastPMoved.getPossibleMoves(game.getCurrentPlayerColor());\n\t\t\tpossibleTiles.removeAll(coloredTilesList);\n\t\t\tif(!possibleTiles.isEmpty()) {\n\t\t\t\tfor(Tile t: possibleTiles) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(lastPMoved instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tblockedTiles.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpossibleTiles.removeAll(blockedTiles);\n\t\t\t}\n\t\t\ttoReturn = possibleTiles;\n\t\t}\n\t\telse {\n\t\t\tHashMap<Tile, ArrayList<Piece>> tempCollection = new HashMap<>();\n\n\t\t\tfor(Tile t:legalTiles) {\n\t\t\t\tfor(Piece p : getColorPieces(Game.getInstance().getCurrentPlayerColor())){\n\t\t\t\t\tboolean canMove = false;\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(canMove) {\n\t\t\t\t\t\tArrayList<Piece> pp = null;\n\t\t\t\t\t\tif(!tempCollection.containsKey(t)) {\n\t\t\t\t\t\t\tpp = new ArrayList<>();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpp = tempCollection.get(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpp.add(p);\n\t\t\t\t\t\ttempCollection.put(t, pp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tArrayList<Tile> tilesToRemove = new ArrayList<>();\n\n\t\t\tfor(Tile t : tempCollection.keySet()) {\n\t\t\t\tArrayList<Piece> pieces= tempCollection.get(t);\n\t\t\t\tfor(Piece p : pieces) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(p instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tif(!tilesToRemove.contains(t))\n\t\t\t\t\t\t\ttilesToRemove.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Tile t : tilesToRemove) {\n\t\t\t\ttempCollection.remove(t);\n\t\t\t}\n\n\t\t\ttoReturn = new ArrayList<Tile>(tempCollection.keySet());\t\n\t\t}\n\t\treturn toReturn;\n\t}", "private void setAtomsToUnVisited(IMolecule molecule) {\n\t\tfor (int i = 0; i < molecule.getAtomCount(); i++) {\n\t\t\tmolecule.getAtom(i).setFlag(CDKConstants.VISITED, false);\n\t\t}\n\t}", "private void huntMode() {\n if (!alreadyHit(hitLocationX+1, hitLocationY)){ // tests to see if they're already shot at\n if (hitLocationX < 9) { // doesn't add if they're on a border\n huntList.add(new Point(hitLocationX + 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY+1)){\n if (hitLocationY < 9) {\n huntList.add(new Point(hitLocationX, hitLocationY + 1));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX-1, hitLocationY)){\n if (hitLocationX > 0) {\n huntList.add(new Point(hitLocationX - 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY-1)){\n if (hitLocationY > 0) {\n huntList.add(new Point(hitLocationX, hitLocationY - 1));\n huntCount++;\n huntModeActive++;\n }\n }\n }", "public void moveTileBack()\n {\n if(!(activeTile-1 < 0) && activeTile > 0)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile-1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile-1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile-1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile-1].getEndColor());\n \n tiles[activeTile-1].setTileLevel(tiles[activeTile-1].getTileLevel()+1);\n tiles[activeTile] = tiles[activeTile-1];\n previews[activeTile] = previews[activeTile-1];\n previewGradients[activeTile] = previewGradients[activeTile-1];\n previewHover[activeTile] = previewHover[activeTile-1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()-1);\n tiles[activeTile-1] = tmpTile;\n tiles[activeTile-1].setStartColor(tiles[activeTile-1].getStartColor());\n previews[activeTile-1] = tmpPreview;\n previewGradients[activeTile-1] = tmpPreviewGradients;\n previewHover[activeTile-1] = tmpPreviewHover;\n \n activeTile -= 1;\n createPreviewGradients();\n }\n }", "void move_missiles() {\n // Ship missiles\n ship.moveMissiles();\n for (int i = 0; i < ship_missile_image_views.size(); i++) {\n ship_missile_image_views.get(i).setY(ship.missiles.get(i).y_position);\n }\n\n // Enemy missiles\n Alien.moveMissiles();\n for (int i = 0; i < alien_missile_image_views.size(); i++) {\n alien_missile_image_views.get(i).setY(Alien.missiles.get(i).y_position);\n }\n }", "public void removeAll()\r\n {\r\n if (level ==2)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(SmallPlatform.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Tomato.class)); \r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n player.setLocation();\r\n }\r\n if (level == 3)\r\n {\r\n removeObjects(getObjects(Tomato.class));\r\n removeObject(door2);\r\n removeObjects(getObjects(Canon.class));\r\n removeObjects(getObjects(CanonBullet.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Pedestal.class));\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n }\r\n if (level == 4)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Text.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Boss.class)); \r\n removeObjects(getObjects(Thorns.class));\r\n player.setLocation();\r\n }\r\n }", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "private void checkMoves(Tile t, MouseEvent e, ImageView img)\n {\n for(Tile tile : gb.getTiles())\n {\n tile.setStyle(null);\n tile.setOnMouseClicked(null);\n }\n ArrayList<Move> moves = t.getPiece().availableMoves(gb);\n for(Move m : moves)\n {\n gb.getTile(m.getX(),m.getY()).setStyle(\"-fx-background-color: #98FB98;\");\n gb.getTile(m.getX(),m.getY()).setOnMouseClicked(ev -> {\n if(ev.getTarget().getClass() == Tile.class)\n {\n movePiece(e,ev,t,img,moves);\n }\n else\n {\n ImageView img1 = (ImageView) ev.getTarget();\n Tile t2 = (Tile) img1.getParent();\n if(t2.isOccupied())\n {\n if(t2.getPiece().getClass() == King.class)\n {\n gb.setBlackKing(false);\n if(gameLogic.game(mainPane,gb.isBlackKing()))\n {\n cleanUp();\n }\n else {\n Platform.exit();\n }\n }\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n\n }\n else\n {\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n }\n cleanUpTile(moves);\n ev.consume();\n e.consume();\n }\n });\n }\n e.consume();\n }", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "private void discardNecklaceIfVisible(){\n CardDealer cardDealer = CardDealer.getInstance();\n Treasure necklace = null;\n for (Treasure t: this.visibleTreasures){\n if (t.getType() == TreasureKind.NECKLACE){\n necklace = t;\n }\n }\n if (necklace != null){\n this.visibleTreasures.remove(necklace);\n cardDealer.giveTreasureBack(necklace);\n }\n }", "public void removeAllMissiles(){\n\t\tfor (Missile missile : this.missiles){\n\t\t\tif(!missile.isDestroyed() && missile != null){\n\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\tmissile = null;\n\t\t\t}\n\t\t}\n\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\tfMissile = null;\n\t\t\t}\n\t\t}\n\t}", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}", "private void setSeen(boolean value)\n\t{\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].setSeen(value);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "protected void setHidden(int x, int y) {\r\n \t\r\n if (revealed[x][y]) {\r\n \t//System.out.println(\"Auto Reveal at (\" + x + \",\" + y + \")\");\r\n revealed[x][y] = false;\r\n squaresRevealed--;\r\n \r\n \tif (is3BV[x][y]) { // if this was a 3BV tile then ew've no longer cleared it\r\n \t\tcleared3BV--;\r\n \t}\r\n }\r\n\r\n }", "private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public void updateFrontKnown() {\n\t\tfrontKnown = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < maxX; i++) {\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tif (coveredMap[i][j] != SIGN_UNKNOWN && coveredMap[i][j] != SIGN_MARK && findAdjacentUnknown(new int[]{i, j}).size() > 0) {\n\t\t\t\t\tfrontKnown.add(new int[]{i,j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void moveTileItemToOther(int i) {\n if (this.mTiles.size() > this.mSpanCount * 2) {\n ((SystemUIStat) Dependency.get(SystemUIStat.class)).handleControlCenterEvent(new QuickTilesRemovedEvent(this.mTiles.get(i).spec));\n this.mQSControlCustomizer.addInTileAdapter(this.mTiles.get(i), false);\n this.mTiles.remove(i);\n notifyItemRemoved(i);\n saveSpecs(this.mHost, false);\n }\n }", "public void missedFish(ArrayList<Fish> hitList){\r\n for(Fish missing: hitList){\r\n getChildren().remove(missing.fishView);\r\n activeFish.remove(missing);\r\n }\r\n }", "public void updateFrontUnknown() {\n\t\tfrontUnknown = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < unknown.size(); i++) {\n\t\t\tint[] pair = unknown.get(i).clone();\n\t\t\tif (findAdjacentSafe(pair).size() != 0) {\n\t\t\t\tfrontUnknown.add(pair);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t\tif ( !input ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttileVisible = true;\r\n\t\ttileX = arg0.getX() / 36;\r\n\t\ttileY = arg0.getY() / 36;\r\n\t\trepaint();\r\n\t}", "private void addAttacks(){\n while(!attacksToAdd.isEmpty()){\n attacks.add(attacksToAdd.remove());\n }\n }" ]
[ "0.60973567", "0.602604", "0.59240484", "0.59157187", "0.58469844", "0.58411133", "0.5830495", "0.58145905", "0.56979793", "0.56538033", "0.5635131", "0.5627839", "0.5624107", "0.560536", "0.55927145", "0.5565365", "0.5554325", "0.55490446", "0.5516523", "0.5513553", "0.54884064", "0.54514384", "0.54067725", "0.5385584", "0.53835195", "0.5356864", "0.53375936", "0.5327497", "0.53181285", "0.5287794", "0.5262611", "0.52489775", "0.52409333", "0.5239621", "0.5237768", "0.5230911", "0.5225567", "0.52046484", "0.5200236", "0.51894164", "0.5186493", "0.5178157", "0.5176819", "0.51697344", "0.51689345", "0.51662606", "0.5165083", "0.51460385", "0.5143348", "0.514305", "0.5135274", "0.51266575", "0.51249653", "0.51218617", "0.51055825", "0.5085571", "0.5081791", "0.5074423", "0.50696945", "0.50687397", "0.50664806", "0.50603914", "0.50484675", "0.504401", "0.5043342", "0.5033889", "0.5032261", "0.50238717", "0.5023862", "0.5015503", "0.50109607", "0.5009948", "0.5009419", "0.50041986", "0.5002365", "0.5000444", "0.5000192", "0.49972337", "0.49967766", "0.49942887", "0.49926552", "0.49894238", "0.4984383", "0.49825495", "0.49765253", "0.49762455", "0.497354", "0.49667883", "0.49585485", "0.49562824", "0.49499062", "0.49432102", "0.49402073", "0.49348313", "0.49339414", "0.49304172", "0.49302456", "0.4930136", "0.49154225", "0.49065295" ]
0.527894
30
Add all tiles surrounding this location and the tile above to the list of unchecked tiles.
private void addAllNeighbours(@NonNull final Location searchLoc) { for (int x = -1; x < 2; x++) { for (int y = -1; y < 2; y++) { if ((x == 0) && (y == 0)) { continue; } final long foundKey = Location.getKey(searchLoc.getScX() + x, searchLoc.getScY() + y, searchLoc.getScZ()); synchronized (unchecked) { if (!unchecked.contains(foundKey)) { unchecked.add(foundKey); } } } } final long foundKey = Location.getKey(searchLoc.getScX(), searchLoc.getScY(), searchLoc.getScZ() + 1); synchronized (unchecked) { if (!unchecked.contains(foundKey)) { unchecked.add(foundKey); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void moveTiles(ArrayList<MahjongSolitaireTile> from, ArrayList<MahjongSolitaireTile> to)\n {\n // GO THROUGH ALL THE TILES, TOP TO BOTTOM\n for (int i = from.size()-1; i >= 0; i--)\n {\n MahjongSolitaireTile tile = from.remove(i);\n \n // ONLY ADD IT IF IT'S NOT THERE ALREADY\n if (!to.contains(tile))\n to.add(tile);\n } \n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "public static void clearAllTileTypes(){\n\t\tTileType.allTileTypes.clear();\n\t}", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public ArrayList<Tile> getEmptyTiles(){\n\t\tArrayList<Tile> emptyTiles = new ArrayList<Tile>();\n\t\tArrayList<Tile> boardTiles = getAllBoardTiles();\n\t\tfor (Tile tile : boardTiles) {\n\t\t\tif(tile.getPiece()== null && tile.getColor1()== PrimaryColor.BLACK) {\n\t\t\t\temptyTiles.add(tile);\n\t\t\t}\n\t\t}\n\t\treturn emptyTiles;\n\t}", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "public ArrayList<Tile> getAllBoardTiles() {\n\n\t\tArrayList<ArrayList<Tile>> tilesMapValues=new ArrayList<ArrayList<Tile>>(getTilesMap().values()) ;\n\t\tArrayList<Tile> allTiles =new ArrayList<Tile>() ;\n\t\tfor(ArrayList<Tile> tileList : tilesMapValues) {\n\t\t\tallTiles.addAll(tileList);\n\n\t\t}\n\t\treturn allTiles;\n\t}", "public void moveAllTilesToStack()\n {\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> cellStack = tileGrid[i][j];\n moveTiles(cellStack, stackTiles);\n }\n } \n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public void markDangerTiles() {\n List<Tile> dangerTiles = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y);\n if (dangerTiles.contains(this.gb.get(this.us_head_x, this.us_head_y)))\n return; // Don't force fill if our head is there\n for (Tile t : dangerTiles)\n t.setForceFilled(true);\n }", "public void setTray(ArrayList<Tile> newTray){ this.tray = newTray; }", "public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "private void uncoverTiles(Set<Tile> tiles) {\r\n\t\tfor (Tile tile : tiles) {\r\n\t\t\t// Update status\r\n\t\t\ttile.setStatus(TileStatus.UNCOVERED);\r\n\r\n\t\t\t// Update button\r\n\t\t\tJButton button = boardButtons[tile.getX()][tile.getY()];\r\n\t\t\tbutton.setEnabled(false);\r\n\t\t\tbutton.setText(tile.getRank() == 0 ? \"\" : String.valueOf(tile.getRank()));\r\n\t\t}\r\n\t}", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }", "public ArrayList<Location> getEmptyLocations(){\n\n\t\tArrayList<Tile> emptyTiles = getEmptyTiles();\n\t\tArrayList<Location> emptyLocations = new ArrayList<Location>();\n\n\t\tfor (Tile t : emptyTiles) {\n\n\t\t\temptyLocations.add(t.getLocation());\n\t\t}\n\t\treturn emptyLocations;\n\t}", "public void shuffleTiles() {\n\t\tdo {\n\t\t\tCollections.shuffle(tiles);\n\n\t\t\t// Place the blank tile at the end\n\t\t\ttiles.remove(theBlankTile);\n\t\t\ttiles.add(theBlankTile);\n\n\t\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\t\ttileViews.get(row * gridSize + column).setCurrentTile(\n\t\t\t\t\t\t\ttiles.get(row * gridSize + column));\n\t\t\t\t}\n\t\t\t}\n\t\t} while (!isSolvable());\n\t\tmoveCount = 0;\n\n\t}", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "public static ArrayList<FloorTile> getEffectedTiles() {\r\n\r\n ArrayList<FloorTile> temp = new ArrayList<>();\r\n for(int i = GameControl.ytile-1; i < GameControl.ytile + 2; i++) {\r\n for(int j = GameControl.xtile-1; j < GameControl.xtile + 2; j++) {\r\n if(i >= 0 && i < board.length && j >= 0 && j < board[0].length) {\r\n temp.add(board[i][j]);\r\n }\r\n }\r\n }\r\n return temp;\r\n }", "private void shiftDownTiles(boolean isBorder, int shiftAmount){\n List<Tile> listOfTilesToUpdate = new ArrayList<Tile>();\n int floorRowIndex;\n if(isBorder){\n floorRowIndex=this.board.gridHeight-2;\n } else {\n floorRowIndex=this.board.gridHeight-1;\n }\n\n\n //update all existing tiles y coordinates with shifted y coordinates\n //only shift tile above the row that is being removed\n for(int rowIndex=0; rowIndex<this.rowToBeRemovedIndex; rowIndex++){\n for(int colIndex=0; colIndex<this.board.gridWidth; colIndex++){\n if(this.board.getTile(colIndex,rowIndex)!=null){ //tile exist at coordinates\n if(isBorder){\n if(rowIndex<=floorRowIndex){ //Stop at floor wall\n int leftWallIndex=0;\n int rightWallIndex=this.board.gridWidth-1;\n if(colIndex>leftWallIndex && colIndex<rightWallIndex){ //Ignore the the left and right walls\n Tile tile = this.board.getTile(colIndex,rowIndex);\n tile.rowIndex+=shiftAmount;\n tile.setCoordinates(tile.columnIndex,tile.rowIndex);\n listOfTilesToUpdate.add(tile);\n }\n }\n } else {\n Tile tile = this.board.getTile(colIndex,rowIndex);\n tile.rowIndex+=shiftAmount;\n tile.setCoordinates(tile.columnIndex,tile.rowIndex);\n listOfTilesToUpdate.add(tile);\n }\n }\n }\n }\n\n //Clear Board Grid. Set every element in 2D array to null.\n for(int rowIndex=0; rowIndex<this.board.gridHeight; rowIndex++){\n for(int colIndex=0; colIndex<this.board.gridWidth; colIndex++){\n Tile tile = this.board.getTile(colIndex, rowIndex);\n this.board.removeTile(tile);\n }\n }\n\n //add back tetris border\n if(this.includeTetrisBorder) {\n addBorder();\n }\n\n //Insert new tiles\n for(Tile newTile : listOfTilesToUpdate){\n this.board.placeTile(newTile);\n }\n }", "private void layTiles(TiledMapManager mapManager) {\n board = new Tile[height][width];\n for (int row = 0; row < height; row++) {\n for (int col = 0; col < width; col++) {\n TiledMapTile tile = mapManager.getCell(\"TILES\", row, col).getTile();\n String tileType = (String) tile.getProperties().get(\"Type\");\n Tile currentTile;\n switch (tileType) {\n case \"GEAR\":\n boolean clockwise = (boolean) tile.getProperties().get(\"Clockwise\");\n currentTile = new Gear(row, col, clockwise);\n break;\n case \"HOLE\":\n currentTile = new Hole(row, col);\n break;\n case \"DOCK\":\n int number = (Integer) tile.getProperties().get(\"Number\");\n currentTile = new Dock(number, row, col);\n docks.add((Dock) currentTile);\n break;\n case \"CONVEYOR_BELT\":\n currentTile = installConveyorBelt(mapManager, row, col);\n break;\n case \"REPAIR_SITE\":\n currentTile = new RepairSite(row, col);\n break;\n default:\n currentTile = new Tile(row, col);\n break;\n }\n layTile(currentTile);\n }\n }\n Collections.sort(docks);\n }", "private void addAllAbove(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ <= limit) {\n currX -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ++;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "private void computeMovableTilesToDisplayToPlayer() {\n \tfor (Entity enemyEntity : allCreaturesOfCurrentRoom) {\n \t\tAIComponent aiComponent = Mappers.aiComponent.get(enemyEntity);\n \t\tif (aiComponent.getSubSystem() != null) {\n \t\t\tboolean handledInSubSystem = aiComponent.getSubSystem().computeMovableTilesToDisplayToPlayer(this, enemyEntity, room);\n \t\t\tif (handledInSubSystem) continue;\n \t\t}\n \t\t\n \tMoveComponent moveCompo = Mappers.moveComponent.get(enemyEntity);\n \tAttackComponent attackCompo = Mappers.attackComponent.get(enemyEntity);\n \t\n \t\t//clear the movable tile\n \t\tmoveCompo.clearMovableTiles();\n \t\tif (attackCompo != null) attackCompo.clearAttackableTiles();\n \t\t\n \t\tmoveCompo.setMoveRemaining(moveCompo.getMoveSpeed());\n \t\t\n \t//Build the movable tiles list\n \t\ttileSearchService.buildMoveTilesSet(enemyEntity, room);\n \t\tif (attackCompo != null) attackTileSearchService.buildAttackTilesSet(enemyEntity, room, false, true);\n \t\tmoveCompo.hideMovableTiles();\n \t\tif (attackCompo != null) attackCompo.hideAttackableTiles();\n \t}\n }", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}", "private void clearHighlightAfterMove() {\n //clear start\n getTileAt(start).clear();\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).clear();\n }\n }", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "@Override\n protected void generateTiles() {\n }", "private void updateAllTiles() {\r\n mEntireBoard.updateDrawableState();\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large].updateDrawableState();\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small].updateDrawableState();\r\n }\r\n }\r\n }", "private void addWater() {\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n if (tileMap[i][j] == null) {\n tileMap[i][j] = new Space(new Water(i, j));\n }\n }\n }\n }", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void setAllUnexplored() {\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (in_start(row, col) || in_goal(row, col)) {\n grid[row][col].setIsExplored(true);\n } else {\n grid[row][col].setIsExplored(false);\n }\n }\n }\n }", "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 }", "private void revealTiles() {\n\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isRevealed()\n && !minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setText(\"<html><b>\" + minefield.getMinefield()[i][j].getMinedNeighbours() + \"</html></b>\");\n tile[i][j].setBackground(new Color(208, 237, 243));\n switch (tileLabel[i][j].getText()) {\n case \"<html><b>0</html></b>\":\n tileLabel[i][j].setText(\"\");\n break;\n case \"<html><b>1</html></b>\":\n tileLabel[i][j].setForeground(Color.blue);\n break;\n case \"<html><b>2</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 100, 0));\n break;\n case \"<html><b>3</html></b>\":\n tileLabel[i][j].setForeground(Color.red);\n break;\n case \"<html><b>4</html></b>\":\n tileLabel[i][j].setForeground(new Color(75, 0, 130));\n break;\n case \"<html><b>5</html></b>\":\n tileLabel[i][j].setForeground(new Color(130, 0, 0));\n break;\n case \"<html><b>6</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 153, 153));\n break;\n case \"<html><b>7</html></b>\":\n tileLabel[i][j].setForeground(Color.black);\n break;\n case \"<html><b>8</html></b>\":\n tileLabel[i][j].setForeground(Color.darkGray);\n break;\n }\n }\n }\n }\n frame.repaint();\n }", "private ArrayList<Tile> getPossibleRedTiles(){\n\t\tArrayList<Tile> toReturn = new ArrayList<>();\n\n\t\tGame game=Game.getInstance();\n\t\tArrayList<Tile> legalTiles= getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tArrayList<Tile> blockedTiles=new ArrayList<Tile>();\n\t\tlegalTiles.removeAll(coloredTilesList);\n\n\t\t//\t\tonly one soldier can move\n\t\tif(game.getTurn().isLastTileRed()) {\n\t\t\tPiece lastPMoved = game.getTurn().getLastPieceMoved();\n\t\t\tArrayList<Tile> possibleTiles=lastPMoved.getPossibleMoves(game.getCurrentPlayerColor());\n\t\t\tpossibleTiles.removeAll(coloredTilesList);\n\t\t\tif(!possibleTiles.isEmpty()) {\n\t\t\t\tfor(Tile t: possibleTiles) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(lastPMoved instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(lastPMoved.getId(), lastPMoved.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tblockedTiles.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpossibleTiles.removeAll(blockedTiles);\n\t\t\t}\n\t\t\ttoReturn = possibleTiles;\n\t\t}\n\t\telse {\n\t\t\tHashMap<Tile, ArrayList<Piece>> tempCollection = new HashMap<>();\n\n\t\t\tfor(Tile t:legalTiles) {\n\t\t\t\tfor(Piece p : getColorPieces(Game.getInstance().getCurrentPlayerColor())){\n\t\t\t\t\tboolean canMove = false;\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.UP_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_RIGHT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(!canMove) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanPieceMove(p, t.getLocation(), Directions.DOWN_LEFT);\n\t\t\t\t\t\t} catch (LocationException | IllegalMoveException e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanMove = true;\n\t\t\t\t\t}\n\t\t\t\t\tif(canMove) {\n\t\t\t\t\t\tArrayList<Piece> pp = null;\n\t\t\t\t\t\tif(!tempCollection.containsKey(t)) {\n\t\t\t\t\t\t\tpp = new ArrayList<>();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpp = tempCollection.get(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpp.add(p);\n\t\t\t\t\t\ttempCollection.put(t, pp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tArrayList<Tile> tilesToRemove = new ArrayList<>();\n\n\t\t\tfor(Tile t : tempCollection.keySet()) {\n\t\t\t\tArrayList<Piece> pieces= tempCollection.get(t);\n\t\t\t\tfor(Piece p : pieces) {\n\t\t\t\t\tPiece tempPiece=null;\n\t\t\t\t\tif(p instanceof Soldier) {\n\t\t\t\t\t\ttempPiece=new Soldier(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}else {\n\t\t\t\t\t\ttempPiece=new Queen(p.getId(), p.getColor(), t.getLocation());\n\t\t\t\t\t}\n\t\t\t\t\tif(tempPiece.getPossibleMoves(game.getCurrentPlayerColor()).isEmpty()) {\n\t\t\t\t\t\tif(!tilesToRemove.contains(t))\n\t\t\t\t\t\t\ttilesToRemove.add(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Tile t : tilesToRemove) {\n\t\t\t\ttempCollection.remove(t);\n\t\t\t}\n\n\t\t\ttoReturn = new ArrayList<Tile>(tempCollection.keySet());\t\n\t\t}\n\t\treturn toReturn;\n\t}", "private void addAllBelow(@NonNull final Location searchLoc, final int limit) {\n int currX = searchLoc.getScX();\n int currY = searchLoc.getScY();\n int currZ = searchLoc.getScZ();\n \n while (currZ >= limit) {\n currX += MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currY -= MapDisplayManager.TILE_PERSPECTIVE_OFFSET;\n currZ--;\n final long foundKey = Location.getKey(currX, currY, currZ);\n synchronized (unchecked) {\n if (!unchecked.contains(foundKey)) {\n unchecked.add(foundKey);\n }\n }\n }\n }", "private void moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public static void removeSomeWalls(TETile[][] t) {\n for (int x = 1; x < WIDTH - 1; x++) {\n for (int y = 1; y < HEIGHT - 1; y++) {\n if (t[x][y] == Elements.TREE\n && t[x + 1][y] == Elements.FLOOR) {\n if (t[x - 1][y] == Elements.FLOOR\n && t[x][y + 1] == Elements.FLOOR) {\n if (t[x][y - 1] == Elements.FLOOR\n && t[x + 1][y + 1] == Elements.FLOOR) {\n if (t[x + 1][y - 1] == Elements.FLOOR\n && t[x - 1][y + 1] == Elements.FLOOR) {\n if (t[x - 1][y - 1] == Elements.FLOOR) {\n t[x][y] = Elements.FLOOR;\n }\n }\n }\n }\n }\n }\n }\n }", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void loadTiles() {\n\t\tTILE_SETS.put(\"grass\", TileSet.loadTileSet(\"plains\"));\n\t}", "protected Tile[] newTiles() {\n int len = getWidthInTiles() * getHeightInTiles();\n Tile[] t = new Tile[ len ];\n for(int i = 0; i < len; i++) {\n t[i] = null;\n }\n return t;\n }", "@WorkerThread\n private static void checkTiles(final HashMap<String, String> missingTiles, final ArrayList<Download> missingDownloads, final AtomicBoolean hasUnsupportedTiles) {\n final List<ContentStorage.FileInformation> files = ContentStorage.get().list(PersistableFolder.ROUTING_TILES.getFolder());\n for (ContentStorage.FileInformation fi : files) {\n if (fi.name.endsWith(BROUTER_TILE_FILEEXTENSION)) {\n missingTiles.remove(fi.name);\n }\n }\n\n // read list of available tiles from the server, if necessary\n if (!missingTiles.isEmpty()) {\n final HashMap<String, Download> tiles = BRouterTileDownloader.getInstance().getAvailableTiles();\n final ArrayList<String> filenames = new ArrayList<>(missingTiles.values()); // work on copy to avoid concurrent modification\n for (String filename : filenames) {\n if (tiles.containsKey(filename)) {\n missingDownloads.add(tiles.get(filename));\n } else {\n missingTiles.remove(filename);\n hasUnsupportedTiles.set(true);\n }\n }\n }\n }", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "private static void addUnexploredTile(DisplayTile tile, HashMap<DisplayTile, DisplayTile> chainedTiles, LinkedList<DisplayTile> tilesToExplore) {\n\t\tif (!tile.isRoomTile() && tile.isPassage()) {\n\t\t\tchainedTiles.put(tile, null);\n\t\t\ttile = tile.getPassageConnection();\n\t\t}\n\t\ttilesToExplore.add(tile);\n\t}", "public void addSubbedTile(Tile t) { subbedTiles.add(t); }", "@Override\n\tprotected void generateTiles() {\n\t}", "public void refillTray(TilePool sock){\n List<Tile> playertray = bot.getTray();\n while (playertray.size() < Constants.TRAY_SIZE){\n playertray.add(sock.takeOutTile());\n }\n this.tray = (ArrayList<Tile>)playertray;\n }", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "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 void addTile(Tile tile) {\n ownedTiles.add(tile);\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\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 setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "public ArrayList<Tile> getTiles(){\r\n return tiles;\r\n }", "public ArrayList<Tile> getOrangeTiles() {\n\t\treturn orangeTiles;\n\t}", "public void undoLastMove()\n {\n if (inProgress() && stackTiles.size() > 1)\n {\n // TAKE THE TOP 2 TILES\n MahjongSolitaireTile topTile = stackTiles.remove(stackTiles.size()-1);\n MahjongSolitaireTile nextToTopTile = stackTiles.remove(stackTiles.size() - 1);\n \n // SET THEIR DESTINATIONS\n float boundaryLeft = miniGame.getBoundaryLeft();\n float boundaryTop = miniGame.getBoundaryTop();\n \n // FIRST TILE 1\n int col = topTile.getGridColumn();\n int row = topTile.getGridRow();\n int z = tileGrid[col][row].size();\n float targetX = this.calculateTileXInGrid(col, z);\n float targetY = this.calculateTileYInGrid(row, z);\n topTile.setTarget(targetX, targetY);\n movingTiles.add(topTile);\n topTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(topTile);\n \n // AND THEN TILE 2\n col = nextToTopTile.getGridColumn();\n row = nextToTopTile.getGridRow();\n z = tileGrid[col][row].size();\n targetX = this.calculateTileXInGrid(col, z);\n targetY = this.calculateTileYInGrid(row, z);\n nextToTopTile.setTarget(targetX, targetY);\n movingTiles.add(nextToTopTile);\n nextToTopTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(nextToTopTile);\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.UNDO_AUDIO_CUE.toString(), false); \n }\n }", "public Tile[] generateTiles() {\n return null;\n }", "@Override\n public boolean isTileFriendly(){\n return false;\n }", "public void updateClearedTiles() {\r\n clearedTiles++;\r\n String text = String.format(\"Cleared tiles: %s / %s\",\r\n clearedTiles,\r\n tileList.size() - MINES);\r\n clearedTilesLabel.clear().drawText(text, 10, 10);\r\n\r\n // Check if cleared game\r\n if (clearedTiles == (tileList.size() - MINES)) {\r\n gameEngine.setScreen(new WinScreen(gameEngine));\r\n }\r\n }", "private void checkMoves(Tile t, MouseEvent e, ImageView img)\n {\n for(Tile tile : gb.getTiles())\n {\n tile.setStyle(null);\n tile.setOnMouseClicked(null);\n }\n ArrayList<Move> moves = t.getPiece().availableMoves(gb);\n for(Move m : moves)\n {\n gb.getTile(m.getX(),m.getY()).setStyle(\"-fx-background-color: #98FB98;\");\n gb.getTile(m.getX(),m.getY()).setOnMouseClicked(ev -> {\n if(ev.getTarget().getClass() == Tile.class)\n {\n movePiece(e,ev,t,img,moves);\n }\n else\n {\n ImageView img1 = (ImageView) ev.getTarget();\n Tile t2 = (Tile) img1.getParent();\n if(t2.isOccupied())\n {\n if(t2.getPiece().getClass() == King.class)\n {\n gb.setBlackKing(false);\n if(gameLogic.game(mainPane,gb.isBlackKing()))\n {\n cleanUp();\n }\n else {\n Platform.exit();\n }\n }\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n\n }\n else\n {\n t2.setImage(null);\n t2.setImage(img.getImage().getUrl());\n t.setImage(null);\n t2.setPiece(t.getPiece());\n t.setPiece(null);\n }\n cleanUpTile(moves);\n ev.consume();\n e.consume();\n }\n });\n }\n e.consume();\n }", "public void removeAll()\r\n {\r\n if (level ==2)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(SmallPlatform.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Tomato.class)); \r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n player.setLocation();\r\n }\r\n if (level == 3)\r\n {\r\n removeObjects(getObjects(Tomato.class));\r\n removeObject(door2);\r\n removeObjects(getObjects(Canon.class));\r\n removeObjects(getObjects(CanonBullet.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Pedestal.class));\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n }\r\n if (level == 4)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Text.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Boss.class)); \r\n removeObjects(getObjects(Thorns.class));\r\n player.setLocation();\r\n }\r\n }", "public void updateColoredTileListAfterOrange(){\n\t\tArrayList<Tile> tiles = null;\n\t\tif(Game.getInstance().getTurn().getLastPieceMoved() != null) {\n\t\t\tif(Game.getInstance().getTurn().getLastPieceMoved().getEatingCntr() > 0 || Game.getInstance().getTurn().isLastTileRed()) {\n\t\t\t\ttiles = Game.getInstance().getTurn().getLastPieceMoved().getPossibleMoves(Game.getInstance().getCurrentPlayerColor());\n\t\t\t}\n\t\t}else {\n\t\t\ttiles = Board.getInstance().getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\n\t\t}\n\n\t\tArrayList<Tile> coloredTilesToRemove=new ArrayList<Tile>();\t\t\n\t\tfor(Tile t:this.coloredTilesList) {\n\t\t\tif(tiles.contains(t)) {\n\n\t\t\t\tcoloredTilesToRemove.add(t);\n\t\t\t}\n\n\t\t}\n\n\t\tthis.coloredTilesList.removeAll(coloredTilesToRemove);\n\t\tthis.coloredTilesList.addAll(this.orangeTiles);\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\t}", "public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }", "@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }", "private void organizeTiles(){\n\t\tfor(int i = 1; i <= size * size; i++){\n\t\t\tif(i % size == 0){\n\t\t\t\tadd(tiles[i - 1]);\n\t\t\t\trow();\n\t\t\t}else{\n\t\t\t\tadd(tiles[i - 1]);\n\t\t\t}\n\t\t}\n\t}", "static ArrayList<int[]> searcherTopLeftTiles(ArrayList<int[]> MoveList,int CurrentX, int CurrentY){\n\t\t\n\t\tfor(int j = 1; j <=7 ; j++){\n\t\t\tint [] NewXY = new int[2];\n\t\t\tNewXY[0] = CurrentX - j;\n\t\t\tNewXY[1] = CurrentY - j;\n\t\t\t\n\t\t\tif(NewXY[0] < 0 || NewXY[1] < 0){\n\t\t\t\treturn MoveList;\n\t\t\t}\n\t\t\t\n\n\t\t\tfor(int [] i: aggregateBlacks()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a valid black piece to kill \" + j + \" tiles top left of this bishop\");\n\t\t\t\t\tMoveList.add(NewXY);\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tfor(int [] i: aggregateWhites()){\n\t\t\t\tint[] Coordinate = i;\n\t\t\t\tif(Arrays.equals(Coordinate, NewXY)){\n\t\t\t\t\t//System.out.println(\"We have found a white piece \" + j + \" tiles top of this Queen\");\n\t\t\t\t\treturn MoveList;\n\t\t\t\t}\t\t\n\t\t\t}\t\n\t\t\tMoveList.add(NewXY);\n\t\t}\n\t\treturn MoveList;\n\t}", "private void enableAllTiles() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tplayerBoard[j][i].setEnabled(true);\n\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"t\");\n\t\t\t\tplayerBoard[j][i].setForeground(Color.lightGray);\n\t\t\t\tplayerBoard[j][i].setBackground(Color.darkGray);\n\t\t\t}\n\t\t}\n\t}", "public void removeTiles(ArrayList<Tile> tiles) {\r\n for (Tile tile : tiles) {\r\n frame.remove(tile);\r\n }\r\n }", "public void unvisitCells() {\n for (int r = 0; r < MAX_ROWS; r++) {\n for (int c = 0; c < MAX_COLUMNS; c++) {\n cells[r][c].unvisit();\n }\n }\n }", "public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }", "private void addTileItemFromOther(int i) {\n ((SystemUIStat) Dependency.get(SystemUIStat.class)).handleControlCenterEvent(new QuickTilesAddedEvent(this.mOtherTiles.get(i).spec));\n this.mQSControlCustomizer.addInTileAdapter(this.mOtherTiles.get(i), true);\n this.mOtherTiles.remove(i);\n notifyItemRemoved(i);\n }", "public void placeTile(Tile t){\n\t\t//System.out.println(t.toString() + \" was placed\");\n\t\toccupied = true;\n\t\tcurrentTile = t;\n\t}", "public void removeAllMissiles(){\n\t\tfor (Missile missile : this.missiles){\n\t\t\tif(!missile.isDestroyed() && missile != null){\n\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\tmissile = null;\n\t\t\t}\n\t\t}\n\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\tfMissile = null;\n\t\t\t}\n\t\t}\n\t}", "void move_missiles() {\n // Ship missiles\n ship.moveMissiles();\n for (int i = 0; i < ship_missile_image_views.size(); i++) {\n ship_missile_image_views.get(i).setY(ship.missiles.get(i).y_position);\n }\n\n // Enemy missiles\n Alien.moveMissiles();\n for (int i = 0; i < alien_missile_image_views.size(); i++) {\n alien_missile_image_views.get(i).setY(Alien.missiles.get(i).y_position);\n }\n }", "List<Tile> getAdjacentTiles();", "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 }", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}", "private static void addUnexploredAdjacentTiles(Board board, DisplayTile startTile, HashMap<DisplayTile, DisplayTile> chainedTiles, LinkedList<DisplayTile> tilesToExplore) {\n\t\tif (startTile.isRoomTile()) {\n\t\t\tfor (DisplayTile exitTile : board.getFreeExitTiles(startTile.getRoom())) \n\t\t\t\taddUnexploredTile(exitTile, chainedTiles, tilesToExplore);\n\t\t}\n\t\telse {\n\t\t\tfor (Direction direction : DisplayTile.Direction.values()) {\n\t\t\t\tDisplayTile adjacentTile = board.getAdjacentTile(startTile, direction);\n\t\t\t\tif (isTileAvailable(adjacentTile, direction, chainedTiles))\n\t\t\t\t\taddUnexploredTile(adjacentTile, chainedTiles, tilesToExplore);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void indicateValidTiles(JointMap jointMap) {\n int rangeAhead = getEntitySource().getXGrid() + getXRange();\n int rangeBehind = getEntitySource().getXGrid() - getXRange();\n int rangeDown = getEntitySource().getYGrid() + getYRange();\n int rangeUp = getEntitySource().getYGrid() - getYRange();\n\n indicateValidTileHelper(jointMap, rangeAhead, rangeBehind, rangeDown, rangeUp, false, false);\n }", "@Override\n public void revealAllMines() {\n for (Tile[] tiles : grid) {\n for (Tile t : tiles) {\n if (t.getType() == Tile.MINE) {\n t.setState(Tile.REVEALED);\n }\n }\n }\n }", "@Override\n\tprotected void modify(Locations locations) {\n\t\tfor (PeerAddress toRemove : unreachablePeers) {\n\t\t\tlocations.removePeerAddress(toRemove);\n\t\t}\n\n\t}", "public void removeAllContentFromLocation() {\n\n\t\tcontentMap.clear();\n\t}", "public InaccessibleTile(int x, int y) {\n super(true, true, true, true, x, y);\n }", "public void removeTile(int i)\n {\n int c = 0;\n for(Tile t: tiles)\n {\n if(t != null)\n c += 1;\n }\n c -=1;\n \n \n if(!(c < 2))\n {\n if(i == c)\n {\n tiles[i] = null;\n previews[i] = null;\n previewGradients[i] = null;\n previewHover[i] = false;\n activeTile = i-1;\n createPreviewGradients();\n return;\n }\n else\n {\n int last = 0;\n for(int j = i; j < c; j++)\n {\n tiles[j] = tiles[j+1];\n if(tiles[j] != null)\n tiles[j].setTileLevel(j);\n previews[j] = previews[j+1];\n previewGradients[j] = previewGradients[j+1];\n previewHover[j] = previewHover[j+1];\n last = j;\n }\n last += 1;\n tiles[last] = null;\n previews[last] = null;\n previewGradients[last] = null;\n previewHover[last] = false;\n createPreviewGradients();\n \n return;\n }\n }\n \n }" ]
[ "0.63067734", "0.58997375", "0.5768685", "0.57648116", "0.5681153", "0.5661004", "0.55567753", "0.5545994", "0.55128217", "0.54224277", "0.54214394", "0.5415899", "0.54090893", "0.53399193", "0.53105843", "0.53071105", "0.529363", "0.52514076", "0.52447563", "0.5233695", "0.52236104", "0.52054393", "0.51999336", "0.51746076", "0.5174261", "0.51570505", "0.5154345", "0.51376396", "0.51349187", "0.51326025", "0.5131774", "0.510829", "0.5098727", "0.5074188", "0.5063404", "0.5056609", "0.50524074", "0.5045559", "0.5037185", "0.5018736", "0.5017633", "0.49986836", "0.49971113", "0.49794742", "0.496995", "0.49643704", "0.49537167", "0.49369505", "0.4935946", "0.49330252", "0.49082577", "0.48995936", "0.48973858", "0.48865098", "0.48760784", "0.4870418", "0.48635805", "0.48391822", "0.48379156", "0.48248202", "0.48096913", "0.48092544", "0.48043138", "0.47932926", "0.47890297", "0.47874498", "0.47851768", "0.4784917", "0.47713873", "0.47625506", "0.47528672", "0.4750059", "0.47486123", "0.47459552", "0.4744837", "0.4742849", "0.4739999", "0.47325763", "0.47325698", "0.47324473", "0.4729278", "0.4713027", "0.47100893", "0.47056893", "0.47032392", "0.47028854", "0.4702281", "0.46820378", "0.468166", "0.46814194", "0.46742266", "0.46648476", "0.46639723", "0.4660844", "0.4653572", "0.46375152", "0.4637209", "0.46354946", "0.46340773", "0.46328107" ]
0.5141182
27
Do a inside check during the next run of the thread loop.
public void checkInside() { checkInsideDone = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void run() {\n\t\t\tcheck();\n\t\t}", "private void checkCrossThreads() {\t\r\n\t\t\tisJumppingBetweenThreads = (currentThread != Thread.currentThread());\r\n\t\t}", "private void whileShouldRun(PrintWriter out, BufferedReader in) throws IOException, InterruptedException {\n\t\tLog.fine(secondsSinceLastLog());\n\t\twhile ((Nex.SHOULD_RUN || (emptyNow && !messageQueue.isEmpty())) && secondsSinceLastLog() < 180) {\n\t\t\tlogToServer(out, in);\n\t\t\t//\tcheckIfBanned(out, in);\n\t\t\tif (!messageQueue.isEmpty()) {\n\t\t\t\thandleMessageQueue(out, in);\n\t\t\t\tif(emptyNow) continue;\n\t\t\t}\n\t\t\tcheckStuck();\n\t\t\temptyNow = false;\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\t//Nex.SHOULD_RUN = false;\n\t\t\n\t}", "protected boolean isInLoop() {\n return _loopInfo != null;\n }", "private synchronized void checkCollisions() {\n // I'm note sure whether this function is needed. \n // This code could go in do Collisions()\n // It was sort of painfull to make this work and I ended up making a mess\n // so this architecture may have good changes of improvement.\n //\n goCheckCollisions = true;\n isThreadLoopDone = false;\n notifyAll();\n while (!isThreadLoopDone) {\n try {\n wait();\n } catch (InterruptedException ex) {}\n }\n }", "public void check() {\n\t\t\ttry {\n\t\t\t\twhile (num < MAX) {\n\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\tlong workingNum = num;\n\t\t\t\t\tif (isPrime(workingNum)) {\n\t\t\t\t\t\tif (workingNum == 1)\n\t\t\t\t\t\t\tworkingNum = 2;\n\t\t\t\t\t\tmsg.obj = workingNum;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t}\n\n\t\t\t\t\tnum += 2;\n\n\t\t\t\t}\n\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\tLog.d(TAG, \"Counter has reached Max\");\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"max\", \"Counter has reached Max\");\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t// If the Thread is interrupted.\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tLog.d(TAG, \"Thread interrupted\");\n\t\t\t}\n\n\t\t}", "protected void afterLockWaitingForBooleanCondition() {\n }", "@SuppressWarnings(\"nls\")\n @Override\n public void run() {\n while (running) {\n while (pauseLoop) {\n try {\n synchronized (unchecked) {\n unchecked.wait();\n }\n } catch (final InterruptedException e) {\n LOGGER.debug(\"Unexpected wakeup during pause.\", e);\n }\n }\n performInsideCheck();\n \n if (hasAndProcessUnchecked()) {\n continue;\n }\n \n try {\n synchronized (unchecked) {\n unchecked.wait();\n }\n } catch (final InterruptedException e) {\n LOGGER.debug(\"Unexpected wake up of the map processor\", e);\n }\n }\n }", "public final void inCheck() {\n\t\tout.println(\"You have been placed in check!\");\n\t}", "private void doStuff() {\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // continue doing something\n\n // check the condition\n if (shouldContinue == false) {\n stopSelf();\n return;\n }\n\n // put those checks wherever you need\n }", "public synchronized void run() {\n\t\twhile(true){\n\t\t\tif(!il.isEmpty()){\n\t\t\t\tint tempPrime = il.get();\n\t\t\t\tcheckPrime(tempPrime);\n\t\t\t}\n\t\t}\n\t}", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "@Override\n public void run() {\n assertEquals(3, state.get());\n latch2.countDown();\n }", "@Override\n public boolean isDone() {\n // boolean result = true;\n // try {\n // result = !evaluateCondition();\n // } catch (Exception e) {\n // logger.error(e.getMessage(), e);\n // }\n // setDone(true);\n // return result;\n // setDone(false);\n return false;\n }", "@Override\n public void run() {\n checkSession();\n\n }", "public void run() {\n\t\tthis.checkConnectedList();\n\t}", "private void checkIfAlive() {\n synchronized (this) {\n if (!mIsAlive) {\n Log.e(LOG_TAG, \"use of a released dataHandler\", new Exception(\"use of a released dataHandler\"));\n //throw new AssertionError(\"Should not used a MXDataHandler\");\n }\n }\n }", "private void checkIsAbleToFire() {\n\n\t\tif (ticksToNextFire <= currentTickCount) {\n\t\t\tisAbleToFire = true;\n\t\t} else {\n\t\t\tisAbleToFire = false;\n\t\t}\n\t}", "public boolean foundLoop();", "public final void run() {\n AppMethodBeat.i(10961);\n synchronized (e.class) {\n try {\n if (e.hoH != null) {\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.o(10961);\n }\n }\n }", "private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }", "public void checkOffTask() {\n isDone = true;\n }", "public boolean checkAndIncrement() {\n\t\tsynchronized(lock) {\n\t\t\tif (passes == 0) {\n\t\t\t\tpasses++;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tpasses = 0;\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\twhile (!isDeadlock) {\r\n\t\t\tcheckDeadlock();\r\n\t\t}\r\n\t}", "private void wtfIfInLock() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n Slogf.wtfStack(LOG_TAG, \"Shouldn't be called with DPMS lock held\");\n }\n }", "public void checkIn() {\n\t}", "private void checkForCompletion()\n\t\t\t{\n\t\t\t\tcompletionflag = true;\n\t\t\t\tfor (j = 0; j < 9; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (cpuflag[j] == false && flag[j] == false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcompletionflag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t}", "@Override\n public void run() {\n this.verifySquare();\n }", "public void run(){\r\n //print out what thread is running\r\n System.out.println(\"Thread: \" + k);\r\n //while the ant in the current thread hasnt seen all the nubmers\r\n while (SCPParallel.colony.get(k + SCPParallel.adjust).seenAll == false\r\n && SCPParallel.colony.get(k + SCPParallel.adjust).seenAllNumbers(SCPParallel.universe, SCPParallel.sets) == false){\r\n //get the ants next step\r\n SCPParallel.colony.get(k + SCPParallel.adjust).addToPath(SCPParallel.colony.get(k + SCPParallel.adjust).getNextStep(SCPParallel.sets, SCPParallel.pheremones));\r\n }\r\n //counts down the latch when the ant has seen all the numbers\r\n SCPParallel.latch.countDown();\r\n }", "@Override\n\t\tpublic void run() {\n\t\t\tint mapIndex = getFloorIndexByName(mMyLocationFloor);\n\t\t\tif (mapIndex > -1) {\n\t\t\t\tsetCheckAt(mapIndex);\n\t\t\t}\n\t\t}", "public boolean continueExecuting()\n {\n double var1 = this.theEntity.getDistanceSq((double)this.entityPosX, (double)this.entityPosY, (double)this.entityPosZ);\n return this.breakingTime <= 240 && !this.field_151504_e.func_150015_f(this.theEntity.worldObj, this.entityPosX, this.entityPosY, this.entityPosZ) && var1 < 4.0D;\n }", "private void checking() {\n checkProgress = new ProgressDialog(DownloadActivity.this);\n checkProgress.setCancelable(false);\n checkProgress.setMessage(getResources().getString(R.string.checking_message));\n checkProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n checkProgress.setIndeterminate(true);\n checkProgress.show();\n new Thread(new Runnable() {\n public void run() {\n while (check == 0) {}\n checkProgress.dismiss();\n }\n }).start();\n }", "private void checkAccount() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n// mPerson = mProvider.getPerson(mLogin.getUserGuid(), false);\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(checkAccountRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"checkAccount\");\n thread.start();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tisAlive = false;\r\n\t\t\t}", "public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }", "boolean isRunningDuringTick(int tick);", "@Override\r\n public void run() {\r\n if (node.isPredecessorSet()) {\r\n // Create the task and set the timer\r\n task = new CheckPredecessorTimer(node);\r\n (new Timer()).schedule(task, CHECK_PERIOD);\r\n\r\n node.checkPredecessor();\r\n }\r\n }", "@Override\n\tpublic Boolean call() throws Exception {\n\t\tRandom rand = new Random();\n\t\tint seconds = rand.nextInt(6);\n\t\tif (seconds == 0) {\n\t\t\t// pretend there was an error\n\t\t\tthrow new RuntimeException(\"I love the new thread stuff!!! :)\");\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(seconds * 100);\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t// even = true, odd = false\n\t\treturn seconds % 2 == 0;\n\t}", "@Override\n public void run() {\n int time = 59;\n while (time >= -1) {\n try {\n Message message = new Message();\n message.what = AppConfig.CHECKCODE;\n message.obj = time;\n handler.sendMessage(message);\n Thread.sleep(1000);\n time--;\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\tfor(long i=start;i<=end;i++)\n\t\t{\n\t\t\tif(isprime(i))\n\t\t\t\tcount++;\n\t\t\t\n\t\t}\n\t\tres =false;\n\t}", "@Override\n public void run() {\n super.run();\n notAtomic.naIncreament();\n }", "@Override\n public void run() {\n do{\n try {\n Thread.sleep(4000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n if(loopTimes>loopLimit){\n if(MainActivity.IsShowLogCat)\n Log.e(\"LoopTimes\", \"設定失敗超過\"+loopLimit+\"次\");\n return;\n }\n if(isSet==0){\n if(MainActivity.IsShowLogCat)\n Log.e(\"isSet\", isSet+\"\");\n MainActivity.hWorker.post(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n transmit_set();\n }\n });\n }\n\n }while(isSet!=-1 && MainActivity.isExist);\n }", "@Override\n\tpublic boolean run() throws Exception {\n\t\treturn true;\n\t}", "public void check () {\n // declaring local variables\n WebElement webElement;\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. ===\");\n } else {\n // getting the web element of the check box with the default timeout\n // and then check its status\n\n int MAXRETRIES = 3;\n int tries = 1;\n while (!this.isChecked() && tries <= MAXRETRIES) {\n // need to give a second for the browser to catch up with the web driver\n //sleep(1, TimeUnit.SECONDS);\n\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n this.clickWebElement (webElement);\n\n\n\n\n tries++;\n if (this.isChecked() == false)\n {\n sleep(1, TimeUnit.SECONDS);\n }\n }\n }\n }", "public static void check(boolean condition) throws IllegalStateException {\n if (checking && !condition) {\n throw new IllegalStateException(Thread.currentThread() + \" check failed\"); // NORES\n }\n }", "public void run() {\n\t\tcheckUsers();\n\t}", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"inside run() method.....\");\n\n\t\tlock();\n\n\t}", "@Override\n public void run() {\n if (this.runQueueProcessor.get()) {\n try {\n // wait until we are ready to run again\n if (this.tools.getTimestamp() >= this.runAgainAfterMs.get()) {\n\n long timeNow = this.tools.getTimestamp();\n long sinceLastRun = timeNow - this.lastRun;\n long sinceLastKick = timeNow - this.lastKicked;\n\n boolean kicked = sinceLastRun > sinceLastKick;\n double secondsSinceLastRun = sinceLastRun / 1000.0;\n LogMap logmap = LogMap.map(\"Op\", \"queuecheck\")\n .put(\"gap\", secondsSinceLastRun)\n .put(\"kicked\", kicked);\n this.logger.logDebug(this.logFrom, String.format(\"queue check: last check was %.1fs ago%s\",\n secondsSinceLastRun,\n (kicked) ? String.format(\", kicked %.1fs ago\", sinceLastKick / 1000.0) : \"\"),\n logmap);\n this.lastRun = timeNow;\n\n // by default, wait a small amount of time to check again\n // this may be changed inside processQueue\n queueCheckAgainAfter(this.config.getProcessQueueIntervalDefault());\n\n // process queue now\n processQueue();\n }\n } catch (Exception e) {\n this.logger.logException(this.logFrom, e);\n }\n }\n }", "public void run() {\n\t\tacabado = false;\n\t\tint informesListos = contenedor.getListaInformesFinales().size();\n\n\t\twhile (tamanoFamilias > informesListos) {\t\t\t//mientras los informes intermedios listos no coincidan con el numero de familias totales\n\t\t\twhile (contenedor.getListaInformesIntermedios().isEmpty()\t\t//mientras el contenedor tenga informes intermedios y todavia tengamos familias por consultar\n\t\t\t\t\t&& !familiasBecario.getConjuntoFamilias().isEmpty()) {\n\t\t\t\tSystem.out.println(\"El becario \" + numeroBecario + \" esta haciendo cafes y barriendo\");\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contenedor.bloqueaInformesIntermedios(this)) {\t\t//devuelve true si se ha podido realizar un informe final\n\t\t\t\tinformesListos = contenedor.getListaInformesFinales().size();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tacabado = true;\n\n\t}", "public void run() {\n while (true) {\n checkPalabras();\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void check(){\n check1();\n check2();\n check3();\n check4();\n check5();\n check6();\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tboolean bok = checkMinPath();\n\t\t\t\t\t\t\tif (bok) {\n\t\t\t\t\t\t\t\tcanRun = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (exitWhenGetNotLock) {// 获取不到锁,直接不执行,return\n\t\t\t\t\t\t\t\t\treturn;\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\twhile (true) {\n\t\t\t\t\t\t\t\tif (canRun) {\n\t\t\t\t\t\t\t\t\tboolean bok1 = checkMinPath();\n\t\t\t\t\t\t\t\t\tif (bok1) {// 获取所成功\n\t\t\t\t\t\t\t\t\t\tgetLockSuccess();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"同步等待...\");\n\t\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (KeeperException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private/* static synchronized */boolean setErrFound() {\r\n\t\tsynchronized (workerLock) {\r\n\t\t\tif (errFoundByThread == -1) {\r\n\t\t\t\terrFoundByThread = this.id; // GetId();\r\n\t\t\t\treturn true;\r\n\t\t\t} else if (errFoundByThread == this.id) { // (* GetId()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tisRepeatFlag = true;\n\t\t}", "@Override\n public boolean callCheck() {\n return last == null;\n }", "private void waitUntilAllThreadsAreFinished() {\n int index = 1;\n\n while (true) {\n while (index <= noThread) {\n if (carry[index] == -1) {\n index = 1;\n } else {\n index++;\n }\n }\n break;\n }\n }", "public IgniteThread checkpointerThread() {\n return checkpointerThread;\n }", "public void doChecking() {\n \tdoCheckingDump();\n \tdoCheckingMatl();\n }", "private static void tickOnThread() {\n final Thread thread = new Thread(new Runnable(){\n @Override\n public void run() {\n tick(true);\n }\n });\n thread.start();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tif (conditionVariable.block(1000))\r\n\t\t\t\t\tPersistentGameService.this.stopSelf();\r\n\t\t\t\tnewPeerWords = getPeerWords();\r\n\t\t\t\tisChanged();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tUtils.printLog(TAG, \"timer set isNextPreValid = true; \");\r\n\t\t\t\tisNextPreValid = true;\r\n\t\t\t\tcancel();\r\n\t\t\t}", "@Override\r\n\tpublic void run() {\n\t if (isDone) {\r\n\t\ttimer.cancel();\r\n\t\treturn;\r\n\t }\r\n\t \r\n\t if (interestedList.size() == 0) {\r\n\t\treturn;\r\n\t }\r\n\t \r\n\t synchronized (interestedList) {\r\n\t\tint index = (int)(Math.random()*interestedList.size());\r\n\t\tif (ouNbr != 0 && interestedList.get(index) != ouNbr) {\r\n\t\t //System.out.println(\"Optimistically Unchoke \" + interestedList.get(index));\r\n\t\t Message.sendMsg(new UnChoke(), connmap.get(interestedList.get(index)).getOutputStream());\r\n\t\t \r\n\t\t if (ouNbr != 0 && !prefNbrs.contains(ouNbr)) {\r\n\t\t\t//System.out.println(\"Optimistically Choke \" + ouNbr);\r\n\t\t\tMessage.sendMsg(new Choke(), connmap.get(ouNbr).getOutputStream());\r\n\t\t }\r\n\t\t ouNbr = interestedList.get(index);\r\n\t\t log (\"Peer \" + pid + \" has the optimistically-unchoked neighbot \" + ouNbr);\r\n\t\t}\r\n\t }\r\n\t \r\n\t}", "private void checkEvent (JPDABreakpointEvent event) {\n assertNotNull (\n \"Breakpoint event: Context thread is null\", \n event.getThread ()\n );\n JPDAThread thread = event.getThread ();\n if (thread.getName ().startsWith (\"test-\")) {\n JPDAThreadGroup group = thread.getParentThreadGroup ();\n assertEquals (\n \"Wrong thread group\", \n \"testgroup\", \n group.getName ()\n );\n assertEquals (\n \"Wrong parent thread group\", \n \"main\", \n group.getParentThreadGroup ().getName ()\n );\n assertEquals (\n \"Wrong number of child thread groups\", \n 0, \n group.getThreadGroups ().length\n );\n JPDAThread [] threads = group.getThreads ();\n for (int i = 0; i < threads.length; i++) {\n JPDAThread jpdaThread = threads [i];\n if ( !jpdaThread.getName ().startsWith (\"test-\")) \n throw new AssertionError \n (\"Thread group contains an alien thread\");\n assertSame (\n \"Child/parent mismatch\", \n jpdaThread.getParentThreadGroup (), \n group\n );\n }\n hitCount++;\n }\n if (thread.getName ().startsWith (\"DestroyJavaVM\")) {\n // Wait a while to gather all events.\n try {\n Thread.sleep(500);\n } catch (InterruptedException iex) {}\n }\n }", "@Override\n public boolean isFinished() {\n return Robot.auton && counter > 50;\n }", "public final void run() {\n /*\n r6 = this;\n r1 = r6.zzapo;\n monitor-enter(r1);\n r0 = r6.zzapn;\t Catch:{ RemoteException -> 0x006b }\n r0 = r0.zzaph;\t Catch:{ RemoteException -> 0x006b }\n if (r0 != 0) goto L_0x0035;\n L_0x000b:\n r0 = r6.zzapn;\t Catch:{ RemoteException -> 0x006b }\n r0 = r0.zzgf();\t Catch:{ RemoteException -> 0x006b }\n r0 = r0.zzis();\t Catch:{ RemoteException -> 0x006b }\n r2 = \"Failed to get conditional properties\";\n r3 = r6.zzant;\t Catch:{ RemoteException -> 0x006b }\n r3 = com.google.android.gms.internal.measurement.zzfh.zzbl(r3);\t Catch:{ RemoteException -> 0x006b }\n r4 = r6.zzanr;\t Catch:{ RemoteException -> 0x006b }\n r5 = r6.zzans;\t Catch:{ RemoteException -> 0x006b }\n r0.zzd(r2, r3, r4, r5);\t Catch:{ RemoteException -> 0x006b }\n r0 = r6.zzapo;\t Catch:{ RemoteException -> 0x006b }\n r2 = java.util.Collections.emptyList();\t Catch:{ RemoteException -> 0x006b }\n r0.set(r2);\t Catch:{ RemoteException -> 0x006b }\n r0 = r6.zzapo;\t Catch:{ all -> 0x0058 }\n r0.notify();\t Catch:{ all -> 0x0058 }\n monitor-exit(r1);\t Catch:{ all -> 0x0058 }\n L_0x0034:\n return;\n L_0x0035:\n r2 = r6.zzant;\t Catch:{ RemoteException -> 0x006b }\n r2 = android.text.TextUtils.isEmpty(r2);\t Catch:{ RemoteException -> 0x006b }\n if (r2 == 0) goto L_0x005b;\n L_0x003d:\n r2 = r6.zzapo;\t Catch:{ RemoteException -> 0x006b }\n r3 = r6.zzanr;\t Catch:{ RemoteException -> 0x006b }\n r4 = r6.zzans;\t Catch:{ RemoteException -> 0x006b }\n r5 = r6.zzano;\t Catch:{ RemoteException -> 0x006b }\n r0 = r0.zza(r3, r4, r5);\t Catch:{ RemoteException -> 0x006b }\n r2.set(r0);\t Catch:{ RemoteException -> 0x006b }\n L_0x004c:\n r0 = r6.zzapn;\t Catch:{ RemoteException -> 0x006b }\n r0.zzcu();\t Catch:{ RemoteException -> 0x006b }\n r0 = r6.zzapo;\t Catch:{ all -> 0x0058 }\n r0.notify();\t Catch:{ all -> 0x0058 }\n L_0x0056:\n monitor-exit(r1);\t Catch:{ all -> 0x0058 }\n goto L_0x0034;\n L_0x0058:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0058 }\n throw r0;\n L_0x005b:\n r2 = r6.zzapo;\t Catch:{ RemoteException -> 0x006b }\n r3 = r6.zzant;\t Catch:{ RemoteException -> 0x006b }\n r4 = r6.zzanr;\t Catch:{ RemoteException -> 0x006b }\n r5 = r6.zzans;\t Catch:{ RemoteException -> 0x006b }\n r0 = r0.zze(r3, r4, r5);\t Catch:{ RemoteException -> 0x006b }\n r2.set(r0);\t Catch:{ RemoteException -> 0x006b }\n goto L_0x004c;\n L_0x006b:\n r0 = move-exception;\n r2 = r6.zzapn;\t Catch:{ all -> 0x0093 }\n r2 = r2.zzgf();\t Catch:{ all -> 0x0093 }\n r2 = r2.zzis();\t Catch:{ all -> 0x0093 }\n r3 = \"Failed to get conditional properties\";\n r4 = r6.zzant;\t Catch:{ all -> 0x0093 }\n r4 = com.google.android.gms.internal.measurement.zzfh.zzbl(r4);\t Catch:{ all -> 0x0093 }\n r5 = r6.zzanr;\t Catch:{ all -> 0x0093 }\n r2.zzd(r3, r4, r5, r0);\t Catch:{ all -> 0x0093 }\n r0 = r6.zzapo;\t Catch:{ all -> 0x0093 }\n r2 = java.util.Collections.emptyList();\t Catch:{ all -> 0x0093 }\n r0.set(r2);\t Catch:{ all -> 0x0093 }\n r0 = r6.zzapo;\t Catch:{ all -> 0x0058 }\n r0.notify();\t Catch:{ all -> 0x0058 }\n goto L_0x0056;\n L_0x0093:\n r0 = move-exception;\n r2 = r6.zzapo;\t Catch:{ all -> 0x0058 }\n r2.notify();\t Catch:{ all -> 0x0058 }\n throw r0;\t Catch:{ all -> 0x0058 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzit.run():void\");\n }", "@Override\n\tpublic void run() {\n\t\twhile(true){\n \tlock.lock();\n \ttry{\n\t \tif(observers.isEmpty()){\n\t \t\treturn;\n\t \t}\n \t}\n \tfinally{\n \t\tlock.unlock();\n \t}\n }\n\t}", "public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }", "public boolean checkAndReturn() {\n // Check if any thread has been interrupted\n if (interrupted.get()) {\n // If so, interrupt this thread\n interrupt();\n return true;\n }\n // Check if this thread has been interrupted\n if (Thread.currentThread().isInterrupted()) {\n // If so, interrupt other threads\n interrupted.set(true);\n return true;\n }\n return false;\n }", "public void run(){\n long startTime = System.nanoTime();\n long elapsedTime = System.nanoTime() - startTime;\n while(elapsedTime<500000000 && p.acknowledged == false){\n //echo(\"Waiting\");\n elapsedTime = System.nanoTime() - startTime;\n if(p.acknowledged == true){\n return;\n }\n }\n if(elapsedTime>= 500000000)\n {\n p.timed = true;\n //System.out.println(\"thread timed out at packet \"+ p.getSeq());\n for(int i=p.getSeq(); i<p.getSeq()+window; i++){\n if(i<packets.size()){\n packets.get(i).sent = false;\n }\n }\n //p.sent = false;\n }\n\n\n }", "public boolean isAlive(){\r\n\t\treturn Thread.currentThread() == workerThread;\r\n\t}", "@Override\n public void run()\n {\n active = true;\n try\n {\n try\n {\n lock.acquire();\n }\n catch (InterruptedException e)\n {\n return;\n }\n guardedRun();\n }\n finally\n {\n lock.release();\n }\n }", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "@Override\n\tpublic void run() {\n\t\twhile(true) {//模拟某人不停取钱\n\t\t\tboolean flag = bC.withdrowMoney(1);\n\t\t\t//停止条件\n\t\t\tif(flag==false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void iterate() {\n\t\tif( !threadQueue.isEmpty() ) {\n\t\t\temptyReported = false;\n\t\t\tLogger.debug(\"Threads in queue: \" + threadQueue.size(), true);\n\t\t\ttry {\n\t\t\t\tthreadQueue.remove(0).start();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse if( !emptyReported ) {\n\t\t\tLogger.debug(\"Thread queue empty.\", true);\n\t\t\temptyReported = true;\n\t\t}\n\t}", "public boolean continueExecuting()\n {\n if (!closestEntity.isEntityAlive())\n {\n return false;\n }\n\n if (field_46105_a.getDistanceSqToEntity(closestEntity) > (double)(field_46101_d * field_46101_d))\n {\n return false;\n }\n else\n {\n return field_46102_e > 0;\n }\n }", "@Override\n public void run()\n {\n result[0] = true;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\t\tprivate void checkJobInstanceStatus() {\r\n \t\r\n \tString checkId = UUID.randomUUID().toString();\r\n \t\r\n \tlogger.info(checkId + \", [LivingTaskManager]: start checkJobInstanceStatus\"\r\n \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() \r\n \t\t\t+ \", keySet:\" + LoggerUtil.displayJobInstanceId(livingJobInstanceClientMachineMap.keySet()));\r\n \t\r\n \tint checkAmount = 0;\r\n \t\r\n \tIterator iterator = livingJobInstanceClientMachineMap.entrySet().iterator();\r\n \t\twhile(iterator.hasNext()) { \r\n \t\t\tMap.Entry entry = (Map.Entry)iterator.next();\r\n \t\t\tServerJobInstanceMapping.JobInstanceKey key = (ServerJobInstanceMapping.JobInstanceKey)entry.getKey();\r\n \t\t\t\r\n \t\t\tList<RemoteMachine> machineList = (List<RemoteMachine>)entry.getValue();\r\n \t\t\t\r\n \t\t\tif(CollectionUtils.isEmpty(machineList)) {\r\n \t\t\t\tlogger.info(checkId + \", [LivingTaskManager]: checkJobInstanceStatus machineList isEmpty\"\r\n \t \t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", key:\" + key);\r\n \t\t\t\tcontinue ;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tsynchronized(machineList) {\r\n \t\t\t\tIterator<RemoteMachine> iteratorMachineList = machineList.iterator();\r\n \t\t\t\twhile(iteratorMachineList.hasNext()) {\r\n \t\t\t\t\t\r\n \t\t\t\t\tRemoteMachine client = iteratorMachineList.next();\r\n \t\t\t\t\t\r\n \t\t\t\t\tResult<String> checkResult = null;\r\n try {\r\n client.setTimeout(serverConfig.getHeartBeatCheckTimeout());\r\n InvocationContext.setRemoteMachine(client);\r\n checkResult = clientService.heartBeatCheckJobInstance(key.getJobType(), key.getJobId(), key.getJobInstanceId());\r\n handCheckResult(key, checkResult, client);\r\n } catch (Throwable e) {\r\n logger.error(\"[LivingTaskManager]: task checkJobInstanceStatus error, key:\" + key, e);\r\n handCheckResult(key, null, client);\r\n } finally {\r\n \tcheckAmount ++;\r\n }\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\t\r\n \t\tlogger.info(checkId + \", [LivingTaskManager]: finish checkJobInstanceStatus\"\r\n \t\t\t\t+ \", mapSize:\" + livingJobInstanceClientMachineMap.size() + \", checkAmount:\" + checkAmount);\r\n }", "@Override\n public void run() {\n while (true) {\n long currentTime = System.nanoTime();\n\n draw();\n check(currentTime);\n }\n }", "protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }", "private void checkXRay() {\n\t\tprint(\"Checking xray-waiting-list...\");\n\t\tif (_xrayDoctor.isWaiting() && _xrayWaiters.size() > 0) {\n\t\t\tprint(\"Xray-shooting starts: \" + _xrayWaiters.getFirst());\n\t\t\tint t = computeExaminationTime(Event.XRAY_SHOOTING);\n\t\t\tPerson p = (Person) _xrayWaiters.removeFirst();\n\t\t\t_eventQueue.insert(\n\t\t\t\tnew Event(Event.XRAY_SHOOTING, time + t, p, _xrayDoctor));\n\t\t\t_xrayDoctor.stopWaiting();\n\t\t\tp.stopWaiting();\n\t\t}\n\t}", "@Override\n protected boolean runInEQ() {\n return true;\n }", "public void run() \n {\n while(RunTime > 0)\n {\n if(m_Pause)\n {\n try\n {\n synchronized (Thread.currentThread())\n {\n Thread.currentThread().wait();\n }\n } \n catch (InterruptedException e)\n {\n // the VM doesn't want us to sleep anymore,\n // so get back to work\n }\n m_Pause = false;\n }\n \n try \n {\n Thread.sleep(1);\n } \n catch (InterruptedException e)\n {\n // the VM doesn't want us to sleep anymore,\n // so get back to work\n }\n RunTime -=1 * TimeMultiplier;\n ControlBlock.CurrentRunTime += 1 * TimeMultiplier;\n }\n Return = true;\n }", "@Override\n public boolean isFinished() {\n return !(System.currentTimeMillis() - currentMs < timeMs) &&\n // Then check to see if the lift is in the correct position and for the minimum number of ticks\n Math.abs(Robot.lift.getPID().getSetpoint() - Robot.lift.getEncoderHeight()) < error\n && ++currentCycles >= minDoneCycles;\n }", "public boolean inProgress(){return (this.currentTicket != null);}", "private boolean isWorkSearch() {\n int i = 0;\n for (Thread thread : this.threadsSaerch) {\n if (thread != null && thread.isAlive()) {\n i++;\n }\n }\n return i == 0;\n }", "private void checkTickListener()\n\t{\n\t}", "public Boolean timerCheck(){\n return isRunning;\n }", "public void doIt() {\n status = true;\n }", "@Override\n public void run()\n {\n if(_Running.compareAndSet(IDLE, RUNNING)) {\n _SequenceBarrier.clearAlert();\n\n try {\n if(_Running.get() == RUNNING) {\n processEvents();\n }\n }\n finally {\n _Running.set(IDLE);\n }\n }\n else {\n // This is a little bit of guess work. The running state could of changed to HALTED by\n // this point. However, Java does not have compareAndExchange which is the only way\n // to get it exactly correct.\n if(_Running.get() == RUNNING) {\n throw new IllegalStateException(\"Thread is already running\");\n }\n else {\n halt();\n }\n }\n }", "public void run() {\n try {\n abe.a.set((Object)true);\n xi xi2 = abp.this.a.a(this.a);\n abp.this.h.sendMessage(abp.this.h.obtainMessage(0, xi2));\n return;\n }\n catch (RuntimeException var3_3) {\n abp.this.h.sendMessage(abp.this.h.obtainMessage(1, (Object)var3_3));\n return;\n }\n finally {\n abe.a.set((Object)false);\n abp.this.b(this.a);\n xh xh2 = (xh)abp.this.g.get();\n if (xh2 == null) return;\n xh2.b(abp.this);\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(true){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "@Override\n public void run()\n {\n is_started = true;\n while (!isShutdown())\n {\n LogicControl.sleep( 1 * 1000 );\n\n }\n finished = true;\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(true) {\r\n\t\t\t\tsynchronized(a) {\r\n\t\t\t\t\twhile(!a.isEmpty()) {\r\n\t\t\t\t\t\ta.getFirst().cover();\r\n\t\t\t\t\t\ta.removeFirst();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t} catch (InterruptedException 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}", "@Test\r\n public void testThreaded() throws Exception {\r\n\r\n final ClientValue<Integer> value = new ClientValue<>();\r\n\r\n List<SetCheckValue> runs = new ArrayList<>();\r\n\r\n for (int i = 0; i < 500; i++) {\r\n runs.add(new SetCheckValue(value, i, false));\r\n }\r\n runAll(runs);\r\n checkForSuccess(runs);\r\n for (int i = 0; i < 500; i++) {\r\n runs.add(new SetCheckValue(value, i, true));\r\n }\r\n\r\n runAll(runs);\r\n checkForSuccess(runs);\r\n }", "void runningLoop() throws NoResponseException, NotConnectedException\n\t{\n\t\tint update = propertyGet(UPDATE_DELAY);\n\t\tboolean nowait = (propertyGet(NO_WAITING) == 1) ? true : false; // DEBUG ONLY; do not document\n\t\tboolean stop = false;\n\n\t\t// not there, not connected or already halted and no pending resume requests => we are done\n\t\tif (!haveConnection() || (m_session.isSuspended() && !m_requestResume) )\n\t\t{\n\t\t\tprocessEvents();\n\t\t\tstop = true;\n\t\t}\n\n\t while(!stop)\n\t\t{\n\t\t\t// allow keyboard input\n\t\t\tif (!nowait)\n\t\t\t\tm_keyboardReadRequest = true;\n\n\t\t\tif (m_requestResume)\n\t\t\t{\n\t\t\t\t// resume execution (request fulfilled) and look for keyboard input\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (m_stepResume)\n\t\t\t\t\t\tm_session.stepContinue();\n\t\t\t\t\telse\n\t\t\t\t\t\tm_session.resume();\n\t\t\t\t}\n\t\t\t\tcatch(NotSuspendedException nse)\n\t\t\t\t{\n\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"playerAlreadyRunning\")); //$NON-NLS-1$\n\t\t\t\t}\n\n\t\t\t\tm_requestResume = false;\n\t\t\t\tm_requestHalt = false;\n\t\t\t\tm_stepResume = false;\n\t\t\t}\n\n\t\t\t// sleep for a bit, then process our events.\n\t\t\ttry { Thread.sleep(update); } catch(InterruptedException ie) {}\n\t\t\tprocessEvents();\n\n\t\t\t// lost connection?\n\t\t\tif (!haveConnection())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t\tdumpHaltState(false);\n\t\t\t}\n\t\t\telse if (m_session.isSuspended())\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * We have stopped for some reason. Now for all cases, but conditional\n\t\t\t\t * breakpoints, we should be done. For conditional breakpoints it\n\t\t\t\t * may be that the condition has turned out to be false and thus\n\t\t\t\t * we need to continue\n\t\t\t\t */\n\n\t\t\t\t/**\n\t\t\t\t * Now before we do this see, if we have a valid break reason, since\n\t\t\t\t * we could be still receiving incoming messages, even though we have halted.\n\t\t\t\t * This is definately the case with loading of multiple SWFs. After the load\n\t\t\t\t * we get info on the swf.\n\t\t\t\t */\n\t\t\t\tint tries = 3;\n\t\t\t\twhile (tries-- > 0 && m_session.suspendReason() == SuspendReason.Unknown)\n\t\t\t\t\ttry { Thread.sleep(100); processEvents(); } catch(InterruptedException ie) {}\n\n\t\t\t\tdumpHaltState(false);\n\t\t\t\tif (!m_requestResume)\n\t\t\t\t\tstop = true;\n\t\t\t}\n\t\t\telse if (nowait)\n\t\t\t{\n\t\t\t\tstop = true; // for DEBUG only\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * We are still running which is fine. But let's see if the user has\n\t\t\t\t * tried to enter something on the keyboard. If so, then we need to\n\t\t\t\t * stop\n\t\t\t\t */\n\t\t\t\tif (!m_keyboardInput.isEmpty() && System.getProperty(\"fdbunit\")==null) //$NON-NLS-1$\n\t\t\t\t{\n\t\t\t\t\t// flush the queue and prompt the user if they want us to halt\n\t\t\t\t\tm_keyboardInput.clear();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif (yesNoQuery(getLocalizationManager().getLocalizedTextString(\"doYouWantToHalt\"))) //$NON-NLS-1$\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"attemptingToHalt\")); //$NON-NLS-1$\n\t\t\t\t\t\t\tm_session.suspend();\n\t\t\t\t\t\t\tm_requestHalt = true;\n\n\t\t\t\t\t\t\t// no connection => dump state and end\n\t\t\t\t\t\t\tif (!haveConnection())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdumpHaltState(false);\n\t\t\t\t\t\t\t\tstop = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (!m_session.isSuspended())\n\t\t\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotHalt\")); //$NON-NLS-1$\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(IllegalArgumentException iae)\n\t\t\t\t\t{\n\t\t\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"escapingFromDebuggerPendingLoop\")); //$NON-NLS-1$\n\t\t\t\t\t\tpropertyPut(NO_WAITING, 1);\n\t\t\t\t\t\tstop = true;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(IOException io)\n\t\t\t\t\t{\n\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\targs.put(\"error\", io.getMessage()); //$NON-NLS-1$\n\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"continuingDueToError\", args)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t\tcatch(SuspendedException se)\n\t\t\t\t\t{\n\t\t\t\t\t\t// lucky us, already stopped\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//\t\tSystem.out.println(\"doContinue resume=\"+m_requestResume+\",isSuspended=\"+m_session.isSuspended());\n\t\t}\n\n\t\t// DEBUG ONLY: if we are not waiting then process some events\n\t\tif (nowait)\n\t\t\tprocessEvents();\n\t}", "public void run() { // Custom run function for the main thread\n\t\twhile (true) { // Infinite loop \n\t\t\t\n\t\t\tassignLane(); // It keeps assigning lanes to parties if lanes are available \n\t\t\t\n\t\t\ttry {\n\t\t\t\tsleep(250);\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "boolean defined(ThreadContext tc, RakudoObject obj);", "@Override\n public void run() {\n if (!this.m_running) {\n this.m_running = true;\n this.pollingLooper();\n }\n }", "public final void putSelfInCheck() {\n\t\tout.println(\"You can't place yourself in check.\");\n\t}", "@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }" ]
[ "0.6898877", "0.63515437", "0.6113473", "0.6059891", "0.59764725", "0.59233004", "0.59110063", "0.59015906", "0.5895199", "0.58505595", "0.5796977", "0.5781737", "0.5758867", "0.5746758", "0.57394266", "0.56871533", "0.5662636", "0.5650387", "0.5646489", "0.56344163", "0.5594607", "0.55857766", "0.5576348", "0.5564186", "0.55523574", "0.5545258", "0.55272496", "0.5527175", "0.5522722", "0.5522201", "0.55050856", "0.54960626", "0.54951286", "0.54951125", "0.5493127", "0.5489297", "0.5489154", "0.54804444", "0.54803234", "0.54794", "0.547908", "0.54718447", "0.5462345", "0.5459231", "0.5453135", "0.5447279", "0.5439792", "0.5437528", "0.5435927", "0.5429053", "0.54256815", "0.54229593", "0.54213405", "0.5419244", "0.541101", "0.53803885", "0.5380216", "0.5378707", "0.53782547", "0.5373047", "0.5367147", "0.5365095", "0.53640753", "0.53524107", "0.53510475", "0.5347323", "0.5346474", "0.5342305", "0.53406405", "0.53384733", "0.5337245", "0.5332853", "0.5331204", "0.5329211", "0.5329008", "0.532884", "0.53276575", "0.53255653", "0.53252196", "0.5320985", "0.5315373", "0.5314225", "0.5307179", "0.53037405", "0.52849644", "0.5284036", "0.5277765", "0.52669597", "0.52658916", "0.5261032", "0.52604556", "0.52578366", "0.52554965", "0.5246677", "0.52458507", "0.52442366", "0.5241107", "0.52405906", "0.5233631", "0.5231576" ]
0.7449126
0
Clear the map, that should be done in case all tiles got removed from the map and the current checks need to stop instantly.
public void clear() { synchronized (unchecked) { unchecked.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void clear() { _map.clear(); }", "public void clear() {\r\n this.map.clear();\r\n }", "public void clear() {\n map.clear();\n }", "public void clear() {\n map.clear();\n }", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "public void clear() {\n\t\tmap.clear();\n\t}", "public void\tclear() {\n\t\tmap.clear();\n\t}", "@Override\r\n public void clear() {\r\n map.clear();\r\n }", "public void clear()\n {\n getMap().clear();\n }", "public void clearMap() {\n this.mSimpleTargetIndexMap.clear();\n this.mSimpleTargetGroupChannelMap.clear();\n this.mChannelImageNumMap.clear();\n this.mChannelImageViewMap.clear();\n this.mChannelBitmapMap.clear();\n }", "public void clearMap() {\n if (mMap != null) {\n mMap.clear();\n }\n }", "@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}", "public void clear() {\r\n\t\tentryMap.clear();\r\n\t}", "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "public void clearMap() {\n\t\tfor (int i = 0; i < parkingsArray.size(); i++)\n\t\t\tparkingsArray.valueAt(i).removeMarker();\n\t\tparkingsArray.clear();\n\t\tmap.clear();\n\t}", "public void clear() {\n //construct(initialCap, loadFactor);\n \n //MapElement me = null;\n\n for (int i = 0; i < capacity; i++) {\n if (map[i] != null) {\n /*me = map[i];\n for (int j = 0; j < count[i]; j++) {\n MapElement release = me;\n me = me.getNext();\n releaseMapElement(release);\n }*/ \n map[i] = null;\n }\n }\n contents = 0;\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "@Override\n\tpublic boolean clear() \n\t{\n\t\tthis.map.clear();\n\t\treturn true;\n\t}", "public void clearMap()\n {\n ++this.versionStamp;\n IntHashMapEntry[] ainthashmapentry = this.slots;\n\n for (int i = 0; i < ainthashmapentry.length; ++i)\n {\n ainthashmapentry[i] = null;\n }\n\n this.count = 0;\n }", "@Override\r\n public void clear() {\r\n this.roomMap.clear();\r\n this.buildingMap.clear();\r\n this.roomResponsibleOrgMap.clear();\r\n }", "void clearShapeMap();", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "public void clearAll() {\n rangeMap.clear();\n }", "public synchronized void clearScanMap() {\n scanMap = null;\n }", "public void reset() {\n\t\ttilePath.clear();\n\t}", "public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}", "public void clearSubbedTiles() { subbedTiles.clear(); }", "void clearMap() {\n STRING_STATISTICS.clear();\n }", "public void clear() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tclearEntries();\r\n\t\t\r\n\t}", "public void clearAll() {\n\n\t\t// Removing the graphics from the layer\n\t\trouteLayer.removeAll();\n\t\t// hiddenSegmentsLayer.removeAll();\n\t\tmMapViewHelper.removeAllGraphics();\n\t\tmResults = null;\n\n\t}", "public void clear() {\n\t\tthis.classMap.clear();\n\t}", "public void testNormalClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "public void clear() {\r\n\t\tCallResultMap map = getMap(false);\r\n\t\tif (map != null) {\r\n\t\t\tmap.clear();\r\n\t\t}\r\n\t}", "public void resetMap() {\n for (int x = 0; x < cells; x++) {\n for (int y = 0; y < cells; y++) {\n Node current = map[x][y];\n if (current.getType() == 4 || current.getType() == 5)\n map[x][y] = new Node(3, x, y);\n }\n }\n\n if (startx > -1 && starty > -1) { //RESET THE START AND FINISH\n map[startx][starty] = new Node(0, startx, starty);\n map[startx][starty].setJumps(0);\n }\n\n if (finishx > -1 && finishy > -1)\n map[finishx][finishy] = new Node(1, finishx, finishy);\n\n reset(); //RESET SOME VARIABLES\n }", "public void clear() {\r\n messageMap.clear();\r\n }", "@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tmap[i] = new LocalEntry<>();\n\t\t}\n\n\t}", "public void clear() {\n\t\tlocation.clear();\n\t\theap.clear();\n\t}", "public void clear() {\n\t\tentries.clear();\n\t}", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public void clearAll() {\n\t\tlog.info(\"Clear map tree bid card\");\n\t\tcacheTree.clearAllTreeBidCard();\n\t\tlog.info(\"Clear map tree bid info\");\n\t\tcacheTree.clearAllTreeBidInfo();\n\t}", "public static void clearAllTileTypes(){\n\t\tTileType.allTileTypes.clear();\n\t}", "public void clearMarkers() {\n googleMap.clear();\n markers.clear();\n }", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public void clearAll() {\n\t\tuserMap.clear();\n\t}", "public void updateClearedTiles() {\r\n clearedTiles++;\r\n String text = String.format(\"Cleared tiles: %s / %s\",\r\n clearedTiles,\r\n tileList.size() - MINES);\r\n clearedTilesLabel.clear().drawText(text, 10, 10);\r\n\r\n // Check if cleared game\r\n if (clearedTiles == (tileList.size() - MINES)) {\r\n gameEngine.setScreen(new WinScreen(gameEngine));\r\n }\r\n }", "private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}", "@Override\r\n public void reset() {\r\n planetResearchMap.clear();\r\n }", "public void reset(TileMap map)\n {\n reset(map, this.heuristic, this.neighborSelector);\n }", "public void clear() {\n this.entries = new Empty<>();\n }", "public void reset() {\n\t\tmDistanceMap.clear();\n\t\tmIncomingEdgeMap.clear();\n\t}", "public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }", "public void resetMap() {\r\n\t\tfor(Block b: this.blockMap) {\r\n\t\t\tb.resetLives();\r\n\t\t}\r\n\t}", "public static Boolean clearMap(){\n resultsMap.clear();\n return resultsMap.isEmpty();\n }", "public void clear() {\r\n\t\tdisplayEntries.clear();\r\n\t\tupdate();\r\n\t}", "public void testInverseClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "@Override\n public synchronized void clear() {\n this.keyMap.clear();\n super.clear();\n }", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}", "public void clearAll() {\r\n msgMapping.clear();\r\n }", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "public void clear()\r\n {\r\n otherValueMap.clear();\r\n }", "void clearLocalCache(final TCServerMap map);", "public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}", "public void clear(){\r\n\t\tfor ( int x = 0; x < grid.length; x++ )\r\n\t\t\tfor ( int y = 0; y < grid[0].length; y++ )\r\n\t\t\t\tgrid[x][y] = false;\r\n\t}", "public void clear() \n { \n int count = 0;\n while (!isEmpty())\n {\n dictionary[count] = null;\n count++;\n numberOfEntries--;\n }\n }", "public static void clear() {\r\n\t\tdata.set(Collections.<String, String> emptyMap());\r\n\t}", "public void clear() {\r\n\t\tentryGraph.clear();\r\n\t\tupdate();\r\n\t}", "@Override\n\tpublic void clear() {\n\t\tsuper.clear();\n\t\tidIndex = new HashMap<String, SimpleFeature>();\n\t\ttypeNameIndex = new HashMap<Name, Set<SimpleFeature>>();\n\t\ttileIndex = new HashMap<OSMTile, Set<SimpleFeature>>();\n\t}", "void clear() {\n this.mapped_vms.clear();\n this.mapped_anti_coloc_job_ids.clear();\n this.used_cpu = BigInteger.ZERO;\n this.used_mem = BigInteger.ZERO;\n }", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}", "public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }", "public synchronized void clear()\n {\n clear(false);\n }", "public synchronized void clear ()\n {\n for ( final Map.Entry<Object, FolderListener> entry : this.listeners.entrySet () )\n {\n entry.getValue ().changed ( entry.getKey (), new LinkedList<Entry> (), new LinkedList<String> (), true );\n }\n \n for ( final Map.Entry<String, Entry> entry : this.entryMap.entrySet () )\n {\n if ( entry instanceof FolderEntryCommon )\n {\n ( (FolderEntryCommon)entry ).getFolder ().removed ();\n }\n }\n \n this.entryMap.clear ();\n }", "protected void clearGraphMap() {\n\n for (String id : this.graphMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.graphMap.clear();\n }", "private void clear() {\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = 0;\n\n generations = 0;\n }", "public void shutdown() {\n map.shutdown();\n }", "public void mo86898a() {\n HashMap hashMap = this.f63015a;\n if (hashMap != null) {\n hashMap.clear();\n }\n }", "public void clear() {\n\t\tfor(int i=0;i<height;i++) {\n\t\t\tfor(int j=0;j<width;j++) {\n\t\t\t\tgrid[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void clearMarkers() {\r\n if (mMarkerList != null) {\r\n for (Marker marker : mMarkerList) {\r\n marker.remove();\r\n }\r\n mMarkerList.clear();\r\n }\r\n }", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void clearEdgeMap() {\n\n for (String id : this.edgeMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.edgeMap.clear();\n }", "@Deprecated\r\n\tpublic void clearMap() {\r\n\t\tthis.blockMap = new ArrayList<Block>();\r\n\t}", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public void clear (){\n\t\tfor (int i = 0; i < table.length; i++)\n\t\t\ttable[i] = null;\n\n\t\t// we have modified the hash table, and it has\n\t\t// no entries\n\t\tmodCount++;\n\t\thashTableSize = 0;\n\t}", "public void clear() {\n doClear( false );\n }", "public void mo110858c() {\n HashMap hashMap = this.f90728d;\n if (hashMap != null) {\n hashMap.clear();\n }\n }", "public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "public void clear() {\n doClear();\n }", "public void clear() {\n\t\tpoints.clear();\n\t\trepaint();\n\t}", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "@Override\n public void resetMap(){\n segmentList=new ArrayList<>();\n intersectionList=new ArrayList<>();\n this.setChanged();\n this.notifyObservers();\n }", "public void clear() {\r\n init();\r\n }", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.8228882", "0.8214368", "0.8191584", "0.81875455", "0.8174402", "0.816922", "0.81573546", "0.8051446", "0.80507207", "0.7841413", "0.773983", "0.7638421", "0.76357764", "0.76070964", "0.7547354", "0.7543716", "0.7461903", "0.7353299", "0.72731656", "0.7269432", "0.7266969", "0.72238874", "0.70347315", "0.7017182", "0.700534", "0.7002253", "0.6992472", "0.69496566", "0.69422126", "0.690288", "0.6899443", "0.68941057", "0.6869588", "0.6825016", "0.68157774", "0.68117505", "0.67596143", "0.6756193", "0.67451155", "0.67312664", "0.67213273", "0.67135334", "0.6701275", "0.6681296", "0.66679645", "0.66674215", "0.665713", "0.66534173", "0.66432303", "0.662684", "0.66134715", "0.66084397", "0.6605975", "0.65704554", "0.656732", "0.6563672", "0.65614164", "0.6553221", "0.6545933", "0.6544024", "0.6511181", "0.65056247", "0.6505063", "0.64985317", "0.6491353", "0.6488004", "0.6473845", "0.646065", "0.64401996", "0.64316803", "0.6426981", "0.6425103", "0.6421876", "0.6420036", "0.64197606", "0.6405792", "0.6390694", "0.63661236", "0.63625157", "0.63426185", "0.6321019", "0.6318445", "0.6317786", "0.6312333", "0.6310124", "0.63029283", "0.6296527", "0.629042", "0.6288642", "0.6280417", "0.6279441", "0.6278325", "0.6271234", "0.6262016", "0.62618095", "0.62584466", "0.624091", "0.6238183", "0.62359554", "0.62286156", "0.62258327" ]
0.0
-1
Stop this thread as soon as possible.
public void saveShutdown() { running = false; synchronized (unchecked) { unchecked.notify(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }", "public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}", "public void stop() {\n thread = null;\n }", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void stop() {\n if (this.thread != null) {\n Thread thre = this.thread;\n this.thread = null;\n thre.interrupt();\n }\n }", "public void stop() {\n thread.interrupt();\n }", "public void stop() {\n thread.interrupt();\n }", "public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void stopThread() {\n Log.d(TAG, \"Stopping \" + getName() + \" thread!\");\n running = false;\n doStopAction();\n boolean retry = true;\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stop() {\n stopped.set(true);\n if (this.currentThread != null) {\n this.currentThread.interrupt();\n this.currentThread = null;\n }\n }", "public synchronized void stop() {\n try {\n if (isRunning) {\n isRunning = false;\n thread.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.exit(0);\n }", "public synchronized void stop() {\n this.running = false;\n }", "public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void stopPlayThread() {\n ms.stop();\n }", "public void stop() {\n if (started && thread != null) {\n stopRequested = true;\n thread.interrupt();\n if (audio != null) {\n audio.stop();\n }\n }\n }", "public void stop() {\n this.stopRequested.set(true);\n synchronized(this) {\n notifyAll(); // Wakes run() if it is sleeping\n }\n }", "public static void ThreadStop()\r\n\t{\r\n\t\tthread_running=false;\r\n\t}", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "public void stop() {\n\t\t//If we have already stopped, or are not running, we don't have to do anything.\n\t\tif (thread == null || stop || done) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.stop = true;\n\t\t\n\t\t//If we are RUNNING, we are now STOPPING\n\t\tif (isRunning()) {\n\t\t\tstateProperty.set(GameState.STOPPING);\n\t\t}\n\t}", "public void stop() {\n clockThread = null;\n }", "synchronized public void stopDevice() {\n mStopThread = true;\n }", "private void stop(){\n isRunning = false;\n try{\n thread.join();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }", "private void stopThread()\n {\n if (workerThread != null && workerThread.isAlive())\n {\n workerThread.stopLoop();\n }\n stopSelf();\n }", "public synchronized void stop() {\n if(running) {\n this.running = false;\n try {\n this.soundThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stop() {\n _running = false;\n }", "public void stop() {\n mSelf.stop();\n }", "public void stop() {\n\t\tthread.requestStop = true;\n\t\tlong start = System.currentTimeMillis()+timeout;\n\t\twhile( start > System.currentTimeMillis() && thread.running )\n\t\t\tThread.yield();\n\n\t\tdevice.stopDepth();\n\t\tdevice.stopVideo();\n\t\tdevice.close();\n\t}", "public void stop() {\n awaitStop();\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }", "public synchronized void stop() {\n // handlerThread must not be null, else the stop impl will throw\n handlerThread = new HandlerThread(\"nothing\");\n super.stop();\n }", "public void stop() {\n\t\trunflag.set(false);\n\n\t\twhile (worker.isAlive()) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(10); // Wait until it stops\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void stop() {\r\n running = false;\r\n }", "public void stop()\n\t{\n\t\tif (m_thread != null)\n\t\t{\n\t\t\tm_thread.stop();\n\t\t\tm_thread = null;\n\t\t}\n\n\t\t// TODO: Place additional applet stop code here\n\t}", "public void stop() {}", "@Override\n protected void onStop() {\n \tsuper.onStop();\n \tthread.setThreadExit(true);\n \tthread = null;\n \t\n }", "public void stop() {\n stop = true;\n }", "public synchronized void stop() {\n\t\tif(!isRunning) return; //If the game is stopped, exit method\n\t\tisRunning = false; //Set boolean to false to show that the game is no longer running\n\t\t//Attempt to join thread (close the threads, prevent memory leaks)\n\t\ttry {\n\t\t\tthread.join();\n\t\t}\n\t\t//If there is an error, print the stack trace for debugging\n\t\tcatch(InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void stop() {\n running = false;\n }", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop() {\r\n _keepGoing = false;\r\n }", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "private void stopThreadByBoolean() {\n if (customThread != null) {\n customThread.stopThread();\n }\n }", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "public synchronized void stop() {\n stopping = true;\n }", "public void stop()\n {\n running = false;\n }", "private void stopThreadByInterrupt() {\n if (customThread != null) {\n try {\n customThread.join();\n customThread.interrupt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }", "public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\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}\r\n\t\tthis.stop();\r\n\t}", "public void stop() {\n setClosedLoopControl(false);\n }", "public static void stop() {\n if (isRunning()) {\n _thd.stop();\n _thd = null;\n }\n }", "public void stopThread() \n {\n \tthis.exit = true;\n \t//ctr.getMemory().programmcounter = 65536;\n }", "public void stop() {\n intake(0.0);\n }", "public synchronized void stop()\n {\n if (open) {\n //stop = true;\n notifyAll();\n started = false;\n line.stop();\n timeTracker.pause();\n }\n }", "public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}", "boolean stopThread();", "public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }", "private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}", "public void shutdown() {\n this.runnable.stop = true;\n LockSupport.unpark(this);\n }", "protected void stopThread() {\n\t\t_running = false;\n\t\t\n\t\tfor (ClientHandler client : _connectedClients) {\n\t\t\tif (client != null && client.isAlive()) {\n\t\t\t\tclient.stopThread();\n\t\t\t\ttry {\n\t\t\t\t\tclient.join();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Client listener: Error while stopping client.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void stopRequest()\r\n\t{\r\n\t\tnoStopRequested = false;\r\n\t\tinternalThread.interrupt();\r\n\t}", "public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean stop();", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "public void stop() {\n m_enabled = false;\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public final void stop() {\n running = false;\n \n \n\n }", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "void stopTone(){\n t.interrupt();\n isRunning = false;\n try {\n t.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n t = null;\n }", "public void stop(Thread arg0) {\n\t\t\n\t}", "public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}", "public void stop(){\n running = false;\n }", "@Override\n public void run() {\n stop();\n }", "public void stopRunnerThread() {\r\n\t\ttry {\r\n\t\t\tif (runnerThread != null)\r\n\t\t\t\trunnerThread.join();\r\n\t\t} catch (InterruptedException ex) {\r\n\t\t\tassert(false) : \"Unit stopRunnerThread was interrupted\";\r\n\t\t}\r\n\t\t\r\n\t}", "public synchronized void stop(){\n if(!jogoAtivo) return;\n jogoAtivo = false;\n try {\n thread.join();\n } catch (InterruptedException e ){\n e.printStackTrace();\n }\n }", "public void stop() {\n executor.shutdownNow();\n rescanThread.interrupt();\n }", "protected void stopForecaster() {\n if (m_runThread != null) {\n m_runThread.interrupt();\n m_runThread.stop();\n }\n }", "public void stop(){\n stop = true;\n }", "public synchronized void stop() {\n\t\tif (!isStart) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (LoopThread l : thread) {\n\t\t\tl.finnish();\n\t\t}\n\t\tint activeCount;\n\t\tdo{\n\t\t\tactiveCount = 0;\n\t\t\tfor(LoopThread l : thread){\n\t\t\t\tif(l.isAlive()){\n\t\t\t\t\tactiveCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (activeCount > 0);\n\t\t\n\t}", "public void stop() {\n enable = false;\n }", "public void stop() {\n executor.shutdown();\n }", "public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "private void stop() {\n timer.cancel();\n timer = null;\n }", "public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}", "public synchronized void stop() {\n if (mConnectThread != null) {\n mConnectThread.cancel();\n mConnectThread = null;\n }\n if (mConnectedThread != null) {\n mConnectedThread.cancel();\n mConnectedThread = null;\n }\n isConnected = false;\n }" ]
[ "0.8176857", "0.812417", "0.80802536", "0.806352", "0.8062033", "0.80338144", "0.80153894", "0.7980663", "0.7979466", "0.7905842", "0.77913463", "0.7753359", "0.7724047", "0.76981145", "0.7695926", "0.7689456", "0.7592739", "0.7588351", "0.75756687", "0.753293", "0.75128585", "0.7492043", "0.7491001", "0.74705786", "0.7463577", "0.7457457", "0.74533653", "0.74362385", "0.7403511", "0.73855585", "0.7366573", "0.73439205", "0.7338325", "0.7318094", "0.7287056", "0.728559", "0.72806925", "0.7278922", "0.7275715", "0.72716373", "0.7266424", "0.7266177", "0.7248597", "0.72389275", "0.7219044", "0.72162604", "0.7214", "0.7210164", "0.7201996", "0.71968454", "0.7193716", "0.7179558", "0.7147975", "0.71459115", "0.713296", "0.7122506", "0.71164846", "0.7115692", "0.7107259", "0.71071845", "0.7089981", "0.70887494", "0.70852435", "0.70848334", "0.70830387", "0.7080544", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.70802593", "0.7065761", "0.70649433", "0.7059541", "0.70518017", "0.70304114", "0.7028853", "0.70273113", "0.7026182", "0.70202905", "0.70185965", "0.70129275", "0.69914395", "0.69701976", "0.6967204", "0.6963112", "0.6955532", "0.69544864", "0.69487065", "0.69431263", "0.6933843" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_results_page, container, false); //The fragment is open. is_open = true; //Add listener to each button button_save = (Button)view.findViewById(R.id.button_save_results); button_save.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //Save Results actionAlert(true, "Save Results", "Would you like to save the test results?"); } }); button_delete = (Button)view.findViewById(R.id.button_delete_results); button_delete.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //Delete Results actionAlert(false,"Delete Results", "This action will delete the test results. Continue?"); } }); // Inflate the layout for this fragment return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
The following functions connect to the Adapter classes to gather data from headset
public void saveResults(){ //Tell adapter to save gathered data //Call appropriate function }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeAdapter() {\n }", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "abstract void initializeNeededData();", "private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }", "protected @Override\r\n abstract void initData();", "@Override\n\tprotected void setupData() {\n\t\tisFirst = getIntent().getExtras().getBoolean(\"IS_FIRST\");\n\t\tcid = getIntent().getExtras().getString(FirstCategoryAct.class.getName());\n\t\tString title;\n\t\tif(isFirst){\n\t\t\ttitle = getIntent().getExtras().getString(\"TITLE_BAR\") + getResources().getString(R.string.tv_article_all);\n\t\t}else{\n\t\t\ttitle = getResources().getString(R.string.tv_article_all2);\n\t\t}\n\t\t\n\t\tsetGCenter(true, title);\n\t\tsetGLeft(true, R.drawable.back_selector);\n\n\t\tgetData(NET_ARTICLE, false);\n\t}", "abstract public void setUpAdapter();", "public ListDataSetResultHandler(IDataSet dataSet, DataSetQuery query, int initSize) {\n \tsuper(dataSet, query);\n items = new ArrayList<IDataSetItem>(initSize);\n }", "private void fetchData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(hierarchyTitle);\r\n requesterBean.setFunctionType(GET_HIERARCHY_DATA);\r\n AppletServletCommunicator conn = new AppletServletCommunicator(connect,requesterBean);\r\n conn.send();\r\n ResponderBean responderBean = conn.getResponse();\r\n if(responderBean != null) {\r\n if(responderBean.isSuccessfulResponse()) {\r\n queryKey = hierarchyTitle;\r\n Hashtable htData = (Hashtable)responderBean.getDataObject();\r\n extractToQueryEngine(htData);\r\n }\r\n }else {\r\n //Server Error\r\n// throw new CoeusUIException(responderBean.getMessage(),CoeusUIException.ERROR_MESSAGE);\r\n }\r\n }", "IDataSet service( IContextHeader ich, IDataSet arg ) throws Exception;", "private void initData() {\n requestServerToGetInformation();\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "private void setup() {\n adapter = new HomeAdapter(this);\n\n linearLayoutManager = new LinearLayoutManager\n (this, LinearLayoutManager.VERTICAL, false);\n rv.setLayoutManager(linearLayoutManager);\n rv.setItemAnimator(new DefaultItemAnimator());\n\n rv.setAdapter(adapter);\n showWait();\n if (NetworkUtils.isNetworkConnected(this)) {\n\n presenter.loadPage(currentPage);\n } else {\n onFailure(NetworkError.NETWORK_ERROR_MESSAGE);\n }\n rv.addOnScrollListener(new PaginationScrollListener(linearLayoutManager) {\n @Override\n protected void loadMoreItems() {\n AppLogger.d(TAG,\"currentPage:\"+currentPage);\n isLoading = true;\n currentPage += 1;\n presenter.loadPage(currentPage);\n\n\n }\n\n @Override\n public int getTotalPageCount() {\n AppLogger.d(TAG,\"TOTAL_PAGES:\"+TOTAL_PAGES);\n return TOTAL_PAGES;\n }\n\n @Override\n public boolean isLastPage() {\n return isLastPage;\n }\n\n @Override\n public boolean isLoading() {\n return isLoading;\n }\n });\n\n\n }", "@Override\n\tpublic void readClient(Client clt) {\n\t\t\n\t}", "private void fillData() {\n adapter = new ListViewAdapter();\n listview01.setAdapter(adapter);\n }", "private void initDataset() {\r\n CollGestDBHelper collGestDBHelper = new CollGestDBHelper(activityContext);\r\n List<CollGestItem> listAllItems = collGestDBHelper.getAllGestItem();\r\n\r\n mDataset = new String[listAllItems.size()][7];\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n System.out.println(listAllItems.size());\r\n System.out.println(listAllItems.toString());\r\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n for (int i = 0; i < listAllItems.size(); i++) {\r\n mDataset[i][0] = listAllItems.get(i).getItemName();\r\n mDataset[i][1] = Integer.toString(listAllItems.get(i).getItemMinJoueurs());\r\n mDataset[i][2] = Integer.toString(listAllItems.get(i).getItemMaxJoueurs());\r\n mDataset[i][3] = Integer.toString(listAllItems.get(i).getItemDuration());\r\n mDataset[i][4] = listAllItems.get(i).getItemTypes();\r\n mDataset[i][5] = listAllItems.get(i).getItemCheckedOut();\r\n mDataset[i][6] = listAllItems.get(i).getItemLastPlayed();\r\n }\r\n System.out.println(mDataset);\r\n }", "public T getHeadData(){\n\t\treturn head.getData();\n\t}", "public void getData() {\n String museums = \"museums\";\n categoriesArrayList = new KategorieDao().KategorieList(databaseHelper, museums);\n MuseumsAdapter adapter = new MuseumsAdapter(categoriesArrayList, getApplicationContext());\n ;\n museum_rv.setAdapter(adapter);\n }", "private void fetchTopHeadlines() {\n ApiNewsMethods newsTopHeadlines = retrofit.create(ApiNewsMethods.class);\n newsTopHeadlines.getTopHeadlines(\"in\"/*country through voice command*/, newsApiKey).enqueue(new Callback<NewsModelClass>() {\n @Override\n public void onResponse(Call<NewsModelClass> call, Response<NewsModelClass> response) {\n if(response.isSuccessful()) {\n newsModelBody = response.body();\n //change UI\n newsUIChanges();\n //Prepare speech\n StringBuilder newsText = new StringBuilder();\n String[] numbers = {\"First\",\"Second\",\"Third\",\"Fourth\",\"Fifth\",\"Sixth\",\"Seventh\",\"Eighth\",\"Ninth\",\"Tenth\",};\n int i = 0,j=newsModelBody.getArticles().size()>10?10:newsModelBody.getArticles().size();\n newsText.append(\"Headlines fetched successfully\\n\\n\\n\");\n while(i<j){\n newsText.append(numbers[i]+\"\\n\"+newsModelBody.getArticles().get(i).getTitle()+\"\\n\\n\\n\");\n i++;\n }\n newsText.append(\"Swipe Right to go back\\n\\n\\n\");\n constants.speak(newsText.toString(),mTextToSpeechHelper);\n } else {\n Log.d(\"mySTRING\", \"DID NOT OCCUR\");\n }\n }\n\n @Override\n public void onFailure(Call<NewsModelClass> call, Throwable t) {\n }\n });\n }", "private void initLabelRecycler() {\n\n id_flowlayout.setAdapter(new TagAdapter<ServerLabelEntity>(serverLabelEntityArrayList) {\n @Override\n public View getView(FlowLayout parent, int position, ServerLabelEntity serverLabelEntity) {\n TextView server_label_name_tv = (TextView) LayoutInflater.from(getContext()).inflate(R.layout.server_details_label_item,\n id_flowlayout, false);\n server_label_name_tv.setText(serverLabelEntity.getName());\n return server_label_name_tv;\n }\n });\n\n }", "protected abstract void retrievedata();", "@Override\r\n protected void fetchData() {\n\r\n }", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "private RowSetAdapter(RowSet rowset) throws java.sql.SQLException{\n if (rowset == null) {\n throw new NullPointerException(\"rowset cannot be null\");\n }\n this.rowset = rowset;\n this.metaData = rowset.getMetaData();\n }", "private void loadListView() {\n\t\tList<ClientData> list = new ArrayList<ClientData>();\n\t\ttry {\n\t\t\tlist = connector.get();\n\t\t\tlView.updateDataView(list);\n\t\t} catch (ClientException e) {\n\t\t\tlView.showErrorMessage(e);\n\t\t}\n\n\t}", "public TanksTestAdapterExtended1() {\r\n\t\tsuper();\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\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "void finalData(String s)\n {\n\n try {\n JSONObject jsonObject=new JSONObject(s);\n JSONArray jsonArray=jsonObject.getJSONArray(\"sources\");\n\n if(jsonArray.length()>icon_link_list.size())\n {\n for(int k=0;k<jsonArray.length()-icon_link_list.size();k++)\n {\n icon_link_list.add(null);\n }\n }\n for(int i=0;i<jsonArray.length();i++)\n {\n ArrayList<String> childList = new ArrayList<String>();\n JSONObject jsonObject1=(JSONObject)jsonArray.get(i);\n String id=jsonObject1.getString(\"id\");\n String name=jsonObject1.getString(\"name\");\n String description=jsonObject1.getString(\"description\");\n String category=jsonObject1.getString(\"category\");\n String country=jsonObject1.getString(\"country\");\n JSONArray jsonArray1=jsonObject1.getJSONArray(\"sortBysAvailable\");\n\n for(int j=0;j<jsonArray1.length();j++)\n {\n\n String sort= (String) jsonArray1.get(j);\n childList.add(sort);\n }\n\n idList.add(id);\n nameList.add(name);\n\n\n descriptionList.add(description);\n categoryList.add(category);\n countryList.add(country);\n sortByList.add(childList);\n\n\n }\n\n /* int count=0;\n for(String name:nameList)\n {\n search_get_setList.add(new Search_Get_Set(name,idList.get(count),categoryList.get(count),countryList.get(count),descriptionList.get(count)));\n count++;\n }*/\n\n\n // sources_adapter=new Sources.Sources_Adapter(search_get_setList);\n // Log.e(\"just before set dapter\",\"just before set dapter\");\n recyclerView.setAdapter(sources_adapter);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\r\n \tpublic MetaData getMetaData(HttpHeaders headers) {\n \t\ttry {\r\n \t\t\treturn MetaDataUtil.getMetaData(new ViewListeEleve(), new HashMap<String, MetaData>(),new ArrayList<String>());\r\n \t\t} catch (Exception e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\tthrow new WebApplicationException(Response.serverError().entity(new String(\"MetaData parse error\")).build());\r\n \t\t} \r\n \t}", "private static void prepareAdvData() {\n ADV_DATA.add(createDateTimePacket());\n ADV_DATA.add(createDeviceIdPacket());\n ADV_DATA.add(createDeviceSettingPacket());\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutTimePacket(i));\n }\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutDatePacket(i));\n }\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private void loadContent()\n {\n // locking the function to prevent the adapter\n // from calling multiples async requests with\n // the same definitions which produces duplicate\n // data.\n locker.lock();\n\n // this function contruct a GraphRequest to the next paging-cursor from previous GraphResponse.\n GraphRequest nextGraphRequest = lastGraphResponse.getRequestForPagedResults(GraphResponse.PagingDirection.NEXT);\n\n // if we reached the end of our pages, the above method 'getRequestForPagedResults'\n // return 'null' object\n if(nextGraphRequest != null)\n {\n // for clarificating and formatting purposes\n // I declared the callback besides the members\n // variables.\n nextGraphRequest.setCallback(callback);\n nextGraphRequest.executeAsync();\n }\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "DataHandler getDataHandler();", "protected abstract Simulate collectAgentData ();", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic List<HeadUnit> getallHeadUnitDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tString sql = \"SELECT * FROM headunit\";\n\t\tList<HeadUnit> listHeadunit = jdbcTemplate.query(sql, new RowMapper<HeadUnit>() {\n\t\t\t@Override\n\t\t\tpublic HeadUnit mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t// set parameters\n\t\t\t\tHeadUnit headunit = new HeadUnit();\n\t\t\t\theadunit.setHeadunitid(rs.getLong(\"headunit_id\"));\n\t\t\t\theadunit.setUserid(rs.getInt(\"user_id\"));\n\t\t\t\theadunit.setCarname(rs.getString(\"carname\"));\n\t\t\t\theadunit.setHduuid(rs.getString(\"hduuid\"));\n\t\t\t\theadunit.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\theadunit.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\theadunit.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn headunit;\n\t\t\t}\n\t\t});\n\t\treturn listHeadunit;\n\t}", "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }", "private void fillAdapter() {\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<String> recipesListLoader = loaderManager.getLoader(RECIPES_LIST_LOADER);\n if(recipesListLoader == null) {\n loaderManager.initLoader(RECIPES_LIST_LOADER, null, this);\n } else {\n loaderManager.restartLoader(RECIPES_LIST_LOADER, null, this);\n }\n }", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "String getDataSet();", "void populateData();", "private void readItems() {\n }", "private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }", "public interface StructureAdapterInterface {\n\n\t/**\n\t * Used before any additions to do any required pre-processing.\n\t * For example the user could use this to specify the amount of memory to be allocated.\n\t * @param totalNumBonds the total number of bonds in the structure\n\t * @param totalNumAtoms the total number of atoms found in the data.\n\t * @param totalNumGroups the total number of groups found in the data.\n\t * @param totalNumChains the total number of chains found in the data.\n\t * @param totalNumModels the total number of models found in the data.\n\t * @param structureId an identifier for the structure (e.g. PDB id).\n\t */\n\tvoid initStructure(int totalNumBonds, int totalNumAtoms, int totalNumGroups, int totalNumChains, \n\t\t\tint totalNumModels, String structureId);\n\n\t/**\n\t * A generic function to be used at the end of all data addition to do required cleanup on the structure\n\t */\n\tvoid finalizeStructure();\n\n\t/**\n\t * Sets the number of chains for a given model.\n\t * @param modelId identifier of the model within the structure\n\t * @param chainCount total number of chains within this model\n\t */\n\tvoid setModelInfo(int modelId, int chainCount);\n\n\t/**\n\t * Sets the information for a given chain.\n\t * @param chainId chain identifier - length of one to four\n\t * @param chainName chain name - public chain id\n\t * @param groupCount number of groups/residues in chain\n\t */\n\tvoid setChainInfo(String chainId, String chainName, int groupCount);\n\n\t/**\n\t * Sets the entity level annotation for a chain(s). ChainIds is a list of integers that indicate the chains this information\n\t * refers to. Sequence is the one letter amino acid sequence. Description and title are both free forms strings describing the entity and \n\t * acting as a title for the entity.\n\t * @param chainIndices the indices of the chain this refers to.\n\t * @param sequence the full sequence of the entity\n\t * @param description the text description of the entity\n\t * @param type as a string (POLYMER/NON-POLYMER and WATER)\n\t */\n\tvoid setEntityInfo(int[] chainIndices, String sequence, String description, String type);\n\n\t/**\n\t * Sets the information for a given group / residue with atomic data.\n\t * @param groupName 3 letter code name of this group/residue\n\t * @param groupNumber sequence position of this group\n\t * @param insertionCode the one letter insertion code\n\t * @param groupType a string indicating the type of group (as found in the chemcomp dictionary. Empty string if none available.\n\t * @param atomCount the number of atoms in the group\n\t * @param bondCount the number of unique bonds in the group\n\t * @param singleLetterCode the single letter code of the group\n\t * @param sequenceIndex the index of this group in the sequence\n\t * @param secondaryStructureType the type of secondary structure used (types are according to DSSP and number to \n\t * type mappings are defined in the specification)\n\t */\n\tvoid setGroupInfo(String groupName, int groupNumber, char insertionCode,\n\t\t\tString groupType, int atomCount, int bondCount, char singleLetterCode, \n\t\t\tint sequenceIndex, int secondaryStructureType);\n\n\n\t/**\n\t * Sets the atom level information for a given atom.\n\t * @param atomName 1-3 long string of the unique name of the atom\n\t * @param serialNumber a number counting atoms in a structure\n\t * @param alternativeLocationId a character indicating the alternate\n\t * location of the atom\n\t * @param x the x cartesian coordinate\n\t * @param y the y cartesian coordinate\n\t * @param z the z cartesian coordinate\n\t * @param occupancy the atomic occupancy\n\t * @param temperatureFactor the B factor (temperature factor)\n\t * @param element a 1-3 long string indicating the chemical element of the atom\n\t * @param charge the atomic charge\n\t */\n\tvoid setAtomInfo(String atomName, int serialNumber, char alternativeLocationId, \n\t\t\tfloat x, float y, float z, float occupancy, float temperatureFactor, String element, int charge);\n\n\t/**\n\t * Sets a single Bioassembly transformation to a structure. bioAssemblyId indicates the index of the bioassembly.\n\t * @param bioAssemblyIndex an integer index of this bioassembly.\n\t * @param inputChainIndices the integer indices of the chains involved in this bioassembly. \n\t * @param inputTransform a list of doubles indicating the transform for this bioassembly.\n\t * @param name the name of the bioassembly\n\t */\n\tvoid setBioAssemblyTrans(int bioAssemblyIndex, int[] inputChainIndices, double[] inputTransform, String name);\n\n\t/**\n\t * Sets the space group and unit cell information.\n\t *\n\t * @param spaceGroup the space group name, e.g. \"P 21 21 21\"\n\t * @param unitCell an array of length 6 with the unit cell parameters in order: a, b, c, alpha, beta, gamma\n\t * @param ncsOperatorList the list of NCS operation matrices\n\t */\n\tvoid setXtalInfo(String spaceGroup, float[] unitCell, double[][] ncsOperatorList);\n\n\t/**\n\t * Sets an intra-group bond.\n\t *\n\t * @param atomIndexOne the atom index of the first partner in the bond\n\t * @param atomIndexTwo the atom index of the second partner in the bond\n\t * @param bondOrder the bond order\n\t */\n\tvoid setGroupBond(int atomIndexOne, int atomIndexTwo, int bondOrder);\n\n\t/**\n\t * Sets an inter-group bond.\n\t * @param atomIndexOne the atom index of the first partner in the bond\n\t * @param atomIndexTwo the atom index of the second partner in the bond\n\t * @param bondOrder the bond order\n\t */\n\tvoid setInterGroupBond(int atomIndexOne, int atomIndexTwo, int bondOrder);\n\n\n\t/**\n\t * Sets the header information.\n\t * @param rFree the measured R-Free for the structure\n\t * @param rWork the measure R-Work for the structure\n\t * @param resolution the resolution of the structure\n\t * @param title the title of the structure\n\t * @param depositionDate the deposition date of the structure\n\t * @param releaseDate the release date of the structure\n\t * @param experimnetalMethods the list of experimental methods in the structure\n\t */\n\tvoid setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, \n\t\t\tString releaseDate, String[] experimnetalMethods);\n\n}", "protected abstract MultiTypeAdapter createAdapter();", "private void parseData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "private void initialiseHeader()\n\t{\n\t ListHead head = null;\n\n\t head = super.getListHead();\n\n\t //init only once\n\t if (head != null)\n\t {\n\t \treturn;\n\t }\n\n\t head = new ListHead();\n\n\t // render list head\n\t if (this.getItemRenderer() instanceof WListItemRenderer)\n\t {\n\t \t((WListItemRenderer)this.getItemRenderer()).renderListHead(head);\n\t }\n\t else\n\t {\n\t \tthrow new ApplicationException(\"Rendering of the ListHead is unsupported for \"\n\t \t\t\t+ this.getItemRenderer().getClass().getSimpleName());\n\t }\n\n\t //attach the listhead\n\t head.setParent(this);\n\n\t return;\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private void addSampleData() {\r\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "public interface QtlAdaptor extends Adaptor {\n \n /**\n * Adaptor type. TYPE = \"qtl\".\n */\n final static String TYPE = \"qtl\";\n \n /**\n * Fetch Qtl by it's internalID.\n * @return Qtl with specied internalID, or null if no such Qtl exists in database.\n */\n Qtl fetch(long internalID) throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database.\n * @return list of zero or more Qtls.\n */\n List fetchAll() throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database with the specified trait.\n * @param trait trait affected by Qtl.\n * @return list of zero or more Qtls.\n */\n List fetchByTrait(String trait) throws AdaptorException ;\n \n\n /**\n * Fetch all Qtls from database that originally come from the specified\n * database.\n * @param sourceDatabaseName name of the source database.\n * @return list of zero or more Qtls.\n */\n List fetchBySourceDatabase(String sourceDatabaseName) throws AdaptorException ;\n \n /**\n * Fetch all Qtls from database that originally come from the specified\n * database and have the specified id.\n * @param sourceDatabaseName name of the source database.\n * @param sourceID id in the source database.\n * @return list of zero or more Qtls matching the criteria.\n */\n List fetchBySourceDatabase(String sourceDatabaseName, String sourceID) throws AdaptorException ;\n \n}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "public interface ILearnController {\n public String[] getDataSet();\n}", "@Override\n public void getAdapters() {\n // standard Cricket adapters\n logAdapter = (LoggerAdapterIface) getRegistered(\"Logger\");\n echoAdapter = (EchoHttpAdapterIface) getRegistered(\"Echo\");\n database = (KeyValueDBIface) getRegistered(\"Database\");\n scheduler = (SchedulerIface) getRegistered(\"Scheduler\");\n htmlAdapter = (HtmlGenAdapterIface) getRegistered(\"WWWService\");\n fileReader = (FileReaderAdapterIface) getRegistered(\"FileReader\");\n // optional\n //scriptingService = (HttpAdapterIface) getRegistered(\"ScriptingService\");\n //scriptingEngine = (ScriptingAdapterIface) getRegistered(\"ScriptingEngine\");\n }", "public static void connectToServer(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl).addConverterFactory(GsonConverterFactory.create()).build();\n UPKService service = retrofit.create(UPKService.class);\n Call<UPKResponse> call = service.getData(\"1ITPdXilVjBOLG_rxaSxeWbK-esHrY8AX3pGvixAzDXo\", \"3\", \"\");\n call.enqueue(new Callback<UPKResponse>() {\n @Override\n public void onResponse(Call<UPKResponse> call, Response<UPKResponse> response) {\n /*\n HAKEEM: added an arraylist data field that will get populated here\n */\n Log.d(\"Success\", \"in there\");\n Log.d(\"YOOO\", \"POJO\" + response.body());\n UPKResponse upkResponse = response.body();\n mUPKList = upkResponse.getRows();\n// uPKReceyclerView.setLayoutManager(new LinearLayoutManager(MapsActivity_Hakeem.getView().getContext()));\n// UPKMapAdapter adapter = new UPKMapAdapter(mUPKList);\n// uPKReceyclerView.setAdapter(adapter);\n Log.d(\"Adapter\", \"adapter attached\");\n\n data = response.body().getRows();\n System.out.println(data);\n System.out.println(\"UPK DATA STREAM\");\n// childCareAdapter = new ChildCareAdapter(response.body());\n// childCareRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n// childCareRecyclerView.setAdapter(adapter);\n }\n\n @Override\n public void onFailure(Call<UPKResponse> call, Throwable t) {\n Log.d(TAG, \"Failed to connect\");\n }\n });\n }", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "void fetchStartHousesData();", "@Override\r\n\tpublic void initData() {\n\t}", "@Override\n public void initData() {\n super.initData();\n\n RetrofitService.getInstance()\n .getApiCacheRetryService()\n .getDetail(appContext.getWenDang(Const.Detail, wendangid))\n .enqueue(new SimpleCallBack<WenDangMode>() {\n @Override\n public void onSuccess(Call<WenDangMode> call, Response<WenDangMode> response) {\n if (response.body() == null) return;\n WenDangMode data = response.body();\n title_text.setText(data.getPost().getPost_title());\n String s = data.getPost().getPost_excerpt();\n excerpt_text.setText(s.replaceAll(\"[&hellip;]\", \"\"));\n wendang_text.setText(stripHtml(data.getPost().getPost_content()));\n url = data.getPost().getDownload_page();\n list.clear();\n\n list = quChu(getImgStr(data.getPost().getPost_content()));\n\n adapter.bindData(true, list);\n//\t\t\t\t\t\trecyclerView.notifyMoreFinish(true);\n rootAdapter.notifyDataSetChanged();\n beautifulRefreshLayout.finishRefreshing();\n }\n });\n }", "private static void readFromNetwork(int countArg) {\n String[] adapters = driver.getAdapterNames();\n System.out.println(\"Number of adapters: \" + adapters.length);\n for (int i = 0; i < adapters.length; i++) {\n System.out.println(\"Device name in Java =\" + adapters[i]);\n if (driver.openAdapter(adapters[i])) {\n System.out.println(\"Adapter is open: \" + adapters[0]);\n break;\n }\n }\n int count = 0;\n while (count < countArg || count == -1) {\n byte[] packet;\n // Read a packet. Blocking call\n packet = driver.readPacket();\n // Send to the ethernet frame decoder\n ethernetDecode(packet);\n ipdecode(packet);\n udpdecode(packet);\n if (count != -1) {\n count++;\n }\n }\n }", "private void initView(){\n recordData = NewDataManager.getIntance(this).getRecordData();\n Log.w(\"zsbin\",\"recordData size= \"+recordData.size());\n objects = recordData.keySet().toArray();\n for(Object tmp: objects){\n long time = (long)tmp;\n mTopStrings.add((time/100000000)+\"年\"+\n (time%100000000/1000000)+\"月\"+\n (time%1000000/10000)+\"日\"+\n (time%10000/100)+\":\"+\n (time%100));\n }\n Log.w(\"zsbin\",\"mTopStrings= \"+mTopStrings.toString());\n HeadLIstViewAdapter topAdapter = new HeadLIstViewAdapter(this,mTopStrings);\n mTopListView.setAdapter(topAdapter);\n setListViewHeightBasedOnChildren(mTopListView);\n mTopListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n long object = (long) objects[position];\n Intent intent = new Intent(ShowDataActivity.this,ChengbenActivity2.class);\n intent.putExtra(\"time\",object);\n startActivity(intent);\n }\n });\n\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "DataStreamApi getDataStreamApi();", "public FeedCustomAdapter(List<Post> dataSet) {\n outfitDataSet = dataSet;\n }", "public void otherRead(IDataHolder dc);", "@Override\r\n\tpublic List loadMasterDataSet(int pageSize, int startRow) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void initAditionalPanelElements() {\n\t\tchartDataset = new TimeSeriesCollection();\r\n\t\tfor(int i = 0; i < categoryVariableBuffers.size(); i++) \r\n\t\t\tchartDataset.addSeries(categoryVariableBuffers.get(i).getDataSerie());\r\n\t}", "protected abstract Simulate collectControlData ();", "public void readData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockDetailFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n TextView noConnectionView = (TextView) findViewById(R.id.empty_view);\n noConnectionView.setText(getString(R.string.error_no_internet_connection));\n noConnectionView.setVisibility(View.VISIBLE);\n }\n }", "public List getHeadings() \n {\n return headings;\n }", "public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}", "private void setupListView() {\n potList = loadPotList();\n arrayofpots = potList.getPotDescriptions();\n refresher(arrayofpots);\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "private void getHRInfo(Hints hints) throws DataSourceException {\n ImageReader reader = null;\n ImageReader ovrReader = null;\n ImageInputStream ovrStream = null;\n try {\n // //\n //\n // Get a reader for this format\n //\n // //\n reader = READER_SPI.createReaderInstance();\n\n // //\n //\n // get the METADATA\n //\n // //\n inStream.mark();\n reader.setInput(inStream);\n final IIOMetadata iioMetadata = reader.getImageMetadata(0);\n final GeoTiffIIOMetadataDecoder metadata = new GeoTiffIIOMetadataDecoder(iioMetadata);\n gtcs = new GeoTiffMetadata2CRSAdapter(hints);\n\n // //\n //\n // get the CRS INFO\n //\n // //\n final Object tempCRS = this.hints.get(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM);\n if (tempCRS != null) {\n this.crs = (CoordinateReferenceSystem) tempCRS;\n if (LOGGER.isLoggable(Level.FINE))\n LOGGER.log(Level.FINE, \"Using forced coordinate reference system\");\n } else {\n\n // check external prj first\n crs = getCRS(source);\n\n // now, if we did not want to override the inner CRS or we did not have any external\n // PRJ at hand\n // let's look inside the geotiff\n if (!OVERRIDE_INNER_CRS || crs == null) {\n if (metadata.hasGeoKey() && gtcs != null) {\n crs = gtcs.createCoordinateSystem(metadata);\n }\n }\n }\n\n //\n // No data\n //\n if (metadata.hasNoData()) {\n noData = metadata.getNoData();\n }\n\n //\n // parse and set layout\n //\n setLayout(reader);\n\n //\n // parse TIFF StreamMetadata\n //\n dtLayout = TiffDatasetLayoutImpl.parseLayout(reader.getStreamMetadata());\n\n // Creating a new OverviewsProvider instance\n File inputFile = null;\n if (source instanceof File) {\n inputFile = (File) source;\n } else if (source instanceof URL && (((URL) source).getProtocol() == \"file\")) {\n inputFile = URLs.urlToFile((URL) source);\n }\n if (inputFile != null) {\n maskOvrProvider = new MaskOverviewProvider(dtLayout, inputFile);\n hasMaskOvrProvider = true;\n } else if (dtLayout != null && dtLayout.getExternalMasks() != null) {\n String path = dtLayout.getExternalMasks().getAbsolutePath();\n maskOvrProvider =\n new MaskOverviewProvider(\n dtLayout, new File(path.substring(0, path.length() - 4)));\n hasMaskOvrProvider = true;\n }\n\n // //\n //\n // get the dimension of the hr image and build the model as well as\n // computing the resolution\n // //\n numOverviews =\n hasMaskOvrProvider\n ? maskOvrProvider.getNumOverviews()\n : dtLayout.getNumInternalOverviews();\n int hrWidth = reader.getWidth(0);\n int hrHeight = reader.getHeight(0);\n final Rectangle actualDim = new Rectangle(0, 0, hrWidth, hrHeight);\n originalGridRange = new GridEnvelope2D(actualDim);\n\n if (gtcs != null\n && metadata != null\n && (metadata.hasModelTrasformation()\n || (metadata.hasPixelScales() && metadata.hasTiePoints()))) {\n this.raster2Model = GeoTiffMetadata2CRSAdapter.getRasterToModel(metadata);\n } else {\n // world file\n this.raster2Model = parseWorldFile(source);\n\n // now world file --> mapinfo?\n if (raster2Model == null) {\n MapInfoFileReader mifReader = parseMapInfoFile(source);\n if (mifReader != null) {\n raster2Model = mifReader.getTransform();\n crs = mifReader.getCRS();\n }\n }\n }\n\n if (crs == null) {\n if (LOGGER.isLoggable(Level.WARNING)) {\n LOGGER.warning(\"Coordinate Reference System is not available\");\n }\n crs = AbstractGridFormat.getDefaultCRS();\n }\n\n if (this.raster2Model == null) {\n TiePoint[] modelTiePoints = metadata.getModelTiePoints();\n if (modelTiePoints != null && modelTiePoints.length > 1) {\n // use a unit transform and expose the GCPs\n gcps = new GroundControlPoints(Arrays.asList(modelTiePoints), crs);\n raster2Model = ProjectiveTransform.create(new AffineTransform());\n crs = AbstractGridFormat.getDefaultCRS();\n } else {\n throw new DataSourceException(\n \"Raster to Model Transformation is not available\");\n }\n }\n\n // create envelope using corner transformation\n final AffineTransform tempTransform =\n new AffineTransform((AffineTransform) raster2Model);\n tempTransform.concatenate(CoverageUtilities.CENTER_TO_CORNER);\n originalEnvelope =\n CRS.transform(\n ProjectiveTransform.create(tempTransform),\n new GeneralEnvelope(actualDim));\n originalEnvelope.setCoordinateReferenceSystem(crs);\n\n // ///\n //\n // setting the higher resolution available for this coverage\n //\n // ///\n highestRes = new double[2];\n highestRes[0] = XAffineTransform.getScaleX0(tempTransform);\n highestRes[1] = XAffineTransform.getScaleY0(tempTransform);\n\n // External Overview management\n if (maskOvrProvider != null) {\n extOvrImgChoice =\n maskOvrProvider.getNumExternalOverviews() > 0\n ? maskOvrProvider.getNumInternalOverviews() + 1\n : -1;\n } else {\n File extOvrFile = dtLayout.getExternalOverviews();\n if (extOvrFile != null && extOvrFile.exists()) {\n // Setting the overview file\n ovrSource = extOvrFile;\n ovrInStreamSPI = ImageIOExt.getImageInputStreamSPI(extOvrFile);\n ovrReader = READER_SPI.createReaderInstance();\n ovrStream =\n ovrInStreamSPI.createInputStreamInstance(\n extOvrFile, ImageIO.getUseCache(), ImageIO.getCacheDirectory());\n ovrReader.setInput(ovrStream);\n // this includes the real image as this is a image index, we need to add one.\n extOvrImgChoice = numOverviews + 1;\n numOverviews = numOverviews + dtLayout.getNumExternalOverviews();\n if (numOverviews < extOvrImgChoice) extOvrImgChoice = -1;\n }\n }\n\n // //\n //\n // get information for the successive images\n //\n // //\n if (numOverviews >= 1) {\n overViewResolutions = new double[numOverviews][2];\n // Internal overviews start at 1, so lastInternalOverview matches numOverviews if no\n // external.\n int firstExternalOverview =\n extOvrImgChoice == -1 ? numOverviews : extOvrImgChoice - 1;\n double spanRes0 = highestRes[0] * this.originalGridRange.getSpan(0);\n double spanRes1 = highestRes[1] * this.originalGridRange.getSpan(1);\n if (maskOvrProvider != null) {\n overViewResolutions =\n maskOvrProvider.getOverviewResolutions(spanRes0, spanRes1);\n } else {\n\n for (int i = 0; i < firstExternalOverview; i++) {\n // Setting the correct overview index\n int overviewImageIndex = dtLayout.getInternalOverviewImageIndex(i + 1);\n int index = overviewImageIndex >= 0 ? overviewImageIndex : 0;\n overViewResolutions[i][0] = spanRes0 / reader.getWidth(index);\n overViewResolutions[i][1] = spanRes1 / reader.getHeight(index);\n }\n for (int i = firstExternalOverview; i < numOverviews; i++) {\n overViewResolutions[i][0] =\n spanRes0 / ovrReader.getWidth(i - firstExternalOverview);\n overViewResolutions[i][1] =\n spanRes1 / ovrReader.getHeight(i - firstExternalOverview);\n }\n }\n } else overViewResolutions = null;\n } catch (Throwable e) {\n throw new DataSourceException(e);\n } finally {\n if (reader != null)\n try {\n reader.dispose();\n } catch (Throwable t) {\n }\n\n if (ovrReader != null)\n try {\n ovrReader.dispose();\n } catch (Throwable t) {\n }\n\n if (ovrStream != null)\n try {\n ovrStream.close();\n } catch (Throwable t) {\n }\n\n if (inStream != null)\n try {\n inStream.reset();\n } catch (Throwable t) {\n }\n }\n }", "@Override\n\tpublic void learn(Dataset dataset, Alg alg) throws RemoteException {\n\t\tsuper.learn(dataset, alg);\n\t\t\n\t\tbnetMap = BnetDistributedLearner.createDistributedBnet(dataset);\n\t\titemIds = bnetMap.keySet();\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tpublic String listDeal() {\n\t\trequest.put(\"lineName\",lineName);\r\n\t\t\r\n\t\tList<HeadLine> dataList=null;\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tLong count=0L;\r\n\t\tif(!SysFun.isNullOrEmpty(lineName))\r\n\t\t{\r\n\t\t\tcount=headLineService.countByName(lineName);\r\n\t\t\tpagerItem.changeRowCount(count);\r\n\t\t\tdataList=headLineService.pagerByName(lineName, pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcount=headLineService.count();\r\n\t\t\tpagerItem.changeRowCount(count);\r\n\t\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\t}\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "@Override\n\tpublic void readBourse(Bourse brs) {\n\t\t\n\t}", "public interface WifiInfoDataSource {\n interface LoadWifiInfoCallback{\n void onWifiInfoLoaded(WiFiInfo wifiInfo);\n void onDataNotFound();\n }\n interface LoadWifiInfoListCallback{\n void onWifiInfoLoaded(List<WiFiInfo> wifiInfoList);\n void onDataNotFound();\n }\n //insert WifiInfo\n void insertWifiInfo(WiFiInfo wifiInfo);\n\n //List<WiFiInfo>\n void queryWifiInfoListInfo(LoadWifiInfoListCallback loadWifiInfoListCallback);\n\n //<WifiInfo> from ssid\n void queryWifiInfo(String ssid,LoadWifiInfoCallback loadWifiInfoCallback);\n\n //delete WiFiInfo\n void deleteWiFiInfo(WiFiInfo wiFiInfo);\n}", "private void fillData()\n {\n\n }", "private void initData() {\n\t}", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "@Override\n\tpublic void fillData() {\n\t}" ]
[ "0.55641395", "0.5554025", "0.55223536", "0.5465298", "0.54644555", "0.54572594", "0.53834623", "0.53742343", "0.5349363", "0.53393394", "0.5330305", "0.5302602", "0.52853537", "0.52643615", "0.52537316", "0.5252522", "0.5252505", "0.5249518", "0.52420765", "0.5240984", "0.5231186", "0.5229855", "0.5213532", "0.52105236", "0.5203035", "0.5199788", "0.5195504", "0.5192367", "0.5192367", "0.5192367", "0.5192367", "0.5192367", "0.5192367", "0.51825386", "0.51825386", "0.51776403", "0.5174436", "0.51600444", "0.51449126", "0.5129679", "0.5126623", "0.5114717", "0.5114717", "0.51122034", "0.5101761", "0.50946295", "0.5093049", "0.5078673", "0.5072348", "0.50670654", "0.5064419", "0.5061276", "0.5060694", "0.50585115", "0.50541496", "0.5049497", "0.50372297", "0.5036696", "0.5031157", "0.5029343", "0.5029343", "0.5026086", "0.5025282", "0.50242877", "0.50234926", "0.5021943", "0.5008252", "0.5004338", "0.49988073", "0.49970663", "0.49935603", "0.4984548", "0.49785107", "0.49773005", "0.49685195", "0.49680948", "0.4964597", "0.4963834", "0.49623916", "0.49599946", "0.49568027", "0.49567866", "0.49516025", "0.49503985", "0.49453896", "0.49443558", "0.49427855", "0.49395245", "0.49379355", "0.49379355", "0.49379355", "0.49371526", "0.4932481", "0.49315172", "0.49286664", "0.49286392", "0.4925453", "0.4920594", "0.491871", "0.49184835", "0.4915758" ]
0.0
-1
Tell adapter to delete gathering data Call appropriate function
public void deleteResults(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void delData();", "@Override\n\t\t\tpublic void handleDataDeleted(String dataPath) throws Exception {\n\t\t\t\t\n\t\t\t}", "void onDataCleared();", "private void askforItemDeletion(int position){\n mySmsMessAdapterCallBack.askforItemDeletion(dataset.get(position),position);\n }", "public abstract void delete(DataAction data, DataRequest source) throws ConnectorOperationException;", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Override\n public void notifyDataRemoved(int count, int viewType) {\n List<Integer> toSaved = new ArrayList<>();\n\n for (int i = 0; i < types.size(); ++i) {\n // Log.w(TAG, \"notifyDataRemoved: READ \" + types.get(i) + \"/\" + viewType);\n\n if (types.get(i) != viewType) {\n toSaved.add(types.get(i));\n // Log.i(TAG, \"notifyDataRemoved: REMOVED \" + i + \"/\" + types.size());\n }\n }\n types.clear();\n types.addAll(toSaved);\n // Log.v(TAG, \"notifyDataRemoved: \" + getItemCount());\n\n /*Notificar al adapter previa eliminación [EN] Notify adapter after elimination*/\n super.notifyDataRemoved(count, viewType);\n\n }", "private void delete() {\n\n\t}", "@Override\n public void onClick(View v) {\n long sid = allListOkLast.get(position).getId();\n Query<GpsPointDetailData> build = db.getGpsPointDetailDao().queryBuilder().where(GpsPointDetailDao.Properties.Id.eq(sid)).build();\n db.deleteGpsPointDetailData(sid);\n adapter.removeItem(position);\n }", "@Override\n public void delete()\n {\n }", "public void deleteData(Dataset ds, ArrayList<Data> listData, ArrayList<DataHeader> listHeader, ArrayList<DataOperation> listOperation, ArrayList<Integer>[] listRowAndCol, boolean sync){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n ArrayList v = new ArrayList();\n ArrayList<DataOperation> listOperationToUpdate = new ArrayList();\n ArrayList<Visualization> listVisualizationToUpdate = new ArrayList();\n ArrayList<DataOperation> listOperationToDel = new ArrayList();\n ArrayList<Visualization> listVisualizationToDel = new ArrayList();\n // remember selected cells\n ArrayList<Data> oldListData = new ArrayList();\n for(Iterator<Data> d = listData.iterator();d.hasNext();){\n oldListData.add((Data)d.next().clone());\n }\n for(Iterator<Integer> i=listRowAndCol[0].iterator();i.hasNext();){\n int id = i.next();\n for(int j=0; j<dataset.getNbCol(); j++){\n Data data = dataset.getData(id, j);\n if(data != null)\n oldListData.add((Data)data.clone());\n }\n }\n for(Iterator<Integer> j=listRowAndCol[1].iterator();j.hasNext();){\n int id = j.next();\n for(int i=0; i<dataset.getNbRows(); i++){\n Data data = dataset.getData(i, id);\n if(data != null && oldListData.indexOf(data) == -1)\n oldListData.add((Data)data.clone());\n }\n }\n // controller\n CopexReturn cr = this.controller.deleteData(false, ds, listData, listRowAndCol[0], listRowAndCol[1],listOperation, v);\n if (cr.isError()){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n return;\n }else if (cr.isWarning()){\n v = new ArrayList();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n boolean isOk = displayError(cr, getBundleString(\"TITLE_DIALOG_CONFIRM\"));\n if (isOk){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n cr = this.controller.deleteData(true, ds, listData, listRowAndCol[0], listRowAndCol[1],listOperation, v);\n if (cr.isError()){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n return;\n }\n }\n if(v.isEmpty()){\n //delete\n }else{\n Dataset newDs = (Dataset)v.get(0);\n ArrayList[] tabDel = (ArrayList[])v.get(1);\n listOperationToUpdate = (ArrayList<DataOperation>)tabDel[0];\n listOperationToDel = (ArrayList<DataOperation>)tabDel[1];\n listVisualizationToUpdate = (ArrayList<Visualization>)tabDel[2];\n listVisualizationToDel = (ArrayList<Visualization>)tabDel[3];\n updateDataset(newDs);\n }\n }else{\n if(v.isEmpty()){\n //delete\n }else{\n Dataset newDs = (Dataset)v.get(0);\n ArrayList[] tabDel = (ArrayList[])v.get(1);\n listOperationToUpdate = (ArrayList<DataOperation>)tabDel[0];\n listOperationToDel = (ArrayList<DataOperation>)tabDel[1];\n listVisualizationToUpdate = (ArrayList<Visualization>)tabDel[2];\n listVisualizationToDel = (ArrayList<Visualization>)tabDel[3];\n updateDataset(newDs);\n }\n }\n datasetModif = true;\n updateMenuData();\n datasetTable.addUndo(new DeleteUndoRedo(datasetTable, this, controller, oldListData,listData, listHeader, listRowAndCol, listOperation, listOperationToUpdate, listOperationToDel,listVisualizationToUpdate, listVisualizationToDel));\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n //log\n ArrayList<Integer> listIdRows = listRowAndCol[0];\n ArrayList<Integer> listIdColumns = listRowAndCol[1];\n dataProcessToolPanel.logDeleteDatas(dataset, listData, listRowAndCol[0], listRowAndCol[1],listOperation);\n cr = this.controller.exportHTML();\n if(cr.isError()){\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n if(sync){\n dataProcessToolPanel.addSyncDeleteData(listData, listHeader, listOperation, listRowAndCol);\n }\n }", "public void onClick(DialogInterface dialog, int which) {\n\n\n cardsDCM = cardActivity.cardsDCMList.get(i);\n cardActivity.cardsDAO.delete(cardsDCM);\n try {\n cardActivity.cardsDCMList = cardActivity.cardsDAO.getAll();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n cardActivity.cardListAdapter.notifyDataSetChanged();\n\n }", "@Override\n public void deleteItem(P_CK t) {\n \n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mAdapter.notifyItemRemoved(position); //item removed from recylcerview\n mAdapter.removeItem(position);\n dataList.remove(position); //then remove item\n mAdapter.notifyDataSetChanged();\n deleteEntry(dataList.get(position).getDocId());\n }", "void onItemDeleted();", "@Override\n public void onClick(View v) {\n DatabaseManager db = new DatabaseManager(getContext());\n int deletedrows = db.deleteData(filename.get(position));\n filename.remove(position);\n filesize.remove(position);\n historyAdapter.notifyDataSetChanged();\n if (deletedrows > 0) {\n Toast.makeText(getContext(), \"Data Deleted\", Toast.LENGTH_LONG).show();\n } else\n Toast.makeText(getContext(), \"Data Not Deleted\", Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void delete() {\n\n\t}", "@Override\n public void onClick(View v) {\n\n CouSyncDb.getInstance(getApplicationContext()).deleteSync(bean1, new OnOperateFinish() {\n @Override\n public void onFinish(int operateType, Object result) {\n text.setText(\"delete row ID = \" + result.toString());\n }\n });\n }", "private void deleteDataResult(final DataResult dataResult) {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\n alertDialogBuilder.setTitle(\"Are You Sure ?\");\n alertDialogBuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n alertDialogBuilder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n\n if (dataResult.isIs_clouded()) {\n// DatabaseReference databaseReference = firebaseUserHelper.getDatabaseReference().child(\"user\").child(firebaseUserHelper.getFirebaseUser().getUid()).child(\"data_result\").child(String.valueOf(dataResult.getId()));\n// databaseReference.removeValue();\n// firebaseUserHelper.getStorageReference().child(String.valueOf(dataResult.getId())).delete();\n DeleteDataResult deleteDataResult = new DeleteDataResult();\n deleteDataResult.setUid(MoflusSharedPreferenceHelper.getUser(context).getUid());\n deleteDataResult.setData_result_id(dataResult.getId());\n MoFluSService.getService().deleteDataResult(\n deleteDataResult\n ).enqueue(new Callback<Status>() {\n @Override\n public void onResponse(Call<Status> call, Response<Status> response) {\n if (response.body()!= null &&response.body().isSuccess()) {\n try {\n CSVHelper.deleteFile(dataResult);\n } catch (IOException e) {\n e.printStackTrace();\n }\n moflusSQLiteHelper.deleteDataResult(dataResult);\n notifyItemRemoved(listDataResult.indexOf(dataResult));\n listDataResult.remove(dataResult);\n Toast.makeText(context, dataResult.getName() + \" Deleted\", Toast.LENGTH_SHORT).show();\n dialogInterface.dismiss();\n } else {\n Toast.makeText(context, \"Delete Failed\", Toast.LENGTH_SHORT).show();\n dialogInterface.dismiss();\n }\n }\n\n @Override\n public void onFailure(Call<Status> call, Throwable t) {\n Toast.makeText(context, \"No Internet Access\", Toast.LENGTH_SHORT).show();\n dialogInterface.dismiss();\n }\n });\n }else{\n try {\n CSVHelper.deleteFile(dataResult);\n } catch (IOException e) {\n e.printStackTrace();\n }\n moflusSQLiteHelper.deleteDataResult(dataResult);\n notifyItemRemoved(listDataResult.indexOf(dataResult));\n listDataResult.remove(dataResult);\n Toast.makeText(context, dataResult.getName() + \" Deleted\", Toast.LENGTH_SHORT).show();\n dialogInterface.dismiss();\n }\n }\n });\n alertDialogBuilder.show();\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "private void clearData() {}", "public void delete() {\n\n\t}", "public native void deleteData(double offset, double count) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.deleteData(offset, count);\r\n }-*/;", "@Override\r\n\tpublic void delete() {\n\r\n\t}", "void onDelete();", "public void delete(){\r\n\r\n }", "public String deleteDepartmentRow(Departmentdetails departmentDetailsFeed);", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.back:\n Intent intent = new Intent(\"action.intent.action.MYRECEIVER\");\n intent.setPackage(\"com.example.fourcomppractice\");\n sendBroadcast(intent);\n break;\n case R.id.Delete_data:\n Uri uri = Uri.parse(\"content://com.example.fourcomppractice.provider/value\" + \"#\");\n getContentResolver().delete(uri, null, null);\n mAdapterForView.clear();\n default:\n break;\n }\n }", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "@Override\n public void delete() {\n }", "@Override\n public void delete() {\n\n\n }", "@Override\n\tpublic void delete(ComplitedOrderInfo arg0) {\n\t\t\n\t}", "@Override\n public void clearData() {\n }", "private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "public void clearData()\r\n {\r\n \r\n }", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "public boolean delete(T data) throws MIDaaSException;", "public DataPair delete(DataPair key) {\n throw new NotImplementedException();\n }", "public void onDelete() {\n }", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "public void delete()\n {\n call(\"Delete\");\n }", "void showDataDeletedMsg();", "public void clearData(){\n\r\n\t}", "protected abstract void doDelete();", "void clearData();", "@Override\r\n\tpublic void onDelete() {\n\t\tsuper.onDelete();\r\n\t}", "public void delete() {\n\n }", "public void onClick(DialogInterface dialog, int id) {\n\r\n db.countryDao().deleteAll();\r\n\r\n Toast.makeText(MainActivity.this,\"Data deleted\",Toast.LENGTH_SHORT).show();\r\n LoadCountryList();\r\n\r\n }", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "@Override\n\tpublic void delRec() {\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n long result = typeBookDAO.deleteTypeBook(typeBook.id);\n\n if (result < 0) {\n\n Toast.makeText(context,\"Xoa ko thanh cong!!!\",Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(context,\"Xoa thanh cong!!!\",Toast.LENGTH_SHORT).show();\n // xoa typebook trong arraylist\n arrayList.remove(position);\n\n // f5 adapter\n notifyDataSetChanged();\n\n }\n\n\n\n }", "int deleteByExample(DataSyncExample example);", "@Override\n public void delete(int id) {\n }", "@Override\n public int delete( J34SiscomexOrigemDi j34SiscomexOrigemDi ) {\n return super.doDelete(j34SiscomexOrigemDi);\n }", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "public void DeleteData(View view) {\n View parent=(View)view.getParent();\n TextView deletedata=(TextView)parent.findViewById(R.id.tname);\n String dataString=String.valueOf(deletedata.getText());\n Integer deletedRows= help.deleteData(dataString);\n if(deletedRows > 0)\n Snackbar.make(view, \"Task Completed\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else\n Snackbar.make(view, \"Task Not Completed\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n loadTaskList();\n }", "private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "public void deleteResultSet(BackendDeleteDTO del_req) {\n log.debug(\"JZKitBackend::deleteResultSet\");\n del_req.assoc.notifyDeleteResult(del_req);\n }", "@Override\r\n\tpublic void delete(Long arg0) {\n\t\t\r\n\t}", "public void handleDeleteClick(final Integer position){\n int idToRemove = mDataset.get(position).getSetId();\n\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"http://ec2-18-188-60-72.us-east-2.compute.amazonaws.com/FlashcardsPro/deleteCardSet.php?id=\" + idToRemove;\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n if(response.getString(\"status\").equals(\"succeeded\")){\n //update local data-set and notify recyclerView\n mDataset.remove(mDataset.get(position));\n recyclerView.removeViewAt(position);\n flashcardSetRecyclerAdapter.notifyItemRemoved(position);\n flashcardSetRecyclerAdapter.notifyItemRangeChanged(position, mDataset.size());\n\n if(mDataset.isEmpty()){\n emptyView.setVisibility(View.VISIBLE);\n }\n }\n else {\n Toast.makeText(getApplicationContext(), \"Could not connect to server\", Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"LOGIN ERROR\", error.toString());\n }\n });\n\n queue.add(request);\n\n }", "@Override\r\n\tpublic void delete(Integer arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void k_delete(String MF_NO) {\n\t\t\r\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n DataService dataService = new DataService(view.getContext());\n long deleteStatus = dataService.deleteParticipantData(holder.textView_name.getTag().toString());\n if (deleteStatus > 0) {\n Toast.makeText(view.getContext(), \"Delete Success\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(view.getContext(), \"Not Deleted\", Toast.LENGTH_SHORT).show();\n }\n\n /**\n * Remove item from list after delete from db\n */\n int newPosition = holder.getAdapterPosition();\n Log.d(\"touhid\", \"on Click onBindViewHolder\");\n dataEntityList.remove(newPosition);\n notifyItemRemoved(newPosition);\n notifyItemRangeChanged(newPosition, dataEntityList.size());\n\n /**\n * Change Total participant after delete item\n */\n ParticipantList participantList = new ParticipantList();\n participantList.getAndShowParticipantAmount((Activity) context);\n\n }", "@Override\r\n\tpublic void del(Integer id) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(Long arg0) {\n\n\t}", "@Override\n\tpublic void delete(Long arg0) {\n\n\t}", "private void deleteMeasurement(int position, Measurement measurement){\n measurements.remove(position);\n notifyDataSetChanged();\n db.delete(measurement.getId());\n Toast.makeText(getApplicationContext(), \"Die Messung wurde gelöscht.\", Toast.LENGTH_SHORT).show();\n }", "public abstract void removeExternalData(String dataID);", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tFinalDb db = Main.instance.getDb();\n\t\t\t\tdb.deleteAll(Temperature.class);\n\n\t\t\t\tListViewAdapter la = (ListViewAdapter) Main.instance.getListView().getAdapter();\n\t\t\t\tla.items.clear();\n\t\t\t\tla.notifyDataSetChanged();\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t}", "void onItemDelete(int position);", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "@Override\n\tpublic void delete(int id) {\n\t}", "@Override\n\tpublic void deleteEPAData(int empId) {\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n new AgendamentoDAO(MainActivity.this).delete(agendamentos.get(position));\n\n // Remover o item da lista de agendamentos que está em memória\n agendamentos.remove(position);\n\n // Atualizar lista\n adapter.notifyItemRemoved(position);\n\n // Avisar o usuário\n Toast.makeText(MainActivity.this, R.string.agendamento_excluido, Toast.LENGTH_LONG).show();\n }", "public void deleteData(String filename, SaveType type);", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "private void actionDelete(final ImageDataModel modelData) {\r\n // Remove the item from Current List of GalleryHelperBaseOnId.class\r\n if (SharedPref.getListType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.LIST_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelper.imageDataModelList.remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageDataModelList.remove(modelData);\r\n }\r\n }\r\n\r\n if (SharedPref.getAlbumType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.ALBUM_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelperBaseOnId.dataModelArrayList.remove(modelData);\r\n // Remove the item from Main List of GalleryHelper.class\r\n GalleryHelper.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n VideoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n AudioViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n PhotoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n }\r\n }\r\n\r\n\r\n final String message = String.format(getString(R.string.delete_success_message));\r\n try {\r\n // method to deleting the selected file\r\n FileUtils.deleteFile(modelData.getFile());\r\n FileUtils.deleteDirectory(modelData.getFile().getParentFile());\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n // method to scan the file and update its position\r\n FileUtils.scanFile(PhotoViewActivity.this, modelData.getFile());\r\n\r\n SDKUtils.showToast(PhotoViewActivity.this, message);\r\n // notify viewpager adapter\r\n notifyAdapter();\r\n if (CustomPagerAdapter != null)\r\n CustomPagerAdapter.itemCheckInList();\r\n }", "void deleteTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "@Override\n\tpublic void deleteCB(CB cb) {\n\t\t\n\t}", "public void deleteEpicsData(EpicsType epicsType, int run);", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "@Override\n void deleteSessionData(Context context, final Bundle args) {\n final Context appContext = context.getApplicationContext();\n AsyncTask.SERIAL_EXECUTOR.execute(new Runnable() {\n public void run() {\n ContentResolver cr = appContext.getContentResolver();\n cr.delete(ThingProvider.THINGS_URI, Things.SELECT_BY_SESSION_ID,\n Array.of(getSessionId(args)));\n }\n });\n }", "@Override\npublic void deleteById(String id) {\n\t\n}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tSMSDao mSMSDao = new SMSDao(mContext);\n\t\t\t\t\t\tmSMSDao.deleteSMS(String.valueOf(mSMSList.get(position).getSort()));\n\t\t\t\t\t\tmSMSList.remove(position);\n\t\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t\t}", "@Override\n\tpublic void delete(Long arg0) {\n\t\t\n\t}", "public void onDeleteList() {\n ListsManager listManager = ListsManager.getInstance(context);\n listManager.deleteTable(deletePosition,context);\n Toast.makeText(context, \"deleted TodoList\", Toast.LENGTH_SHORT).show();\n data.remove(deletePosition);\n notifyItemRemoved(deletePosition);\n }", "public abstract void delete(Context context);", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "@Override\n public void onDeleteButtonClick(int position) {\n UserDevicesDB selected_aube = userDevicesDBList.get(position);\n\n // TO DO --> action to delete this device by device address\n Toast.makeText(getContext(), R.string.coming_soon, Toast.LENGTH_SHORT ).show();\n }", "@Override\n\tpublic void delete(Integer arg0) {\n\t\t\n\t}" ]
[ "0.7237041", "0.6636645", "0.66289765", "0.65527105", "0.653159", "0.64653254", "0.6452267", "0.64159334", "0.63911587", "0.63891137", "0.6385708", "0.6365456", "0.6357278", "0.6324192", "0.6315247", "0.63128304", "0.6277346", "0.6266686", "0.6241996", "0.6233636", "0.62269396", "0.62229854", "0.62219715", "0.62180734", "0.62165904", "0.6207223", "0.6188835", "0.61877465", "0.6185471", "0.6165583", "0.6163305", "0.61622256", "0.61509526", "0.6145715", "0.6142418", "0.61416376", "0.6137519", "0.6137519", "0.612869", "0.6124184", "0.6100664", "0.6094869", "0.6088028", "0.60822463", "0.6081543", "0.6070311", "0.60617673", "0.6060988", "0.6059376", "0.6052896", "0.60492384", "0.60314226", "0.6026608", "0.60229695", "0.60087156", "0.60053194", "0.6005228", "0.59989667", "0.5997253", "0.599614", "0.59943306", "0.59912425", "0.59907633", "0.5972896", "0.59725213", "0.5969357", "0.5965426", "0.59648085", "0.5963585", "0.596178", "0.5957339", "0.5957339", "0.5955024", "0.59529483", "0.5939767", "0.5933839", "0.59319425", "0.5927148", "0.59180427", "0.5917871", "0.5916604", "0.59164953", "0.5912211", "0.59105706", "0.5905887", "0.59053177", "0.5904833", "0.5901725", "0.5897597", "0.5893752", "0.58899784", "0.588785", "0.5886661", "0.5886661", "0.588589", "0.5878955", "0.5878153", "0.5874929", "0.5872955", "0.58718634" ]
0.6258315
18
Should return content type that is used to override file content type for template data language. It is required for template language injections to override nonbase language content type properly
default IElementType getContentElementType(@Nonnull Language language) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract ContentType getContnentType();", "String getContentType();", "String getContentType();", "String getContentType();", "@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}", "public String getContenttype() {\n return contenttype;\n }", "public String getContenttype() {\n return contenttype;\n }", "int getContentTypeValue();", "public String getContentType();", "public String getContentType();", "public String getContenttype() {\n\t\treturn contenttype;\n\t}", "@Override\n\tpublic String getContentType(File file) {\n\t\treturn null;\n\t}", "public String getFilecontentContentType() {\n return filecontentContentType;\n }", "public String getContentType() {\r\n try {\r\n ContentType newCtype = new ContentType(super.getContentType());\r\n ContentType retCtype = new ContentType(cType.toString());\r\n retCtype.setParameter(\"boundary\", newCtype.getParameter(\"boundary\"));\r\n return retCtype.toString();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return \"null\";\r\n }", "protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }", "public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}", "protected String getDefaultContentType() {\n return DEFAULT_CONTENT_TYPE;\n }", "@Override\n\t\tpublic String getContentType() {\n\t\t\treturn null;\n\t\t}", "public String getContentType() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getContentType()\n\t{\n\t\treturn contentType;\n\t}", "String getContentType(String fileExtension);", "@Override\n public int getContentType() {\n return 0;\n }", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}", "private String getContentType(String sHTTPRequest) {\n String sContentType = \"Content-Type: \";\n\n // update based on file extension or if response starts with HTML/URL\n String sFileExtension = getFileExtension(sHTTPRequest);\n if (sFileExtension.equalsIgnoreCase(\".html\") || sFileExtension.equalsIgnoreCase(\".htm\")) {\n sContentType += \"text/html\";\n } else if (sFileExtension.equalsIgnoreCase(\".txt\")) {\n sContentType += \"text/plain\";\n } else if (sFileExtension.equalsIgnoreCase(\".pdf\")) {\n sContentType += \"application/pdf\";\n } else if (sFileExtension.equalsIgnoreCase(\".png\")) {\n sContentType += \"image/png\";\n } else if (sFileExtension.equalsIgnoreCase(\".jpeg\") || sFileExtension.equalsIgnoreCase(\".jpg\")) {\n sContentType += \"image/jpeg\";\n } else {\n sContentType += \"text/html\"; // default response\n }\n\n // return final content type\n return sContentType;\n }", "com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType();", "public String getContentType() {\r\n return mFile.getContentType();\r\n }", "public String getContentType() {\n return this.contentType;\n }", "@Override\r\n public String getCustomContentType() {\r\n return DirectUtils.getFileMIMEType(new File(this.imagePath));\r\n }", "@Override\n\tpublic String getContentType() {\n\t\treturn CONTENT_TYPE;\n\t}", "@Override\n public String getContentType() {\n return null;\n }", "public String getContentType() {\n return contentType;\n }", "public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }", "ResourceFilesType createResourceFilesType();", "public Integer getOptContentType() { return(content_type); }", "protected String getContentType(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) {\n String mimeType = JcrBinary.getMimeType(resource);\n if (StringUtils.isEmpty(mimeType)) {\n mimeType = ContentType.OCTET_STREAM;\n }\n return mimeType;\n }", "default String getContentType() {\n return \"application/octet-stream\";\n }", "@java.lang.Override public int getContentTypeValue() {\n return contentType_;\n }", "public String getContentType() {\n return this.contentType;\n }", "public String getContentType() {\n return this.contentType;\n }", "public String getContentType() {\n return this.contentType;\n }", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "public int getEntityType(){\n\t\tIterator<ArrayList<String>> i = headerLines.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tArrayList<String> headerLines = i.next();\n\t\t\tString headerName = headerLines.get(0);\n\t\t\tif (headerName.matches(\"Content-Type:\")){\n\t\t\t\tString headerData = headerLines.get(1);\n\t\t\t\tif(headerData.contains(\"text\")){\n\t\t\t\t\treturn TEXT;\n\t\t\t\t} else if (headerData.contains(\"pdf\")){\n\t\t\t\t\treturn PDF;\n\t\t\t\t} else if (headerData.contains(\"gif\")){\n\t\t\t\t\treturn GIF;\n\t\t\t\t} else if (headerData.contains(\"jpeg\")){\n\t\t\t\t\treturn JPEG;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public CharSequence getContentType() {\n return contentType;\n }", "public java.lang.Object getContentType() {\r\n return contentType;\r\n }", "public static String getContentType(String format) {\n\t\tif (StringUtils.hasText(format)) {\n\t\t\tif (format.equalsIgnoreCase(XML.name())) {\n\t\t\t\treturn ContentTypes.XML.toString();\n\t\t\t} else if (format.equalsIgnoreCase(JSON.name())) {\n\t\t\t\treturn ContentTypes.JSON.toString();\n\t\t\t} else if (format.equalsIgnoreCase(PDF.name())) {\n return ContentTypes.PDF.toString();\n }\n\t\t}\n\t\treturn null;\n\t}", "public String getFiletype() {\n return filetype;\n }", "public String getContentType() {\n return contentType;\n }", "public String getContentType() {\n return contentType;\n }", "public String getContentType() {\n return contentType;\n }", "public String getContentType() {\n return contentType;\n }", "public String getContentType() {\n return contentType;\n }", "@java.lang.Override public int getContentTypeValue() {\n return contentType_;\n }", "public static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = \"text/plain\";\n\t\t}else if(name.endsWith(\".gif\")){\n\t\t\tcontentType = \"image/gif\";\n\t\t}else if(name.endsWith(\".jpg\")){\n\t\t\tcontentType = \"image/jpeg\";\n\t\t}else if(name.endsWith(\".png\")){\n\t\t\tcontentType = \"image/png\";\n\t\t}\n\t\treturn contentType;\n\t}", "public java.lang.String getFiletype() {\n return filetype;\n }", "DataType getType_template();", "public String getContentType() {\n return getProperty(Property.CONTENT_TYPE);\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "@java.lang.Override\n public com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType() {\n @SuppressWarnings(\"deprecation\")\n com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType result = com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.valueOf(contentType_);\n return result == null ? com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.UNRECOGNIZED : result;\n }", "public java.lang.String getContentType() {\n return contentType;\n }", "@AutoEscape\n\tpublic String getContentType();", "private static String contentType(String fileName) {\n\t\tif (fileName.endsWith(\".txt\") || fileName.endsWith(\".html\")) {\n\t\t\treturn \"text/html\";\n\t\t}\n\t\tif (fileName.endsWith(\".jpg\") || fileName.endsWith(\".jpeg\")) {\n\t\t\treturn \"image/jpeg\";\n\t\t}\n\t\tif (fileName.endsWith(\".gif\")) {\n\t\t\treturn \"image/gif\";\n\t\t}\n\t\treturn \"application/octet-stream\";\n\t}", "private String getLanguageType(String fileName)\n {\n if (fileName.endsWith(\".c\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Byte Code\";\n }\n if (fileName.endsWith(\".C\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"Source Code\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Byte Code\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"Source Code\";\n }\n else\n {\n return \"??\";\n }\n }", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "public String getContentType() {\n\t\tString ct = header.getContentType();\n\t\treturn Strings.substringBefore(ct, ';');\n\t}", "@Override\r\n\tpublic String getContentType() {\r\n\t\treturn attachmentType;\r\n\t}", "public String getContentType() {\n\t\treturn contentType;\n\t}", "public String getContentType() {\n\t\treturn contentType;\n\t}", "public String getContentType(String arg0) {\n\t\treturn null;\n\t}", "protected FileType doGetType()\n {\n return m_type;\n }", "@java.lang.Override public com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType() {\n @SuppressWarnings(\"deprecation\")\n com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType result = com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.valueOf(contentType_);\n return result == null ? com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.UNRECOGNIZED : result;\n }", "@Column(name = \"FILE_CONTENT_TYPE\", length = 100 )\n\tpublic String getFileObjContentType() {\n\t\treturn fileObjContentType;\n\t}", "public String getContentTypeFor(String fileName)\r\n {\r\n String ret_val = null;\r\n\r\n if(fileName.toUpperCase().endsWith(\".PNG\"))\r\n ret_val = \"image/png\";\r\n else if(fileName.toUpperCase().endsWith(\".TIF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TIFF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TGA\"))\r\n ret_val = \"image/targa\";\r\n else if(fileName.toUpperCase().endsWith(\".BMP\"))\r\n ret_val = \"image/bmp\";\r\n else if(fileName.toUpperCase().endsWith(\".PPM\"))\r\n ret_val = \"image/x-portable-pixmap\";\r\n else if(fileName.toUpperCase().endsWith(\".PGM\"))\r\n ret_val = \"image/x-portable-graymap\";\r\n\r\n // handle previous filename maps\r\n if(ret_val == null && prevMap != null)\r\n return prevMap.getContentTypeFor(fileName);\r\n\r\n // return null if unsure.\r\n return ret_val;\r\n }", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "int getTemplateTypeValue();", "public String getFileType(){\n\t\treturn type;\n\t}", "ContentType(String value){\n\t\t_value = value;\n\t}", "public abstract String getTemplateName();", "public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }", "public String getType()\n {\n return VFS.FILE_TYPE;\n }", "public String getDocumentType();", "public String getType(String name) {\n/* 164 */ return \"CDATA\";\n/* */ }", "String getDefaultType();", "protected abstract String getTemplateName();", "@Override\n public String getContentType() {\n return \"text/xml; charset=UTF-8\";\n }", "public File getTemplateFile();", "@Override\n\tpublic String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {\n\t\treturn new String[] {\n\t\t\tIDocument.DEFAULT_CONTENT_TYPE \n\t\t};\t\t\n\t}", "public String getContentType() {\n return this.response.getContentType();\n }", "public ContentTypeSelDTO getContentType() {\r\n\t\ttype(ConfigurationItemType.CONTENT_TYPE);\r\n\t\treturn contentTypeValue;\r\n\t}", "public String getLBR_MDFeDocType();", "public java.lang.String getContentType() {\n java.lang.Object ref = contentType_;\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 contentType_ = s;\n return s;\n }\n }", "public abstract String getImportFromFileTemplate( );", "public RestTemplate contentTypeHelper(RestTemplate restTemplatex) {\n restTemplatex = new RestTemplateBuilder().build();\n List<HttpMessageConverter<?>> messageConverters = new ArrayList<>();\n MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();\n converter.setSupportedMediaTypes(Collections.singletonList(MediaType.ALL));\n messageConverters.add(converter);\n restTemplatex.setMessageConverters(messageConverters);\n return restTemplatex;\n }", "@JsonProperty(\"contentType\")\n public String getContentType() {\n return contentType;\n }", "public String getFileType() {\n return fileType;\n }", "public String getContentTypes() {\n return contentTypes;\n }", "MimeType mediaType();", "@Override\n public void setContentType(String arg0) {\n\n }" ]
[ "0.6933915", "0.6780197", "0.6780197", "0.6780197", "0.6752425", "0.6730612", "0.6730612", "0.66555786", "0.66431135", "0.66431135", "0.6623261", "0.6581726", "0.65699697", "0.65011126", "0.64492655", "0.6441329", "0.6399282", "0.6337813", "0.63199145", "0.6297835", "0.6295626", "0.6295261", "0.62567145", "0.6253116", "0.6253116", "0.6253116", "0.6232856", "0.62311625", "0.6225299", "0.62125325", "0.62122905", "0.6212062", "0.6198035", "0.6150036", "0.61431617", "0.6140737", "0.61288273", "0.61262894", "0.6103891", "0.6095953", "0.6091293", "0.6091293", "0.6091293", "0.60828173", "0.6077191", "0.6075709", "0.6068637", "0.6054817", "0.60472256", "0.60291904", "0.60291904", "0.60291904", "0.60291904", "0.60291904", "0.60013777", "0.5989767", "0.5988293", "0.5981678", "0.5954977", "0.5953852", "0.5952652", "0.59488046", "0.59357506", "0.59317386", "0.5930296", "0.5909454", "0.5908289", "0.5901592", "0.58949715", "0.58949715", "0.5879594", "0.5868586", "0.5868266", "0.586377", "0.58532804", "0.585269", "0.5830802", "0.58132744", "0.5802249", "0.5779148", "0.5765782", "0.5760176", "0.5740317", "0.5740183", "0.5725332", "0.5710193", "0.5702019", "0.5701189", "0.56746405", "0.56667376", "0.5655905", "0.564693", "0.5643986", "0.56305844", "0.5629882", "0.5624066", "0.56180215", "0.56153136", "0.5611775", "0.55999714", "0.5597884" ]
0.0
-1
Return the total water depth on the Y axis at a specific location. The block passed in parameter must be a water block along the Y axis Return the total water depth on the Y axis at a specific location. The block passed in parameter must be a water block along the Y axis
public static int GetWaterDepth(World aWorld, double xPos, double yPos, double zPos) { int _waterDepth = 0; for(int up = 0;up<=30;up++) { try { if(aWorld.getBlock((int)xPos, (int)yPos+up, (int)zPos) == Blocks.water) { _waterDepth++; } } catch (Exception ex) { //Do nothing, it only catches block that are out of range. Those are not water, so they are not added. } } for(int down = -30; down<0; down++) { try { if(aWorld.getBlock((int)xPos, (int)yPos+down, (int)zPos) == Blocks.water) { _waterDepth++; } } catch (Exception ex) { //Do nothing, it only catches block that are out of range. Those are not water, so they are not added. } } FantasticDebug.Output("Mesured water depth is: "+Integer.toString(_waterDepth)); return _waterDepth++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getBlockY()\n\t {\n\t\t if(y >= 0.0) return (int)y;\n\t\t return -1 + (int)(y);\n\t }", "public abstract Integer getStationRainGaugeDepth(int stationId, int datetimeId);", "int getStrength(IBlockAccess iBlockAccess, BlockPos blockPos);", "float getDepth();", "float getDepth();", "public double getHeight(Block bl,MainWindow M){\r\n\t\tPoint3D pT = (Map.gpsToPix(bl.getpoint_BlockTopRight().y(),bl.getpoint_BlockTopRight().x(),M.getHeight(),M.getWidth()));\r\n\t\tPoint3D pD = (Map.gpsToPix(bl.getpoint_BlockDownleft().y(),bl.getpoint_BlockDownleft().x(),M.getHeight(),M.getWidth()));\r\n\t\tint height = (int)(pD.y() - pT.y());\r\n\t\treturn height;\r\n\t}", "public int getHighestBlockY(World world, int x, int z) {\n\t\tfor (int i = world.getMaxHeight() - 1; i >= 0; i--) {\n \t\t\tint id = world.getBlockTypeIdAt(x, i, z);\n \t\t\tif (id > 0)\n \t\t\t\treturn i;\n \t\t}\n \t\treturn 0;\n \t}", "public static int getToppestWaterHeight(World world, int x, int y, int z)\n\t{\n\t\tint cy = y + 1;\n\t\tIBlockState b = world.getBlockState(new BlockPos(x, y, z));\n\t\t\n\t\tif (checkBlockIsLiquid(b))\n\t\t{\n\t\t\twhile (cy < 255)\n\t\t\t{\n\t\t\t\tb = world.getBlockState(new BlockPos(x, cy, z));\n\t\t\t\t\n\t\t\t\tif(checkBlockIsLiquid(b))\n\t\t\t\t{\n\t\t\t\t\tcy++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cy--;\n\t}", "public Integer getYOffset() {\n\t\tdouble frameHeight = this.pixy.getFrameHeight();\n\t\tdouble blockY = this.getY();\n\n\t\treturn (int) (frameHeight / 2 + blockY);\n\t}", "float calcDepth(float p, float lat) { // ub11\n // ub11\n //function depth = calcDepth(p,lat) // ub11\n double x = Math.sin(lat/57.29578); // ub11\n //%disp(sprintf('%20.15f',x)); // ub11\n x = x*x; // ub11\n //%disp(sprintf('%20.15f',x)); // ub11\n double gr = 9.780318*(1.0+(5.2788e-3+2.36e-5*x)*x) + 1.092e-6*p;// ub11\n //%disp(sprintf('%20.15f',gr)); // ub11\n double depth = (((-1.82E-15*p+2.279E-10)*p-2.2512e-5)*p+9.72659)*p;// ub11\n //%disp(sprintf('%20.15f',depth)); // ub11\n depth = depth/gr; // ub11\n //%disp(sprintf('%20.15f',depth)); // ub11\n return (float)depth; // ub11\n // ub11\n }", "@Override\n\tpublic float getHeight(float xPos, float zPos) {\n\t\t//return getTangentPlane(xPos, zPos).gety(xPos, zPos);\n\t\treturn func.evaluate(new float[] {xPos, zPos});\n\t}", "public double getHeight() {\n return location.height();\n }", "private int countNonAirBlocks(int sectionY, BlockDataStorage blockDataStorage) {\n int blockCount = 0;\n for (int y = 0; y < PaletteBlockStateStorage.SECTION_HEIGHT; y++) {\n for (int z = 0; z < Chunk.WIDTH; z++) {\n for (int x = 0; x < Chunk.WIDTH; x++) {\n BlockState state = blockDataStorage.getBlockState(x, y + PaletteBlockStateStorage.SECTION_HEIGHT * sectionY, z);\n if (state.getBlockType() != VanillaBlockType.AIR) {\n blockCount++;\n }\n }\n }\n }\n return blockCount;\n }", "public double interpolateBathymetricDepth(double x,double y) {\n double z = gridMapData.interpolateBathymetricDepth(x,y);\n return z;\n }", "public double getDepth();", "double getElevation(int nodeId);", "protected abstract double lookupDepth(int depthX, int depthY);", "public long getBlockCount() {\n \t\tint coords[] = getCoords();\n \t\treturn \n \t\t(coords[3]-coords[0]+1)*\n \t\t(coords[4]-coords[1]+1)*\n \t\t(coords[5]-coords[2]+1);\n \t}", "@SideOnly(Side.CLIENT)\n\tpublic int getSkyBlockTypeBrightness(final EnumSkyBlock skyBlock, final int x, int y, final int z) {\n\t\tif (x >= -30000000 && z >= -30000000 && x < 30000000 && z <= 30000000) {\n\t\t\tif (skyBlock == EnumSkyBlock.Sky && this.worldObj.provider.hasNoSky)\n\t\t\t\treturn 0;\n\n\t\t\tif (y < 0)\n\t\t\t\ty = 0;\n\t\t\telse if (y > 255)\n\t\t\t\ty = 255;\n\n\t\t\tfinal int arrayX = (x >> 4) - this.chunkX;\n\t\t\tfinal int arrayZ = (z >> 4) - this.chunkZ;\n\t\t\tassert (arrayX >= 0 && arrayX < this.dimX && arrayZ >= 0 && arrayZ < this.dimZ);\n\t\t\t// if (l >= 0 && l < this.dimX && i1 >= 0 && i1 < this.dimZ)\n\t\t\tfinal Chunk chunk = this.chunkArray[arrayX + arrayZ * this.dimX];\n\n\t\t\tif (chunk.getBlock(x & 15, y, z & 15).getUseNeighborBrightness()) {\n\t\t\t\tint l = this.getSpecialBlockBrightness(skyBlock, x, y + 1, z);\n\t\t\t\tint i1 = this.getSpecialBlockBrightness(skyBlock, x + 1, y, z);\n\t\t\t\tint j1 = this.getSpecialBlockBrightness(skyBlock, x - 1, y, z);\n\t\t\t\tint k1 = this.getSpecialBlockBrightness(skyBlock, x, y, z + 1);\n\t\t\t\tint l1 = this.getSpecialBlockBrightness(skyBlock, x, y, z - 1);\n\n\t\t\t\tif (i1 > l) {\n\t\t\t\t\tl = i1;\n\t\t\t\t}\n\n\t\t\t\tif (j1 > l) {\n\t\t\t\t\tl = j1;\n\t\t\t\t}\n\n\t\t\t\tif (k1 > l) {\n\t\t\t\t\tl = k1;\n\t\t\t\t}\n\n\t\t\t\tif (l1 > l) {\n\t\t\t\t\tl = l1;\n\t\t\t\t}\n\n\t\t\t\treturn l;\n\t\t\t} else {\n\t\t\t\treturn chunk.getSavedLightValue(skyBlock, x & 15, y, z & 15);\n\t\t\t}\n\t\t} else {\n\t\t\treturn skyBlock.defaultLightValue;\n\t\t}\n\t}", "public int getdepthClearence(int barHeights[], int sourceHt, int blockHt, int currentBar, int h, int d, int clearence) {\n\n\t\tint depthObstacle = 0; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tint depthClearence = 0; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tint clearence2 = getClearence(barHeights, sourceHt, blockHt, currentBar); \t\t\t//call method to calculate the tallest obstacle the block needs to navigate before the width is contracted \n\t\tfor (int i = currentBar; i < barHeights.length; i++) \t\t\t\t\t\t\t\t//loop through the array bar heights starting with the current bar (instead of the first instance within the array) \n\n\t\t{\n\t\t\tif (barHeights[i] > depthObstacle) { \t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\tdepthObstacle = barHeights[i]; \t\t\t\t\t\t\t\t\t\t\t//set the depth Obstacle equal to highest bar height value (including and to the right hand side of the current bar)\n\t\t}\n\t\t}\n\t\tint maxHeight = getMaxHeight(barHeights); \t\t\t\t\t\t\t\t\t\t\t//return the value of the highest bar block combination within the entire array barHeights \n\n\t\tif (blockHt == 3 && depthObstacle < sourceHt && depthObstacle == maxHeight) { \t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if the highest obstacle including and to the left of the current bar is less than the source height \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and the highest obstacle including and to the left of the current bar is the highest obstacle in the whole array \n\t\t\tdepthClearence = sourceHt; \t\t\t\t\t\t\t\t\t\t\t\t\t//make the depth clearance equal to the source height \n\t\t} \n\t\telse if (blockHt == 3 && depthObstacle < sourceHt && depthObstacle < maxHeight) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t// if the highest obstacle including and to the left of the current bar is less than the source height \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and the highest obstacle including and to the left of the current bar is less than an obstacle to the left of the current bar (depth could not need to pass over)\n\t\t\tdepthClearence = depthObstacle; \t\t\t\t\t\t\t\t\t\t\t\t// make the depth clearance equal to the highest obstacle including and to the left of the current bar\n\t\t} \n\t\telse if (blockHt == 3 && depthObstacle >= sourceHt) { \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if the highest obstacle including and to the left of the current bar is greater than or the same as the source height \t\t\t\n\t\t\tdepthClearence = depthObstacle;\t\t\t\t\t\t\t\t\t\t\t\t// make the depth clearance equal to the highest obstacle including and to the left of the current bar\n\t\t} \n\t\telse if (blockHt == 2 || blockHt == 1 && maxHeight >= sourceHt) { \t\t\t\t\n\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if the highest obstacle is less than or equal to the source height \n\t\t\tdepthClearence = maxHeight;\t\t\t\t\t\t\t\t\t\t\t\t\t// make the depth clearance equal to the maxHeight\n\t\t}\n\t\telse if (blockHt == 2 || blockHt == 1 && depthObstacle < sourceHt && depthObstacle < maxHeight) { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if the highest obstacle including and to the left of the current bar is less than the source height \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and the highest obstacle including and to the left of the current bar is less than an obstacle to the left of the current bar o\n\t\t\tdepthClearence = maxHeight; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// / make the depth clearance equal to the maxHeight\n\t\t}\n\t\telse if (blockHt == 2 || blockHt == 1 && depthObstacle < sourceHt) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in any other case the highest obstacle including and to the left of the current bar is less than the source height \n\t\t\tdepthClearence = sourceHt; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// make the depth clearance equal to the sourceHt\n\t\t} \n\t\telse { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tdepthClearence = clearence2; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//make the depth clearance equal to the clearance \n\t\t}\n\t\treturn depthClearence; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return the value of the obstacle depth will have to navigate\n\t}", "public short getHeight() {\n\n\t\treturn getShort(ADACDictionary.Y_DIMENSIONS);\n\t}", "private int abstToDeskY(float y)\n {\n return (int)(height*y);\n }", "public int getHighestStoneY(World world, int x, int z) {\n\t\tfor (int i = world.getMaxHeight() - 1; i >= 0; i--) {\n \t\t\tint id = world.getBlockTypeIdAt(x, i, z);\n \t\t\tif (id == 1)\n \t\t\t\treturn i;\n \t\t}\n \t\treturn 0;\n \t}", "public int getYSize() {\n\t\treturn (highPoint.getBlockY() - lowPoint.getBlockY()) + 1;\n\t}", "public int mapY(double y)\n {\n return (int)Math.round(height - (y - (world.view.yOrigin - (world.view.height / 2))) * height / world.view.height);\n }", "public float getDepth() {\r\n\t\treturn Float.parseFloat(getProperty(\"depth\").toString());\t\r\n\t}", "public float getHeight() {\n return 2f * yRadius;\n }", "float getElevation();", "public int elevation(){\n return elevation;\n }", "public int height(){\r\n \r\n // call the recursive method with the root\r\n return height(root);\r\n }", "public BigDecimal getBlockHeight() {\n return blockHeight;\n }", "int getBlocksAmount();", "protected float getLayerSize(int y) {\n\t\tif (y < this.heightLimit * 0.3f) {\n\t\t\treturn -1.0f;\n\t\t} else {\n\t\t\tfloat f = (float) this.heightLimit / 2.0F;\n\t\t\tfloat f1 = f - (float) y;\n\t\t\tfloat f2 = MathHelper.sqrt(f * f - f1 * f1);\n\n\t\t\tif (f1 == 0.0F) {\n\t\t\t\tf2 = f;\n\t\t\t} else if (Math.abs(f1) >= f) {\n\t\t\t\treturn 0.0F;\n\t\t\t}\n\n\t\t\treturn f2 * 0.5F;\n\t\t}\n\t}", "public float getDepth() {\n return depth;\n }", "@Override\n\tpublic int getHeight() {\n\t\treturn POWER_STATION_HEIGHT;\n\t}", "public double getY() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble y = bounds.getY() + (_yt * bounds.getHeight());\n\t\treturn y;\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}", "public int levelHeight() {\r\n\t\treturn map[0].getProperties().get(\"height\", Integer.class);\r\n\t}", "public double bcElevation() {\n return wse[bcIndex];\n }", "public int getBlockZ()\n\t {\n\t\t if(z >= 0.0) return (int)z;\n\t\t return -1 + (int)(z);\n\t }", "public double getY() { return _height<0? _y + _height : _y; }", "public float getDepth() {\n return depth_;\n }", "private int getSurfaceY(int x, int yEstimate, int z) {\n final int yMinimum = 0;\n final int yMaximum = 200;\n int y = yEstimate;\n Block block = worldProvider.getBlock(x, yEstimate, z);\n if (isIgnoredByMap(block)) {\n while (isIgnoredByMap(block)) {\n --y;\n block = worldProvider.getBlock(x, y, z);\n if (y <= yMinimum) {\n return BLOCK_Y_DEFAULT;\n }\n }\n } else {\n while (!isIgnoredByMap(block)) {\n ++y;\n block = worldProvider.getBlock(x, y, z);\n if (y >= yMaximum) {\n return BLOCK_Y_DEFAULT;\n }\n }\n --y;\n }\n return y;\n }", "public float getDepth() {\n return depth_;\n }", "public int getHeight() {\n\t\treturn WORLD_HEIGHT;\n\t}", "static int[] countBlock() throws java.io.IOException {\n\t\tScanner fileScanner = new Scanner(new FileReader(\"level.txt\")); // load the .txt file that contains the level\n\t\tint width = fileScanner.nextInt(); // initialize with width using the first integer of the first line...\n\t\tint height = fileScanner.nextInt(); // ... second integer of the first line\n\t\tString inputText = fileScanner.nextLine(); // read in all subsequent characters after the first line\n\n\t\tfor(int row = 0; row < height; row++){ // get the count of wall blocks\n\t\t\tinputText = fileScanner.nextLine(); \n\t\t\tfor (int column = 0; column < inputText.length(); column++){\n\t\t\t\tchar ch = inputText.charAt(column);\n\t\t\t\tswitch(ch){\n\t\t\t\t\tcase 'W':\n\t\t\t\t\t\tcountElements[0]++; // for every wall element, add 1 to the wall counter in the array\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcountElements[1]++; // for every dirt element, add 1 to the dirt counter in the array\n\t\t\t\t\t\tcountElements[3]++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcountElements[2]++;\n\t\t\t\t\t\tcountElements[3]++;\n\t\t\t\t\t\tbreak; // if not either a wall or dirt, then just continue on\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t\tfileScanner.close();\n\t\treturn new int[] {countElements[0], countElements[1], countElements[2], countElements[3]}; // return the array elements after counting through the entire map\n\t}", "public static int GetTotalBlocks()\n {\n return totalBlocks;\n }", "public float getRelY() {\n return y + (getReferenceY()-Controller.getMap().getChunkCoords(0)[1]) * Chunk.getGameDepth();\n }", "public int getHeight(){\n return this.baseLevel.getHeight();\n }", "public Double getValue() {\n return depth;\n }", "LocalMaterialData getGroundBlock();", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }", "public Integer getMaterialDurability(Block block) {\n return getMaterialDurability(block.getLocation());\n }", "public static int getWorldRenderColor(Block block, IBlockAccess access, int x, int y, int z) {\n return HasGrassRender(block) ? ((IGrassBlock) block).getWorldRenderColor(access, x, y, z) : block.colorMultiplier(access, x, y, z);\n }", "double getElevationWithFlooring();", "public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}", "public double surfaceArea() {\n\treturn (2*getWidth()*getHeight()) + (2*getHeight()*depth) + (2*depth*getWidth());\n }", "public int getHeight() {\n return getTileHeight() * getHeightInTiles();\n }", "private double calcEnergy(int x, int y) {\n if (x == 0 || y == 0 || x == width - 1 || y == height - 1) return BORDER_ENERGY;\n return Math.sqrt(\n Math.pow(getRGBColor(x + 1, y, R) - getRGBColor(x - 1, y, R), 2)\n + Math.pow(getRGBColor(x + 1, y, G) - getRGBColor(x - 1, y, G), 2)\n + Math.pow(getRGBColor(x + 1, y, B) - getRGBColor(x - 1, y, B), 2)\n + Math.pow(getRGBColor(x, y + 1, R) - getRGBColor(x, y - 1, R), 2)\n + Math.pow(getRGBColor(x, y + 1, G) - getRGBColor(x, y - 1, G), 2)\n + Math.pow(getRGBColor(x, y + 1, B) - getRGBColor(x, y - 1, B), 2)\n );\n }", "public void c(World world, BlockPosition blockposition) {\n/* 232 */ if (world.random.nextInt(20) == 1) {\n/* 233 */ float f = world.getBiome(blockposition).getAdjustedTemperature(blockposition);\n/* */ \n/* 235 */ if (f >= 0.15F) {\n/* 236 */ IBlockData iblockdata = world.getType(blockposition);\n/* */ \n/* 238 */ if (((Integer)iblockdata.get(LEVEL)).intValue() < 3) {\n/* 239 */ a(world, blockposition, iblockdata.a(LEVEL), 2);\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "@Override\n public float func_150893_a(ItemStack stack, Block block) {\n if (nearlyDestroyed(stack)) return 0;\n\n if (block == Blocks.web) {\n return 15.0F;\n } else {\n Material material = block.getMaterial();\n return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.gourd ? 1.0F : 1.5F;\n }\n }", "VariableAmount getHeight();", "public int getHeight() {\n // Replace the following line with your solution.\n return height;\n }", "@Override\n public int getHeight() {\n colorSpaceType.assertNumElements(buffer.getFlatSize(), height, width);\n return height;\n }", "public int discoverMaximumLayerDepth() {\n\t\tif (this.layers.size() > 0) {\n\t\t\tint layerDepth;\n\t\t\t\n\t\t\tfor (int i = 0; i < this.layers.size(); i++) {\n\t\t\t\tlayerDepth = this.layers.get(i).getDepth();\n\t\t\t\tthis.maximumLayerDepth = layerDepth > this.maximumLayerDepth ? layerDepth : this.maximumLayerDepth;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.maximumLayerDepth;\n\t}", "public int height() \n\t{\n\t\treturn height(root); //call recursive height method, starting at root\n\t}", "public static double getY() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ty\").getDouble(0);\n }", "public int getHeight() {\n return type.getHeight();\n }", "@Override\n public double getTotalAreaOfBottomReinforcement() {\n return getAreaOfReinforcementLayers(bottomDiameters, additionalBottomDiameters, bottomSpacings).stream()\n .mapToDouble(Double::doubleValue)\n .sum();\n }", "public double getYPixel()\n {\n return yPixel;\n }", "public double getAntennaHeight()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ANTENNAHEIGHT$10);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public double getY() {\n\t\treturn bassY;\n\t}", "public int getUserPlaneY() {\r\n\t\treturn levelManager.getUserPlaneY();\r\n\t}", "public int getJumpMaxElevationChange() {\n return getMaxElevation() -\n getGame().getBoard().getHex(getFinalCoords()).getLevel();\n }", "public double getMaximumY () {\n return minimumY + height;\n }", "default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "int getTotalBlockNum();", "public int height() {\n if (root == null) {\n return -1;\n } else {\n return getHeight(root, 0);\n }\n }", "int computeHeight() {\n Node<Integer>[] nodes = new Node[parent.length];\n for (int i = 0; i < parent.length; i++) {\n nodes[i] = new Node<Integer>();\n }\n int rootIndex = 0;\n for (int childIndex = 0; childIndex < parent.length; childIndex++) {\n if (parent[childIndex] == -1) {\n rootIndex = childIndex;\n } else {\n nodes[parent[childIndex]].addChild(nodes[childIndex]);\n }\n }\n return getDepth(nodes[rootIndex]);\n }", "public double getMaxDepthForRuptureInRegionBounds() {\n if(maxDepth == 0)\n getSiteRegionBounds();\n return maxDepth;\n }", "double getHeight();", "public int getMaxElevation() {\n int maxElev = 0;\n for (MoveStep step : steps) {\n maxElev = Math.max(maxElev,\n getGame().getBoard().getHex(step.getPosition()).getLevel());\n }\n return maxElev;\n }", "public float getHeight()\n {\n return getUpperRightY() - getLowerLeftY();\n }", "public double getBlockAmbientTemperature(int x, int y, int z) {\n World world = asBukkit();\n if (world == null) return 0;\n Block block = world.getBlockAt(x, y, z);\n double temp = getAmbientTemperature(5, 15, x, y, z);\n\n // Apply modifier if block has sunlight.\n if (block.getLightFromSky() > 0) {\n double directSunAmplifier = TEMPERATURES.getDirectSunAmplifier() - 1;\n byte skyLight = block.getLightFromSky();\n double percent = skyLight / 15D;\n temp *= directSunAmplifier * percent + 1;\n }\n\n // Apply modifier if block is in a \"cave\"\n if (((block.getLightFromSky() <= 6 && block.getLightLevel() < 6)\n || block.getType() == Material.CAVE_AIR)\n && block.getLightLevel() != 15) {\n double amp = TEMPERATURES.getCaveModifier() - 1;\n byte light = block.getLightLevel();\n double percent = (15D - light) / 15D;\n temp *= amp * percent + 1;\n }\n return temp;\n }", "public float getHeight();", "int getYForHive(World world, int x, int z);", "protected double getPixelsPerY() {\n\t\treturn m_pixelsPerY;\n\t}", "public static int getDepth() {\n return depth;\n }", "public int volume() {\r\n int xLength = this.getMaximumPoint().getBlockX() - this.getMinimumPoint().getBlockX() + 1;\r\n int yLength = this.getMaximumPoint().getBlockY() - this.getMinimumPoint().getBlockY() + 1;\r\n int zLength = this.getMaximumPoint().getBlockZ() - this.getMinimumPoint().getBlockZ() + 1;\r\n\r\n int volume = xLength * yLength * zLength;\r\n return volume;\r\n }", "long getHeight();", "private float deskYToAbst(int y)\n {\n return ((float)y/height);\n }", "@NonNegative float blockHardness();", "public int height() {\n if (root == null) {\n return -1;\n }\n else return height(root);\n }", "public Texture2D getDepthTexture()\n\t{\n\t\treturn mDepthTexture;\n\t}", "public double getHeight();", "public double getHeight();", "public double getHeight() {\n\t\treturn my-ny;\n\t}" ]
[ "0.5758294", "0.56728953", "0.5546817", "0.55443794", "0.55443794", "0.54768497", "0.5468899", "0.5462552", "0.5432725", "0.5392275", "0.5354922", "0.5315829", "0.5307356", "0.5275652", "0.5268198", "0.5227373", "0.52143216", "0.5184817", "0.5168935", "0.5157208", "0.51479477", "0.51412815", "0.5136221", "0.51317775", "0.5123111", "0.5120535", "0.5112941", "0.5109056", "0.5092588", "0.5087908", "0.5078364", "0.50764656", "0.5075742", "0.5048295", "0.50308776", "0.4976259", "0.49742508", "0.49646538", "0.49534267", "0.4950438", "0.49459708", "0.49449265", "0.4942579", "0.49391568", "0.49301487", "0.49288595", "0.4928137", "0.49101514", "0.49079564", "0.49070883", "0.49069074", "0.49061483", "0.49061483", "0.4899868", "0.48966804", "0.4889183", "0.4882678", "0.48678324", "0.48609114", "0.48587862", "0.48520195", "0.4851208", "0.48468804", "0.4844634", "0.48297605", "0.48188856", "0.48129934", "0.48120245", "0.4807627", "0.47972566", "0.47930717", "0.47921026", "0.47915858", "0.47895327", "0.4789107", "0.47885895", "0.47874162", "0.4787052", "0.47858578", "0.47821584", "0.47815716", "0.4776017", "0.47727472", "0.47589323", "0.47544843", "0.4752288", "0.4750807", "0.47477487", "0.4741359", "0.47401613", "0.4738244", "0.47275954", "0.472724", "0.4725466", "0.47214204", "0.47212425", "0.47151202", "0.47117537", "0.47117537", "0.4709086" ]
0.66610664
0
finds a random target within par1(x,z) and par2 (y) blocks in the direction of the point par3
public static Vec3 findRandomTargetBlockTowards(EntityCreature aWaterMob, int xzFleeZoneSize, int yFleeZoneSize, Vec3 aTargetVectorPos, int aMinRangeXZ, int aMinDepth) { Vec3 _fleeingVector = Vec3.createVectorHelper(aTargetVectorPos.xCoord - aWaterMob.posX,aTargetVectorPos.yCoord - aWaterMob.posY,aTargetVectorPos.zCoord - aWaterMob.posZ); return findRandomTargetBlock(aWaterMob, xzFleeZoneSize, yFleeZoneSize,_fleeingVector,aMinRangeXZ,aMinDepth); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Point getRandomPoint() {\n\t\t\t\t\tdouble val = Math.random() * 3;\n\t\t\t\t\tif (val >=0.0 && val <1.0)\n\t\t\t\t\t\treturn p1;\n\t\t\t\t\telse if (val >=1.0 && val <2.0)\n\t\t\t\t\t\t\treturn p2;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn p3;\n\t\t\t\t\t}", "private Vector3 randomLocationDolphin() {\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 0.0f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) < 420f);\n\t\treturn randomPosition;\n\t}", "public BoardCell pickLocation(Set<BoardCell> targets){\n\t\tfor (BoardCell i: targets)\r\n\t\t\tif (i.isRoom() && !(((RoomCell) i).getInitial() == lastRoomVisited))\r\n\t\t\t\treturn i;\r\n\t\t//\tpick random cell\r\n\t\tObject[] cell = targets.toArray();\r\n\t\tRandom generator = new Random();\r\n\t\tint random = generator.nextInt(cell.length);\r\n\t\treturn (BoardCell) cell[random];\r\n\t}", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "protected boolean teleportTo(double x, double y, double z) {\n double xI = this.posX;\n double yI = this.posY;\n double zI = this.posZ;\n this.posX = x;\n this.posY = y;\n this.posZ = z;\n boolean canTeleport = false;\n int blockX = (int)Math.floor(this.posX);\n int blockY = (int)Math.floor(this.posY);\n int blockZ = (int)Math.floor(this.posZ);\n Block block;\n if (this.worldObj.blockExists(blockX, blockY, blockZ)) {\n boolean canTeleportToBlock = false;\n while (!canTeleportToBlock && blockY > 0) {\n block = this.worldObj.getBlock(blockX, blockY - 1, blockZ);\n if (block != null && block.getMaterial().blocksMovement()) {\n canTeleportToBlock = true;\n }\n else {\n --this.posY;\n --blockY;\n }\n }\n if (canTeleportToBlock) {\n this.setPosition(this.posX, this.posY, this.posZ);\n if (this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox)) {\n canTeleport = true;\n }\n }\n }\n if (!canTeleport) {\n this.setPosition(xI, yI, zI);\n return false;\n }\n for (int i = 0; i < 128; i++) {\n double posRelative = i / 127.0;\n float vX = (this.rand.nextFloat() - 0.5F) * 0.2F;\n float vY = (this.rand.nextFloat() - 0.5F) * 0.2F;\n float vZ = (this.rand.nextFloat() - 0.5F) * 0.2F;\n double dX = xI + (this.posX - xI) * posRelative + (this.rand.nextDouble() - 0.5) * this.width * 2.0;\n double dY = yI + (this.posY - yI) * posRelative + this.rand.nextDouble() * this.height;\n double dZ = zI + (this.posZ - zI) * posRelative + (this.rand.nextDouble() - 0.5) * this.width * 2.0;\n this.worldObj.spawnParticle(\"portal\", dX, dY, dZ, vX, vY, vZ);\n }\n this.worldObj.playSoundEffect(xI, yI, zI, \"mob.endermen.portal\", 1.0F, 1.0F);\n this.worldObj.playSoundAtEntity(this, \"mob.endermen.portal\", 1.0F, 1.0F);\n return true;\n }", "public static Location genRandomSpawn() {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, 0, z));\n }", "private Point3D getRandomSolarPoint(final int radius)\n \t{\n \t\t// Might want to change the min/max values here\n \t\tPoint3D point = null;\n \t\twhile (point == null || isOccupied(point, radius)) {\n \t\t\tpoint = new Point3D(MathUtils.getRandomIntBetween(-500, 500), MathUtils.getRandomIntBetween(-500, 500),\n \t\t\t\t\tMathUtils.getRandomIntBetween(-500, 500));\n \t\t}\n \t\treturn point;\n \t}", "public Point2D getRandomNodeLocation() {\n int validNum = 0;\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n validNum++;\n }\n }\n int randomIndex = RandomEnhanced.randInt(0,validNum-1);\n\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n if (randomIndex==0) return ((NavNode)graphNode).getPosition();\n randomIndex--;\n }\n }\n return null;\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "private Vector3 randomLocationMonster() {\n\t\t\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 1.5f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) > 380f);\n\t\treturn randomPosition;\n\t}", "public Position sampleRandomUniformPosition();", "private Pair<Integer, Integer> genRandomSrcDst(){\n int src = (int)(Math.random()*nodesNum);\n int dst = src;\n do {\n dst = (int)(Math.random()*nodesNum);\n }while(dst == src);\n return new Pair<Integer, Integer>(src, dst);\n }", "private void createBall(double par1, int par3, int[] par4ArrayOfInteger, int[] par5ArrayOfInteger, boolean par6, boolean par7)\n {\n double d1 = this.posX;\n double d2 = this.posY;\n double d3 = this.posZ;\n\n for (int j = -par3; j <= par3; ++j)\n {\n for (int k = -par3; k <= par3; ++k)\n {\n for (int l = -par3; l <= par3; ++l)\n {\n double d4 = (double)k + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d5 = (double)j + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d6 = (double)l + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d7 = (double)MathHelper.sqrt_double(d4 * d4 + d5 * d5 + d6 * d6) / par1 + this.rand.nextGaussian() * 0.05D;\n this.createParticle(d1, d2, d3, d4 / d7, d5 / d7, d6 / d7, par4ArrayOfInteger, par5ArrayOfInteger, par6, par7);\n\n if (j != -par3 && j != par3 && k != -par3 && k != par3)\n {\n l += par3 * 2 - 1;\n }\n }\n }\n }\n }", "public Location randomSpawn(Match m) {\r\n\t\treturn randomSpawn(teamName.ALONE, m);\r\n\t}", "public static Location genRandomSpawn(int y) {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, y, z));\n }", "public static Point pos(){\r\n\t\tRandom random = new Random();\r\n\t\tint x = 0;\r\n\t\tint y = 0;\r\n\t\t//acts as a 4 sided coin flip\r\n\t\t//this is to decide which side the asteroid will appear\r\n\t\tint pos = random.nextInt(4);\r\n\t\t//west\r\n\t\tif(pos == 0){\r\n\t\t\tx = 0;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//north\r\n\t\telse if(pos == 1){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 0;\r\n\t\t}\r\n\t\t//east\r\n\t\telse if(pos == 2){\r\n\t\t\tx = 800;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//\r\n\t\telse if(pos == 3){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 600;\r\n\t\t}\r\n\t\tPoint p = new Point(x,y);\r\n\t\treturn p;\r\n\t}", "public void generateNether(World world, Random random, int x, int y){\n\t}", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public Location getRandomLocation() {\n\t\tfinal Random randomGenerator = new Random();\n\n\t\tLocation result = new Location(getWorld(), highPoint.getBlockX(), highPoint.getBlockY(), highPoint.getBlockZ());\n\t\t\n\t\tif (getSize() > 1) {\n\t\t\tfinal double randomX = lowPoint.getBlockX() + randomGenerator.nextInt(getXSize());\n\t\t\tfinal double randomY = lowPoint.getBlockY() + randomGenerator.nextInt(getYSize());\n\t\t\tfinal double randomZ = lowPoint.getBlockZ() + randomGenerator.nextInt(getZSize());\n\t\t\t\n\t\t\tresult = new Location(Bukkit.getWorld(world), randomX, randomY, randomZ);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static int[] getSafeBlockWithinRange(World world, int x, int y, int z, int ranX, int ranY, int ranZ)\n\t{\n\t\tint[] pos = new int[] {x, y, z};\n\n\t\t//find x2,y2,z2 = 0, 1, -1, 2, -2, 3, -3, ...\n\t\t//find block priority: Y > Z > X\n\t\tint xlimit = ranX * 2;\n\t\tint ylimit = ranY * 2;\n\t\tint zlimit = ranZ * 2;\n\t\tint x2 = 0;\n\t\tint y2 = 0;\n\t\tint z2 = 0;\n\t\tint x3, y3, z3;\n\t\tint addx;\n\t\tint addy;\n\t\tint addz;\n\t\t\n\t\tfor (int ix = 0; ix <= xlimit; ix++)\n\t\t{\n\t\t\t//calc sequence number\n\t\t\taddx = (ix & 1) == 0 ? ix * -1 : ix;\n\t\t\tx2 += addx;\n\t\t\t\n\t\t\t//reset z2\n\t\t\tz2 = 0;\n\t\t\t\n\t\t\tfor (int iz = 0; iz <= zlimit; iz++)\n\t\t\t{\n\t\t\t\t//calc sequence number\n\t\t\t\taddz = (iz & 1) == 0 ? iz * -1 : iz;\n\t\t\t\tz2 += addz;\n\t\t\t\t\n\t\t\t\t//reset y2\n\t\t\t\ty2 = 0;\n\t\t\t\t\n\t\t\t\tfor (int iy = 0; iy <= ylimit; iy++)\n\t\t\t\t{\n\t\t\t\t\t//calc sequence number\n\t\t\t\t\taddy = (iy & 1) == 0 ? iy * -1 : iy;\n\t\t\t\t\ty2 += addy;\n\t\t\t\t\t\n\t\t\t\t\t//check block is safe\n\t\t\t\t\tx3 = pos[0] + x2;\n\t\t\t\t\ty3 = pos[1] + y2;\n\t\t\t\t\tz3 = pos[2] + z2;\n\t\t\t\t\t\n\t\t\t\t\tif (checkBlockSafe(world, x3, y3, z3))\n\t\t\t\t\t{\n\t\t\t\t\t\t//check block is safe to stand at\n\t\t\t\t\t\tint decY = 0; //max Y dist below target\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (decY <= MathHelper.abs(y2))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (checkBlockCanStandAt(world.getBlockState(new BlockPos(x3, y3 - decY - 1, z3))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpos[0] = x3;\n\t\t\t\t\t\t\t\tpos[1] = y3 - decY;\n\t\t\t\t\t\t\t\tpos[2] = z3;\n\t\t\t\t\t\t\t\treturn pos;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdecY++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end block is safe\n\t\t\t\t}//end y\n\t\t\t}//end z\n\t\t}//end x\n\t\t\n\t\tLogHelper.info(\"DEBUG : find block fail\");\n\t\treturn null;\n\t}", "public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt)\r\n/* 12: */ {\r\n/* 13: 19 */ int i = paramRandom.nextInt(4) + 5;\r\n/* 14: 20 */ while (paramaqu.getBlock(paramdt.down()).getType().getMaterial() == Material.water) {\r\n/* 15: 21 */ paramdt = paramdt.down();\r\n/* 16: */ }\r\n/* 17: 24 */ int j = 1;\r\n/* 18: 25 */ if ((paramdt.getY() < 1) || (paramdt.getY() + i + 1 > 256)) {\r\n/* 19: 26 */ return false;\r\n/* 20: */ }\r\n/* 21: */ int n;\r\n/* 22: */ int i2;\r\n/* 23: 29 */ for (int k = paramdt.getY(); k <= paramdt.getY() + 1 + i; k++)\r\n/* 24: */ {\r\n/* 25: 30 */ int m = 1;\r\n/* 26: 31 */ if (k == paramdt.getY()) {\r\n/* 27: 32 */ m = 0;\r\n/* 28: */ }\r\n/* 29: 34 */ if (k >= paramdt.getY() + 1 + i - 2) {\r\n/* 30: 35 */ m = 3;\r\n/* 31: */ }\r\n/* 32: 37 */ for (n = paramdt.getX() - m; (n <= paramdt.getX() + m) && (j != 0); n++) {\r\n/* 33: 38 */ for (i2 = paramdt.getZ() - m; (i2 <= paramdt.getZ() + m) && (j != 0); i2++) {\r\n/* 34: 39 */ if ((k >= 0) && (k < 256))\r\n/* 35: */ {\r\n/* 36: 40 */ BlockType localatr3 = paramaqu.getBlock(new BlockPosition(n, k, i2)).getType();\r\n/* 37: 41 */ if ((localatr3.getMaterial() != Material.air) && (localatr3.getMaterial() != Material.leaves)) {\r\n/* 38: 42 */ if ((localatr3 == BlockList.water) || (localatr3 == BlockList.flowingWater))\r\n/* 39: */ {\r\n/* 40: 43 */ if (k > paramdt.getY()) {\r\n/* 41: 44 */ j = 0;\r\n/* 42: */ }\r\n/* 43: */ }\r\n/* 44: */ else {\r\n/* 45: 47 */ j = 0;\r\n/* 46: */ }\r\n/* 47: */ }\r\n/* 48: */ }\r\n/* 49: */ else\r\n/* 50: */ {\r\n/* 51: 51 */ j = 0;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 57 */ if (j == 0) {\r\n/* 57: 58 */ return false;\r\n/* 58: */ }\r\n/* 59: 61 */ BlockType localatr1 = paramaqu.getBlock(paramdt.down()).getType();\r\n/* 60: 62 */ if (((localatr1 != BlockList.grass) && (localatr1 != BlockList.dirt)) || (paramdt.getY() >= 256 - i - 1)) {\r\n/* 61: 63 */ return false;\r\n/* 62: */ }\r\n/* 63: 66 */ makeDirt(paramaqu, paramdt.down());\r\n/* 64: */ int i3;\r\n/* 65: */ int i4;\r\n/* 66: */ BlockPosition localdt3;\r\n/* 67: 68 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++)\r\n/* 68: */ {\r\n/* 69: 69 */ n = m - (paramdt.getY() + i);\r\n/* 70: 70 */ i2 = 2 - n / 2;\r\n/* 71: 71 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++)\r\n/* 72: */ {\r\n/* 73: 72 */ i4 = i3 - paramdt.getX();\r\n/* 74: 73 */ for (int i5 = paramdt.getZ() - i2; i5 <= paramdt.getZ() + i2; i5++)\r\n/* 75: */ {\r\n/* 76: 74 */ int i6 = i5 - paramdt.getZ();\r\n/* 77: 75 */ if ((Math.abs(i4) != i2) || (Math.abs(i6) != i2) || ((paramRandom.nextInt(2) != 0) && (n != 0)))\r\n/* 78: */ {\r\n/* 79: 78 */ localdt3 = new BlockPosition(i3, m, i5);\r\n/* 80: 79 */ if (!paramaqu.getBlock(localdt3).getType().m()) {\r\n/* 81: 80 */ setBlock(paramaqu, localdt3, BlockList.leaves);\r\n/* 82: */ }\r\n/* 83: */ }\r\n/* 84: */ }\r\n/* 85: */ }\r\n/* 86: */ }\r\n/* 87: 86 */ for (int m = 0; m < i; m++)\r\n/* 88: */ {\r\n/* 89: 87 */ BlockType localatr2 = paramaqu.getBlock(paramdt.up(m)).getType();\r\n/* 90: 88 */ if ((localatr2.getMaterial() == Material.air) || (localatr2.getMaterial() == Material.leaves) || (localatr2 == BlockList.flowingWater) || (localatr2 == BlockList.water)) {\r\n/* 91: 89 */ setBlock(paramaqu, paramdt.up(m), BlockList.log);\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94: 93 */ for (int m = paramdt.getY() - 3 + i; m <= paramdt.getY() + i; m++)\r\n/* 95: */ {\r\n/* 96: 94 */ int i1 = m - (paramdt.getY() + i);\r\n/* 97: 95 */ i2 = 2 - i1 / 2;\r\n/* 98: 96 */ for (i3 = paramdt.getX() - i2; i3 <= paramdt.getX() + i2; i3++) {\r\n/* 99: 97 */ for (i4 = paramdt.getZ() - i2; i4 <= paramdt.getZ() + i2; i4++)\r\n/* 100: */ {\r\n/* 101: 98 */ BlockPosition localdt1 = new BlockPosition(i3, m, i4);\r\n/* 102:100 */ if (paramaqu.getBlock(localdt1).getType().getMaterial() == Material.leaves)\r\n/* 103: */ {\r\n/* 104:101 */ BlockPosition localdt2 = localdt1.west();\r\n/* 105:102 */ localdt3 = localdt1.east();\r\n/* 106:103 */ BlockPosition localdt4 = localdt1.north();\r\n/* 107:104 */ BlockPosition localdt5 = localdt1.south();\r\n/* 108:106 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt2).getType().getMaterial() == Material.air)) {\r\n/* 109:107 */ a(paramaqu, localdt2, bbv.S);\r\n/* 110: */ }\r\n/* 111:109 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt3).getType().getMaterial() == Material.air)) {\r\n/* 112:110 */ a(paramaqu, localdt3, bbv.T);\r\n/* 113: */ }\r\n/* 114:112 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt4).getType().getMaterial() == Material.air)) {\r\n/* 115:113 */ a(paramaqu, localdt4, bbv.Q);\r\n/* 116: */ }\r\n/* 117:115 */ if ((paramRandom.nextInt(4) == 0) && (paramaqu.getBlock(localdt5).getType().getMaterial() == Material.air)) {\r\n/* 118:116 */ a(paramaqu, localdt5, bbv.R);\r\n/* 119: */ }\r\n/* 120: */ }\r\n/* 121: */ }\r\n/* 122: */ }\r\n/* 123: */ }\r\n/* 124:122 */ return true;\r\n/* 125: */ }", "public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt)\r\n/* 13: */ {\r\n/* 14:22 */ while ((paramaqu.isEmpty(paramdt)) && (paramdt.getY() > 2)) {\r\n/* 15:23 */ paramdt = paramdt.down();\r\n/* 16: */ }\r\n/* 17:26 */ if (!a.apply(paramaqu.getBlock(paramdt))) {\r\n/* 18:27 */ return false;\r\n/* 19: */ }\r\n/* 20: */ int k;\r\n/* 21:31 */ for (int i = -2; i <= 2; i++) {\r\n/* 22:32 */ for (k = -2; k <= 2; k++) {\r\n/* 23:33 */ if ((paramaqu.isEmpty(paramdt.offset(i, -1, k))) && (paramaqu.isEmpty(paramdt.offset(i, -2, k)))) {\r\n/* 24:34 */ return false;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ }\r\n/* 28:40 */ for (int i = -1; i <= 0; i++) {\r\n/* 29:41 */ for (k = -2; k <= 2; k++) {\r\n/* 30:42 */ for (int n = -2; n <= 2; n++) {\r\n/* 31:43 */ paramaqu.setBlock(paramdt.offset(k, i, n), this.c, 2);\r\n/* 32: */ }\r\n/* 33: */ }\r\n/* 34: */ }\r\n/* 35:49 */ paramaqu.setBlock(paramdt, this.d, 2);\r\n/* 36:50 */ for (EnumDirection localej : EnumHorizontalVertical.HORIZONTAL) {\r\n/* 37:51 */ paramaqu.setBlock(paramdt.offset(localej), this.d, 2);\r\n/* 38: */ }\r\n/* 39: */ int m;\r\n/* 40:55 */ for (int j = -2; j <= 2; j++) {\r\n/* 41:56 */ for (m = -2; m <= 2; m++) {\r\n/* 42:57 */ if ((j == -2) || (j == 2) || (m == -2) || (m == 2)) {\r\n/* 43:58 */ paramaqu.setBlock(paramdt.offset(j, 1, m), this.c, 2);\r\n/* 44: */ }\r\n/* 45: */ }\r\n/* 46: */ }\r\n/* 47:63 */ paramaqu.setBlock(paramdt.offset(2, 1, 0), this.b, 2);\r\n/* 48:64 */ paramaqu.setBlock(paramdt.offset(-2, 1, 0), this.b, 2);\r\n/* 49:65 */ paramaqu.setBlock(paramdt.offset(0, 1, 2), this.b, 2);\r\n/* 50:66 */ paramaqu.setBlock(paramdt.offset(0, 1, -2), this.b, 2);\r\n/* 51:69 */ for (int j = -1; j <= 1; j++) {\r\n/* 52:70 */ for (m = -1; m <= 1; m++) {\r\n/* 53:71 */ if ((j == 0) && (m == 0)) {\r\n/* 54:72 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.c, 2);\r\n/* 55: */ } else {\r\n/* 56:74 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.b, 2);\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ }\r\n/* 60:80 */ for (int j = 1; j <= 3; j++)\r\n/* 61: */ {\r\n/* 62:81 */ paramaqu.setBlock(paramdt.offset(-1, j, -1), this.c, 2);\r\n/* 63:82 */ paramaqu.setBlock(paramdt.offset(-1, j, 1), this.c, 2);\r\n/* 64:83 */ paramaqu.setBlock(paramdt.offset(1, j, -1), this.c, 2);\r\n/* 65:84 */ paramaqu.setBlock(paramdt.offset(1, j, 1), this.c, 2);\r\n/* 66: */ }\r\n/* 67:87 */ return true;\r\n/* 68: */ }", "public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)\n {\n if (\"Stronghold\".equals(par2Str))\n {\n Iterator var6 = this.field_82696_f.iterator();\n\n while (var6.hasNext())\n {\n MapGenStructure var7 = (MapGenStructure)var6.next();\n\n if (var7 instanceof MapGenStronghold)\n {\n return var7.getNearestInstance(par1World, par3, par4, par5);\n }\n }\n }\n\n return null;\n }", "public Location randomSpawn(teamName team, Match m) {\r\n\t\tdouble distance = 0;\r\n\t\tint index = 0;\r\n\t\tboolean edited = false;\r\n\t\t\r\n\t\tfinal HashMap<String, teamName> players = new HashMap<String, teamName>(m.getPlayers());\r\n\t\tif (players.size()> 1){\r\n\t\t\tfor (Location spawn : spawnsList){\r\n\t\t\t\t\r\n\t\t\t\t//closest player to location\r\n\t\t\t\tdouble pDistance = 999;\r\n\t\t\t\tfor (String name : players.keySet()){\r\n\t\t\t\t\tif (players.get(name) != team || team.equals(teamName.ALONE)){\r\n\t\t\t\t\t\tif (Bukkit.getServer().getPlayer(name) != null){\r\n\t\t\t\t\t\t\tif (Bukkit.getServer().getPlayer(name).getLocation().getWorld().toString().equals(spawn.getWorld().toString())){\r\n\t\t\t\t\t\t\t\tif (Bukkit.getServer().getPlayer(name).getLocation().distance(spawn) < pDistance){\r\n\t\t\t\t\t\t\t\t\tpDistance = Bukkit.getServer().getPlayer(name).getLocation().distance(spawn);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (pDistance < 999 && pDistance > distance){\r\n\t\t\t\t\t//is edited? < 999, is not closer then 10 blocks?\r\n\t\t\t\t\t//the closest player is further away then the old distance\r\n\t\t\t\t\tdistance = pDistance;\r\n\t\t\t\t\tindex = spawnsList.indexOf(spawn);\r\n\t\t\t\t\tedited = true;\r\n\t\t\t\t}\r\n\t\t\t\t//TODO make it check for a location near teammates\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tindex = new Random().nextInt(spawnsList.size());\r\n\t\t}\r\n\t\t\r\n\t\tif (!edited){\r\n\t\t\t\r\n\t\t}\r\n\t\treturn spawnsList.get(index);\r\n\t}", "public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int i, int j)\n {\n return null;\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "private PositionData getRandomPoint() {\r\n int posX = new Random().nextInt(Constants.WIDTH);\r\n int posY = new Random().nextInt(Constants.HEIGHT);\r\n //make sure point is open\r\n while(!isOpenSpace(posX, posY)) {\r\n posX = new Random().nextInt(Constants.WIDTH);\r\n posY = new Random().nextInt(Constants.HEIGHT);\r\n }\r\n return new PositionData(posX, posY, Constants.PLAYER_A_ID);\r\n }", "@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }", "Maze3d generate(int x, int y, int z) throws Exception;", "public void randomizePointer(){\n\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n while(pointerPos.dist(BASE_POS)>280 || pointerPos.dist(BASE_POS)<80 || p.atan2(pointerPos.y-BASE_POS.y,pointerPos.x - BASE_POS.x)>p.radians(60)){\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n }\n }", "public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y, z);\n\t}", "private void move (Point3D target){\n double xPos = drone.getTranslateX();\n double yPos = drone.getTranslateY();\n double zPos = drone.getTranslateZ();\n Point3D from = new Point3D(xPos, yPos, zPos); // get p1\n Point3D to = target;\n Duration duration = Duration.seconds(calculateDistance(from, to) / getSpeed());\n animate(createMoveAnimation(to, duration));\n\n }", "public static Block[] getRandomBlocksInSetRangeWithRandomChance(World world, int x, int y, int z, int range, int passes, int chance)\n {\n return null;\n }", "public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}", "private Point randomIndex() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val1 = rand.nextInt(rows_size);\r\n\t\tint val2 = rand.nextInt(columns_size);\r\n\t\twhile (!isEmpty(val1,val2)) {\r\n\t\t\tval1 = rand.nextInt(rows_size);\r\n\t\t\tval2 = rand.nextInt(columns_size);\r\n\t\t}\r\n\t\treturn new Point(val1,val2);\r\n\t}", "int getTargetPos();", "public Location getRandomLocationForMobs() {\n\t\tfinal Location temp = getRandomLocation();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX() + 0.5, temp.getBlockY() + 0.5, temp.getBlockZ() + 0.5);\n\t}", "public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}", "public static Location genRandomSpawn(int y, int width) {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = width / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, y, z));\n }", "@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}", "private final long getRandomTarget(int attempts, int targetTemplate, @Nullable ArrayList<Long> itemList) {\n/* 1746 */ long itemFound = -1L;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1751 */ if (Servers.localServer.PVPSERVER) {\n/* */ \n/* 1753 */ int numsExisting = 0;\n/* */ int x;\n/* 1755 */ for (x = 0; x < 17; x++) {\n/* */ \n/* 1757 */ if (this.epicTargetItems[x] > 0L)\n/* 1758 */ numsExisting++; \n/* */ } \n/* 1760 */ if (numsExisting > 0)\n/* */ {\n/* */ \n/* 1763 */ for (x = 0; x < 17; x++) {\n/* */ \n/* 1765 */ if (this.epicTargetItems[x] > 0L) {\n/* */ \n/* */ try {\n/* */ \n/* 1769 */ Item eti = Items.getItem(this.epicTargetItems[x]);\n/* 1770 */ Village v = Villages.getVillage(eti.getTilePos(), eti.isOnSurface());\n/* */ \n/* */ \n/* */ \n/* 1774 */ if (v == null) {\n/* */ \n/* 1776 */ if (itemFound == -1L) {\n/* 1777 */ itemFound = this.epicTargetItems[x];\n/* 1778 */ } else if (Server.rand.nextInt(numsExisting) == 0) {\n/* 1779 */ itemFound = this.epicTargetItems[x];\n/* */ } \n/* */ } else {\n/* */ \n/* 1783 */ logger.info(\"Disqualified Epic Mission Target item due to being in village \" + v.getName() + \": Name: \" + eti\n/* 1784 */ .getName() + \" | WurmID: \" + eti.getWurmId() + \" | TileX: \" + eti.getTileX() + \" | TileY: \" + eti\n/* 1785 */ .getTileY());\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1791 */ catch (NoSuchItemException nsie) {\n/* */ \n/* 1793 */ logger.warning(\"Epic mission item could not be found when loaded, maybe it was wrongfully deleted? WurmID:\" + this.epicTargetItems[x] + \". \" + nsie);\n/* */ } \n/* */ }\n/* */ } \n/* */ }\n/* */ } else {\n/* */ int templateId;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1807 */ if (logger.isLoggable(Level.FINE)) {\n/* 1808 */ logger.fine(\"Entering Freedom Version of Valrei Mission Target Structure selection.\");\n/* */ }\n/* 1810 */ Connection dbcon = null;\n/* 1811 */ PreparedStatement ps1 = null;\n/* 1812 */ ResultSet rs = null;\n/* */ \n/* 1814 */ int structureType = Server.rand.nextInt(6);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1820 */ if (targetTemplate > 0) {\n/* */ \n/* 1822 */ templateId = targetTemplate;\n/* */ }\n/* */ else {\n/* */ \n/* 1826 */ switch (structureType) {\n/* */ \n/* */ case 0:\n/* 1829 */ templateId = 717;\n/* */ break;\n/* */ case 1:\n/* 1832 */ templateId = 714;\n/* */ break;\n/* */ case 2:\n/* 1835 */ templateId = 713;\n/* */ break;\n/* */ case 3:\n/* 1838 */ templateId = 715;\n/* */ break;\n/* */ case 4:\n/* 1841 */ templateId = 712;\n/* */ break;\n/* */ case 5:\n/* 1844 */ templateId = 716;\n/* */ break;\n/* */ default:\n/* 1847 */ templateId = 713;\n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* */ } \n/* 1853 */ if (logger.isLoggable(Level.FINE)) {\n/* 1854 */ logger.fine(\"Selected template with id=\" + templateId);\n/* */ }\n/* 1856 */ if (itemList == null) {\n/* */ \n/* 1858 */ itemList = new ArrayList<>();\n/* */ \n/* */ \n/* */ try {\n/* 1862 */ String dbQueryString = \"SELECT WURMID FROM ITEMS WHERE TEMPLATEID=?\";\n/* */ \n/* 1864 */ if (logger.isLoggable(Level.FINER)) {\n/* 1865 */ logger.finer(\"Query String [ SELECT WURMID FROM ITEMS WHERE TEMPLATEID=? ]\");\n/* */ }\n/* 1867 */ dbcon = DbConnector.getItemDbCon();\n/* 1868 */ ps1 = dbcon.prepareStatement(\"SELECT WURMID FROM ITEMS WHERE TEMPLATEID=?\");\n/* 1869 */ ps1.setInt(1, templateId);\n/* 1870 */ rs = ps1.executeQuery();\n/* */ \n/* 1872 */ while (rs.next())\n/* */ {\n/* 1874 */ long currentLong = rs.getLong(\"WURMID\");\n/* 1875 */ if (currentLong > 0L)\n/* */ {\n/* 1877 */ itemList.add(Long.valueOf(currentLong));\n/* */ }\n/* 1879 */ if (logger.isLoggable(Level.FINEST)) {\n/* 1880 */ logger.finest(rs.toString());\n/* */ }\n/* */ }\n/* */ \n/* 1884 */ } catch (SQLException ex) {\n/* */ \n/* 1886 */ logger.log(Level.WARNING, \"Failed to locate mission items with templateid=\" + templateId, ex);\n/* */ }\n/* */ finally {\n/* */ \n/* 1890 */ DbUtilities.closeDatabaseObjects(ps1, null);\n/* 1891 */ DbConnector.returnConnection(dbcon);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 1896 */ if (itemList.size() > 0) {\n/* */ \n/* 1898 */ int randomIndex = Server.rand.nextInt(itemList.size());\n/* */ \n/* 1900 */ if (itemList.get(randomIndex) != null)\n/* */ {\n/* */ \n/* 1903 */ long selectedTarget = ((Long)itemList.get(randomIndex)).longValue();\n/* */ \n/* */ \n/* */ try {\n/* 1907 */ Item eti = Items.getItem(selectedTarget);\n/* 1908 */ Village v = Villages.getVillage(eti.getTilePos(), eti.isOnSurface());\n/* */ \n/* */ \n/* */ \n/* 1912 */ if (v == null) {\n/* */ \n/* 1914 */ logger.info(\"Selected mission target with wurmid=\" + selectedTarget);\n/* 1915 */ return selectedTarget;\n/* */ } \n/* */ \n/* */ \n/* 1919 */ logger.info(\"Disqualified Epic Mission Target item due to being in village \" + v.getName() + \": Name: \" + eti\n/* 1920 */ .getName() + \" | WurmID: \" + eti.getWurmId() + \" | TileX: \" + eti.getTileX() + \" | TileY: \" + eti\n/* 1921 */ .getTileY());\n/* */ \n/* */ \n/* 1924 */ int ATTEMPT_NUMBER_OF_TIMES = 25;\n/* */ \n/* 1926 */ if (attempts < 25) {\n/* */ \n/* 1928 */ logger.fine(\"Failing roll number \" + attempts + \"/\" + '\\031' + \" and trying again.\");\n/* 1929 */ return getRandomTarget(attempts + 1, templateId, itemList);\n/* */ } \n/* */ \n/* */ \n/* 1933 */ logger.info(\"Failing roll of finding structure with templateID=\" + templateId + \" completely, could not find any mission structure not in a village in \" + '\\031' + \" tries.\");\n/* */ \n/* 1935 */ return -1L;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1943 */ catch (NoSuchItemException noSuchItemException) {}\n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* */ \n/* */ \n/* 1951 */ logger.warning(\"WURMID was null for item with templateId=\" + templateId);\n/* 1952 */ return -1L;\n/* */ }\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 1958 */ logger.info(\"Couldn't find any items with itemtemplate=\" + templateId + \" failing, the roll.\");\n/* 1959 */ return -1L;\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 1964 */ return itemFound;\n/* */ }", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "Chromosome getRandom();", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void nextStep() {\n\t\tif (this.oldX == this.coord.x && this.oldY == this.coord.y) { \r\n\t\t\tthis.currentPoint = (int) (Math.random()*this.patrol.size());\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\r\n\t\t}\r\n\r\n\t\t// target point reached, make new random target point\r\n\t\tif (this.targetX == this.coord.x && this.targetY == this.coord.y) {\r\n\t\t\tif (this.currentPoint < patrol.size() - 1)\r\n\t\t\t\tthis.currentPoint++;\r\n\t\t\telse\r\n\t\t\t\tthis.currentPoint = 0;\r\n\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\t\t}\r\n\t\tint step = (this.speed == Speed.fast ? 8 : 4);\r\n\t\t// int stepX = (int) (1 + Math.random() * step);\r\n\t\t// int stepY = (int) (1 + Math.random() * step);\r\n\t\tint x0 = (int) (this.coord.getX());\r\n\t\tint y0 = (int) (this.coord.getY());\r\n\r\n\t\tint dx = this.targetX - x0;\r\n\t\tint signX = Integer.signum(dx); // get the sign of the dx (1-, 0, or\r\n\t\t\t\t\t\t\t\t\t\t// +1)\r\n\t\tint dy = this.targetY - y0;\r\n\t\tint signY = Integer.signum(dy);\r\n\t\tthis.nextX = x0 + step * signX;\r\n\t\tthis.nextY = y0 + step * signY;\r\n\t\tthis.oldX = this.coord.x;\r\n\t\tthis.oldY = this.coord.y;\r\n\t\t// System.err.println(\"targetX,targetY \"+targetX+\" \"+targetY);\r\n\t}", "public int getBlockTextureFromSideAndMetadata(int par1, int par2)\n {\n par2 &= 3;\n return par2 == 1 ? 63 : (par2 == 2 ? 79 : (par2 == 3 ? 30 : super.getBlockTextureFromSideAndMetadata(par1, par2)));\n }", "private Point[] moveCars(ParkingLot p)\r\n {\r\n ArrayList<Point> emptySpots = new ArrayList<>();\r\n ArrayList<Point> oneSpotTaken = new ArrayList<>();\r\n for(int i = 0; i < p.getTotalRow(); i++){\r\n for(int j = 0; j < p.getTotalColumn(); j++){\r\n if(!p.getOccupany(i,j)){\r\n emptySpots.add(new Point(i,j));\r\n }else{\r\n if(p.getSpotInfo(i,j).getVehicle().getSpotsTaken() == 1){\r\n oneSpotTaken.add(new Point(i,j));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if(oneSpotTaken.size() <= 1){\r\n System.out.println(\"There are not enough spots in this lot to park this car.\");\r\n return null;\r\n }\r\n\r\n Random rand = new Random();\r\n Point randomPoint = emptySpots.get(rand.nextInt(emptySpots.size()));\r\n\r\n if(((int)randomPoint.getY()-1) >= 0 && oneSpotTaken.contains(new Point((int)randomPoint.getX(),(int)randomPoint.getY()-1))){\r\n emptySpots.remove(randomPoint);\r\n Point newEmpty = emptySpots.get(rand.nextInt(emptySpots.size()));\r\n p.setSpot((int)newEmpty.getX(),(int)newEmpty.getY(),p.getSpotInfo((int)randomPoint.getX(),(int)randomPoint.getY()-1));\r\n p.setSpot((int)randomPoint.getX(),(int)randomPoint.getY()-1,null);\r\n return new Point[]{new Point((int)randomPoint.getX(),((int)randomPoint.getY()-1)),randomPoint};\r\n }else if((int)randomPoint.getY()+1 <= p.getTotalColumn()-1 && oneSpotTaken.contains(new Point((int)randomPoint.getX(),(int)randomPoint.getY()+1))){\r\n emptySpots.remove(randomPoint);\r\n Point newEmpty = emptySpots.get(rand.nextInt(emptySpots.size()));\r\n p.setSpot((int)newEmpty.getX(),(int)newEmpty.getY(),p.getSpotInfo((int)randomPoint.getX(),(int)randomPoint.getY()+1));\r\n p.setSpot((int)randomPoint.getX(),(int)randomPoint.getY()+1,null);\r\n return new Point[]{randomPoint,new Point((int)randomPoint.getX(),((int)randomPoint.getY()+1))};\r\n }else{\r\n return moveCars(p);\r\n }\r\n }", "public static Vector2D getRandInPoint(Bounds rect)\n\t{\n\t\tfloat x = getRandomFloat(rect.getX(), rect.getX() + rect.getWidth());\n\t\tfloat y = getRandomFloat(rect.getY(), rect.getY() + rect.getHeight());\n\t\treturn new Vector2D(x, y);\n\t}", "public void addSpawnPoint(float pX, float pY, float pZ,float defaultRot, boolean playerSpawn) {\n //this.testTerrain.setBlockArea( new Vector3Int(5,0,47), new Vector3Int(2,1,2), CubesTestAssets.BLOCK_WOOD);\n Geometry spawnBox = new Geometry(\"Spawn\",new Box(1,2,1));\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\"); \n \n if(playerSpawn) {\n //If playerSpawn == true, set the global spawn point\n this.spawnPoint = new Node(\"Player Spawn Point\");\n this.spawnPoint.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0,0,1,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n this.spawnPoint.attachChild(spawnBox);\n rootNode.attachChild(this.spawnPoint);\n this.spawnPoint.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(this.spawnPoint);\n } else {\n //If playerSpawn == false, add a mob spawn point\n Node spawn = new Node(\"Mob Spawn Point\");\n spawn.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0.5f,0.5f,0.5f,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n spawn.attachChild(spawnBox);\n rootNode.attachChild(spawn);\n spawn.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(spawn);\n }\n \n }", "public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\n {\n return par9;\n }", "public boolean canCoordinateBeSpawn(int par1, int par2)\n {\n return false;\n }", "public static float[] trilaterate(float[] p1, float r1, float[] p2, float r2, float[] p3, float r3) {\r\n float[] pos = new float[2];\r\n pos[0] = calcX(r1, r2, p2[0]);\r\n pos[1] = calcY(r1, r3, p3[0], p3[1], pos[0]);\r\n return pos;\r\n }", "public Player getRandomTarget() {\n\t\tPlayer target = null;\n\t\tint rand = Battleground.getRandomNumber(1, 5);\n\t\tswitch (rand) {\n\t\tcase 1:\n\t\t\tif (Battleground.captainAmerica.stillAlive()) {\n\t\t\t\ttarget = Battleground.captainAmerica;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 2:\n\t\t\tif (Battleground.hawkeye.stillAlive()) {\n\t\t\t\ttarget = Battleground.hawkeye;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 3:\n\t\t\tif (Battleground.blackWidow.stillAlive()) {\n\t\t\t\ttarget = Battleground.blackWidow;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 4:\n\t\t\tif (Battleground.hulk.stillAlive()) {\n\t\t\t\ttarget = Battleground.hulk;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 5:\n\t\t\tif (Battleground.thor.stillAlive()) {\n\t\t\t\ttarget = Battleground.thor;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\ttarget = Battleground.captainAmerica;\n\t\t\tbreak;\n\t\t}\n\t\treturn target;\n\t}", "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void generateNether(World world, Random random, int i, int j) {\n\n\t}", "TrgPlace getTarget();", "public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)\n {\n return par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true) ? true : (par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) ? true : (par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) ? true : (par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) ? true : this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))));\n }", "public Point randomLocation() {\r\n\t\tRandom rand = new Random();\r\n\t\treturn new Point(this.location.getPosition().getX()+ rand.nextInt() % location.getSize().getHeight(),this.location.getPosition().getY()+ rand.nextInt() % location.getSize().getWidth());\r\n\t}", "@Override\r\n\tpublic Maze3d generate(int x, int y, int z) {\r\n\r\n\t\tif(x <= 0 || y <= 0 || z <= 0)\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t\r\n\t\t// Creates a maze full with walls\r\n\t\tMaze3d maze3d = new Maze3d(x, y, z);\r\n\t\tmaze3d.fillWalls();\r\n\t\t\r\n\t\tArrayList<Position> cells = new ArrayList<Position>();\r\n\t\t\r\n\t\t// Sets the starting position and add it to cells\r\n\t\tPosition p = getEntrance(maze3d);\r\n\t\tmaze3d.setStartPosition(p);\r\n\t\tcells.add(p);\r\n\t\t// Determines cell choose method\r\n\t\tint chooseMethod = rand.nextInt(2);\r\n\t\tChooser c;\r\n\t\tif(chooseMethod == 0)\r\n\t\t\tc = new MazeLastCellChooser();\r\n\t\telse\r\n\t\t\tc = new MazeRandomCellChooser();\r\n\t\t\r\n\t\t// Maze generation algorithm\r\n\t\twhile(!cells.isEmpty()){\r\n\t\t\tp = c.choose(cells);\r\n\t\t\tArrayList<Position> unvisited = getUnivisitedNeighbors(maze3d, p);\r\n\t\t\tif(unvisited.isEmpty()){\r\n\t\t\t\tmaze3d.setCell(p);\r\n\t\t\t\tcells.remove(p);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Chooses a random neighbor and carves a passage into it\r\n\t\t\t\tPosition neighbor = unvisited.get(rand.nextInt(unvisited.size()));\r\n\t\t\t\t\r\n\t\t\t\tcarve(maze3d, p, neighbor);\r\n\t\t\t\tcells.add(neighbor);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Sets entrance and exit\r\n\t\tmaze3d.setGoalPosition(getExit(maze3d));\r\n\t\treturn maze3d;\r\n\t}", "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 }", "public MovingObjectPosition rayTraceEntities(World world, Vector3 target)\n {\n MovingObjectPosition pickedEntity = null;\n Vec3 startingPosition = this.toVec3();\n Vec3 look = target.toVec3();\n double reachDistance = this.distance(target);\n Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance);\n\n double checkBorder = 1.1 * reachDistance;\n AxisAlignedBB boxToScan = AxisAlignedBB.getAABBPool().getAABB(-checkBorder, -checkBorder, -checkBorder, checkBorder, checkBorder, checkBorder).offset(this.x, this.y, this.z);\n\n @SuppressWarnings(\"unchecked\")\n List<Entity> entitiesHit = world.getEntitiesWithinAABBExcludingEntity(null, boxToScan);\n double closestEntity = reachDistance;\n\n if (entitiesHit == null || entitiesHit.isEmpty())\n {\n return null;\n }\n for (Entity entityHit : entitiesHit)\n {\n if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null)\n {\n float border = entityHit.getCollisionBorderSize();\n AxisAlignedBB aabb = entityHit.boundingBox.expand(border, border, border);\n MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, reachPoint);\n\n if (hitMOP != null)\n {\n if (aabb.isVecInside(startingPosition))\n {\n if (0.0D < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n if (pickedEntity != null)\n {\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = 0.0D;\n }\n }\n }\n else\n {\n double distance = startingPosition.distanceTo(hitMOP.hitVec);\n\n if (distance < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = distance;\n }\n }\n }\n }\n }\n return pickedEntity;\n }", "public Point()\n {\n x = -100 + (int) (Math.random() * ((100 - (-100)) + 1)); \n y = -100 + (int) (Math.random() * ((100 - (-100)) + 1));\n //x = (int) (Math.random()); \n //y =(int) (Math.random());\n pointArr[0] = 1;\n pointArr[1] = x;\n pointArr[2] = y;\n //If the point is on the line, is it accepted? I counted it as accepted for now\n if(y >= 3*x){\n desiredOut = 1;\n }\n else\n {\n desiredOut = 0;\n }\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\r\n/* 171: */ {\r\n/* 172:193 */ if (par9 < 12) {\r\n/* 173:194 */ return ForgeDirection.OPPOSITES[par5] + par9 & 0xF;\r\n/* 174: */ }\r\n/* 175:196 */ return par9 & 0xF;\r\n/* 176: */ }", "Point2i getFreeRandomPosition() {\n\t\tPoint2i p = new Point2i();\n\t\tint i = 0;\n\t\tint max = this.grid.getWidth() * this.grid.getHeight();\n\t\tdo {\n\t\t\tp.set(\n\t\t\t\t\tRandomNumber.nextInt(this.grid.getWidth()),\n\t\t\t\t\tRandomNumber.nextInt(this.grid.getHeight()));\n\t\t\t++i;\n\t\t}\n\t\twhile (!isFree(p.x(), p.y()) && i < max);\n\t\treturn (isFree(p.x(), p.y())) ? p : null;\n\t}", "public void posiziona_bersaglio() {\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_x = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_x<102 || bersaglio_x>LARGHEZZA);\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_y = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_y<102 || bersaglio_y>ALTEZZA);\n //System.out.println (\"x : \"+bersaglio_x+\" y : \"+bersaglio_y);\n }", "private Position3D ChooseNeighbor(ArrayList<Position3D> neighbors) {\n int rand= Ran.nextInt(neighbors.size());\n Position3D Neighbor = neighbors.get(rand);\n neighbors.remove(rand);\n return Neighbor;\n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "void postGen(World world, int x, int y, int z);", "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Point3D(0, 2, -10));\n list.add(new Point3D(0.5, 0, -100));\n\n assertEquals(list.get(2), ray.findClosestPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<Point3D> list2 = null;\n assertNull(\"try again\",ray.findClosestPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<Point3D> list3 = new LinkedList<Point3D>();\n list3.add(new Point3D(0, 2, -10));\n list3.add(new Point3D(-1, 1, -99));\n list3.add(new Point3D(1, 1, -100));\n list3.add(new Point3D(0.5, 0, -100));\n assertEquals(list3.get(0), ray.findClosestPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<Point3D> list4 = new LinkedList<Point3D>();\n list4.add(new Point3D(1, 1, -100));\n list4.add(new Point3D(0.5, 0, -100));\n list4.add(new Point3D(-1, 1, -99));\n list4.add(new Point3D(0, 2, -10));\n assertEquals(list4.get(3), ray.findClosestPoint(list4));\n\n }", "private long getRandomDestination() {\n long randomId;\n do {\n randomId = nextLong(aggregateVertices);\n } while (!destVertices.add(randomId));\n return randomId;\n }", "@Test\n\tpublic void selectTargetLocation() {\n\t\tboard.findAllTargets(playerComputer.getCurrentLocation(), 6);\n\t\tSet<BoardCell> targets = board.getTargets();\n\t\t\n\t\t//Tests to make sure the computers chosen cell is in targets\n\t\tBoardCell cell = ((computerPlayer) playerComputer).pickLocation(targets);\n\t\tassertTrue(targets.contains(cell));\n\t\t\n\t\t//This test ensures that if there is a room that hasn't been visited the computer picks that cell\n\t\tIterator<BoardCell> iterator = targets.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tBoardCell cell2 = iterator.next();\n\t\t\tif(cell2.isRoom()) {\n\t\t\t\tif(cell2.getInitial() != ((computerPlayer) playerComputer).getLastVisited()) {\n\t\t\t\t\tassertEquals(cell2.getInitial(), cell.getInitial());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void spawnAtRandomLocation(World world, GameObject gameObject) {\n spawnAtRandomLocation(world, gameObject, 0.5);\n }", "@Override\r\n\tpublic Maze3d generate(int x_axis, int y_axis, int z_axis, IPickCellStrategy pickStrategy) {\r\n\t\tMaze3d maze = new Maze3d(x_axis, y_axis, z_axis);\r\n\t\tPickStrategy = pickStrategy;\r\n\t\t//step 1\r\n\t\t//Let listOfCells be a list of cells, initially empty\r\n\t\tSystem.out.println(\"Starting Growing Tree Maze3d Generator. TotalX = \" + maze.getX_axis() + \"TotalY = \" + maze.getY_axis() + \"TotalZ = \" + maze.getZ_axis());\r\n\t\tList<Position> listOfCells = new ArrayList<Position>();\r\n\t\t\r\n\t\t//step 2\r\n\t\t//Add one cell to C, at random\r\n\t\tRandom rand = new Random(); \r\n\t\tint x = randOddNumber(maze.getX_axis());\r\n\t\tint y = randOddNumber(maze.getY_axis()); \r\n\t\tint z = randOddNumber(maze.getZ_axis()); \t\t\r\n\t\tlistOfCells.add(new Position(x,y,z));\r\n\t\tSystem.out.println(\"Random start = \" + listOfCells.get(0).toString());\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t//Repeat steps 3-4 until C is empty\r\n\t\twhile(listOfCells.isEmpty() == false){\r\n\t\t\t//step 3\r\n\t\t\t//Choose a cell c from C\r\n\t\t\tPosition chosenCell = PickStrategy.Pick(listOfCells);\r\n\t\t\t\r\n\t\t\t//step 4\r\n\t\t\t//If c has unvisited neighbors:\r\n\t\t\t//Choose an unvisited neighbor of cell c. Call it neighborCell\r\n\t\t\tList<Position> listOfUnvisitedNeighbors = maze.getUnvisitedNeighbors(chosenCell);\r\n\t\t\tif(listOfUnvisitedNeighbors.isEmpty() == false){\r\n\t\t\t\tPosition unvisitedNeighbor = listOfUnvisitedNeighbors.get(rand.nextInt(listOfUnvisitedNeighbors.size()));\r\n\t\t\t\tmaze.RemoveWallBetweenCells(chosenCell, unvisitedNeighbor);\r\n\t\t\t\tlistOfCells.add(unvisitedNeighbor);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tlistOfCells.remove(chosenCell);\r\n\t\t}\r\n\t\t\r\n\t\t//Generate entrance and exit\r\n\t\tboolean foundStart= false;\r\n\t\tboolean foundEnd= false;\r\n\t\tList<Position> temp = null;\r\n\t\t\r\n\t\tfor (int m = 1; m < maze.getX_axis()-1; m=m+2) {\r\n\t\t\tfor (int n = 1; n < maze.getY_axis()-1; n=n+2) {\r\n\t\t\t\tif (maze.getValueAt(m,n,1) == 0 && !foundStart)\r\n\t\t\t\t{\r\n\t\t\t\t\tmaze.setStartPosition(new Position(m,n,1));\r\n\t\t\t\t\tfoundStart = true;\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int m = 1; m < maze.getX_axis()-1; m=m+2) {\r\n\t\t\tfor (int n = 1; n < maze.getY_axis()-1; n=n+2) {\r\n\t\t\t\tif (maze.getValueAt(m,n,maze.getZ_axis()-2) == 0 && !foundEnd)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tmaze.setGoalPosition(new Position(m,n,maze.getZ_axis()-2));\r\n\t\t\t\t\tfoundEnd = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maze;\r\n\t}", "public void spawn(double minimumY, double maximumY, double minimumX, double maximumX) {\r\n\r\n double startingY = minimumY + (maximumY - minimumY) * Math.random();\r\n double startingX = minimumX + (maximumX - minimumX) * Math.random();\r\n\r\n y = startingY;\r\n x = startingX;\r\n\r\n }", "void position(double x, double y, double z);", "public void speedRange3()\n\t{\n\t\trange = (gen.nextInt(upper3 - lower3)+1) + lower3;\n\t\tspeedBalloonY3 = range;\n\t}", "private void determineStartingLocation(Car carOne, Car carTwo, Car carThree) {\n ArrayList<Integer> locationPlaces = new ArrayList<Integer>();\n locationPlaces.add(1);// 0\n locationPlaces.add(2);// 1\n locationPlaces.add(3);// 2\n locationPlaces.add(4);// 3\n\n Collections.shuffle(locationPlaces);\n\n carOne.setLocation(locationPlaces.get(0));\n carTwo.setLocation(locationPlaces.get(1));\n carThree.setLocation(locationPlaces.get(2));\n }", "public static final int getTargetItemPlacement(int missionId) {\n/* 999 */ Random r = new Random(missionId);\n/* 1000 */ return r.nextInt(8);\n/* */ }", "@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }", "public Point3 getPoint(int pointNr);", "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}", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "private List<BlockPoint> chooseFurthestPoints(List<BlockPoint> originalPoints){\n if(plattformsPerChunk <= 0 || plattformsPerChunk > originalPoints.size()){\n throw new IllegalArgumentException(\"plattformsPerChunk can not be negative or larger than originalPoints\");\n\t}\n\tList<BlockPoint> startingPoints = new ArrayList<>(originalPoints);\n List<BlockPoint> chosenPoints = new ArrayList<>();\n\tint randomIndex = random.nextInt(startingPoints.size()-1);\n\t// Add the random starting position\n chosenPoints.add(startingPoints.get(randomIndex));\n // Remove it from the list since we can't add the same point many times\n\tstartingPoints.remove(randomIndex);\n\n\t// Choose \"plattformsPerChunk - 1\" amount of plattforms other than the starting point\n\tfor(int i = 0; i < plattformsPerChunk-1; i++){\n\t\tif(startingPoints.isEmpty()){\n\t\t break;\n\t\t}\n\n\t // Set every consideredPositions weight to its lowest distance\n\t // to any considered node\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tdouble globalMinDist = INFINITY;\n\t\tfor(BlockPoint chosenPos : chosenPoints){\n\t\t double currentMinDist = consideredPos.distanceTo(chosenPos);\n\t\t if(currentMinDist < globalMinDist){\n\t\t\tglobalMinDist = currentMinDist;\n\t\t }\n\t\t}\n\t\tconsideredPos.weight = globalMinDist;\n\t }\n\n\t // Choose the position with the highest weight and add/remove it.\n\t // This means choose the point with largest min distance\n\t double highestMinDist = -1;\n\t BlockPoint chosenPoint = null;\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tif(highestMinDist < consideredPos.weight){\n\t\t highestMinDist = consideredPos.weight;\n\t\t chosenPoint = consideredPos;\n\t\t}\n\t }\n\t assert chosenPoint != null;\n\t chosenPoints.add(chosenPoint.copy());\n\t startingPoints.remove(chosenPoint);\n\t}\n\treturn chosenPoints;\n }", "private PointF getRandCoordinate() {\n Random r = new Random();\n float xRand = (r.nextInt(getWidth()) / density) + 1;\n float y = 10 / density;\n\n return new PointF(xRand, y);\n }", "public static Block[] getRandomBlocksInSetRange(World world, int x, int y, int z, int range, int passes)\n {\n return getRandomBlocksInSetRangeWithRandomChance(world, x, y, z, range, passes, 4);\n }", "private static Point3d[] solve(double targetArea) {\n // First rotate along the z axis, from 0 degrees to 45 degrees for areas from 1 to sqrt(2)\n Point3d[] centers = new Point3d[] {\n new Point3d(0.5, 0, 0),\n new Point3d(0, 0.5, 0),\n new Point3d(0, 0, 0.5)\n };\n if (searchRotationAngle(centers, 2, Math.PI / 4, targetArea)) return centers;\n // For areas greater than sqrt(2), keep the cube rotated by 45 degrees along\n // the z axis and rotate from 0 degrees to ~35.26 degrees along the x axis.\n // The latter angle is the one required to align vertically the top\n // and bottom opposite vertices.\n if (searchRotationAngle(centers, 0, Math.PI / 2 - Math.atan(Math.sqrt(2)), targetArea)) return centers;\n throw new IllegalStateException(\"Unable to find a rotation for target area \" + targetArea);\n }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec, Random paramRandom)\r\n/* 39: */ {\r\n/* 40: 54 */ if (paramaqu.isClient) {\r\n/* 41: 55 */ return;\r\n/* 42: */ }\r\n/* 43: 58 */ if ((paramaqu.l(paramdt.up()) < 4) && (paramaqu.getBlock(paramdt.up()).getType().getLightOpacity() > 2))\r\n/* 44: */ {\r\n/* 45: 59 */ paramaqu.setBlock(paramdt, BlockList.dirt.instance());\r\n/* 46: 60 */ return;\r\n/* 47: */ }\r\n/* 48: 63 */ if (paramaqu.l(paramdt.up()) >= 9) {\r\n/* 49: 64 */ for (int i = 0; i < 4; i++)\r\n/* 50: */ {\r\n/* 51: 65 */ BlockPosition localdt = paramdt.offset(paramRandom.nextInt(3) - 1, paramRandom.nextInt(5) - 3, paramRandom.nextInt(3) - 1);\r\n/* 52: 66 */ BlockType localatr = paramaqu.getBlock(localdt.up()).getType();\r\n/* 53: 67 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 54: 68 */ if ((localbec.getType() == BlockList.dirt) && (localbec.getData(BlockDirt.a) == avd.a) && (paramaqu.l(localdt.up()) >= 4) && (localatr.getLightOpacity() <= 2)) {\r\n/* 55: 69 */ paramaqu.setBlock(localdt, BlockList.grass.instance());\r\n/* 56: */ }\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ }", "public Critter(){\n\tthis.x_location = (int) (Math.random()*99);\n\tthis.y_location = (int) (Math.random()*99);\n\tthis.wrap();\n\t}", "Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);", "public Point randomPoint() \t // creates a random point for gameOjbects to be placed into\r\n\t{\n\t\tint x = rand.nextInt(900);\r\n\t\tx = x + 50;\r\n\t\tint y = rand.nextInt(900);\r\n\t\ty = y + 50;\r\n\t\tPoint p = new Point(x, y);\r\n\t\treturn p;\r\n\t}", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "int getYForHive(World world, int x, int z);", "private int getCrossoverPoint(int mode) {\n int cPoint = 0;\n\n switch (mode) {\n case Defines.CP_PURE_RANDOM:\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n break;\n\n case Defines.CP_NO_BOUNDARY:\n do {\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n } while (cPoint % Defines.GROUP_SIZE == 0 || cPoint % Defines.GROUP_SIZE == 3);\n break;\n }\n\n return cPoint;\n }", "protected boolean teleportRandomly() {\n double x = this.posX + (this.rand.nextDouble() - 0.5) * 64.0;\n double y = this.posY + (this.rand.nextInt(64) - 32);\n double z = this.posZ + (this.rand.nextDouble() - 0.5) * 64.0;\n return this.teleportTo(x, y, z);\n }", "public XzPair structurePosInRegion(long x, long z, long seed){\n rnd.setSeed((long) x * 341873128712L + (long)z * 132897987541L + seed + 10387313);\n return new XzPair((rnd.nextInt(27) + rnd.nextInt(27)) / 2 , (rnd.nextInt(27) + rnd.nextInt(27)) / 2);\n }", "private void setupEnemySpawnPoints() {\n float ring = ProtectConstants.VIEWPORT_WIDTH / 2 + (ProtectConstants.GAME_OBJECT_SIZE * 2);\n float angle = 18; // start angle\n for(int i = 1; i < ProtectConstants.COLUMNS + 1; i++){\n enemySpawnPoints.add(divideCircle(ring, angle));\n angle += 360 / ProtectConstants.COLUMNS;\n }\n enemySpawnPoints.shuffle();\n }" ]
[ "0.6533194", "0.56800735", "0.5624581", "0.55869186", "0.5585193", "0.55059713", "0.55022484", "0.5490506", "0.5468203", "0.54541874", "0.5447594", "0.54396707", "0.5429976", "0.5402085", "0.53806466", "0.53699046", "0.53469855", "0.5345805", "0.53452694", "0.5318833", "0.5291508", "0.5289947", "0.52409834", "0.5233399", "0.52126396", "0.51904386", "0.5147546", "0.5147358", "0.51324564", "0.5132163", "0.51298434", "0.51215434", "0.5115969", "0.51146644", "0.5101536", "0.5101107", "0.50966805", "0.5093289", "0.5071025", "0.50493026", "0.5044027", "0.5033264", "0.5031591", "0.50263333", "0.50136465", "0.5006347", "0.5000953", "0.49860218", "0.49763712", "0.49645588", "0.4959689", "0.4952769", "0.49511635", "0.49454045", "0.49310082", "0.49290636", "0.49245256", "0.49237728", "0.49127275", "0.49077523", "0.48956984", "0.489511", "0.48933", "0.48856917", "0.48619524", "0.4860501", "0.48396367", "0.48364013", "0.48338494", "0.48314512", "0.48307443", "0.48208138", "0.48114827", "0.48084965", "0.47982433", "0.47981086", "0.47958964", "0.47913715", "0.47895026", "0.478829", "0.47815773", "0.47815144", "0.47761804", "0.477395", "0.476897", "0.47663322", "0.47634023", "0.47595108", "0.47583902", "0.47528857", "0.47503927", "0.4748773", "0.47462928", "0.4745952", "0.4741986", "0.47385767", "0.47383392", "0.47334984", "0.47263837", "0.47201422" ]
0.6389074
1
TODO Autogenerated method stub
@Override public void onReceive(Context context, Intent intent) { Log.e("m", "com.airtalkee.receiver onReceive"); if (intent.getAction().equals(ACTION_VOICE_LONG_PRESS)) { if (intentFilter == null) intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); context.registerReceiver(instance, intentFilter); } else if (intent.getAction().equals(ACTION_VOICE_UP)) { } else if (intent.getAction().equals(ACTION_KNOB_ADD)) { AirSessionControl.getInstance().channelSelect(true); } else if (intent.getAction().equals(ACTION_KNOB_SUB)) { AirSessionControl.getInstance().channelSelect(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
Initializes an instance of ImageModerationsInner.
public ImageModerationsInner(Retrofit retrofit, ContentModeratorClientImpl client) { this.service = retrofit.create(ImageModerationsService.class); this.client = client; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "private Images() {}", "public ImageSection() { // required by the SessionLoader (should not be used elsewhere)\n hasImage = new HasImage();\n }", "protected Builder() {\n super(new ImageStatisticsElementGroupElementImages());\n }", "public JImageEditor() {\n initComponents();\n \n m_Img = null;\n m_maxsize = null;\n m_icon = new ZoomIcon();\n m_jImage.setIcon(m_icon);\n m_jPercent.setText(m_percentformat.format(m_icon.getZoom()));\n privateSetEnabled(isEnabled());\n }", "public ImageEditor() {\r\n initComponents(); \r\n }", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}", "public ImageHandler(Group nGroup){\n\t /* Set up the group reference */\n\t\tgroup = nGroup;\n\t\t\n\t\t/* Instantiate the list of images */\n\t\timages = new ArrayList<ImageView>();\n\t}", "public ImageContent() {\n }", "public ImageList() {\n\t\timageList = new ImageIcon[] { ImageList.BALLOON, ImageList.BANANA, ImageList.GENIE, ImageList.HAMSTER,\n\t\t\t\tImageList.HEART, ImageList.LION, ImageList.MONEY, ImageList.SMOOTHIE, ImageList.TREE, ImageList.TRUCK };\n\t}", "public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}", "public RatingCell() {\n if (renderer == null) {\n renderer = new ImageResourceRenderer();\n }\n }", "public ImageGridFragment() {\n\t}", "public ImageGridFragment() {\n\t}", "public void init(Context mContext)\n {\n if(mImageRepository!=null)\n {\n return;\n }\n\n mImageRepository=ImageRepository.getInstance(mContext);\n\n //getting list from mImageRepository\n mImagesList=mImageRepository.getImageList();\n }", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\n\t}", "private ImageLoader() {}", "private void initImageLoader() {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(this);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }", "private void init() {\n initActionButton();\n mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));\n mAdapter = new MainAdapter(getApplicationContext(),getImages());\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.setListener(new MainAdapter.OnClickListener() {\n @Override\n public void onClickItem(ImageItem selected, int position) {\n goToDetailScreen(position);\n }\n });\n }", "private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }", "public void initImageLoader() {\n if (!ImageLoader.getInstance().isInited()) {\n ImageLoaderConfiguration config = ImageLoaderConfiguration.createDefault(getActivity().getApplicationContext());\n ImageLoader.getInstance().init(config);\n }\n }", "private void initializeImageModels() {\n for(ImageModel model : GalleryFragment.listImageModel){\n imgList.add(model.getImagePath());\n }\n }", "public ImageController() {\n em = EMF.createEntityManager();\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 Image() {\n \n }", "public ImageModerationResponse(ImageModerationResponse source) {\n if (source.Suggestion != null) {\n this.Suggestion = new String(source.Suggestion);\n }\n if (source.PornResult != null) {\n this.PornResult = new PornResult(source.PornResult);\n }\n if (source.TerrorismResult != null) {\n this.TerrorismResult = new TerrorismResult(source.TerrorismResult);\n }\n if (source.PoliticsResult != null) {\n this.PoliticsResult = new PoliticsResult(source.PoliticsResult);\n }\n if (source.Extra != null) {\n this.Extra = new String(source.Extra);\n }\n if (source.DisgustResult != null) {\n this.DisgustResult = new DisgustResult(source.DisgustResult);\n }\n if (source.RequestId != null) {\n this.RequestId = new String(source.RequestId);\n }\n }", "private void initializeRecyclerView() {\n if (mImages != null) {\n if (mImages.size() > 0) {\n mImagesRecyclerView.setBackground(null);\n } else {\n mImagesRecyclerView.setBackgroundResource(R.drawable.placeholder_image);\n }\n\n mImagesRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));\n\n mAdapter = new ImagesRecyclerViewAdapter(this, mImages, mImageDescription, this);\n mImagesRecyclerView.setAdapter(mAdapter);\n }\n }", "public ImageLevel(Context context, AttributeSet attr) \n\t{\n\t\tsuper(context, attr);\n\t\t\n\t\tResources res = getResources();\n\t\t\n\t\t// Acquiring image dimension from resources\n\t\tmThumbnailWidth = (int)res.getDimension(R.dimen.thumbnailWidth);\n\t\tmThumbnailHeight = (int)res.getDimension(R.dimen.thumbnailHeight);\n\t\t\n\t\tmMemberLevel = MemberLevel.MemberLevels.eMemberLevelBase;\n\t\tmCurrentImage = new ImageView(getContext());\n\t\tmCurrentImage.setScaleType(ImageView.ScaleType.FIT_CENTER);\n\t\tmCurrentImage.setMaxWidth(mThumbnailWidth);\n\t\tmCurrentImage.setMaxHeight(mThumbnailHeight);\n\t\t\n\t\t// Acquiring first image from resource\n\t\tmBackImage = ((BitmapDrawable)res.getDrawable(R.drawable.smiley)).getBitmap();\n\t\t\n\t\tif (mBackImage != null)\n\t\t{\n\t\t\tLog.v(LOG_TAG, \"Drawing image.\");\n\t\t\tdrawThumbnail();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLog.e(LOG_TAG, \"Initial bitmap not found\");\n\t\t}\n\t\t\n\t\taddView(mCurrentImage\n\t\t\t , new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)\n\t\t\t );\t\t\n\t\t\n\t}", "public Image() {\n }", "public void init() {\n initLayers();\n for (int i = 0; i < indivCount; i++) {\n ArrayList<Layer> iLayers = new ArrayList<>();\n for (Layer l : layers)\n iLayers.add(l.cloneSettings());\n individuals[i] = new Individual(iLayers);\n }\n }", "public static void initImageLoader() {\n }", "private void initData() {\n\t\tmImageLoader = VolleyUtil.getInstance(this).getImageLoader();\n\t\tmNetworkImageView.setImageUrl(Pictures.pictures[3], mImageLoader);\n\t\tmNetworkImageView.setErrorImageResId(R.drawable.ic_pic_error);\n\t\tmNetworkImageView.setDefaultImageResId(R.drawable.ic_pic_default);\n\t}", "private void initImageLoader() {\n UniversalImageLoader universalImageLoader = new UniversalImageLoader(mContext);\n ImageLoader.getInstance().init(universalImageLoader.getConfig());\n }", "private void init() {\n mWallpaperRecycler.setLayoutManager(new GridLayoutManager(getContext(), 2));\n mWallpaperRecycler.setHasFixedSize(true);\n mWallpaperAdapter = new WallpaperAdapter(getContext(), mEmptyView, this);\n mWallpaperRecycler.setAdapter(mWallpaperAdapter);\n\n\n mPresenter = new TrendingWallpapersPresenterImpl(\n ThreadExecutor.getInstance(),\n MainThreadImpl.getInstance(),\n this,\n mUnsplashRepository);\n }", "public Gallery() {\r\n }", "public static Builder newElementGroupElementImages() {\n return new Builder();\n }", "private void initAreaImageFilm() {\n\n }", "private void initializeProductReviewImagesAdapter() {\n mProductReviewImagesAdapter = new ProductReviewImagesAdapter(mReviewImages);\n mBinding.rvPdpProductReviewsImages.setAdapter(mProductReviewImagesAdapter);\n }", "public ImagePane() {\r\n\t\tsuper();\r\n\t}", "private void initImages() {\n mImageView1WA = findViewById(R.id.comment_OWA);\n mImageView6DA = findViewById(R.id.comment_btn_6DA);\n mImageView5DA = findViewById(R.id.comment_btn_5DA);\n mImageView4DA = findViewById(R.id.comment_btn_4DA);\n mImageView3DA = findViewById(R.id.comment_btn_3DA);\n mImageView2DA = findViewById(R.id.comment_btn_2DA);\n mImageViewY = findViewById(R.id.comment_btn_1DA);\n\n imageList.add(mImageViewY);\n imageList.add(mImageView2DA);\n imageList.add(mImageView3DA);\n imageList.add(mImageView4DA);\n imageList.add(mImageView5DA);\n imageList.add(mImageView6DA);\n imageList.add(mImageView1WA);\n\n }", "public NestedInteger() {\n this.nestedIntegers = new ArrayList<>();\n }", "public EmbedPhotoFormatter() {\n\t}", "public ImageDisplay()\n\t{\n initComponents();\n }", "private void init() {\n\t\tinitData();\n\t\tmViewPager = (ViewPagerCompat) findViewById(R.id.id_viewpager);\n\t\tnaviBar = findViewById(R.id.navi_bar);\n\t\tNavigationBarUtils.initNavigationBar(this, naviBar, true, ScreenContents.class, false, ScreenViewPager.class,\n\t\t\t\tfalse, ScreenContents.class);\n\t\tmViewPager.setPageTransformer(true, new DepthPageTransformer());\n\t\t// mViewPager.setPageTransformer(true, new RotateDownPageTransformer());\n\t\tmViewPager.setAdapter(new PagerAdapter() {\n\t\t\t@Override\n\t\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\n\t\t\t\tcontainer.addView(mImageViews.get(position));\n\t\t\t\treturn mImageViews.get(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\n\t\t\t\tcontainer.removeView(mImageViews.get(position));\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean isViewFromObject(View view, Object object) {\n\t\t\t\treturn view == object;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn mImgIds.length;\n\t\t\t}\n\t\t});\n\t}", "protected void setUpListOfImageRecyclerView() {\n try {\n\n content_layout.removeAllViews();\n RecyclerView recyclerView = new RecyclerView(getApplicationContext());\n recyclerView.setLayoutParams(\n new ViewGroup.LayoutParams(\n // or ViewGroup.LayoutParams.WRAP_CONTENT\n ViewGroup.LayoutParams.MATCH_PARENT,\n // or ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.MATCH_PARENT));\n\n LinearLayoutManager layoutManager\n = new LinearLayoutManager(getApplicationContext(), LinearLayoutManager.HORIZONTAL, false);\n\n // set main_logo LinearLayoutManager with HORIZONTAL orientation\n recyclerView.setLayoutManager(layoutManager);\n\n // call the constructor of CustomAdapter to send the reference and data to Adapter\n recyclerView.setAdapter(mSelectedImageAdapter); // set the Adapter to RecyclerView\n\n\n content_layout.addView(recyclerView);\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "VirtualMachineExtensionImageInner innerModel();", "public static void init()\n {\n\n addShapeless();\n\n addShaped();\n }", "public YourImage() {\n initComponents();\n }", "public ImageConverter() {\n\t}", "public void init() {\n\t\tBitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.sb_thumb);\n\t\tLinearGradient colorGradient = new LinearGradient(0.f, 0.f, this.getMeasuredWidth() - bitmap.getWidth(), 0.f, new int[] { 0xFF000000,\n\t\t\t\t0xFF0000FF, 0xFF00FF00, 0xFF00FFFF, 0xFFFF0000, 0xFFFF00FF, 0xFFFFFF00, 0xFFFFFFFF }, null, Shader.TileMode.CLAMP);\n\t\tShapeDrawable shape = new ShapeDrawable(new RectShape(mContext));\n\t\tshape.getPaint().setShader(colorGradient);\n\t\tthis.setProgressDrawable(shape);\n\t\tthis.setMax(256 * 7 - 1);\n\t}", "public static void init() {\n MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, ModifiersLoadedEvent.class, e -> INVALIDATION_COUNTER.incrementAndGet());\n }", "public Image()\r\n {\r\n super();\r\n setBounds( 0, 0, 10, 10 );\r\n }", "private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}", "private void initialize() {\r\n // init hidden layers\r\n for (int i = 0; i < neurons.length; i++) {\r\n for (int j = 0; j < neurons[i].length; j++) {\r\n // create neuron\r\n Neuron n = new Neuron(i, bias, this);\r\n neurons[i][j] = n;\r\n Log.log(Log.DEBUG, \"Adding Layer \" + (i + 1) + \" Neuron \" + (j + 1));\r\n }\r\n }\r\n }", "private void setUpImageLoader() {\n\t\tfinal DisplayMetrics displayMetrics = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n\t\tfinal int height = displayMetrics.heightPixels;\n\t\tfinal int width = displayMetrics.widthPixels;\n\n\t\t// For this sample we'll use half of the longest width to resize our images. As the\n\t\t// image scaling ensures the image is larger than this, we should be left with a\n\t\t// resolution that is appropriate for both portrait and landscape. For best image quality\n\t\t// we shouldn't divide by 2, but this will use more memory and require a larger memory\n\t\t// cache.\n\t\tfinal int longest = (height > width ? height : width) / 4;\n\n\t\tImageCache.ImageCacheParams cacheParams =\n\t\t\t\tnew ImageCache.ImageCacheParams(this, IMAGE_CACHE_DIR);\n\t\tcacheParams.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of app memory\n\n\t\timageResizer = new ImageResizer(this, longest);\n\t\timageResizer.addImageCache(getSupportFragmentManager(), cacheParams);\n\t\timageResizer.setImageFadeIn(true);\n\t}", "private void initSocialImageLoader() {\n if (SocialDetailHelper.getInstance().socialImageLoader == null) {\n SocialDetailHelper.getInstance().socialImageLoader = new SocialImageLoader(mContext);\n SocialDetailHelper.getInstance().socialImageLoader.clearCache();\n }\n }", "private void addGeneralInnerImages() {\n\t\tString createNewTooltip =\n\t\t\tI18n.getHierarchyTreeConstants().createNewListFilterTooltip();\n\t\tcreateImage(HierarchyResources.INSTANCE.createNew(), createNewHandler,\n\t\t\tcreateNewTooltip);\n\t\tString saveCurrentTooltip =\n\t\t\tI18n.getHierarchyTreeConstants().saveCurrentListFilterTooltip();\n\t\tcreateImage(HierarchyResources.INSTANCE.saveCurrent(),\n\t\t\tsaveCurrentHandler, saveCurrentTooltip);\n\t}", "public FlickrPhoto() {\r\n }", "private void initialize() {\n setImageResource(R.drawable.content);\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public Image() {\n\t\tsuper();\n\t\taddNewAttributeList(NEW_ATTRIBUTES);\n\t\taddNewResourceList(NEW_RESOURCES);\n\t}", "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 ImagePanel() {\n\t\ttry {\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigorest.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigono.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigolow.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigohigh.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigocondensation.png\").getPath())));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public PhotoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ImageLoader(int threadCount, Type type) {\r\n init(threadCount,type);\r\n }", "@Override\n\tpublic void init() {\n\t\tmaterialImages = new JButton[MaterialState.materialLibrary.size()];\n\t\tmaterialNames = new JLabel[MaterialState.materialLibrary.size()];\n\t\tmaterialAmounts = new JLabel[MaterialState.materialLibrary.size()];\n\t\tmaterialColours = new JLabel[MaterialState.materialLibrary.size()];\n\n\t\ttotalRating = 0;\n\t\ttotalToxic = 0;\n\t\ttotalNegative = 0;\n\t\ttotalDamage = 0;\n\n\t}", "public DocumentBodyBlock image(DocumentBodyImage image) {\n this.image = image;\n return this;\n }", "public Imagen(){\n \n }", "private void initImages() throws SlickException {\n\t\t// laser images\n\t\tlaserbeamimageN = new Image(\"resources/images_Gameplay/laserBeam_Norm.png\");\n\t\tlaserbeamimageA = new Image(\"resources/images_Gameplay/laserBeam_Add.png\");\n\t\tlasertipimageN = new Image(\"resources/images_Gameplay/laserTip_Norm.png\");\n\t\tlasertipimageA = new Image(\"resources/images_Gameplay/laserTip_Add.png\");\n\t}", "private void init() {\n if (mHeadline != null) {\n mHeadlingString = StringEscapeUtils.unescapeHtml4(mHeadline.getMain());\n }\n\n for (ArticleMultimedia multimedia : mMultimedia) {\n if (multimedia.getSubtype().equals(\"thumbnail\")) {\n mThumbnail = getMultimediaUrl(multimedia);\n }\n }\n }", "private void loadNestImageElevations()\n {\n // Load image as resource.\n Image image = null;\n\n try\n {\n image = (Image)ImageIO.read(getClass().getResource(nestImageFile));\n }\n catch (Exception e)\n {\n }\n\n // Load external image file.\n if (image == null)\n {\n try\n {\n image = (Image)ImageIO.read(new File(nestImageFile));\n }\n catch (Exception e)\n {\n }\n }\n\n if (image == null)\n {\n System.err.println(\"Cannot load nest image file \" + nestImageFile);\n return;\n }\n\n // Create cells image.\n int w = size.width;\n int h = size.height;\n int numCellTypes = MAX_ELEVATION + 1;\n float q = 256.0f / (float)numCellTypes;\n Image s = image.getScaledInstance(w, h, Image.SCALE_DEFAULT);\n BufferedImage b = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n Graphics g = b.createGraphics();\n g.drawImage(s, 0, 0, null);\n g.dispose();\n for (int x = 0; x < w; x++)\n {\n for (int y = 0; y < h; y++)\n {\n int cy = (h - 1) - y;\n int t = (int)((float)(b.getRGB(x, y) & 0xFF) / q);\n if (t >= numCellTypes)\n {\n t = numCellTypes - 1;\n }\n cells[x][cy][ELEVATION_CELL_INDEX] = t;\n }\n }\n }", "private ImageUtils() {}", "public ImageThread() {\n\t}", "public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }", "public void initImageLoader(Context context) {\n\n ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)\n .threadPoolSize(1)\n .tasksProcessingOrder(QueueProcessingType.LIFO)\n .diskCacheFileNameGenerator(new Md5FileNameGenerator())\n .threadPriority(Thread.NORM_PRIORITY - 2)\n .denyCacheImageMultipleSizesInMemory()\n .memoryCache(new WeakMemoryCache())\n .build();\n\t\t// Initialize ImageLoader with configuration.\n\t\tImageLoader.getInstance().init(config);\n\t}", "public CollisionManager(){\n\t\tcollidables \t\t= new HashMap<Integer, List<CollidableObject>>() ;\n\t\tcollisionsTypes \t= new HashMap<Integer, List<Integer>>() ;\n\t\tcollisionHandlers \t= new HashMap<String, CollisionHandler>() ;\n\t}", "public void init(boolean isReal, int instanceId) {\n\t\tthis.initWithContentRating(isReal, instanceId, false, true, \"\");\n\t}", "private void init() {\n CycleViewPage page = (CycleViewPage) findViewById(R.id.main_view_page);\n page.setAdapter(new InfiniteImageAdapter(createImages()));\n page.setCurrentItem(Integer.MAX_VALUE / 2);\n page.setCycleSwitch(true);\n }", "public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }", "public void initialize() {\n\t\tinitialiseAvatars();\n\t\tcreateAccountButton.setOnAction(e -> createAccount());\n\t\topenGeneratorButton.setOnAction(e -> openCustomPictureCreator());\n\n\t\tavatar1.setOnAction(e -> updateAvatar(1));\n\t\tavatar2.setOnAction(e -> updateAvatar(2));\n\t\tavatar3.setOnAction(e -> updateAvatar(3));\n\t\tavatar4.setOnAction(e -> updateAvatar(4));\n\t\tavatar5.setOnAction(e -> updateAvatar(5));\n\t\tavatar6.setOnAction(e -> updateAvatar(6));\n\n\t\tavatarIndex = 1;\n\t}", "protected Image(int instance, String context) {\n\tsuper(instance, context);\n\taddObjectTable(fieldTable, null);\n }", "public LogicManager() {\n model = new ModelManager();\n conversationManager = new ConversationManager();\n }", "public NestedInteger() {\n this.list = new ArrayList<>();\n }", "public ImageAdapter(Movies owner) {\n this.mOwner = owner;\n // Refresh data from server\n new RefreshTask(this.mOwner.getApplicationContext()).execute();\n }", "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 }", "private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }", "private void setImageLoader() {\n\t\tif (mContext == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (mContext instanceof BaseActivity) {\n\t\t\tBaseActivity activity = (BaseActivity) mContext;\n\t\t\timageLoader = activity.getImageLoader();\n\t\t}\n\t}", "public interface ImageModListener {\n void setImage(ArrayList<Integer> image);\n }", "public VectorImage() {\n\t}", "public ReorientImageFilter() {\n }", "public ImageDetailFragment() {}", "public PlainImage(Image image) {\r\n\t\tthis.image = image;\r\n\t}", "public void init()\n {\n MyRand.Init();\n // this class knows about how to load images from disk, and\n // stores them by name\n ImageManager imgr = new ImageManager(this);\n\n // --- this next section preloads all images.\n\n // the WoodPieceFactory object knows about the wood piece \n // images\n WoodPieceFactory.Initialize();\n // these are miscellaneous images\n imgr.addImage(\"PirateMousie.png\");\n imgr.addImage(\"PirateMousie2.png\");\n imgr.addImage(\"PirateMousie3.png\");\n imgr.addImage(\"PirateMousie4.png\");\n imgr.addImage(\"SushiWater.png\");\n imgr.addImage(\"Workbench3.png\");\n imgr.addImage(\"Blueprint.png\");\n\n // scroll images.\n String[] scrolls = {\"Blank\",\"Booched\",\"Poor\",\"Fine\",\"Good\",\"Excellent\",\"Incredible\"};\n int i;\n for (i = 0 ; i < scrolls.length ; ++i)\n {\n imgr.addImage(\"Scroll_\" + scrolls[i] + \".png\");\n }\n\n // wait until they load (pretty fast since they are in the same jar.\n while(!imgr.allLoaded())\n ;\n\n System.out.println(\"All Images Loaded\");\n\n // --- this section loads sounds\n SoundManager smgr = new SoundManager(this);\n smgr.addSound(\"piRat_Nom.wav\");\n // wait until sounds load.\n while(!smgr.allSoundsLoaded())\n ;\n\n System.out.println(\"All Sounds Loaded\");\n\n // the card layout is so that we can change from\n // menus to the game board \n setLayout(new CardLayout());\n\n // the control panel embodies and manages all the other\n // panels of the game, drawn as cards onto \n // the applet panel.\n ControlPanel cp = new ControlPanel(this);\n add(cp,\"ControlPanel\");\n }", "public void setImageLoader(ImageLoader imageLoader) {\n/* 248 */ this.loader = imageLoader;\n/* */ }", "private void init() {\n filmCollection = new FilmCollection();\n cameraCollection = new CameraCollection();\n }", "public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}", "private void resultImgInit() {\n resultImgAndLoadingLayout.setX(cornerPositions.getLeftTop().x);\n resultImgAndLoadingLayout.setY(cornerPositions.getLeftTop().y);\n int wight = cornerPositions.getRightBottom().x - cornerPositions.getLeftTop().x + cornerImgSize;\n int height = cornerPositions.getRightBottom().y - cornerPositions.getLeftTop().y + cornerImgSize;\n resultImgAndLoadingLayout.setLayoutParams(new LayoutParams(wight, height));\n }", "private\t\tvoid\t\tinitialize()\n\t\t{\n\t\tif (iterateThroughAllLayers && editor.hasLayers())\n\t\t\t{\n\t\t\thasLayers = true;\n\t\t\tif (!startAtTop)\n\t\t\t\tlayerNum = 0;\n\t\t\telse\n\t\t\t\tlayerNum = editor.getNumberOfLayers() - 1;\n\t\t\t\n\t\t\titerator = new MiContainerIterator(\n\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\titerator = new MiContainerIterator(\n\t\t\t\teditor.getCurrentLayer(), !startAtTop, \n\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts);\n\t\t\t}\n\t\t}", "public NestedInteger() {\n\t\tthis.list = new ArrayList<>();\n\t}" ]
[ "0.56409055", "0.56140316", "0.5610598", "0.55673265", "0.5555221", "0.5447363", "0.54428697", "0.5439326", "0.5344965", "0.53212875", "0.5320531", "0.52985114", "0.52616525", "0.52616525", "0.52477294", "0.52003145", "0.51869893", "0.51845366", "0.5176761", "0.5175184", "0.5160714", "0.5124315", "0.50912946", "0.5088289", "0.50793695", "0.50612646", "0.5057607", "0.5048958", "0.50458133", "0.50277627", "0.50068927", "0.49891374", "0.49757704", "0.4951219", "0.4948575", "0.49279654", "0.49252602", "0.49214384", "0.48883736", "0.48822504", "0.48716417", "0.48552707", "0.48480567", "0.48475906", "0.47782966", "0.47781453", "0.477587", "0.476743", "0.476419", "0.47403666", "0.4738404", "0.4737252", "0.47370604", "0.47291046", "0.47271246", "0.47249094", "0.47227946", "0.47206378", "0.47203296", "0.47200853", "0.471067", "0.470709", "0.4706751", "0.4697616", "0.46918765", "0.46900862", "0.46647686", "0.4658851", "0.4649092", "0.464876", "0.46482864", "0.4639339", "0.46174294", "0.461182", "0.46088624", "0.46074778", "0.4603597", "0.46004355", "0.45917964", "0.45894206", "0.45890692", "0.45882913", "0.45878455", "0.45862982", "0.4581609", "0.45730457", "0.45725265", "0.4571724", "0.4567741", "0.45557663", "0.45529518", "0.45505384", "0.45420986", "0.45346138", "0.45327556", "0.45307422", "0.45293823", "0.4525608", "0.4523524", "0.4523415" ]
0.62965137
0
The interface defining all the services for ImageModerations to be used by Retrofit to perform actually REST calls.
interface ImageModerationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations findFaces" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/FindFaces") Observable<Response<ResponseBody>> findFaces(@Query("CacheImage") Boolean cacheImage, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations oCRMethod" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/OCR") Observable<Response<ResponseBody>> oCRMethod(@Query("language") String language, @Query("CacheImage") Boolean cacheImage, @Query("enhanced") Boolean enhanced, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations evaluateMethod" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Evaluate") Observable<Response<ResponseBody>> evaluateMethod(@Query("CacheImage") Boolean cacheImage, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations matchMethod" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Match") Observable<Response<ResponseBody>> matchMethod(@Query("listId") String listId, @Query("CacheImage") Boolean cacheImage, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations findFacesFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/FindFaces") Observable<Response<ResponseBody>> findFacesFileInput(@Query("CacheImage") Boolean cacheImage, @Body RequestBody imageStream, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations findFacesUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/FindFaces") Observable<Response<ResponseBody>> findFacesUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelInner imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations oCRUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/OCR") Observable<Response<ResponseBody>> oCRUrlInput(@Query("language") String language, @Query("CacheImage") Boolean cacheImage, @Query("enhanced") Boolean enhanced, @Header("Content-Type") String contentType, @Body BodyModelInner imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations oCRFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/OCR") Observable<Response<ResponseBody>> oCRFileInput(@Query("language") String language, @Query("CacheImage") Boolean cacheImage, @Query("enhanced") Boolean enhanced, @Body RequestBody imageStream, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations evaluateFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Evaluate") Observable<Response<ResponseBody>> evaluateFileInput(@Query("CacheImage") Boolean cacheImage, @Body RequestBody imageStream, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations evaluateUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Evaluate") Observable<Response<ResponseBody>> evaluateUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelInner imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations matchUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Match") Observable<Response<ResponseBody>> matchUrlInput(@Query("listId") String listId, @Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelInner imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.contentmoderator.ImageModerations matchFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Match") Observable<Response<ResponseBody>> matchFileInput(@Query("listId") String listId, @Query("CacheImage") Boolean cacheImage, @Body RequestBody imageStream, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageModerationsInner(Retrofit retrofit, ContentModeratorClientImpl client) {\n this.service = retrofit.create(ImageModerationsService.class);\n this.client = client;\n }", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public interface ImageService {\n public long insert(ImageEntity entity);\n\n public ImageEntity query(long id);\n\n public List<ImageEntity> findTiles(long id);\n\n public boolean update(ImageEntity entity);\n\n public boolean delete(long id);\n}", "public interface ApiService {\n\n @GET(\"classify\")\n Call<GalleryClassResult> getGalleryClassList();\n\n @GET(\"list\")\n Call<GalleryResult> getGalleryList(@Query(\"page\") int page, @Query(\"rows\") int rows, @Query(\"id\") int id);\n\n @GET(\"show\")\n Call<PictureResult> getPictureList(@Query(\"id\") long id);\n\n}", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "public interface GalleryApiInterface {\n\n @GET(\"/gallery.json\")\n public void getStreams(Callback<List<GalleryImage>> callback);\n}", "public interface GalleryApiInterface {\n @GET(\"/gallery.json\")\n\n void getStreams(Callback<List<GalleryImage>>callback);\n}", "public interface ImageUpload {\n void imageUploadToServer(int selectedImageResourceId);\n}", "public interface ApiInterface {\n\n ///// post products api interface\n @POST(\"save_image.php\")\n Call<ResponseBody> saveImage(@Body RequestBody body);\n\n /*\n get user detail\n */\n @GET(\"get_image_api.php\")\n Call<UserModelClass> userDetails(@Query(\"user_id\") String user_id);\n\n}", "interface ApiService {\n\n @GET(\"users/{user}/repos\")\n Call<List<FlickR>> getFlickRItems(@Path(\"user\") String user);\n\n @GET(\"users/{user}\")\n Call<Owner> getFlickRMedia(@Path(\"user\") String user);\n\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "public interface TypiCodeServices {\n @GET(\"/photos\")\n Call<ArrayList<Model>> data();\n}", "public interface WallpaperApi {\n @GET(\"api.php?latest\")\n Call<ImageList> getLastest();\n\n @GET(\"api.php?cat_list\")\n Call<CategoryList> getCategory();\n\n @GET(\"api.php\")\n Call<ImageList> getCategoryItem(@Query(\"cat_id\") String catId);\n}", "public interface GiftApiService {\n\n @GET(\"/giftChains\")\n void getGiftChainList(@Query(\"nextPageToken\") int nextPageToken,\n @Query(\"limit\") int limit,\n @Query(\"sort\") String sort,\n Callback<GiftChainListResponse> callback);\n\n @GET(\"/gifts\")\n void getGiftsNewerThanGiftId(@Query(\"nextPageToken\") int nextPageToken,\n @Query(\"limit\") int limit,\n @Query(\"sort\") String sort,\n @Query(\"greaterThanId\") long giftId,\n Callback<GiftChainListResponse> callback);\n\n @GET(\"/gifts/newest\")\n void getNewestGift(Callback<Gift> callback);\n\n @Multipart\n @POST(\"/gifts\")\n Gift uploadNewGift(@Part(\"gift\") Gift gift, @Part(\"file\") TypedFile file);\n\n @POST(\"/users\")\n void registerUser(@Body RegistrationUser user, Callback<UserAccount> callback);\n\n @FormUrlEncoded\n @POST(\"/gifts/{id}/touch\")\n Response touch(@Path(\"id\") long touchableId, @Field(\"direction\") int direction);\n\n @FormUrlEncoded\n @POST(\"/gifts/{id}/flag\")\n Response flag(@Path(\"id\") long flaggableId, @Field(\"direction\") int direction);\n}", "public interface ApiService {\n\t@GET(\"photos\")\n\tCall<List<ApiModel>> getApiData();\n}", "public interface PhotoService {\n\n /**\n * Add saved photo to a given user.\n * @param user current user's model object\n * @param photo photo model object\n */\n void addPhoto(User user, Photo photo);\n\n /**\n * Remove saved photo from a given user.\n * @param user current user's model object.\n * @param photoId NASA's API photo identifier.\n */\n void removePhoto(User user, String photoId);\n}", "public interface ImageService {\n\n void saveImageFile(Long recipeId, MultipartFile imageFile);\n}", "public interface ShowCaseImageService {\n List<ImageShowCaseModel> getImageListByCaseId(Integer showCaseId);\n List<ImageShowCaseModel> getLimitImageListByCaseId(Integer showCaseId);\n}", "public interface MooviestApiInterface {\n\n // ********** USER ************\n\n @GET(\"users/{id}/\")\n Call<UserProfileResponse> getUserProfile(@Path(\"id\") int id);\n\n @Multipart\n @PUT(\"users/{id}/\")\n Call<UpdateProfileResponse> updateUserProfile(\n @Path(\"id\") int id,\n @Part(\"username\") RequestBody username,\n @Part(\"first_name\") RequestBody first_name,\n @Part(\"last_name\") RequestBody last_name,\n @Part(\"email\") RequestBody email,\n @Part(\"profile.born\") RequestBody born,\n @Part(\"profile.city\") RequestBody city,\n @Part(\"profile.postalCode\") RequestBody postalCode,\n @Part(\"profile.lang.code\") RequestBody code,\n @Part MultipartBody.Part imageFile\n );\n\n @GET(\"users/{id}/swipelist/\")\n Call<MooviestApiResult> getSwipeList(@Path(\"id\") int id);\n\n @GET(\"users/{id}/collection/\")\n Call<MooviestApiResult> getUserList(@Path(\"id\") int id, @Query(\"name\") String list_name, @Query(\"page\") int page);\n\n @FormUrlEncoded\n @POST(\"users/\")\n Call<SignupResponse> signup(\n @Field(\"username\") String username,\n @Field(\"email\") String email,\n @Field(\"password\") String password,\n @Field(\"profile.lang.code\") String code\n );\n\n @FormUrlEncoded\n @POST(\"users/login/\")\n Call<LoginResponse> login(@Field(\"username\") String emailUsername, @Field(\"password\") String password);\n\n @FormUrlEncoded\n @POST(\"collection/\")\n Call<Collection> createMovieCollection(@Field(\"user\") int user, @Field(\"movie\") int movie, @Field(\"typeMovie\") int typeMovie);\n\n @FormUrlEncoded\n @PATCH(\"collection/{id}/\")\n Call<Collection> updateMovieCollection(@Path(\"id\") int id, @Field(\"typeMovie\") int typeMovie);\n\n // ********** MOVIE ************\n\n @GET(\"movie/{id}/\")\n Call<Movie> getMovieDetail(@Path(\"id\") int id, @Query(\"movie_lang_id\") int movie_lang_id, @Query(\"user_id\") int user_id);\n\n @GET(\"movie_lang/\")\n Call<MooviestApiResult> searchMovies(@Query(\"title\") String search, @Query(\"code\") String lang_code, @Query(\"page\") int page);\n}", "public interface ApiRequestService {\n @GET(\"api/v1/images/search?query=tree\")\n //@GET(\"3/gallery/random/random/3\")\n Observable<ImageListResponse> getImageList();\n}", "public interface ImageService {\n\n //String ENDPOINT = \"http://n.xxt.cn:3000/\";\n //String ENDPOINT = \"http://api.laifudao.com/\";\n String ENDPOINT = \"http://image.baidu.com/\";\n\n @GET(\"/data/imgs?tag=性感&sort=0&pn=10&rn=50&p=channel&from=1\")\n Observable<JsonObject> getImages(@Query(\"col\") String col,\n @Query(\"tag\") String tag,\n @Query(\"pn\") int start,\n @Query(\"rn\") int end);\n\n class Creator {\n public static ImageService getService(Context context) {\n Retrofit retrofit = RemoteUtil.createRetrofitInstance(context, ENDPOINT);\n return retrofit.create(ImageService.class);\n }\n }\n}", "public interface RestService {\n\n //\n //\n // AUTH\n //\n //\n @POST(\"auth\")\n Call<AccessToken> logIn(@Body Credentials credentials);\n\n @POST(\"users\")\n Call<Void> signUp(@Body Credentials credentials);\n\n //\n //\n // Fetch Data\n //\n //\n @GET(\"data\")\n Call<CategoriesWrapper> fetchData();\n\n @POST(\"categories\")\n Call<Category> addCategory(@Body AddCategoryWrapper wrapper);\n\n @POST(\"feeds\")\n Call<Void> subscribeFeed(@Body AddFeedWrapper wrapper);\n\n @DELETE(\"feeds/{id_feed}\")\n Call<Void> unsubscribeFeed(@Path(\"id_feed\") Integer channelId);\n\n //\n //\n // Update Read Items. Mark as read.\n //\n //\n @PUT(\"items\")\n Call<Void> updateReadAllItems(@Body ItemStateWrapper wrapper);\n\n @PUT(\"feeds/{id_feed}/items/\")\n Call<Void> updateReadItemsByChannelId(@Path(\"id_feed\") Integer channelId,\n @Body ItemStateWrapper wrapper);\n\n @PUT(\"items/{id_item}\")\n Call<Void> updateStateItem(@Path(\"id_item\") Integer itemId,\n @Body ItemStateWrapper wrapper);\n}", "public interface ImageModListener {\n void setImage(ArrayList<Integer> image);\n }", "public interface ImageLoader {\n\n}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "public interface ImageStatusService {\n\n /**\n * 状态变化处理操作\n */\n void changeHandle(String id, Integer type);\n}", "public interface RestApis {\n\n @POST(Constants.ApiMethods.REGISTER_URL)\n Call<RegisterResponse> registerUser(@Body RegisterRequest aRegisterRequest);\n\n @POST(Constants.ApiMethods.LOGIN_URL)\n Call<LoginResponse> loginUser(@Body LoginRequest aRequest);\n\n @GET(Constants.ApiMethods.USER_LIST_URL)\n Call<BaseResponse<List<UserModel>>> getUserList(@Query(\"page\") int pageId);\n\n @GET(Constants.ApiMethods.ALBUM_LIST_URL)\n Call<List<AlbumModel>> getAlbumList();\n\n}", "public interface IGalleryPresenter {\n\n void getImageList(Intent intent);\n\n}", "public interface ImageService extends Remote {\n\n public static final int IMG_SIZE_ORIGINAL = 0;\n public static final int IMG_SIZE_176_220_SMALL = 1;\n public static final int IMG_SIZE_330_220 = 2;\n public static final int IMG_SIZE_240_320_SMALL = 3;\n public static final int IMG_SIZE_120_67 = 4;\n\n public static final int IMG_SIZE_320_480_SMALL = 5;\n public static final int IMG_SIZE_170_121 = 6;\n public static final int IMG_SIZE_480_640_SMALL = 7;\n public static final int IMG_SIZE_800_600 = 8;\n\n public static final String SERVICE_NAME = \"ImageService\";\n\n public byte[] getBytes(long imageId, int imageSize) throws RemoteException;\n\n public byte[] getBytesQuiet(long imageId, int imageSize) throws RemoteException;\n\n public void removeImage(long imageId) throws RemoteException;\n\n public byte[] scale(byte[] data, int imageSize) throws RemoteException;\n\n public boolean addImage(long imageId, byte[] bytes) throws RemoteException;\n}", "public interface IAlbumImageService extends IService<AlbumImage> {\n\n List<AlbumImage> queryList(Map map);\n\n int queryTotal(Map map);\n\n /**\n * Delete photos in batch\n * @param ids\n * @return\n */\n int batchDelete(List<Integer> ids);\n\n /**\n * Check the album according to the album ID\n * @param albumId\n * @return\n */\n List<AlbumImage> selectByAlbum(Integer albumId);\n\n\n}", "public interface ImageLoaderInter {\n /**\n * 加载普通的图片\n *\n * @param activity\n * @param imageUrl\n * @param imageView\n */\n void loadCommonImgByUrl(Activity activity, String imageUrl, ImageView imageView);\n\n /**\n * 加载普通的图片\n *\n * @param fragment\n * @param imageUrl\n * @param imageView\n */\n void loadCommonImgByUrl(Fragment fragment, String imageUrl, ImageView imageView);\n\n /**\n * 加载圆形或者是圆角图片\n *\n * @param activity\n * @param imageUrl\n * @param imageView\n */\n void loadCircleOrReboundImgByUrl(Activity activity, String imageUrl, ImageView imageView);\n\n /**\n * 加载圆形或者是圆角图片\n *\n * @param fragment\n * @param imageUrl\n * @param imageView\n */\n void loadCircleOrReboundImgByUrl(Fragment fragment, String imageUrl, ImageView imageView);\n\n void resumeRequests(Activity activity);\n\n void resumeRequests(Fragment fragment);\n\n void pauseRequests(Activity activity);\n\n void pauseRequests(Fragment fragment);\n}", "public interface GiftSvcApi {\n\n public static final String PASSWORD_PARAMETER = \"password\";\n\n public static final String USERNAME_PARAMETER = \"username\";\n\n public static final String TITLE_PARAMETER = \"title\";\n\n public static final String TOKEN_PATH = \"/oauth/token\";\n\n public static final String DATA_PARAMETER = \"data\";\n\n public static final String ID_PARAMETER = \"id\";\n\n public static final String OBSCENE_PARAMETER = \"obscene\";\n\n // The path where we expect the GiftSvc to live\n public static final String GIFT_SVC_PATH = \"/gift\";\n\n public static final String GIFT_DATA_PATH = GIFT_SVC_PATH + \"/{id}/data\";\n\n public static final String GIFT_OBSCENE_PATH = GIFT_SVC_PATH + \"/{id}/obscene\";\n\n public static final String GIFT_UPDATE_PATH = GIFT_SVC_PATH + \"/update\";\n\n public static final String GIFT_TITLE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByTitle\";\n\n public static final String GIFT_OBSCENE_SEARCH_PATH = GIFT_SVC_PATH + \"/search/findByObscene\";\n\n @GET(GIFT_SVC_PATH)\n public Collection<Gift> getGiftList();\n\n @POST(GIFT_SVC_PATH)\n public Gift addGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}\")\n public List<Long> deleteGift(@Path(ID_PARAMETER) long id);\n\n @GET(GIFT_TITLE_SEARCH_PATH)\n public Collection<Gift> findByTitle(@Query(TITLE_PARAMETER) String title);\n\n @Multipart\n @POST(GIFT_DATA_PATH)\n public GiftStatus setGiftData(@Path(ID_PARAMETER) long id, @Part(DATA_PARAMETER) TypedFile giftData);\n\n @GET(GIFT_DATA_PATH)\n Response getData(@Path(ID_PARAMETER) long id);\n\n @POST(GIFT_UPDATE_PATH)\n public Long updateGift(@Body Gift gift);\n\n @POST(GIFT_SVC_PATH + \"/{id}/touch\")\n public Long touchGift(@Path(\"id\") long id);\n\n @POST(GIFT_SVC_PATH + \"/{id}/untouch\")\n public Long untouchGift(@Path(\"id\") long id);\n\n @POST(GIFT_OBSCENE_PATH)\n public Boolean obsceneGift(@Path(\"id\") long id);\n\n public static final String USER_SVC_PATH = \"/user\";\n\n @GET(USER_SVC_PATH)\n public Collection<User> getUserList();\n\n @GET(GIFT_SVC_PATH + \"/{user}\")\n public Collection<Gift> getGiftListForUser(@Path(\"user\") User user);\n\n @POST(USER_SVC_PATH)\n public boolean addUser(@Body User user);\n}", "public interface ImageView {\n void addImages(List<ImageBean> list);\n void showProgress();\n void hideProgress();\n void showLoadFailMsg();\n}", "public interface UploadPhotosView extends MvpView {\n\n /**\n * 提交数据\n * 个人图片\n */\n void commitData();\n\n /**\n * 提交数据成功\n */\n void commitDataSuccess();\n void showLoading();\n //void showError();\n\n void uploadPhotos();\n\n /**\n * photoModel指向的图片上传成功\n */\n void onUploadSuccess();\n\n /**\n * photoModel指向的图片上传失败\n\n */\n void onUploadError();\n\n //照片不存在\n void noPicFound(String path);\n\n void updateProgress(long current, long total);\n}", "public interface PhotoService {\n\n @GET\n Observable<List<Photo>> fetchGallery(@Url String url);\n}", "public interface GroupService {\n\n @Headers({\n \"Accept: application/json\",\n \"Content-type: application/json\"\n })\n @POST(\"api/prode/group/add\")\n RestBodyCall<Group> add(@Body JsonObject params);\n\n @GET(\"api/prode/group/index\")\n RestBodyCall<ArrayList<Group>> list(@Query(\"access_token\") String accessToken);\n\n @GET(\"api/prode/group/remove-user\")\n RestBodyCall<Boolean> removeUser(@Query(\"access_token\") String accessToken, @Query(\"group_id\") int groupId, @Query(\"user_id\") int userId);\n\n @GET(\"api/prode/group/remove-user\")\n RestBodyCall<Boolean> removeUserById(@Query(\"access_token\") String accessToken, @Query(\"group_id\") int groupId, @Query(\"group_relation_id\") long groupRelationId);\n\n @GET(\"api/prode/group/leave\")\n RestBodyCall<Boolean> leave(@Query(\"access_token\") String accessToken, @Query(\"group_id\") int groupId);\n\n @Headers({\n \"Accept: application/json\",\n \"Content-type: application/json\"\n })\n @POST(\"api/prode/group/invitation\")\n RestBodyCall<Group> invitation(@Body JsonObject params);\n}", "public interface CommonClient {\n @Multipart\n @POST(Constants.API_COMMON_UPLOAD_IMAGE)\n Call<ArrayModel<String>> uploadPhotos(@Part(\"type\") RequestBody type, @Part(\"foreign_id\") RequestBody foreign_id, @Part ArrayList<MultipartBody.Part> upload_file);\n\n @Multipart\n @POST(Constants.API_COMMON_UPDATE_SUBIMAGE)\n Call<ArrayModel<String>> updateSubPhotos(@Part(\"existingImages\") RequestBody existingImages, @Part(\"userId\") RequestBody userId, @Part ArrayList<MultipartBody.Part> upload_file);\n\n @POST(Constants.API_COMMON_UPLOAD_WEB)\n @FormUrlEncoded\n Call<ObjectModel<String>> uploadWebs(@Field(\"type\") int type, @Field(\"foreign_id\") int foreign_id, @Field(\"web\") JSONStringer webs);\n\n @POST(Constants.API_COMMON_UPLOAD_VIDEO)\n @FormUrlEncoded\n Call<ObjectModel<String>> uploadVideos(@Field(\"type\") int type, @Field(\"foreign_id\") int foreign_id, @Field(\"video[]\") ArrayList<String> videos);\n}", "public interface ApiInterface {\n\n // this method commuticate with API\n\n\n @FormUrlEncoded\n @POST(\"upload.php\")\n Call<ImageClass> uploadImage(@Field(\"title\") String title, @Field(\"image\") String image);\n\n //call is the return type of uploadImage\n }", "public mService() {\n super(\"fetchImageService\");\n }", "public interface IMainScm {\n\n void getImage(String url,ImageView view);\n\n void getImagePath(HttpListener<String[]> httpListener);\n}", "public interface ApiInterface {\n\n\n @GET(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> getNewsAPIList();\n\n @PUT(\"api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call<List<News>> createNewsAPIBlob();\n\n @DELETE(\"/api/jsonBlob/9e44dca2-ad19-11e7-894a-5dc7a0a132b5\")\n Call deletePost();\n\n}", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public interface Recognition {\n\n /**\n * Recognition class to implement. Should do the image recognition on the image and return the found classes.\n *\n * @param image image to process.\n * @return List of Result objects.\n */\n public List<Result> recognize(IplImage image);\n\n}", "public interface CircleService {\n\n @FormUrlEncoded\n @POST(\"/circle/list\")\n LiveData<BaseBean<List<CircleBean>>> getCircleData(@Field(\"userid\") long useId, @Field(\"pagesize\") int pageSize, @Field(\"pageno\") int pageNo);\n @FormUrlEncoded\n @POST(\"/circle/add\")\n Flowable<BaseBean<CircleBean>> upCircleData(@Field(\"userid\")long userId,@Field(\"content\") String content,@Field(\"images\") String images);\n}", "public interface ImageUploadService {\n\n public ResponseInfo uploadFile(UploadFileVo uploadFileVo) ;\n}", "@Path(\"/providers/Microsoft.Compute/locations/{location}\")\n@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })\n@Consumes(APPLICATION_JSON)\npublic interface OSImageApi {\n\n /**\n * List Publishers in location\n */\n @Named(\"publisher:list\")\n @GET\n @Path(\"/publishers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Publisher> listPublishers();\n\n /**\n * List Offers in publisher\n */\n @Named(\"offer:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Offer> listOffers(@PathParam(\"publisher\") String publisher);\n\n /**\n * List SKUs in offer\n */\n @Named(\"sku:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<SKU> listSKUs(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer);\n\n /**\n * List Versions in SKU\n */\n @Named(\"version:list\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Version> listVersions(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer,\n @PathParam(\"sku\") String sku);\n \n /**\n * Get the details of a Version\n */\n @Named(\"version:get\")\n @GET\n @Path(\"/publishers/{publisher}/artifacttypes/vmimage/offers/{offer}/skus/{sku}/versions/{version}\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n Version getVersion(@PathParam(\"publisher\") String publisher, @PathParam(\"offer\") String offer,\n @PathParam(\"sku\") String sku, @PathParam(\"version\") String version);\n\n}", "public interface PhotosView extends BaseView {\n\n void onPhotosSuccess(List<Photo> photos);\n\n}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "public interface VisionPipeline {\n /**\n * Processes the image input and sets the result objects. Implementations should make these\n * objects accessible.\n *\n * @param image The image to process.\n */\n void process(Mat image);\n}", "public interface WebService {\n\n\t@Multipart\n\t@POST(\"/api/upload/images\")\n\tpublic void uploadImage(@Part(\"imageType\") TypedFile imgToPost,\n\t\t\tCallback<SignUpEntity> callback);\n\n\t@PUT(\"/api/userrecipes\")\n\tpublic void getAllRecipes(@Header(\"basic userid\") String token,\n\t\t\t@Body UserRecipesObject userRecipesObject,\n\t\t\tCallbackRetrofit<User> callback);\n\n\t\n\t\n\t@PUT(\"/api/UserRecipes\")\n\tpublic void getUserRecipes(@Header(\"Authorization\") String base64encodedValue,\n\t\t\t@Field(\"userId\") int userId, CallbackRetrofit<User> callback);\n\n\t\n\t@GET(\"/api/userrecipes/for/{userId}\")\n\tpublic void getRecipesForMyDrinks(\n\t\t\t@EncodedPath(\"userId\") int userId,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<ArrayList<DiscoverDrinkResponse>> callback);\n\t\n\t\n\t\n\t@POST(\"/api/recipes/{id}/fav\")\n\tpublic void markFavourite(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<FavoriteObject> callback);\n\t\n\t\n\t\n\t@GET(\"/api/userrecipes\")\n\tpublic void searchRecipies(@Query(\"recipeId\") int recipeId,\n\t\t\t@Query(\"count\") int count, @Query(\"searchText\") String searchText,\n\t\t\tCallbackRetrofit<FavoriteObject> callback);\n\t\n\t\n\t@POST(\"/api/recipes/{id}/like\")\n\tpublic void markLike(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<LikeObject> callback);\n\t\n\t@POST(\"/api/recipes/{id}/unlike\")\n\tpublic void markUnLike(\n\t\t\t@EncodedPath(\"id\") int id,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<LikeObject> callback);\n\t\n\t\n\t\n\t@DELETE(\"/api/userrecipes/{recipeId}\")\n\tpublic void deleteRecipes(\n\t\t\t@EncodedPath(\"recipeId\") int recipeId,\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\t\n\t\n\n\t@GET(\"/api/recipes\")\n\tpublic void getRecipesForPremium(@Query(\"recipeId\") int recipeId,\n\t\t\t@Query(\"count\") int count, @Query(\"since\") Double since,\n\t\t\tCallbackRetrofit<ArrayList<DiscoverDrinkResponse>> callback);\n\t\n\t\n\t\n\n\t@POST(\"/api/users/forgotpassword\")\n\tpublic void forgotPassword(\n\t\t\t@Header(\"Authorization\") String base64encodedValue,\n\t\t\t@Body LoginObject userObject,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\t@POST(\"/api/users/forgotpassword\")\n\tpublic void forgotPassword(\n\t\t\t@Body LoginObject userObject,\n\t\t\tCallbackRetrofit<User> callback);\n\t\n\n\t@POST(\"/api/users/login\")\n\tpublic void loginUser(@Header(\"application\") String header,\n\t\t\t@Body LoginObject userObject, CallbackRetrofit<User> callback);\n\n\t@PUT(\"/api/users/register\")\n\tpublic void registerUser(@Header(\"application\") String header,\n\t\t\t@Body SignUpEntity registerObject, CallbackRetrofit<User> callback);\n\t\n\t\n\t\n\t@POST(\"/api/users/login/fb\")\n\tpublic void loginUserByFacebook(@Header(\"application\") String header,\n\t\t\t@Body Facebook userObject, CallbackRetrofit<User> callback);\n\t\n\n}", "public interface FlickrService {\n\n @GET(Constants.FLICKR_API_GET_RECENT)\n Observable<PhotosResponse> getRecentPhotos(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page\n );\n\n @GET(Constants.FLICKR_API_SEARCH_TEXT)\n Observable<PhotosResponse> getPhotosByText(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page,\n @Query(\"text\") String text\n );\n\n @GET(Constants.FLICKR_API_GET_INFO )\n Observable<PhotoInfoResponse> getPhotoInfo(\n @Query(\"photo_id\") String photoId\n );\n\n @GET(Constants.FLICKR_API_GET_COMMENTS )\n Observable<CommentsResponse> getPhotoComments(\n @Query(\"photo_id\") String photoId\n );\n\n\n class Creator {\n\n public static FlickrService newFlickrService() {\n Retrofit retrofit = new Retrofit.Builder()\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .baseUrl(Constants.FLICKR_API)\n .build();\n return retrofit.create(FlickrService.class);\n }\n }\n}", "public interface PhotosProvider {\n\n Observable<FlickrFeed> getPhotos(@NonNull String query, int page, int limit);\n\n}", "public interface PictureService {\n UploadPictureResponseVO uploadPicture(MultipartFile multipartFile);\n}", "public interface ImageServer extends Remote {\n\n /**\n * Returns the identifier of the remote image. This method should be\n * called to return an identifier before any other methods are invoked.\n * The same ID must be used in all subsequent references to the remote\n * image.\n */\n Long getRemoteID() throws RemoteException;\n\n /**\n * Disposes of any resouces allocated to the client object with\n * the specified ID.\n */\n void dispose(Long id) throws RemoteException;\n\n /**\n * Increments the reference count for this id, i.e. increments the\n * number of RMIServerProxy objects that currently reference this id.\n */\n void incrementRefCount(Long id) throws RemoteException;\n\n\n /// Methods Common To Rendered as well as Renderable modes.\n\n\n /**\n * Gets a property from the property set of this image.\n * If the property name is not recognized, java.awt.Image.UndefinedProperty\n * will be returned.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param name the name of the property to get, as a String.\n * @return a reference to the property Object, or the value\n * java.awt.Image.UndefinedProperty.\n */\n Object getProperty(Long id, String name) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty(String).\n *\n * @return an array of Strings representing proeprty names.\n */\n String [] getPropertyNames(Long id) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty().\n *\n * @return an array of Strings representing property names.\n */\n String[] getPropertyNames(String opName) throws RemoteException;\n\n\n /// Rendered Mode Methods\n\n\n /** Returns the ColorModel associated with this image. */\n SerializableState getColorModel(Long id) throws RemoteException;\n\n /** Returns the SampleModel associated with this image. */\n SerializableState getSampleModel(Long id) throws RemoteException;\n\n /** Returns the width of the image on the ImageServer. */\n int getWidth(Long id) throws RemoteException;\n\n /** Returns the height of the image on the ImageServer. */\n int getHeight(Long id) throws RemoteException;\n\n /**\n * Returns the minimum X coordinate of the image on the ImageServer.\n */\n int getMinX(Long id) throws RemoteException;\n\n /**\n * Returns the minimum Y coordinate of the image on the ImageServer.\n */\n int getMinY(Long id) throws RemoteException;\n\n /** Returns the number of tiles across the image. */\n int getNumXTiles(Long id) throws RemoteException;\n\n /** Returns the number of tiles down the image. */\n int getNumYTiles(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the X direction of the image.\n */\n int getMinTileX(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the Y direction of the image.\n */\n int getMinTileY(Long id) throws RemoteException;\n\n /** Returns the width of a tile in pixels. */\n int getTileWidth(Long id) throws RemoteException;\n\n /** Returns the height of a tile in pixels. */\n int getTileHeight(Long id) throws RemoteException;\n\n /** Returns the X offset of the tile grid relative to the origin. */\n int getTileGridXOffset(Long id) throws RemoteException;\n\n /** Returns the Y offset of the tile grid relative to the origin. */\n int getTileGridYOffset(Long id) throws RemoteException;\n\n /**\n * Returns tile (x, y). Note that x and y are indices into the\n * tile array, not pixel locations. Unlike in the true RenderedImage\n * interface, the Raster that is returned should be considered a copy.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a copy of the tile as a Raster.\n */\n SerializableState getTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Compresses tile (x, y) and returns the compressed tile's contents\n * as a byte array. Note that x and y are indices into the\n * tile array, not pixel locations.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a byte array containing the compressed tile contents.\n */\n byte[] getCompressedTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Returns the entire image as a single Raster.\n *\n * @return a SerializableState containing a copy of this image's data.\n */\n SerializableState getData(Long id) throws RemoteException;\n\n /**\n * Returns an arbitrary rectangular region of the RenderedImage\n * in a Raster. The rectangle of interest will be clipped against\n * the image bounds.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param bounds the region of the RenderedImage to be returned.\n * @return a SerializableState containing a copy of the desired data.\n */\n SerializableState getData(Long id, Rectangle bounds) \n\tthrows RemoteException;\n\n /**\n * Returns the same result as getData(Rectangle) would for the\n * same rectangular region.\n */\n SerializableState copyData(Long id, Rectangle bounds)\n\tthrows RemoteException;\n\n /**\n * Creates a RenderedOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n\n void createRenderedOp(Long id, String opName,\n\t\t\t ParameterBlock pb,\n\t\t\t SerializableState hints) throws RemoteException;\n\n /**\n * Calls for Rendering of the Op and returns true if the RenderedOp\n * could be rendered else false\n */\n boolean getRendering(Long id) throws RemoteException;\n\n /**\n * Retrieve a node from the hashtable.\n */\n RenderedOp getNode(Long id) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderedSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image as a RenderedOp on the server side\n */\n void setRenderedSource(Long id, RenderedOp source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderedSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderedSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n\n /// Renderable mode methods\n\n\n /** \n * Gets the minimum X coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinX(Long id) throws RemoteException;\n\n /** \n * Gets the minimum Y coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinY(Long id) throws RemoteException;\n\n /** \n * Gets the width (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the width of the renderable image in user coordinates.\n */\n float getRenderableWidth(Long id) throws RemoteException;\n \n /**\n * Gets the height (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the height of the renderable image in user coordinates.\n */\n float getRenderableHeight(Long id) throws RemoteException;\n\n /**\n * Creates a RenderedImage instance of this image with width w, and\n * height h in pixels. The RenderContext is built automatically\n * with an appropriate usr2dev transform and an area of interest\n * of the full image. All the rendering hints come from hints\n * passed in.\n *\n * <p> If w == 0, it will be taken to equal\n * Math.round(h*(getWidth()/getHeight())).\n * Similarly, if h == 0, it will be taken to equal\n * Math.round(w*(getHeight()/getWidth())). One of\n * w or h must be non-zero or else an IllegalArgumentException \n * will be thrown.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * were used to create the image. In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param w the width of rendered image in pixels, or 0.\n * @param h the height of rendered image in pixels, or 0.\n * @param hints a RenderingHints object containg hints.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;\n \n /** \n * Returnd a RenderedImage instance of this image with a default\n * width and height in pixels. The RenderContext is built\n * automatically with an appropriate usr2dev transform and an area\n * of interest of the full image. The rendering hints are\n * empty. createDefaultRendering may make use of a stored\n * rendering for speed.\n *\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createDefaultRendering(Long id) throws RemoteException;\n \n /** \n * Creates a RenderedImage that represented a rendering of this image\n * using a given RenderContext. This is the most general way to obtain a\n * rendering of a RenderableImage.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * (from the RenderContext) were used to create the image.\n * In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param renderContext the RenderContext to use to produce the rendering.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;\n\n /**\n * Creates a RenderableOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n void createRenderableOp(Long id, String opName, ParameterBlock pb)\n\tthrows RemoteException;\n\n /**\n * Calls for rendering of a RenderableOp with the given SerializableState\n * which should be a RenderContextState.\n */\n Long getRendering(Long id, SerializableState rcs) throws RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderableSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderableSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n /**\n * Sets the source of the operation refered to by the supplied \n * <code>id</code> to the <code>RenderableRMIServerProxy</code>\n * that exists on the supplied <code>serverName</code> under the\n * supplied <code>sourceId</code>. \n */\n void setRenderableRMIServerProxyAsSource(Long id,\n\t\t\t\t\t Long sourceId, \n\t\t\t\t\t String serverName,\n\t\t\t\t\t String opName,\n\t\t\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableOp on the server side.\n */\n void setRenderableSource(Long id, RenderableOp source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableImage on the server side.\n */\n void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderableSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Maps the RenderContext for the remote Image\n */\n SerializableState mapRenderContext(int id, Long nodeId,\n\t\t\t\t String operationName,\n\t\t\t\t SerializableState rcs)\n\tthrows RemoteException;\n\n /**\n * Gets the Bounds2D of the specified Remote Image\n */\n SerializableState getBounds2D(Long nodeId, String operationName)\n\tthrows RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(String opName) throws RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(Long id) throws RemoteException;\n\n /**\n * Gets the operation names supported on the Server\n */\n String[] getServerSupportedOperationNames() throws RemoteException;\n\n /**\n * Gets the <code>OperationDescriptor</code>s of the operations\n * supported on this server.\n */\n List getOperationDescriptors() throws RemoteException;\n\n /**\n * Calculates the region over which two distinct renderings\n * of an operation may be expected to differ.\n *\n * <p> The class of the returned object will vary as a function of\n * the nature of the operation. For rendered and renderable two-\n * dimensional images this should be an instance of a class which\n * implements <code>java.awt.Shape</code>.\n *\n * @return The region over which the data of two renderings of this\n * operation may be expected to be invalid or <code>null</code>\n * if there is no common region of validity.\n */\n SerializableState getInvalidRegion(Long id,\n\t\t\t\t ParameterBlock oldParamBlock,\n\t\t\t\t SerializableState oldHints,\n\t\t\t\t ParameterBlock newParamBlock,\n\t\t\t\t SerializableState newHints)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the destination region that\n * can potentially be affected by the pixels of a rectangle of a\n * given source. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the destination region needs to be calculated .\n * @param sourceRect The <code>Rectangle</code> in source coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the potentially\n * affected destination region, or <code>null</code> if\n * the region is unknown.\n */\n Rectangle mapSourceRect(Long id, Rectangle sourceRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the region of a specified\n * source that is required in order to compute the pixels of a\n * given destination rectangle. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the source region needs to be calculated .\n * @param destRect The <code>Rectangle</code> in destination coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the required source region.\n */\n Rectangle mapDestRect(Long id, Rectangle destRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * A method that handles a change in some critical parameter.\n */\n Long handleEvent(Long renderedOpID, \n\t\t String propName,\n\t\t Object oldValue, \n\t\t Object newValue) throws RemoteException;\n\n /**\n * A method that handles a change in one of it's source's rendering,\n * i.e. a change that would be signalled by RenderingChangeEvent.\n */\n Long handleEvent(Long renderedOpID, \n\t\t int srcIndex,\n\t\t SerializableState srcInvalidRegion, \n\t\t Object oldRendering) throws RemoteException;\n\n /**\n * Returns the server's capabilities as a\n * <code>NegotiableCapabilitySet</code>. Currently the only capabilities\n * that are returned are those of TileCodecs.\n */\n NegotiableCapabilitySet getServerCapabilities() throws RemoteException;\n\n /**\n * Informs the server of the negotiated values that are the result of\n * a successful negotiation.\n *\n * @param id An ID for the node which must be unique across all clients.\n * @param negotiatedValues The result of the negotiation.\n */\n void setServerNegotiatedValues(Long id, \n\t\t\t\t NegotiableCapabilitySet negotiatedValues)\n\tthrows RemoteException; \n}", "public interface GettyImagesService {\n\n @GET(\"search/images\")\n Observable<GetImagesResponse> getImages(\n @Query(\"page\") int page,\n @Query(\"page_size\") int pageSize,\n @Query(\"phrase\") String phrase\n );\n}", "@Headers(keys = \"x-ms-version\", values = \"2012-03-01\")\npublic interface OSImageAsyncApi {\n\n /**\n * @see OSImageApi#list()\n */\n @Named(\"ListOsImages\")\n @GET\n @Path(\"/services/images\")\n @XMLResponseParser(ListOSImagesHandler.class)\n @Fallback(EmptySetOnNotFoundOr404.class)\n @Consumes(MediaType.APPLICATION_XML)\n ListenableFuture<Set<OSImage>> list();\n\n /**\n * @see OSImageApi#add(String)\n */\n @Named(\"AddOsImage\")\n @POST\n @Path(\"/services/images\")\n @Produces(MediaType.APPLICATION_XML)\n ListenableFuture<Void> add(@BinderParam(BindOSImageParamsToXmlPayload.class) OSImageParams params);\n\n /**\n * @see OSImageApi#update(String)\n */\n @Named(\"UpdateOsImage\")\n @PUT\n @Path(\"/services/images/{imageName}\")\n @Produces(MediaType.APPLICATION_XML)\n ListenableFuture<Void> update(\n @PathParam(\"imageName\") @ParamParser(OSImageParamsName.class) @BinderParam(BindOSImageParamsToXmlPayload.class) OSImageParams params);\n\n /**\n * @see OSImageApi#delete(String)\n */\n @Named(\"DeleteOsImage\")\n @DELETE\n @Path(\"/services/images/{imageName}\")\n @Fallback(VoidOnNotFoundOr404.class)\n ListenableFuture<Void> delete(@PathParam(\"imageName\") String imageName);\n\n}", "public interface ImageManagerSearchRepository extends ElasticsearchRepository<ImageManager, Long> {\n}", "public interface GoogleApi {\n\n @Headers(\"Content-Type: application/json\")\n @POST(VISION_CLOUD)\n Call<VisionRespose> processImage64(@Header(\"Content-Length\") String bodyLength, @Query(\"key\") String apiKey, @Body VisionRequest visionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(VISION_CLOUD)\n Call<LogoResponse> processLogoImage64(@Header(\"Content-Length\") String bodyLength, @Query(\"key\") String apiKey, @Body VisionRequest visionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(TRANSLATION_CLOUD)\n Call<TranslationResponse> translateQuery(@Query(\"key\") String apiKey, @Query(\"source\") String source, @Query(\"target\") String target, @Query(\"q\") List<String> queries);\n}", "public interface IHeadImageService {\n int insert(HeadImage dao);\n HeadImage get(String id);\n int update(HeadImage dao);\n}", "public interface SelectMultiContact {\n interface ViewOps extends ActivityViewOps {\n void onUpdatePhotos(ArrayList<String> listPhotos);\n }\n\n interface PresenterViewOps extends ActivityPresenterViewOps {\n void getAllPhotos(Activity activity);\n }\n}", "public interface ApiInterFace {\n @GET(\"restaurants\")\n Call<Restaurant_model> getRestaurants();\n\n @POST(\"/profile\")\n @FormUrlEncoded\n Call<LoginFragment.UserSentResponse> sendUserData(@Field(\"name\") String name, @Field(\"picUrl\") String picUrl, @Field(\"email\") String email);\n\n\n @GET(\"/search/{keyword}\")\n Call<SearchModel> search(@Path(\"keyword\") String keyword);\n\n @GET(\"/profile/{id}\")\n Call<UserProfile_model> getUserInfo(@Path(\"id\") String id);\n\n @GET(\"/meal/{id}\")\n Call<RestaurantMealResponse> getRestaurantMeal(@Path(\"id\") int id);\n\n @GET(\"/restaurant/{id}\")\n Call<RestaurantDetailResponse> getRestaurantDetailResponse(@Path(\"id\") int id);\n}", "public interface ActorAPI {\n @GET(\"EJP8Q22E-\")\n Call<Actor> getActorImageUrl(String actorName);\n\n @GET(\"EJP8Q22E-\")\n Call<Actor> getTestActorImageUrl();\n}", "public interface ApiInterface {\n\n //Account API\n String ping(OkHttpClient client);\n\n String obtainAuthToken(OkHttpClient client, String username, String password);\n\n JSONObject checkAccountInfo(OkHttpClient client, String token);\n\n JSONObject getServerInformation(OkHttpClient client);\n\n //Starred File API\n List<StarredFile> listStarredFiles(OkHttpClient client, String token);\n\n //Library API\n List<Library> listLibraries(OkHttpClient client, String token);\n\n Library getLibraryInfo(OkHttpClient client, String token, String repo_id);\n\n List<LibraryHistory> getLibraryHistory(OkHttpClient client, String token, String repo_id);\n\n JSONObject createNewLibrary(OkHttpClient client, String token, String libName, String desc, String password);\n\n boolean deleteLibrary(OkHttpClient client, String token, String repo_id);\n\n //File API\n String getFileDownloadLink(OkHttpClient client, String token, String repo_id, String p, boolean reuse);\n\n FileDetail getFileDetail(OkHttpClient client, String token, String repo_id, String p);\n\n List<FileCommit> getFileHistory(OkHttpClient client, String token, String repo_id, String p);\n\n boolean createFile(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameFile(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean moveFile(OkHttpClient client, String token, String repo_id, String p, String dst_repo, String dst_dir);\n\n boolean revertFile(OkHttpClient client, String token, String repo_id, String p, String commit_id);\n\n boolean deleteFile(OkHttpClient client, String token, String repo_id, String p);\n\n String getUploadLink(OkHttpClient client, String token, String repo_id, String p);\n\n List<UploadFileRes> uploadFile(OkHttpClient client, String token, String uploadLink, String parent_dir, String relative_path, File... files);\n\n String getUpdateLink(OkHttpClient client, String token, String repo_id, String p);\n\n boolean updateFile(OkHttpClient client, String token, String updataLink, File file, String target_file);\n\n //Directory API\n List<DirectoryEntry> listDirEntriesByP(OkHttpClient client, String token, String repo_id, String p);\n\n// List<DirectoryEntry> listDirectoryEntriesByID(OkHttpClient client,String token,String repo_id,String id);\n\n List<DirectoryEntry> listAllDirEntries(OkHttpClient client, String token, String repo_id);\n\n boolean createNewDir(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameDir(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean deleteDir(OkHttpClient client, String token, String repo_id, String p);\n\n String getDirDownloadToken(OkHttpClient client, String token, String repo_id, String parent_dir, String dirents);\n\n boolean queryZipProgress(OkHttpClient client, String token, String dirDownloadToken);\n\n String getDirDownloadLink(OkHttpClient client, String token, String dirDownloadToken);\n}", "public interface IFileService {\n ResponseJson uploadFile(MultipartHttpServletRequest request) throws IOException;\n\n ResponseJson uploadFiles(MultipartHttpServletRequest request) throws IOException;\n\n ResponseJson fileDownload(HttpServletRequest request, HttpServletResponse response,int fid) throws UnsupportedEncodingException;\n\n ResponseJson fileDelete(FileModel fileModel, HttpServletRequest request);\n\n ResponseJson findFileList(int uid);\n\n ResponseJson excelUpload(MultipartHttpServletRequest request,String type);\n\n ResponseJson findFileListByPage(int uid, PageJson pageJson);\n\n EUditorJson ueditorUploadImage(MultipartHttpServletRequest request) throws IOException;\n}", "public interface GetImageApi {\n @GET(\"search\")\n Observable<List<ImageBean>> search(@Query(\"q\") String query);\n}", "public interface IMoviesService{\n String getPath(int Vid);\n Movies getPic(int Vid);\n ArrayList<Movies> search(Map map);\n void views(int Vid);\n void upload(Map map);\n Review review(Map map);\n ArrayList<Movies> getInfo(Map map);\n}", "public interface IPortfolio {\n void fetchPortfolioImages(Stylist stylist, RecyclerView rv);\n void fetchStylistImages(Stylist stylist, RecyclerView rv);\n}", "public interface ProfileInterface {\n\n @GET(\"/api/profile/getUser\")\n Call<UserResponse> getUser(@Header(\"Authorization\") String authorizationToken);\n\n @GET(\"/api/profile/getProfile\")\n Call<ProfileResponse> getProfile(@Header(\"Authorization\") String authorizationToken);\n\n @GET(\"/api/profile/getImages\")\n Call<ProfileImagesResponse> getImages(@Header(\"Authorization\") String authorizationToken);\n\n @GET(\"/api/profile/getImagesById\")\n Call<ProfileImagesResponse> getImages(@Header(\"Authorization\") String authorizationToken, @Query(\"userId\") String userId);\n\n @POST(\"/api/profile/update\")\n @FormUrlEncoded\n Call<ProfileResponse> updateProfile(@Header(\"Authorization\") String authorizationToken, @FieldMap Map<String, String> args);\n\n @POST(\"/api/profile/updatePhoto\")\n @FormUrlEncoded\n Call<PhotoResponse> updatePhoto(@Header(\"Authorization\") String authorizationToken, @Field(\"upload\") String upload);\n\n @POST(\"/api/profile/updateWallpaper\")\n @FormUrlEncoded\n Call<PhotoResponse> updateWallPaper(@Header(\"Authorization\") String authorizationToken, @Field(\"upload\") String upload);\n\n @GET(\"/api/profile/getProfileStatus\")\n Call<ProfileStatusResponse> getProfileStatus(@Header(\"Authorization\") String authorizationToken);\n\n @GET(\"/api/profile/getProfileById\")\n Call<ProfileResponse> getProfileById(@Header(\"Authorization\") String authorizationToken, @Query(\"id\") String userId);\n}", "public interface CategoryImageService {\n\n /**\n * Save a categoryImage.\n *\n * @param categoryImageDTO the entity to save\n * @return the persisted entity\n */\n CategoryImageDTO save(CategoryImageDTO categoryImageDTO);\n\n /**\n * Get all the categoryImages.\n *\n * @return the list of entities\n */\n List<CategoryImageDTO> findAll();\n\n /**\n * Get the \"id\" categoryImage.\n *\n * @param id the id of the entity\n * @return the entity\n */\n CategoryImageDTO findOne(Long id);\n\n /**\n * Delete the \"id\" categoryImage.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "public interface FileEngin {\n\n /**\n * 上传图片\n * @param fileList\n * @return\n */\n public String uploadImage(List<File> fileList);\n}", "public interface InstagramService {\n\n @GET(\"/tags/{tag-name}/media/recent\")\n void getRecentMedia(\n @Path(\"tag-name\") String tag,\n @Query(\"client_id\") String clientId,\n Callback<RecentMedia> callback\n );\n\n @GET(\"/tags/{tag-name}/media/recent\")\n void getRecentMedia(\n @Path(\"tag-name\") String tag,\n @Query(\"client_id\") String clientId,\n @Query(\"max_tag_id\") String maxTagId,\n Callback<RecentMedia> callback\n );\n}", "public interface UploadsImService {\n @Multipart\n @POST(\"/api\")\n Single<ResponseBody> postImage(@Part MultipartBody.Part image);\n}", "public interface ApiManager {\n @POST\n Call<ResponseBody> upload(@Url() String url);\n\n //上传文件\n @POST\n Call<ResponseBody> uploadFile(@Url() String url, @Body RequestBody body);\n\n //修改手机号\n @POST\n Call<ResponseBody> changePhone(@Url() String url);\n\n //订单详情\n @POST\n Observable<PayDetails> orderDetatls(@Url() String url);\n\n //通知已读\n @POST\n Call<ResponseBody> notityReader(@Url() String url);\n}", "public void mo38841a(ImagesRequest imagesRequest) {\n }", "public interface IModelCamera {\n void saveImageIntoDatabase(ArrayList<String> data);\n\n PanoramicImage getImage(String path);\n\n void saveTagIntoDatabase(String id, String imagePath, String name);\n\n void deleteTagFromDatabase(String id);\n\n List<CustomTag> getImageTagsFromDatabase(String imagePath);\n\n List<PanoramicImage> getImages();\n\n void deleteImageFromDatabase(String path);\n\n}", "public interface Requests {\n // API To fetch movies\n @GET(\"list_movies.json\")\n Call<MoviesResponse> getMoviesList(\n @Query(\"genre\") String genre,\n @Query(\"sort_by\") String sortBy,\n @Query(\"page\") int page);\n\n // API to search movies\n @GET(\"list_movies.json\")\n Call<MoviesResponse> searchMovie(@Query(\"query_term\") String queryTerm);\n\n // API To fetch movie details\n @GET(\"movie_details.json?with_cast=true&with_images=true\")\n Call<MovieDetailsResponse> getMovieDetails(@Query(\"movie_id\") String id);\n\n // API to get similar movies\n @GET(\"movie_suggestions.json\")\n Call<MoviesResponse> getSimilarMovies(@Query(\"movie_id\") String id);\n}", "public interface SEExamService {\n\n /**\n * 蜗牛备考提醒\n *\n * @param cb\n */\n @Multipart\n @POST(\"/api/remind\")\n public void examRemind(@Part(\"no\") String no,\n Callback<SERemindResult> cb);\n\n /**\n * 备考攻略列表\n *\n * @param cb\n */\n @GET(\"/api/testNews/list\")\n public void fetchExam(@Query(\"page\") int page,\n @Query(\"limit\") int limit,\n @Query(\"length\") int length,\n Callback<SEExamResult> cb);\n\n /**\n * 备考攻略详情\n *\n * @param cb\n */\n @GET(\"/api/newsHtml\")\n public void fetchExamDetail(@Query(\"id\") String id,\n Callback<SEExamDetailResult> cb);\n}", "public interface ContentApiInterface {\n\n //@FormUrlEncoded\n @POST(\"banner\")\n Call<List<Banner>> getBanner(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"premium-{page}\")\n Call<List<AlbumModel>> getPremiumList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"page\") String page);\n\n @POST(\"free-{page}\")\n Call<List<AlbumModel>> getFreeList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"page\") String page);\n\n @POST(\"hits\")\n Call<List<HitsModel>> getHitsList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"selected\")\n Call<List<SelectedModel>> getSelectedList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"mylist\")\n Call<List<MyListModel>> getMyList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"highlight-{page}\")\n Call<List<ExclusiveModel>> getHighlightList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"page\") String page);\n\n @POST(\"recent-{page}\")\n Call<List<NewAlbumModel>> getRecentList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"page\") String page);\n\n @POST(\"list_genre\")\n Call<List<GenreModel>> getAllCategory(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"{like}\")\n Call<LikeModel> getLikeStatus(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"like\") String like);\n\n @POST(\"{album}\")\n Call<List<AlbumModel>> getAlbums(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"album\") String album);\n\n @POST(\"{artist}\")\n Call<List<ArtistModel>> getArtists(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"artist\") String album);\n\n @POST(\"{album}\")\n Call<List<AlbumModel>> getAlbumByCategory(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"album\") String album);\n\n @POST(\"{album}\")\n Call<List<AlbumModel>> getAlbumByArtist(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"album\") String album);\n\n @POST(\"get_album-{albumId}\")\n Call<List<SongModel>> getSongListByAlbum(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"albumId\") String albumId);\n\n @POST(\"{album}\")\n Call<List<AlbumModel>> getSingleAlbum(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"album\") String album);\n\n @POST(\"{search}\")\n Call<List<SongModel>> getTrackListBySearch(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"search\") String album);\n\n @POST(\"{search}\")\n Call<List<SearchAlbumModel>> getAlbumListBySearch(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"search\") String album);\n\n @POST(\"{search}\")\n Call<List<SearchArtistModel>> getArtistListBySearch(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"search\") String album);\n\n @POST(\"{suggestion}\")\n Call<List<SuggestionModel>> getSuggestionList(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"suggestion\") String suggestion);\n\n @POST(\"{log}\")\n Call<Log> logPlayer(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"log\") String suggestion);\n\n @POST(\"new\")\n Call<List<AlbumModel>> newAlbum(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"{album}\")\n Call<List<SongModel>> getAlbum(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"album\") String albumName);\n\n @POST(\"get_album_using_track-{trackId}\")\n Call<List<SongModel>> getAlbumByTrack(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"trackId\") String trackId);\n\n @POST(\"my_msisdn\")\n Call<Msisdn> getMdn(@Header(\"Authorization\") String key, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"viewstatus-{trackId}\")\n Call<ResponseBody> viewstatus(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"trackId\") String trackId);\n\n @POST(\"deactivation\")\n Call<ResponseBody> deactivation(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"charge-{trackId}-{pin}\")\n Call<ResponseBody> activation(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token, @Path(\"trackId\") String trackId, @Path(\"pin\") String pin);\n\n @POST(\"version\")\n Call<List<Version>> version(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"config\")\n Call<List<Config>> getConfig(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"notice\")\n Call<List<NoticeModel>> getNotice(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"bkashviewstatus\")\n Call<List<Bkash>> bkashViewStatus(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"bkashdeactivation\")\n Call<List<Bkash>> bkashDeactivation(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"bkashactivation\")\n Call<List<Bkash>> bkashActivation(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n\n @POST(\"substext\")\n Call<List<Plantext>> getplantext(@Header(\"Authorization\") String authorization, @Header(\"CARRIER\") String carrier, @Header(\"MOBILE\") String mobile, @Header(\"RGTOKEN\") String token);\n}", "public interface IImageLoaderClient {\n public void init(Context context);\n\n public void destroy(Context context);\n\n public File getCacheDir(Context context);\n\n public void clearMemoryCache(Context context);\n\n public void clearDiskCache(Context context);\n\n public Bitmap getBitmapFromCache(Context context, String url);\n\n public void getBitmapFromCache(Context context, String url, IGetBitmapListener listener);\n\n public void displayImage(Context context, int resId, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView, boolean isCache);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, ImageSize size);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, ImageSize size);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, boolean cacheInMemory);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, boolean cacheInMemory);\n\n\n public void displayImage(Context context, String url, ImageView imageView, IImageLoaderListener listener);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, IImageLoaderListener listener);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, IImageLoaderListener listener);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, IImageLoaderListener listener);\n\n\n public void displayCircleImage(Context context, String url, ImageView imageView, int defRes);\n\n public void displayCircleImage(Fragment fragment, String url, ImageView imageView, int defRes);\n @Deprecated\n public void displayRoundImage(Context context, String url, ImageView imageView, int defRes, int radius);\n\n public void displayRoundImage(Fragment fragment, String url, ImageView imageView, int defRes, int radius);\n\n public void displayBlurImage(Context context, String url, int blurRadius, IGetDrawableListener listener);\n\n public void displayBlurImage(Context context, String url, ImageView imageView, int defRes, int blurRadius);\n\n public void displayBlurImage(Context context, int resId, ImageView imageView, int blurRadius);\n\n public void displayBlurImage(Fragment fragment, String url, ImageView imageView, int defRes, int blurRadius);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, BitmapTransformation transformations);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, BitmapTransformation transformations);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, int defRes);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, int defRes);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n\n //add shiming 2018.4.20 transformation 需要装换的那种图像的风格,错误图片,或者是,正在加载中的错误图\n public void displayImageInResourceTransform(Activity activity, int resId, ImageView imageView, Transformation transformation, int errorResId);\n public void displayImageInResourceTransform(Context context, int resId, ImageView imageView, Transformation transformation, int errorResId);\n public void displayImageInResourceTransform(Fragment fragment, int resId, ImageView imageView, Transformation transformation, int errorResId);\n\n //这是对网络图片,进行的图片操作,使用的glide中的方法\n public void displayImageByNet(Context context, String url, ImageView imageView, int defRes, Transformation transformation);\n public void displayImageByNet(Fragment fragment, String url, ImageView imageView, int defRes, Transformation transformation);\n public void displayImageByNet(Activity activity, String url, ImageView imageView, int defRes, Transformation transformation);\n\n\n /**\n * 停止图片的加载,对某一个的Activity\n * @hide\n */\n public void clear(Activity activity, ImageView imageView);\n /**\n * 停止图片的加载,context\n * {@hide}\n */\n public void clear(Context context, ImageView imageView);\n /**\n * 停止图片的加载,fragment\n * {@hide}\n */\n public void clear(Fragment fragment, ImageView imageView);\n\n\n //如果需要的话,需要指定加载中,或者是失败的图片\n public void displayImageByDiskCacheStrategy(Fragment fragment, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n public void displayImageByDiskCacheStrategy(Activity activity, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n public void displayImageByDiskCacheStrategy(Context context, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n //某些情形下,你可能希望只要图片不在缓存中则加载直接失败(比如省流量模式)\n public void disPlayImageOnlyRetrieveFromCache(Fragment fragment, String url, ImageView imageView);\n public void disPlayImageOnlyRetrieveFromCache(Activity activity, String url, ImageView imageView);\n public void disPlayImageOnlyRetrieveFromCache(Context context, String url, ImageView imageView);\n\n\n\n /**\n *如果你想确保一个特定的请求跳过磁盘和/或内存缓存(比如,图片验证码 –)\n * @param fragment\n * @param url\n * @param imageView\n * @param skipflag 是否跳过内存缓存\n * @param diskCacheStratey 是否跳过磁盘缓存\n */\n public void disPlayImageSkipMemoryCache(Fragment fragment, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n public void disPlayImageSkipMemoryCache(Activity activity, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n public void disPlayImageSkipMemoryCache(Context context, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n\n /**\n * 知道这个图片会加载失败,那么的话,我们可以重新加载\n * @param fragment\n * @param url\n * @param fallbackUrl\n * @param imageView\n */\n //从 Glide 4.3.0 开始,你可以很轻松地使用 .error() 方法。这个方法接受一个任意的 RequestBuilder,它会且只会在主请求失败时开始一个新的请求:\n public void disPlayImageErrorReload(Fragment fragment, String url, String fallbackUrl, ImageView imageView);\n public void disPlayImageErrorReload(Activity activity, String url, String fallbackUrl, ImageView imageView);\n public void disPlayImageErrorReload(Context context, String url, String fallbackUrl, ImageView imageView);\n\n\n /**\n 未来 Glide 将默认加载硬件位图而不需要额外的启用配置,只保留禁用的选项 现在已经默认开启了这个配置,但是在有些情况下需要关闭\n 所以提供了以下的方法,禁用硬件位图 disallowHardwareConfig\n * @param fragment\n * @param url\n * @param imageView\n */\n// 哪些情况不能使用硬件位图?\n// 在显存中存储像素数据意味着这些数据不容易访问到,在某些情况下可能会发生异常。已知的情形列举如下:\n// 在 Java 中读写像素数据,包括:\n// Bitmap#getPixel\n// Bitmap#getPixels\n// Bitmap#copyPixelsToBuffer\n// Bitmap#copyPixelsFromBuffer\n// 在本地 (native) 代码中读写像素数据\n// 使用软件画布 (software Canvas) 渲染硬件位图:\n// Canvas canvas = new Canvas(normalBitmap)\n//canvas.drawBitmap(hardwareBitmap, 0, 0, new Paint());\n// 在绘制位图的 View 上使用软件层 (software layer type) (例如,绘制阴影)\n// ImageView imageView = …\n// imageView.setImageBitmap(hardwareBitmap);\n//imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);\n// 打开过多的文件描述符 . 每个硬件位图会消耗一个文件描述符。\n// 这里存在一个每个进程的文件描述符限制 ( Android O 及更早版本一般为 1024,在某些 O-MR1 和更高的构建上是 32K)。\n// Glide 将尝试限制分配的硬件位图以保持在这个限制以内,但如果你已经分配了大量的文件描述符,这可能是一个问题。\n// 需要ARGB_8888 Bitmaps 作为前置条件\n// 在代码中触发截屏操作,它会尝试使用 Canvas 来绘制视图层级。\n// 作为一个替代方案,在 Android O 以上版本你可以使用 PixelCopy.\n// 共享元素过渡 (shared element transition)(OMR1已修复)\n public void disPlayImagedisallowHardwareConfig(Fragment fragment, String url, ImageView imageView);\n public void disPlayImagedisallowHardwareConfig(Activity activity, String url, ImageView imageView);\n public void disPlayImagedisallowHardwareConfig(Context context, String url, ImageView imageView);\n\n //监听图片的下载进度,是否完成,百分比 也可以加载本地图片,扩张一下\n public void disPlayImageProgress(Context context, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n public void disPlayImageProgress(Activity activity, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n public void disPlayImageProgress(Fragment fragment, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n\n public void disPlayImageProgressByOnProgressListener(Context context, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n public void disPlayImageProgressByOnProgressListener(Activity activity, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n public void disPlayImageProgressByOnProgressListener(Fragment fragment, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n\n\n\n// TransitionOptions 用于给一个特定的请求指定过渡。\n// 每个请求可以使用 RequestBuilder 中的 transition()\n// 方法来设定 TransitionOptions 。还可以通过使用\n// BitmapTransitionOptions 或 DrawableTransitionOptions\n// 来指定类型特定的过渡动画。对于 Bitmap 和 Drawable\n// 之外的资源类型,可以使用 GenericTransitionOptions。 Glide v4 将不会默认应用交叉淡入或任何其他的过渡效果。每个请求必须手动应用过渡。\n public void displayImageByTransition(Context context, String url, TransitionOptions transitionOptions, ImageView imageView);\n public void displayImageByTransition(Activity activity, String url, TransitionOptions transitionOptions, ImageView imageView);\n public void displayImageByTransition(Fragment fragment, String url, TransitionOptions transitionOptions, ImageView imageView);\n\n //失去焦点,建议实际的项目中少用,取消求情\n public void glidePauseRequests(Context context);\n public void glidePauseRequests(Activity activity);\n public void glidePauseRequests(Fragment fragment);\n\n //获取焦点,建议实际的项目中少用\n public void glideResumeRequests(Context context);\n public void glideResumeRequests(Activity activity);\n public void glideResumeRequests(Fragment fragment);\n //加载缩图图 int thumbnailSize = 10;//越小,图片越小,低网络的情况,图片越小\n //GlideApp.with(this).load(urlnoData).override(thumbnailSize))// API 来强制 Glide 在缩略图请求中加载一个低分辨率图像\n public void displayImageThumbnail(Context context, String url, String backUrl, int thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Activity activity, String url, String backUrl, int thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Fragment fragment, String url, String backUrl, int thumbnailSize, ImageView imageView);\n //如果没有两个url的话,也想,记载一个缩略图\n public void displayImageThumbnail(Fragment fragment, String url, float thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Activity activity, String url, float thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Context context, String url, float thumbnailSize, ImageView imageView);\n}", "public interface ApiEndpoints {\n @GET\n Call<String> rxGetImageCall(@Url String imageUrl);\n}", "public interface AfterSaleService extends BaseService<AfterSale> {\r\n\r\n\r\n void uplaodPicture(Long orderid, MultipartFile[] myavatar) throws IOException;\r\n\r\n List<AfterSale> afterSales(Long orderid);\r\n\r\n}", "public interface RESTService {\n\n /**\n * Check Voter Services\n **/\n\n //TODO to check this is work or not\n //@GET(Config.REGISTER) Call<User> registerUser(@Header(\"uuid\") String uuid,\n // @QueryMap Map<String, String> body);\n\n @GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);\n\n /**\n * Maepaysoh services\n **/\n\n //candidate\n @GET(Config.CANDIDATE_LIST_URL) Call<CandidateListReturnObject> getCandidateList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.CANDIDATE_URL + \"/{id}\") Call<JsonObject> getCandidate(@Path(\"id\") String id,\n @QueryMap Map<String, String> optionalQueries);\n\n //geo location\n @GET(Config.GEO_LOCATION_URL) Call<GeoReturnObject> getLocationList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.GEO_LOCATION_SEARCH) Call<JsonObject> searchLocation(\n @QueryMap Map<String, String> optionalQueries);\n\n //party\n @GET(Config.PARTY_LIST_URL) Call<PartyReturnObject> getPartyList(\n @QueryMap Map<String, String> optionalQueries);\n\n @GET(Config.PARTY_LIST_URL + \"/{id}\") Call<JsonObject> getPartyDetail(@Path(\"id\") String id);\n\n //OMI service\n @GET(Config.MOTION_DETAIL_URL) Call<JsonObject> getMotionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.MOTION_COUNT) Call<JsonObject> getMotionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_DETAIL_URL) Call<JsonObject> getQuestionDetail(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_COUNT) Call<JsonObject> getQuestionCount(@Query(\"mpid\") String mpId);\n\n @GET(Config.QUESTION_MOTION) Call<JsonObject> getQuestionAndMotion(@Query(\"mpid\") String mpId);\n\n @GET(Config.COMPARE_QUESTION) Call<JsonElement> getCompareQuestion(\n @Query(\"first\") String first_candidate_id, @Query(\"second\") String second_candidate_id);\n\n @GET(Config.CANDIDTE_AUTO_SEARCH) Call<ArrayList<CandidateSearchResult>> searchCandidate(\n @Query(\"q\") String keyWord, @QueryMap Map<String, Integer> options);\n\n @GET(Config.CANDIDATE_COUNT) Call<JsonObject> getCandidateCount(@Query(\"party\") String party_id);\n\n @GET(Config.CURRENT_COUNT) Call<JsonObject> getCurrentCount();\n\n @GET(Config.FAQ_LIST_URL) Call<FAQListReturnObject> listFaqs(\n @QueryMap Map<String, String> options);\n\n @GET(Config.FAQ_SEARCH) Call<FAQListReturnObject> searchFaq(@Query(\"q\") String keyWord,\n @QueryMap Map<String, String> options);\n\n @GET(\"/faq/{faq_id}\") Call<FAQDetailReturnObject> searchFaqById(@Path(\"faq_id\") String faqId,\n @QueryMap Map<String, String> options);\n\n @GET(Config.APP_VERSIONS) Call<JsonObject> checkUpdate();\n}", "public interface IImageMetadata {\n\n public String getImageType();\n\n public void setImageType(String imageType);\n\n public String getFilename();\n\n public void setFilename(String filename);\n\n public DateTime getLastModified();\n\n public void setLastModified(DateTime d);\n\n public DateTime getCreated();\n\n public void setCreated(DateTime d);\n\n public long getSize();\n\n public void setSize(long size);\n\n public String getReadableSize();\n\n}", "public interface APIInterface {\n @POST(Constants.POST_ENV_BIDDING)\n Call<String> envBidding(@Body Bidding bidding);\n\n @POST(Constants.POST_UPDATE_OFFER)\n Call<String> updateOffer(@Body Interested interested);\n\n @GET(Constants.GET_INFO_OFFER)\n Call<OfferProduct> getInfoOffer(@Path(\"id_offer\") String id_offer);\n\n @GET(Constants.GET_LIST_OFFER)\n Call<ArrayList<OfferProduct>> getListOffer(@Path(\"product\") String product);\n\n @GET(Constants.GET_LIST_BIDDING)\n Call<ArrayList<Bidding>> getListBidding();\n\n @GET(Constants.GET_LIST_TAG)\n Call<ArrayList<String>> getListTag();\n\n}", "public interface IPublishArticle {\n @POST(ServerInterface.PUBLISH_ARTICLE)\n @Multipart\n Call<String> publishArticle(@Part MultipartBody.Part pic, @Part(\"type\") String type, @Part(\"friendCircle.user.id\") String userId, @Part(\"friendCircle.topic.id\") String topicId, @Part(\"friendCircle.msg\") String content);\n}", "public interface ApiService {\n\n\n //--------------------------------------------Movies------------------------------------------------------------------------------\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMoviesByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"movie/{popular}?\" + ApiConstants.ApiKey)\n Call<MovieModel> getMovies(@Path(\"popular\")String popular,@Query(\"page\") int page);\n\n @GET(\"movie/{movie_id}?\" + ApiConstants.ApiKey)\n Call<Movie> getMovie(@Path(\"movie_id\") int link,@Query(\"append_to_response\")String credits);\n\n @GET(\"movie/{movie_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getMovieCredits(@Path(\"movie_id\") int link);\n\n @GET(\"genre/movie/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getGenres();\n\n @GET(\"movie/{movie_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSimilar(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getVideo(@Path(\"movie_id\") int link);\n\n @GET(\"search/movie?\" + ApiConstants.ApiKey)\n Call<MovieModel> getSearchMovie(@Query(\"query\") String query);\n\n @GET(\"movie/{movie_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getMovieImages(@Path(\"movie_id\") int link);\n\n @GET(\"movie/{movie_id}/reviews?\" + ApiConstants.ApiKey)\n Call<ReviewsModel> getMovieReviews(@Path(\"movie_id\") int link);\n\n //--------------------------------------------Shows------------------------------------------------------------------------------\n @GET(\"genre/tv/list?\" + ApiConstants.ApiKey)\n Call<GenresModel> getTVGenres();\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByGenre(@Query(\"with_genres\") String genre,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByNetwork(@Query(\"with_networks\") int id,@Query(\"page\") int page);\n\n @GET(\"discover/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getTVByYear(@Query(\"primary_release_year\") int year,@Query(\"page\") int page);\n\n @GET(\"tv/{tv_id}?\" + ApiConstants.ApiKey)\n Call<Shows> getShows(@Path(\"tv_id\") int link ,@Query(\"append_to_response\")String credits);\n\n @GET(\"tv/{shows}?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getShows(@Path(\"shows\")String shows,@Query(\"page\") int page);\n\n @GET(\"search/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSearchShows(@Query(\"query\") String query);\n\n @GET(\"tv/{tv_id}/\" + \"videos?\" + ApiConstants.ApiKey)\n Call<VideoModel> getShowVideo(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/\" + \"similar?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getSimilarShows(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getShowCredits(@Path(\"tv_id\") int link);\n\n @GET(\"tv/{tv_id}/images?\" + ApiConstants.ApiKey)\n Call<ImageModel> getShowsImages(@Path(\"tv_id\") int link);\n\n\n //--------------------------------------------Person------------------------------------------------------------------------------\n\n @GET(\"person/popular?\" + ApiConstants.ApiKey)\n Call<PersonModel> getPopularPeople(@Query(\"page\") int page);\n\n @GET(\"person/{person_id}/\" + \"movie_credits?\" + ApiConstants.ApiKey)\n Call<CreditsModel> getPersonCredits(@Path(\"person_id\") int link);\n\n @GET(\"person/{person_id}?\" + ApiConstants.ApiKey)\n Call<Person> getPerson(@Path(\"person_id\") int link);\n\n @GET(\"search/person?\" + ApiConstants.ApiKey)\n Call<PersonModel> getSearchPerson(@Query(\"query\") String query);\n\n //--------------------------------------------Login------------------------------------------------------------------------------\n\n @GET(\"authentication/{guest_session}/new?\" + ApiConstants.ApiKey)\n Call<User> getGuestUser(@Path(\"guest_session\")String guest);\n\n @GET(\"authentication/token/validate_with_login?\" + ApiConstants.ApiKey)\n Call<User> getValidateUser(@Query(\"username\") String username,@Query(\"password\") String password,@Query(\"request_token\")String request_token);\n\n @GET(\"authentication/session/new?\" + ApiConstants.ApiKey)\n Call<User> getUserSession(@Query(\"request_token\") String reques_token);\n\n @GET(\"account?\" + ApiConstants.ApiKey)\n Call<User> getUserDetails(@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Favorites------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/favorite/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getFavorites(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Movie> postUserFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @POST(\"account/{account_id}/favorite?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowFavorites(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body FavoriteMoviePost body);\n\n @GET(\"account/{account_id}/favorite/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsFavorites(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"tv/{tv_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Shows> getShowFavorite(@Path(\"tv_id\") int link,@Query(\"session_id\")String session_id);\n\n //--------------------------------------------Watchlist------------------------------------------------------------------------------\n\n @GET(\"account/{account_id}/watchlist/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"movie/{movie_id}/\" + \"account_states?\" + ApiConstants.ApiKey)\n Call<Movie> getWatchlist(@Path(\"movie_id\") int link,@Query(\"session_id\")String session_id);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Movie> postUserWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @POST(\"account/{account_id}/watchlist?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowWatchlist(@Path(\"account_id\") String account_id, @Query(\"session_id\") String session_id, @Body WatchlistMoviePost body);\n\n @GET(\"account/{account_id}/watchlist/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserShowsWatchlist(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n //--------------------------------------------Rated------------------------------------------------------------------------------\n\n @POST(\"movie/{movie_id}/rating?\" + ApiConstants.ApiKey)\n Call<Movie> postUserRating(@Path(\"movie_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @POST(\"tv/{tv_id}/rating?\" + ApiConstants.ApiKey)\n Call<Shows> postUserShowRating(@Path(\"tv_id\") int account_id, @Query(\"session_id\") String session_id,@Body Rated body);\n\n @GET(\"account/{account_id}/rated/movies?\" + ApiConstants.ApiKey)\n Call<MovieModel> getUserRated(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n\n @GET(\"account/{account_id}/rated/tv?\" + ApiConstants.ApiKey)\n Call<ShowsModel> getUserRatedShows(@Path(\"account_id\") String account_id,@Query(\"session_id\") String session_id);\n}", "GetImagesResult getImages(GetImagesRequest getImagesRequest);", "public interface IEndpoint\n{\n @GET(Contract.PATH_POPULAR_MOVIE)\n Call<MovieResponse> getPopularMovies(@Query(\"api_key\") String apiKey);\n\n @GET(Contract.PATH_TOP_RATED_MOVIE)\n Call<MovieResponse> getTopRatedMovies(@Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}/videos\")\n Call<MovieTrailer> getMovieTrailer(@Path(\"id\") int id,\n @Query(\"api_key\") String apiKey);\n\n @GET(\"movie/{id}/reviews\")\n Call<MovieReview> getMovieReview(@Path(\"id\") int id,\n @Query(\"api_key\") String apiKey);\n\n @GET(Contract.SIZE_MOBILE + \"{posterImagePath}\")\n Call<ResponseBody> getPosterImage(\n @Path(value = \"posterImagePath\", encoded = true)\n String posterImagePath);\n\n @GET(\"w780{backdropImagePath}\")\n Call<ResponseBody> getBackdropImage(\n @Path(value = \"backdropImagePath\", encoded = true)\n String backdropImagePath);\n}", "public interface ContentService extends KekeinfoEntityService<Long, Content>\n \n{\n\n\tpublic List<Content> listByType( String contentType)\n\t throws ServiceException;\n\n /**\n * Method responsible for storing content file for given Store.Files for given merchant store will be stored in\n * Infinispan.\n * \n * @param merchantStoreCode merchant store whose content images are being saved.\n * @param contentFile content image being stored\n * @throws ServiceException\n */\n void addContentFile(InputContentFile contentFile )\n throws ServiceException;\n\n \n /**\n * Method responsible for storing list of content image for given Store.Images for given merchant store will be stored in\n * Infinispan.\n * \n * @param merchantStoreCode merchant store whose content images are being saved.\n * @param contentImagesList list of content images being stored.\n * @throws ServiceException\n */\n void addContentFiles(List<InputContentFile> contentFilesList) throws ServiceException;\n \n \n /**\n * Method to remove given content image.Images are stored in underlying system based on there name.\n * Name will be used to search given image for removal\n * @param imageContentType\n * @param imageName\n * @param merchantStoreCode merchant store code\n * @throws ServiceException\n */\n public void removeFile(FileContentType fileContentType, String fileName) throws ServiceException;\n \n \n /**\n * Method to remove all images for a given merchant.It will take merchant store as an input and will\n * remove all images associated with given merchant store.\n * \n * @param merchantStoreCode\n * @throws ServiceException\n */\n public void removeFiles() throws ServiceException;\n \n /**\n * Method responsible for fetching particular content image for a given merchant store. Requested image will be\n * search in Infinispan tree cache and OutputContentImage will be sent, in case no image is found null will\n * returned.\n * \n * @param merchantStoreCode\n * @param imageName\n * @return {@link OutputContentImage}\n * @throws ServiceException\n */\n public OutputContentFile getContentFile(FileContentType fileContentType, String fileName )\n throws ServiceException;\n \n public InputStream getContentFileInputstream(FileContentType fileContentType, String fileName )\n throws ServiceException;\n \n \n /**\n * Method to get list of all images associated with a given merchant store.In case of no image method will return an empty list.\n * @param merchantStoreCode\n * @param imageContentType\n * @return list of {@link OutputContentImage}\n * @throws ServiceException\n */\n public List<OutputContentFile> getContentFiles(FileContentType fileContentType )\n throws ServiceException;\n\n\t\n List<String> getContentFilesNames(\n\t\t\tFileContentType fileContentType) throws ServiceException;\n\n /**\n * Add the store logo\n * @param merchantStoreCode\n * @param cmsContentImage\n * @throws ServiceException\n */\n\tvoid addLogo(InputContentFile cmsContentImage)\n\t\t\tthrows ServiceException;\n\n\t/**\n\t * Adds a property (option) image\n\t * @param merchantStoreId\n\t * @param cmsContentImage\n\t * @throws ServiceException\n\t */\n\tvoid addOptionImage(InputContentFile cmsContentImage)\n\t\t\tthrows ServiceException;\n\n\t\n\n}", "public interface GitHubService {\n\n @GET(\"/repos/{owner}/{repo}/contributors\")\n Call<List<Contributor>> contributors(\n @Path(\"owner\") String owner,\n @Path(\"repo\") String repo\n );\n\n @GET(\"/repos/square/retrofit/issues\")\n Call<List<Issue>> retrofiIssues();\n}", "public interface ApiInterface {\n\n @GET(\"Articles/\")\n Call<List<Article>> getAllArticles();\n\n\n}", "public interface GenreService {\r\n\r\n /**\r\n * Returns a hierarchical map of all genres and subgenres.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);\r\n\r\n /**\r\n * Returns a list of all new releases by genre.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param genreId\r\n * the ID of the genre to load new releases\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres/{genreId}/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"genreId\") String genreId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n}", "public interface IRecommendService {\n\n long add(Recommend recommendVo);\n long edit(Recommend recommendVo);\n boolean remove(long id);\n PageInfoResult<Recommend> list(PageConfig pageConfig, Recommend recommend);\n boolean hits(Long id);\n\n Recommend get(long id);\n}", "public interface ApiService {\n @GET(\"MainQuize.json\")//list\n Call<MainQuizeDao> loadPhotoList();\n}", "public interface IImageLoader {\n void displayHeadImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, File file, ImageView imageView);\n\n void displayImage(Context context, int resId, ImageView imageView);\n\n void displayImage(Context context, Bitmap bitmap, ImageView imageView);\n\n\n void displayCircleImage(Context context, String url, ImageView imageView);\n\n void displayCircleImage(Context context, File file, ImageView imageView);\n\n void displayCircleImage(Context context, int resId, ImageView imageView);\n\n void displayCircleImage(Context context, Bitmap bitmap, ImageView imageView);\n\n}", "public interface RetroiftService {\n @GET(\"catalog\")\n Call<CgBaseEntity> getCategories(@Query(\"key\") String key);\n\n @FormUrlEncoded\n @POST(\"query\")\n Call<BookBaseEntity> getBookList(@Field(\"catalog_id\") String id, @Field(\"pn\") String\n pn, @Field(\"rn\") String rn, @Field(\"key\") String key);\n\n}", "public interface ApiService {\n\n\n // Upload Documents image\n @POST(\"document_upload\")\n Call<ResponseBody> uploadDocumentImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n // Upload Profile image\n @POST(\"upload_profile_image\")\n Call<ResponseBody> uploadProfileImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n\n //Login\n @GET(\"login\")\n Call<ResponseBody> login(@Query(\"mobile_number\") String mobilenumber, @Query(\"user_type\") String usertype, @Query(\"country_code\") String countrycode, @Query(\"password\") String password, @Query(\"device_id\") String deviceid, @Query(\"device_type\") String devicetype, @Query(\"language\") String language);\n\n\n //Login\n @GET(\"vehicle_details\")\n Call<ResponseBody> vehicleDetails(@Query(\"vehicle_id\") long vehicleid, @Query(\"vehicle_name\") String vehiclename, @Query(\"vehicle_type\") String vehicletype, @Query(\"vehicle_number\") String vehiclenumber, @Query(\"token\") String token);\n\n //Forgot password\n @GET(\"forgotpassword\")\n Call<ResponseBody> forgotpassword(@Query(\"mobile_number\") String mobile_number,@Query(\"user_type\") String user_type, @Query(\"country_code\") String country_code, @Query(\"password\") String password, @Query(\"device_type\") String device_type, @Query(\"device_id\") String device_id, @Query(\"language\") String language);\n\n\n @GET(\"add_payout\")\n Call<ResponseBody> addPayout(@Query(\"email_id\") String emailId, @Query(\"user_type\") String userType, @Query(\"token\") String token);\n\n\n //Cancel trip\n @GET(\"cancel_trip\")\n Call<ResponseBody> cancelTrip(@Query(\"user_type\") String type, @Query(\"cancel_reason\") String cancel_reason, @Query(\"cancel_comments\") String cancel_comments, @Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Forgot password\n @GET(\"accept_request\")\n Call<ResponseBody> acceptRequest(@Query(\"user_type\") String type, @Query(\"request_id\") String request_id, @Query(\"status\") String status, @Query(\"token\") String token);\n\n //Confirm Arrival\n @GET(\"cash_collected\")\n Call<ResponseBody> cashCollected(@Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Confirm Arrival\n @GET(\"arive_now\")\n Call<ResponseBody> ariveNow(@Query(\"trip_id\") String trip_id, @Query(\"token\") String token);\n\n //Begin Trip\n @GET(\"begin_trip\")\n Call<ResponseBody> beginTrip(@Query(\"trip_id\") String trip_id, @Query(\"begin_latitude\") String begin_latitude, @Query(\"begin_longitude\") String begin_longitude, @Query(\"token\") String token);\n\n //End Trip\n @POST(\"end_trip\")\n Call<ResponseBody> endTrip(@Body RequestBody RequestBody);\n\n /*//End Trip\n @GET(\"end_trip\")\n Call<ResponseBody> endTrip(@Query(\"trip_id\") String trip_id, @Query(\"end_latitude\") String begin_latitude, @Query(\"end_longitude\") String begin_longitude, @Query(\"token\") String token);*/\n\n //Trip Rating\n @GET(\"trip_rating\")\n Call<ResponseBody> tripRating(@Query(\"trip_id\") String trip_id, @Query(\"rating\") String rating,\n @Query(\"rating_comments\") String rating_comments, @Query(\"user_type\") String user_type, @Query(\"token\") String token);\n\n\n // Update location with lat,lng and driverStatus\n @GET(\"updatelocation\")\n Call<ResponseBody> updateLocation(@QueryMap HashMap<String, String> hashMap);\n\n\n @GET(\"update_device\")\n Call<ResponseBody> updateDevice(@QueryMap HashMap<String, String> hashMap);\n\n\n // driverStatus Check\n @GET(\"check_status\")\n Call<ResponseBody> updateCheckStatus(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"earning_chart\")\n Call<ResponseBody> updateEarningChart(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"driver_rating\")\n Call<ResponseBody> updateDriverRating(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"rider_feedback\")\n Call<ResponseBody> updateRiderFeedBack(@QueryMap HashMap<String, String> hashMap);\n\n @GET(\"get_rider_profile\")\n Call<ResponseBody> getRiderDetails(@QueryMap HashMap<String, String> hashMap);\n\n //Number Validation\n @GET(\"register\")\n Call<ResponseBody> registerOtp(@Query(\"user_type\") String type, @Query(\"mobile_number\") String mobilenumber, @Query(\"country_code\") String countrycode, @Query(\"email_id\") String emailid, @Query(\"first_name\") String first_name, @Query(\"last_name\") String last_name, @Query(\"password\") String password, @Query(\"city\") String city, @Query(\"device_id\") String device_id, @Query(\"device_type\") String device_type,@Query(\"language\") String languageCode);\n\n @GET(\"driver_trips_history\")\n Call<ResponseBody> driverTripsHistory(@QueryMap HashMap<String, String> hashMap);\n\n //Driver Profile\n @GET(\"get_driver_profile\")\n Call<ResponseBody> getDriverProfile(@Query(\"token\") String token);\n\n\n\n //Driver Profile\n @GET(\"driver_bank_details\")\n Call<ResponseBody> updateBankDetails(@QueryMap HashMap<String, String> hashMap);\n\n //Currency list\n @GET(\"currency_list\")\n Call<ResponseBody> getCurrency(@Query(\"token\") String token);\n\n //language Update\n @GET(\"language\")\n Call<ResponseBody> language(@Query(\"language\") String languageCode, @Query(\"token\") String token);\n\n // Update User Currency\n @GET(\"update_user_currency\")\n Call<ResponseBody> updateCurrency(@Query(\"currency_code\") String currencyCode, @Query(\"token\") String token);\n\n @GET(\"update_driver_profile\")\n Call<ResponseBody> updateDriverProfile(@QueryMap LinkedHashMap<String, String> hashMap);\n\n //Upload Profile Image\n @POST(\"upload_image\")\n Call<ResponseBody> uploadImage(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n //Sign out\n @GET(\"logout\")\n Call<ResponseBody> logout(@Query(\"user_type\") String type, @Query(\"token\") String token);\n\n //Add payout perference\n @FormUrlEncoded\n @POST(\"add_payout_preference\")\n Call<ResponseBody> addPayoutPreference(@Field(\"token\") String token, @Field(\"address1\") String address1, @Field(\"address2\") String address2, @Field(\"email\") String email, @Field(\"city\") String city, @Field(\"state\") String state, @Field(\"country\") String country, @Field(\"postal_code\") String postal_code, @Field(\"payout_method\") String payout_method);\n\n //Payout Details\n @GET(\"payout_details\")\n Call<ResponseBody> payoutDetails(@Query(\"token\") String token);\n\n //Get Country List\n @GET(\"country_list\")\n Call<ResponseBody> getCountryList(@Query(\"token\") String token);\n\n //List of Stripe Supported Countries\n @GET(\"stripe_supported_country_list\")\n Call<ResponseBody> stripeSupportedCountry(@Query(\"token\") String token);\n\n //Get pre_payment\n @GET(\"payout_changes\")\n Call<ResponseBody> payoutChanges(@Query(\"token\") String token, @Query(\"payout_id\") String payout_id, @Query(\"type\") String type);\n\n // Add stripe payout preference\n @POST(\"add_payout_preference\")\n Call<ResponseBody> uploadStripe(@Body RequestBody RequestBody, @Query(\"token\") String token);\n\n // this api called to resume the trip from MainActivity while Driver get-in to app\n @GET(\"incomplete_trip_details\")\n Call<ResponseBody> getInCompleteTripsDetails(@Query(\"token\") String token);\n\n // get Trip invoice Details Rider\n @GET(\"get_invoice\")\n Call<ResponseBody> getInvoice(@Query(\"token\") String token,@Query(\"trip_id\") String TripId,@Query(\"user_type\") String userType);\n\n //Force Update API\n @GET(\"check_version\")\n Call<ResponseBody> checkVersion(@Query(\"version\") String code, @Query(\"user_type\") String type, @Query(\"device_type\") String deviceType);\n\n //Check user Mobile Number\n @GET(\"numbervalidation\")\n Call<ResponseBody> numbervalidation(@Query(\"mobile_number\") String mobile_number, @Query(\"country_code\") String country_code, @Query(\"user_type\") String user_type, @Query(\"language\") String language, @Query(\"forgotpassword\") String forgotpassword);\n\n\n//Get Bank Details Prefernce\n /* @GET(\"driver_bank_details\")\n Call<ResponseBody> driver_bank_details(@Query(\"account_holder_name\") String account_holder_name, @Query(\"account_number\") String account_number, @Query(\"bank_location\") String bank_location, @Query(\"bank_name\") String bank_name, @Query(\"token\") String token,@Query(\"user_type\")String user_type);\n*/\n}", "public interface ImageUploadService {\n @Headers({\n \"User-Agent: Mozilla/5.0\",\n \"Content-Type: image/png\"\n })\n @POST(\"\")\n Observable<ImageUpload> uploadImage4search(@Body RequestBody imgs);\n // Observable<ImageUpload> uploadImage4search(@PartMap Map<String, Object> fields, @Body RequestBody imgs);\n}", "public interface Group {\n\n void saveGroup(ServiceCallback<Group> callback);\n\n String getId();\n\n String getName();\n\n void setName(String name);\n\n String getCoverUrl();\n\n void setCoverImage(Bitmap bitmap);\n\n List<User> getUsers();\n\n void fetchUsers(ServiceCallback<Group> callback);\n\n List<User> getAdmins();\n\n void fetchAdmins(ServiceCallback<Group> callback);\n}", "public interface SpotService {\n\n String haveSpot(String spotName);\n\n JSONObject spotByName(String spotName);\n\n JSONObject spotById(Long id);\n\n JSONObject getSpotComment(Long id, int pageNum, int size);\n\n List<Spot> getAllSpot();\n\n void saveComment(SpotComment comment, HttpServletRequest request);\n\n JSONObject selectSpotByPage(int page, int rows, Spot spot);\n\n void update(Spot spot);\n\n void delSpot(Long[] ids);\n\n void addSpot(Spot spot);\n\n String uploadIndexImg(MultipartFile file, HttpServletRequest request) throws IOException;\n}" ]
[ "0.68129456", "0.6691733", "0.63974077", "0.63843685", "0.63075066", "0.6301345", "0.63005036", "0.62183326", "0.61795515", "0.61711043", "0.6134075", "0.61314404", "0.6108849", "0.60966575", "0.6073096", "0.60511506", "0.60427874", "0.60131705", "0.5999861", "0.59773374", "0.5919051", "0.5898619", "0.5872264", "0.58719796", "0.58566463", "0.582404", "0.58234596", "0.5800168", "0.5778602", "0.5778434", "0.57592785", "0.5751878", "0.57403123", "0.5739992", "0.57325876", "0.5723022", "0.57158023", "0.57103133", "0.5708503", "0.56986326", "0.5678426", "0.56668663", "0.56623226", "0.56406426", "0.56327444", "0.5616979", "0.5615933", "0.56147116", "0.5611071", "0.55929005", "0.55908203", "0.5583781", "0.55817664", "0.5570771", "0.5565247", "0.5558891", "0.5541855", "0.5531852", "0.5529914", "0.5528819", "0.5525921", "0.55126107", "0.5503386", "0.54949105", "0.54939556", "0.54915154", "0.5488342", "0.5487291", "0.5485168", "0.548062", "0.5474951", "0.5470817", "0.5465916", "0.546297", "0.54600096", "0.54498273", "0.5447153", "0.54433334", "0.5441083", "0.5430298", "0.5428757", "0.5416336", "0.5412545", "0.54104465", "0.540593", "0.540518", "0.5403011", "0.5402657", "0.5399595", "0.5392812", "0.5389036", "0.5367768", "0.5356896", "0.5356754", "0.5351553", "0.5349229", "0.5347668", "0.5338494", "0.5332366", "0.53223187" ]
0.72850233
0
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesAsync() { return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6183204", "0.6173539", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.6271086
6
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } final Boolean cacheImage = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6271086", "0.6183204", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.6173539
8
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) { return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.50187486", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.523216
37
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.523216", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.50187486
53
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
public Observable<OCRInner> oCRMethodAsync(String language) { return oCRMethodWithServiceResponseAsync(language).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() { @Override public OCRInner call(ServiceResponse<OCRInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}", "public boolean translateImageToText();", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }", "static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }", "void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}", "public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }", "public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }", "private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }", "public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }", "public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }", "public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }", "public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }", "protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }", "public List<Result> recognize(IplImage image);", "public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }", "private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }", "public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }", "public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }", "public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }", "private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }", "private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }", "private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }", "public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b>&nbsp</b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }", "private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }", "private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "public String getLanguage();", "public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }", "String getLang();", "@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "CLanguage getClanguage();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "Language findByName(String name);", "private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }", "public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }", "public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }", "public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }", "private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public abstract void startVoiceRecognition(String language);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "boolean hasLanguage();", "List<Label> findAllByLanguage(String language);", "public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }", "public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}", "public interface LanguageProvider {\n\tLanguageService study();\n}", "DetectionResult getObjInImage(Mat image);", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "private void performOCR(){\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "PsiFile[] findFilesWithPlainTextWords( String word);", "public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }", "public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "java.lang.String getTargetLanguageCode();", "private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}", "String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}", "int getLocalizedText();", "Builder addInLanguage(Text value);", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}", "public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }", "com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();", "@Override\n public String getText() {\n return analyzedWord;\n }", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }", "@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "String text();", "@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }", "public void setLanguage(String language);", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}" ]
[ "0.6339322", "0.5907689", "0.5881454", "0.5613236", "0.5499387", "0.5476547", "0.54720753", "0.54378355", "0.54378355", "0.54230297", "0.54117554", "0.5398961", "0.5386767", "0.5368199", "0.5356364", "0.5356364", "0.5356364", "0.5355748", "0.53044903", "0.52970636", "0.5259717", "0.5255546", "0.52474463", "0.5227633", "0.5227519", "0.51617426", "0.51373875", "0.5130657", "0.5124618", "0.5095856", "0.50732946", "0.5057377", "0.50524217", "0.5032287", "0.5028192", "0.5025107", "0.4976818", "0.49758172", "0.49750227", "0.4969493", "0.4966516", "0.49598026", "0.49463004", "0.4939654", "0.49355274", "0.49158987", "0.4907803", "0.4901162", "0.490093", "0.48949048", "0.48760468", "0.4872384", "0.48701173", "0.48626333", "0.48619446", "0.4859077", "0.48565146", "0.4836201", "0.48171046", "0.4813205", "0.4798623", "0.47593915", "0.47577217", "0.47507718", "0.4734132", "0.47277054", "0.4723872", "0.4680271", "0.4678034", "0.4665077", "0.4661084", "0.46390656", "0.46388733", "0.46339175", "0.46273252", "0.4624046", "0.46217933", "0.4621366", "0.46212766", "0.46193036", "0.46121076", "0.4601368", "0.46006227", "0.4598951", "0.4597816", "0.4596961", "0.45915458", "0.45913818", "0.45895725", "0.45786554", "0.4577141", "0.4571682", "0.45664972", "0.45600644", "0.45594302", "0.4558069", "0.45484012", "0.45455223", "0.45450306", "0.45446116", "0.45400605" ]
0.0
-1
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
public Observable<ServiceResponse<OCRInner>> oCRMethodWithServiceResponseAsync(String language) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } final Boolean cacheImage = null; final Boolean enhanced = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.oCRMethod(language, cacheImage, enhanced, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() { @Override public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OCRInner> clientResponse = oCRMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}", "public boolean translateImageToText();", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }", "static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }", "void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}", "public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }", "public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }", "private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }", "public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }", "public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }", "public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }", "public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }", "protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }", "public List<Result> recognize(IplImage image);", "public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }", "private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }", "public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }", "public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }", "public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }", "private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }", "private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }", "private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }", "public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b>&nbsp</b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }", "private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }", "private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "public String getLanguage();", "public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }", "String getLang();", "@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "CLanguage getClanguage();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "Language findByName(String name);", "private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }", "public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }", "public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }", "public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }", "private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public abstract void startVoiceRecognition(String language);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "boolean hasLanguage();", "List<Label> findAllByLanguage(String language);", "public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }", "public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}", "public interface LanguageProvider {\n\tLanguageService study();\n}", "DetectionResult getObjInImage(Mat image);", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "private void performOCR(){\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "PsiFile[] findFilesWithPlainTextWords( String word);", "public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }", "public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "java.lang.String getTargetLanguageCode();", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}", "public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}", "String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}", "int getLocalizedText();", "Builder addInLanguage(Text value);", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();", "public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }", "@Override\n public String getText() {\n return analyzedWord;\n }", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }", "@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }", "public void setLanguage(String language);", "String text();", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}" ]
[ "0.6340801", "0.5908911", "0.58815557", "0.56125695", "0.54998386", "0.5477398", "0.5472436", "0.54383487", "0.54383487", "0.54241633", "0.5411288", "0.5399041", "0.53873235", "0.5367456", "0.53567713", "0.53567713", "0.53567713", "0.5354653", "0.5304111", "0.5296139", "0.52609426", "0.5256295", "0.52469003", "0.5227871", "0.5227503", "0.51627934", "0.51366884", "0.5132681", "0.5124243", "0.50965005", "0.5073502", "0.50573194", "0.5053984", "0.50325114", "0.50287145", "0.5026039", "0.49775523", "0.49756226", "0.49754003", "0.49698895", "0.4965898", "0.49589223", "0.4947393", "0.49402016", "0.4936062", "0.491651", "0.49079528", "0.4901984", "0.4901873", "0.48954538", "0.48754418", "0.48720878", "0.48705855", "0.48639196", "0.4862045", "0.4859524", "0.4857446", "0.483705", "0.48177797", "0.48138455", "0.4799299", "0.4758428", "0.475805", "0.4751387", "0.47349215", "0.47277245", "0.4724874", "0.46811676", "0.4679775", "0.46651345", "0.46608913", "0.46405634", "0.46393868", "0.46346596", "0.46283433", "0.46246725", "0.4622929", "0.46218535", "0.46208444", "0.4619674", "0.46116024", "0.4601757", "0.4601488", "0.45977402", "0.4596848", "0.4596606", "0.45920032", "0.4591659", "0.45892608", "0.45795617", "0.45766595", "0.4571272", "0.45672256", "0.45600197", "0.45597628", "0.4557801", "0.45491737", "0.45459962", "0.4545532", "0.4545111", "0.45398226" ]
0.0
-1
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
public Observable<OCRInner> oCRMethodAsync(String language, Boolean cacheImage, Boolean enhanced) { return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() { @Override public OCRInner call(ServiceResponse<OCRInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}", "public boolean translateImageToText();", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }", "static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }", "void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}", "public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }", "public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }", "private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }", "public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }", "public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }", "public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }", "public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }", "protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }", "public List<Result> recognize(IplImage image);", "public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }", "public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }", "private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }", "public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }", "public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }", "private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }", "private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }", "private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }", "public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b>&nbsp</b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }", "private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }", "private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "public String getLanguage();", "public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }", "String getLang();", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "CLanguage getClanguage();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "Language findByName(String name);", "private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }", "public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }", "public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }", "public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }", "private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public abstract void startVoiceRecognition(String language);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "boolean hasLanguage();", "List<Label> findAllByLanguage(String language);", "public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }", "public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}", "public interface LanguageProvider {\n\tLanguageService study();\n}", "DetectionResult getObjInImage(Mat image);", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "private void performOCR(){\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "PsiFile[] findFilesWithPlainTextWords( String word);", "public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }", "public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "java.lang.String getTargetLanguageCode();", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}", "public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}", "String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}", "Builder addInLanguage(Text value);", "int getLocalizedText();", "public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }", "com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();", "@Override\n public String getText() {\n return analyzedWord;\n }", "public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }", "public void setLanguage(String language);", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }", "String text();", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}" ]
[ "0.6340444", "0.5907014", "0.5881825", "0.5613604", "0.5501345", "0.5476807", "0.54720134", "0.5439289", "0.5439289", "0.5422724", "0.5412727", "0.5398816", "0.53872037", "0.53670835", "0.5357576", "0.5357576", "0.5357576", "0.5356866", "0.53034747", "0.5297329", "0.5260379", "0.5254473", "0.5246585", "0.5228318", "0.52282864", "0.51628226", "0.51364416", "0.5131521", "0.5125658", "0.5094378", "0.5072984", "0.50591296", "0.5053911", "0.5033745", "0.5029701", "0.5023699", "0.49775946", "0.49752378", "0.49746957", "0.49692988", "0.49669984", "0.49603295", "0.494737", "0.49402708", "0.4936638", "0.49160838", "0.49070477", "0.490414", "0.4901063", "0.48966298", "0.48771858", "0.4871494", "0.48709062", "0.48640007", "0.4860736", "0.48604217", "0.48568577", "0.48375824", "0.4816498", "0.4812896", "0.47998497", "0.476058", "0.47586524", "0.47517806", "0.4735092", "0.47282943", "0.47255528", "0.46790475", "0.46785977", "0.46641326", "0.46611255", "0.46398386", "0.46395934", "0.46347702", "0.46280068", "0.46261424", "0.46224535", "0.46215943", "0.46206397", "0.46187946", "0.46137336", "0.4603326", "0.46020162", "0.45985487", "0.4598176", "0.459762", "0.45945558", "0.45927325", "0.45888606", "0.4577679", "0.4577485", "0.45715407", "0.45659322", "0.45604816", "0.45601782", "0.4558132", "0.45481235", "0.4547136", "0.4546162", "0.45450872", "0.4538884" ]
0.0
-1
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
public Observable<ServiceResponse<OCRInner>> oCRMethodWithServiceResponseAsync(String language, Boolean cacheImage, Boolean enhanced) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.oCRMethod(language, cacheImage, enhanced, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() { @Override public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OCRInner> clientResponse = oCRMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}", "public boolean translateImageToText();", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }", "static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }", "void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}", "public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }", "public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }", "private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }", "public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }", "public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }", "public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }", "public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }", "protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }", "public List<Result> recognize(IplImage image);", "public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }", "public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }", "private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }", "public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }", "public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }", "private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }", "private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }", "private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }", "public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b>&nbsp</b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }", "private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }", "private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "public String getLanguage();", "public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }", "String getLang();", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "CLanguage getClanguage();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "Language findByName(String name);", "private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }", "public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }", "public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }", "public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }", "private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public abstract void startVoiceRecognition(String language);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "boolean hasLanguage();", "List<Label> findAllByLanguage(String language);", "public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }", "public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}", "public interface LanguageProvider {\n\tLanguageService study();\n}", "DetectionResult getObjInImage(Mat image);", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "private void performOCR(){\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "PsiFile[] findFilesWithPlainTextWords( String word);", "public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }", "public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "java.lang.String getTargetLanguageCode();", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}", "public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}", "String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}", "Builder addInLanguage(Text value);", "int getLocalizedText();", "public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }", "com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();", "@Override\n public String getText() {\n return analyzedWord;\n }", "public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }", "public void setLanguage(String language);", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }", "String text();", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}" ]
[ "0.6340444", "0.5907014", "0.5881825", "0.5613604", "0.5501345", "0.5476807", "0.54720134", "0.5439289", "0.5439289", "0.5422724", "0.5412727", "0.5398816", "0.53872037", "0.53670835", "0.5357576", "0.5357576", "0.5357576", "0.5356866", "0.53034747", "0.5297329", "0.5260379", "0.5254473", "0.5246585", "0.5228318", "0.52282864", "0.51628226", "0.51364416", "0.5131521", "0.5125658", "0.5094378", "0.5072984", "0.50591296", "0.5053911", "0.5033745", "0.5029701", "0.5023699", "0.49775946", "0.49752378", "0.49746957", "0.49692988", "0.49669984", "0.49603295", "0.494737", "0.49402708", "0.4936638", "0.49160838", "0.49070477", "0.490414", "0.4901063", "0.48966298", "0.48771858", "0.4871494", "0.48709062", "0.48640007", "0.4860736", "0.48604217", "0.48568577", "0.48375824", "0.4816498", "0.4812896", "0.47998497", "0.476058", "0.47586524", "0.47517806", "0.4735092", "0.47282943", "0.47255528", "0.46790475", "0.46785977", "0.46641326", "0.46611255", "0.46398386", "0.46395934", "0.46347702", "0.46280068", "0.46261424", "0.46224535", "0.46215943", "0.46206397", "0.46187946", "0.46137336", "0.4603326", "0.46020162", "0.45985487", "0.4598176", "0.459762", "0.45945558", "0.45927325", "0.45888606", "0.4577679", "0.4577485", "0.45715407", "0.45659322", "0.45604816", "0.45601782", "0.4558132", "0.45481235", "0.4547136", "0.4546162", "0.45450872", "0.4538884" ]
0.0
-1
Returns probabilities of the image containing racy or adult content.
public Observable<EvaluateInner> evaluateMethodAsync() { return evaluateMethodWithServiceResponseAsync().map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() { @Override public EvaluateInner call(ServiceResponse<EvaluateInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateProbabilities(){\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double getProbability() {\n return probability;\n }", "POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();", "float getSpecialProb();", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "abstract double rightProbability();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();", "@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}", "public abstract Map getProbabilities(String[] path);", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "abstract double leftProbability();", "public double getAbandonmentProbability() {\n return Math.random();\n }", "public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}", "public float getSpecialProb() {\n return specialProb_;\n }", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "double getCritChance();", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public Bounds getProbabilityBounds();", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "boolean getProbables();", "public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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}\r\n\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "public abstract float getProbability(String[] tokens);", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }", "private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }", "private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}", "public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public List<Result> recognize(IplImage image);", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public Image getNatural();", "public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }", "public int getContaminantPPM() {\n return contaminantPPM;\n }", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "double getBranchProbability();", "float genChance();", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "public abstract double getLinkProbability(int linkId);", "Float getFedAnimalsPercentage();", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }", "public abstract float getProbability(String singleToken);", "@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}", "public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public float getChance() {\n return chance;\n }", "public float getChance()\n {\n return 1.0f;\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "double getTransProb();", "public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }", "public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }", "@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "double getMissChance();", "public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }", "public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "double getRatio();", "private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}" ]
[ "0.5792197", "0.57066816", "0.5635645", "0.5572759", "0.5562452", "0.55257493", "0.53212327", "0.5280099", "0.5259797", "0.5242405", "0.5241776", "0.52029526", "0.5099709", "0.50816107", "0.5081152", "0.50460213", "0.5026333", "0.50131893", "0.49973923", "0.49362656", "0.49274006", "0.49014637", "0.48904005", "0.48893443", "0.48883486", "0.48626068", "0.48553148", "0.48407963", "0.48381814", "0.4823488", "0.48085284", "0.48003718", "0.47874287", "0.4778859", "0.47704858", "0.47612575", "0.4759973", "0.47543684", "0.47448784", "0.47440794", "0.47309622", "0.47279537", "0.47232834", "0.47222587", "0.4720755", "0.47107315", "0.46709624", "0.46687084", "0.4661704", "0.46471503", "0.46448085", "0.4641382", "0.46333593", "0.4630833", "0.46189335", "0.46061262", "0.46044046", "0.46036986", "0.46035802", "0.46022725", "0.45985234", "0.4595487", "0.45929152", "0.4568836", "0.4558225", "0.4557072", "0.45525363", "0.45493653", "0.45481145", "0.45372245", "0.45344004", "0.45292062", "0.45216995", "0.45159578", "0.45023647", "0.44994995", "0.44896108", "0.44894743", "0.44869757", "0.44675604", "0.44656563", "0.44603154", "0.4449972", "0.4446754", "0.44359973", "0.44357845", "0.44308314", "0.4427383", "0.44122484", "0.43956998", "0.4392812", "0.4380375", "0.4375294", "0.4375232", "0.43606308", "0.43596306", "0.4355109", "0.43473732", "0.43359566", "0.43326777", "0.43306032" ]
0.0
-1
Returns probabilities of the image containing racy or adult content.
public Observable<ServiceResponse<EvaluateInner>> evaluateMethodWithServiceResponseAsync() { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } final Boolean cacheImage = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.evaluateMethod(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() { @Override public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) { try { ServiceResponse<EvaluateInner> clientResponse = evaluateMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateProbabilities(){\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double getProbability() {\n return probability;\n }", "POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();", "float getSpecialProb();", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "abstract double rightProbability();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();", "@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}", "public abstract Map getProbabilities(String[] path);", "abstract double leftProbability();", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public double getAbandonmentProbability() {\n return Math.random();\n }", "public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public float getSpecialProb() {\n return specialProb_;\n }", "double getCritChance();", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public Bounds getProbabilityBounds();", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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}\r\n\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "boolean getProbables();", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "public abstract float getProbability(String[] tokens);", "private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}", "private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }", "private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}", "public List<Result> recognize(IplImage image);", "public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public Image getNatural();", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }", "double getBranchProbability();", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "public int getContaminantPPM() {\n return contaminantPPM;\n }", "float genChance();", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public abstract double getLinkProbability(int linkId);", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "Float getFedAnimalsPercentage();", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }", "public abstract float getProbability(String singleToken);", "@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}", "public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public float getChance() {\n return chance;\n }", "public float getChance()\n {\n return 1.0f;\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "double getTransProb();", "public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }", "public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}", "private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "double getMissChance();", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }", "public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "double getRatio();", "private double convert() {\n\t\t// modulus is private, but we have the getter\n\t\treturn riskNeutralProbabilityUp * (randomGenerator.getModulus() - 1);\n\t}" ]
[ "0.5786381", "0.57027304", "0.5630279", "0.5566898", "0.55602795", "0.5521205", "0.53160524", "0.527399", "0.52547306", "0.5238439", "0.52371645", "0.5200319", "0.50942767", "0.5080741", "0.5075284", "0.5040735", "0.5020369", "0.5010527", "0.4992298", "0.49309567", "0.49230972", "0.4899623", "0.4887625", "0.48843288", "0.48821422", "0.48607966", "0.48496944", "0.4836154", "0.4835873", "0.48235402", "0.48042262", "0.48031998", "0.47824162", "0.4775374", "0.4766173", "0.47577423", "0.47575927", "0.47563463", "0.47446194", "0.47406387", "0.47259223", "0.47253844", "0.47236726", "0.47176018", "0.4717528", "0.47095484", "0.4667282", "0.46652988", "0.46641463", "0.46451575", "0.46410877", "0.4640894", "0.46286342", "0.4627548", "0.46115872", "0.46045855", "0.46012986", "0.46012837", "0.46012086", "0.46003717", "0.45955324", "0.45902592", "0.45890653", "0.45657274", "0.4554271", "0.45542195", "0.4550101", "0.45439222", "0.45435953", "0.45366648", "0.45324874", "0.45259416", "0.45175546", "0.45165685", "0.4500676", "0.44949433", "0.44894037", "0.4486637", "0.448473", "0.4465555", "0.44596", "0.44567797", "0.44500646", "0.44468585", "0.4432141", "0.44306624", "0.4429654", "0.44237533", "0.4406469", "0.43994612", "0.43938962", "0.43787175", "0.43769315", "0.4372416", "0.4359772", "0.4357929", "0.4349213", "0.43470952", "0.43335533", "0.43318015", "0.43277287" ]
0.0
-1
Returns probabilities of the image containing racy or adult content.
public Observable<EvaluateInner> evaluateMethodAsync(Boolean cacheImage) { return evaluateMethodWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() { @Override public EvaluateInner call(ServiceResponse<EvaluateInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateProbabilities(){\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double getProbability() {\n return probability;\n }", "POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();", "float getSpecialProb();", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "abstract double rightProbability();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();", "@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}", "public abstract Map getProbabilities(String[] path);", "abstract double leftProbability();", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public double getAbandonmentProbability() {\n return Math.random();\n }", "public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public float getSpecialProb() {\n return specialProb_;\n }", "double getCritChance();", "private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public Bounds getProbabilityBounds();", "public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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}\r\n\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "boolean getProbables();", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "public abstract float getProbability(String[] tokens);", "private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}", "private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }", "public List<Result> recognize(IplImage image);", "private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}", "public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public Image getNatural();", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "double getBranchProbability();", "public int getContaminantPPM() {\n return contaminantPPM;\n }", "float genChance();", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public abstract double getLinkProbability(int linkId);", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "Float getFedAnimalsPercentage();", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }", "public abstract float getProbability(String singleToken);", "@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}", "public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public float getChance() {\n return chance;\n }", "public float getChance()\n {\n return 1.0f;\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "double getTransProb();", "public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }", "public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}", "private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "double getMissChance();", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }", "public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "double getRatio();", "private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}" ]
[ "0.57850313", "0.57010126", "0.56290585", "0.5565697", "0.5559708", "0.5519075", "0.5316536", "0.52727836", "0.52534455", "0.5236468", "0.5236261", "0.5198736", "0.5091604", "0.50812334", "0.507524", "0.50379896", "0.501882", "0.50101876", "0.4990364", "0.49297088", "0.4920346", "0.48977584", "0.4887237", "0.4882929", "0.4881551", "0.4858258", "0.48483452", "0.4834792", "0.48341623", "0.48206332", "0.4803132", "0.4803068", "0.4780798", "0.47732636", "0.4764049", "0.47585872", "0.47556025", "0.4754406", "0.47432214", "0.4739686", "0.47256002", "0.47245377", "0.47228524", "0.47162777", "0.47157028", "0.47086036", "0.4666865", "0.4665611", "0.46632558", "0.4645651", "0.46408644", "0.46405217", "0.46277493", "0.46264938", "0.46103412", "0.46035856", "0.46001884", "0.45997664", "0.4599624", "0.45977703", "0.45944738", "0.45890316", "0.45888653", "0.45658395", "0.45545518", "0.45524156", "0.4549637", "0.45434496", "0.45414433", "0.45359334", "0.45312563", "0.45248204", "0.45165217", "0.451639", "0.4500414", "0.44953394", "0.4487796", "0.44842905", "0.448314", "0.44636157", "0.44578058", "0.44550446", "0.4448973", "0.44464502", "0.44306743", "0.44303733", "0.4428187", "0.44217896", "0.4403683", "0.44006646", "0.43915933", "0.43783802", "0.43763268", "0.43704888", "0.43574792", "0.4357228", "0.434867", "0.43455118", "0.43342876", "0.43323204", "0.43270162" ]
0.0
-1
Returns probabilities of the image containing racy or adult content.
public Observable<ServiceResponse<EvaluateInner>> evaluateMethodWithServiceResponseAsync(Boolean cacheImage) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.evaluateMethod(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() { @Override public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) { try { ServiceResponse<EvaluateInner> clientResponse = evaluateMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateProbabilities(){\n\t}", "private void evaluateProbabilities()\n\t{\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public double getProbability() {\n return probability;\n }", "POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();", "float getSpecialProb();", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}", "abstract double rightProbability();", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();", "@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}", "public abstract Map getProbabilities(String[] path);", "abstract double leftProbability();", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public double getAbandonmentProbability() {\n return Math.random();\n }", "public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public float getSpecialProb() {\n return specialProb_;\n }", "double getCritChance();", "private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "public Bounds getProbabilityBounds();", "public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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}\r\n\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "boolean getProbables();", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "public abstract float getProbability(String[] tokens);", "private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}", "private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }", "public List<Result> recognize(IplImage image);", "private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}", "public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public Image getNatural();", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}", "public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }", "public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }", "double getBranchProbability();", "public int getContaminantPPM() {\n return contaminantPPM;\n }", "float genChance();", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "public abstract double getLinkProbability(int linkId);", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "Float getFedAnimalsPercentage();", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }", "public abstract float getProbability(String singleToken);", "@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}", "public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public float getChance() {\n return chance;\n }", "public float getChance()\n {\n return 1.0f;\n }", "@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}", "double getTransProb();", "public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }", "public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}", "private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}", "public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "double getMissChance();", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }", "public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }", "public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }", "double getRatio();", "private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}" ]
[ "0.57850313", "0.57010126", "0.56290585", "0.5565697", "0.5559708", "0.5519075", "0.5316536", "0.52727836", "0.52534455", "0.5236468", "0.5236261", "0.5198736", "0.5091604", "0.50812334", "0.507524", "0.50379896", "0.501882", "0.50101876", "0.4990364", "0.49297088", "0.4920346", "0.48977584", "0.4887237", "0.4882929", "0.4881551", "0.4858258", "0.48483452", "0.4834792", "0.48341623", "0.48206332", "0.4803132", "0.4803068", "0.4780798", "0.47732636", "0.4764049", "0.47585872", "0.47556025", "0.4754406", "0.47432214", "0.4739686", "0.47256002", "0.47245377", "0.47228524", "0.47162777", "0.47157028", "0.47086036", "0.4666865", "0.4665611", "0.46632558", "0.4645651", "0.46408644", "0.46405217", "0.46277493", "0.46264938", "0.46103412", "0.46035856", "0.46001884", "0.45997664", "0.4599624", "0.45977703", "0.45944738", "0.45890316", "0.45888653", "0.45658395", "0.45545518", "0.45524156", "0.4549637", "0.45434496", "0.45414433", "0.45359334", "0.45312563", "0.45248204", "0.45165217", "0.451639", "0.4500414", "0.44953394", "0.4487796", "0.44842905", "0.448314", "0.44636157", "0.44578058", "0.44550446", "0.4448973", "0.44464502", "0.44306743", "0.44303733", "0.4428187", "0.44217896", "0.4403683", "0.44006646", "0.43915933", "0.43783802", "0.43763268", "0.43704888", "0.43574792", "0.4357228", "0.434867", "0.43455118", "0.43342876", "0.43323204", "0.43270162" ]
0.0
-1
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.
public Observable<MatchResponseInner> matchMethodAsync() { return matchMethodWithServiceResponseAsync().map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() { @Override public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int match(ArrayList<ImageCell> images);", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}", "public List<Result> recognize(IplImage image);", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}", "Receta getByIdWithImages(long id);", "public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }", "@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }", "public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();", "@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);", "List<Bitmap> getFavoriteRecipeImgs();", "private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);", "public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }", "GetImagesResult getImages(GetImagesRequest getImagesRequest);", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);", "@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}", "private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }", "private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}", "public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}", "public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);", "private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }", "List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "List<Bitmap> getRecipeImgSmall();", "private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }", "private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}", "public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }", "public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();", "public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);", "private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "java.lang.String getHotelImageURLs(int index);", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}", "@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}", "public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }", "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }", "private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}", "List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);", "private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }", "public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }", "public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }", "public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }", "public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }", "String getItemImage();", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();", "protected abstract void setupImages(Context context);", "public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }" ]
[ "0.6268177", "0.5889108", "0.57670414", "0.57589924", "0.57436514", "0.5731581", "0.5511194", "0.5501659", "0.550006", "0.5452095", "0.53226525", "0.525605", "0.5253426", "0.5196022", "0.51808035", "0.5179484", "0.516819", "0.5141495", "0.51305956", "0.51303494", "0.512022", "0.5114837", "0.5085196", "0.50661075", "0.5051815", "0.5051217", "0.50302094", "0.502194", "0.5019136", "0.50189114", "0.50175506", "0.49923682", "0.49802214", "0.4977202", "0.49740383", "0.4962518", "0.49486563", "0.49302784", "0.49177086", "0.49086106", "0.490474", "0.4900562", "0.49002978", "0.487019", "0.4868976", "0.4867385", "0.48648655", "0.48331422", "0.4825292", "0.48212713", "0.4812381", "0.48099214", "0.47965372", "0.4787633", "0.47812676", "0.477861", "0.4768132", "0.4766136", "0.4763595", "0.47626832", "0.47560656", "0.47553316", "0.475151", "0.47421148", "0.47407493", "0.4739602", "0.4738623", "0.47357088", "0.47315642", "0.47315082", "0.47211283", "0.47166783", "0.47096226", "0.47077644", "0.47077018", "0.4707549", "0.469874", "0.46948472", "0.4687398", "0.46773568", "0.46640363", "0.46639773", "0.46639344", "0.46632206", "0.4662197", "0.46473208", "0.46431518", "0.4641886", "0.4637323", "0.4635154", "0.46329367", "0.46304187", "0.46277556", "0.4621483", "0.46211785", "0.46151412", "0.46061975", "0.46035555", "0.46011278", "0.45994547", "0.4583557" ]
0.0
-1
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.
public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync() { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } final String listId = null; final Boolean cacheImage = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() { @Override public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int match(ArrayList<ImageCell> images);", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}", "public List<Result> recognize(IplImage image);", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}", "Receta getByIdWithImages(long id);", "public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }", "@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }", "public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();", "@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);", "List<Bitmap> getFavoriteRecipeImgs();", "private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }", "GetImagesResult getImages(GetImagesRequest getImagesRequest);", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);", "@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}", "private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }", "private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}", "public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}", "public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);", "private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }", "List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "List<Bitmap> getRecipeImgSmall();", "private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }", "private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}", "public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }", "public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();", "public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);", "private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "java.lang.String getHotelImageURLs(int index);", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}", "public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }", "@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}", "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}", "public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}", "List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);", "public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }", "public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }", "public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }", "String getItemImage();", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();", "protected abstract void setupImages(Context context);", "public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }" ]
[ "0.6268827", "0.58894795", "0.57677805", "0.57601416", "0.5745048", "0.57317436", "0.55123144", "0.5503459", "0.55010366", "0.54535496", "0.53231597", "0.52577794", "0.5252809", "0.5197598", "0.51810634", "0.5180938", "0.5170541", "0.5143361", "0.5132484", "0.51319265", "0.51224333", "0.5117683", "0.5087638", "0.5067504", "0.50536203", "0.5053161", "0.5032371", "0.50230694", "0.5020064", "0.50197476", "0.5017497", "0.49934095", "0.4982133", "0.49786833", "0.4976476", "0.49622747", "0.49486583", "0.49327984", "0.4917589", "0.4908509", "0.4905867", "0.49023446", "0.4901031", "0.48701972", "0.48697302", "0.48693508", "0.4865608", "0.48344868", "0.4826242", "0.4823214", "0.48141134", "0.48121142", "0.47974515", "0.47896698", "0.47813424", "0.47794077", "0.4770224", "0.47676432", "0.4765288", "0.47643593", "0.4757827", "0.4757143", "0.47531438", "0.47432348", "0.4742203", "0.47421885", "0.4740627", "0.4737963", "0.4731806", "0.47313228", "0.47210446", "0.47168025", "0.47118372", "0.4709293", "0.47092316", "0.47077367", "0.4699514", "0.4696686", "0.46891865", "0.46795154", "0.46656293", "0.46641228", "0.46640646", "0.4663976", "0.4662889", "0.46480772", "0.4645193", "0.4644105", "0.46395627", "0.4636299", "0.46341047", "0.4631616", "0.46303436", "0.46229544", "0.4621968", "0.46167204", "0.46087825", "0.4605549", "0.46027145", "0.45995033", "0.45839757" ]
0.0
-1
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.
public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) { return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() { @Override public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int match(ArrayList<ImageCell> images);", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}", "public List<Result> recognize(IplImage image);", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}", "Receta getByIdWithImages(long id);", "public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }", "@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }", "public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();", "@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);", "List<Bitmap> getFavoriteRecipeImgs();", "private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);", "public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }", "GetImagesResult getImages(GetImagesRequest getImagesRequest);", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}", "void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);", "private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }", "private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}", "public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}", "public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);", "private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }", "List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "List<Bitmap> getRecipeImgSmall();", "private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }", "private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}", "public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }", "public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();", "public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);", "private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "java.lang.String getHotelImageURLs(int index);", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}", "public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }", "@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}", "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }", "private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}", "List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }", "public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);", "public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }", "public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }", "public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }", "String getItemImage();", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();", "protected abstract void setupImages(Context context);", "private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }" ]
[ "0.62700015", "0.58897376", "0.5767267", "0.5759937", "0.5743681", "0.57321453", "0.55112725", "0.5501859", "0.5500844", "0.54522055", "0.5323158", "0.5255359", "0.52542335", "0.5196973", "0.51814985", "0.5180431", "0.516952", "0.5143571", "0.5131655", "0.5131056", "0.51222026", "0.51161176", "0.50863135", "0.50668687", "0.5053183", "0.5051782", "0.50310975", "0.50234324", "0.5018788", "0.5018751", "0.50172436", "0.49925357", "0.49807724", "0.4977542", "0.49756175", "0.49622637", "0.49485126", "0.49309447", "0.49194676", "0.49088565", "0.49056503", "0.49016201", "0.49000394", "0.4871608", "0.48693073", "0.48682657", "0.4865315", "0.4833981", "0.48248002", "0.4823654", "0.48128608", "0.4810085", "0.47964203", "0.47879833", "0.47818094", "0.47782964", "0.47692186", "0.47654974", "0.47645363", "0.47632653", "0.4756919", "0.47567043", "0.47522405", "0.47427997", "0.47408277", "0.47404814", "0.47400996", "0.47369072", "0.47319108", "0.47309214", "0.47217515", "0.4717419", "0.471051", "0.47084787", "0.47084174", "0.47079793", "0.47001338", "0.46950126", "0.4687811", "0.4677505", "0.46661595", "0.46644562", "0.46638915", "0.4662026", "0.46470895", "0.4643862", "0.4643047", "0.46386835", "0.46365866", "0.46335912", "0.46299112", "0.46289173", "0.46215016", "0.46199617", "0.4615459", "0.46071243", "0.4604053", "0.46024016", "0.45984784", "0.45841998" ]
0.46642357
82
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.
public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() { @Override public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int match(ArrayList<ImageCell> images);", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}", "public List<Result> recognize(IplImage image);", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}", "Receta getByIdWithImages(long id);", "public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }", "@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }", "public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();", "@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);", "List<Bitmap> getFavoriteRecipeImgs();", "private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }", "GetImagesResult getImages(GetImagesRequest getImagesRequest);", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}", "void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);", "private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }", "private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}", "public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}", "public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);", "private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }", "List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }", "List<Bitmap> getRecipeImgSmall();", "private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}", "private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }", "public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }", "public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();", "public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);", "private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "java.lang.String getHotelImageURLs(int index);", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}", "@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}", "public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }", "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();", "private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}", "public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}", "List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;", "private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);", "public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }", "public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }", "public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }", "private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }", "public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }", "public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "public void setImage(int imageId) {\n this.imageId=imageId;\n\t}", "public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }", "String getItemImage();", "java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();", "protected abstract void setupImages(Context context);", "public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }" ]
[ "0.6269358", "0.58894175", "0.5767823", "0.57581866", "0.5743656", "0.57329696", "0.5511878", "0.55023944", "0.5499341", "0.54513913", "0.53242004", "0.52565765", "0.5252096", "0.51959515", "0.51806694", "0.5179676", "0.516937", "0.51420456", "0.51307625", "0.5130238", "0.51201755", "0.5115933", "0.5086581", "0.5066521", "0.5052614", "0.5051037", "0.503133", "0.50229895", "0.50200105", "0.5018699", "0.5017182", "0.49932528", "0.4980278", "0.49779966", "0.49757442", "0.49613833", "0.49499258", "0.49310523", "0.4917177", "0.49044785", "0.49008167", "0.49007514", "0.48709598", "0.48693454", "0.4868297", "0.486439", "0.48327476", "0.4824767", "0.48216105", "0.48121452", "0.48105243", "0.47977334", "0.47885716", "0.47818112", "0.47789094", "0.47699574", "0.4766071", "0.47655237", "0.4763522", "0.47564504", "0.47563508", "0.47516552", "0.47427645", "0.4742108", "0.47411898", "0.4739934", "0.47364616", "0.47316936", "0.47311017", "0.47205627", "0.4716423", "0.47105074", "0.47089097", "0.47079867", "0.47067878", "0.46994454", "0.4694525", "0.46893325", "0.4678342", "0.46649662", "0.466488", "0.46646062", "0.46630773", "0.4662054", "0.46478015", "0.4644439", "0.46423402", "0.46374792", "0.46361628", "0.46341842", "0.46304488", "0.46291912", "0.46212026", "0.46210533", "0.4616033", "0.46065164", "0.4605004", "0.46003872", "0.45990482", "0.4584824" ]
0.49092928
39
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesFileInputAsync(byte[] imageStream) { return findFacesFileInputWithServiceResponseAsync(imageStream).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6271086", "0.6183204", "0.6173539", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.0
-1
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesFileInputWithServiceResponseAsync(byte[] imageStream) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } final Boolean cacheImage = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesFileInputDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6271086", "0.6183204", "0.6173539", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.0
-1
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage) { return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.523216", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.50187486", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.0
-1
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesFileInputDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.523216", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.50187486", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.0
-1
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesUrlInputAsync(String contentType, BodyModelInner imageUrl) { return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6271086", "0.6183204", "0.6173539", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.0
-1
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } if (imageUrl == null) { throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); final Boolean cacheImage = null; String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesUrlInputDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "boolean hasFaceUp();", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671218", "0.74343956", "0.71101314", "0.691482", "0.69146", "0.62822634", "0.6271086", "0.6183204", "0.6173539", "0.59023684", "0.5782556", "0.5730131", "0.5664912", "0.56492686", "0.5503748", "0.5503748", "0.5493492", "0.54722375", "0.5456128", "0.5450902", "0.544514", "0.54380745", "0.542457", "0.53716654", "0.5351666", "0.5326719", "0.53265595", "0.5308396", "0.5303193", "0.5295572", "0.5295094", "0.5272228", "0.5265717", "0.5262931", "0.5261844", "0.5257992", "0.5237957", "0.52317333", "0.5228677", "0.5219602", "0.52112395", "0.51959306", "0.51934713", "0.51800495", "0.5178952", "0.51443094", "0.51396716", "0.51318103", "0.5127423", "0.5121473", "0.5099383", "0.50975674", "0.50803834", "0.50186664", "0.5003959", "0.49900812", "0.49661115", "0.49379647", "0.49350825", "0.49341998", "0.49160892", "0.49130994", "0.49130994", "0.48947468", "0.48935443", "0.48619336", "0.48612344", "0.4857237", "0.48491156", "0.48386344", "0.48324826", "0.48275903", "0.4820903", "0.48185924", "0.4817562", "0.48174706", "0.4770805", "0.47672883", "0.47659874", "0.4759456", "0.4751915", "0.47493252", "0.47398522", "0.47365126", "0.47356418", "0.4733061", "0.4730482", "0.47186825", "0.47163165", "0.47141817", "0.47089583", "0.47069725", "0.47067052", "0.47004554", "0.4698661", "0.4696508", "0.46929026", "0.4681642", "0.4675755", "0.46745446", "0.46661794" ]
0.0
-1
Returns the list of faces found.
public Observable<FoundFacesInner> findFacesUrlInputAsync(String contentType, BodyModelInner imageUrl, Boolean cacheImage) { return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() { @Override public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.523216", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.50187486", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.0
-1
Returns the list of faces found.
public Observable<ServiceResponse<FoundFacesInner>> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl, Boolean cacheImage) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } if (imageUrl == null) { throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() { @Override public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) { try { ServiceResponse<FoundFacesInner> clientResponse = findFacesUrlInputDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "java.util.List getSurfaceRefs();", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFace() {\n\t\treturn face;\n\t}", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public ArrayList<Furniture> getFoundFurniture(){\n return foundFurniture;\n }", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "protected int getFace() {\n return face;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "public List<Facet> facets() {\n return this.facets;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public int getFace(){\n return face;\n }", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "List<IFeature> getFeatureList();", "private ArrayList<Integer> getOutsideFaceIndicesBeforeAllInfoHasBeenInferred()\n\t{\n\t\t// go through all the simplices and count how often each face is referenced;\n\t\t// inside faces are referenced twice, outside faces once\n\t\t\n\t\t// set up an array that will contain the reference counts for each face\n\t\tint[] faceRefs = new int[faces.size()];\n\t\tfor(int i=0; i<faceRefs.length; i++) faceRefs[i] = 0;\n\t\t\n\t\t// now go through all the simplices...\n\t\tfor(Simplex simplex : simplices)\n\t\t{\n\t\t\t// ... and increase the reference count of all the faces in the simplex\n\t\t\tint[] simplexFaceIndices = simplex.getFaceIndices();\t// should be of length 4\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t{\n\t\t\t\t// increase the reference count of the <i>th face of the simplex\n\t\t\t\tfaceRefs[simplexFaceIndices[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faceRefs.length; i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(faceRefs[i] == 1)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public void checkFaces()\n\tthrows InconsistencyException\n\t{\n\t\t// first check if faces is non-null\n\t\tif(faces == null)\n\t\t\tthrow new InconsistencyException(\"The ArrayList faces should be non-null, but is null.\");\n\n\t\t// check that all vertices are referenced at least three times, as each is the vertex of at least one simplex\n\t\t// and in each simplex three faces meet at each vertex;\n\t\t// also check that all edges are referenced at least two times\n\t\t\n\t\t// create an array of ints that will hold the number of references to each vertex in the list of faces...\n\t\tint[] vertexReferences = new int[vertices.size()];\n\t\t// ... and one that will hold the number of references to each edge...\n\t\tint[] edgeReferences = new int[edges.size()];\n\t\t\n\t\t// ... and set all these reference counts initially to zero\n\t\tfor(int i=0; i<vertexReferences.length; i++) vertexReferences[i] = 0;\n\t\tfor(int i=0; i<edgeReferences.length; i++) edgeReferences[i] = 0;\n\t\t\n\t\t// go through all faces...\n\t\tfor(Face face:faces)\n\t\t{\n\t\t\t// go through all three vertices...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the vertex by 1\n\t\t\t\tvertexReferences[face.getVertexIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\n\t\t\t// go through all three edges...\n\t\t\tfor(int i=0; i<3; i++)\n\t\t\t\t// ... and increase the reference count of the edge by 1\n\t\t\t\tedgeReferences[face.getEdgeIndices()[i]]++;\n\t\t\t// note that any vertex indices that are out of bounds will throw up an error here!\n\t\t}\n\n\t\t// check that all vertex reference counts are >= 3\n\t\tfor(int i=0; i<vertexReferences.length; i++)\n\t\t{\n\t\t\tif(vertexReferences[i] < 3)\n\t\t\t{\n\t\t\t\t// vertex i is referenced fewer than 3 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Vertex #\" + i + \" should be referenced in the list of faces >= 3 times, but is referenced only \" + vertexReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\n\t\t// check that all edge reference counts are >= 2\n\t\tfor(int i=0; i<edgeReferences.length; i++)\n\t\t{\n\t\t\tif(edgeReferences[i] < 2)\n\t\t\t{\n\t\t\t\t// edge i is referenced fewer than 2 times\n\t\t\t\t\n\t\t\t\t// throw an InconsistencyException\n\t\t\t\tthrow(new InconsistencyException(\"Edge #\" + i + \" should be referenced in the list of faces >= 2 times, but is referenced only \" + edgeReferences[i] + \" times.\"));\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public List<FacetRequest> facets() {\n return this.facets;\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "List<IShape> getVisibleShapes();", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "List<Feature> getFeatures();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "public Set<VCube> getSupportedCubes();", "public FriendList[] getFriendsLists();", "boolean hasFaceUp();", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "public ArrayList<String> loadFavorites() {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public java.util.List<V> getVertices();", "boolean getFaceDetectionPref();", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public ArrayList<Collidable> getNeighbors();", "public Figure[] getFigures() {\n return figures;\n }", "public static List<IEssence> getRegisteredEssences() {\n ArrayList<IEssence> essences = new ArrayList();\n MagicStaffs.ITEMS\n .stream()\n .filter(item -> item instanceof IEssence)\n .forEach(item -> essences.add((IEssence) item));\n return essences;\n }", "public boolean needFaceDetection() {\n return true;\n }", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "protected abstract void setFaces();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Fence[] getFencesForDir(Tiles.TileBorderDirection dir) {\n/* 713 */ if (this.fences != null) {\n/* */ \n/* 715 */ Set<Fence> fenceSet = new HashSet<>();\n/* 716 */ for (Fence f : this.fences.values()) {\n/* */ \n/* 718 */ if (f.getDir() == dir)\n/* 719 */ fenceSet.add(f); \n/* */ } \n/* 721 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ } \n/* */ \n/* 724 */ return emptyFences;\n/* */ }", "public List<EnumerationValue> getGenders()\r\n\t{\r\n\t\treturn getGenders( getSession().getSessionContext() );\r\n\t}", "public RubiksFace getRubiksFace(RubiksFace.RubiksFacePosition position) {\n for (RubiksFace face : rubiksFaceList) {\n if (face.getFacePosition() == position) {\n return face;\n }\n }\n\n return null;\n }", "public int getFaceValue ()\n {\n return faceValue;\n }" ]
[ "0.7671269", "0.74346423", "0.7110249", "0.69152063", "0.6914806", "0.6282762", "0.6270876", "0.6183134", "0.6173269", "0.59021", "0.57824975", "0.573041", "0.56643003", "0.564971", "0.5503765", "0.5503765", "0.5493121", "0.5472918", "0.54561985", "0.54503137", "0.5445359", "0.5438217", "0.5424949", "0.53719544", "0.5351843", "0.5326439", "0.5326068", "0.53090054", "0.53023833", "0.5296062", "0.5295592", "0.5272549", "0.5265757", "0.52628744", "0.5261844", "0.5258342", "0.52380085", "0.523216", "0.5228622", "0.5220437", "0.5211711", "0.51961994", "0.519323", "0.51793844", "0.51790965", "0.5144855", "0.5139445", "0.51311815", "0.51278555", "0.51215196", "0.5099933", "0.5098753", "0.50799763", "0.50187486", "0.5003311", "0.49902925", "0.49665478", "0.49383876", "0.4935045", "0.49341398", "0.49158943", "0.49131832", "0.49131832", "0.48941943", "0.48933253", "0.4861942", "0.48613474", "0.4856936", "0.4849662", "0.4838657", "0.48326936", "0.48268154", "0.48206407", "0.48178247", "0.48174852", "0.4817468", "0.47712275", "0.4767462", "0.47658026", "0.47595116", "0.47519153", "0.47490704", "0.4739418", "0.47358188", "0.4735485", "0.4734326", "0.47309512", "0.4717867", "0.4716547", "0.47137016", "0.4708087", "0.4707141", "0.47064495", "0.4699346", "0.46987182", "0.46968743", "0.4692541", "0.46819395", "0.46757564", "0.4675456", "0.46662667" ]
0.0
-1
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
public Observable<OCRInner> oCRUrlInputAsync(String language, String contentType, BodyModelInner imageUrl) { return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() { @Override public OCRInner call(ServiceResponse<OCRInner> response) { return response.body(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}", "public boolean translateImageToText();", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }", "static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }", "void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}", "public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }", "public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }", "private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }", "public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }", "public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }", "public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }", "public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }", "protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }", "public List<Result> recognize(IplImage image);", "public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }", "private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }", "public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }", "public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }", "public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }", "private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }", "private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }", "private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }", "public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b>&nbsp</b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }", "private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }", "private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "public String getLanguage();", "public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }", "String getLang();", "@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "CLanguage getClanguage();", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "Language findByName(String name);", "private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }", "public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }", "public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }", "public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }", "private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }", "public abstract void startVoiceRecognition(String language);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "boolean hasLanguage();", "List<Label> findAllByLanguage(String language);", "public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }", "public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}", "public interface LanguageProvider {\n\tLanguageService study();\n}", "DetectionResult getObjInImage(Mat image);", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "private void performOCR(){\n }", "private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}", "private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "PsiFile[] findFilesWithPlainTextWords( String word);", "public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }", "public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "java.lang.String getTargetLanguageCode();", "private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}", "String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}", "int getLocalizedText();", "Builder addInLanguage(Text value);", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }", "public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}", "public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }", "com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();", "@Override\n public String getText() {\n return analyzedWord;\n }", "public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}", "public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }", "@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "String text();", "@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }", "public void setLanguage(String language);", "public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}" ]
[ "0.6339322", "0.5907689", "0.5881454", "0.5613236", "0.5499387", "0.5476547", "0.54720753", "0.54378355", "0.54378355", "0.54230297", "0.54117554", "0.5398961", "0.5386767", "0.5368199", "0.5356364", "0.5356364", "0.5356364", "0.5355748", "0.53044903", "0.52970636", "0.5259717", "0.5255546", "0.52474463", "0.5227633", "0.5227519", "0.51617426", "0.51373875", "0.5130657", "0.5124618", "0.5095856", "0.50732946", "0.5057377", "0.50524217", "0.5032287", "0.5028192", "0.5025107", "0.4976818", "0.49758172", "0.49750227", "0.4969493", "0.4966516", "0.49598026", "0.49463004", "0.4939654", "0.49355274", "0.49158987", "0.4907803", "0.4901162", "0.490093", "0.48949048", "0.48760468", "0.4872384", "0.48701173", "0.48626333", "0.48619446", "0.4859077", "0.48565146", "0.4836201", "0.48171046", "0.4813205", "0.4798623", "0.47593915", "0.47577217", "0.47507718", "0.4734132", "0.47277054", "0.4723872", "0.4680271", "0.4678034", "0.4665077", "0.4661084", "0.46390656", "0.46388733", "0.46339175", "0.46273252", "0.4624046", "0.46217933", "0.4621366", "0.46212766", "0.46193036", "0.46121076", "0.4601368", "0.46006227", "0.4598951", "0.4597816", "0.4596961", "0.45915458", "0.45913818", "0.45895725", "0.45786554", "0.4577141", "0.4571682", "0.45664972", "0.45600644", "0.45594302", "0.4558069", "0.45484012", "0.45455223", "0.45450306", "0.45446116", "0.45400605" ]
0.0
-1