query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
/Loop 12 times, to display readings for each month
public static void displayData(){ for (int i = 0; i < 12; i++){ int month = i + 1; System.out.println("Month "+ month +"; Total rainfall: "+ monthlyTotalRain[i]+"; Highest temperature: "+ monthlyHighestTemp[i] ); } }
[ "private void onShowMonthlyOrderList() {\r\n System.out.println(\"Monthly Sales Report \");\r\n \r\n Map<String,Float> resultMap = reportService.calculateMonthlyTotal();\r\n Set<String> keys=resultMap.keySet();\r\n for(String yearMonth : keys){\r\n //2016,02\r\n String[] arr = yearMonth.split(\",\");\r\n String year = arr[0];\r\n Integer monthNo = new Integer(arr[1]);\r\n String monthName = DateUtil.getMonthName(monthNo);\r\n \r\n System.out.println(year+\" ,\"+monthName+\":\"+resultMap.get(yearMonth));\r\n }\r\n \r\n }", "public void printSample(int month);", "public void printEventsPerMonth() {\r\n\t\tfor (Event e : eventList) {\r\n\t\t\tif (e.getDate().getYear() == calendar.getYear()) {\r\n\t\t\t\tif (e.getDate().getMonthValue() == calendar.getMonthValue()) {\r\n\t\t\t\t\tSystem.out.println(e.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void run() {\n\t\tfor (int counter = 1; counter < 13; counter++) {\r\n\t\t\tString monthOfYear;\r\n\t\t\tswitch (counter) {\r\n\t\t\t\r\n\t\t\tcase 1: monthOfYear = \"January\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"January is named after the Roman god Janus, who was always shown as having two heads.\");\r\n\t\t\tSystem.out.println(\"He looked back to the last year and forward to the new one.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Garnet\");\r\n\t\t\tSystem.out.println(\"Flower: Carnation\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2: monthOfYear = \"February\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The Saxon term for the month, Sol-monath, means \\\"cake month\\\". This is because they offered cakes to the gods during this month.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Amethyst\");\r\n\t\t\tSystem.out.println(\"Flower: Primrose\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3: monthOfYear = \"March\";\r\n\t\t\tSystem.out.println(\"The word 'March' comes from the Roman 'Martius' and was named after Mars, the god of war.\");\t\t\t\r\n\t\t\tSystem.out.println(\"Birthstone: Aquamarine\");\r\n\t\t\tSystem.out.println(\"Flower: Dafodil\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4: monthOfYear = \"April\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The real origin of its name has been lost.\");\r\n\t\t\tSystem.out.println(\"The most common theory is that Aprilis is derived from the Latin verb Aperire, to open, as the opening, or blossoming, of trees and flowers.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Diamond\");\r\n\t\t\tSystem.out.println(\"Flower: Daisy or Sweet Pea\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5: monthOfYear = \"May\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The month may have been named for the Greek goddess Maia, who was identified with the Roman goddess of fertility, Bona Dea.\");\t\t\t\r\n\t\t\tSystem.out.println(\"Birthstone: Emerald\");\r\n\t\t\tSystem.out.println(\"Flower: lily of the valley and hawthorn\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6: monthOfYear = \"June\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The month of June is probably named after Juno, the wife of Jupiter, and queen of the gods.\");\r\n\t\t\tSystem.out.println(\"Juno is always represented as a tall, beautiful woman, wearing a crown and bearing a sceptre in her hand, and often she is shown with a peacock at her side.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Moonstone or Pearl\");\r\n\t\t\tSystem.out.println(\"Flower: Rose and Honeysuckle\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 7: monthOfYear = \"July\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"July was renamed for Julius Caesar\");\r\n\t\t\tSystem.out.println(\"In prior years, it was called Quintilis. If you know your latin, that \\\"Quint\\\" thing is screaming \\\"# 5\\\".\");\r\n\t\t\tSystem.out.println(\"Birthstone: Ruby\");\r\n\t\t\tSystem.out.println(\"Flower: Larkspur and the Water Lily\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 8: monthOfYear = \"August\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"August was named in honor of Augustus Caesar.\");\r\n\t\t\tSystem.out.println(\"It has 31 days because Augustus wanted as many days as Julius Caesar's month of July had, they took that extra day from February.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Peridot\");\r\n\t\t\tSystem.out.println(\"Flower: Gladious and the Poppy\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: monthOfYear = \"September\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"September's name comes from septem, Latin for ôseven.\\\"\");\r\n\t\t\tSystem.out.println(\"More peopel are born in September than any other month!\");\r\n\t\t\tSystem.out.println(\"Birthstone: Sapphire\");\r\n\t\t\tSystem.out.println(\"Flower: Aster and the Morning Glory\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 10: monthOfYear = \"October\";\t\t\t\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"October received its name from the Latin numeral octo meaning \\\"eight\\\", because in the original Roman calendar it was the eighth month.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Opal\");\r\n\t\t\tSystem.out.println(\"Flower: Marigold and Cosmos\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 11: monthOfYear = \"November\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The name 'November' is believed to derive from 'novem' which is the Latin for the number 'nine'.\");\r\n\t\t\tSystem.out.println(\"People born around mid-November were conceived around Valentine's Day.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Topaz\");\r\n\t\t\tSystem.out.println(\"Flower: Chrysanthemum\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 12: monthOfYear = \"December\";\r\n\t\t\tSystem.out.println(monthOfYear);\r\n\t\t\tSystem.out.println(\"The Latin name is derived from Decima, the middle Goddess of the Three Fates who personifies the present.\");\r\n\t\t\tSystem.out.println(\"Birthstone: Turquoise\");\r\n\t\t\tSystem.out.println(\"Flower: Narcissus and the Holly\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\ttry { \r\n\t\t\t\tThread.sleep(2000); //this tells the thread to sleep so that it can gather information needed before running again.\r\n\t\t\t} catch(InterruptedException e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void monthlyTransactions(int month) {\r\n for (Integer key : transList.keySet()) {\r\n Transaction trans = transList.get(key);\r\n if (trans.date.get(Calendar.MONTH) == month) {\r\n System.out.println(trans.display());\r\n }\r\n }\r\n }", "public void run() {\n printMonthNameByNumber();\n }", "public static void main(String[] args) {\n for (int month=0; month <5; month++){\n int year =2020;\n System.out.println(\"Month: \"+month+\" \\n*********\");\n for ( month=0; month<=6; month+=2 ){\n System.out.println(\"/\"+month+\"/\"+year);\n }\n if (month!=12)\n System.out.printf(\"----------\\n\");\n }\n\n }", "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 }", "private void calculateMonthsData(){\r\n\t\tmonthlyData = new ArrayList<Map<Object,Number>>();\r\n\t\tfor(int i=0; i<4; i++){\r\n\t\t\tmonthlyData.add(monthlyChart.getSeries().get(i).getData());\r\n\t\t}\r\n\t\t//monthlyChart.getSeries().remove(3);//remove total line because i need it for only data table and i take that\r\n\t}", "private void updateMonthView()\n\t{\n\t\t// declarations\n\t\tint offset = 0;\n\t\tint runCount = 0;\n\t\tArrayList<Event> eventDays = model.getEventsForSelectedMonth();\n\t\t\n\t\t// fill in first blank spaces of calendar\n\t\tfor(int i = 0; i < model.firstDayOfMonth - 1; i++, offset++)\n\t\t\tblankButton(days[i]);\n\t\n\t\n\t\t// add in numbered days\n\t\toffset--;\n\t\tfor(int i = 1; i < model.lengthOfMonth + 1; i++)\n\t\t{\n\t\t\t// format the button, make sure it's enabled\n\t\t\tformatButton(days[i + offset]);\n\t\t\t(days[i + offset]).setEnabled(true);\n\t\t\t\n\t\t\t// if it's the currently selected day, outline the box\n\t\t\t// (selected day defaults to current day ON LAUNCH)\n\t\t\tif(model.currentDay(i)) invertButton((days[i + offset]));\n\t\n\t\t\t\n\t\t\t// if day is current actual date, increase the font size\n\t\t\tif(model.selectedDay(i))\n\t\t\t{\n\t\t\t\t(days[i + offset]).setBackground(Color.CYAN);\n\t\t\t\t(days[i + offset]).setBorderPainted(true);\n\t\t\t}\n\t\n\t\t\t// if it's an event day (and not the current day), change background color\n\t\t\tfor( Event e : eventDays)\n\t\t\t{\n\t\t\t\tif(e.day == i && !model.selectedDay(i) && !model.currentDay(i)) \n\t\t\t\t\t(days[i + offset]).setBackground(Color.GRAY);\n\t\t\t}\n\t\n\t\t\t// finally add the text to the button, and add to monthView panel\n\t\t\t(days[i + offset]).setText(Integer.toString(i));\n\t\t\t\n\t\t\trunCount++;\n\t\t}\n\t\toffset += runCount;\n\t\t\n\t\t// add in remaining days\n\t\tfor(int i = 0; i < 42 - model.lengthOfMonth - model.firstDayOfMonth + 1; i++)\n\t\t\tblankButton(days[i + offset + 1]);\n\t\n\t}", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "private String displayMonthlySales(int month){\n for(int i = 0; i < transactionList.size(); i++){\n if(transactionList.get(i).getMonth() == month){\n System.out.print(transactionList.get(i).display());\n }\n }\n return \"\";\n }", "@FXML\n void showByMonth(ActionEvent event) {\n String sql = \"SELECT * FROM appointments where date_format(sysdate(), \" +\n \"'%Y-%m-01') = date_format(Start, '%Y-%m-01');\";\n showAppointmentsBy(sql);\n }", "public void viewMonthlyPatientList(Scanner input) {\n\n //Get the year for patient list\n System.out.println(\"Please enter the year for patient list record in form yyyy.\");\n String year = null;\n try {\n year = input.nextLine();\n if(year.length() > 4) {\n System.err.println(\"Please enter year in form yyyy. No space allowed\");\n return;\n }\n } catch (Exception e) {\n System.err.println(\"Invalid input\");\n return;\n }\n\n //Get the month for medical record\n System.out.println(\"Please enter the month for patient list record in form mm.\");\n String month = null;\n try {\n month = input.nextLine();\n if(month.length() != 2) {\n System.err.println(\"Please enter month in form mm. No space allowed\");\n return;\n }\n } catch (Exception e) {\n System.err.println(\"Invalid input\");\n return;\n }\n\n //Parse the start and end date\n String nextMonth = String.valueOf(Integer.parseInt(month) + 1);\n String start = year + \"-\" + month + \"-01\";\n String end = year + \"-\" + nextMonth + \"-01\";\n Date startUtil = null;\n Date endUtil = null;\n try {\n startUtil = new SimpleDateFormat(\"yyyy-MM-dd\").parse(start);\n endUtil = new SimpleDateFormat(\"yyyy-MM-dd\").parse(end);\n System.out.println(\"Start Date \" + startUtil + \" End Date \" + endUtil);\n java.sql.Date sqlStartDate = new java.sql.Date(startUtil.getTime());\n java.sql.Date sqlEndDate = new java.sql.Date(endUtil.getTime());\n result = statement.executeQuery(\"SELECT * FROM Patient INNER JOIN CheckInInformation ON Patient.id = CheckInInformation.patientId and (startDate BETWEEN Date '\" + sqlStartDate.toString() + \"' AND Date '\" + sqlEndDate.toString() + \"') AND ((endDate BETWEEN Date '\" + sqlStartDate.toString() + \"' AND '\" + sqlEndDate.toString() + \"') OR endDate is NULL )\");\n } catch (ParseException | SQLException e) {\n e.printStackTrace();\n return;\n }\n\n System.out.println(\"Generating patient list in \" + year + \"-\" + month);\n try {\n while (result.next()) {\n int id = 0;\n String pSSN = null;\n String pName = null;\n Date pDOB = null;\n String pGender = null;\n int pAge = 0;\n String pPhone = null;\n String pAddr = null;\n int pPlan = 0;\n String pIsInWard = null;\n String pComp = null;\n id = result.getInt(\"id\");\n pSSN = result.getString(\"ssn\");\n pName = result.getString(\"name\");\n pDOB = result.getDate(\"dob\");\n pGender = result.getString(\"gender\");\n pAge = result.getInt(\"age\");\n pPhone = result.getString(\"phone\");\n pAddr = result.getString(\"address\");\n pPlan = result.getInt(\"treatment\");\n pIsInWard = result.getString(\"inWard\");\n pComp = result.getString(\"status\");\n System.out.println(\"Patient ID = \" + id + \", SSN = \" + pSSN + \", name = \" + pName + \", date of birth = \" + pDOB + \", gender = \" + pGender + \", age = \" + pAge + \", phone number = \" + pPhone\n + \", address = \" + pAddr + \", processing treatment plan = \" + pPlan + \", is in ward = \" + pIsInWard + \", completing treatment = \" + pComp);\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println();\n System.out.println();\n\n }", "void updateMonthAndData(int i) {\n c.getFirstDayOfWeek();\n //compute change in month and year. Note we are operating on the calendar range of 0-11\n month = month + i;\n if (month < 0) {\n year--;\n month = 11;\n } else if (month > 11) {\n year++;\n month = 0;\n }\n //set the new date in calendar\n c.set(Calendar.YEAR, year);\n c.set(Calendar.MONTH, month);\n monthName = c.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault());\n daysInMonth = c.getActualMaximum(Calendar.DAY_OF_MONTH);\n dayOfWeek = c.get(Calendar.DAY_OF_WEEK_IN_MONTH);\n\n //notify the adapter of new date. This will also change the selected date in the grid part\n //and pull new data if necessary.\n calendarAdapter.update(year, month);\n //this is fact also passes the calendarAdapter new list of days with events\n // and calls notifyDataSetChanged on it!\n listEvents.update(year, month);\n //so that events are displayed for the first day of month or, if the month is the current one,\n //for \"today\"\n listEvents.setmSelectedDayOfMonth(calendarAdapter.getDayNumber(calendarAdapter.getCurrentlySelected()));\n //ask listEvents to redraw. Note that calendarAdapter already did that when we updated listEvents!\n listEvents.notifyDataSetChanged();\n //set the proper name of month at the header of the calendar\n ((TextView) ((RelativeLayout) (((RelativeLayout) rootView).getChildAt(0))).getChildAt(1)).setText(monthName);\n }", "public void setMonth(){\n\t\tArrayList<Appointment> avtaler = kalender.getAppointments();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\n\t\tCalendar brukKalender = Calendar.getInstance();\n\t\tbrukKalender.setTime(this.cal.getTime());\n\t\tmonthLabel.setText(monthString(brukKalender));\n\t\tyearMonth.setText(Integer.toString(brukKalender.get(Calendar.YEAR)));\n\t\t\n\t\tint max = 42;\n\t\tint days = brukKalender.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\tint indentTop = calculateIndentation(brukKalender);\n\t\tint missingBottom = (max - (days+indentTop));\n\t\t\n\t\tbrukKalender.set(Calendar.DAY_OF_MONTH, 1);\n\t\t\n\t\t\n\t\tfor (int day = indentTop; day < monthDays.size(); day++){\n\t\t\tmonthDays.get(day).setText(Integer.toString(brukKalender.get(Calendar.DAY_OF_MONTH)));\n\t\t\tmonthDays.get(day).setTextFill(Color.BLACK);\n\t\t\tif (brukKalender.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY){\n\t\t\t\tmonthDays.get(day).setStyle(\"-fx-background-color:None\");\n\t\t\t\tmonthDays.get(day).setOnMouseClicked(null);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmonthDays.get(day).setStyle(\"-fx-background-color:#FFB9B9\");\n\t\t\t\tmonthDays.get(day).setOnMouseClicked(null);\n\t\t\t}\n\t\t\tfor (Appointment avtale: avtaler){\n\t\t\t\tDate date = avtale.getDate();\n\t\t\t\tCalendar calDate = Calendar.getInstance();\n\t\t\t\tcalDate.setTime(date);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (calDate.get(Calendar.DAY_OF_YEAR) == brukKalender.get(Calendar.DAY_OF_YEAR)\n\t\t\t\t\t\t&& calDate.get(Calendar.YEAR) == brukKalender.get(Calendar.YEAR)){\n\t\t\t\t\tmonthDays.get(day).setStyle(\"-fx-background-color:#33CC33\");\n\t\t\t\t\tmonthDays.get(day).setOnMouseClicked(new EventHandler<MouseEvent>(){\n\t\t\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\t\t\tSystem.out.println(\"You clickeded meh\");\n\t\t\t\t\t\t\tdagsOversikt(event, avtale);\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\tbrukKalender.add(Calendar.DAY_OF_YEAR, +1);\n\t\t\t\n\t\t\tif (day >= (max-missingBottom)){\n\t\t\t\tmonthDays.get(day).setTextFill(Color.GRAY);\n\t\t\t}\n\t\t}\n\n\t\tbrukKalender.setTime(this.cal.getTime());\n\t\tbrukKalender.add(Calendar.MONTH, -1);\n\t\tbrukKalender.set(Calendar.DAY_OF_MONTH, brukKalender.getActualMaximum(Calendar.DAY_OF_MONTH));\n\n\t\tfor (int day = indentTop-1; day > -1; day--){\n\t\t\tmonthDays.get(day).setText(Integer.toString(brukKalender.get(Calendar.DAY_OF_MONTH)));\n\t\t\tmonthDays.get(day).setTextFill(Color.GRAY);\n\t\t\tif (!(day == 0)){\n\t\t\t\tbrukKalender.add(Calendar.DAY_OF_YEAR, -1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tbrukKalender.setTime(this.cal.getTime());\n\t\tbrukKalender.set(Calendar.DAY_OF_MONTH, 1);\n\t\tif (indentTop == 7){\n\t\t\tfor (int week = 1; week < monthWeeks.size(); week++){\n\t\t\t\tmonthWeeks.get(week).setText(Integer.toString(brukKalender.get(Calendar.WEEK_OF_YEAR)));\n\t\t\t\tbrukKalender.add(Calendar.WEEK_OF_YEAR, 1);\n\t\t\t}\n\t\t\tbrukKalender.setTime(this.cal.getTime());\n\t\t\tbrukKalender.set(Calendar.DAY_OF_MONTH, 1);\n\t\t\tbrukKalender.add(Calendar.DAY_OF_YEAR, -1);\n\t\t\tweek1.setText(Integer.toString(brukKalender.get(Calendar.WEEK_OF_YEAR)));\n\t\t}\n\t\telse{\n\t\t\tfor (int week = 0; week < monthWeeks.size(); week++){\n\t\t\t\tmonthWeeks.get(week).setText(Integer.toString(brukKalender.get(Calendar.WEEK_OF_YEAR)));\n\t\t\t\tbrukKalender.add(Calendar.WEEK_OF_YEAR, 1);\n\t\t\t}\n\t\t}\n\n\t}", "public void monthgoclicked()\n\t{\n\t\tChDaily1.setSelected(false);\n\t\tChDaily2.setSelected(false);\n\t\tChDaily3.setSelected(false);\n\t\tChDaily4.setSelected(false);\n\t\tsetColorDefault();\n\t\ty=Integer.parseInt(year.getText());\n\t\tm=Integer.parseInt(month.getText()); \n\t\td=Integer.parseInt(day.getText()); \n\t\tymod=y%100;\n\t\tcalendarformula(y);\n//January LOOP\n\t\tif (m == 1)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"January\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n//identifying day of the week of the following month\n\t\tdelay = (delay + 31) % 7;\n//February LOOP\n\t\tif (m == 2)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"February\");\n\t\t\tloopmonth(delay, february, d);\n\t\t}\n\t\tdelay = (delay + february) % 7;\n//March LOOP\n\t\tif (m == 3)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"March\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 31) % 7;\n//April LOOP\n\t\tif (m == 4)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"April\");\n\t\t\tloopmonth(delay, 30, d);\n\t\t}\n\t\tdelay = (delay + 30) % 7;\n//May LOOP\n\t\tif (m == 5)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"May\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 31) % 7;\n//June LOOP\n\t\tif (m == 6)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"June\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 30) % 7;\n//July LOOP\n\t\tif (m == 7)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"July\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 31) % 7;\n//August LOOP\n\t\tif (m == 8)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"August\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 31) % 7;\n//September LOOP\n\t\tif (m == 9)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"September\");\n\t\t\tloopmonth(delay, 30, d);\n\t\t}\n\t\tdelay = (delay + 30) % 7;\n//October LOOP\n\t\tif (m == 10)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"October\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tdelay = (delay + 31) % 7;\n//November LOOP\n\t\tif (m == 11)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"November\");\n\t\t\tloopmonth(delay, 30, d);\n\t\t}\n\t\tdelay = (delay + 30) % 7;\n//December LOOP\n\t\tif (m == 12)\n\t\t{\n\t\t\tsetDefault();\n\t\t\tMonthLabel.setText(\"December\");\n\t\t\tloopmonth(delay, 31, d);\n\t\t}\n\t\tYearLabel.setText(Integer.toString(y));\n\t}", "public void get_per_month_info(){\n\t Collection<Review> rev = this.reviews.getR_catalog().values();\n\t Map<Integer,Integer> out_1 = new HashMap<>();\n\t Map<Integer,Float> out_2 = new HashMap<>();\n\t Map<Integer,HashSet<String>> out_3 = new HashMap<>();\n\t rev.forEach(u->{\n\t\t int k = u.getDate().getMonth();\n\t\t if(out_1.get(k)!=null){\n\t\t\t out_1.put(k, out_1.get(k)+1);\n\t\t }else\n\t\t\t out_1.put(k, 1);\n\n\t\t if(out_2.get(k)!=null){\n\t\t\t out_2.put(k,(out_2.get(k)+u.getStars())/2);\n\t\t }else\n\t\t\t out_2.put(k, u.getStars());\n\n\t\t if(out_3.get(k)!=null){\n\t\t\t HashSet<String> l = out_3.get(k);\n\t\t\t\tl.add(u.get_user_id());\n\t\t\t out_3.put(k,l);\n\t\t }else{\n\t\t\t HashSet<String> l = new HashSet<>();\n\t\t\t l.add(u.get_user_id());\n\t\t\t out_3.put(k,l);\n\t\t }\n\t });\n\t Collection<Float> average = out_2.values();\n\t float global = 0;\n\t for(float f : average){\n\t\t global += f;\n\t }\n\t global = global/average.size();\n\t Map<Integer,Integer> urs = new HashMap<>();\n\t out_3.entrySet().forEach(u->{urs.put(u.getKey(),u.getValue().size());});\n\t this.stats.setReviews_per_month(out_1);\n\t this.stats.setAverage_per_month(out_2);\n\t this.stats.setUsers_per_month(urs);\n\t this.stats.setGlobal_average(global);\n }", "public void Eastercounter(){\n\n int i,j;\n String m = \"\";\n\n int frequency[][] = new int [2][31];\n\n for (i=0; i<2; i++){\t\t\t\t\t\t//initialize frequency array\n for(j=0;j<31;j++){\n frequency[i][j] = 0;\n }//end inner for\n }//end outer for\n\n\n for(i=1; i <= 5700000; i++){\n year = i;\n calcEasterDate();\n\n for(i=0;i<2;i++){\n for(j=0;j<31;j++){\n if((i == 0 && j<21) || (i==1 && j>24)){\n continue;\n }\n if ((i+3) == month && (j+1) == day ){\n ++frequency[i][j];\n\n }//end if\n }//end inner for\n }//end outer for\n }//end loop through years\n\n for(i=0;i<2;i++){\n for(j=0;j<31;j++){\n\n if (i == 0){\n m = \"March\";\n }\n if (i == 1){\n m = \"April\";\n }\n\n if (frequency[i][j] != 0)\n System.out.printf(\"%s %d - %d\\n\",m,(j+1), frequency[i][j]);\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generiert eine Instanz des SelectionDjinnAdapters.
public SelectionDjinnAdapter() { super(); }
[ "protected abstract Adapter createAdapter();", "@Override\n public ObjectAdapter getAdapter() {\n return new ObjectAdapter<>(\n Arrays.asList(choices), getActivity()\n );\n }", "protected abstract ListAdapter createAdapter();", "private void createAdapters() {\n // Available quests for a Neutral hero\n adapterAvailableNeutral = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Available quests for a Good hero\n adapterAvailableGood = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ALIGNMENT_KEY, 0);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Available quests for an Evil hero\n adapterAvailableEvil = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ALIGNMENT_KEY, 2);\n query.whereDoesNotMatchKeyInQuery(QuestApp.ACCEPTEDBY_KEY, QuestApp.OBJECTID_KEY, ParseUser.getQuery());\n return query;\n }\n });\n\n // Quests accepted by user\n adapterAccepted = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, false);\n query.whereEqualTo(QuestApp.ACCEPTEDBY_KEY, user);\n return query;\n }\n });\n\n // Quests completed by user\n adapterCompleted = new QuestAdapter(this, new ParseQueryAdapter.QueryFactory<ParseObject>(){\n @Override\n public ParseQuery create() {\n ParseQuery query = new ParseQuery(QuestApp.QUEST_DATABASE);\n query.whereEqualTo(QuestApp.COMPLETED_KEY, true);\n query.whereEqualTo(QuestApp.ACCEPTEDBY_KEY, user);\n return query;\n }\n });\n }", "protected void generateAdapter() {\n // view holder class\n String holderClassName = Utils.getViewHolderClassName();\n StringBuilder holderBuilder = new StringBuilder();\n\n // generator of view holder class\n StringBuilder generator = new StringBuilder();\n generator.append(\"public \" + holderClassName + \"(android.view.View rootView) {\\n\");\n\n // rootView\n String rootViewName = \"rootView\";\n holderBuilder.append(\"public \" + \"android.view.View \" + rootViewName + \";\\n\");\n generator.append(\"this.\" + rootViewName + \" = \" + rootViewName + \";\\n\");\n\n for (Element element : mElements) {\n if (!element.used) {\n continue;\n }\n\n // field\n holderBuilder.append(\"public \" + element.name + \" \" + element.getFieldName() + \";\\n\");\n\n // findViewById in generator\n generator.append(\"this.\" + element.getFieldName() + \" = (\" + element.name + \") \"\n + rootViewName + \".findViewById(\" + element.getFullID() + \");\\n\");\n }\n generator.append(\"}\\n\");\n\n holderBuilder.append(generator.toString());\n\n PsiClass viewHolder = mFactory.createClassFromText(holderBuilder.toString(), mClass);\n viewHolder.setName(holderClassName);\n mClass.add(viewHolder);\n mClass.addBefore(mFactory.createKeyword(\"public\", mClass), mClass.findInnerClassByName(holderClassName, true));\n mClass.addBefore(mFactory.createKeyword(\"static\", mClass), mClass.findInnerClassByName(holderClassName, true));\n }", "private void createAdapter() {\n mMovieAdapter = new MovieAdapter(this);\n }", "Builder adapterFactory(TypeAdapterFactory factory);", "public interface DbAdapter {\n\n /**\n * @deprecated since 1.1 Use JdbcAdapter.class.getName()\n */\n public static final String JDBC = \"org.objectstyle.cayenne.dba.JdbcAdapter\";\n \n /**\n * @deprecated since 1.1 Use MySQLAdapter.class.getName()\n */\n public static final String MYSQL = \"org.objectstyle.cayenne.dba.mysql.MySQLAdapter\";\n \n /**\n * @deprecated since 1.1 Use OracleAdapter.class.getName()\n */\n public static final String ORACLE =\n \"org.objectstyle.cayenne.dba.oracle.OracleAdapter\";\n \n /**\n * @deprecated since 1.1 Use SybaseAdapter.class.getName()\n */\n public static final String SYBASE =\n \"org.objectstyle.cayenne.dba.sybase.SybaseAdapter\";\n \n /**\n * @deprecated since 1.1 Use PostgresAdapter.class.getName()\n */\n public static final String POSTGRES =\n \"org.objectstyle.cayenne.dba.postgres.PostgresAdapter\";\n \n /**\n * @deprecated since 1.1 Use HSQLDBAdapter.class.getName()\n */\n public static final String HSQLDB =\n \"org.objectstyle.cayenne.dba.hsqldb.HSQLDBAdapter\";\n \n /**\n * @deprecated since 1.1 Use DB2Adapter.class.getName()\n */\n public static final String DB2 = \"org.objectstyle.cayenne.dba.db2.DB2Adapter\";\n \n /**\n * @deprecated since 1.1 Use FirebirdAdapter.class.getName()\n */\n public static final String FIREBIRD =\n \"org.objectstyle.cayenne.dba.firebird.FirebirdAdapter\";\n \n /**\n * @deprecated since 1.1 Use OpenBaseAdapter.class.getName()\n */\n public static final String OPENBASE =\n \"org.objectstyle.cayenne.dba.openbase.OpenBaseAdapter\";\n \n /**\n * @deprecated since 1.1 Use SQLServerAdapter.class.getName()\n */\n public static final String SQLSERVER =\n \"org.objectstyle.cayenne.dba.sqlserver.SQLServerAdapter\";\n\n /**\n * All available DbAdapter subclass names.\n * \n * @deprecated since 1.1 This is not a good way to tell what adapters exist,\n * besides there maybe custom adapters.\n */\n public static final String[] availableAdapterClassNames =\n new String[] {\n DbAdapter.JDBC,\n DbAdapter.DB2,\n DbAdapter.FIREBIRD,\n DbAdapter.HSQLDB,\n DbAdapter.MYSQL,\n DbAdapter.ORACLE,\n DbAdapter.POSTGRES,\n DbAdapter.SYBASE,\n DbAdapter.OPENBASE,\n DbAdapter.SQLSERVER };\n\n /**\n * Returns a String used to terminate a batch in command-line\n * tools. E.g. \";\" on Oracle or \"go\" on Sybase.\n * \n * @since 1.0.4\n */\n public String getBatchTerminator();\n\n /**\n * Creates an returns a named instance of a DataNode. Sets node adapter to be this object.\n */\n public DataNode createDataNode(String name);\n\n /** \n * Returns true if a target database supports FK constraints. \n */\n public boolean supportsFkConstraints();\n\n /** \n * Returns true if a target database supports UNIQUE constraints. \n * \n * @since 1.1\n */\n public boolean supportsUniqueConstraints();\n\n /**\n * Returns <code>true</code> if the target database supports\n * batch updates.\n */\n public boolean supportsBatchUpdates();\n\n /**\n * Returns a SQL string that can be used to drop\n * a database table corresponding to <code>ent</code>\n * parameter.\n */\n public String dropTable(DbEntity ent);\n\n /**\n * Returns a SQL string that can be used to create database table\n * corresponding to <code>ent</code> parameter.\n */\n public String createTable(DbEntity ent);\n\n /**\n * Returns a DDL string to create a unique constraint over a set \n * of columns.\n * \n * @since 1.1\n */\n public String createUniqueConstraint(DbEntity source, Collection columns);\n\n /**\n * Returns a SQL string that can be used to create\n * a foreign key constraint for the relationship.\n */\n public String createFkConstraint(DbRelationship rel);\n\n /**\n * Returns an array of RDBMS types that can be used with JDBC <code>type</code>.\n * Valid JDBC types are defined in java.sql.Types.\n */\n public String[] externalTypesForJdbcType(int type);\n\n /**\n * Returns a map of ExtendedTypes that is used to translate values between\n * Java and JDBC layer.\n * \n * @see org.objectstyle.cayenne.access.types.ExtendedType\n */\n public ExtendedTypeMap getExtendedTypes();\n\n /**\n * Returns primary key generator associated with this DbAdapter.\n */\n public PkGenerator getPkGenerator();\n\n /**\n * Creates and returns a QueryTranslator appropriate for the\n * specified <code>query</code> parameter. Sets translator\n * \"query\" and \"adapter\" property.\n *\n * <p>This factory method allows subclasses to specify their\n * own translators that implement vendor-specific optimizations.\n * </p>\n */\n public QueryTranslator getQueryTranslator(Query query) throws Exception;\n\n public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler);\n\n /**\n * Creates and returns a DbAttribute based on supplied parameters\n * (usually obtained from database meta data).\n *\n * @param name database column name\n * @param typeName database specific type name, may be used as a hint to\n * determine the right JDBC type.\n * @param type JDBC column type\n * @param size database column size (ignored if less than zero)\n * @param precision database column precision (ignored if less than zero)\n * @param allowNulls database column nullable parameter\n */\n public DbAttribute buildAttribute(\n String name,\n String typeName,\n int type,\n int size,\n int precision,\n boolean allowNulls);\n\n /**\n * Binds an object value to PreparedStatement's numbered parameter.\n */\n public void bindParameter(\n PreparedStatement statement,\n Object object,\n int pos,\n int sqlType,\n int precision)\n throws SQLException, Exception;\n\n /**\n * Returns the name of the table type (as returned by\n * <code>DatabaseMetaData.getTableTypes</code>) for a simple user table.\n */\n public String tableTypeForTable();\n\n /**\n * Returns the name of the table type (as returned by\n * <code>DatabaseMetaData.getTableTypes</code>) for a view table.\n */\n public String tableTypeForView();\n\n /**\n * Invoked by DataNode, allowing adapter to customize the execution \n * path for the BatchQuery. If adapter returns <code>false</code>,\n * DataNode will not make any further attempts to run the query.\n */\n public boolean shouldRunBatchQuery(\n DataNode node,\n Connection con,\n BatchQuery query,\n OperationObserver delegate)\n throws SQLException, Exception;\n}", "public JdbcAdapter() {\n // init defaults\n this.setSupportsBatchUpdates(false);\n this.setSupportsUniqueConstraints(true);\n this.setSupportsFkConstraints(true);\n\n this.pkGenerator = this.createPkGenerator();\n this.typesHandler = TypesHandler.getHandler(findAdapterResource(\"/types.xml\"));\n this.extendedTypes = new ExtendedTypeMap();\n this.configureExtendedTypes(extendedTypes);\n }", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "@Override\n\t\t\tprotected IAdapterFactory getDefaultAdapterFactory(Object type) {\n\t\t\t\treturn defaultAdapterFactory;\n\t\t\t}", "@Override\n public String getAdapterClassName() {\n return getAdapterConfiguration().getAdapterType();\n }", "public void setAdapter() {\n // Create Custom Adapter\n Resources res = getResources();\n adapter = null;\n adapter = new WebsearchListAdapter(this, CustomListViewValuesArr, res);\n list.setAdapter(adapter);\n }", "EditorBarajasGUI_listSeleccionadas_mouseAdapter(EditorBarajasGUI adaptee) {\n this.adaptee = adaptee;\n }", "public ListSqlHelper() {\n\t\t// for bran creation\n\t}", "public Class<? extends Dialog<Collection<DataAdapter>>> getAdapterDialog();", "public void registerAdapters(IAdapterFactory factory, Class<?> adaptable);", "private ChadoAdapter getAndInitAdapter() throws ApolloAdapterException {\n// ChadoAdapter adapter = null;\n\n// // Sanity check - we're forced to accept any adapter in setAdapter() but the\n// // Apollo data adapter spec. suggests that each GUI will work only with the\n// // corresponding adapter class.\n// if (this.driver instanceof ChadoAdapter) {\n// adapter = ((ChadoAdapter)this.driver);\n// } else {\n// throw new apollo.dataadapter.ApolloAdapterException(\"ChadoAdapterGUI not compatible with adapter \" + this.driver);\n// }\n\n// ChadoDatabase selectedDb = getSelectedDatabase();\n// // if (custom) selectedDb = makeCustomDatabase(); // need to add this!\n// if (selectedDb == null) // can this happen?\n// throw new ApolloAdapterException(\"No database selected(or custom - fix this)\");\n\n ChadoAdapter adapter = setUpChadoAdapter();\n\n IOOperation op = getOperation();\n\n // READ\n if (op.equals(ApolloDataAdapterI.OP_READ_DATA)) {\n\n DataInput dataInput;\n // For location type - types with locations should be configured somehow\n if (isLocationQuery()) {\n String startString = startField.getText();\n String endString = endField.getText();\n try {\n String type = getSelectedSeqType();\n dataInput = new DataInput(getSequenceId(),startString,endString,type);\n }\n catch (RuntimeException e) { throw new ApolloAdapterException(e.getMessage()); }\n }\n else { // not a location\n // for now sequence type has to correlate with a SO type in DataInputType\n dataInput = new DataInput(getSelectedSeqType(),getSequenceId());\n }\n adapter.setDataInput(dataInput);\n\n }\n\n // WRITE\n // Only url, dbuser, and dbpwd is needed for writing\n // i guess nothing special needs doing anymore for write, taken care of in chado cd?\n //else if (op.equals(ApolloDataAdapterI.OP_WRITE_DATA)) {}\n\n //adapter.setStateInformation(params);\n// selectedDb.setLogin(getUsername());\n// selectedDb.setPassword(getPassword());\n// adapter.setActiveDatabase(selectedDb);\n return adapter;\n }", "public Class<? extends DataAdapter> getAdapterClass();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that it's possible to delete the annotation body using a reference to a different format.
@Test public void deleteAnnotationBodyWithContentNegotiation() throws IOException { InputStream is = getClass().getClassLoader().getResourceAsStream("rdfStructure/mess-ro/.ro/annotationBody.ttl"); addAnnotation(ro, annotationBodyPath, is); ClientResponse response = webResource.uri(ro).path(annotationBodyURIRDF).queryParam("original", "ann1.ttl") .header("Authorization", "Bearer " + accessToken).delete(ClientResponse.class); is.close(); assertEquals(HttpServletResponse.SC_NO_CONTENT, response.getStatus()); response.close(); }
[ "@Test\n public void deleteAnnotationBody()\n throws IOException {\n InputStream is = getClass().getClassLoader().getResourceAsStream(\"rdfStructure/mess-ro/.ro/annotationBody.ttl\");\n addAnnotation(ro, annotationBodyPath, is);\n ClientResponse response = webResource.uri(ro).path(annotationBodyPath)\n .header(\"Authorization\", \"Bearer \" + accessToken).delete(ClientResponse.class);\n is.close();\n assertEquals(HttpServletResponse.SC_NO_CONTENT, response.getStatus());\n response.close();\n }", "public void deleteAnnotation(Annotation note);", "@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 }", "void removeAnnotation(Annotation annotation) {\n for (URI target : annotation.getTargets()) {\n annotations.get(target).remove(annotation);\n }\n \n }", "@Test\n public void testDeleteDocument() {\n try {\n System.out.println(\"deleteDocument\");\n Calendar date = Calendar.getInstance();\n date.set(1989, 3, 9);\n Calendar date2 = Calendar.getInstance();\n date2.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Note note3 = new NoteImpl(3, \"TEST NOTE3\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy = new ModifiedBy(\"MODIFIED\", \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy2 = new ModifiedBy(\"MODIFIED2\", \"DEDWARDS\", new Date());\n Document document = new DocumentImpl(1, new File(\"TEST.pdf\"), note, \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n AddressUsage addressUsage = new AddressUsage(1, address, date2.getTime(), note3, \"DEDWARDS\", new Date());\n Person instance = new Person(1, element, \"Dwayne\", \"Leroy\", \"Edwards\", date.getTime(), \"JL 81 61 90 C\", element, element, element, element, element, element, element, addressUsage, \"DEDWARDS\", new Date());\n \n assertEquals(0, instance.getDocuments().size());\n instance.createDocument(document, modifiedBy);\n assertEquals(1, instance.getDocuments().size());\n assertEquals(1, instance.getModifiedBy().size());\n instance.deleteDocument(7, modifiedBy2);\n assertEquals(true, instance.hasDocument(document.getDocumentRef()));\n assertEquals(true, instance.hasDocument(\"TEST.pdf\"));\n assertEquals(modifiedBy, instance.getLastModification());\n instance.deleteDocument(document.getDocumentRef(), modifiedBy2);\n assertEquals(2, instance.getModifiedBy().size());\n assertEquals(modifiedBy2, instance.getLastModification());\n assertEquals(false, instance.hasDocument(document.getDocumentRef()));\n assertEquals(false, instance.hasDocument(\"TEST.pdf\"));\n } catch (RemoteException ex) {\n Logger.getLogger(PersonTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Path(\"/{datatypewithexampleId}\")\n @DELETE\n void deletedataTypeWithExample(@PathParam(\"datatypewithexampleId\") String datatypewithexampleId);", "@Test\n public void addAnnotationBody() {\n InputStream is = getClass().getClassLoader().getResourceAsStream(\"rdfStructure/mess-ro/.ro/annotationBody.ttl\");\n ClientResponse response = addAnnotation(ro, annotationBodyPath, is);\n IOUtils.closeQuietly(is);\n assertEquals(HttpServletResponse.SC_CREATED, response.getStatus());\n OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_LITE_MEM);\n model.read(response.getEntityInputStream(), null);\n Individual proxy = model.listIndividuals(ORE.Proxy).next();\n Individual resource = model.getIndividual(ro.resolve(annotationBodyPath).toString());\n Assert.assertNotNull(proxy);\n Assert.assertTrue(resource.hasRDFType(ORE.AggregatedResource));\n Assert.assertTrue(model.contains(proxy, ORE.proxyFor, resource));\n Assert.assertTrue(model.contains(resource, DCTerms.created, (RDFNode) null));\n Assert.assertTrue(model.contains(resource, DCTerms.creator, (RDFNode) null));\n Individual annotation = model.getIndividual(response.getLocation().toString());\n Assert.assertTrue(annotation.hasRDFType(RO.AggregatedAnnotation));\n Assert.assertTrue(model.contains(annotation, AO.body, resource));\n Assert.assertTrue(model.contains(annotation, RO.annotatesAggregatedResource, (RDFNode) null));\n Assert.assertTrue(model.contains(annotation, DCTerms.created, (RDFNode) null));\n Assert.assertTrue(model.contains(annotation, DCTerms.creator, (RDFNode) null));\n response.close();\n webResource.uri(ro).path(annotationBodyPath).header(\"Authorization\", \"Bearer \" + accessToken)\n .delete(ClientResponse.class);\n }", "@Test\n public void getAnnotationBody() {\n InputStream is = getClass().getClassLoader().getResourceAsStream(\"rdfStructure/mess-ro/.ro/annotationBody.ttl\");\n ClientResponse response = addAnnotation(ro, annotationBodyPath, is);\n IOUtils.closeQuietly(is);\n assertEquals(HttpStatus.SC_CREATED, response.getStatus());\n response.close();\n String body = webResource.uri(ro).path(annotationBodyPath).header(\"Authorization\", \"Bearer \" + accessToken)\n .get(String.class);\n assertTrue(\"Annotation body should contain file path: a%20workflow.t2flow\",\n body.contains(\"a%20workflow.t2flow\"));\n assertTrue(body.contains(\"A test\"));\n }", "public void delete()\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n if (annotation.getStatements().isEmpty()) {\n annotation.delete();\n } else {\n annotation.update();\n }\n value = null;\n }", "@DELETE\r\n\t@Path(\"{id}\")\r\n\tpublic Response deleteAnnotation(@PathParam(\"id\") String id)\r\n\t\t\tthrows UnsupportedEncodingException, AnnotationNotFoundException,\r\n\t\t\tAnnotationHasReplyException, PermissionDeniedException {\r\n\r\n\t\treturn super.deleteAnnotation(id);\r\n\t}", "@Test\n public void testDeleteDocument() {\n try {\n System.out.println(\"deleteDocument\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Note note3 = new NoteImpl(3, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy = new ModifiedBy(\"MODIFIED\", \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy2 = new ModifiedBy(\"MODIFIED2\", \"DEDWARDS\", new Date());\n Document document = new DocumentImpl(1, new File(\"TEST.pdf\"), note3, \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n \n assertEquals(0, instance.getDocuments().size());\n instance.createDocument(document, modifiedBy);\n assertEquals(1, instance.getDocuments().size());\n assertEquals(1, instance.getModifiedBy().size());\n instance.deleteDocument(7, modifiedBy2);\n assertEquals(true, instance.hasDocument(document.getDocumentRef()));\n assertEquals(true, instance.hasDocument(\"TEST.pdf\"));\n assertEquals(modifiedBy, instance.getLastModification());\n instance.deleteDocument(document.getDocumentRef(), modifiedBy2);\n assertEquals(2, instance.getModifiedBy().size());\n assertEquals(modifiedBy2, instance.getLastModification());\n assertEquals(false, instance.hasDocument(document.getDocumentRef()));\n assertEquals(false, instance.hasDocument(\"TEST.pdf\"));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "void assertAnnotation();", "@Test\n public void getAnnotationBodyWithContentNegotiation()\n throws UniformInterfaceException, ClientHandlerException, IOException {\n InputStream is = getClass().getClassLoader().getResourceAsStream(\"rdfStructure/mess-ro/.ro/annotationBody.ttl\");\n addAnnotation(ro, annotationBodyPath, is).close();\n IOUtils.closeQuietly(is);\n ClientResponse response = webResource.uri(ro).path(annotationBodyURIRDF).queryParam(\"original\", \"ann1.ttl\")\n .header(\"Authorization\", \"Bearer \" + accessToken).get(ClientResponse.class);\n String body = IOUtils.toString(response.getEntityInputStream());\n assertEquals(\"application/rdf+xml\", response.getType().toString());\n response.close();\n assertTrue(\"Annotation body should contain file path: a%20workflow.t2flow\",\n body.contains(\"a%20workflow.t2flow\"));\n assertTrue(body.contains(\"A test\"));\n\n }", "@Test\r\n\tvoid cannotChangeTypeAfterDelete() throws IOException {\r\n\t\tUtils.semanticErrors(String.join(\"\\r\\n\" \r\n\t\t\t\t, \"{\"\r\n\t\t\t\t, \" int x; delete x; bool x;\"\r\n\t\t\t\t, \"}\")\r\n\t\t, 1);\r\n\t}", "public void deleteAnnotation(Annotation annotation)\n {\n int index = findAnnotationIndex(annotation,\n targetAnnotationsAttribute.annotations,\n targetAnnotationsAttribute.u2annotationsCount);\n deleteAnnotation(index);\n }", "void deleteShape(String shape);", "@Test\n public void test003modifyOrgStructDeleteRefIncorrect() throws Exception {\n OperationResult opResult = new OperationResult(\"test003modifyOrgStructDeleteRefIncorrect\");\n ObjectModificationType modification = PrismTestUtil.parseAtomicValue(new File(MODIFY_ORG_INCORRECT_DELETE_REF_FILENAME),\n ObjectModificationType.COMPLEX_TYPE);\n\n ObjectDelta<OrgType> delta = DeltaConvertor.createObjectDelta(modification, OrgType.class, prismContext);\n\n Session session = open();\n try {\n LOGGER.info(\"==>before modify - delete<==\");\n List<ROrgClosure> orgClosure = getOrgClosure(ORG_F012_OID, MODIFY_ORG_INCORRECT_DELETE_REF_OID, session);\n AssertJUnit.assertEquals(0, orgClosure.size());\n\n session.getTransaction().commit();\n\n repositoryService.modifyObject(OrgType.class, MODIFY_ORG_INCORRECT_DELETE_REF_OID, delta.getModifications(), opResult);\n\n session.clear();\n session.beginTransaction();\n\n LOGGER.info(\"==>after modify - delete<==\");\n orgClosure = getOrgClosure(ORG_F012_OID, MODIFY_ORG_INCORRECT_DELETE_REF_OID, session);\n AssertJUnit.assertEquals(0, orgClosure.size());\n } finally {\n close(session);\n }\n }", "@Test\n public void unlinkSingleField() throws Exception {\n Document doc = new Document(getMyDir() + \"Linked fields.docx\");\n doc.getRange().getFields().get(1).unlink();\n //ExEnd\n\n doc = DocumentHelper.saveOpen(doc);\n String paraWithFields = DocumentHelper.getParagraphText(doc, 0);\n Assert.assertEquals(paraWithFields, \"\\u0013 FILENAME \\\\* Caps \\\\* MERGEFORMAT \\u0014Fields.Docx\\u0015 Элементы указателя не найдены. \\u0013 LISTNUM LegalDefault \\u0015\\r\");\n }", "@Test\n public void testPostBadParameters() {\n DispoAnnotationData badAnnotationToCreate = new DispoAnnotationData();\n badAnnotationToCreate.setLocationRefs(\"\");\n Response postResponseBadName = resource.postDispoAnnotation(badAnnotationToCreate, \"name\");\n String returnedEntityBadName = (String) postResponseBadName.getEntity();\n assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), postResponseBadName.getStatus());\n assertEquals(DispoMessages.Annotation_EmptyLocRef, returnedEntityBadName);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the bytecode for a collection proxy for the given type.
protected BCClass generateProxyCollectionBytecode(Class type) { assertNotFinal(type); Project project = new Project(); BCClass bc = project.loadClass(Strings.getPackageName (ProxyManagerImpl.class) + "." + type.getName().replace('.', '$') + "$" + nextProxyId() + PROXY_SUFFIX); bc.setSuperclass(type); bc.declareInterface(ProxyCollection.class); delegateConstructors(bc, type); addProxyMethods(bc, type, false); addProxyCollectionMethods(bc, type); proxyRecognizedMethods(bc, type, ProxyCollections.class, ProxyCollection.class); proxySetters(bc, type); addWriteReplaceMethod(bc); return bc; }
[ "protected byte[] generateProxyCollectionBytecode(Class type, boolean runtime, String proxyClassName) {\n assertNotFinal(type);\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyCollection.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, false, proxyClassDef, type);\n addProxyCollectionMethods(ct, proxyClassDef, type);\n proxyRecognizedMethods(ct, proxyClassDef, type, ProxyCollections.class, ProxyCollection.class);\n proxySetters(ct, proxyClassDef, type);\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "protected BCClass generateProxyMapBytecode(Class type) {\n assertNotFinal(type);\n Project project = new Project(); \n BCClass bc = project.loadClass(Strings.getPackageName\n (ProxyManagerImpl.class) + \".\" + type.getName().replace('.', '$')\n + \"$\" + nextProxyId() + PROXY_SUFFIX);\n bc.setSuperclass(type);\n bc.declareInterface(ProxyMap.class);\n \n delegateConstructors(bc, type);\n addProxyMethods(bc, type, false);\n addProxyMapMethods(bc, type);\n proxyRecognizedMethods(bc, type, ProxyMaps.class, ProxyMap.class);\n proxySetters(bc, type);\n addWriteReplaceMethod(bc);\n return bc;\n }", "protected BCClass generateProxyBeanBytecode(Class type) {\n if (Modifier.isFinal(type.getModifiers()))\n return null;\n if (ImplHelper.isManagedType(type))\n return null;\n \n // we can only generate a valid proxy if there is a copy constructor\n // or a default constructor\n Constructor cons = findCopyConstructor(type);\n if (cons == null) {\n Constructor[] cs = type.getConstructors();\n for (int i = 0; cons == null && i < cs.length; i++)\n if (cs[i].getParameterTypes().length == 0)\n cons = cs[i]; \n if (cons == null)\n return null;\n }\n \n Project project = new Project(); \n BCClass bc = project.loadClass(Strings.getPackageName\n (ProxyManagerImpl.class) + \".\" + type.getName().replace('.', '$')\n + \"$\" + nextProxyId() + PROXY_SUFFIX);\n bc.setSuperclass(type);\n bc.declareInterface(ProxyBean.class);\n \n delegateConstructors(bc, type);\n addProxyMethods(bc, type, true);\n addProxyBeanMethods(bc, type, cons);\n if (!proxySetters(bc, type))\n return null;\n addWriteReplaceMethod(bc);\n return bc;\n }", "protected BCClass generateProxyCalendarBytecode(Class type) {\n assertNotFinal(type);\n Project project = new Project(); \n BCClass bc = project.loadClass(Strings.getPackageName\n (ProxyManagerImpl.class) + \".\" + type.getName().replace('.', '$')\n + \"$\" + nextProxyId() + PROXY_SUFFIX);\n bc.setSuperclass(type);\n bc.declareInterface(ProxyCalendar.class);\n \n delegateConstructors(bc, type);\n addProxyMethods(bc, type, true);\n addProxyCalendarMethods(bc, type);\n proxySetters(bc, type);\n addWriteReplaceMethod(bc);\n return bc;\n }", "protected byte[] generateProxyMapBytecode(Class type, boolean runtime, String proxyClassName) {\n assertNotFinal(type);\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyMap.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, false, proxyClassDef, type);\n addProxyMapMethods(ct, proxyClassDef, type);\n proxyRecognizedMethods(ct, proxyClassDef, type, ProxyMaps.class, ProxyMap.class);\n proxySetters(ct, proxyClassDef, type);\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "protected BCClass generateProxyDateBytecode(Class type) {\n assertNotFinal(type);\n Project project = new Project(); \n BCClass bc = project.loadClass(Strings.getPackageName\n (ProxyManagerImpl.class) + \".\" + type.getName().replace('.', '$')\n + \"$\" + nextProxyId() + PROXY_SUFFIX);\n bc.setSuperclass(type);\n bc.declareInterface(ProxyDate.class);\n \n delegateConstructors(bc, type);\n addProxyMethods(bc, type, true);\n addProxyDateMethods(bc, type);\n proxySetters(bc, type);\n addWriteReplaceMethod(bc);\n return bc;\n }", "protected byte[] generateProxyBeanBytecode(Class type, boolean runtime, String proxyClassName) {\n if (Modifier.isFinal(type.getModifiers())) {\n return null;\n }\n if (ImplHelper.isManagedType(null, type)) {\n return null;\n }\n\n // we can only generate a valid proxy if there is a copy constructor\n // or a default constructor\n Constructor cons = findCopyConstructor(type);\n if (cons == null) {\n Constructor[] cs = type.getConstructors();\n for (int i = 0; cons == null && i < cs.length; i++) {\n if (cs[i].getParameterTypes().length == 0) {\n cons = cs[i];\n }\n }\n if (cons == null)\n return null;\n }\n\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyBean.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, true, proxyClassDef, type);\n addProxyBeanMethods(ct, proxyClassDef, type, cons);\n if (!proxySetters(ct, proxyClassDef, type)) {\n return null;\n }\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "public static void main(String[] args) \n throws ClassNotFoundException, IOException {\n File dir = Files.getClassFile(ProxyManagerImpl.class);\n dir = (dir == null) ? new File(System.getProperty(\"user.dir\"))\n : dir.getParentFile();\n \n ProxyManagerImpl mgr = new ProxyManagerImpl();\n Class cls;\n BCClass bc;\n for (int i = 0; i < args.length; i++) {\n cls = Class.forName(args[i]);\n if (Collection.class.isAssignableFrom(cls))\n bc = mgr.generateProxyCollectionBytecode(cls); \n else if (Map.class.isAssignableFrom(cls))\n bc = mgr.generateProxyMapBytecode(cls); \n else if (Date.class.isAssignableFrom(cls))\n bc = mgr.generateProxyDateBytecode(cls);\n else if (Calendar.class.isAssignableFrom(cls))\n bc = mgr.generateProxyCalendarBytecode(cls);\n else\n bc = mgr.generateProxyBeanBytecode(cls);\n \n System.out.println(bc.getName());\n bc.write(new File(dir, bc.getClassName() + \".class\"));\n }\n }", "private ProxyCollection getFactoryProxyCollection(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyCollection proxy = (ProxyCollection) _proxies.get(type);\n if (proxy == null) {\n proxy = (ProxyCollection) instantiateProxy\n (generateProxyCollectionBytecode(type), type, \n ProxyCollection.class, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "private ProxyCollection getFactoryProxyCollection(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyCollection proxy = (ProxyCollection) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyCollection.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyCollection(type, true, l);\n proxy = (ProxyCollection) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "protected byte[] generateProxyCalendarBytecode(Class type, boolean runtime, String proxyClassName) {\n assertNotFinal(type);\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyCalendar.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, true, proxyClassDef, type);\n addProxyCalendarMethods(ct, proxyClassDef, type);\n proxySetters(ct, proxyClassDef, type);\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "protected byte[] generateProxyDateBytecode(Class type, boolean runtime, String proxyClassName) {\n assertNotFinal(type);\n String proxyClassDef = proxyClassName.replace('.', '/');\n String superClassFileNname = Type.getInternalName(type);\n String[] interfaceNames = new String[]{Type.getInternalName(ProxyDate.class)};\n\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(Opcodes.V11, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyClassDef,\n null, superClassFileNname, interfaceNames);\n\n ClassWriterTracker ct = new ClassWriterTracker(cw);\n String classFileName = runtime ? type.getName() : proxyClassDef;\n cw.visitSource(classFileName + \".java\", null);\n\n delegateConstructors(ct, type, superClassFileNname);\n addInstanceVariables(ct);\n addProxyMethods(ct, true, proxyClassDef, type);\n addProxyDateMethods(ct, proxyClassDef, type);\n proxySetters(ct, proxyClassDef, type);\n addWriteReplaceMethod(ct, proxyClassDef, runtime);\n\n return cw.toByteArray();\n }", "public void generateByteCode(Optimizer opt) {}", "protected Class loadBuildTimeProxy(Class type, ClassLoader loader) {\n try {\n Class<?> proxyClass = null;\n if (_delayedCollectionLoading) {\n proxyClass = loadDelayedProxy(type);\n if (proxyClass != null) {\n return proxyClass;\n }\n }\n return Class.forName(getProxyClassName(type, false), true, loader);\n } catch (Throwable t) {\n return null;\n }\n }", "public static void main(String[] args)\n throws ClassNotFoundException, IOException {\n File dir = Files.getClassFile(ProxyManagerImpl.class);\n dir = (dir == null) ? new File(AccessController.doPrivileged(\n J2DoPrivHelper.getPropertyAction(\"user.dir\")))\n : dir.getParentFile();\n\n Options opts = new Options();\n args = opts.setFromCmdLine(args);\n\n List types = new ArrayList(Arrays.asList(args));\n int utils = opts.removeIntProperty(\"utils\", \"u\", 0);\n if (utils >= 4) {\n types.addAll(Arrays.asList(new String[] {\n java.sql.Date.class.getName(),\n java.sql.Time.class.getName(),\n java.sql.Timestamp.class.getName(),\n java.util.ArrayList.class.getName(),\n java.util.Date.class.getName(),\n java.util.GregorianCalendar.class.getName(),\n java.util.HashMap.class.getName(),\n java.util.HashSet.class.getName(),\n java.util.Hashtable.class.getName(),\n java.util.LinkedList.class.getName(),\n java.util.Properties.class.getName(),\n java.util.TreeMap.class.getName(),\n java.util.TreeSet.class.getName(),\n java.util.Vector.class.getName(),\n }));\n }\n if (utils >= 5) {\n types.addAll(Arrays.asList(new String[] {\n \"java.util.EnumMap\",\n \"java.util.IdentityHashMap\",\n \"java.util.LinkedHashMap\",\n \"java.util.LinkedHashSet\",\n \"java.util.PriorityQueue\",\n }));\n }\n\n final ProxyManagerImpl mgr = new ProxyManagerImpl();\n Class cls;\n for (Object type : types) {\n cls = Class.forName((String) type);\n try {\n if (Class.forName(getProxyClassName(cls, false), true,\n GeneratedClasses.getMostDerivedLoader(cls, Proxy.class))\n != null)\n continue;\n }\n catch (Throwable t) {\n // expected if the class hasn't been generated\n }\n\n\n final String proxyClassName = getProxyClassName(cls, false);\n\n byte[] bytes = null;\n\n if (Date.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyDateBytecode(cls, false, proxyClassName);\n }\n else if (Calendar.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyCalendarBytecode(cls, false, proxyClassName);\n }\n else if (Collection.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyCollectionBytecode(cls, false, proxyClassName);\n }\n else if (Map.class.isAssignableFrom(cls)) {\n bytes = mgr.generateProxyMapBytecode(cls, false, proxyClassName);\n }\n else {\n bytes = mgr.generateProxyBeanBytecode(cls, false, proxyClassName);\n }\n\n if (bytes != null) {\n final String fileName = cls.getName().replace('.', '$') + PROXY_SUFFIX + \".class\";\n java.nio.file.Files.write(new File(dir, fileName).toPath(), bytes);\n }\n }\n }", "protected Class toProxyableMapType(Class type) {\n if (type.getName().endsWith(PROXY_SUFFIX))\n type = type.getSuperclass();\n else if (type.isInterface()) {\n type = toConcreteType(type, _stdMaps);\n if (type == null)\n throw new UnsupportedException(_loc.get(\"no-proxy-intf\", type));\n } else if (Modifier.isAbstract(type.getModifiers()))\n throw new UnsupportedException(_loc.get(\"no-proxy-abstract\", type));\n return type;\n }", "@Override\n\tpublic void genCode(MethodGenHelper mg) {\n\t\tVariableNode ret = mg.newLocalVariable(\"ret\"+seq.getAndIncrement(), Type.getType(List.class));\n\t\t\n\t\t//List ret = new ArrayList();\n\t\tmg.visitTypeInsn(NEW, \"java/util/ArrayList\");\n\t\tmg.visitInsn(DUP);\n\t\tmg.visitMethodInsn(INVOKESPECIAL, \"java/util/ArrayList\", \"<init>\", \"()V\", false);\n\t\tmg.visitVarInsn(ASTORE, ret.idxLVT);\n\t\t\n\t\t//Gen code for 'for ... if ...' in list comprehension by providing the return list 'ret'\n\t\tmg.retNodeTag = ret;\n\t\tthis.forNode.genCode(mg);\n\t\t\n\t\t//return list directly (ret)\n\t\tmg.visitVarInsn(ALOAD, ret.idxLVT);\n\t\t//return primitive array from ret\n//\t\tif(getType().getElementType().getSort() == Type.DOUBLE)\n//\t\t\tmg.visitMethodInsn(INVOKESTATIC, \"io/lambdacloud/statement/Tools\", \"listToDoubleArray2\", \"(Ljava/util/List;)[[D\", false);\n//\t\t\t//mg.visitMethodInsn(INVOKESTATIC, \"io/lambdacloud/statement/Tools\", \"listToDoubleArray\", \"(Ljava/util/List;)[D\", false);\n//\t\telse if(getType().getElementType().getSort() == Type.BOOLEAN)\n//\t\t\tmg.visitMethodInsn(INVOKESTATIC, \"io/lambdacloud/statement/Tools\", \"listToIntegrArray\", \"(Ljava/util/List;)[I\", false);\n//\t\telse if(getType().getElementType().getSort() == Type.INT)\n//\t\t\tmg.visitMethodInsn(INVOKESTATIC, \"io/lambdacloud/statement/Tools\", \"listToBooleanArray\", \"(Ljava/util/List;)[Z\", false);\n//\t\telse\n//\t\t\tmg.visitMethodInsn(INVOKESTATIC, \"io/lambdacloud/statement/Tools\", \"listToObjectArray\", \"(Ljava/util/List;)[A\", false);\n\t}", "void copyToProxy (ClassType c) {\r\n package_name = c.getPackage ();\r\n initialize (c.getModifier () ^ GLOBAL);\r\n if (c.isClassInterface ())\r\n method_table = c.getMethodTable ();\r\n }", "public MethodCollector(Collection<Method> collection)\n {\n this.collection = collection;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form ExcelImportMonitor
private ExcelImportMonitor() { initComponents(); TableModelListener lsn = new TableModelListener() { // always scroll down to the newest added row @Override public void tableChanged(final TableModelEvent e) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { int viewRow = jTableImportMonitor.convertRowIndexToView(e.getFirstRow()); jTableImportMonitor.scrollRectToVisible(jTableImportMonitor.getCellRect(viewRow, 0, true)); } }); } }; // nastavi model dat pre monitorovaciu tabulku + vysku riadku a sirku stlpcov ImportMonitorModel im = new ImportMonitorModel(); this.jTableImportMonitor.setModel(im); this.jTableImportMonitor.getModel().addTableModelListener(lsn); this.jTableImportMonitor.setRowHeight(28); this.jTableImportMonitor.getColumnModel().getColumn(0).setPreferredWidth(110); this.jTableImportMonitor.getColumnModel().getColumn(1).setPreferredWidth(80); this.jTableImportMonitor.getColumnModel().getColumn(2).setPreferredWidth(530); this.jTableImportMonitor.getColumnModel().getColumn(3).setPreferredWidth(90); }
[ "public VistaExcel() {\n initComponents();\n }", "public FormImportar() {\n initComponents();\n }", "public ReportJFrame() {\n initComponents();\n }", "Monitor createMonitor();", "private void setupOpnameImportDialog( ) {\n\t// Create modal dialog for editing opname record\n String title = \"Update Opname Import (\" + Integer.toString(opnameKeys.size()) + \" records)\";\n\tif ( parentObject instanceof JFrame ) {\n\t dialog = new JDialog( ( JFrame )parentObject, title, true );\n\t} else if ( parentObject instanceof JDialog ) {\n\t dialog = new JDialog( ( JDialog )parentObject, title, true );\n\t} else {\n\t logger.severe( \"Unexpected parent object class: \" +\n\t\t\t parentObject.getClass( ).getName( ) );\n\t return;\n\t}\n\n\t// Set grid bag layout manager\n\tContainer container = dialog.getContentPane( );\n\tcontainer.setLayout( new GridBagLayout( ) );\n GridBagConstraints constraints = new GridBagConstraints( );\n\n //////////////////////////////////////////\n // Import Type Combo Box, Import Datum\n //////////////////////////////////////////\n\n constraints.anchor = GridBagConstraints.EAST;\n constraints.insets = new Insets( 5, 20, 5, 5 );\n constraints.gridx = 0;\n constraints.gridy = 1;\n constraints.gridwidth = 1;\n container.add( new JLabel( \"Import:\" ), constraints );\n\n // Setup a JComboBox for ImportType\n importTypeComboBox = new ImportTypeComboBox( conn, defaultImportTypeId );\n importTypeComboBox.addActionListener( ( ActionEvent actionEvent ) -> {\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n } );\n\n final JPanel importPanel = new JPanel();\n importPanel.add( importTypeComboBox );\n\n // Import datum\n GregorianCalendar calendar = new GregorianCalendar( );\n if (defaultImportDatum == null) {\n defaultImportDatum = calendar.getTime();\n }\n\n calendar.add( Calendar.YEAR, -50 );\n Date earliestDate = calendar.getTime( );\n calendar.add( Calendar.YEAR, 100 );\n Date latestDate = calendar.getTime( );\n SpinnerDateModel importDatumSpinnerDatemodel = new SpinnerDateModel(defaultImportDatum,\n earliestDate,\n latestDate,\n Calendar.DAY_OF_MONTH );\n importDatumSpinner = new JSpinner( importDatumSpinnerDatemodel );\n importDatumSpinner.setEditor( new JSpinner.DateEditor( importDatumSpinner, \"dd-MM-yyyy\" ) );\n importPanel.add( importDatumSpinner );\n\n // Set the import datum to enabled or disabled according to the selected medium type ID\n if (importTypeComboBox.getSelectedImportTypeId( ) == 0) {\n importDatumSpinner.setEnabled(false);\n }\n else {\n importDatumSpinner.setEnabled(true);\n }\n\n constraints.insets = new Insets( 5, 0, 5, 20 );\n constraints.anchor = GridBagConstraints.WEST;\n constraints.gridx = GridBagConstraints.RELATIVE;\n constraints.gridwidth = 2;\n container.add( importPanel, constraints );\n\n\n\t//////////////////////////////////////////\n\t// Update/Insert, Cancel buttons\n\t//////////////////////////////////////////\n\n\tJPanel buttonPanel = new JPanel( );\n\n\tActionListener buttonPanelActionListener = ( ActionEvent actionEvent ) -> {\n boolean result = true;\n\n if ( actionEvent.getActionCommand( ).equals( \"updateOpnameImport\" ) ) {\n result = updateOpnameImport( );\n }\n\n // Any other actionCommand, including cancel, has no action\n if ( result ) {\n dialog.setVisible( false );\n }\n };\n\n\tJButton editOpnameButton = new JButton( \"Update (\" + Integer.toString(opnameKeys.size()) + \" opname records)\");\n\teditOpnameButton.setActionCommand( \"updateOpnameImport\" );\n\teditOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( editOpnameButton );\n\n\tJButton cancelOpnameButton = new JButton( \"Cancel\" );\n\tcancelOpnameButton.setActionCommand( \"cancelOpnameImport\" );\n\tcancelOpnameButton.addActionListener( buttonPanelActionListener );\n\tbuttonPanel.add( cancelOpnameButton );\n\n constraints.anchor = GridBagConstraints.CENTER;\n constraints.insets = new Insets( 5, 20, 20, 20 );\n\tconstraints.gridx = 0;\n\tconstraints.gridy = 14;\n\tconstraints.gridwidth = 3;\n\tcontainer.add( buttonPanel, constraints );\n\n // Default dialog size\n final Dimension dialogSize = new Dimension( 400, 150 );\n\tdialog.setSize( dialogSize );\n\tdialog.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );\n\tdialog.setVisible( true );\n }", "public Backup() {\n initComponents();\n }", "public OpenMonitorInstanceDialog() {\n super();\n setTitle(\"Open Monitor Instance\");\n initComponents();\n setLocationRelativeTo(getOwner());\n getRootPane().setDefaultButton(btnOpen);\n }", "public ExcelImportConfig() {\n super();\n }", "public ImportarView() {\n initComponents();\n }", "public void setupImport() {\r\n\t\tmnuImport.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew ImportGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private static FaxJobMonitor createFaxJobMonitor(Map<String, String> systemConfig) {\n // get class name\n String className = systemConfig.get(FaxClientSpiFactory.FAX_JOB_MONITOR_CLASS_NAME_PROPERTY_KEY);\n if (className == null || className.length() == 0) {\n className = FaxJobMonitorImpl.class.getName();\n }\n\n // create new instance\n FaxJobMonitor faxJobMonitorInstance = (FaxJobMonitor) ReflectionHelper.createInstance(className);\n\n return faxJobMonitorInstance;\n }", "private void btnImportarActionPerformed(java.awt.event.ActionEvent evt) {\n AdvertenciaExcel.setVisible(true);\n ModeloExcel modeloE = new ModeloExcel();\n int contAccion=0;\n\n contAccion++;\n if(contAccion==1)AgregarFiltro();\n\n try{\n if(evt.getSource() == btnImportar){\n if(selecArchivo.showDialog(null, \"Seleccionar archivo\")==JFileChooser.APPROVE_OPTION){\n archivo=selecArchivo.getSelectedFile();\n if(archivo.getName().endsWith(\"xls\") || archivo.getName().endsWith(\"xlsx\")){\n JOptionPane.showMessageDialog(null,\n modeloE.Importar(archivo,tabla1) + \"\\n Formato .\"+ archivo.getName().substring(archivo.getName().lastIndexOf(\".\")+1),\n \"IMPORTAR EXCEL\", JOptionPane.INFORMATION_MESSAGE);\n }else{\n JOptionPane.showMessageDialog(null, \"Elija un formato valido.\");\n }\n GuardarTabla();\n }\n }\n TableColumn column = null;\n }catch(Exception e){\n\n }\n }", "public frmimpresora() {\n initComponents();\n mostrar(\"\");\n inhabilitar();\n }", "public ProgressMonitor() {\r\n\tif (logger.isDebugEnabled())\r\n\t logger.debug(\"Creating Progress Monitor\");\r\n }", "JZLemurMonitor createJZLemurMonitor();", "public void startMonitor() {\n\t}", "public ExcelView() {\n }", "public ImportGermplasmVisualPanel1() {\n initComponents();\n }", "public ProgressMonitor createProgressMonitor(String title, CommunicationChannel channel) {\r\n\t\treturn subscribeInternal(new StatefulServiceInvocationContext(channel), new ProgressMonitorStatefulLocalClient(title, true), true /* created by server */);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the style of the overlay primitive
public abstract void setStyle(VectorOverlayStyles style);
[ "public void setStyle(Style newStyle){\r\n\tstyle = newStyle;\r\n }", "public void setStyle(int style)\r\n {\r\n this.style = style;\r\n }", "public abstract void setBezelStyle(int style);", "public void setStylePanel(StylePanel stylePanel);", "public void setOverlay(PlacementOverlay overlay);", "public void setStyle(int style)\r\n {\r\n if (this.style != style)\r\n {\r\n this.style = style;\r\n this.requestLayout();\r\n this.requestPaint();\r\n }\r\n }", "private void setStyle() {\n this.getStyleClass().add(\"edge-arrow\");\n// idle();\n }", "protected void setStyle(RMTextStyle aStyle) { _style = aStyle; }", "void setVisualStyle(GeoElement geo);", "public void setStyle (WindowStyle style) {\r\n \t\tthis.style = style;\r\n \t\tsetBackground(style.background);\r\n \t\tinvalidateHierarchy();\r\n \t}", "public void setOverlay(boolean value) {\n this.overlay = value;\n }", "public StyleId setStyleId ( StyleId id );", "public void setRenderingStyle(int style) {\n\t\tif (style != WIREFRAME_RENDERING && style != PATCH_RENDERING)\n\t\t\treturn;\n\t\tselectRenderingCommands.setSelectedIndex(style);\n\t\tif (dragAsSurfaceToggle != null)\n\t\t\tdragAsSurfaceToggle.setEnabled(style == PATCH_RENDERING);\n\t\tif (style == renderingStyle)\n\t\t\treturn;\n\t\trenderingStyle = style;\n\t\tforceRedraw();\n\t}", "public final synchronized void setStyle(int style){\n this.style = style;\n\n if (isLoggedIn()){\n sendCommand(\"$set style \"+style);\n filterLine(\"Style \"+style+\" set.\");\n }\n }", "public abstract BossBar setStyle(BossStyle style);", "STYLE createSTYLE();", "public final void setStyle(String style) {\r\n this.style = style;\r\n }", "@JSProperty(\"style\")\n void setStyle(TooltipStyleOptions value);", "public void updateVisualStyle(GProperty prop);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a spring whose minimum, preferred, maximum and value properties are defined by the widths of the minimumSize, preferredSize, maximumSize and size properties of the supplied component. The returned spring is a 'wrapper' implementation whose methods call the appropriate size methods of the supplied component. The minimum, preferred, maximum and value properties of the returned spring therefore report the current state of the appropriate properties in the component and track them as they change.
public static Spring width(Component c) { checkArg(c); return new WidthSpring(c); }
[ "public float getSpringSize() {\r\n\t\treturn springSize;\r\n\t}", "public float getMinSpringSize() {\r\n\t\treturn minSpringSize;\r\n\t}", "Dimension getSize(Component component);", "public Component sizeComponent(Component component, double ratio) {\n\t\tif (component != null) {\n\t\t\tRectangle rect = calculateBounds(component,ratio);\n\t\t\tcomponent.setBounds(rect);\n\t\t}\n\t\treturn component;\n\t}", "private interface SizeGetter {\r\n\t\t\r\n\t\t/**\r\n\t\t * Returns size of component.\r\n\t\t * @param component Component\r\n\t\t * @return size of component.\r\n\t\t */\r\n\t\tDimension getSize(Component component);\r\n\t}", "public static Spring height(Component c) {\n checkArg(c);\n return new HeightSpring(c);\n }", "public float getStretchedSpringConst() {\r\n\t\treturn stretchedSpringConst;\r\n\t}", "public void setSpringSize(float springSize) {\r\n\t\tthis.springSize = springSize;\r\n\t\tmaxSpringSize = springSize > maxSpringSize ? springSize : maxSpringSize;\r\n\t\tminSpringSize = springSize < minSpringSize ? springSize : minSpringSize;\r\n\t}", "public DoubleProperty getWidthProperty();", "public void setMinSpringSize(float minSpringSize) {\r\n\t\tthis.minSpringSize = minSpringSize;\r\n\t\tspringSize = springSize < minSpringSize ? minSpringSize : springSize;\r\n\t}", "@Override\n public void onSpringUpdate(Spring spring) {\n float value = (float) spring.getCurrentValue();\n float scale = 1f - (value * 0.2f);\n view.setScaleX(scale);\n view.setScaleY(scale);\n\n }", "private List<SpringDelta> buildResizableList(int axis,\n boolean useMin) {\n // First pass, figure out what is resizable\n int size = springs.size();\n List<SpringDelta> sorted = new ArrayList<SpringDelta>(size);\n for (int counter = 0; counter < size; counter++) {\n Spring spring = getSpring(counter);\n int sDelta;\n if (useMin) {\n sDelta = spring.getPreferredSize(axis) -\n spring.getMinimumSize(axis);\n } else {\n sDelta = spring.getMaximumSize(axis) -\n spring.getPreferredSize(axis);\n }\n if (sDelta > 0) {\n sorted.add(new SpringDelta(counter, sDelta));\n }\n }\n Collections.sort(sorted);\n return sorted;\n }", "String width(Component component) {\n return evaluator.attribute(component.id(), Attribute.width);\n }", "private int resolveSizeAndStateRespectingMinSize(int minSize,\n int measuredSize, int measureSpec) {\n if (minSize != SIZE_UNSPECIFIED) {\n final int desiredWidth = Math.max(minSize, measuredSize);\n return resolveSizeAndState(desiredWidth, measureSpec, 0);\n } else {\n return measuredSize;\n }\n }", "public PropertyRectangle get(OtmProperty property);", "@Override\n protected Area.Size getPreferredSizeRaw(NlComponent component) {\n Area.Size prefSize = getMaxSizeRaw(component);\n return prefSize;\n }", "private int getSizeStyle(Component c) {\n\t\t// Aqua components have a different style depending on the\n\t\t// font size used.\n\t\t// 13 Point = Regular\n\t\t// 11 Point = Small\n\t\t// 9 Point = Mini\n\t\tif (c == null) {\n\t\t\treturn REGULAR;\n\t\t}\n\t\tFont font = c.getFont();\n\t\tif (font == null) {\n\t\t\treturn REGULAR;\n\t\t}\n\t\tint fontSize = font.getSize();\n\t\treturn (fontSize >= 13) ? REGULAR : ((fontSize > 9) ? SMALL : MINI);\n\t}", "private void setComponentBounds(Component component, int x, int y, int compWidth,\r\n\t\t\tint compHeight) {\r\n\t\tint width;\r\n\t\tint height;\r\n\r\n\t\tif (compWidth < component.getMinimumSize().getWidth()) {\r\n\t\t\twidth = (int) component.getMinimumSize().getWidth();\r\n\t\t} else if (compWidth > component.getMaximumSize().getWidth()) {\r\n\t\t\twidth = (int) component.getMaximumSize().getWidth();\r\n\t\t} else {\r\n\t\t\twidth = compWidth;\r\n\t\t}\r\n\r\n\t\tif (compHeight < component.getMinimumSize().getHeight()) {\r\n\t\t\theight = (int) component.getMinimumSize().getHeight();\r\n\t\t} else if (compHeight > component.getMaximumSize().getHeight()) {\r\n\t\t\theight = (int) component.getMaximumSize().getHeight();\r\n\t\t} else {\r\n\t\t\theight = compHeight;\r\n\t\t}\r\n\r\n\t\tcomponent.setBounds(x, y, width, height);\r\n\t}", "ReadOnlyDoubleProperty widthProperty();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to save a drag on the screen. This works by capturing 2 points, the beginning point of the drag and the ending point of the drag. The user can drag how ever and wherever they want, as long as they initially start at the beginning point and end at the ending point.
public abstract void captureDrag(float[] startingPoint, float[] endingPoint, int sequenceNumber);
[ "Shape recordDragPoint(Point theEndPoint);", "public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPoint(dragEndScreen);\n //calculate how far the screen is dragged from its start position.\n double dx = dragEnd.getX() - dragStart.getX();\n double dy = dragEnd.getY() - dragStart.getY();\n transform.translate(dx, dy);\n\n //remember to reposition points to avoid unstable dragging.\n dragStartScreen = dragEndScreen;\n dragEndScreen = null;\n repaint();\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }", "void setDragPosition(Point drag);", "@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\n }", "public void saveInsertionPoint() {\n if (savedElement != null) {\n throw new IllegalStateException(\"Insertion point already saved\");\n }\n\n savedElement = currentElement;\n savedPosition = currentPosition;\n }", "public void startDrag(InputEvent e, Point startPoint) {}", "public void onDragEnded();", "void handleDragStartedOrMoved(float x, float y);", "private synchronized void endDrag() {\n this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n beingDragged = false;\n }", "public void draggingScreen(){\n if(mousePressed && !mouseOverMagnet && !mouseOverDraggable && !mouseOverArt) { \n// if(mouseOverCell)\n// return;\n //smoothly move camera to where mouse is going\n lerp(camPosDest, camPosDest, new Vec2(camPos.x + (pmouseX - mouseX) * screenDragSpeed, camPos.y + (pmouseY - mouseY) * screenDragSpeed), .1f); \n draggingScreen = true;\n } \n}", "public void savePoints() {\n inputPlane.storeLayoutPoints();\n }", "String dragHelper();", "public void simulateSaveloc(GeoPoint destLocation) {\n\t\t\t\t\t// To get focus to current location while using Magnetometer.\n\t\t\t\t\tButton thisButton = (Button) findViewById(R.id.saveloc);\n//\t\t\t\t\tmc.animateTo(currLocation);\n\t\t\t\t\t\n\t\t\t\t\tif(thisButton.getText().toString().equalsIgnoreCase(\"Save Ride Location\")){\n\t\t\t\t\t\tmyParkedRide = new rideOverlay(destLocation, currLocation, 4);\n\t\t\t\t\t\tmapOverlays.add(myParkedRide);\n\t\t\t\t\t\trideParked = true;\n\t\t\t\t\t\tthisButton.setText(\"Where's My Ride?\");\n\t\t\t\t\t\tshowBuildingButton.setVisibility(View.VISIBLE);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tDrawPath(currLocation, destLocation, Color.GREEN);\n\t\t\t\t\t\tpathDrawn = true;\n\t\t\t\t\t}\n\t\t\t\t}", "public void mouseReleased(MouseEvent e) {\n dragXPos = -1;\n dragYPos = -1;\n }", "DragAndDrop createDragAndDrop();", "void startDragMode();", "static void saveStartPoint(Point startPoint) {\n\t\tFile path = new File(\"save\" + File.separatorChar + \"start.mpy\");\n\t\ttry {\n\t\t\tif (!path.exists()) {\n\t\t\t\tnew File(\"save\").mkdir();\n\t\t\t}\n\t\t\tFileOutputStream file = new FileOutputStream(path);\n\t\t\tObjectOutputStream point = new ObjectOutputStream(file);\n\t\t\tpoint.writeObject(startPoint);\n\t\t\tpoint.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Failed to save StartPoint\");\n\t\t}\n\t}", "private void startDragging() {\n Point mousePosition = calculateMouseLocation();\n mouseX = mousePosition.getX();\n mouseY = mousePosition.getY();\n prevX = getArea().getX();\n prevY = getArea().getY();\n setDragging(true);\n }", "public abstract void Dasher2Screen(MutablePoint coords);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the criterionType value for this SmmCriteria.
public void setCriterionType(java.lang.Short criterionType) { this.criterionType = criterionType; }
[ "public void setCriteriaType(String criteriaType)\r\n\t{\r\n\t\tthis.criteriaType = criteriaType;\r\n\t}", "public String getCriteriaType()\r\n\t{\r\n\t\treturn criteriaType;\r\n\t}", "com.google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType getType();", "com.google.ads.googleads.v13.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType getCriterionType();", "public void setAdGroupCriterionType(java.lang.String adGroupCriterionType) {\n this.adGroupCriterionType = adGroupCriterionType;\n }", "@POST\n @Path(\"/conditions\")\n public void setConditionType(ConditionType conditionType) {\n definitionsService.setConditionType(conditionType);\n }", "public void setSurveyType(java.lang.String surveyType) {\n this.surveyType = surveyType;\n }", "public void setColumnType(java.lang.String columnType) {\n this.columnType = columnType;\n }", "public void setType( String pType )\r\n {\r\n mType = pType;\r\n }", "public void setSearchType(final String searchType) {\r\n\t\tif (searchType == null || !searchType.equals(Constants.SEARCH_TYPE_CAT)\r\n\t\t\t\t&& !searchType.equals(Constants.SEARCH_TYPE_KY_WD) && !searchType.equals(Constants.SEARCH_TYPE_PRD)) {\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Search Type: \" + searchType);\r\n\t\t}\r\n\t\tthis.searchType = searchType;\r\n\t}", "public void setColumnType(ColumnType columnType) {\n m_columnType = columnType;\n }", "public java.lang.String getAdGroupCriterionType() {\n return adGroupCriterionType;\n }", "public void setQueryType(QueryType type);", "public void setOptType(java.lang.String optType)\r\n {\r\n this._optType = optType;\r\n }", "public void setMlcType (java.lang.String mlcType) {\n\t\tthis.mlcType = mlcType;\n\t}", "public void setAttributeType(java.lang.String attributeType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ATTRIBUTETYPE$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ATTRIBUTETYPE$4);\n }\n target.setStringValue(attributeType);\n }\n }", "public void setColumnType(int columnType);", "public void setContractType(String value) {\n setAttributeInternal(CONTRACTTYPE, value);\n }", "public void setStatisticsType(StatisticsType type) {\r\n this.statisticsType = type;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an SVG ellipse element and convert it to a JR ellipse
private JRDesignEllipse parseEllipse(SVGOMEllipseElement ellipseElement, AffineTransform previousTransform) { JRDesignEllipse result = new JRDesignEllipse(jConfig.getJasperDesign()); AffineTransform newTransofrm = getTransofrm(ellipseElement); previousTransform.concatenate(newTransofrm); double cx = Double.parseDouble(ellipseElement.getAttribute("cx")); //$NON-NLS-1$ double cy = Double.parseDouble(ellipseElement.getAttribute("cy")); //$NON-NLS-1$ double rx = Double.parseDouble(ellipseElement.getAttribute("rx")); //$NON-NLS-1$ double ry = Double.parseDouble(ellipseElement.getAttribute("ry")); //$NON-NLS-1$ Ellipse2D ellipseFigure = new Ellipse2D.Double(cx - rx , cy - ry, rx * 2, ry * 2); Rectangle2D rectFigure = (Rectangle2D)previousTransform.createTransformedShape(ellipseFigure).getBounds2D(); result.setX((int)rectFigure.getX()); result.setY((int)rectFigure.getY()); result.setWidth((int)rectFigure.getWidth()); result.setHeight((int)rectFigure.getHeight()); CSSStyleDeclaration nodeStyle = ((SVGSVGElement)svgDocument.getDocumentElement()).getComputedStyle(ellipseElement, null); Color backgroundColor = getColor(nodeStyle, "fill"); //$NON-NLS-1$ if (backgroundColor != null) { result.setBackcolor(backgroundColor); } float strokeWidth = getStrokeWidth(nodeStyle); result.getLinePen().setLineWidth(strokeWidth); Color strokeColor = getColor(nodeStyle, "stroke"); //$NON-NLS-1$ if (strokeColor != null) { result.getLinePen().setLineColor(strokeColor); } return result; }
[ "public String toSVG() {\n\n StringBuilder toReturn = new StringBuilder();\n toReturn.append(\"<svg width=\" + \"\\\"\" + Integer.toString(this.width)\n + \"\\\"\" + \" height=\" + \"\\\"\" + Integer.toString(this.height)\n + \"\\\"\" + \" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"); // add website\n String tag;\n for (String s : model.getIDSet()) {\n\n IShape sh = model.currentShape(0, s);\n if (sh.isRectangle()) {\n toReturn.append(\"<rect id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n tag = \"</rect>\";\n toReturn.append(\"x=\\\"\" + sh.getLocation().getX() + \"\\\" y=\\\"\"\n + sh.getLocation().getY() + \"\\\" width=\\\"\" + sh.getWidth() + \"\\\" height=\\\"\"\n + sh.getHeight() + \"\\\" fill=\\\"rgb(\" + sh.getColor().getRedInt() + \",\" +\n sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n } else {\n toReturn.append(\"<ellipse id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n toReturn.append(\"cx=\\\"\" + sh.getLocation().getX() + \"\\\" cy=\\\"\" + sh.getLocation().getY()\n + \"\\\" rx=\\\"\" + sh.getWidth() + \"\\\" ry=\\\"\" + sh.getHeight() + \"\\\" fill=\\\"rgb(\"\n + sh.getColor().getRedInt() + \",\" + sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n tag = \"</ellipse>\";\n }\n\n toReturn.append(svgColors(s));\n\n toReturn.append(svgSizes(s));\n\n toReturn.append(svgMoves(s));\n\n toReturn.append(tag + \"\\n\");\n\n }\n toReturn.append(\"</svg>\");\n return toReturn.toString();\n }", "public Geom2d_Ellipse( gp_Elips2d E) {\n this(OCCwrapJavaJNI.new_Geom2d_Ellipse__SWIG_0(gp_Elips2d.getCPtr(E), E), true);\n }", "Ellipse createEllipse();", "void visit(JRPrintEllipse ellipse, T arg);", "public interface GJEllipseShape2D extends GJSmoothContour2D, GJConic2D {\n\n // ===================================================================\n // methods specific to GJEllipseShape2D interface\n\n\t/**\n\t * Returns center of the ellipse shape.\n\t */\n\tpublic GJPoint2D center();\n \n /**\n * Returns true if this ellipse shape is similar to a circle, i.e. has\n * same length for both semi-axes.\n */\n\tpublic boolean isCircle();\n\t\n\t/**\n\t * If an ellipse shape is direct, it is the boundary of a convex domain.\n\t * Otherwise, the complementary of the bounded domain is convex.\n\t */\n\tpublic boolean isDirect();\n\n\t// ===================================================================\n // methods of GJCurve2D interface\n\n public GJEllipseShape2D reverse();\n\n public Collection<? extends GJEllipseShape2D> continuousCurves();\n\n // ===================================================================\n // methods of GJShape2D interface\n\n public GJEllipseShape2D transform(GJAffineTransform2D trans);\n \n}", "public static native Ellipse createEllipse(Vector2d position, Vector2d radius) /*-{\n\t return new $wnd.Kinetic.Ellipse({\n x: position.@net.edzard.kinetic.Vector2d::x,\n y: position.@net.edzard.kinetic.Vector2d::y,\n radius: {x: radius.@net.edzard.kinetic.Vector2d::x, y: radius.@net.edzard.kinetic.Vector2d::y},\n\t\t fill: @net.edzard.kinetic.Kinetic::defaultFillColour,\n stroke: @net.edzard.kinetic.Kinetic::defaultStrokeColour,\n strokeWidth: @net.edzard.kinetic.Kinetic::defaultStrokeWidth,\n lineJoin: @net.edzard.kinetic.Kinetic::defaultLineJoin,\n draggable: @net.edzard.kinetic.Kinetic::defaultDragability\n });\n\t}-*/;", "public Ellipsoid getEllipsoid() {\n return ellipse;\n }", "public Ellipse() {\n\t\tthis.point = new Vector();\n\t\tthis.size = new Vector();\n\t}", "@Test\n\tpublic void EllipseTest()\n\t{\n\t\tShape circ = new Ellipse(\"Ellipse1\", 3.0, 3.0);\n\t\tAssert.assertEquals(\"Ellipse area incorrect.\", Math.PI*3.0*3.0, circ.getArea(),0.0001);\n\t\tAssert.assertEquals(\"Ellipse perimeter incorrect.\",\n\t\t\t\t2 * Math.PI * Math.sqrt((Math.pow(3, 2) + Math.pow(3, 2)) / 2),\n\t\t\t\tcirc.getPerimeter(),0.0001);\n\t\tAssert.assertEquals(\"Ellipse type incorrect.\", \"Ellipse\",circ.getShapeType());\n\t\tAssert.assertEquals(\"Shape ID incorrect.\", \"Ellipse1\", circ.getId());\n\n\t\tShape circs = new Ellipse(\"Ellipse2\", 5.0, 3.0);\n\t\tAssert.assertEquals(\"Ellipse area incorrect.\", Math.PI*3*5, circs.getArea(),0.0001);\n\t\tAssert.assertEquals(\"Ellipse perimeter incorrect.\",\n\t\t\t\t2 * Math.PI * Math.sqrt((Math.pow(5.0, 2) + Math.pow(3.0, 2)) / 2),\n\t\t\t\tcircs.getPerimeter(),0.0001);\n\t\tAssert.assertEquals(\"Ellipse type incorrect.\", \"Ellipse\",circs.getShapeType());\n\t\tAssert.assertEquals(\"Shape ID incorrect.\", \"Ellipse2\", circs.getId());\n\t}", "@Test\r\n\tpublic void EllipseTest()\r\n\t{\r\n\t\tShape circ = new Ellipse(\"Ellipse1\", 3.0, 3.0);\r\n\t\tAssert.assertEquals(\"Ellipse area incorrect.\", Math.PI*3.0*3.0, circ.getArea(),0.0001);\r\n\t\tAssert.assertEquals(\"Ellipse perimeter incorrect.\",\r\n\t\t\t\t2 * Math.PI * Math.sqrt((Math.pow(3, 2) + Math.pow(3, 2)) / 2),\r\n\t\t\t\tcirc.getPerimeter(),0.0001);\r\n\t\tAssert.assertEquals(\"Ellipse type incorrect.\", \"Ellipse\",circ.getShapeType());\r\n\t\tAssert.assertEquals(\"Shape ID incorrect.\", \"Ellipse1\", circ.getId());\r\n\r\n\t\tShape circs = new Ellipse(\"Ellipse2\", 5.0, 3.0);\r\n\t\tAssert.assertEquals(\"Ellipse area incorrect.\", Math.PI*3*5, circs.getArea(),0.0001);\r\n\t\tAssert.assertEquals(\"Ellipse perimeter incorrect.\",\r\n\t\t\t\t2 * Math.PI * Math.sqrt((Math.pow(5.0, 2) + Math.pow(3.0, 2)) / 2),\r\n\t\t\t\tcircs.getPerimeter(),0.0001);\r\n\t\tAssert.assertEquals(\"Ellipse type incorrect.\", \"Ellipse\",circs.getShapeType());\r\n\t\tAssert.assertEquals(\"Shape ID incorrect.\", \"Ellipse2\", circs.getId());\r\n\t}", "public gp_Elips2d Elips2d() {\n return new gp_Elips2d(OCCwrapJavaJNI.Geom2d_Ellipse_Elips2d(swigCPtr, this), true);\n }", "public Ellipse(Ellipse e) {\n\t\tthis.point = e.point;\n\t\tthis.size = e.size;\n\t}", "private void drawEllipse(Graphics g) {\n\n Graphics2D g2d = (Graphics2D) g; \n Ellipse2D e = new Ellipse2D.Double(5, 10, 80, 130); \n g2d.setColor(Color.red);\n g2d.draw(e); \n }", "Ellipse getEllipseAt(int i)\n {\n\tif(i<compressedImage.getEllipses().size()&&i>=0)\n\t return compressedImage.getEllipses().get(i);\n\telse\n\t{\n\t System.out.println(\"WARNING. Accessing to an ellipse index not permitted\");\n\t return null;\n\t}\n }", "private void displayEllipseAnimation(StringBuilder sb, IKeyFrame f1, IKeyFrame f2) {\n sb.append(String.format(\"<animate attributeType=\\\"xml\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\"\"\n + \" attributeName=\\\"%s\\\" from=\\\"%d\\\" to=\\\"%d\\\" fill=\\\"freeze\\\" />\\n\",\n f1.getTime(), (f2.getTime() - f1.getTime()) / speed, \"cx\",\n f1.getX(), f2.getX()));\n sb.append(String.format(\"<animate attributeType=\\\"xml\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\"\"\n + \" attributeName=\\\"%s\\\" from=\\\"%d\\\" to=\\\"%d\\\" fill=\\\"freeze\\\" />\\n\",\n f1.getTime(),\n (f2.getTime() - f1.getTime()) / speed, \"cy\", f1.getY(), f2.getY()));\n sb.append(String.format(\"<animate attributeType=\\\"xml\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\"\"\n + \" attributeName=\\\"%s\\\" from=\\\"%d\\\" to=\\\"%d\\\" fill=\\\"freeze\\\" />\\n\",\n f1.getTime(),\n (f2.getTime() - f1.getTime()) / speed, \"rx\",\n f1.getWidth() / 2, f2.getWidth() / 2));\n sb.append(String.format(\"<animate attributeType=\\\"xml\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\"\"\n + \" attributeName=\\\"%s\\\" from=\\\"%d\\\" to=\\\"%d\\\" fill=\\\"freeze\\\" />\\n\",\n f1.getTime(), ((f2.getTime() - f1.getTime()) / speed), \"ry\",\n f1.getHeight() / 2, f2.getHeight() / 2));\n sb.append(String.format(\"<animate attributeType=\\\"xml\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\"\"\n + \" attributeName=\\\"%s\\\" from=\\\"rgb(%d,%d,%d)\\\" \"\n + \"to=\\\"rgb(%d,%d,%d)\\\" fill=\\\"freeze\\\" />\\n\",\n f1.getTime(), (f2.getTime() - f1.getTime()) / speed, \"fill\",\n f1.getRed(), f1.getGreen(), f1.getBlue(), f2.getRed(), f2.getGreen(),\n f2.getBlue()));\n sb.append(String.format(\"<animateTransform attributeName=\\\"transform\\\" attributeType =\\\"XML\\\"\" +\n \" type=\\\"rotate\\\" from=\\\"%d %d %d\\\" to=\\\"%d %d %d\\\" begin=\\\"%d00ms\\\" dur=\\\"%d00ms\\\" repeatCount=\\\"0\\\"\" +\n \" fill=\\\"freeze\\\"/>\", f1.getAngle(), f1.getX(), f1.getY(), f2.getAngle(),\n f2.getX(), f2.getY(), f1.getTime(), f2.getTime() - f1.getTime()));\n }", "@Override\r\n public String getName(){\r\n return \"Ellipse\";\r\n }", "public static double[][] getEllipsePoint( ColorEncoding target, double deltaE )\n {\n if( deltaE <= 0 )\n {\n deltaE = 1.0;\n }\n\n if( !( target instanceof CIELab ) )\n {\n throw new IllegalArgumentException( \"CIELabDE only accepts CIELab color encodings.\" ); //NOI18N\n }\n CIELab tlab = (CIELab) target;\n double[] lch = { tlab.getL(), tlab.getc(), tlab.geth() };\n double[][] ret = new double[ 360 ][ 2 ];\n\n double[] xy = computeEllipseAB( lch, deltaE );\n for( int i = 0; i < 360; i++ )\n {\n ret[ i ] = computeEllipse( xy, lch, deltaE, i );\n }\n\n return ret;\n }", "public CEllipse() {\n\t\tsuper(new Ellipse2D.Double(0, 0, 1, 1));\n\t}", "protected Ellipsoid getEllipsoidFromID( String ellipsoidID )\n throws CRSConfigurationException {\n if ( ellipsoidID == null || \"\".equals( ellipsoidID.trim() ) ) {\n return null;\n }\n Ellipsoid result = getProvider().getCachedIdentifiable( Ellipsoid.class, ellipsoidID );\n if ( result == null ) {\n Element ellipsoidElement = null;\n try {\n ellipsoidElement = getURIAsType( ellipsoidID );\n } catch ( IOException e ) {\n throw new CRSConfigurationException( e );\n }\n if ( ellipsoidElement == null ) {\n throw new CRSConfigurationException( Messages.getMessage( \"CRS_CONFIG_NO_ELEMENT\", \"ellipsoid\",\n ellipsoidID ) );\n }\n Identifiable id = parseIdentifiable( ellipsoidElement );\n Unit units = parseUnit( ellipsoidElement );\n\n double semiMajor = Double.NaN;\n double inverseFlattening = Double.NaN;\n double eccentricity = Double.NaN;\n double semiMinorAxis = Double.NaN;\n\n try {\n semiMajor = XMLTools.getRequiredNodeAsDouble( ellipsoidElement, PRE + \"semiMajorAxis\", nsContext );\n inverseFlattening = XMLTools.getNodeAsDouble( ellipsoidElement, PRE + \"inverseFlattening\", nsContext,\n Double.NaN );\n eccentricity = XMLTools.getNodeAsDouble( ellipsoidElement, PRE + \"eccentricity\", nsContext, Double.NaN );\n semiMinorAxis = XMLTools.getNodeAsDouble( ellipsoidElement, PRE + \"semiMinorAxis\", nsContext,\n Double.NaN );\n } catch ( XMLParsingException e ) {\n throw new CRSConfigurationException( Messages.getMessage( \"CRS_CONFIG_PARSE_ERROR\", \"ellipsoid\",\n ellipsoidElement.getLocalName(),\n e.getMessage() ), e );\n }\n if ( Double.isNaN( inverseFlattening ) && Double.isNaN( eccentricity ) && Double.isNaN( semiMinorAxis ) ) {\n throw new CRSConfigurationException( Messages.getMessage( \"CRS_CONFIG_ELLIPSOID_MISSES_PARAM\",\n ellipsoidID ) );\n }\n if ( !Double.isNaN( inverseFlattening ) ) {\n result = new Ellipsoid( semiMajor, units, inverseFlattening, id.getIdentifiers(), id.getNames(),\n id.getVersions(), id.getDescriptions(), id.getAreasOfUse() );\n } else if ( !Double.isNaN( eccentricity ) ) {\n result = new Ellipsoid( semiMajor, eccentricity, units, id.getIdentifiers(), id.getNames(),\n id.getVersions(), id.getDescriptions(), id.getAreasOfUse() );\n } else {\n result = new Ellipsoid( units, semiMajor, semiMinorAxis, id.getIdentifiers(), id.getNames(),\n id.getVersions(), id.getDescriptions(), id.getAreasOfUse() );\n }\n }\n\n return getProvider().addIdToCache( result, false );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the T_DEVICE_INFO table that match the criteria 'RCOMMUNITY = :rcommunity'.
public List<TDeviceInfo> findWhereRcommunityEquals(String rcommunity) throws TDeviceInfoDaoException;
[ "public List<TDeviceInfo> findWhereWcommunityEquals(String wcommunity) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereSridEquals(long srid) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereRsnoEquals(String rsno) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereMridEquals(long mrid) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWhereSerialidEquals(String serialid) throws TDeviceInfoDaoException;", "Realsense2Library.rs2_device_list rs2_query_devices(Realsense2Library.rs2_context context, PointerByReference error);", "public Future<List<CtxEntityIdentifier>> retrieveCommunityMembers(CtxEntityIdentifier community);", "public List<TDeviceInfo> findAll() throws TDeviceInfoDaoException;", "public Future<List<CtxEntityIdentifier>> retrieveChildCommunities(CtxEntityIdentifier community);", "public void testReadContactCapabilities() {\n Log.i(TAG, \"testReadContactCapabilities\");\n\n String contactNumber = remote.toString();\n Uri uri = Uri.withAppendedPath(CapabilitiesLog.CONTENT_URI, contactNumber);\n Cursor cursor = mContext.getContentResolver().query(uri, null, null, null, null);\n assertNotNull(cursor);\n if (cursor.moveToFirst()) {\n Log.i(TAG, \"Capabilities:\");\n Log.i(TAG, \"- chat support: \" + cursor.getInt(\n cursor.getColumnIndex(CapabilitiesLog.CAPABILITY_IM_SESSION)));\n Log.i(TAG, \"- FT support: \" + cursor.getInt(\n cursor.getColumnIndex(CapabilitiesLog.CAPABILITY_FILE_TRANSFER)));\n Log.i(TAG, \"- Extensions: \" + cursor.getString(\n cursor.getColumnIndex(CapabilitiesLog.CAPABILITY_EXTENSIONS)));\n } else {\n Log.i(TAG, \"Capabilities not found\");\n }\n cursor.close();\n }", "Pointer rs2_get_device_info(Realsense2Library.rs2_device device, int info, PointerByReference error);", "public List<TDeviceInfo> findWhereSwversionEquals(String swversion) throws TDeviceInfoDaoException;", "public List<TDeviceInfo> findWherePhoneEquals(String phone) throws TDeviceInfoDaoException;", "int rs2_supports_device_info(Realsense2Library.rs2_device device, int info, PointerByReference error);", "public List<TDeviceInfo> findWhereSysnameEquals(String sysname) throws TDeviceInfoDaoException;", "public TDeviceInfo findByPrimaryKey(long devid) throws TDeviceInfoDaoException;", "public EmergenciaCreditoFacturaRealizada[] findWhereRfcEmisorEquals(String rfcEmisor) throws EmergenciaCreditoFacturaRealizadaDaoException;", "public EmergenciaCreditoFacturaRealizada[] findWhereRfcReceptorEquals(String rfcReceptor) throws EmergenciaCreditoFacturaRealizadaDaoException;", "public List<TDeviceInfo> findWhereDevidEquals(long devid) throws TDeviceInfoDaoException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public boolean contains(Packet p) Method to insert a packet into this message.
public void insert(Packet p) { this.packetMap.put(p.getPacketID(), p); this.messageID = p.getMessageID(); this.packetCount = p.getPacketCount(); }
[ "public void add(AisPacket p) {\n throw new UnsupportedOperationException(\"Stream is immutable\");// default stream is immutable.\n }", "private boolean addPacketToQueue(Queue<IPacket> queue, IPacket inPacket) {\n\t\tboolean success = false;\n\n\t\ttry {\n\t\t\tsuccess = queue.add(inPacket);\n\t\t} catch (IllegalStateException e) {\n\t\t\tqueue.clear();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Exception {}\", e);\n\t\t}\n\n\t\treturn success;\n\t}", "public boolean accept(DatagramPacket p);", "public void insert(Point2D p)\r\n {\r\n pSet.add(p); \r\n }", "public void insert(Point2D p) \n\t{\n\t\tif(!pointSet.contains(p))\n\t\t{\n\t\t\tpointSet.add(p);\n\t\t}\n\t}", "public void addPacket(ITransmissible packet){\n\t\tif(!curPackets.contains(packet)){\n\t\t\tthis.curPackets.add(packet);\n\t\t\t\n\t\t\t\n\t\t\tif(packet instanceof Agent){\n\t\t\t\t//System.out.println(\"@addPacket() at edge \" + this.getEdgeId());\n\t\t\t\tthis.firePropertyChange(IConstants.PROPERTY_CHANGE_AGENT_AT_EDGE, null,\n\t\t\t\t\tthis);\n\t\t\t}\n\t\t}\n\t}", "public void insert(Point2D p) {\r\n // add the point to the set (if it is not already in the set)\r\n if (p == null) {\r\n throw new java.lang.IllegalArgumentException(\"null argument received\");\r\n }\r\n mSet.add(p);\r\n }", "public boolean addPlayer(Player p) {\r\n\t\tif (n_players < N_SEATS) {\r\n\t\t\tplayers.add(p);\r\n\t\t\tn_players++;\r\n\t\t\tSystem.out.println(\"Added player \" + p.getPlayerID() + \" to Table \" + this.tableID);\r\n\r\n\t\t\t// Start the table if it isn't started already\r\n\t\t\tif (!isPlaying) {\r\n\t\t\t\tisPlaying = true;\r\n\t\t\t\tp.setStatus(PlayerStatus.WAITING_ON_BET);\r\n\t\t\t} else {\r\n\t\t\t\tif (status == TableStatus.WAITING_ON_BETS) {\r\n\t\t\t\t\tp.setStatus(PlayerStatus.WAITING_ON_BET);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setStatus(PlayerStatus.NEW_PLAYER);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean has (Player p)\n\t{\n\t\tIterator<Player> it = this.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tPlayer p2 = it.next();\n\t\t\tif(p2.equals(p))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean handlePacket(IPacket<IServerPlayNetHandler> packet) {\n \t//Checks if the ghost exists\n if(this.ghost == null)\n return true;\n\n //Checks if the current packet is contained in the array of packets\n for(Class<?> c : BLOCKED_PACKETS)\n if(c.equals(packet.getClass()))\n //Should block the packet\n return false;\n\n return true;\n }", "public boolean add(Point p, E data) {\n\t\tif (hasSpaces()) {\n\t\t\tpoints.put(p, data);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean allowPacketToBeSent(Packet aPacket, EntityPlayerMP aPlayer);", "public void insert(Point2D p)\n {\n if (p != null)\n {\n pointSet.add(p);\n }\n }", "public boolean insert(QuadtreePoint point) {\n\t\t// Check if point can be inserted\n\t\tif (!boundingBox.containsPoint(point)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Add point if node is not full\n\t\tif (points.size() < MAX_NODE_CAPACITY) {\n\t\t\tpoints.add(point);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Node is full so we have to divide it (if not yet done)\n\t\tif (northWest == null) {\n\t\t\tsubdivide();\n\t\t}\n\t\t\n\t\t// Check where point can be added\n\t\tif (northWest.insert(point)) return true;\n\t\tif (northEast.insert(point)) return true;\n\t\tif (southWest.insert(point)) return true;\n\t\tif (southEast.insert(point)) return true;\n\t\t\n\t\treturn false;\n\t}", "public void addPacketToPackets(Packet packet){\n\t\tthis.graph.packets.put(packet.getUid(), packet);\n\t}", "public void sendPacket(Packet p);", "public boolean addPoint(Point p);", "public void insert(Point2D p) {\n pointSet.add(p);\n }", "public void insertProcess(Process p){\n boolean inserted = false;\r\n //if(processes == null){ return; }\r\n for (int i = 0; i < processes.size(); i++) {\r\n if (processes.get(i).getRemainingBurst() > p.getRemainingBurst()) {\r\n processes.add(i, p);\r\n inserted = true;\r\n break;\r\n }\r\n }\r\n if(!inserted){\r\n processes.addLast(p);\r\n }\r\n\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace "\n" characters by the systemdefined newline sequence and return as bytes.
private static byte[] newlineFix(String expText) { String newline = System.getProperty("line.separator"); return expText.replace("\n", newline).getBytes(); }
[ "private String convertNewlines( String input ) {\n String result = StringUtils.replace(input, \"\\r\\n\", BR_TAG);\n return StringUtils.replace(result, \"\\n\", BR_TAG);\n }", "public static String getNewLine() {\n\n\t\tif (isMacOSX())\n\t\t\treturn \"\\n\";\n\n\t\tif (isLinux())\n\t\t\treturn \"\\n\";\n\n\t\tif (isWin())\n\t\t\treturn \"\\r\\n\";\n\n\t\treturn \"\";\n\n\t}", "private static String fixPrintWriterNewLine(String decodedString) {\n StringBuilder fixedString = new StringBuilder();\n for(int i = 0; i < decodedString.length(); i++) {\n\n if(decodedString.charAt(i) == '\\n' ) {\n fixedString.append(\"\\r\\n\");\n }\n else {\n fixedString.append(decodedString.charAt(i));\n }\n }\n return fixedString.toString();\n }", "@Test\n public void test_parsenewlines_crlf() {\n NewlineParser nlp = new NewlineParser();\n Diagnostics<Diagnosis> diagnostics = new Diagnostics<Diagnosis>();\n byte[] bytes;\n int expectedNewlines;\n boolean expectedMissingCr;\n boolean expectedMissingLf;\n boolean expectedMisplacedCr;\n boolean expectedMisplacedLf;\n String expectedRemaining;\n ByteArrayInputStream in;\n ByteCountingPushBackInputStream pbin;\n int newlines;\n byte[] remainingBytes = new byte[16];\n int remaining;\n String remainingStr;\n\n Object[][] cases = {\n {\"\".getBytes(), 0, false, false, false, false, \"\"},\n {\"a\".getBytes(), 0, false, false, false, false, \"a\"},\n {\"a\\r\".getBytes(), 0, false, false, false, false, \"a\\r\"},\n {\"a\\n\".getBytes(), 0, false, false, false, false, \"a\\n\"},\n {\"a\\r\\n\".getBytes(), 0, false, false, false, false, \"a\\r\\n\"},\n {\"a\\n\\r\".getBytes(), 0, false, false, false, false, \"a\\n\\r\"},\n {\"\\n\".getBytes(), 1, true, false, false, false, \"\"},\n {\"\\r\".getBytes(), 1, false, true, false, false, \"\"},\n {\"\\r\\n\".getBytes(), 1, false, false, false, false, \"\"},\n {\"\\ra\".getBytes(), 1, false, true, false, false, \"a\"},\n {\"\\r\\n\\n\".getBytes(), 2, true, false, false, false, \"\"},\n {\"\\n\\r\\n\".getBytes(), 2, true, false, true, true, \"\"},\n {\"\\r\\n\\r\\n\".getBytes(), 2, false, false, false, false, \"\"},\n {\"\\r\\n\\na\".getBytes(), 2, true, false, false, false, \"a\"},\n {\"\\n\\r\\na\".getBytes(), 2, true, false, true, true, \"a\"},\n {\"\\r\\n\\r\\na\".getBytes(), 2, false, false, false, false, \"a\"},\n {\"\\n\\r\\n\\ra\".getBytes(), 2, false, false, true, true, \"a\"}\n };\n\n try {\n for (int i=0; i<cases.length; ++i) {\n bytes = (byte[])cases[i][0];\n expectedNewlines = (Integer)cases[i][1];\n expectedMissingCr = (Boolean)cases[i][2];\n expectedMissingLf = (Boolean)cases[i][3];\n expectedMisplacedCr = (Boolean)cases[i][4];\n expectedMisplacedLf = (Boolean)cases[i][5];\n expectedRemaining = (String)cases[i][6];\n // debug\n //System.out.println(Base16.encodeArray(bytes));\n in = new ByteArrayInputStream(bytes);\n pbin = new ByteCountingPushBackInputStream(in, 16);\n newlines = nlp.parseCRLFs(pbin, diagnostics);\n Assert.assertEquals(expectedNewlines, newlines);\n Assert.assertEquals(expectedMissingCr, nlp.bMissingCr);\n Assert.assertEquals(expectedMissingLf, nlp.bMissingLf);\n Assert.assertEquals(expectedMisplacedCr, nlp.bMisplacedCr);\n Assert.assertEquals(expectedMisplacedLf, nlp.bMisplacedLf);\n remaining = pbin.read(remainingBytes);\n if (remaining == -1) {\n remaining = 0;\n }\n remainingStr = new String(remainingBytes, 0, remaining);\n Assert.assertEquals(expectedRemaining, remainingStr);\n }\n } catch (IOException e) {\n e.printStackTrace();\n Assert.fail(\"Unexepected exception!\");\n }\n }", "static String toLF(String s)\n {\n if (!contains(s,'\\r'))\n return s;\n int n=s.length();\n int p=0;\n int t;\n StringBuilder r = new StringBuilder();\n while (-1 != (t=s.indexOf(\"\\r\\n\",p))) {\n r.append(s.substring(p,p+t-p));\n p=t+1;\n }\n if (p<n)\n r.append(s.substring(p,p+n-p));\n return r.toString();\n }", "public byte[] getBody() {\n \tint i=0; byte[] b = getContents();\n \twhile (i < b.length && b[i] != '\\n') { i++; }\n \tif (i >= b.length) {\n \t return b;\n \t}\n \t\n \tbyte[] r = new byte[b.length-i-1]; // -1 is \\n\n \ti++; // skip '\\n'\n \tSystem.arraycopy(b, i, r, 0, r.length);\n \treturn r;\n }", "private static String newlineFromFile(String fileContents) {\r\n String newline = \"\\n\";\r\n if (fileContents.contains(\"\\\\r\\\\n\")) {\r\n newline = \"\\\\r\\\\n\";\r\n }\r\n if (fileContents.contains(\"\\\\n\\\\r\")) {\r\n newline = \"\\\\n\\\\r\";\r\n }\r\n if (fileContents.contains(\"\\\\r\")) {\r\n newline = \"\\\\r\";\r\n }\r\n return newline;\r\n }", "public String readCRLFLine() throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tint i = read();\n\t\twhile(i != -1) {\n\t\t\tchar c = (char) i;\n\t\t\tsb.append(c);\n\t\t\t\n\t\t\tint length = WebServer.CRLF.length();\n\t\t\tif (sb.length() >= length && sb.substring(sb.length() - length).equals(WebServer.CRLF)) {\n\t\t\t\t\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t\t\n\t\t\ti = read();\n\t\t}\n\t\t\n\t\t//If the end of the stream was reached but there are characters to return, return them\n\t\t//And in the next call to read() c wil be '-1' and 'null' will be returned.\n\t\tif (sb.length() > 0) {\n\t\t\treturn sb.toString();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static String nlToBr(@Nullable String input) {\n if (input == null) {\n return \"\";\n }\n\n try {\n List<String> lines = CharStreams.readLines(new StringReader(input));\n return Joiner.on(\"<br/>\").join(Iterables.transform(lines, ESCAPE_XML));\n }\n catch (IOException e) {\n throw new ShouldNeverHappenException(e);\n }\n }", "public static String convertLineBreak(String input) {\n return input.replace(\"\\r\\n\", \"\\n\").replace('\\r', '\\n').replaceAll(\"[\\000-\\010\\013\\014\\016-\\037]\", \" \");\n }", "public static String replaceNewLines( final String input ) {\n return replaceNewLines( input, UNIX_NEWLINE );\n }", "public static char[] normalizeCRs(char[] text, char[] buffer) {\n\t\tCharArrayBuffer result = new CharArrayBuffer();\n\t\tint lineStart = 0;\n\t\tint length = text.length;\n\t\tif (length == 0) return text;\n\t\tString lineSeparator = getLineSeparator(text, buffer);\n\t\tchar nextChar = text[0];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tchar currentChar = nextChar;\n\t\t\tnextChar = i < length-1 ? text[i+1] : ' ';\n\t\t\tswitch (currentChar) {\n\t\t\t\tcase '\\n':\n\t\t\t\t\tint lineLength = i-lineStart;\n\t\t\t\t\tchar[] line = new char[lineLength];\n\t\t\t\t\tSystem.arraycopy(text, lineStart, line, 0, lineLength);\n\t\t\t\t\tresult.append(line);\n\t\t\t\t\tresult.append(lineSeparator);\n\t\t\t\t\tlineStart = i+1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\tlineLength = i-lineStart;\n\t\t\t\t\tif (lineLength >= 0) {\n\t\t\t\t\t\tline = new char[lineLength];\n\t\t\t\t\t\tSystem.arraycopy(text, lineStart, line, 0, lineLength);\n\t\t\t\t\t\tresult.append(line);\n\t\t\t\t\t\tresult.append(lineSeparator);\n\t\t\t\t\t\tif (nextChar == '\\n') {\n\t\t\t\t\t\t\tnextChar = ' ';\n\t\t\t\t\t\t\tlineStart = i+2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// when line separator are mixed in the same file\n\t\t\t\t\t\t\t// \\r might not be followed by a \\n. If not, we should increment\n\t\t\t\t\t\t\t// lineStart by one and not by two.\n\t\t\t\t\t\t\tlineStart = i+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// when line separator are mixed in the same file\n\t\t\t\t\t\t// we need to prevent NegativeArraySizeException\n\t\t\t\t\t\tlineStart = i+1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tchar[] lastLine;\n\t\tif (lineStart > 0) {\n\t\t\tint lastLineLength = length-lineStart;\n\t\t\tif (lastLineLength > 0) {\n\t\t\t\tlastLine = new char[lastLineLength];\n\t\t\t\tSystem.arraycopy(text, lineStart, lastLine, 0, lastLineLength);\n\t\t\t\tresult.append(lastLine);\n\t\t\t}\n\t\t\treturn result.getContents();\n\t\t}\n\t\treturn text;\n\t}", "private String readStandardUTF(InputStreamReader isr,boolean bStopAtNewline)\r\n throws Exception\r\n {\r\n int FIRST_NEWLINE_CHAR;\r\n if (bStopAtNewline)\r\n FIRST_NEWLINE_CHAR = Constants.NEWLINE.charAt(0);\r\n else\r\n FIRST_NEWLINE_CHAR = -1;\r\n\r\n StringBuffer buffer = new StringBuffer();\r\n int ch;\r\n do\r\n {\r\n ch = isr.read();\r\n if ((ch!=-1) && (ch!=FIRST_NEWLINE_CHAR)) buffer.append((char) ch);\r\n } while ((ch!=-1) && (ch!=FIRST_NEWLINE_CHAR));\r\n\r\n return buffer.toString();\r\n }", "@Test\n public void arrayWithNewlineIsPrintable() {\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{'\\n'}));\n }", "static String unescapeFormatNewlines(String format) {\n return format.replaceAll(\"([^\\\\\\\\]?)\\\\\\\\n\", \"$1\\n\");\n }", "private static String localizeLinefeed(String in)\n {\n return in.replaceAll(\"\\\\n\", System.getProperty(\"line.separator\"));\n }", "public static String replaceNewLines( final String input,\n final String replacement )\n {\n StringBuffer resultBuffer = new StringBuffer();\n int length = input.length();\n int i = 0;\n while( i < length ) {\n char ch = input.charAt( i );\n if( ch == '\\n' ) {\n resultBuffer.append( replacement );\n } else if( ch == '\\r' ) {\n if( i + 1 < length ) {\n char next = input.charAt( i + 1 );\n if( ch == '\\r' && next == '\\n' ) {\n i++;\n }\n }\n resultBuffer.append( replacement );\n } else {\n resultBuffer.append( ch );\n }\n i++;\n }\n return resultBuffer.toString();\n }", "private static String removeNewline(String content) {\n if (StringUtil.isNotEmpty(content)) {\n content = content.replaceAll(StringConstants.LF, EMPTY);\n content = content.replace(StringConstants.CR, EMPTY);\n return content;\n }\n return content;\n }", "@Test\n public void testReadLineLFCR1() throws IOException {\n try {\n final String BUFFER_INITIAL_CONTENT = \"Debut\\rSuite\\n\\rFin\\n\\r\\nANEPASTOUCHER\";\n ByteBuffer buff = ByteBuffer.wrap(BUFFER_INITIAL_CONTENT.getBytes(\"ASCII\")).compact();\n //HTTPReader reader = new HTTPReader(null, buff);\n //assertEquals(\"Debut\\rSuite\\n\\rFin\\n\", reader.readLineCRLF());\n ByteBuffer buffFinal = ByteBuffer.wrap(\"ANEPASTOUCHER\".getBytes(\"ASCII\")).compact();\n // assertEquals(buffFinal.flip(), buff.flip());\n } catch (NullPointerException e) {\n // fail(\"The socket must not be read until buff is entirely consumed.\");\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluates the "substring" function as per example 7 (for this function) from the F and O specs.
public void test_fn_substring_7() throws Exception { String inputFile = "/TestSources/emptydoc.xml"; String xqFile = "/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-7.xq"; String resultFile = "/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-7.txt"; String expectedResult = getExpectedResult(resultFile); URL fileURL = bundle.getEntry(inputFile); loadDOMDocument(fileURL); // Get XML Schema Information for the Document XSModel schema = getGrammar(); DynamicContext dc = setupDynamicContext(schema); String xpath = extractXPathExpression(xqFile, inputFile); String actual = null; try { XPath path = compileXPath(dc, xpath); Evaluator eval = new DefaultEvaluator(dc, domDoc); ResultSequence rs = eval.evaluate(path); actual = buildResultString(rs); } catch (XPathParserException ex) { actual = ex.code(); } catch (StaticError ex) { actual = ex.code(); } catch (DynamicError ex) { actual = ex.code(); } assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); }
[ "public void test_fn_substring_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-1.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_substring_2() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-2.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-2.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_substring_21() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-21.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-21.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_substring_10() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-10.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/GeneralStringFunc/SubstringFunc/fn-substring-10.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void testSubstring1() {\n Object s = \"abcdef\";\n String expResult = \"abcdef\";\n String result = StringUtils.substring(s, 0);\n Assertions.assertEquals(expResult, result);\n }", "public static void main (String [] args) {\r\n\t\tsubstring(\"Ashraf\" , 0 , 8);\r\n\t}", "@Test\n @ExcludeIn({ DB2, DERBY, FIREBIRD })\n public void substring() {\n query().from(Constants.employee).where(Constants.employee.firstname.substring((-3), 1).eq(Constants.employee.firstname.substring((-2), 1))).select(Constants.employee.id).fetch();\n }", "public static void main(String args[]) {\n String str = \"LazyyFroggJumpsRiverLazyy\";\n String substr = str.substring(8, 17);\n\n System.out.println(\"substring = \" + substr);\n\n// prints the substring after index 0 till index 8\n\n substr = str.substring(0, 8); //start pos is inclusive , end is exclusive i.e it lastindex -1\n\n System.out.println(\"substring = \" + substr);\n\n substr = str.substring(0); //till end of string\n\n System.out.println(\"substring = \" + substr);\n }", "@Test\n public void shouldBeAbleToSubstring() throws Exception {\n final String string = \"substr\";\n final int index = 3;\n final CString initial = CString.create(string);\n final CString substring = initial.substring(index);\n final String evaluated = substring.toString();\n assertThat(evaluated).isEqualTo(string.substring(index));\n }", "public My_String substring(int start, int end);", "private String substring(int start,int end){\n return input.substring(start,end);\n }", "@Test\n public void testSubstr_count_String_String() {\n logger.info(\"substr_count\");\n String string = \"test tester\";\n String substring = \"test\";\n int expResult = 2;\n int result = PHPMethods.substr_count(string, substring);\n assertEquals(expResult, result);\n }", "@Test\n public void testFlipLetttersInSubstring7() {\n mycustomstring.setString(\"0123456789\");\n mycustomstring.flipLetttersInSubstring(1, 10);\n assertEquals(\"0123456789\", mycustomstring.getString());\n }", "@Test\n public void test029() throws Throwable {\n String[] stringArray0 = new String[8];\n stringArray0[7] = \"Minimum abbreviation width is 4\";\n String string0 = StringUtils.trim(\"org.apache.commons.lang3.JavaVersion\");\n boolean boolean0 = StringUtils.endsWithAny(\"Minimum abbreviation width is 4\", stringArray0);\n String string1 = StringUtils.substring(stringArray0[0], (-855), (-855));\n }", "@NotNull\n S substring(int beginIndex) throws IllegalArgumentException;", "public LString substring(int startIndex, int endIndex){ // 2 5\n char[] newLStringArray = new char[endIndex - startIndex + 1]; // 4 2 3 4 5\n \n if (endIndex > _size || startIndex < 0 ){\n throw new NoSuchElementException(\"Index is too big.\");\n }\n \n for (int i = startIndex; i <= endIndex; i++){\n newLStringArray[i - startIndex] = charAt(i);\n }\n return new LString(newLStringArray);\n }", "public String substring (int s, int e) {\n return tags.substring (s, e);\n }", "@NotNull\n S substring(int beginIndex, int endIndex) throws IllegalArgumentException;", "public static String maitriseSubstring(String s)\n {\n return \"\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the past/current status of a team at an event.
public static EventStatus evaluateStatusOfTeam(Event e, List<Match> teamMatches, String teamKey) { // There might be match info available, // but no alliance selection data (for old events) JsonArray alliances = JSONHelper.getasJsonArray(e.getAlliances()); int year = 2014; boolean inAlliance = false; if (alliances == null || alliances.size() == 0) { // We don't have alliance data. Try to determine from matches. inAlliance = MatchHelper.getAllianceForTeam(teamMatches, teamKey) != -1; } else { for (int i = 0; i < alliances.size(); i++) { JsonArray teams = alliances.get(i).getAsJsonObject().get("picks").getAsJsonArray(); for (int j = 0; j < teams.size(); j++) { if (teams.get(j).getAsString().equals(teamKey)) { inAlliance = true; } } } } ArrayList<Match> qualMatches = new ArrayList<>(); ArrayList<Match> octoMatches = new ArrayList<>(); ArrayList<Match> quarterMatches = new ArrayList<>(); ArrayList<Match> semiMatches = new ArrayList<>(); ArrayList<Match> finalMatches = new ArrayList<>(); ArrayList<Match> currentGroup = qualMatches; MatchType lastType = null; // Team might be a no-show/drop out last minute at an event, // and might not play any matches as a result. boolean teamIsHere = false; boolean elimMatchPlayed = false; int qfPlayed = 0; int efPlayed = 0; int sfPlayed = 0; int fPlayed = 0; for (Match match : teamMatches) { match.setSelectedTeam(teamKey); year = match.getYear(); MatchType matchType = MatchType.fromShortType(match.getCompLevel()); JsonObject matchAlliances = match.getAlliancesJson(); JsonArray redTeams = Match.getRedTeams(matchAlliances), blueTeams = Match.getBlueTeams(matchAlliances); if (Match.hasTeam(redTeams, teamKey) || Match.hasTeam(blueTeams, teamKey)) { teamIsHere = true; } if (match.hasBeenPlayed()) { switch (matchType) { case OCTO: elimMatchPlayed = true; efPlayed++; break; case QUARTER: elimMatchPlayed = true; qfPlayed++; break; case SEMI: elimMatchPlayed = true; sfPlayed++; break; case FINAL: elimMatchPlayed = true; fPlayed++; break; } } if (lastType != matchType) { switch (matchType) { case QUAL: currentGroup = qualMatches; break; case OCTO: currentGroup = octoMatches; break; case QUARTER: currentGroup = quarterMatches; break; case SEMI: currentGroup = semiMatches; break; case FINAL: currentGroup = finalMatches; break; } } currentGroup.add(match); lastType = matchType; } TbaLogger.d("qual size: " + qualMatches.size()); TbaLogger.d("quarter size: " + quarterMatches.size()); TbaLogger.d("semi size: " + semiMatches.size()); TbaLogger.d("final size: " + finalMatches.size()); if (e.isHappeningNow() && quarterMatches.size() == 0) { return EventStatus.PLAYING_IN_QUALS; } boolean allQualMatchesPlayed = true; for (Match match : qualMatches) { if (!match.hasBeenPlayed()) { TbaLogger.d("Match " + match.getKey() + " not played!"); allQualMatchesPlayed = false; break; } } TbaLogger.d("In alliance: " + inAlliance); TbaLogger.d("All qual matches played: " + allQualMatchesPlayed); if (qualMatches.isEmpty() || (allQualMatchesPlayed && !teamIsHere) || (!(elimMatchPlayed || allQualMatchesPlayed) && !e.isHappeningNow())) { return EventStatus.NOT_AVAILABLE; } else if ((allQualMatchesPlayed && !inAlliance) || (!e.isHappeningNow() && (octoMatches.isEmpty() && quarterMatches.isEmpty() && semiMatches.isEmpty() && finalMatches.isEmpty()))) { return EventStatus.NOT_PICKED; } if (year == 2015) { /* Special elim logic for 2015 season */ if (!finalMatches.isEmpty() && sfPlayed > 0) { int finalsWon = 0; for (Match match : finalMatches) { if (match.didSelectedTeamWin()) { finalsWon++; } } if (finalsWon >= 2) { return EventStatus.WON_EVENT; } else if ((fPlayed == 2 && finalsWon == 0) || (fPlayed == 3 && finalsWon == 1)) { return EventStatus.ELIMINATED_IN_FINALS; } else { return EventStatus.PLAYING_IN_FINALS; } } else if (!semiMatches.isEmpty() && qfPlayed > 0) { if (sfPlayed < 3) { return EventStatus.PLAYING_IN_SEMIS; } else { return EventStatus.ELIMINATED_IN_SEMIS; } } else if (!quarterMatches.isEmpty()){ if (qfPlayed < 2) { return EventStatus.PLAYING_IN_QUARTERS; } else { return EventStatus.ELIMINATED_IN_QUARTERS; } } else if (!octoMatches.isEmpty()){ if (efPlayed < 2) { return EventStatus.PLAYING_IN_OCTOFINALS; } else { return EventStatus.ELIMINATED_IN_OCTOFINALS; } } else { return EventStatus.IN_PLAYOFFS; } } if (!octoMatches.isEmpty()) { int countPlayed = 0, countWon = 0; for (Match match : octoMatches) { if (match.hasBeenPlayed()) { JsonObject matchAlliances = match.getAlliancesJson(); JsonArray redTeams = Match.getRedTeams(matchAlliances), blueTeams = Match.getBlueTeams(matchAlliances); if (!Match.hasTeam(redTeams, teamKey) && !Match.hasTeam(blueTeams, teamKey)) { continue; } countPlayed++; if (match.didSelectedTeamWin()) { countWon++; } } } if (countPlayed > 1 && countWon > 1) { // Won octofinals } else if ((countPlayed > 1 && countWon == 0) || (countPlayed > 2 && countWon == 1)) { return EventStatus.ELIMINATED_IN_OCTOFINALS; } else if (!e.isHappeningNow() && semiMatches.isEmpty()) { return EventStatus.ELIMINATED_IN_OCTOFINALS; } else { return EventStatus.PLAYING_IN_OCTOFINALS; } } if (!quarterMatches.isEmpty()) { int countPlayed = 0, countWon = 0; for (Match match : quarterMatches) { if (match.hasBeenPlayed()) { JsonObject matchAlliances = match.getAlliancesJson(); JsonArray redTeams = Match.getRedTeams(matchAlliances), blueTeams = Match.getBlueTeams(matchAlliances); if (!Match.hasTeam(redTeams, teamKey) && !Match.hasTeam(blueTeams, teamKey)) { continue; } countPlayed++; if (match.didSelectedTeamWin()) { countWon++; } } } if (countPlayed > 1 && countWon > 1) { // Won quarterfinals } else if ((countPlayed > 1 && countWon == 0) || (countPlayed > 2 && countWon == 1)) { return EventStatus.ELIMINATED_IN_QUARTERS; } else if (!e.isHappeningNow() && semiMatches.isEmpty()) { return EventStatus.ELIMINATED_IN_QUARTERS; } else { return EventStatus.PLAYING_IN_QUARTERS; } } else { // We've already checked for not picked/no alliance data/etc above, so if the current group is empty, // then the team is likely playing the first match of quarters/semis/finals. return EventStatus.IN_PLAYOFFS; } if (!semiMatches.isEmpty()) { int countPlayed = 0, countWon = 0; for (Match match : semiMatches) { if (match.hasBeenPlayed()) { JsonObject matchAlliances = match.getAlliancesJson(); JsonArray redTeams = Match.getRedTeams(matchAlliances), blueTeams = Match.getBlueTeams(matchAlliances); if (!Match.hasTeam(redTeams, teamKey) && !Match.hasTeam(blueTeams, teamKey)) { continue; } countPlayed++; if (match.didSelectedTeamWin()) { countWon++; } } } if (countPlayed > 1 && countWon > 1) { // Won semifinals } else if ((countPlayed > 1 && countWon == 0) || (countPlayed > 2 && countWon == 1)) { return EventStatus.ELIMINATED_IN_SEMIS; } else if (!e.isHappeningNow() && finalMatches.isEmpty()) { return EventStatus.ELIMINATED_IN_SEMIS; } else { return EventStatus.PLAYING_IN_SEMIS; } } else { return EventStatus.PLAYING_IN_SEMIS; } if (!finalMatches.isEmpty()) { int countPlayed = 0, countWon = 0; for (Match match : finalMatches) { if (match.hasBeenPlayed()) { JsonObject matchAlliances = match.getAlliancesJson(); JsonArray redTeams = Match.getRedTeams(matchAlliances), blueTeams = Match.getBlueTeams(matchAlliances); if (!Match.hasTeam(redTeams, teamKey) && !Match.hasTeam(blueTeams, teamKey)) { continue; } countPlayed++; if (match.didSelectedTeamWin()) { countWon++; } } } if (countPlayed > 1 && countWon > 1) { // Won event return EventStatus.WON_EVENT; } else if ((countPlayed > 1 && countWon == 0) || (countPlayed > 2 && countWon == 1)) { return EventStatus.ELIMINATED_IN_FINALS; } else if (!e.isHappeningNow()) { return EventStatus.ELIMINATED_IN_FINALS; } else { return EventStatus.PLAYING_IN_FINALS; } } else { return EventStatus.PLAYING_IN_FINALS; } }
[ "@java.lang.Override public com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus getStatus() {\n com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus result = com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus.forNumber(status_);\n return result == null ? com.google.ads.googleads.v14.enums.SeasonalityEventStatusEnum.SeasonalityEventStatus.UNRECOGNIZED : result;\n }", "public String getGameStatus(String team) {\n\n String gameStatus = \"\";\n\n String[] mlbTeam = {\"D-backs\", \"Braves\", \"Orioles\", \"Red Sox\", \"Cubs\", \"White Sox\", \"Reds\", \"Indians\", \"Rockies\",\n \"Tigers\", \"Astros\", \"Royals\", \"Angels\", \"Dodgers\", \"Marlins\", \"Brewers\", \"Twins\", \"Mets\",\n \"Yankees\", \"Athletics\", \"Phillies\", \"Pirates\", \"Cardinals\", \"Padres\", \"Giants\", \"Mariners\",\n \"Rays\", \"Rangers\", \"Blue Jays\", \"Nationals\"};\n\n search:\n for (int i = 0; i < 1; i++) {\n\n for (int j = 0; j < mlbTeam.length; j++) {\n if (mlbTeam[j].equals(team)) {\n break search;\n }\n }\n\n team = \"No team\";\n i++;\n }\n try {\n // indicate if today is an off day for the team selected\n if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n }\n catch (NullPointerException npe) {\n gameStatus = \"No game scheduled for the \" + uppercaseFirstLetters(team);\n }\n\n // display error message if there is no match to the team name inputted\n if (team.equals(\"No team\")) {\n gameStatus = \"ERROR: Please enter current MLB team name.\";\n }\n // indicate if today is an off day for the team selected\n else if (getPlayerInfo(team, \"status\", \"status\").equals(\"\")) {\n gameStatus = \"No game scheduled for the \" + team;\n }\n else {\n gameStatus = getPlayerInfo(team, \"status\", \"status\");\n }\n\n return gameStatus;\n }", "public okhttp3.Call getTeamEventStatusCall(String teamKey, String eventKey, String ifModifiedSince, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/team/{team_key}/event/{event_key}/status\"\n .replaceAll(\"\\\\{\" + \"team_key\" + \"\\\\}\", localVarApiClient.escapeString(teamKey.toString()))\n .replaceAll(\"\\\\{\" + \"event_key\" + \"\\\\}\", localVarApiClient.escapeString(eventKey.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (ifModifiedSince != null) {\n localVarHeaderParams.put(\"If-Modified-Since\", localVarApiClient.parameterToString(ifModifiedSince));\n }\n\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"apiKey\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "public String getAwayTeam();", "public ApiResponse<Map<String, TeamEventStatus>> getEventTeamsStatusesWithHttpInfo(String eventKey, String ifModifiedSince) throws ApiException {\n okhttp3.Call localVarCall = getEventTeamsStatusesValidateBeforeCall(eventKey, ifModifiedSince, null);\n Type localVarReturnType = new TypeToken<Map<String, TeamEventStatus>>(){}.getType();\n return localVarApiClient.execute(localVarCall, localVarReturnType);\n }", "public Map<String, TeamEventStatus> getEventTeamsStatuses(String eventKey, String ifModifiedSince) throws ApiException {\n ApiResponse<Map<String, TeamEventStatus>> localVarResp = getEventTeamsStatusesWithHttpInfo(eventKey, ifModifiedSince);\n return localVarResp.getData();\n }", "int getTeam();", "protected Team getWinningTeam()\n {\n \treturn aWinningTeam;\n }", "@Override\n\tpublic String getEventStatus(String eventId) {\n\t\t\n\t\treturn universityManagerDao.getEventStatus(eventId);\n\t}", "public okhttp3.Call getEventTeamsStatusesCall(String eventKey, String ifModifiedSince, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/event/{event_key}/teams/statuses\"\n .replaceAll(\"\\\\{\" + \"event_key\" + \"\\\\}\", localVarApiClient.escapeString(eventKey.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (ifModifiedSince != null) {\n localVarHeaderParams.put(\"If-Modified-Since\", localVarApiClient.parameterToString(ifModifiedSince));\n }\n\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"apiKey\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "private void callCheckStageEventStatus(EventValueBean event) {\r\n String actionCode = ServiceConstants.REQ_FUNC_CD_ADD;\r\n if (event.getEventId() > 0) {\r\n actionCode = ServiceConstants.REQ_FUNC_CD_UPDATE;\r\n }\r\n CCMN06UI ccmn06ui = populateCCMN06UI_CheckStageEventStatus(event, actionCode);\r\n checkStageEventStatus.status(ccmn06ui);\r\n }", "void handleSearchTeamState(int state);", "public int getBetEventType() {\n\n int eventType = -1;\n\n check_loop: for (GenericBetData betData : getBet().getBetDatas()) {\n\n if (betData.isOpenPlay()) {\n continue check_loop;\n }\n\n Outcome outcome = getOutcome(betData.getOutcomeId());\n\n Event event = getEvent(outcome.getEventId());\n\n if (eventType == -1) {\n\n eventType = event.getEventType().ordinal();\n /*\n * STU:I've commented out the futures fix - Ithink uk racing is more important right now.\n */\n /*\n * This is temp code to fix futures.. until the futures flag is added to outcomes.\n */\n // if (eventType == CallCentreConstants.RANK_EVENT &&\n // !event.isWin() && !event.isPlace() && !event.isShow()) {\n // eventType = CallCentreConstants.GAME_EVENT;\n // }\n } else {\n /*\n * STU:I've commented out the futures fix - Ithink uk racing is more important right now.\n */\n /*\n * This is temp code to fix futures.. until the futures flag is added to outcomes.\n */\n int tempEventType = event.getEventType().ordinal();\n\n // if (tempEventType == CallCentreConstants.RANK_EVENT &&\n // !event.isWin() && !event.isPlace() && !event.isShow()) {\n // tempEventType = CallCentreConstants.GAME_EVENT;\n // }\n\n if (eventType != tempEventType) {\n eventType = MIXED_EVENT;\n break check_loop;\n }\n }\n }\n\n return eventType;\n\n }", "public SoccerTeam getTeamOne() {\n return teamOne;\n }", "public Team getAwayTeam() {\n\t\treturn awayTeam;\n\t}", "@Override\n public int getStatus() {\n return _employeeInterviewSchedule.getStatus();\n }", "public String getTeam() {\r\n return team;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The type of debit disbursement transaction.
@javax.annotation.Nullable @ApiModelProperty(example = "FUNDING", value = "The type of debit disbursement transaction.") public DisbursementTransTypeEnum getDisbursementTransType() { return disbursementTransType; }
[ "public String getDepositType() {\n\t\treturn depositType;\n\t}", "public String getDirectDebitArrangementType() {\n return directDebitArrangementType;\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType xgetDebtType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType)get_store().find_element_user(DEBTTYPE$10, 0);\n return target;\n }\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType.Enum getDebtType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEBTTYPE$10, 0);\n if (target == null)\n {\n return null;\n }\n return (ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtType.Enum)target.getEnumValue();\n }\n }", "public String getDirectDebitArrangementAccountType() {\n return directDebitArrangementAccountType;\n }", "public BigDecimal getDEAL_TYPE()\r\n {\r\n\treturn DEAL_TYPE;\r\n }", "public String getDamageDealtType() {\n return damageDealtType;\n }", "public BigDecimal getDEAL_TYPE() {\r\n return DEAL_TYPE;\r\n }", "public String getTransactionType() {\n return transactionType;\n }", "public Integer getDelType() {\n return delType;\n }", "int getTxType();", "public String getCommissionTransactionTransactionType() {\n return commissionTransactionTransactionType;\n }", "au.gov.asic.types.fss.DebtorType getDebtor();", "public String getDEAL_CREATED_TYPE()\r\n {\r\n\treturn DEAL_CREATED_TYPE;\r\n }", "public TxnType getEffectiveType();", "public TransactionType getTransactionType()\n {\n return transactionType;\n }", "public int getDesAccountType() {\r\n return desAccountType;\r\n }", "public String getCommissionTransactionType() {\n return commissionTransactionType;\n }", "public String getTransactionType() {\n\t\treturn transactionType;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a PetType by its primary key
public static PetType findByPrimaryKey(Long idPetType) throws H2ZeroFinderException { PetType petType = null; Connection connection = null; if(null == idPetType) { throw new H2ZeroFinderException("Could not find result as the primary key field [idPetType] was null."); } try { connection = ConnectionManager.getConnection(); petType = findByPrimaryKey(connection, idPetType); } catch (SQLException sqlex) { throw new H2ZeroFinderException(sqlex); } catch (H2ZeroFinderException h2zfex) { throw new H2ZeroFinderException(h2zfex.getMessage() + " Additionally, the parameters were [idPetType:" + idPetType + "]."); } finally { ConnectionManager.closeAll(connection); } if(null == petType) { throw new H2ZeroFinderException("Could not find result the parameters were [idPetType:" + idPetType + "]."); } return(petType); }
[ "public static PetType findByPrimaryKey(Connection connection, Long idPetType) throws H2ZeroFinderException {\n\t\tPetType petType = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\tif(null == idPetType) {\n\t\t\tthrow new H2ZeroFinderException(\"Could not find result as the primary key field [idPetType] was null.\");\n\t\t}\n\n\t\ttry {\n\t\t\tpreparedStatement = connection.prepareStatement(SQL_BUILTIN_FIND_BY_PRIMARY_KEY);\n\t\t\tpreparedStatement.setLong(1, idPetType);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tpetType = uniqueResult(resultSet);\n\t\t} catch (SQLException sqlex) {\n\t\t\tthrow new H2ZeroFinderException(sqlex);\n\t\t} catch (H2ZeroFinderException h2zfex) {\n\t\t\tthrow new H2ZeroFinderException(h2zfex.getMessage() + \" Additionally, the parameters were [idPetType:\" + idPetType + \"].\");\n\t\t} finally {\n\t\t\tConnectionManager.closeAll(resultSet, preparedStatement);\n\t\t}\n\n\t\tif(null == petType) {\n\t\t\tthrow new H2ZeroFinderException(\"Could not find result the parameters were [idPetType:\" + idPetType + \"].\");\n\t\t}\n\t\treturn(petType);\n\t}", "Tbtype selectByPrimaryKey(Integer typeid);", "GoodsType selectByPrimaryKey(Integer id);", "SceneType selectByPrimaryKey(Integer typeId);", "DsGameType selectByPrimaryKey(Long id);", "public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;", "public static PetType findByPrimaryKeySilent(Long idPetType) {\n\t\ttry {\n\t\t\treturn(findByPrimaryKey(idPetType));\n\t\t} catch(H2ZeroFinderException h2zfex){\n\t\t\tif(LOGGER.isWarnEnabled()) {\n\t\t\t\tLOGGER.warn(\"H2ZeroFinderException findByPrimaryKeySilent(\" + idPetType + \"): \" + h2zfex.getMessage());\n\t\t\t\tif(LOGGER.isDebugEnabled()) {\n\t\t\t\t\th2zfex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(null);\n\t\t}\n\t}", "TypeRespone findByIdType(Long Id);", "HospitalType selectByPrimaryKey(String id);", "T findByPrimaryKey(Object id);", "SellType selectByPrimaryKey(Integer sell_type_id);", "<T> T find(Class<T> type, Map<String, Object> idMap);", "WfCfgCharType selectByPrimaryKey(Integer charTypeId);", "ClientType selectByPrimaryKey(Integer clientTypeId);", "GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException;", "public E findByPK(Serializable pk) {\n Session session = DAOUtils.getSession();\n Transaction trans = session.beginTransaction();\n\n E entity = session.get(genericType, pk);\n\n trans.commit();\n return entity;\n }", "public Persona findByPrimaryKey(PersonaPk pk) throws PersonaDaoException;", "TradingTempTypeKey selectByPrimaryKey(Long id);", "T findByPrimaryKey(Object id, ContextInfo contextInfo);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of proteins associated with this peptide.
public List<ProteinHit> getProteinList() { return proteinHits; }
[ "public static CypherQuery getPeptidesByProteins() {\n\t\t\n\t\tList<CypherStartNode> startNodes = new ArrayList<CypherStartNode>();\n\t\tstartNodes.add(new CypherStartNode(\"peptides\", NodeType.PEPTIDES, ProteinProperty.IDENTIFIER, \"*\"));\n\t\t\n\t\tList<CypherMatch> matches = new ArrayList<CypherMatch>();\n\t\tmatches.add(new CypherMatch(\"peptides\", RelationType.HAS_PEPTIDE, null, DirectionType.IN));\n\t\tmatches.add(new CypherMatch(\"proteins\", null, null, null));\n\t\t\n\t\tList<CypherCondition> conditions = null;\n\t\t\n\t\tList<Integer> returnIndices = new ArrayList<Integer>();\n\t\treturnIndices.add(1);\n\t\treturnIndices.add(0);\n\t\t\n\t\treturn new CypherQuery(startNodes, matches, conditions, returnIndices);\n\t}", "public static CypherQuery getProteinsByPeptides() {\n\t\t\n\t\tList<CypherStartNode> startNodes = new ArrayList<CypherStartNode>();\n\t\tstartNodes.add(new CypherStartNode(\"proteins\", NodeType.PROTEINS, ProteinProperty.IDENTIFIER, \"*\"));\n\t\t\n\t\tList<CypherMatch> matches = new ArrayList<CypherMatch>();\n\t\tmatches.add(new CypherMatch(\"proteins\", RelationType.HAS_PEPTIDE, null, DirectionType.OUT));\n\t\tmatches.add(new CypherMatch(\"peptides\", null, null, null));\n\t\t\n\t\tList<CypherCondition> conditions = null;\n\t\t\n\t\tList<Integer> returnIndices = new ArrayList<Integer>();\n\t\treturnIndices.add(1);\n\t\treturnIndices.add(0);\n\t\t\n\t\treturn new CypherQuery(startNodes, matches, conditions, returnIndices);\n\t}", "public Set<QuantComparisonProtein> getSelectedProteinsList() {\n return selectedProteinsList;\n }", "public Set<Integer> getPeptidesIds() {\n return peptidesIds;\n }", "public Map<String, IdentifiedPeptide> getPeptides() {\n\t\treturn peptides;\n\t}", "public Map<String, ProteinBean> getProteinList() {\n return proteinList;\n }", "public Map<String, Set<String>> getProteinPeptideMap() {\n\t\treturn proteinPeptides;\n\t}", "public static CypherQuery getProteinsByMetaproteins() {\n\t\t\n\t\tList<CypherStartNode> startNodes = new ArrayList<CypherStartNode>();\n\t\tstartNodes.add(new CypherStartNode(\"metaproteins\", NodeType.PROTEINS, ProteinProperty.IDENTIFIER, \"*\"));\n\t\t\n\t\tList<CypherMatch> matches = new ArrayList<CypherMatch>();\n\t\tmatches.add(new CypherMatch(\"metaproteins\", RelationType.IS_METAPROTEIN_OF, null, DirectionType.OUT));\n\t\tmatches.add(new CypherMatch(\"proteins\", RelationType.HAS_PEPTIDE, null, DirectionType.OUT));\n\t\tmatches.add(new CypherMatch(\"peptides\", null, null, null));\n\t\t\n\t\tList<CypherCondition> conditions = null;\n\t\t\n\t\tList<Integer> returnIndices = new ArrayList<Integer>();\n\t\treturnIndices.add(0);\n\t\treturnIndices.add(1);\n\t\treturnIndices.add(2);\n\t\t\n\t\treturn new CypherQuery(startNodes, matches, conditions, returnIndices);\n\t}", "public Map<Integer, PeptideBean> getPeptideList() {\n return peptideList;\n }", "public ArrayList getSelectedPeptideIdentificationList() {\n return iPeptideIdentifications;\n }", "public static CypherQuery getProteinsByEnzymes() {\n\t\tList<CypherStartNode> startNodes = new ArrayList<CypherStartNode>();\n\t\tstartNodes.add(new CypherStartNode(\"proteins\", NodeType.PROTEINS, ProteinProperty.IDENTIFIER, \"*\"));\n\t\t\n\t\tList<CypherMatch> matches = new ArrayList<CypherMatch>();\n\t\tmatches.add(new CypherMatch(\"proteins\", RelationType.BELONGS_TO_ENZYME, null, DirectionType.OUT));\n\t\tfor (int i = 4; i > 1; i--) {\n\t\t\tmatches.add(new CypherMatch(\"E\" + i, RelationType.IS_SUPERGROUP_OF, null, DirectionType.IN));\n\t\t}\n\t\tmatches.add(new CypherMatch(\"E1\", null, null, null));\n\t\t\n\t\tList<CypherCondition> conditions = null;\n\t\t\n\t\tList<Integer> returnIndices = new ArrayList<Integer>();\n\t\tfor (int i = 4; i >= 0; i--) {\n\t\t\treturnIndices.add(i);\n\t\t}\n\t\t\n\t\treturn new CypherQuery(startNodes, matches, conditions, returnIndices);\n\t}", "@Override\n public String getPeptide() {\n return peptide;\n }", "public ArrayList getProteinHits() {\n return iProteinHits;\n }", "public List<Pais> getPaises() throws RemoteException;", "Set<ProteinCurrent> getProteinsForDisease(String disease_id, int species_id);", "public String [ ] getNombresProteinas() {\n int cantidad = 0;\n \n for(int i = 0; i < this.ingredientes.size(); i++) {\n \n if(this.ingredientes.get(i) instanceof Proteina) {\n cantidad++;\n }\n }\n\n String arreglo[] = new String[cantidad];\n \n for(int i = 0; i < cantidad; i ++) {\n arreglo[i] = this.ingredientes.get(i).toString();\n }\n \n return arreglo;\n }", "@Transactional(readOnly = true)\n List<Protein> getProteinsByIds(Set<Long> proteinIds);", "public Protein getProtein()\r\n\t{\r\n\t\treturn protein;\r\n\t}", "Collection<IMonProfil> getProfils();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete a routine from the maintenance table
public boolean deleteMaintenanceRoutine(MaintanceRoutinesClass routine) { return mWritableDB.delete(TABLE_MAINTANCE, TABLE_MAINTANCE_MID + "=" + String.valueOf(routine.getMid()), null) > 0; }
[ "private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list.getSelectedValue();\n\n collection.delete(r);\n listModel.removeElement(r);\n }\n }", "public void deleteAltDef(String idseq_) throws ToolException\n {\n String select = \"delete from sbr.definitions_view where ac_idseq = ?\";\n PreparedStatement pstmt = null;\n try\n {\n pstmt = _conn.prepareStatement(select);\n pstmt.setString(1, idseq_);\n pstmt.executeUpdate();\n }\n catch (SQLException ex)\n {\n _log.error(\"SQL: \" + select, ex);\n pstmt = SQLHelper.closePreparedStatement(pstmt);\n throw new ToolException(ex);\n }finally{\n \tpstmt = SQLHelper.closePreparedStatement(pstmt);\n }\n }", "@DeleteMapping(path = \"{id}\")\n\tpublic String deleteSustenance(@PathVariable long id) {\n\n\t\tsustenanceService.deleteSustenance(id);\n\t\treturn \"Sustenance deleted\";\n\t}", "void deleteLectureBoard(int boardNo);", "private void handleDelDbButton() {\n sqlUtility.dropTable();\n }", "protected static void delScript() {\n try {\n testSvcCol.del(serviceScriptPath);\n } catch (DaoException e) {\n fail(e.getMessage());\n }\n }", "public void deleteDataMigrationTask(String id) throws HpcException;", "void deleteLesson(Module module, Lesson target);", "public void clearMaintenance(Rig rig, Session db)\n {\n this.logger.info(\"Clearning maintenance state from rig \" + rig.getName() + '.');\n this.makeMaintenaceRequest(rig, false, true, db);\n }", "public void delete(Integer id) {\n vehicleMaintenanceRepository.deleteById(id);\n }", "public void deleteRefactoring(String refactoringId);", "void deleteSchedule(Id.Program program, String scheduleName);", "public void doDropTable();", "private void delete() {\n\t\tresControl.deleteReservation(resnr);\n\t}", "boolean deleteMaintenanceDomain(MdId mdName);", "public void deletePhase(Phase phase) {\n // your code here\n }", "void deleteSupervisor(String studentId, String facultyId);", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "public void deleteDepartmentByDeptNo(int dept_no);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the full path filename of Web image Text file corresponding to the web text file name
public static String getWebImageTextFileNameFullPath(String sParentFolder, String sWebTextFileName) { String sWebImageTextFileNameFullPath = ""; String sPlaceName = getPlaceNameFromWebTextFileName(sWebTextFileName); sWebImageTextFileNameFullPath = sParentFolder + File.separator + WEB_IMAGE_TEXT_FOLDER + File.separator + sPlaceName + WEB_IMAGE_FILE_POST; return sWebImageTextFileNameFullPath; }
[ "java.lang.String getFilename();", "java.lang.String getFileName();", "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }", "private String getFileName(URL url){\n String fName = url.getFile();\n return fName.substring(fName.lastIndexOf('/') + 1);\n }", "private String getImageFileName()\n\t{\n\t\t// TODO test if we can use titles because of spacing and possible unicode input from users.\n\t\t// POI currentPoi = this.blogs.getCurrent();\n\t\t// if (currentPoi.getTitle().length() > 0)\n\t\t// {\n\t\t// return currentPoi.getTitle() + \".jpg\";\n\t\t// }\n\t\t// else\n\t\t// {\n\t\t// for now give it a number.\n\t\treturn String.valueOf( System.currentTimeMillis() ) + WPEnvironment.getImageExtension();\n\t\t// }\n\t}", "public static String getWebTextFilePathName(String sParentFolder, String sPlaceName) {\t\r\n\t\tString sWebTextFilePathName = sParentFolder + File.separator + WEB_TEXT_FOLDER + File.separator + sPlaceName + WEB_TEXT_FILE_POST;\r\n\t\t\r\n\t\treturn sWebTextFilePathName;\r\n\t}", "private String getFilePath(String sHTTPRequest) {\n return sHTTPRequest.replaceFirst(\"/\", \"\");\n\n }", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "public String getFilename(){\n String filename = this.getName().replaceAll(\"[)('.]\", \"\").replace(\" \", \"-\");\n Affinity affinity = this.getAffinity();\n\n return (affinity==Affinity.Neutral ? filename : (filename+\"_\"+affinity.toString().toLowerCase())) + \".jpg\";\n }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "private String getFilename(String path) {\r\n\t\tint slashHere = path.lastIndexOf('/');\r\n\t\tif (slashHere == -1) {\r\n\t\t\treturn path;\r\n\t\t} else {\r\n\t\t\treturn path.substring(slashHere + 1);\r\n\t\t}\r\n\t}", "private void getFileName() {\n\t\tHeader contentHeader = response.getFirstHeader(\"Content-Disposition\");\n\t\tthis.filename = null;\n\t\tif (contentHeader != null) {\n\t\t\tHeaderElement[] values = contentHeader.getElements();\n\t\t\tif (values.length == 1) {\n\t\t\t\tNameValuePair param = values[0].getParameterByName(\"filename\");\n\t\t\t\tif (param != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfilename = param.getValue();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.filename == null) {\n\t\t\tthis.filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\t\t}\n\t}", "public String getClientFileName();", "public static String getWebTextFilePathName_Full(String sParentFolder, String sPlaceName) {\t\r\n\t\tString sWebTextFilePathName_Full = sParentFolder + File.separator + FULL_WEB_TEXT_FOLDER + File.separator + sPlaceName + WEB_TEXT_FILE_POST;\r\n\t\t\r\n\t\treturn sWebTextFilePathName_Full;\r\n\t}", "public String fileName() {\n int ind = path.lastIndexOf('/');\n return path.substring(ind + 1, path.length());\n }", "public String getPageFileName();", "private String getFileName(Part part) {\r\n String contentDisp = part.getHeader(\"content-disposition\");\r\n System.out.println(\"content-disposition header= \"+contentDisp);\r\n String[] tokens = contentDisp.split(\";\");\r\n for (String token : tokens) {\r\n if (token.trim().startsWith(\"filename\")) {\r\n return token.substring(token.indexOf(\"=\") + 2, token.length()-1);\r\n }\r\n }\r\n return \"\";\r\n }", "static String getFileNameFromFileUrl( final String url ) {\n\n\t\tString name = url.substring( url.lastIndexOf('/') + 1 );\n\t\tint index = name.lastIndexOf( '?' );\n\t\tif( index > 0 )\n\t\t\tname = name.substring( 0, index );\n\t\telse if( index == 0 )\n\t\t\tname = name.substring( 1 );\n\n\t\treturn name.replaceAll( \"[^\\\\w.-]\", \"_\" );\n\t}", "private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The signature for the resulting context. string linked_context = 2;
public com.google.protobuf.ByteString getLinkedContextBytes() { java.lang.Object ref = linkedContext_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); linkedContext_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
[ "java.lang.String getLinkedContext();", "public java.lang.String getLinkedContext() {\n java.lang.Object ref = linkedContext_;\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 linkedContext_ = s;\n return s;\n }\n }", "public java.lang.String getLinkedContext() {\n java.lang.Object ref = linkedContext_;\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 linkedContext_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getLinkedContextBytes();", "com.google.protobuf.ByteString getContext();", "java.lang.String getContext();", "long getContext();", "java.lang.String getSecondContextBase64();", "public String getContextString();", "RenderingContext getContext();", "public void _linkContext(CollaborationInstanceSet context1);", "public Object getContext();", "public abstract String getContextName();", "java.lang.String getFirstContextBase64();", "java.lang.String getContextId();", "public String getContext() {\n int l=code.getCurLine();\n String s=\"\\t\\t at line:\" + l + \" \";\n if (l>-1) {\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-2);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-1);\n s+=\"\\n\\t\\t\\t> \"+code.getLineAsString(l)+\" <\";\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+1);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+2);\n s=s+ \"\\n\\t\\t current token:\" + tok.toString();;\n s=s+ \"\\n\\t\\t Variable dump:\" + vars;\n if (gVars!=null) {\n s=s+ \"\\n\\t\\t Globals:\" + gVars;\n }\n } else s+=\"\\n\\t\\t\\t> \"+tok.getLine()+\" <\";\n\n return s;\n }", "java.lang.String getThirdContextBase64();", "@SuppressWarnings(\"unchecked\")\n protected C context()\n {\n return (C)RequestReferences.get().context;\n }", "com.google.protobuf.ByteString getSourceAadContext();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the HTML tree is valid. This check is more specific to standard doclet and not exactly similar to W3C specifications. But it ensures HTML validation.
public boolean isValid() { switch (htmlTag) { case A : return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent())); case BR : return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR))); case FRAME : return (hasAttr(HtmlAttr.SRC) && !hasContent()); case HR : return (!hasContent()); case IMG : return (hasAttr(HtmlAttr.SRC) && hasAttr(HtmlAttr.ALT) && !hasContent()); case LINK : return (hasAttr(HtmlAttr.HREF) && !hasContent()); case META : return (hasAttr(HtmlAttr.CONTENT) && !hasContent()); case SCRIPT : return ((hasAttr(HtmlAttr.TYPE) && hasAttr(HtmlAttr.SRC) && !hasContent()) || (hasAttr(HtmlAttr.TYPE) && hasContent())); default : return hasContent(); } }
[ "public boolean isHTML () {\n return root != null;\n }", "public boolean checkHTML(){\n\t\t\t//checks if every start tag has an end tag\n\t\t\tHTMLTag htmlToCheck = this.getTag();\n\t\t\tif(htmlToCheck.getEndTag()!=null){\n\t\t\t\tfor(DocumentElement de : htmlToCheck.getChildren()){\n\t\t\t\t\tif(de.getEndTag() != null){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse { \n\t\t\t\t\t\treturn false;\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\t\n\t\t\t} else { \n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public Boolean isValid(TextComponent document) {\n for(Integer i = 0; i < document.numChildren(); i++) {\n TextComponent component = document.getChild(i);\n\n if(component instanceof OpeningHtmlTagDecorator) {\n TextComponent closingComponent;\n\n try {\n closingComponent = document.getChild(i + 2);\n }\n catch(IndexOutOfBoundsException e) {\n return false;\n }\n\n if(!(closingComponent instanceof ClosingHtmlTagDecorator)) {\n // Something is wrong with the format of the parsed document tree.\n return false;\n }\n\n TextComponent original = ((TextItemDecorator) component).getOriginalTextItem();\n TextComponent opposite = ((TextItemDecorator) closingComponent).getOriginalTextItem();\n\n // Make sure the tags match.\n if(!original.toString().equalsIgnoreCase(opposite.toString())) {\n return false;\n }\n\n try {\n // Now recurse down in-between the tags.\n if(!isValid(document.getChild(i + 1))) {\n return false;\n }\n }\n catch(IndexOutOfBoundsException e) {\n return false;\n }\n }\n }\n\n return true;\n }", "public boolean isRootElementValid() {\r\n\t\tboolean result = false;\r\n\r\n\t\tNode rootNode = mDocument.getDocumentElement();\r\n\t\tString rootNodeName = rootNode.getLocalName();\r\n\t\tString rootNodeNamespace = rootNode.getNamespaceURI();\r\n\r\n\t\tif (rootNodeName.equals(\"manifest\")) {\r\n\t\t\tif (rootNodeNamespace.equals(DOMTreeUtility.IMSCP_NAMESPACE)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t} else {\r\n\t\t\t\tString msgText = Messages.getString(\"ADLSCORMValidator.24\", rootNodeName, rootNodeNamespace, DOMTreeUtility.IMSCP_NAMESPACE);\r\n\r\n\t\t\t\tmLogger.info(\"FAILED: \" + msgText);\r\n\r\n\t\t\t\tMessageCollection.getInstance().add(new LogMessage(MessageType.FAILED, msgText));\r\n\t\t\t\t// This is the updated logging method invocation \r\n\t\t\t\tDetailedLogMessageCollection.getInstance().addMessage(new LogMessage(MessageType.TERMINATE, msgText));\r\n\t\t\t}\r\n\t\t} else if (rootNodeName.equals(\"lom\")) {\r\n\t\t\tif (rootNodeNamespace.equals(DOMTreeUtility.IEEE_LOM_NAMESPACE)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t} else {\r\n\t\t\t\tString msgText = Messages.getString(\"ADLSCORMValidator.30\", rootNodeName, rootNodeNamespace, DOMTreeUtility.IEEE_LOM_NAMESPACE);\r\n\r\n\t\t\t\tmLogger.info(\"FAILED: \" + msgText);\r\n\t\t\t\tMessageCollection.getInstance().add(new LogMessage(MessageType.FAILED, msgText));\r\n\t\t\t\t// This is the updated logging method invocation \r\n\t\t\t\tDetailedLogMessageCollection.getInstance().addMessage(new LogMessage(MessageType.TERMINATE, msgText));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "boolean hasErrorHtml();", "public abstract boolean isValidElementTag();", "public boolean isValid() {\n return parserClass != null;\n }", "public void validate() {\n Stack<HtmlTag> openTagStack = new Stack<HtmlTag>();\n int indentSum = 0;\n int tagSize = tagQueue.size();\n //keep a memory of the size of the queue before the loop so that it doesn't change \n for(int i = 0; i < tagSize; i++) {\n HtmlTag currentTag = tagQueue.remove();\n if(currentTag.isOpenTag()) {\n indent(indentSum);\n if(!currentTag.isSelfClosing()) {\n openTagStack.push(currentTag);\n indentSum++;\n }\n } else {\n if(!openTagStack.isEmpty() && currentTag.matches(openTagStack.peek())) {\n openTagStack.pop();\n indentSum--;\n indent(indentSum);\n } else {\n System.out.println(\"ERROR unexpected tag: \" + currentTag);\n }\n }\n System.out.println(currentTag); \n //prints back out the tag\n tagQueue.add(currentTag);\n //add the tag back to the queue\n }\n //checks for the unclosed tags and prints them out in the following\n while(!openTagStack.isEmpty()) { \n System.out.println(\"ERROR unclosed tag: \" + openTagStack.pop());\n }\n }", "public boolean isPageValid() {\n boolean isValid = false;\n try {\n pageValidator.assertAll();\n isValid = true;\n } catch (AssertionError error) {\n isValid = false;\n }\n return isValid;\n }", "public boolean checkHtmlChildNode(String text) {\n\t\tif(text.contains(\"</\") \n\t\t\t\t|| text.contains(\"<img\") \n\t\t\t\t|| text.contains(\"<input\") \n\t\t\t\t|| text.contains(\"<!--\")) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean isValidTopLevelNode(Node node) {\n String name = node.getNodeName();\n if (name.equals(SMARTRULE_NODE) || name.equals(NEXT_CONTENT)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean hasValidChildTreeList() {\n\t\treturn hasChildTreeList() && !getChildTreeList().isEmpty();\n\t}", "public boolean hasValidPointerTreeList() {\n\t\treturn hasPointerTreeList() && !getPointerTreeList().isEmpty();\n\t}", "private boolean isValid (DocFile file) {\n return file != null && Arrays.asList(Constants.VALIDDOCTYPES).contains(file.getFileType());\n }", "@Test\n public void testCheckHTMLValidInput() {\n assertTrue(validconverter.checkHTML());\n }", "private boolean checkTreeNormalization() {\n\t\treturn checkTreeNormalizationRecursive(getDomain().getObjectivesRoot());\n\t}", "private boolean validateXML() {\r\n\r\n boolean result = false;\r\n\r\n // update the simulation description depending on the current XML editor\r\n // setting\r\n this.updateSimulationDescription();\r\n\r\n // validate the current project, which means the XML content of the\r\n // simulation description will be load from the project an validated against\r\n // the XML Schema\r\n\r\n result = this.simulationManager.validateSimulation();\r\n\r\n System.out.print(this.messageValidation);\r\n if (result) {\r\n this.success.println(\"Ok\");\r\n this.progressBar.setString(\"Valid.\");\r\n\r\n // enable all previously may not usable menu items\r\n ((Menu) this.getJMenuBar()).switchMenuItems(\r\n Arrays.asList(Menu.Item.GENERATE_ONLY), true);\r\n } else {\r\n System.err.println(\"Failed!\");\r\n this.progressBar.setString(\"Invalid.\");\r\n\r\n // disable all not usable menu items\r\n ((Menu) this.getJMenuBar())\r\n .switchMenuItems(\r\n Arrays.asList(Menu.Item.GENERATE_ONLY, Menu.Item.COMPILE_ONLY),\r\n false);\r\n }\r\n\r\n return result;\r\n\r\n }", "public boolean hasAllowhtml() {\n return result.hasAllowhtml();\n }", "public boolean htmlTagChecker(String input)\n\t{\n\t\tint firstOpen = input.indexOf(\"<\");\n\t\tint firstClose = input.indexOf(\">\");\n\t\tint secondOpen = input.indexOf(\"<\", firstOpen);\n\t\tint secondClose = input.indexOf(\">\", firstClose);\n\t\t\n\t\t\n\t\t\n\t\tif(!input.contains(\"<\") || !input.contains(\">\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif(input.equals(\"<>\") || input.equals(\"< >\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif(input.toLowerCase().contains(\"<p>\") || input.toLowerCase().contains(\"<br\"))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif(secondOpen == -1 || secondClose == -1 || firstOpen == -1|| firstClose == -1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif(!input.contains(\"/\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif(input.substring(firstOpen + 1, firstClose).equalsIgnoreCase(input.substring(secondOpen + 2 , secondClose)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif(input.toLowerCase().contains(\"a href\") && !input.toLowerCase().contains(\"=\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end DECLARATION $ANTLR start PROCEDURE
public final void mPROCEDURE() throws RecognitionException { try { int _type = PROCEDURE; // /Users/benjamincoe/HackWars/C.g:14:11: ( 'procedure' ) // /Users/benjamincoe/HackWars/C.g:14:13: 'procedure' { match("procedure"); } this.type = _type; } finally { } }
[ "public interface ProcedureDecl extends CodeDecl \n{\n /** The procedure's name. */\n Id name();\n \n /** The procedure's flags. */\n FlagsNode flags();\n\n /**\n * The procedure's formal parameters.\n * @return A list of {@link polyglot.ast.Formal Formal}.\n */\n List<Formal> formals();\n\n /**\n * The procedure type object. This field may not be valid until\n * after signature disambiguation.\n */\n ProcedureDef procedureInstance();\n\n /** The procedure's return type. */\n TypeNode returnType();\n}", "ProcedureDecl createProcedureDecl();", "public final void mPROCEDURE() throws RecognitionException {\n try {\n int _type = PROCEDURE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Users\\\\lataw\\\\Downloads\\\\Oberti2u-master\\\\Oberti2u-master\\\\Algol.g:32:11: ( 'PROCEDURE' )\n // C:\\\\Users\\\\lataw\\\\Downloads\\\\Oberti2u-master\\\\Oberti2u-master\\\\Algol.g:32:13: 'PROCEDURE'\n {\n match(\"PROCEDURE\");\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n // do for sure before leaving\n }\n }", "public final void mPROCEDURE() throws RecognitionException {\r\n try {\r\n int _type = PROCEDURE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\Data\\\\software_construction\\\\grammar\\\\Oberon0.g:30:11: ( 'PROCEDURE' )\r\n // C:\\\\Data\\\\software_construction\\\\grammar\\\\Oberon0.g:30:13: 'PROCEDURE'\r\n {\r\n match(\"PROCEDURE\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "public final EObject ruleProcedure() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n Token otherlv_3=null;\n Token otherlv_6=null;\n EObject lv_params_4_0 = null;\n\n EObject lv_ins_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2411:28: ( (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:3: otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure'\n {\n otherlv_0=(Token)match(input,55,FOLLOW_55_in_ruleProcedure5003); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getProcedureAccess().getProcedureKeyword_0());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2416:1: ( (lv_name_1_0= RULE_ID ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2418:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleProcedure5020); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getProcedureAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getProcedureRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,20,FOLLOW_20_in_ruleProcedure5037); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getProcedureAccess().getWithKeyword_2());\n \n otherlv_3=(Token)match(input,56,FOLLOW_56_in_ruleProcedure5049); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getProcedureAccess().getParamsKeyword_3());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2442:1: ( (lv_params_4_0= ruleParameters ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2444:3: lv_params_4_0= ruleParameters\n {\n \n \t newCompositeNode(grammarAccess.getProcedureAccess().getParamsParametersParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleParameters_in_ruleProcedure5070);\n lv_params_4_0=ruleParameters();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"params\",\n \t\tlv_params_4_0, \n \t\t\"Parameters\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2460:2: ( (lv_ins_5_0= ruleInstructions ) )+\n int cnt34=0;\n loop34:\n do {\n int alt34=2;\n int LA34_0 = input.LA(1);\n\n if ( ((LA34_0>=16 && LA34_0<=19)||(LA34_0>=21 && LA34_0<=22)||LA34_0==24||LA34_0==35||LA34_0==40||(LA34_0>=48 && LA34_0<=53)||LA34_0==55) ) {\n alt34=1;\n }\n\n\n switch (alt34) {\n \tcase 1 :\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t {\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2462:3: lv_ins_5_0= ruleInstructions\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getProcedureAccess().getInsInstructionsParserRuleCall_5_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleInstructions_in_ruleProcedure5091);\n \t lv_ins_5_0=ruleInstructions();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"ins\",\n \t \t\tlv_ins_5_0, \n \t \t\t\"Instructions\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt34 >= 1 ) break loop34;\n EarlyExitException eee =\n new EarlyExitException(34, input);\n throw eee;\n }\n cnt34++;\n } while (true);\n\n otherlv_6=(Token)match(input,57,FOLLOW_57_in_ruleProcedure5104); \n\n \tnewLeafNode(otherlv_6, grammarAccess.getProcedureAccess().getEndProcedureKeyword_6());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final SiDLParser.procedure_return procedure() throws RecognitionException {\n SiDLParser.procedure_return retval = new SiDLParser.procedure_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token PROC5=null;\n Token ID6=null;\n Token char_literal7=null;\n Token char_literal9=null;\n Token NL10=null;\n Token END12=null;\n Token NL13=null;\n SiDLParser.idlist_return idlist8 =null;\n\n SiDLParser.block_return block11 =null;\n\n\n Object PROC5_tree=null;\n Object ID6_tree=null;\n Object char_literal7_tree=null;\n Object char_literal9_tree=null;\n Object NL10_tree=null;\n Object END12_tree=null;\n Object NL13_tree=null;\n RewriteRuleTokenStream stream_49=new RewriteRuleTokenStream(adaptor,\"token 49\");\n RewriteRuleTokenStream stream_48=new RewriteRuleTokenStream(adaptor,\"token 48\");\n RewriteRuleTokenStream stream_NL=new RewriteRuleTokenStream(adaptor,\"token NL\");\n RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,\"token ID\");\n RewriteRuleTokenStream stream_END=new RewriteRuleTokenStream(adaptor,\"token END\");\n RewriteRuleTokenStream stream_PROC=new RewriteRuleTokenStream(adaptor,\"token PROC\");\n RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,\"rule block\");\n RewriteRuleSubtreeStream stream_idlist=new RewriteRuleSubtreeStream(adaptor,\"rule idlist\");\n try {\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:2: ( PROC ID ( '(' ( idlist )? ')' )? NL block END NL -> ^( ID ( idlist )? block ) )\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:4: PROC ID ( '(' ( idlist )? ')' )? NL block END NL\n {\n PROC5=(Token)match(input,PROC,FOLLOW_PROC_in_procedure318); \n stream_PROC.add(PROC5);\n\n\n ID6=(Token)match(input,ID,FOLLOW_ID_in_procedure320); \n stream_ID.add(ID6);\n\n\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:12: ( '(' ( idlist )? ')' )?\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==48) ) {\n alt3=1;\n }\n switch (alt3) {\n case 1 :\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:13: '(' ( idlist )? ')'\n {\n char_literal7=(Token)match(input,48,FOLLOW_48_in_procedure323); \n stream_48.add(char_literal7);\n\n\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:17: ( idlist )?\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==ID) ) {\n alt2=1;\n }\n switch (alt2) {\n case 1 :\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:17: idlist\n {\n pushFollow(FOLLOW_idlist_in_procedure325);\n idlist8=idlist();\n\n state._fsp--;\n\n stream_idlist.add(idlist8.getTree());\n\n }\n break;\n\n }\n\n\n char_literal9=(Token)match(input,49,FOLLOW_49_in_procedure328); \n stream_49.add(char_literal9);\n\n\n }\n break;\n\n }\n\n\n NL10=(Token)match(input,NL,FOLLOW_NL_in_procedure332); \n stream_NL.add(NL10);\n\n\n pushFollow(FOLLOW_block_in_procedure334);\n block11=block();\n\n state._fsp--;\n\n stream_block.add(block11.getTree());\n\n END12=(Token)match(input,END,FOLLOW_END_in_procedure336); \n stream_END.add(END12);\n\n\n NL13=(Token)match(input,NL,FOLLOW_NL_in_procedure338); \n stream_NL.add(NL13);\n\n\n // AST REWRITE\n // elements: ID, block, idlist\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 73:48: -> ^( ID ( idlist )? block )\n {\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:51: ^( ID ( idlist )? block )\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(\n new ProcedureNode(stream_ID.nextToken())\n , root_1);\n\n // /Users/enrico/Documents/Workspace/SiDL/src/sidl/grammar/SiDL.g:73:71: ( idlist )?\n if ( stream_idlist.hasNext() ) {\n adaptor.addChild(root_1, stream_idlist.nextTree());\n\n }\n stream_idlist.reset();\n\n adaptor.addChild(root_1, stream_block.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n\n retval.tree = root_0;\n\n }\n\n retval.stop = input.LT(-1);\n\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public final ProcedureDeclaration procedureDeclaration() throws RecognitionException {\r\n ProcedureDeclaration pd = null;\r\n\r\n Token IDENT8=null;\r\n ProcedureHeading ph = null;\r\n\r\n ProcedureBody pb = null;\r\n\r\n\r\n try {\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:163:57: (ph= procedureHeading ';' pb= procedureBody IDENT )\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:164:1: ph= procedureHeading ';' pb= procedureBody IDENT\r\n {\r\n pushFollow(FOLLOW_procedureHeading_in_procedureDeclaration1099);\r\n ph=procedureHeading();\r\n\r\n state._fsp--;\r\n\r\n match(input,35,FOLLOW_35_in_procedureDeclaration1101); \r\n pushFollow(FOLLOW_procedureBody_in_procedureDeclaration1105);\r\n pb=procedureBody();\r\n\r\n state._fsp--;\r\n\r\n IDENT8=(Token)match(input,IDENT,FOLLOW_IDENT_in_procedureDeclaration1107); \r\n pd = new ProcedureDeclaration(ph, pb, (IDENT8!=null?IDENT8.getText():null));\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return pd;\r\n }", "Procedure createProcedure();", "public void visitProcedureNode(DeclNode.ProcedureNode node) {\n beginGen(\"Procedure\");\n // Generate code for the block\n Code code = visitBlockNode(node.getBlock());\n code.generateOp(Operation.RETURN);\n procedures.addProcedure(node.getProcEntry(), code);\n endGen(\"Procedure\");\n }", "public Program parseProgram(Environment env)\n { \n List <ProcedureDeclaration> temp;\n while (currentToken.equals(\"PROCEDURE\"))\n {\n ArrayList <String> array = new ArrayList <String>();\n eat(\"PROCEDURE\");\n String name = currentToken;\n eat(currentToken);\n eat(\"(\");\n while (!(currentToken.equals(\")\")))\n {\n array.add(currentToken);\n eat(currentToken);\n if (currentToken.equals(\",\"))\n {\n eat(\",\");\n }\n }\n eat (\")\");\n eat (\";\");\n Statement stot = parseStatement();\n ProcedureDeclaration proc =\n new ProcedureDeclaration(name, stot, array);\n proc.exec(env);\n //temp.add(proc);\n }\n Statement stmt = parseStatement();\n eat(\".\");\n // return new Program(stmt, temp);\n return new Program(stmt);\n }", "public final void rule__AstProcedure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9514:1: ( ( 'procedure' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9516:1: 'procedure'\n {\n before(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n match(input,72,FOLLOW_72_in_rule__AstProcedure__Group__1__Impl19489); \n after(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void mPROCEDUREDECLARATION() throws RecognitionException {\n try {\n int _type = PROCEDUREDECLARATION;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /home/mark/Documenten/School/1-2b-Vertalerbouw/workspace/VB_EOVB/src/grammar/Grammar.g:54:22: ( 'proceduredeclaration' )\n // /home/mark/Documenten/School/1-2b-Vertalerbouw/workspace/VB_EOVB/src/grammar/Grammar.g:54:24: 'proceduredeclaration'\n {\n match(\"proceduredeclaration\"); \n\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public final EObject ruleProcedureDecl() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token lv_name_2_0=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n EObject lv_inputs_4_0 = null;\n\n EObject lv_ret_6_0 = null;\n\n EObject lv_req_7_0 = null;\n\n EObject lv_ensure_8_0 = null;\n\n EObject lv_modifies_9_0 = null;\n\n EObject lv_body_10_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalUclid.g:1609:2: ( ( () otherlv_1= 'procedure' ( (lv_name_2_0= RULE_ID ) ) otherlv_3= '(' ( (lv_inputs_4_0= ruleArgList ) ) otherlv_5= ')' ( (lv_ret_6_0= ruleProcReturnArgRule ) )? ( (lv_req_7_0= ruleRequireExprsRule ) )* ( (lv_ensure_8_0= ruleEnsureExprsRule ) )* ( (lv_modifies_9_0= ruleModifiesExprsRule ) )* ( (lv_body_10_0= ruleBlkStmtRule ) ) ) )\n // InternalUclid.g:1610:2: ( () otherlv_1= 'procedure' ( (lv_name_2_0= RULE_ID ) ) otherlv_3= '(' ( (lv_inputs_4_0= ruleArgList ) ) otherlv_5= ')' ( (lv_ret_6_0= ruleProcReturnArgRule ) )? ( (lv_req_7_0= ruleRequireExprsRule ) )* ( (lv_ensure_8_0= ruleEnsureExprsRule ) )* ( (lv_modifies_9_0= ruleModifiesExprsRule ) )* ( (lv_body_10_0= ruleBlkStmtRule ) ) )\n {\n // InternalUclid.g:1610:2: ( () otherlv_1= 'procedure' ( (lv_name_2_0= RULE_ID ) ) otherlv_3= '(' ( (lv_inputs_4_0= ruleArgList ) ) otherlv_5= ')' ( (lv_ret_6_0= ruleProcReturnArgRule ) )? ( (lv_req_7_0= ruleRequireExprsRule ) )* ( (lv_ensure_8_0= ruleEnsureExprsRule ) )* ( (lv_modifies_9_0= ruleModifiesExprsRule ) )* ( (lv_body_10_0= ruleBlkStmtRule ) ) )\n // InternalUclid.g:1611:3: () otherlv_1= 'procedure' ( (lv_name_2_0= RULE_ID ) ) otherlv_3= '(' ( (lv_inputs_4_0= ruleArgList ) ) otherlv_5= ')' ( (lv_ret_6_0= ruleProcReturnArgRule ) )? ( (lv_req_7_0= ruleRequireExprsRule ) )* ( (lv_ensure_8_0= ruleEnsureExprsRule ) )* ( (lv_modifies_9_0= ruleModifiesExprsRule ) )* ( (lv_body_10_0= ruleBlkStmtRule ) )\n {\n // InternalUclid.g:1611:3: ()\n // InternalUclid.g:1612:4: \n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t/* */\n \t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getProcedureDeclAccess().getProcedureDeclAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n }\n\n }\n\n otherlv_1=(Token)match(input,35,FOLLOW_5); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getProcedureDeclAccess().getProcedureKeyword_1());\n \t\t\n }\n // InternalUclid.g:1625:3: ( (lv_name_2_0= RULE_ID ) )\n // InternalUclid.g:1626:4: (lv_name_2_0= RULE_ID )\n {\n // InternalUclid.g:1626:4: (lv_name_2_0= RULE_ID )\n // InternalUclid.g:1627:5: lv_name_2_0= RULE_ID\n {\n lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_17); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_name_2_0, grammarAccess.getProcedureDeclAccess().getNameIDTerminalRuleCall_2_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getProcedureDeclRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_2_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,31,FOLLOW_18); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_3, grammarAccess.getProcedureDeclAccess().getLeftParenthesisKeyword_3());\n \t\t\n }\n // InternalUclid.g:1647:3: ( (lv_inputs_4_0= ruleArgList ) )\n // InternalUclid.g:1648:4: (lv_inputs_4_0= ruleArgList )\n {\n // InternalUclid.g:1648:4: (lv_inputs_4_0= ruleArgList )\n // InternalUclid.g:1649:5: lv_inputs_4_0= ruleArgList\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getInputsArgListParserRuleCall_4_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_19);\n lv_inputs_4_0=ruleArgList();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"inputs\",\n \t\t\t\t\t\tlv_inputs_4_0,\n \t\t\t\t\t\t\"uclid.xtext.Uclid.ArgList\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_5=(Token)match(input,32,FOLLOW_23); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_5, grammarAccess.getProcedureDeclAccess().getRightParenthesisKeyword_5());\n \t\t\n }\n // InternalUclid.g:1670:3: ( (lv_ret_6_0= ruleProcReturnArgRule ) )?\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( (LA19_0==36) ) {\n alt19=1;\n }\n switch (alt19) {\n case 1 :\n // InternalUclid.g:1671:4: (lv_ret_6_0= ruleProcReturnArgRule )\n {\n // InternalUclid.g:1671:4: (lv_ret_6_0= ruleProcReturnArgRule )\n // InternalUclid.g:1672:5: lv_ret_6_0= ruleProcReturnArgRule\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getRetProcReturnArgRuleParserRuleCall_6_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_23);\n lv_ret_6_0=ruleProcReturnArgRule();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ret\",\n \t\t\t\t\t\tlv_ret_6_0,\n \t\t\t\t\t\t\"uclid.xtext.Uclid.ProcReturnArgRule\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n break;\n\n }\n\n // InternalUclid.g:1689:3: ( (lv_req_7_0= ruleRequireExprsRule ) )*\n loop20:\n do {\n int alt20=2;\n int LA20_0 = input.LA(1);\n\n if ( (LA20_0==37) ) {\n alt20=1;\n }\n\n\n switch (alt20) {\n \tcase 1 :\n \t // InternalUclid.g:1690:4: (lv_req_7_0= ruleRequireExprsRule )\n \t {\n \t // InternalUclid.g:1690:4: (lv_req_7_0= ruleRequireExprsRule )\n \t // InternalUclid.g:1691:5: lv_req_7_0= ruleRequireExprsRule\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getReqRequireExprsRuleParserRuleCall_7_0());\n \t \t\t\t\t\n \t }\n \t pushFollow(FOLLOW_23);\n \t lv_req_7_0=ruleRequireExprsRule();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"req\",\n \t \t\t\t\t\t\tlv_req_7_0,\n \t \t\t\t\t\t\t\"uclid.xtext.Uclid.RequireExprsRule\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop20;\n }\n } while (true);\n\n // InternalUclid.g:1708:3: ( (lv_ensure_8_0= ruleEnsureExprsRule ) )*\n loop21:\n do {\n int alt21=2;\n int LA21_0 = input.LA(1);\n\n if ( (LA21_0==38) ) {\n alt21=1;\n }\n\n\n switch (alt21) {\n \tcase 1 :\n \t // InternalUclid.g:1709:4: (lv_ensure_8_0= ruleEnsureExprsRule )\n \t {\n \t // InternalUclid.g:1709:4: (lv_ensure_8_0= ruleEnsureExprsRule )\n \t // InternalUclid.g:1710:5: lv_ensure_8_0= ruleEnsureExprsRule\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getEnsureEnsureExprsRuleParserRuleCall_8_0());\n \t \t\t\t\t\n \t }\n \t pushFollow(FOLLOW_23);\n \t lv_ensure_8_0=ruleEnsureExprsRule();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"ensure\",\n \t \t\t\t\t\t\tlv_ensure_8_0,\n \t \t\t\t\t\t\t\"uclid.xtext.Uclid.EnsureExprsRule\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop21;\n }\n } while (true);\n\n // InternalUclid.g:1727:3: ( (lv_modifies_9_0= ruleModifiesExprsRule ) )*\n loop22:\n do {\n int alt22=2;\n int LA22_0 = input.LA(1);\n\n if ( (LA22_0==39) ) {\n alt22=1;\n }\n\n\n switch (alt22) {\n \tcase 1 :\n \t // InternalUclid.g:1728:4: (lv_modifies_9_0= ruleModifiesExprsRule )\n \t {\n \t // InternalUclid.g:1728:4: (lv_modifies_9_0= ruleModifiesExprsRule )\n \t // InternalUclid.g:1729:5: lv_modifies_9_0= ruleModifiesExprsRule\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getModifiesModifiesExprsRuleParserRuleCall_9_0());\n \t \t\t\t\t\n \t }\n \t pushFollow(FOLLOW_23);\n \t lv_modifies_9_0=ruleModifiesExprsRule();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"modifies\",\n \t \t\t\t\t\t\tlv_modifies_9_0,\n \t \t\t\t\t\t\t\"uclid.xtext.Uclid.ModifiesExprsRule\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop22;\n }\n } while (true);\n\n // InternalUclid.g:1746:3: ( (lv_body_10_0= ruleBlkStmtRule ) )\n // InternalUclid.g:1747:4: (lv_body_10_0= ruleBlkStmtRule )\n {\n // InternalUclid.g:1747:4: (lv_body_10_0= ruleBlkStmtRule )\n // InternalUclid.g:1748:5: lv_body_10_0= ruleBlkStmtRule\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getProcedureDeclAccess().getBodyBlkStmtRuleParserRuleCall_10_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_body_10_0=ruleBlkStmtRule();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getProcedureDeclRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"body\",\n \t\t\t\t\t\tlv_body_10_0,\n \t\t\t\t\t\t\"uclid.xtext.Uclid.BlkStmtRule\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String procDecl() throws RecognitionException {\n\t\tScope_stack.push(new Scope_scope());\n\n\t\tString out = null;\n\n\n\t\tCommonTree ID11=null;\n\t\tString paramList8 =null;\n\t\tString varDeclList9 =null;\n\t\tString stmtList10 =null;\n\n\n\t\t\tinMethod = true;\n\t\t\tScope_stack.peek().scopeMap = new HashMap<String, String>();\n\t\t\tout = \"\";\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:2: ( ^( PROC ID ( paramList )? ( varDeclList )? ( stmtList )? ) )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:4: ^( PROC ID ( paramList )? ( varDeclList )? ( stmtList )? )\n\t\t\t{\n\t\t\tmatch(input,PROC,FOLLOW_PROC_in_procDecl250); \n\t\t\tmatch(input, Token.DOWN, null); \n\t\t\tID11=(CommonTree)match(input,ID,FOLLOW_ID_in_procDecl252); \n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:14: ( paramList )?\n\t\t\tint alt6=2;\n\t\t\tint LA6_0 = input.LA(1);\n\t\t\tif ( (LA6_0==PARAM) ) {\n\t\t\t\talt6=1;\n\t\t\t}\n\t\t\tswitch (alt6) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:14: paramList\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_paramList_in_procDecl254);\n\t\t\t\t\tparamList8=paramList();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:25: ( varDeclList )?\n\t\t\tint alt7=2;\n\t\t\tint LA7_0 = input.LA(1);\n\t\t\tif ( (LA7_0==VARDECL) ) {\n\t\t\t\talt7=1;\n\t\t\t}\n\t\t\tswitch (alt7) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:25: varDeclList\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_varDeclList_in_procDecl257);\n\t\t\t\t\tvarDeclList9=varDeclList();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:38: ( stmtList )?\n\t\t\tint alt8=2;\n\t\t\tint LA8_0 = input.LA(1);\n\t\t\tif ( (LA8_0==BLOCK||LA8_0==CALL||LA8_0==30||(LA8_0 >= 42 && LA8_0 <= 43)||LA8_0==48) ) {\n\t\t\t\talt8=1;\n\t\t\t}\n\t\t\tswitch (alt8) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:174:38: stmtList\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_stmtList_in_procDecl260);\n\t\t\t\t\tstmtList10=stmtList();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmatch(input, Token.UP, null); \n\n\n\t\t\t\t\t\n\t\t\t\t\t\tString params = \"\";\n\t\t\t\t\t\tif (paramList8 != null) {\n\t\t\t\t\t\t\tparams = paramList8;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString varDecls = \"\";\n\t\t\t\t\t\tif (varDeclList9 != null) {\n\t\t\t\t\t\t\tvarDecls = varDeclList9;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString stmts = \"\";\n\t\t\t\t\t\tif (stmtList10 != null) {\n\t\t\t\t\t\t\tstmts = stmtList10;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tout =\n\t\t\t\t\t\t\t\"\\n\" + indent() + \"static void _\" + (ID11!=null?ID11.getText():null) +\n\t\t\t\t\t\t\t\"(\" + params + \") {\\n\\n\";\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tout =\n\t\t\t\t\t\t\tout.concat(\n\t\t\t\t\t\t\t\tindent() + varDecls + \"\\n\\n\" +\n\t\t\t\t\t\t\t\tindent() + stmts + \"\\n\\n\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tout =\n\t\t\t\t\t\t\tout.concat(\n\t\t\t\t\t\t\t\tindent() + \"}\\n\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\n\t\t\t}\n\n\n\t\t\t\tinMethod = false;\n\t\t\t\tScope_stack.peek().scopeMap.clear();\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t\tScope_stack.pop();\n\n\t\t}\n\t\treturn out;\n\t}", "public String getProcedureTerm()\n throws SQLException\n {\n return \"PROCEDURE\";\n }", "public final compParser.ent_proc_return ent_proc() throws RecognitionException {\n compParser.ent_proc_return retval = new compParser.ent_proc_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal27=null;\n Token IDF28=null;\n compParser.param_return param29 = null;\n\n\n CommonTree string_literal27_tree=null;\n CommonTree IDF28_tree=null;\n RewriteRuleTokenStream stream_IDF=new RewriteRuleTokenStream(adaptor,\"token IDF\");\n RewriteRuleTokenStream stream_PROCEDURE=new RewriteRuleTokenStream(adaptor,\"token PROCEDURE\");\n RewriteRuleSubtreeStream stream_param=new RewriteRuleSubtreeStream(adaptor,\"rule param\");\n try { dbg.enterRule(getGrammarFileName(), \"ent_proc\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(50, 1);\n\n try {\n // /home/oussama/Desktop/Compil/vincent66u/comp.g:50:13: ( 'procedure' IDF param -> ^( PROCEDURE IDF param ) )\n dbg.enterAlt(1);\n\n // /home/oussama/Desktop/Compil/vincent66u/comp.g:50:15: 'procedure' IDF param\n {\n dbg.location(50,15);\n string_literal27=(Token)match(input,PROCEDURE,FOLLOW_PROCEDURE_in_ent_proc526); \n stream_PROCEDURE.add(string_literal27);\n\n dbg.location(50,29);\n IDF28=(Token)match(input,IDF,FOLLOW_IDF_in_ent_proc530); \n stream_IDF.add(IDF28);\n\n dbg.location(50,34);\n pushFollow(FOLLOW_param_in_ent_proc533);\n param29=param();\n\n state._fsp--;\n\n stream_param.add(param29.getTree());\n\n\n // AST REWRITE\n // elements: IDF, param\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 50:40: -> ^( PROCEDURE IDF param )\n {\n dbg.location(50,42);\n // /home/oussama/Desktop/Compil/vincent66u/comp.g:50:42: ^( PROCEDURE IDF param )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n dbg.location(50,44);\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PROCEDURE, \"PROCEDURE\"), root_1);\n\n dbg.location(50,54);\n adaptor.addChild(root_1, stream_IDF.nextNode());\n dbg.location(50,58);\n adaptor.addChild(root_1, stream_param.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n dbg.location(51, 1);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"ent_proc\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return retval;\n }", "public final ProcedureBody procedureBody() throws RecognitionException {\r\n ProcedureBody pb = null;\r\n\r\n List<IDeclaration> d = null;\r\n\r\n List<IStatement> ss = null;\r\n\r\n\r\n try {\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:154:43: (d= declarations ( 'BEGIN' ss= statementSequence )? 'END' )\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:155:1: d= declarations ( 'BEGIN' ss= statementSequence )? 'END'\r\n {\r\n pushFollow(FOLLOW_declarations_in_procedureBody1067);\r\n d=declarations();\r\n\r\n state._fsp--;\r\n\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:155:16: ( 'BEGIN' ss= statementSequence )?\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( (LA22_0==42) ) {\r\n alt22=1;\r\n }\r\n switch (alt22) {\r\n case 1 :\r\n // C:\\\\anton\\\\oberon0\\\\src\\\\edu\\\\uva\\\\sc\\\\oberon0\\\\oberon0.g:155:17: 'BEGIN' ss= statementSequence\r\n {\r\n match(input,42,FOLLOW_42_in_procedureBody1070); \r\n pushFollow(FOLLOW_statementSequence_in_procedureBody1074);\r\n ss=statementSequence();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n match(input,32,FOLLOW_32_in_procedureBody1078); \r\n ProcedureBody result = new ProcedureBody(d, ss);\r\n for(IDeclaration decl : d){\r\n decl.AddToScope(result);\r\n }\r\n pb = result;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return pb;\r\n }", "protected void sequence_procedure_declaration(ISerializationContext context, abstraction_declaration semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.ABSTRACTION_DECLARATION__HEADING) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PascalPackage.Literals.ABSTRACTION_DECLARATION__HEADING));\n\t\t\tif (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.ABSTRACTION_DECLARATION__BLOCK) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PascalPackage.Literals.ABSTRACTION_DECLARATION__BLOCK));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getProcedure_declarationAccess().getHeadingProcedure_headingParserRuleCall_0_0(), semanticObject.getHeading());\n\t\tfeeder.accept(grammarAccess.getProcedure_declarationAccess().getBlockBlockParserRuleCall_2_0(), semanticObject.getBlock());\n\t\tfeeder.finish();\n\t}", "private boolean isProcedureDeclaration(boolean aGlobal) throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.PROCEDURE)\n\t\t{\n\t\t\t// If we are in the global scope, we must update the scope and push old scope to stack.\n\t\t\tif(aGlobal)\n\t\t\t{\n\t\t\t\ttheSymbolTable.UpdateScopeForGlobal();\n\t\t\t}\n\t\t\t\n\t\t\ttheSymbolTable.CURR_SYMBOL.setType(theCurrentToken.TokenType);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(isProcedureHeader())\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tif(isProcedureBody())\n\t\t\t\t{\n\t\t\t\t\tif(aGlobal)\n\t\t\t\t\t\ttheSymbolTable.ReturnScopeForGlobal();\n\t\t\t\t\telse\n\t\t\t\t\t\ttheSymbolTable.RemoveFromScopeKey();\n\t\t\t\t\t\n\t\t\t\t\tisValid = true;\n\t\t\t\t\tSystem.out.println(\"Procedure Declaration!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unlocks the function from the cache after certain time lapsed
public boolean unLockFunctionFromCache(int function_id) throws Exception { SchedulerDB sdb=SchedulerDB.getSchedulerDB(); try{ sdb.connectDB(); String usr=new SchedulerMgmt(getRequest()).getAuthorizedUser(sdb); removeLockFromCache(function_id,usr); return true; }catch(Exception e){ e.printStackTrace(); throw e; }finally{ sdb.closeDB(); } }
[ "void lockExpired(String lock);", "long lockTimeMills();", "protected void cacheMiss()\n {\n }", "void unlockMap();", "protected void unlockIfExpired(String inPath)\n\t{\n\t\tEditLock lock = getEditLock(inPath);\n\n\t\tif ((lock != null) && lock.isExpired())\n\t\t{\n\t\t\tgetPathToLockMap().remove(inPath);\n\t\t}\n\t}", "public boolean unlock();", "void forceReleaseLock();", "void invalidateCache();", "@Override\n public void onUnlock(Myo myo, long timestamp) {\n }", "int endCache ();", "private void endCache() {}", "void refreshLock(QName lockQName, String lockToken, long timeToLive);", "void useCache(Runnable action);", "boolean tryLock(K key, long time, TimeUnit timeunit);", "public void invalidateCache() {\n\n }", "@Override\n protected void rescheduleForNewServerAccessCredits (final double time)\n {\n }", "void lock(Portal portal);", "boolean unlock(boolean hasKey);", "public void invalidateCache() {\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this ib order.
@Override public void setModifiedDate(Date modifiedDate) { _ibOrder.setModifiedDate(modifiedDate); }
[ "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_bookOrder.setModifiedDate(modifiedDate);\n\t}", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "@Override\n\tpublic void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modifiedDate);", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_commitment.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_unit.setModifiedDate(modifiedDate);\n\t}", "@Override\n public void setModifiedDate(java.util.Date modifiedDate) {\n _partido.setModifiedDate(modifiedDate);\n }", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_changesetEntry.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_purchaseOption.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_taskSession.setModifiedDate(modifiedDate);\n\t}", "void setModifyDate(final Date lastModifiedDate);", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_workFlowConfig.setModifiedDate(modifiedDate);\n\t}", "@Override\n public void setModifiedDate(java.util.Date modifiedDate) {\n _auditReport.setModifiedDate(modifiedDate);\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_dmGtStatus.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_ext_information.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_comment.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_esfState.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_modelo.setModifiedDate(modifiedDate);\n\t}", "@Override\n public void setModifiedDate(java.util.Date modifiedDate) {\n _appVersion.setModifiedDate(modifiedDate);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove submissions older then given date from repository.
void purgeSubmissions(Date threshold);
[ "void deleteOlderThan(Date date);", "public void removeByDate(Date date);", "public void removeByUploadedDate(Date uploadedDate);", "public void cleanOld() {\n\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DATE, -1);\n\n\t\tCursor cursor = database.query(DBHelper.TABLE_MOVIE,\n\t\t\t\tallColumnsMovie,\n\t\t\t\tDBHelper.MOVIE_DATE_UNTIL + \" < Datetime(?)\",\n\t\t\t\tnew String[] { sdfDate.format(cal.getTime()) }, null, null, null);\n\t\t\n\t\tcursor.moveToFirst();\n\t\twhile (!cursor.isAfterLast()) {\n\t\t\tMovie movie = cursorToMovie(cursor);\n\t\t\tMovieImages.removeImage(context, movie.getIdMovie());\n\t\t\tcursor.moveToNext();\n\t\t}\n\t\tcursor.close();\n\n\t\tdatabase.execSQL(\"DELETE FROM \" + DBHelper.TABLE_MOVIE + \" WHERE \"\n\t\t\t\t+ DBHelper.MOVIE_DATE_UNTIL + \" < Datetime('\"\n\t\t\t\t+ sdfDate.format(cal.getTime()) + \"')\");\n\n\t\tdatabase.execSQL(\"DELETE FROM \" + DBHelper.TABLE_RESERVATION\n\t\t\t\t+ \" WHERE \" + DBHelper.RESERVATION_DATE + \" < Datetime('\"\n\t\t\t\t+ sdfDate.format(cal.getTime()) + \"')\");\n\t}", "public void removeByTodoDateTime(Date todoDateTime);", "public void removeAfterDate(Date d) {\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if item's expiry date before the date param\n if (currentItem.getExpiryDate().before(d)) {\n // remove it from the stock\n removeAtIndex(i);\n // because an item was removed from [i], we'd like to stay in same indexer\n // (because all items are \"shifted\" back in the array)\n i--;\n }\n }\n }", "void removeJudgement_passing_date(Object oldJudgement_passing_date);", "void unsetIssuingDate();", "public void removeByStatusPastPickupDate(String status, Date pickupDate);", "public void removeByStatusPastReturnDate(String status, Date returnDate);", "private void deleteByDate(String date) {\r\n\t\tint position;\r\n\t\t\r\n\t\t//find lesson by date\r\n\t\tposition = find(date);\r\n\t\t\r\n\t\t//error check\r\n\t\t//If we cannot find lesson in the Linked List\r\n\t\tif (position < 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// remove lesson node from Linked list\r\n\t\tLIST.remove(position);\r\n\t}", "public void removeDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), DATE, value);\r\n\t}", "private void removeOlderGigs() {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tint currentHr = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\t\r\n\t\tif ((currentHr >= 0 && currentHr <= 7)) {\r\n\t\t\t//Log.d(TAG, \"deleting older gigs\");\r\n\t\t\tmGigsDbHelper.deleteOlderGigs();\r\n\t\t}\r\n\t\t\r\n\t}", "public void removeTaggingdate(Thing value) {\r\n\t\tBase.remove(this.model, this.getResource(), TAGGINGDATE, value);\r\n\t}", "public void unsetDistDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DISTDATE$8, 0);\n }\n }", "public void removeByDateUpload(Date date_) throws SystemException {\n\t\tfor (VideoEntry videoEntry : findByDateUpload(date_)) {\n\t\t\tremove(videoEntry);\n\t\t}\n\t}", "public RemoveLeavesBeforeCommand(LocalDate beforeDate) {\n requireAllNonNull(beforeDate);\n\n this.beforeDate = beforeDate;\n }", "void unsetFoundingDate();", "public void removeOldReports(Instant cutoff) {\n Iterator<QueuedReport> iter = queuedReports.iterator();\n while (iter.hasNext()) {\n QueuedReport queuedReport = iter.next();\n if (queuedReport.getReport().getTimestamp().isBefore(cutoff)) {\n iter.remove();\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable the idle timeout
public void disableIdleTimer() { try { mService.disableIdleTimer(); } catch (Exception e) { Log.w(TAG, "Error disabling idle timer", e); } }
[ "private void stopIdleDetectionTimer() {\n\t\tif (this.idleDetectionTimer != null) {\n\t\t\tthis.idleDetectionTimer.stop();\n\t\t\tthis.idleDetectionTimer = null;\n\t\t}\n\t}", "public void setIdleTimeout(int idleTimeout) {\n this.idleTimeout = idleTimeout;\n }", "public void setIdleTimeout(long idleTimeout) {\r\n\t\tthis.idleTimeout = idleTimeout;\r\n\t}", "public void setTimeout(int idleTimeout) {\n this.idleTimeout = idleTimeout;\n }", "public void enableIdleTimer() {\n try {\n mService.enableIdleTimer();\n } catch (Exception e) {\n Log.w(TAG, \"Error enabling idle state\", e);\n }\n }", "public void setIdleTimeout(long idleTimeout) {\n long old = this.idleTimeout;\n this.idleTimeout = idleTimeout;\n\n // Do we have an old timeout\n if (old > 0) {\n // if the old was less than or equal to the new timeout, then nothing more to do\n if (old <= idleTimeout) {\n return;\n }\n\n // old timeout is too long, so cancel it.\n deactivate();\n }\n\n // If we have a new timeout, then check and reschedule\n if (isOpen()) {\n activate();\n }\n }", "public static void stopIdleTimer() {\n playing = true;\n idleTimeline.stop();\n }", "protected void handleIdleTimeout() {\r\n\t}", "public void resetTimeout(){\n this.timeout = this.timeoutMax;\n }", "private void setTimedOut() {\n\t\tthis.timedOut.set(true);\n\t}", "@Override\n public boolean disableTimer() {\n return !timer;\n }", "void unsetTimeLimit();", "protected synchronized long getIdleTimeoutUnadjusted()\n {\n return idleTimeout;\n }", "public void disable(){\r\n\t\tisAutoPosistionEnabled = false;\r\n\t\tperiodTimer.stop();\r\n\t}", "void setTestWhileIdle(boolean testWhileIdle);", "private void disable() {\n logger.warning(\"disabling myself\");\n disabled = true;\n statusManager = null;\n pollInterval = LONG_DELAY; // Check this often on whether to terminate\n }", "public void timerOff() {\n\t\tif (mTimer != null) mTimer.cancel();\n\t}", "public void clearIdleTime() throws RemoteException {\r\n if ( closed )\r\n throw new RemoteException();\r\n else\r\n idleTime = 0l;\r\n }", "protected abstract void onIdleExpired(TimeoutException timeout);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes the feature at the submitted index from the collection
public Feature remove( int index );
[ "Feature removeFeature(int index);", "void removeFeature(int i);", "protected void removeFromIndex(SimpleFeature feature) {\n\t\tif (feature==null) return;\n\t\t\n\t\t// ID Index\n\t\tidIndex.remove( feature.getID() );\n\t\t\n\t\t// Type name index\n\t\tName type = feature.getType().getName();\n\t\tSet<SimpleFeature> prev = typeNameIndex.get(type);\n\t\tif ( prev.remove( feature ) ) {\n\t\t\tif (prev.size()>0) {\n\t\t\t\ttypeNameIndex.put(type,prev);\n\t\t\t} else {\n\t\t\t\ttypeNameIndex.remove(type);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Tile Index\n\t\tif (feature.getID().matches(\".*-[0-9]+-[0-9]+-[0-9]+\")) {\n\t\t\tOSMTile tile = new OSMTile(feature.getID());\n\t\t\tprev = tileIndex.get( tile );\n\t\t\tif ( prev.remove( feature ) ) {\n\t\t\t\tif (prev.size()>0) {\n\t\t\t\t\ttileIndex.put(tile, prev);\n\t\t\t\t} else {\n\t\t\t\t\ttileIndex.remove(type);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Whatever for features\n\t\t}\n\t}", "void removePlanFeature(int i);", "public Feature remove( Feature feature );", "public void remove(int index);", "public Feature remove( String id );", "public void remove( int index)\n {\n myLessons.remove( index );\n }", "Feature delete(Long featureId);", "public void removeFeature(String feature){\n _features.remove(feature);\n }", "public void remove(Feature f){\n if (debug) logger.info(\"feature removed\");\n int row = fc.indexOf(f);\n fc.remove(f);\n fcLastEdits.clear();\n fcLastEdits.add(f);\n lastEditType = EDIT_REMOVE;\n fireTableRowsDeleted(row,row);\n }", "public void removeModel(int modelIndex);", "public void remove(int index) {\n\t\tfilters.remove(index);\n\t}", "public void testRemoveFromBackAndClose() throws Throwable {\n IndexedShapefileDataStore sds = createDataStore();\n \n int idx = loadFeatures(sds).size();\n \n while (idx > 0) {\n FeatureWriter<SimpleFeatureType, SimpleFeature> writer = null;\n \n try {\n writer = sds.getFeatureWriter(sds.getTypeNames()[0],\n Filter.INCLUDE, Transaction.AUTO_COMMIT);\n \n while (writer.hasNext()) {\n writer.next();\n }\n \n writer.remove();\n } finally {\n if (writer != null) {\n writer.close();\n writer = null;\n }\n }\n \n assertEquals(--idx, loadFeatures(sds).size());\n }\n sds.dispose();\n }", "void indexLaunchesRemove(Long projectId, Collection<Long> launchesForIndexRemove);", "public void removeFeature(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(FEATURE$6, i);\r\n }\r\n }", "@Override\n public void remove(int index) {\n tasks.remove(index);\n }", "public void remove(int number, Feature[] array);", "public void removeFeature(Feature feature) {\n rows.removeElement(feature);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleTV_spec" $ANTLR start "entryRuleImplementableStandard" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1741:1: entryRuleImplementableStandard : ruleImplementableStandard EOF ;
public final void entryRuleImplementableStandard() throws RecognitionException { try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1742:1: ( ruleImplementableStandard EOF ) // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1743:1: ruleImplementableStandard EOF { if ( state.backtracking==0 ) { before(grammarAccess.getImplementableStandardRule()); } pushFollow(FOLLOW_ruleImplementableStandard_in_entryRuleImplementableStandard3668); ruleImplementableStandard(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getImplementableStandardRule()); } match(input,EOF,FOLLOW_EOF_in_entryRuleImplementableStandard3675); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
[ "public final void rule__TV_spec__ImplementableStandardsAssignment_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30165:1: ( ( ruleImplementableStandard ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30166:1: ( ruleImplementableStandard )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30166:1: ( ruleImplementableStandard )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30167:1: ruleImplementableStandard\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTV_specAccess().getImplementableStandardsImplementableStandardParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_ruleImplementableStandard_in_rule__TV_spec__ImplementableStandardsAssignment_460648);\r\n ruleImplementableStandard();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTV_specAccess().getImplementableStandardsImplementableStandardParserRuleCall_4_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ImplementableStandard__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16481:1: ( ( 'implementable standard' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16482:1: ( 'implementable standard' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16482:1: ( 'implementable standard' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16483:1: 'implementable standard'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImplementableStandardAccess().getImplementableStandardKeyword_0()); \r\n }\r\n match(input,124,FOLLOW_124_in_rule__ImplementableStandard__Group__0__Impl33515); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImplementableStandardAccess().getImplementableStandardKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TV_spec__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16379:1: ( ( ( rule__TV_spec__ImplementableStandardsAssignment_4 )* ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16380:1: ( ( rule__TV_spec__ImplementableStandardsAssignment_4 )* )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16380:1: ( ( rule__TV_spec__ImplementableStandardsAssignment_4 )* )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16381:1: ( rule__TV_spec__ImplementableStandardsAssignment_4 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTV_specAccess().getImplementableStandardsAssignment_4()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16382:1: ( rule__TV_spec__ImplementableStandardsAssignment_4 )*\r\n loop130:\r\n do {\r\n int alt130=2;\r\n int LA130_0 = input.LA(1);\r\n\r\n if ( (LA130_0==124) ) {\r\n alt130=1;\r\n }\r\n\r\n\r\n switch (alt130) {\r\n \tcase 1 :\r\n \t // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16382:2: rule__TV_spec__ImplementableStandardsAssignment_4\r\n \t {\r\n \t pushFollow(FOLLOW_rule__TV_spec__ImplementableStandardsAssignment_4_in_rule__TV_spec__Group__4__Impl33319);\r\n \t rule__TV_spec__ImplementableStandardsAssignment_4();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop130;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTV_specAccess().getImplementableStandardsAssignment_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleImplementableStandard() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1754:2: ( ( ( rule__ImplementableStandard__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1755:1: ( ( rule__ImplementableStandard__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1755:1: ( ( rule__ImplementableStandard__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1756:1: ( rule__ImplementableStandard__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImplementableStandardAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1757:1: ( rule__ImplementableStandard__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1757:2: rule__ImplementableStandard__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__ImplementableStandard__Group__0_in_ruleImplementableStandard3701);\r\n rule__ImplementableStandard__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImplementableStandardAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void entryRuleTV_spec() throws RecognitionException {\r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1714:1: ( ruleTV_spec EOF )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1715:1: ruleTV_spec EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTV_specRule()); \r\n }\r\n pushFollow(FOLLOW_ruleTV_spec_in_entryRuleTV_spec3608);\r\n ruleTV_spec();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTV_specRule()); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleTV_spec3615); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public interface ETDeclaration extends EObject\n{\n}", "public interface StatementNode extends ASTnode {\n\n}", "public interface AbstractRule {\n\n public void scan(IPPacket packet, Rule rule, ThreatDefinition threat);\n public void printRule();\n\n}", "E9Rule createE9Rule();", "public interface ArithmeticTerm extends EObject {\n}", "public final void rule__ImplementableStandard__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16500:1: ( rule__ImplementableStandard__Group__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16501:2: rule__ImplementableStandard__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__ImplementableStandard__Group__1__Impl_in_rule__ImplementableStandard__Group__133546);\r\n rule__ImplementableStandard__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public interface SRSTet extends Tetromino {\r\n @Override\r\n default String getName() {\r\n return \"SRS \" + getType();\r\n }\r\n}", "public interface Antlr_To_Line extends IsTransformer<Object, Integer> {\r\n\r\n\t@Override\r\n\tdefault Integer transform(Object obj){\r\n\t\tIsTransformer.super.transform(obj);\r\n\t\tif(obj instanceof IsAntlrRuntimeObject){\r\n\t\t\treturn ((IsAntlrRuntimeObject)obj).getLine();\r\n\t\t}\r\n\t\treturn IsAntlrRuntimeObject.create(obj).getLine();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a transformer that takes an object and returns an Integer with line information for ANTLR classes.\r\n\t * The returned transformer will throw runtime exceptions (null pointer, illegal argument) if the given object was not an ANTLR runtime object.\r\n\t * The transformer returns line information for ANTLR classes `RecognitionException`, `Token`, `ParserRuleContext` and `TerminalNode` or -1 as default.\r\n\t * @return new transformer\r\n\t */\r\n\tstatic Antlr_To_Line create(){\r\n\t\treturn new Antlr_To_Line() {};\r\n\t}\r\n}", "public final void entryRuleSVR() throws RecognitionException {\n try {\n // InternalMLRegression.g:454:1: ( ruleSVR EOF )\n // InternalMLRegression.g:455:1: ruleSVR EOF\n {\n before(grammarAccess.getSVRRule()); \n pushFollow(FOLLOW_1);\n ruleSVR();\n\n state._fsp--;\n\n after(grammarAccess.getSVRRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public interface ImplementsExtendsDirective extends EObject\n{\n}", "public final void rule__ImplementableStandard__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16469:1: ( rule__ImplementableStandard__Group__0__Impl rule__ImplementableStandard__Group__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16470:2: rule__ImplementableStandard__Group__0__Impl rule__ImplementableStandard__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__ImplementableStandard__Group__0__Impl_in_rule__ImplementableStandard__Group__033484);\r\n rule__ImplementableStandard__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__ImplementableStandard__Group__1_in_rule__ImplementableStandard__Group__033487);\r\n rule__ImplementableStandard__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void entryRuleReplaceable() throws RecognitionException {\r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:573:1: ( ruleReplaceable EOF )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:574:1: ruleReplaceable EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getReplaceableRule()); \r\n }\r\n pushFollow(FOLLOW_ruleReplaceable_in_entryRuleReplaceable1153);\r\n ruleReplaceable();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getReplaceableRule()); \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleReplaceable1160); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public final void rule__TV_spec__Group__6__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16436:1: ( ( '}' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16437:1: ( '}' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16437:1: ( '}' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16438:1: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTV_specAccess().getRightCurlyBracketKeyword_6()); \r\n }\r\n match(input,68,FOLLOW_68_in_rule__TV_spec__Group__6__Impl33439); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTV_specAccess().getRightCurlyBracketKeyword_6()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public interface ZserioAstVisitor\n{\n /**\n * Visits root node.\n *\n * @param root Root node of zserio AST.\n */\n public void visitRoot(Root root);\n\n /**\n * Visits a single package.\n *\n * @param packageNode Package AST node.\n */\n public void visitPackage(Package packageNode);\n\n /**\n * Visits compatibility version.\n *\n * @param compatibilityVersion Compatibility version AST node.\n */\n public void visitCompatibilityVersion(CompatibilityVersion compatibilityVersion);\n\n /**\n * Visits a single import.\n *\n * @param importNode Import AST node.\n */\n public void visitImport(Import importNode);\n\n /**\n * Visits constant definition.\n *\n * @param constant Constant AST node.\n */\n public void visitConstant(Constant constant);\n\n /**\n * Visits rule group definition.\n *\n * @param ruleGroup Rule group AST node.\n */\n public void visitRuleGroup(RuleGroup ruleGroup);\n\n /**\n * Visits subtype declaration.\n *\n * @param subtype Subtype AST node.\n */\n public void visitSubtype(Subtype subtype);\n\n /**\n * Visits structure type declaration.\n *\n * @param structureType Structure AST node.\n */\n public void visitStructureType(StructureType structureType);\n\n /**\n * Visits choice type declaration.\n *\n * @param choiceType Choice AST node.\n */\n public void visitChoiceType(ChoiceType choiceType);\n\n /**\n * Visits union type declaration.\n *\n * @param unionType Union AST node.\n */\n public void visitUnionType(UnionType unionType);\n\n /**\n * Visits enum type declaration.\n *\n * @param enumType Enum AST node.\n */\n public void visitEnumType(EnumType enumType);\n\n /**\n * Visits bitmask type declaration.\n *\n * @param bitmaskType Bitmask AST node.\n */\n public void visitBitmaskType(BitmaskType bitmaskType);\n\n /**\n * Visits SQL table declaration.\n *\n * @param sqlTableType SQL table AST node.\n */\n public void visitSqlTableType(SqlTableType sqlTableType);\n\n /**\n * Visits SQL database definition.\n *\n * @param sqlDatabaseType SQL database AST node.\n */\n public void visitSqlDatabaseType(SqlDatabaseType sqlDatabaseType);\n\n /**\n * Visits service definition.\n *\n * @param serviceType Service AST node.\n */\n public void visitServiceType(ServiceType serviceType);\n\n /**\n * Visits Pub/Sub definition.\n *\n * @param pubsubType Pub/Sub AST node.\n */\n public void visitPubsubType(PubsubType pubsubType);\n\n /**\n * Visits field definition.\n *\n * @param field Field AST node.\n */\n public void visitField(Field field);\n\n /**\n * Visits choice case definition. Note that a single case can have multiple choice case expressions.\n *\n * @param choiceCase Choice case AST node.\n */\n public void visitChoiceCase(ChoiceCase choiceCase);\n\n /**\n * Visits choice case expression.\n *\n * @param choiceCaseExpression Choice case expression AST node.\n */\n public void visitChoiceCaseExpression(ChoiceCaseExpression choiceCaseExpression);\n\n /**\n * Visits choice default statement.\n *\n * @param choiceDefault Choice default statement AST node.\n */\n public void visitChoiceDefault(ChoiceDefault choiceDefault);\n\n /**\n * Visits enum item definition.\n *\n * @param enumItem Enum item AST node.\n */\n public void visitEnumItem(EnumItem enumItem);\n\n /**\n * Visits bitmask named value definition.\n *\n * @param bitmaskValue Bitmask named value AST node.\n */\n public void visitBitmaskValue(BitmaskValue bitmaskValue);\n\n /**\n * Visits SQL constraint definition.\n *\n * @param sqlConstraint SQL constraint AST node.\n */\n public void visitSqlConstraint(SqlConstraint sqlConstraint);\n\n /**\n * Visits service method definition.\n *\n * @param serviceMethod Service method AST node.\n */\n public void visitServiceMethod(ServiceMethod serviceMethod);\n\n /**\n * Visits Pub/Sub message definition.\n *\n * @param pubsubMessage Pub/Sub message AST node.\n */\n public void visitPubsubMessage(PubsubMessage pubsubMessage);\n\n /**\n * Visits a single rule.\n *\n * @param rule Rule AST node.\n */\n public void visitRule(Rule rule);\n\n /**\n * Visits function definition.\n *\n * @param function Function AST node.\n */\n public void visitFunction(Function function);\n\n /**\n * Visits parameter definition.\n *\n * @param parameter Parameter AST node.\n */\n public void visitParameter(Parameter parameter);\n\n /**\n * Visits expression.\n *\n * @param expresssion Expression AST node.\n */\n public void visitExpression(Expression expresssion);\n\n /**\n * Visits type reference.\n *\n * @param typeReference Type reference AST node.\n */\n public void visitTypeReference(TypeReference typeReference);\n\n /**\n * Visits type instantiation.\n *\n * @param typeInstantiation Type instantiation AST node.\n */\n public void visitTypeInstantiation(TypeInstantiation typeInstantiation);\n\n /**\n * Visits array type.\n *\n * @param arrayType Array type AST node.\n */\n public void visitArrayType(ArrayType arrayType);\n\n /**\n * Visits reference to built-in standard integer type.\n *\n * @param stdIntegerType Standard integer type AST node.\n */\n public void visitStdIntegerType(StdIntegerType stdIntegerType);\n\n /**\n * Visits reference to built-in variable length integer type.\n *\n * @param varIntegerType Variable length integer type AST node.\n */\n public void visitVarIntegerType(VarIntegerType varIntegerType);\n\n /**\n * Visits reference to built-in fixed bit field type.\n *\n * @param fixedBitFieldType Fixed bit field type AST node.\n */\n public void visitFixedBitFieldType(FixedBitFieldType fixedBitFieldType);\n\n /**\n * Visits reference to built-in dynamic bit field type.\n *\n * @param dynamicBitFieldType Dynamic bit field type AST node.\n */\n public void visitDynamicBitFieldType(DynamicBitFieldType dynamicBitFieldType);\n\n /**\n * Visits reference to built-in boolean type.\n *\n * @param booleanType Boolean type AST node.\n */\n public void visitBooleanType(BooleanType booleanType);\n\n /**\n * Visits reference to built-in bytestype.\n *\n * @param bytesType Bytes type AST node.\n */\n public void visitBytesType(BytesType bytesType);\n\n /**\n * Visits reference to built-in string type.\n *\n * @param stringType String type AST node.\n */\n public void visitStringType(StringType stringType);\n\n /**\n * Visits reference to built-in float type.\n *\n * @param floatType Float type AST node.\n */\n public void visitFloatType(FloatType floatType);\n\n /**\n * Visits reference to built-in extern type.\n *\n * @param externType Extern type AST node.\n */\n public void visitExternType(ExternType externType);\n\n /**\n * Visits template parameter.\n *\n * @param templateParameter Template parameter AST node.\n */\n public void visitTemplateParameter(TemplateParameter templateParameter);\n\n /**\n * Visits template argument.\n *\n * @param templateArgument Template argument AST node.\n */\n public void visitTemplateArgument(TemplateArgument templateArgument);\n\n /**\n * Visits template instantiation.\n *\n * @param instantiateType Instantiate type AST node.\n */\n public void visitInstantiateType(InstantiateType instantiateType);\n\n /**\n * Visits a classic-style documentation comment.\n *\n * @param docComment Classic-style documentation comment AST node.\n */\n public void visitDocCommentClassic(DocCommentClassic docComment);\n\n /**\n * Visits a markdown-style documentation comment.\n *\n * @param docComment Markdown-style documentation comment AST node.\n */\n public void visitDocCommentMarkdown(DocCommentMarkdown docComment);\n\n /**\n * Visits documentation paragraph.\n *\n * @param docParagraph Documentation paragraph AST node.\n */\n public void visitDocParagraph(DocParagraph docParagraph);\n\n /**\n * Visits documentation element.\n *\n * @param docElement Documentation element AST node.\n */\n public void visitDocElement(DocElement docElement);\n\n /**\n * Visits documentation multiline.\n *\n * @param docMultiline Documentation multiline AST node.\n */\n public void visitDocMultiline(DocMultiline docMultiline);\n\n /**\n * Visits a see tag within a documentation comment.\n *\n * @param docTagSee See tag AST node.\n */\n public void visitDocTagSee(DocTagSee docTagSee);\n\n /**\n * Visits a todo tag within a documentation comment.\n *\n * @param docTagTodo Todo tag AST node.\n */\n public void visitDocTagTodo(DocTagTodo docTagTodo);\n\n /**\n * Visits a param tag within a documentation comment.\n *\n * @param docTagParam Param tag AST node.\n */\n public void visitDocTagParam(DocTagParam docTagParam);\n\n /**\n * Visits a deprecated tag within a documentation comment.\n *\n * @param docTagDeprecated Deprecated tag AST node.\n */\n public void visitDocTagDeprecated(DocTagDeprecated docTagDeprecated);\n\n /**\n * Visits a single line of documentation.\n *\n * @param docLine Documentation line AST node.\n */\n public void visitDocLine(DocLine docLine);\n\n /**\n * Visits documentation text wrapper.\n *\n * DocLineElement can be either a text or a see tag.\n *\n * @param docLineElement Documentation line element AST node.\n */\n public void visitDocLineElement(DocLineElement docLineElement);\n\n /**\n * Visits documentation text.\n *\n * @param docText Documentation text AST node.\n */\n public void visitDocText(DocText docText);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the siac r variazione stato.
public SiacRVariazioneStato addSiacRVariazioneStato(SiacRVariazioneStato siacRVariazioneStato) { getSiacRVariazioneStatos().add(siacRVariazioneStato); siacRVariazioneStato.setSiacTEnteProprietario(this); return siacRVariazioneStato; }
[ "public void setSiacRVariazioneStatos(List<SiacRVariazioneStato> siacRVariazioneStatos) {\n\t\tthis.siacRVariazioneStatos = siacRVariazioneStatos;\n\t}", "public SiacRVariazioneAttr addSiacRVariazioneAttr(SiacRVariazioneAttr siacRVariazioneAttr) {\n\t\tgetSiacRVariazioneAttrs().add(siacRVariazioneAttr);\n\t\tsiacRVariazioneAttr.setSiacTEnteProprietario(this);\n\n\t\treturn siacRVariazioneAttr;\n\t}", "public SiacTVariazione addSiacTVariazione(SiacTVariazione siacTVariazione) {\n\t\tgetSiacTVariaziones().add(siacTVariazione);\n\t\tsiacTVariazione.setSiacTEnteProprietario(this);\n\n\t\treturn siacTVariazione;\n\t}", "public void aggiornaStato() {\n switch (this.stato) {\n case \"IN_PREPARAZIONE\":\n this.stato = \"IN_TRANSITO\";\n break;\n case \"IN_TRANSITO\":\n Random rand = new Random();\n if (1 == rand.nextInt(3)) {\n this.stato = \"FALLITA\";\n break;\n }\n this.stato = \"RICEVUTA\";\n break;\n default:\n break;\n }\n }", "public SiacRBilElemStato addSiacRBilElemStato(SiacRBilElemStato siacRBilElemStato) {\n\t\tgetSiacRBilElemStatos().add(siacRBilElemStato);\n\t\tsiacRBilElemStato.setSiacTEnteProprietario(this);\n\n\t\treturn siacRBilElemStato;\n\t}", "protected void regolaViste() {\n /* variabili e costanti locali di lavoro */\n Vista unaVista;\n Campo unCampo;\n\n try { // prova ad eseguire il codice\n unaVista = this.getVista(VISTA_SIGLA);\n unCampo = unaVista.getCampo(CAMPO_SIGLA);\n unCampo.getCampoLista().setRidimensionabile(false);\n unCampo.setTitoloColonna(COLONNA_SIGLA);\n\n unaVista = this.getVista(VISTA_DESCRIZIONE);\n unCampo = unaVista.getCampo(CAMPO_DESCRIZIONE);\n unCampo.getCampoLista().setRidimensionabile(false);\n unCampo.setTitoloColonna(COLONNA_DESCRIZIONE);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void gestisciStatoRamo(Ramo ramoDaGestire, String nuovoStatoRamo);", "public SiacRBilStatoOp addSiacRBilStatoOp(SiacRBilStatoOp siacRBilStatoOp) {\n\t\tgetSiacRBilStatoOps().add(siacRBilStatoOp);\n\t\tsiacRBilStatoOp.setSiacTEnteProprietario(this);\n\n\t\treturn siacRBilStatoOp;\n\t}", "public void atualizarStatusSolicitacaoServicoSara() {\n\t\tList<SolicitacaoServico> solicitacoes = new ArrayList<>();\n\t\ttry {\n\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\tsolicitacoes = getSolicitacaoServicoDAO().getSolicitacaoServicoNaoFinalizadas();\n\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\n\t\tfor(SolicitacaoServico s : solicitacoes) {\n\t\t\tif(s.getStatusServicos() != StatusServicos.CRIA_OS_SARA) {\n\t\t\tString status = getSolicitacaoServicoDAO().getStatusServerSara(s.getSolicitacao().getNumeroATI(), s.getOS());\n\t\t\tif(status.equals(\"OS_GERADA\")) {\n\t\t\t\ts.setStatusServicos(StatusServicos.OS_GERADA);\n\t\t\t}else \n\t\t\t\tif(status.equals(\"OS_INICIADA\")) {\n\t\t\t\t\ts.setStatusServicos(StatusServicos.OS_INICIADA);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tif(status.equals(\"FINALIZADO\")) {\n\t\t\t\t\t\ts.setStatusServicos(StatusServicos.FINALIZADO);\n\t\t\t\t\t}\n\t\t\tgetDAO().beginTransaction();\n\t\t\talterar(s.getSolicitacao(), \"Alteração de Status do serviço\",s.getSolicitacao().getUltResponsavel());\n\t\t\tgetDAO().commitAndCloseTransaction();\n\t\t\t}\n\t\t\n\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public SiacDVariazioneStato addSiacDVariazoneStato(SiacDVariazioneStato siacDVariazoneStato) {\n\t\tgetSiacDVariazoneStatos().add(siacDVariazoneStato);\n\t\tsiacDVariazoneStato.setSiacTEnteProprietario(this);\n\n\t\treturn siacDVariazoneStato;\n\t}", "public void setStato(String stato) {\n this.stato = stato; }", "public List<SiacRVariazioneStato> getSiacRVariazioneStatos() {\n\t\treturn this.siacRVariazioneStatos;\n\t}", "public void aggiornaStatoOperativoVincolo(Vincolo vincolo, StatoOperativo statoOperativo) {\n\t\tSiacTVincolo siacTVincolo = siacTVincoloRepository.findOne(vincolo.getUid());\n\t\tList<SiacRVincoloStato> siacRVincoloStatos = siacTVincolo.getSiacRVincoloStatos();\n\t\tDate dataCancellazione = new Date();\n\t\tfor (SiacRVincoloStato siacRVincoloStato : siacRVincoloStatos) {\n\t\t\tif(siacRVincoloStato.getDataCancellazione()==null){\n\t\t\t\tsiacRVincoloStato.setDataCancellazione(dataCancellazione);\n\t\t\t\tsiacRVincoloStato.setDataFineValidita(dataCancellazione);\n\t\t\t}\n\t\t}\n\t\tSiacRVincoloStato siacRVincoloStato = new SiacRVincoloStato();\n\t\t//Integer enteId = ente.getUid();\n\t\tInteger enteId = siacTVincolo.getSiacTEnteProprietario().getUid();\n\t\tsiacRVincoloStato.setSiacDVincoloStato(eef.getEntity(SiacDVincoloStatoEnum.byStatoOperativo(statoOperativo), enteId, SiacDVincoloStato.class));\n\t\tsiacRVincoloStato.setDataModificaInserimento(new Date());\n\t\tsiacRVincoloStato.setSiacTEnteProprietario(siacTVincolo.getSiacTEnteProprietario() /*siacTEnteProprietario*/);\n\t\tsiacRVincoloStato.setSiacTVincolo(siacTVincolo);\n\t\tsiacRVincoloStato.setLoginOperazione(loginOperazione);\n\t\tsiacRVincoloStatos.add(siacRVincoloStato);\n\t\t\n\t}", "public SiacRSoggettoStato addSiacRSoggettoStato(SiacRSoggettoStato siacRSoggettoStato) {\n\t\tgetSiacRSoggettoStatos().add(siacRSoggettoStato);\n\t\tsiacRSoggettoStato.setSiacTEnteProprietario(this);\n\n\t\treturn siacRSoggettoStato;\n\t}", "public void soin(){\n this.vie += this.intelligence*2;\n //pour éviter que la vie depasse la limite\n if (this.vie > this.niveau*5) {\n this.vie = this.niveau*5;\n }\n System.out.println(this.getName()+\" utilise Soin et gagne \"+this.intelligence*2+\" en vitalité.\");\n }", "public void agregarASolucion(Vertice agregar){\n\t\tthis.conjunto.add(agregar);\n\t\tthis.peso += agregar.getPeso();\n\t\tthis.adyacencia[agregar.getNumero() -1]++;\n\n\t\tfor (Vertice vx : agregar.getVecinos()){\n\t\t\tthis.adyacencia[vx.getNumero() - 1]++;\n\t\t\tGlobal.comp++;\n\t\t}\n\t}", "public void setStato(java.lang.String stato) {\n\t\t_myLibrary.setStato(stato);\n\t}", "public SiacTParametroAzioneRichiesta addSiacTParametroAzioneRichiesta(SiacTParametroAzioneRichiesta siacTParametroAzioneRichiesta) {\n\t\tgetSiacTParametroAzioneRichiestas().add(siacTParametroAzioneRichiesta);\n\t\tsiacTParametroAzioneRichiesta.setSiacTEnteProprietario(this);\n\n\t\treturn siacTParametroAzioneRichiesta;\n\t}", "private static void iniciarVariaveis() {\n\t\tsetArch();\n\t\tsetSO();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the URL that describes the location of the Marketcetera Exchange server.
@DisplayName("The URL for the Marketcetera Exchange Server") public void setURL(@DisplayName("The URL for the Marketcetera Exchange Server") String inURL);
[ "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "void setURL(java.lang.String url);", "public void setConfigURL(String U) {\n properties.setProperty(\"URL\", U);\r\n }", "public static void setUrl() {\n\t\t// expetedUrl=\"https://delaware.craigslist.org\";\n\t\t// expetedUrl=\"https://mercari.com\";\n\t\texpetedUrl = \"https://spicejet.com\";\n\t}", "EasyRequest setUrl(String url);", "public abstract void setURL(String url);", "public void setServerUrl(String newUrl) {\n if(newUrl == null){\n return;\n }\n props.setProperty(\"url\", newUrl);\n saveProps();\n }", "public void setURL(String url);", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "public void setUrl(String url)\n\t{\n\t\tif (null == url)\t\t\t\t\t\tthrow new IllegalArgumentException(\"url can't be null.\");\n\t\tif (0 == url.length())\t\t\t\t\tthrow new IllegalArgumentException(\"url can't be empty.\");\n\t\tif (mConnectionPool.isInitialized())\tthrow new IllegalArgumentException(\"url can't be changed after the connection pool has been set up.\");\n\n\t\tmUrl = url;\n\t}", "public static void setUrl(String url) {\n\t\tif (atomikosRestPortUrl == null && url != null) { //cf case 181280\n\t\t\tatomikosRestPortUrl = url;\n\t\t\tif (!atomikosRestPortUrl.endsWith(\"/\")) \n\t\t\t\tatomikosRestPortUrl = atomikosRestPortUrl + \"/\";\n\t\t} \n\t}", "public void setURL(java.lang.String url)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(URL$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(URL$8);\n }\n target.setStringValue(url);\n }\n }", "IParser setServerBaseUrl(String theUrl);", "public void setUrl(String value) {\n url = value;\n }", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void setURL(java.lang.String URL)\n {\n this._URL = URL;\n }", "public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }", "void setFullUrl(String url);", "public static void SetUrl(String endPoint){\n url = hostName +\"/\"+endPoint;\n Logger.getLogger(Utilities.class.getName()).log(Level.INFO,url);\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column z_water_record.water_fee
public void setWaterFee(Integer waterFee) { this.waterFee = waterFee; }
[ "public Integer getWaterFee() {\n return waterFee;\n }", "public void setFee(int fee)\n {\n this.fee = fee;\n }", "public static native void CommitmentUpdate_set_update_fee(long this_ptr, long val);", "public void setBookingFee(double bookingFee)\r\n {\r\n this.bookingFee = bookingFee;\r\n }", "public void setFee(BigDecimal fee) {\r\n this.fee = fee;\r\n }", "public void setFee(BigDecimal fee) {\n this.fee = fee;\n }", "public VenTransactionFee persistVenTransactionFee(VenTransactionFee venTransactionFee);", "public void setWaterAtHome(double water){\n \n this.waterTot = water; \n \n }", "public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);", "public void changeFee (double newFee){\r\n\t\tthis.fee = newFee;\r\n\t}", "public void setRoyalty_cost(double royalty_cost);", "public void feeAssessment(){\n monthlyFee=monthlyFee+3;\n }", "public void setFat(double fat);", "void setFeePlanData(nc.itf.crd.webservice.izyhtwebservice.FeePlanDataDocument.FeePlanData feePlanData);", "public void setwPrFee(BigDecimal wPrFee) {\n this.wPrFee = wPrFee;\n }", "void setSettlementAmount(java.math.BigDecimal settlementAmount);", "public void setSetupFee(Integer setupFee) {\r\n this.setupFee = setupFee;\r\n }", "void setSettlement(x0101.oecdStandardAuditFileTaxPT1.SettlementDocument.Settlement settlement);", "public void setFineAmount(Double fineAmount);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert an integer to a boolean.
public static boolean intToBool(int v) { if (v == 0) return false; else return true; }
[ "public Boolean int_to_boolean(int arg){\r\n\t\tif (arg == 1)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "public static boolean toBoolean(int i){\n return ((i>0)?true:false);\n }", "boolean getConvertBoolToInt();", "public static boolean convertInt(int value)\n {\n return (value == 0 ? false : true);\n }", "public static boolean softToBoolean(Integer value) {\n return BooleanUtils.toBoolean(value == null ? new Integer(0) : value);\n }", "public static String convertIntegerToBooleanString(int i) \r\n {\r\n if(i==0)\r\n {\r\n return \"false\";\r\n }\r\n else\r\n {\r\n return \"true\";\r\n }\r\n }", "public static boolean byte2bool(byte x) {\n return x == 1;\n }", "boolean getBoolValue();", "public static Boolean softToBooleanObject(Integer value) {\n return BooleanUtils.toBooleanObject(value == null ? new Integer(0) : value);\n }", "public static boolean toPrimitiveBoolean(Boolean value) {\n if (value == null) {\n return false;\n }\n return value;\n }", "public boolean nextBoolean(){\r\n\t\treturn (nextInt() & 0x10) == 0;\r\n\t}", "public Boolean asBoolean() {\r\n\t\treturn DataConverterRegistry.convert(Boolean.class, value);\r\n\t}", "public boolean booleanValue();", "public boolean isValid(int intValue);", "Boolean createBoolean();", "public static boolean toBoolean(Boolean value)\r\n {\r\n return toBoolean(value, false);\r\n }", "boolean isSetToNumber();", "boolean hasInt32Value();", "Bool createBool();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "matrixRows" $ANTLR start "matrixColumns" CalcLab.g:172:1: matrixColumns returns [ArrayList value] :e1= expression ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression ) ;
public final ArrayList<Operand> matrixColumns() throws RecognitionException { ArrayList<Operand> value = null; ParserRuleReturnScope e1 =null; ParserRuleReturnScope e2 =null; try { // CalcLab.g:173:2: (e1= expression ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression )* ) // CalcLab.g:173:4: e1= expression ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression )* { value = new ArrayList<Operand>(); pushFollow(FOLLOW_expression_in_matrixColumns569); e1=expression(); state._fsp--; value.add((e1!=null?((CalcLabParser.expression_return)e1).value:null)); // CalcLab.g:175:4: ( ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression )* loop22: while (true) { int alt22=2; int LA22_0 = input.LA(1); if ( (LA22_0==ARGUMENTS_SEPARATOR||LA22_0==25) ) { alt22=1; } switch (alt22) { case 1 : // CalcLab.g:175:5: ( ' ' | ARGUMENTS_SEPARATOR ) e2= expression { if ( input.LA(1)==ARGUMENTS_SEPARATOR||input.LA(1)==25 ) { input.consume(); state.errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } pushFollow(FOLLOW_expression_in_matrixColumns588); e2=expression(); state._fsp--; value.add((e2!=null?((CalcLabParser.expression_return)e2).value:null)); } break; default : break loop22; } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { // do for sure before leaving } return value; }
[ "public final Operand matrixRows() throws RecognitionException {\n\t\tOperand value = null;\n\n\n\t\tArrayList<Operand> a1 =null;\n\t\tArrayList<Operand> a2 =null;\n\n\t\ttry {\n\t\t\t// CalcLab.g:166:2: (a1= matrixColumns ( EXPRESSIONS_SEPARATOR a2= matrixColumns )* )\n\t\t\t// CalcLab.g:166:4: a1= matrixColumns ( EXPRESSIONS_SEPARATOR a2= matrixColumns )*\n\t\t\t{\n\t\t\t ArrayList<Operand[]> argsList = new ArrayList<Operand[]>(); \n\t\t\tpushFollow(FOLLOW_matrixColumns_in_matrixRows530);\n\t\t\ta1=matrixColumns();\n\t\t\tstate._fsp--;\n\n\t\t\targsList.add(a1.toArray(new Operand[1]));\n\t\t\t// CalcLab.g:168:4: ( EXPRESSIONS_SEPARATOR a2= matrixColumns )*\n\t\t\tloop21:\n\t\t\twhile (true) {\n\t\t\t\tint alt21=2;\n\t\t\t\tint LA21_0 = input.LA(1);\n\t\t\t\tif ( (LA21_0==EXPRESSIONS_SEPARATOR) ) {\n\t\t\t\t\talt21=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt21) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// CalcLab.g:168:5: EXPRESSIONS_SEPARATOR a2= matrixColumns\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,EXPRESSIONS_SEPARATOR,FOLLOW_EXPRESSIONS_SEPARATOR_in_matrixRows539); \n\t\t\t\t\tpushFollow(FOLLOW_matrixColumns_in_matrixRows543);\n\t\t\t\t\ta2=matrixColumns();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t argsList.add(a2.toArray(new Operand[1])); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop21;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t value = operandFactory.createMatrix(argsList.toArray(new Operand[1][])); \n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn value;\n\t}", "java.lang.String getMatrix();", "List<T> column(int column);", "@Test\n public void testGetMatrixColumn() {\n final Matrix33d m = getMatrix();\n final Vector3d expected = V2;\n final Vector3d v = new Vector3d();\n m.getMatrixColumn(v, 1);\n assertEquals(v.toString(), expected.toString());\n }", "List<String> getColumns();", "public List<List<NitrogenBase>> getColumns() {\n\t\tList<List<NitrogenBase>> columns = new ArrayList<>();\n\t\tfor (int i = 0; i < matrixSize; i++) {\n\t\t\tfinal int col = i;\n\t\t\tcolumns.add(stream(sequence).map(o -> o[col]).collect(toList()));\n\t\t}\n\t\treturn columns;\n\t}", "public Vector sumOfColumns();", "@Test\r\n public void testColumns() {\r\n int expResult=2;\r\n int result=matrixA.columns();\r\n assertEquals(expResult, result);\r\n }", "void column(int column, List<T> values);", "public static Matrix parse(StringParser parser) {\n Token firstToken = parser.expect(\"{\");\n List<Vector> rows = new ArrayList<>();\n while (!parser.peekNotEof().getText().equals(\"}\")) {\n if (!rows.isEmpty()) {\n parser.expect(\",\");\n }\n Vector row = Vector.parse(parser);\n rows.add(row);\n if (row.getDimension() != rows.get(0).getDimension()) {\n throw new ParseException(\"Rows of matrix do not have equal dimension\", firstToken);\n }\n }\n parser.expect(\"}\");\n if (rows.isEmpty()) {\n throw new ParseException(\"Empty matrix\", firstToken);\n }\n Matrix mat = new Matrix(rows.size(), rows.get(0).getDimension());\n for (int i = 0; i < rows.size(); i++) {\n mat.setRow(i, rows.get(i));\n }\n return mat;\n }", "Matrix columnSum() {\n\t\tMatrix mcolsum = new Matrix(1, mat[0].length, 0);\n\n\t\t// Sum the columns of matrix mat into matrix mcolsum and return mcolsum\n\t\tfor (int i = 0; i < mat[0].length; i++) {\n\t\t\tfor (int j = 0; j < mat.length; j++) {\n\t\t\t\tmcolsum.mat[0][i] = mcolsum.mat[0][i] + mat[j][i];\n\t\t\t}\n\t\t}\n\t\treturn mcolsum;\n\t}", "public int getColumns() {\n\t\treturn this.matrixArray[0].length;\n\t}", "public final ProjectionParser.column_return column() throws RecognitionException {\n ProjectionParser.column_return retval = new ProjectionParser.column_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token width=null;\n Token IDENT11=null;\n ProjectionParser.type_return t =null;\n\n\n Object width_tree=null;\n Object IDENT11_tree=null;\n\n try {\n // /home/gvanvuuren/checkouts/SimpleSQL/om/src/main/antlr3/org.simplesql.om.projection/Projection.g:39:2: ( IDENT (t= type |t= type width= INTEGER ) )\n // /home/gvanvuuren/checkouts/SimpleSQL/om/src/main/antlr3/org.simplesql.om.projection/Projection.g:39:4: IDENT (t= type |t= type width= INTEGER )\n {\n root_0 = (Object)adaptor.nil();\n\n\n IDENT11=(Token)match(input,IDENT,FOLLOW_IDENT_in_column233); \n IDENT11_tree = \n (Object)adaptor.create(IDENT11)\n ;\n adaptor.addChild(root_0, IDENT11_tree);\n\n\n retval.col.setName((IDENT11!=null?IDENT11.getText():null)); retval.col.setOrder(orderCounter++);\n\n // /home/gvanvuuren/checkouts/SimpleSQL/om/src/main/antlr3/org.simplesql.om.projection/Projection.g:40:9: (t= type |t= type width= INTEGER )\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==13||(LA5_0 >= 15 && LA5_0 <= 16)||(LA5_0 >= 18 && LA5_0 <= 19)||(LA5_0 >= 21 && LA5_0 <= 22)) ) {\n int LA5_1 = input.LA(2);\n\n if ( ((LA5_1 >= 10 && LA5_1 <= 11)||LA5_1==24) ) {\n alt5=1;\n }\n else if ( (LA5_1==INTEGER) ) {\n alt5=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 5, 1, input);\n\n throw nvae;\n\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 5, 0, input);\n\n throw nvae;\n\n }\n switch (alt5) {\n case 1 :\n // /home/gvanvuuren/checkouts/SimpleSQL/om/src/main/antlr3/org.simplesql.om.projection/Projection.g:40:10: t= type\n {\n pushFollow(FOLLOW_type_in_column249);\n t=type();\n\n state._fsp--;\n\n adaptor.addChild(root_0, t.getTree());\n\n retval.col.setType((t!=null?input.toString(t.start,t.stop):null));\n\n }\n break;\n case 2 :\n // /home/gvanvuuren/checkouts/SimpleSQL/om/src/main/antlr3/org.simplesql.om.projection/Projection.g:42:10: t= type width= INTEGER\n {\n pushFollow(FOLLOW_type_in_column279);\n t=type();\n\n state._fsp--;\n\n adaptor.addChild(root_0, t.getTree());\n\n width=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_column283); \n width_tree = \n (Object)adaptor.create(width)\n ;\n adaptor.addChild(root_0, width_tree);\n\n\n retval.col.setType((t!=null?input.toString(t.start,t.stop):null)); retval.col.setWidth(Integer.parseInt((width!=null?width.getText():null)));\n\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "Variable[] allColumns();", "public ArrayList<String> getMatrixes() {\n ArrayList<String> matrixes = new ArrayList<>();\n getData(matrixes, \"getMatrixes\");\n return matrixes;\n }", "public ItemMatrix getMatrix();", "public static List getCellList(Cell[][] matrix) {\r\n if (matrix.length == 0)\r\n return Collections.EMPTY_LIST;\r\n int rows = matrix.length;\r\n int cols = matrix[0].length;\r\n List list = new ArrayList(rows * cols);\r\n for (int row = 0; row < rows; row++) {\r\n for (int col = 0; col < cols; col++) {\r\n list.add(matrix[row][col]);\r\n }\r\n }\r\n return list;\r\n }", "int getColumns();", "List<Column> getQueryColumns();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets random shortcuts and returns them in Map (Set (String (shortcut)) > String (action name)).
private Map<Set<String>,ShortcutAction> setRandomShortcuts(final MutableShortcutsModel model) { final int[] ii = {1}; final Map<Set<String>,ShortcutAction> result = new HashMap<Set<String>,ShortcutAction>(); System.out.println("set random shortcuts"); forAllActions (model, new R () { public void run (MutableShortcutsModel model, ShortcutAction action) { String shortcut = Integer.toString (ii [0], 36).toUpperCase (); StringBuffer sb = new StringBuffer (); int i, k = shortcut.length (); for (i = 0; i < k; i++) sb.append (shortcut.charAt (i)).append (' '); shortcut = sb.toString ().trim (); Set<String> s = Collections.singleton (shortcut); model.setShortcuts (action, s); result.put (s, action); //System.out.println (s + " : " + action); ii [0] ++; } }); return result; }
[ "private Map<Set<String>,ShortcutAction> getShortcuts(final MutableShortcutsModel model) {\n final Map<Set<String>,ShortcutAction> result = new HashMap<Set<String>,ShortcutAction>();\n System.out.println(\"get shortcuts\");\n forAllActions (model, new R () {\n public void run (MutableShortcutsModel model, ShortcutAction action) {\n String[] sh = model.getShortcuts (action);\n if (sh.length == 0) return;\n Set<String> shortcuts = new HashSet<String>(Arrays.asList(sh));\n //System.out.println(\"sh: \" + shortcuts + \" : \" + action);\n assertFalse (\"Same shortcuts assigned to two actions \", result.containsKey (shortcuts));\n result.put (shortcuts, action);\n }\n });\n return result;\n }", "protected abstract void registerShortcuts();", "public Map<String, List<AWTKeyStroke>> getGlobalShortcutFromConfiguration();", "public List<Shortcut> getShortcuts() {\n if (shortcuts == null) {\n shortcuts = new ArrayList<Shortcut>();\n }\n return shortcuts;\n\n }", "private void bindShortcuts(Map<Object, Object> shortcuts) {\n for (Object commandName : shortcuts.keySet()) {\n bindShortcuts(commandName.toString(), shortcuts.get(commandName).toString());\n }\n }", "private void setupShortcuts(){\r\n\t\troot.setOnKeyPressed(new EventHandler<KeyEvent>(){\r\n\t\t\tpublic void handle(KeyEvent e) {\r\n\t\t\t\tlog.log(Level.INFO, \"Executing shortcut key...\");\r\n\t\t\t\tif (nextPage.match(e)) {\r\n\t\t\t\t\tlog.log(Level.INFO, \"Pressing ctrl + right...\");\r\n\t\t\t\t\tchangeToSecondPage();\r\n\t\t\t\t} else if (backPage.match(e)){\r\n\t\t\t\t\tlog.log(Level.INFO, \"Pressing ctrl + left...\");\r\n\t\t\t\t\tchangeToFirstPage();\r\n\t\t\t\t} else if (Common.esc.match(e)){\r\n\t\t\t\t\tlog.log(Level.INFO, \"Pressing esc for help page...\");\r\n\t\t\t\t\thelpStage.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void addShortcut() {\n Intent shortcutIntent = new Intent(getApplicationContext(), HomeActivity.class);\n shortcutIntent.setAction(Intent.ACTION_MAIN);\n Intent addIntent = new Intent();\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,\n Intent.ShortcutIconResource.fromContext(getApplicationContext(),\n R.drawable.laundry));\n addIntent.putExtra(\"duplicate\", false);\n addIntent.setAction(\"com.android.launcher.action.INSTALL_SHORTCUT\");\n getApplicationContext().sendBroadcast(addIntent);\n sessionManager.setUp(true);\n Log.d(TAG, \"addShortcut: finish ----> \" + sessionManager.isSetUp());\n }", "ActionMap createActionMap() {\n ActionMap map = new ActionMapUIResource();\n Action[] actions = editor.getActions();\n //System.out.println(\"building map for UI: \" + getPropertyPrefix());\n int n = actions.length;\n for (int i = 0; i < n; i++) {\n Action a = actions[i];\n map.put(a.getValue(Action.NAME), a);\n //System.out.println(\" \" + a.getValue(Action.NAME));\n }\n map.put(TransferHandler.getCutAction().getValue(Action.NAME),\n TransferHandler.getCutAction());\n map.put(TransferHandler.getCopyAction().getValue(Action.NAME),\n TransferHandler.getCopyAction());\n map.put(TransferHandler.getPasteAction().getValue(Action.NAME),\n TransferHandler.getPasteAction());\n return map;\n }", "public Map<String,String> getActionTaken();", "private void readKeymap(String profile, String mimeType, boolean defaults, Map<ShortcutAction, Set<String>> map) {\n // 1) get list of MultiKeyBindings\n KeyBindingSettingsFactory kbs = getKeyBindingSettings(mimeType);\n if (kbs == null) {\n return;\n }\n List<MultiKeyBinding> keyBindings = defaults ? kbs.getKeyBindingDefaults(profile) : kbs.getKeyBindings(profile);\n if (keyBindings == null) {\n return;\n }\n // 2) create Map (String (action name) > Set (String (shortcut)))\n Map<String, Set<String>> actionNameToShortcuts = convertKeymap(keyBindings);\n\n // 3) create Map (EditorAction > Set (String (shortcut)))\n for (Map.Entry<String, Set<String>> entry : actionNameToShortcuts.entrySet()) {\n String actionName = entry.getKey();\n Set<String> keyStrokes = entry.getValue();\n ShortcutAction action = (ShortcutAction) getEditorActionsMap ().get (actionName);\n if (action == null) {\n if (LOG.isLoggable(Level.FINE)) {\n LOG.fine(\"action not found \" + actionName); //NOI18N\n }\n continue;\n }\n Set<String> s = map.get(action);\n if (s == null) {\n s = new HashSet<String>();\n map.put(action, s);\n }\n s.addAll(keyStrokes);\n }\n }", "public int getShortcuts() {\n return shortcutCount;\n }", "public CommandRegistry(Map<Object, Object> shortcuts) {\n super();\n bindShortcuts(shortcuts);\n }", "private void initShortcut(){\n\t\tthis.btnSetManaCost.setMnemonic( KeyEvent.VK_M );\n\t}", "public String getShortcut()\n {\n\treturn shortcut;\n }", "public Map<String,String> getActionAdvised();", "private void assignKeyboardShortcutIntent() {\n final PreferenceGroup category =\n (PreferenceGroup) findPreferenceByResId(\n R.string.pref_category_miscellaneous_key);\n final Preference keyboardShortcutPref = findPreferenceByResId(\n R.string.pref_category_manage_keyboard_shortcut_key);\n\n if ((category == null) || (keyboardShortcutPref == null)) {\n return;\n }\n\n if (Build.VERSION.SDK_INT < KeyComboManager.MIN_API_LEVEL) {\n category.removePreference(keyboardShortcutPref);\n return;\n }\n\n final Intent labelManagerIntent = new Intent(this,\n ScreenSpeakKeyboardShortcutPreferencesActivity.class);\n labelManagerIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n labelManagerIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n keyboardShortcutPref.setIntent(labelManagerIntent);\n }", "private Map<String, TestAction> getActions(Template template, S sheet, TestWriter testWriter) throws IOException {\n Map<String, TestAction> actionMap = new HashMap<>();\n\n List<TestFlow> testFlows = getTestFlows(template, sheet, null, testWriter, \"%ACTION_\");\n for (TestFlow testFlow : testFlows) {\n TestAction testAction = new TestAction();\n testAction.setNo(testFlow.getNo());\n testAction.setName(testFlow.getName());\n testAction.setDescription(testFlow.getDescription());\n testAction.setTestSteps(testFlow.getTestSteps());\n actionMap.put(testFlow.getName(), testAction);\n }\n\n return actionMap;\n }", "protected ActionMap createActionMap() {\n ActionMap map = (ActionMap)UIManager.get(\"ScrollPane.actionMap\");\n\n map.put(\"edit\", mxGraphActions.getEditAction());\n map.put(\"delete\", mxGraphActions.getDeleteAction());\n map.put(\"home\", mxGraphActions.getHomeAction());\n map.put(\"enterGroup\", mxGraphActions.getEnterGroupAction());\n map.put(\"exitGroup\", mxGraphActions.getExitGroupAction());\n map.put(\"collapse\", mxGraphActions.getCollapseAction());\n map.put(\"expand\", mxGraphActions.getExpandAction());\n map.put(\"toBack\", mxGraphActions.getToBackAction());\n map.put(\"toFront\", mxGraphActions.getToFrontAction());\n map.put(\"selectNone\", mxGraphActions.getSelectNoneAction());\n map.put(\"selectAll\", mxGraphActions.getSelectAllAction());\n map.put(\"selectNext\", mxGraphActions.getSelectNextAction());\n map.put(\"selectPrevious\", mxGraphActions.getSelectPreviousAction());\n map.put(\"selectParent\", mxGraphActions.getSelectParentAction());\n map.put(\"selectChild\", mxGraphActions.getSelectChildAction());\n map.put(\"cut\", TransferHandler.getCutAction());\n map.put(\"copy\", TransferHandler.getCopyAction());\n map.put(\"paste\", TransferHandler.getPasteAction());\n map.put(\"group\", mxGraphActions.getGroupAction());\n map.put(\"ungroup\", mxGraphActions.getUngroupAction());\n map.put(\"zoomIn\", mxGraphActions.getZoomInAction());\n map.put(\"zoomOut\", mxGraphActions.getZoomOutAction());\n\n return map;\n }", "public void onAddShortcutPressed() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(R.string.alertdialog_title_shortcutcheck);\n builder.setMessage(R.string.alertdialog_text_shortcutcheck);\n\n builder.setPositiveButton(R.string.alertdialog_button_looksgood, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Create ShortcutManager class\n ShortcutManager shortcutManager = getSystemService(ShortcutManager.class);\n ShortcutInfo shortcut = new ShortcutInfo.Builder(MainActivity.this, \"pinned-shortcut\")\n .setShortLabel(getResources().getString(R.string.shortcut_title_quicksend))\n .setLongLabel(getResources().getString(R.string.shortcut_desc_quicksend))\n .setIcon(Icon.createWithResource(MainActivity.this, R.mipmap.launch_quick_send))\n .setIntent(new Intent(MainActivity.this, QuickSendActivity.class).setAction(\"QUICK_SEND_SHORTCUT\"))\n .build();\n\n shortcutManager.setDynamicShortcuts(Arrays.asList(shortcut));\n\n if (shortcutManager.isRequestPinShortcutSupported()) {\n ShortcutInfo pinShortcutInfo = new ShortcutInfo\n .Builder(MainActivity.this, \"pinned-shortcut\")\n .build();\n Intent pinnedShortcutCallbackIntent =\n shortcutManager.createShortcutResultIntent(pinShortcutInfo);\n\n //get the callback of the shortcut\n PendingIntent successCallback = PendingIntent.getBroadcast(MainActivity.this, 0,\n pinnedShortcutCallbackIntent, 0);\n shortcutManager.requestPinShortcut(pinShortcutInfo, successCallback.getIntentSender());\n\n }\n\n finishAndRemoveTask(); // Close app (to prevent caching bugs)\n\n }\n });\n builder.setNegativeButton(R.string.alertdialog_button_checkagain, null);\n builder.create().show();\n }\n else {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(R.string.alertdialog_title_error);\n builder.setMessage(R.string.alertdialog_text_unsupported_android8);\n\n builder.setPositiveButton(R.string.alertdialog_button_ok, null);\n builder.create().show();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the report phrase.
public String getReportPhrase () { return "with author"; }
[ "public String getReportPhrase () {\n\t\treturn \"in\";\n\t}", "public String getReport() {\n return reportDoc.toString();\n }", "public String getReport();", "public String getPhrase() {\n return this.phrase;\n }", "public String getReportDescription()\n {\n return reportDescription;\n }", "public String getReportTitle() {\r\n return reportTitle;\r\n }", "public String getReport() {\r\n\t\t\r\n\t\tMap<String, Driver> drivers = MainApp.getDrivers();\r\n\t\t\r\n\t\t// Collect information needed for report. Use queue to sort by desired measure (see ReportInformation.getComparingValue())\r\n\t\tPriorityQueue<ReportInformation> queue = new PriorityQueue<ReportInformation>(drivers.keySet().size());\r\n\t\tfor (String name : drivers.keySet()) {\r\n\t\t\tDriver driver = drivers.get(name);\r\n\t\t\tqueue.add(getInformation(driver));\r\n\t\t}\r\n\t\t\r\n\t\tString report = \"\";\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\treport += queue.poll().toString() + System.lineSeparator();\r\n\t\t}\r\n\t\t\r\n\t\treturn report;\r\n\t}", "public String getReportDetail () {\n return reportDetail;\n }", "public String getLastReport() {\n return mReport;\n }", "public String getCurrentPhrase() {\r\n \t //TODO\r\n \t return null;\r\n }", "public java.lang.String getReportCode () {\n\t\treturn reportCode;\n\t}", "public String toString() {\n return report;\n }", "public String getReportname() {\n return reportname;\n }", "public final String getKbideReport() {\n checkVerified();\n return kbideReport;\n }", "public String getRecordText();", "public String getReportID() {\r\n\t\treturn lookupValue(Params.REPORT_ID);\r\n\t}", "public String getPhrase(String sentencePhraseID){\n\t\t// implement me!\n\t\treturn \" \";\n\t}", "public String getNomeReport() {\r\n\t\treturn nomeReport;\r\n\t}", "public java.lang.String getRequisitionReport() {\n return requisitionReport;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when logoimageview clik open implicit intent
public void imageclick(View view) { //for logo image upload Intent i =new Intent(); i.setType("image/*"); i.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(i,"select an image"),imagerequestcode); }
[ "protected void logoOnlick(View view){\n startActivity(new Intent(this, CaloryIntakeActivity.class));\n finish();\n }", "protected void logoOnlick(View view) {\n startActivity(new Intent(this, CaloryIntakeActivity.class));\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://facerecognition.twidel.nl\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t\tLog.d(TAG, \"Click on drunkenhamster uber logo button\");\t\t\t\t\n\t\t\t}", "public void openImage(View view){\n Intent intent = new Intent(this, DisplayImageActivity.class);\n startActivity(intent);\n }", "public void viewImageButton (View view) {\n\n // user wants an adult image :)\n if (this.mature) {\n Intent intent = new Intent(this, Adult.class);\n startActivity(intent);\n return;\n }\n\n // regular non 18 image\n Intent intent = new Intent(this, Image.class);\n startActivity(intent);\n }", "@Override\r\n public void onImageClickListner(int position, String value) {\n Intent intent = new Intent(getContext(), FullscreenActivity.class);\r\n intent.putExtra(\"img link\", value);\r\n startActivity(intent);\r\n\r\n\r\n }", "@Override\n public void onClick(View view)\n {\n openImagesActivity();\n }", "public void onLoadImageClick(View view) {\n startActivityForResult(getPickImageChooserIntent(), 200);\n }", "@Override\n public void onClick(View view) {\n imageView.buildDrawingCache();\n Bitmap image = imageView.getDrawingCache();\n\n Bundle extras = new Bundle();\n extras.putParcelable(\"IMAGE\", image);\n\n Intent intent = new Intent(itemView.getContext(), ImageActivity.class);\n intent.putExtras(extras);\n itemView.getContext().startActivity(intent);\n }", "public void sendSelectImageIntent(Intent intent) { startActivityForResult(intent, IntentRequestCode.SELECT_IMAGE.code); }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "public void OnPhotos (View View)\n {\n \tIntent intent = new Intent(this, EditPhotos.class);\n \tintent.putExtra(EXTRA_URI, uri);\n \t\tstartActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent i = PhotoPageActivity\n .newIntent(getActivity(), mItem.getPhotoPageUri());\n startActivity(i);\n }", "public void clickOnMyntraLogo() {\n\t\tobjAndroidGenericMethods.clickOnAndroidElement(getMyntralogo(), \"Myntralogo\");\n\t}", "@Override\n public void onClick(View view) {\n Intent i = FlickrPageActivity.newIntent(getActivity(), mFlickrItem.getFlickrPageUri());\n startActivity(i);\n }", "void onImageTapped();", "public void startImageViewActivity(View view) {\n\t\tIntent intent = new Intent(this, ImageViewActivity.class);\n\t\tintent.putExtra(\"id\", photo.getId());\n\t\tstartActivity(intent);\n\t}", "@Override\n public void onClick(View v) {\n\n Intent i = new Intent(getContext() , ImagePreferenceActivity.class);\n startActivity(i);\n }", "@Override\n public void onImgClick(int pos, int reviewPos) {\n startPreviewImgActivity(pos, reviewPos);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test is there is at least one child which is aligned. Non recursive fonction.
private boolean hasChildAligned(DefaultMutableTreeNode node, int number) { Enumeration<DefaultMutableTreeNode> allSubNodes = node.breadthFirstEnumeration(); while(allSubNodes.hasMoreElements()) { // Le noeud "node" en parametre est inclu dans la boucle, donc je m'auto-test dans la foulée DefaultMutableTreeNode subNode = allSubNodes.nextElement(); Object userObject = subNode.getUserObject(); if(userObject instanceof TreeNodeOntologyObject) { TreeNodeOntologyObject nodeObject = (TreeNodeOntologyObject)userObject; if(number == 1 && alignment.alignExist1((ONTORES1)nodeObject.getConcept())) { return true; } if(number == 2 && alignment.alignExist2((ONTORES2)nodeObject.getConcept())) { return true; } } } return false; }
[ "private boolean correctlyAligned(NodeAlignment newAlignment,\n\t\t\tList<DrawMindMap> children) {\n\t\tif (newAlignment == NodeAlignment.TOP || newAlignment == NodeAlignment.BOTTOM) {\n\t\t\tfor (int i = 1; i < children.size(); i++) {\n\t\t\t\tint rightOfLeft = children.get(i - 1).rectangle.getRight();\n\t\t\t\tint leftOfRight = children.get(i).rectangle.getLeft();\n\n\t\t\t\tint distance = leftOfRight - rightOfLeft;\n\t\t\t\tif (Math.abs(distance - marginLeft(newAlignment, children.size() - 1)) > 3) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i = 1; i < children.size(); i++) {\n\t\t\t\tint bottomOfTop = children.get(i - 1).rectangle.getBottom();\n\t\t\t\tint topOfBottom = children.get(i).rectangle.getTop();\n\n\t\t\t\tint distance = topOfBottom - bottomOfTop;\n\t\t\t\tif (Math.abs(distance - marginTop(newAlignment, children.size() - 1)) > 3) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean hasParentAligned(DefaultMutableTreeNode node, int number) {\n\t\tif(node == null) return false;\n\t\tObject userObject = node.getUserObject();\n\t\tif(userObject instanceof TreeNodeOntologyObject) {\n\t\t\tTreeNodeOntologyObject nodeObject = (TreeNodeOntologyObject)userObject;\n\t\t\tif(number == 1 && alignment.alignExist1((ONTORES1)nodeObject.getConcept())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(number == 2 && alignment.alignExist2((ONTORES2)nodeObject.getConcept())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tDefaultMutableTreeNode parent = (DefaultMutableTreeNode)node.getParent();\n\t\treturn hasParentAligned(parent, number);\n\t}", "public boolean isAligned() {\n\t\treturn isXAligned() && isYAligned();\n\t}", "public boolean isNodeAligned()\r\n\t{\r\n\t\treturn isAligned;\r\n\t}", "boolean hasAligning();", "public boolean isAligned() {\n return alignedX != null && alignedY != null &&\n alignedX.length() == alignedY.length();\n }", "private boolean hasLeftChild(int index) {\n return leftChild(index) <= size;\n }", "private boolean hasLeftChild(int index) {\n\t\treturn leftChild(index) <= size;\n\t}", "public boolean isNodeAligned(NodeAlignmentType type)\r\n\t{\r\n\t\tSet<ParseNode> alignedNodes = alignedTo.get(type.getIndex());\r\n\t\t\r\n\t\treturn alignedNodes != null && !alignedNodes.isEmpty();\r\n\t}", "public final boolean isChildrenLayoutNecessary() {\n return isStatusBitsNonZero(CHILDREN_LAYOUT_NECESSARY_BIT);\n }", "public boolean hasLeftChild();", "private boolean _hasChild() {\r\n boolean ret = false;\r\n if (_childs != null && _childs.size() > 0) {\r\n ret = true;\r\n }\r\n\r\n return ret;\r\n }", "public boolean isAligned() {\r\n \t\tPointerIO<T> io = getIO();\r\n if (io == null)\r\n throw new RuntimeException(\"Cannot check alignment without a properly defined targetType\");\r\n \r\n return isAligned(io.getTargetAlignment());\r\n \t}", "public boolean isAligned(int alignment) {\r\n \t\tif (!hasPeer())\r\n \t\t\treturn true;\r\n \t\treturn isAligned(getPeer(), alignment);\r\n \t}", "public boolean isAligned(){\n\t\treturn alignmentMatrix != null;\n\t}", "boolean hasChildren();", "private void setPaddingIfHasChildren() {\n\t\tInsets padding = new Insets(0);\n\t\tif (!infoViewLayout.getChildren().isEmpty()) {\n\t\t\tpadding = new Insets(5);\n\t\t}\n\t\tinfoViewLayout.setPadding(padding);\n\t}", "boolean hasChildNodes();", "boolean checkOrder () throws RootE {\n\t// TODO\n boolean result = true;\n\t for(int i = 0; i >= size; i++){\n\t if(getValue(size-i) > getValue(getDAncestorIndex(size-i))) {\n\t result = true;\n } else {\n\t return false;\n }\n }\n\t return result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add charge count method
public TrnChargeCount addChargeCount(TrnChargeCount chargeCount){ return chargeCountDao.addChargeCount(chargeCount); }
[ "public List<TrnChargeCount> listChargeCount(){\r\n\t\treturn chargeCountDao.listChargeCount();\r\n\t}", "Charge(){\n\n\t}", "public void addCharge(double chargeAmount) {\n balance -= chargeAmount;\n\n }", "public void incrementChargeNumber() {\r\n mesh.incrementChargeNumber(myIndex);\r\n }", "int getS2CCardAwardCount();", "public static int NumChargeableCards() {\n int num = 0;\n HashMap<Integer, Card> cards = CardManager.getCardManager().getAllCards();\n\n if (!cards.isEmpty()) {\n for (Integer key : cards.keySet()) {\n if (cards.get(key) instanceof Chargeable) {\n num += 1;\n }\n }\n }\n return num;\n }", "int getBuyCount();", "public BigDecimal getCharge() {\n return charge;\n }", "public double remainingCharge();", "int getGCount();", "private float calcTotalCharge() {\n\n Float total = 0.0f;\n Iterator itr = subsList.iterator();\n while (itr.hasNext()) {\n Subscription x = (Subscription) itr.next();\n total = total + x.getAmount();\n }\n return total;\n }", "int getRenewalCount();", "int getDonatoriCount();", "public String charge() {\r\n return \"Transaction has been processed!:Chargers were apllied to your account\";\r\n }", "private Count() {}", "private void incrementUsageCount() {\n usageCount++;\n }", "int getStardustCostCount();", "public void increaseCourseCount(){}", "public void getChargedUp(){\n setChargePercent(100);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The operation that the specified job is configured to run on the objects listed in the manifest.
public void setOperation(JobOperation operation) { this.operation = operation; }
[ "public JobOperation getOperation() {\n return this.operation;\n }", "public IModifiableMultiEntryOperation getActualOperation();", "public Dsjob getJobObject() { return job; }", "java.lang.String getJob();", "public abstract Utility.Job getJob();", "public interface OperationJobExtendedInfo {\n /**\n * Gets the jobId property: Arm Id of the job created for this operation.\n *\n * @return the jobId value.\n */\n String jobId();\n\n /**\n * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner object.\n *\n * @return the inner object.\n */\n OperationJobExtendedInfoInner innerModel();\n}", "SarlAction getSarlAction(JvmOperation jvmOperation);", "public void setJob(String job) {\r\n\t\t\tthis.job = job;\r\n\t\t}", "public Operation getOperation();", "public String getJob() {\r\n return job;\r\n }", "public void setJob(String job) {\n\t\tthis.job = job;\n\t}", "RestApiJobInfo getRestAPIJobInfo(String namespace, String jobName) throws SaturnJobConsoleException;", "public void jobChangeExtra() {\n\t}", "public JobManifest getManifest() {\n return this.manifest;\n }", "java.lang.String getImportJob();", "public String getJob() {\n\t\treturn this.job;\n\t}", "public String getJob() {\n return job;\n }", "OperationJobExtendedInfoInner innerModel();", "java.lang.String getOperation();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursively computes plan quality as number of inconsistencies + weighted value for nonpersistent steps in a level + recursive cost calculation for unsupported preconditions.
private int calculateQuality() { int quality = inconsistencyCount; /* found solution */ if (inconsistencyCount == 0) return 0; /* add cost for each unsupported precondition*/ for(InconsistencyIterator iterator = new InconsistencyIterator(); iterator.hasNext();) { LPGInconsistency inconsistency = iterator.next(); quality += inconsistency.getCurrentLevel(); if (inconsistency instanceof UnsupportedPrecondition) { int currentLevel = inconsistency.getCurrentLevel(); PlanGraphLiteral unsupportedPrecondition = ((UnsupportedPrecondition) inconsistency).getUnsupportedPrecondition(); quality += costToSupport(unsupportedPrecondition, currentLevel); quality += inconsistency.getInitialLevel(); } } /* check steps, penalize levels with no real steps */ for( int i = 1; i < steps.size() - 1; i++) { boolean foundStep = false; for(Iterator<PlanGraphStep> it = steps.get(i).iterator(); it.hasNext();) { PlanGraphStep next = it.next(); if(!next.isPersistent()){ foundStep = true; break; } } // increase quality if we have found no real steps if (!foundStep) quality++; } return quality; }
[ "private int costToSupport(PlanGraphStep step, int currentLevel) {\n\t\t\n\t\tint cost = 0;\n\t\t\n\t\t/* make sure we can achieve step */\n\t\tif(step.getInitialLevel() != -1 && step.getInitialLevel() <= currentLevel) {\n\t\t\t\n\t\t\t/* cost of achieving a step is the max over the cost of achieving the preconditions */\n\t\t\tfor (PlanGraphLiteral precondition : step.getParentNodes()) {\n\t\t\t\tif (!isSupported(precondition, currentLevel - 1))\n\t\t\t\t\tcost = Math.max(cost, costToSupport(precondition, currentLevel - 1) + 1 );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tcost = Integer.MAX_VALUE;\n\t\t\n\t\treturn cost;\n\t}", "private int costToSupport(PlanGraphLiteral unsupportedPrecondition, int currentLevel) {\n\t\t\n\t\tint cost = Integer.MAX_VALUE;\n\t\t\n\t\t/* cost = 0 if part of initial conditions */\n\t\tif (currentLevel == 0 && unsupportedPrecondition.getInitialLevel() == 0)\n\t\t\tcost = 0;\n\t\telse if(isSupported(unsupportedPrecondition, currentLevel))\n\t\t\tcost = 0;\n\t\telse {\n\t\t\t/* cost of supporting this precondition is the cost of the cheapest step that supports it */\n\t\t\tfor (PlanGraphStep step : unsupportedPrecondition.getParentNodes()) {\n\t\t\t\tcost = Math.min(cost, costToSupport(step, currentLevel));\n\t\t\t}\n\t\t}\n\t\n\t\t\treturn cost;\n\t}", "public static void solve(int level) {\n int spaceNeeded, c;\n\n // if level == 0:\n // for owner in xrange(5):\n // if isAvailable[owner]:\n // isAvailable[owner] = False\n // for b in xrange(nBins):\n // bestEndCost[0][b] = endCost[owner][b]\n // solve(1)\n // isAvailable[owner] = True\n\n if (level == 0) {\n for (int o=0;o<5;o++) {\n isAvailable[o] = false;\n for (int b=0;b<nBins;b++)\n bestEndCost[0][b] = endCost[o][b];\n solve(1);\n isAvailable[o] = true;\n }\n }\n\n // elif level == 5:\n // for b in xrange(nBins):\n // if bestEndCost[4][b] < bestCost:\n // bestCost = bestEndCost[4][b]\n\n else if (level == 5) {\n for (int b=0;b<nBins;b++)\n if (bestEndCost[4][b] < bestCost)\n bestCost = bestEndCost[4][b];\n }\n\n // else:\n // for owner in xrange(5):\n // if isAvailable[owner]:\n // isAvailable[owner] = False\n // spaceNeeded = 0\n // for o2 in xrange(5):\n // if not isAvailable[o2]:\n // spaceNeeded += nPerOwner[o2]\n // for b in xrange(nBins):\n // bestEndCost[level][b] = inf\n // if b >= spaceNeeded - 1:\n // for b2 in xrange(b-nPerOwner[owner]+1):\n // c = bestEndCost[level-1][b2] + endCost[owner][b]\n // if c < bestEndCost[level][b]:\n // bestEndCost[level][b] = c\n // solve(level+1)\n // isAvailable[owner] = True\n\n else {\n for (int o=0;o<5;o++)\n if (isAvailable[o]) {\n isAvailable[o] = false;\n spaceNeeded = 0;\n for (int o2=0;o2<5;o2++)\n if (!isAvailable[o2])\n spaceNeeded += nPerOwner[o2];\n for (int b=0;b<nBins;b++) {\n bestEndCost[level][b] = INF;\n if (b >= spaceNeeded - 1)\n for (int b2=0;b2<b-nPerOwner[o]+1;b2++) {\n c = bestEndCost[level-1][b2] + endCost[o][b];\n if (c < bestEndCost[level][b])\n bestEndCost[level][b] = c;\n }\n }\n solve(level+1);\n isAvailable[o] = true;\n }\n }\n}", "private void applyLvlUpCost() {\n }", "int getTotalNeededExpForLevel(int level);", "protected abstract double calculateBestQuality();", "public void testComputeProjectQuality() {\n\t\tCollection<Category> categories = new ArrayList<Category>();\n\t\tcategories.add(new Category(\"Category1\"));\n\t\tcategories.add(new Category(\"Category2\"));\n\t\tDawidSkene ds = new IncrementalDawidSkene(\"TestProject\",categories);\n\n\t\tCollection<AssignedLabel> labels = new ArrayList<AssignedLabel>();\n\t\t//Worker1 quality is 100%\n\t\tlabels.add(new AssignedLabel(\"Worker1\",\"Object1\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker1\",\"Object2\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker1\",\"Object3\",\"Category2\"));\n\t\tlabels.add(new AssignedLabel(\"Worker1\",\"Object4\",\"Category2\"));\n\t\t//worker2\n\t\tlabels.add(new AssignedLabel(\"Worker2\",\"Object1\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker2\",\"Object2\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker2\",\"Object3\",\"Category2\"));\n\t\tlabels.add(new AssignedLabel(\"Worker2\",\"Object4\",\"Category2\"));\n\t\t//Worker3\n\t\tlabels.add(new AssignedLabel(\"Worker3\",\"Object1\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker3\",\"Object2\",\"Category1\"));\n\t\tlabels.add(new AssignedLabel(\"Worker3\",\"Object3\",\"Category2\"));\n\t\tlabels.add(new AssignedLabel(\"Worker3\",\"Object4\",\"Category2\"));\n\t\tds.addAssignedLabels(labels);\n\n\t\tCollection<CorrectLabel> evaluationData = new ArrayList<CorrectLabel>();\n\t\tevaluationData.add(new CorrectLabel(\"Object1\",\"Category1\"));\n\t\tevaluationData.add(new CorrectLabel(\"Object2\",\"Category1\"));\n\t\tevaluationData.add(new CorrectLabel(\"Object3\",\"Category2\"));\n\t\tevaluationData.add(new CorrectLabel(\"Object4\",\"Category2\"));\n\t\tds.addEvaluationDatums(evaluationData);\n\n\t\ttestData(ds);\n\n\t}", "public int evaluateInternalQuality() {\n \n return EvaluateInternalQuality;\n \n }", "private double calcWeight(int level, int index) {\n if (level <= 0 || index < 0 || index > level) {\n return 0.0;\n } else if (level == 1) {\n return blockWeight / 2;\n } else {\n double weight;\n if (index == 0) {\n weight = (calcWeightRecursive(level - 1, 0) + blockWeight) / 2;\n } else if (index == level) {\n weight = (calcWeightRecursive(level - 1, index - 1) + blockWeight) / 2;\n } else {\n weight = (calcWeightRecursive(level - 1, index - 1) + blockWeight) / 2\n + (calcWeightRecursive(level - 1, index) + blockWeight) / 2;\n }\n return weight;\n }\n }", "public int checkGoals() {\n\t\tupdateUnsupportedPreconditionInconsistencies(maxLevel);\n\t\tcountInconsistencies();\n\t\tgraphQuality = calculateQuality();\n\t\treturn this.inconsistencyCount;\n\t}", "double calculateQuality(ReplayBean replay);", "private void checkUnsupportedPreconditions(PlanGraphStep newStep, int currentLevel) {\n\t\t/* add unsupported preconditions for this step by checking facts of previous level */\n\t\tSet<LPGInconsistency> previousLevelInconsistencies = inconsistencies.get(currentLevel - 1);\n\t\tSet<PlanGraphLiteral> previousLevelFacts = facts.get(currentLevel - 1);\n\t\tfor (PlanGraphLiteral pgLiteral : newStep.getParentNodes()) {\n\t\t\t/* if initial level is 0, satisfied by initial state. No need for inconsistency */\n\t\t\t if (pgLiteral.getInitialLevel() != 0 && !previousLevelFacts.contains(pgLiteral)) { \n\t\t\t\tpreviousLevelInconsistencies.add(new UnsupportedPrecondition(pgLiteral, currentLevel - 1));\n\t\t\t\tinconsistencyCount++;\n\t\t\t}\n\t\t}\n\t}", "protected double calculateTotalSupportQuality(){\n if(this.externalSupportPartner.getQualityIndex() <= 50){\n this.totalSupportQuality = 0.4 * this.externalSupportPartner.getQualityIndex() + 0.6 * this.calculateTotalSupportTypeQuality();\n }else{\n this.totalSupportQuality = 0.3 * this.externalSupportPartner.getQualityIndex() + 0.7 * this.calculateTotalSupportTypeQuality();\n }\n return this.totalSupportQuality;\n }", "@Test\n public void basicCostTestBoundaryCondition() {\n // initialise the arrays used for testing\n int[] fullRebootCapacity = { 0, 10, 4, 1 };\n int[] partialRebootCapacity = { 2, 8, 3, 2, 0 };\n int[] data = {};\n\n // compare expected to actual results\n int expectedOptimalCost = 0;\n int actualOptimalCost = Recursive.optimalCostRecursive(\n fullRebootCapacity, partialRebootCapacity, data);\n Assert.assertEquals(expectedOptimalCost, actualOptimalCost);\n }", "private GoalNode createGoal(int depth, ArrayList<Literal> as, ArrayList<Literal> ps, ArrayList<Literal> gcs){\n\n\t\tGoalNode goalNode = new GoalNode(\"T\" + this.id + \"-G\" + this.treeGoalCount++);\n\t\t// incondition\n\t\tArrayList<Literal> inc = new ArrayList<>();\n\t\t// plans to achieve this goal\n\t\tArrayList<PlanNode> plans = new ArrayList<>();\n\t\t// clone the irrelevant literals, we assume the number of literals in potential is greater than or equals to\n\t\t// the number of plans need to be generated\n\t\tArrayList<Literal> potential = (ArrayList<Literal>) is.clone();\n\t\t// create p plans\n\t\tfor(int i = 0; i < this.num_plan; i++){\n\t\t\t// precondition\n\t\t\tArrayList<Literal> prec = new ArrayList<>(ps);\n\n\n\t\t\tif(potential.size() > 0){\n\n\t\t\t\tif (prec.size() == 2){\n\t\t\t\t\tprec.remove(1);\n\t\t\t\t}\n\n\t\t\t\t//while (prec.size() < this.num_lit) {\n\t\t\t\t\t// randomly select a pure environmental condition\n\t\t\t\t\tint j = rm.nextInt(potential.size());\n\t\t\t\t\t// add it to the precondtion of this plan\n\t\t\t\t\tprec.add(potential.get(j));\n\t\t\t\t\t// remove it from the set of possible environmental literals\n\t\t\t\t\tpotential.remove(j);\n\t\t\t\t//}\n\t\t\t}\n\n\n\t\t\t// create a plan\n\t\t\tPlanNode plan = createPlan(depth, as, prec, gcs);\n\t\t\tplans.add(plan);\n\t\t\t// for all plans to achieve goal g, set g as their prerequisite step\n\t\t\tplan.getPreqList().add(goalNode);\n\t\t}\n\t\tgoalNode.getPlans().addAll(plans);\n\t\tgoalNode.getGoalConds().addAll(gcs);\n\n\n\n\n\t\t// create the goal node\n\t\treturn goalNode;\n\t}", "@Override\n public double calculateCosts()\n {\n cost = (labourCost.getCost() + capitalCost.getCost() + materialCost.getCost()) * (1 + PROFITMARGIN);\n return cost;\n }", "public abstract void recalculateLevel();", "float getCostReduction();", "private double getChildrenTotalAlternativeWeight() {\n double totalWeight = 0.0;\n for (DependencyDescription child : this.getChildren()) {\n totalWeight += child.getAlternativeProbability();\n }\n return totalWeight;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read status of the specified CronJob
@Test public void readNamespacedCronJobStatusTest() throws ApiException { String name = null; String namespace = null; String pretty = null; V1beta1CronJob response = api.readNamespacedCronJobStatus(name, namespace, pretty); // TODO: test validations }
[ "public JobStatus getStatus();", "public JobStatus getStatus() {\n return this.status;\n }", "public int getJob_status() {\r\n return getAsNumber(\"job_status\").intValue();\r\n }", "public StatusCheckDataObject getJob_StatusCheck() {\r\n return job_StatusCheck;\r\n }", "public String getJobStatus() {\n return this.jobStatus;\n }", "java.lang.String getJob();", "@Override\n public JobStatus getStatus(long ticket) {\n JobStatus status = null;\n try {\n status = watermarkStorageService.getStatus(ticket);\n } catch (WatermarkException e) {\n log.error(\"Job status not found for the ticket \" + ticket);\n }\n return status;\n }", "TaskStatus getStatus();", "JobStatus getCurrentJobStatus( String key );", "public interface JcrontabScheduler {\n\n\t/** Avalon Role Name */\n\tString ROLE = JcrontabScheduler.class.getName();\n\t\n\t/** The Key to use in your .properties file for relative urls.\n\t * This will be replaced with the actual application root.\n\t * \n\t */\n\tpublic static final String APPLICATION_ROOT_KEY=\"applicationRoot\";\n\t\n\t/**\n\t * Gets the scheduler attribute of the JCrontabScheduler object\n\t *\n\t *@return The scheduler value\n\t */\n\tpublic Crontab getCrontab();\n\t\n\t/** \n\t * Get the CrontabEntryDAO for looking at tasks\t \n\t *\n\t *@return The CrontabEntryDAO.\n\t */\n\tpublic CrontabEntryDAO getContrabEntryDAO();\n\t\n\t/** \n\t * Report whether JCrontab instance is actually\n\t * running or not.\t \n\t *\n\t *@return Whether it is running or not.\n\t */\n\tpublic boolean isRunning();\n}", "public SchedulerStatus getStatus() throws NotConnectedException, PermissionException;", "@ThreadConfined(type = ThreadConfined.ThreadType.AWT)\n DomainArtifactsTabPanel.ArtifactRetrievalStatus getStatus() {\n return status;\n }", "boolean isRunning(JobType type);", "public RunStatus status() {\n return this.status;\n }", "public boolean isRunning(Class<? extends Job> jobClass) throws SchedulerException;", "public static void readObject() {\r\n try {\r\n if (new File(FILE).exists()) {\r\n LoggingService.getInstance().serverLog(\"Reading cron table.\");\r\n ChunkedCharBuffer buf = new ChunkedCharBuffer();\r\n buf.append(new InputStreamReader(new FileInputStream(FILE)));\r\n String contents = buf.toString();\r\n String[] lines = contents.split(\"[\\n\\r]+\");\r\n for (String line : lines) {\r\n String[] splitLine = line.split(\"\\\\|\");\r\n int index = 0;\r\n scheduleJob(\r\n new CronJob(\r\n splitLine[index++], //identifier\r\n Long.valueOf(splitLine[index++]), //interval\r\n new Date(Long.valueOf(splitLine[index++]).longValue()), //start time\r\n splitLine[index++], //command string\r\n splitLine[index++], //user\r\n splitLine[index++] //user service\r\n )\r\n );\r\n }\r\n } else {\r\n LoggingService.getInstance().serverLog(\"No cron table\");\r\n }\r\n } catch (Exception e) {\r\n LoggingService.getInstance().serverLog(\"Error reading cron table: \" + e);\r\n }\r\n }", "public void cronJobProcess() {\n\t}", "public String getStatus(String cacheName);", "QueryJobStatus getCurrentStatus();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Name : expandCompositChar Function: LamAlef needs special handling as the LamAlef is one character while expanding it will give two characters Lam + Alef, so we need to expand the LamAlef in near or far spaces according to the options the user specifies or increase the buffer size. Dest has enough room for the expansion if we are growing. lamalef are normalized to the 'special characters'
private int expandCompositChar(char[] dest, int start, int length, int lacount, int shapingMode) throws ArabicShapingException { int lenOptionsLamAlef = options & LAMALEF_MASK; int lenOptionsSeen = options & SEEN_MASK; int lenOptionsYehHamza = options & YEHHAMZA_MASK; boolean spaceNotFound = false; if (!isLogical && !spacesRelativeToTextBeginEnd) { switch (lenOptionsLamAlef) { case LAMALEF_BEGIN: lenOptionsLamAlef = LAMALEF_END; break; case LAMALEF_END: lenOptionsLamAlef = LAMALEF_BEGIN; break; default: break; } } if(shapingMode == 1){ if(lenOptionsLamAlef == LAMALEF_AUTO){ if(isLogical){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); if(spaceNotFound){ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); } if(spaceNotFound){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); } if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else{ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); if(spaceNotFound){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); } if(spaceNotFound){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); } if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } } }else if(lenOptionsLamAlef == LAMALEF_END){ spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_BEGIN){ spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1); if(spaceNotFound){ throw new ArabicShapingException("No spacefor lamalef"); } }else if(lenOptionsLamAlef == LAMALEF_RESIZE){ for (int r = start + length, w = r + lacount; --r >= start;) { char ch = dest[r]; if (isNormalizedLamAlefChar(ch)) { dest[--w] = '\u0644'; dest[--w] = convertNormalizedLamAlef[ch - '\u065C']; } else { dest[--w] = ch; } } length += lacount; } }else{ if(lenOptionsSeen == SEEN_TWOCELL_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,0,1,0); if(spaceNotFound){ throw new ArabicShapingException("No space for Seen tail expansion"); } } if(lenOptionsYehHamza == YEHHAMZA_TWOCELL_NEAR){ spaceNotFound = expandCompositCharAtNear(dest, start, length,1,0,0); if(spaceNotFound){ throw new ArabicShapingException("No space for YehHamza expansion"); } } } return length; }
[ "private boolean expandCompositCharAtBegin(char[] dest,int start, int length,\n int lacount) {\n boolean spaceNotFound = false;\n\n if (lacount > countSpacesRight(dest, start, length)) {\n spaceNotFound = true;\n return spaceNotFound;\n }\n for (int r = start + length - lacount, w = start + length; --r >= start;) {\n char ch = dest[r];\n if (isNormalizedLamAlefChar(ch)) {\n dest[--w] = LAM_CHAR;\n dest[--w] = convertNormalizedLamAlef[ch - '\\u065C'];\n } else {\n dest[--w] = ch;\n }\n }\n return spaceNotFound;\n\n }", "private boolean expandCompositCharAtEnd(char[] dest,int start, int length,\n int lacount){\n boolean spaceNotFound = false;\n\n if (lacount > countSpacesLeft(dest, start, length)) {\n spaceNotFound = true;\n return spaceNotFound;\n }\n for (int r = start + lacount, w = start, e = start + length; r < e; ++r) {\n char ch = dest[r];\n if (isNormalizedLamAlefChar(ch)) {\n dest[w++] = convertNormalizedLamAlef[ch - '\\u065C'];\n dest[w++] = LAM_CHAR;\n } else {\n dest[w++] = ch;\n }\n }\n return spaceNotFound;\n }", "private boolean expandCompositCharAtNear(char[] dest,int start, int length,\n int yehHamzaOption, int seenTailOption, int lamAlefOption){\n\n boolean spaceNotFound = false;\n\n\n\n if (isNormalizedLamAlefChar(dest[start])) {\n spaceNotFound = true;\n return spaceNotFound;\n }\n for (int i = start + length; --i >=start;) {\n char ch = dest[i];\n if (lamAlefOption == 1 && isNormalizedLamAlefChar(ch)) {\n if (i>start &&dest[i-1] == SPACE_CHAR) {\n dest[i] = LAM_CHAR;\n dest[--i] = convertNormalizedLamAlef[ch - '\\u065C'];\n } else {\n spaceNotFound = true;\n return spaceNotFound;\n }\n }else if(seenTailOption == 1 && isSeenTailFamilyChar(ch) == 1){\n if(i>start &&dest[i-1] == SPACE_CHAR){\n dest[i-1] = tailChar;\n } else{\n spaceNotFound = true;\n return spaceNotFound;\n }\n }else if(yehHamzaOption == 1 && isYehHamzaChar(ch)){\n\n if(i>start &&dest[i-1] == SPACE_CHAR){\n dest[i] = yehHamzaToYeh[ch - YEH_HAMZAFE_CHAR];\n dest[i-1] = HAMZAFE_CHAR;\n }else{\n spaceNotFound = true;\n return spaceNotFound;\n }\n\n\n }\n }\n return false;\n\n }", "private static char changeLamAlef(char ch) {\n switch(ch) {\n case '\\u0622': return '\\u065C';\n case '\\u0623': return '\\u065D';\n case '\\u0625': return '\\u065E';\n case '\\u0627': return '\\u065F';\n default: return '\\u0000'; // not a lamalef\n }\n }", "private int handleGeneratedSpaces(char[] dest,\n int start,\n int length) {\n\n int lenOptionsLamAlef = options & LAMALEF_MASK;\n int lenOptionsTashkeel = options & TASHKEEL_MASK;\n boolean lamAlefOn = false;\n boolean tashkeelOn = false;\n\n if (!isLogical & !spacesRelativeToTextBeginEnd) {\n switch (lenOptionsLamAlef) {\n case LAMALEF_BEGIN: lenOptionsLamAlef = LAMALEF_END; break;\n case LAMALEF_END: lenOptionsLamAlef = LAMALEF_BEGIN; break;\n default: break;\n }\n switch (lenOptionsTashkeel){\n case TASHKEEL_BEGIN: lenOptionsTashkeel = TASHKEEL_END; break;\n case TASHKEEL_END: lenOptionsTashkeel = TASHKEEL_BEGIN; break;\n default: break;\n }\n }\n\n\n if (lenOptionsLamAlef == LAMALEF_NEAR) {\n for (int i = start, e = i + length; i < e; ++i) {\n if (dest[i] == LAMALEF_SPACE_SUB) {\n dest[i] = SPACE_CHAR;\n }\n }\n\n } else {\n\n final int e = start + length;\n int wL = countSpaceSub(dest, length, LAMALEF_SPACE_SUB);\n int wT = countSpaceSub(dest, length, TASHKEEL_SPACE_SUB);\n\n if (lenOptionsLamAlef == LAMALEF_END){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_END){\n tashkeelOn = true;\n }\n\n\n if (lamAlefOn && (lenOptionsLamAlef == LAMALEF_END)) {\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n while (wL > start) {\n dest[--wL] = SPACE_CHAR;\n }\n }\n\n if (tashkeelOn && (lenOptionsTashkeel == TASHKEEL_END)){\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n while (wT > start) {\n dest[--wT] = SPACE_CHAR;\n }\n }\n\n lamAlefOn = false;\n tashkeelOn = false;\n\n if (lenOptionsLamAlef == LAMALEF_RESIZE){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_RESIZE){\n tashkeelOn = true;\n }\n\n if (lamAlefOn && (lenOptionsLamAlef == LAMALEF_RESIZE)){\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n wL = flipArray(dest,start,e, wL);\n length = wL - start;\n }\n if (tashkeelOn && (lenOptionsTashkeel == TASHKEEL_RESIZE)) {\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n wT = flipArray(dest,start,e, wT);\n length = wT - start;\n }\n\n lamAlefOn = false;\n tashkeelOn = false;\n\n if ((lenOptionsLamAlef == LAMALEF_BEGIN) ||\n (lenOptionsLamAlef == LAMALEF_AUTO)){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_BEGIN){\n tashkeelOn = true;\n }\n\n if (lamAlefOn && ((lenOptionsLamAlef == LAMALEF_BEGIN)||\n (lenOptionsLamAlef == LAMALEF_AUTO))) { // spaces at beginning\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n wL = flipArray(dest,start,e, wL);\n while (wL < e) {\n dest[wL++] = SPACE_CHAR;\n }\n }\n if(tashkeelOn && (lenOptionsTashkeel == TASHKEEL_BEGIN)){\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n wT = flipArray(dest,start,e, wT);\n while (wT < e) {\n dest[wT++] = SPACE_CHAR;\n }\n }\n }\n\n return length;\n }", "public void expand(int x, char d){\n if (d == 'L') {\n right += x;\n size = calcSize();\n //we don't care about the weight anymore as the ones left should be taken anyway\n }\n else if(d == 'R'){\n left -= x;\n size = calcSize();\n }\n else if(d == 'D'){\n up -= x;\n size = calcSize();\n }\n else if(d == 'U'){ //there is the possibility that there is no solution for that point at the moment\n down += x;\n size = calcSize();\n }\n }", "@Override\r\n\tpublic void expand(List<String> tokens) {\r\n\t\tString key = getOptionKey().getCLASwitch();\r\n\t\tfor (int i = 0; i < tokens.size(); i++) {\r\n\t\t\tString s = tokens.get(i).toString();\r\n\t\t\tif (s.charAt(0) == '-') {\r\n\t\t\t\tif (key.equals(s.substring(1))) {\r\n\t\t\t\t\t// replace the cla switch with -opt and set its value.\r\n\t\t\t\t\ts = \"-opt\";\r\n\t\t\t\t\ttokens.add(i, s);\r\n\t\t\t\t\ttokens.remove(i + 1);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tString value = tokens.get(i + 1).toString();\r\n\t\t\t\t\t\ts = getOptionKey().getKey() + \"=\" + value;\r\n\t\t\t\t\t\ttokens.remove(i + 1);\r\n\t\t\t\t\t\ttokens.add(i + 1, s);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tthrow new NewJob.InvalidNumberOfArgsException();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private int deshapeNormalize(char[] dest, int start, int length) {\n int lacount = 0;\n int yehHamzaComposeEnabled = 0;\n int seenComposeEnabled = 0;\n\n yehHamzaComposeEnabled = ((options&YEHHAMZA_MASK) == YEHHAMZA_TWOCELL_NEAR) ? 1 : 0;\n seenComposeEnabled = ((options&SEEN_MASK) == SEEN_TWOCELL_NEAR)? 1 : 0;\n\n for (int i = start, e = i + length; i < e; ++i) {\n char ch = dest[i];\n\n if( (yehHamzaComposeEnabled == 1) && ((ch == HAMZA06_CHAR) || (ch == HAMZAFE_CHAR))\n && (i < (length - 1)) && isAlefMaksouraChar(dest[i+1] )) {\n dest[i] = SPACE_CHAR;\n dest[i+1] = YEH_HAMZA_CHAR;\n } else if ( (seenComposeEnabled == 1) && (isTailChar(ch)) && (i< (length - 1))\n && (isSeenTailFamilyChar(dest[i+1])==1) ) {\n dest[i] = SPACE_CHAR;\n }\n else if (ch >= '\\uFE70' && ch <= '\\uFEFC') {\n if (isLamAlefChar(ch)) {\n ++lacount;\n }\n dest[i] = (char)convertFEto06[ch - '\\uFE70'];\n }\n }\n return lacount;\n }", "private int deShapeUnicode(char[] dest,\n int start,\n int length,\n int destSize) throws ArabicShapingException {\n\n int lamalef_count = deshapeNormalize(dest, start, length);\n\n // If there was a lamalef in the buffer call expandLamAlef\n if (lamalef_count != 0) {\n // need to adjust dest to fit expanded buffer... !!!\n destSize = expandCompositChar(dest, start, length, lamalef_count,DESHAPE_MODE);\n } else {\n destSize = length;\n }\n\n return destSize;\n }", "public String shortenString(String str, float maxWidth, PFont font) {\n if (textWidth(str) <= maxWidth) {\n return str;\n }\n\n textFont(font); // set font for accurate sizing\n int firstIndex = 0; // forward iterator\n int lastIndex = str.length()-1; // reverse iterator\n float spaceLeft = maxWidth - textWidth(\"...\"); // account for the space taken by \"...\"\n\n while (firstIndex < lastIndex && spaceLeft >= 0.f) {\n spaceLeft -= textWidth(str.charAt(firstIndex)); // subtract space taken by first char\n spaceLeft -= textWidth(str.charAt(lastIndex)); // and last char\n\n // move interators inward\n firstIndex ++;\n lastIndex --;\n }\n\n String s1 = str.substring(0, firstIndex); // firstIndex is excluded here\n String s2 = str.substring(lastIndex + 1, str.length()); // manually exclude lastIndex\n return s1 + \"...\" + s2;\n}", "public abstract IoBuffer expand(int pos, int expectedRemaining);", "private void expandMappingAndUpdateOptimalMapping(int fixedEditorialCost,\n int level,\n OptimalEdit optimalEdit,\n List<Vertex> allSources,\n Mapping toExpand,\n int[] assignments,\n List<Vertex> availableTargetVertices,\n double lowerBoundCost) {\n for (int i = 0; i < assignments.length; i++) {\n toExpand.add(allSources.get(level - 1 + i), availableTargetVertices.get(assignments[i]));\n }\n assertTrue(toExpand.size() == this.completeSourceGraph.size());\n int costForFullMapping = editorialCostForMapping(fixedEditorialCost, toExpand, completeSourceGraph, completeTargetGraph);\n assertTrue(lowerBoundCost <= costForFullMapping);\n if (costForFullMapping < optimalEdit.ged) {\n updateOptimalEdit(optimalEdit, costForFullMapping, toExpand);\n }\n }", "private int transform(StringBuilder word) {\n\n while(queue.size() > 0 ) {\n\n int sizeOfCurrentDepth = queue.size();\n for (int k = 0; k < sizeOfCurrentDepth; k++) {\n // Get first sizeOfCurrentDepth elements of the same depth\n\n StringBuilder top = (StringBuilder)(queue.remove(0));\n if (depth >= top.length()) {\n // System.out.println(\"depth 5 top: \" + top);\n continue;\n }\n\n\n if (top.toString().replaceAll(\"|\",\"\").equals(target)) {\n return depth;\n }\n\n if (top.charAt(depth) == '|') {\n continue;\n }\n\n // Replace current letter with a new letter\n for (int i=0; i<target.length(); i++) {\n StringBuilder sb = new StringBuilder(top.toString());\n sb.setCharAt(depth, target.charAt(i));\n queue.add(sb);\n\n System.out.println(\"Adding altered: \" + sb + \" depth: \" + depth);\n }\n\n if (top.length() < target.length()) {\n // Insert a new letter after current letter\n for (int i=0; i<target.length(); i++) {\n StringBuilder sb = new StringBuilder(top.toString());\n sb.append(target.charAt(i));\n //System.out.println(\"Adding appended: \" + sb + \" depth: \" + depth);\n queue.add(sb);\n }\n }\n\n // Delete current letter by replacing it with |\n StringBuilder sb = new StringBuilder(top.toString());\n //System.out.println(\"sb to delete: \" + sb + \" depth: \" + depth );\n sb.setCharAt(depth, '|');\n System.out.println(\"Adding deleted: \" + sb + \" depth: \" + depth);\n queue.add(sb);\n }\n depth++;\n }\n return 99999999;\n }", "@Test\n public void longerString() { // as symbols are added and new digrams created and checked it messes up,\n // ga = tc, at = at, ta = ta, ag = ct, ga\n String input = \"gataga\"; // so getting to ga, which is already seen, not a complement, just straight up match\n Compress c = new Compress();\n c.processInput(input, false);\n assertEquals(\"g a, t c, t a, a 2', a 2, 2 t, 2' t, \", c.getDigramMap().printDigrams());\n assertEquals(\"0 > 2 t a 2 | 2 > g a | \", c.printRules());\n }", "private int shapeUnicode(char[] dest,\n int start,\n int length,\n int destSize,\n int tashkeelFlag)throws ArabicShapingException {\n\n int lamalef_count = normalize(dest, start, length);\n\n // resolve the link between the characters.\n // Arabic characters have four forms: Isolated, Initial, Medial and Final.\n // Tashkeel characters have two, isolated or medial, and sometimes only isolated.\n // tashkeelFlag == 0: shape normally, 1: shape isolated, 2: don't shape\n\n boolean lamalef_found = false, seenfam_found = false;\n boolean yehhamza_found = false, tashkeel_found = false;\n int i = start + length - 1;\n int currLink = getLink(dest[i]);\n int nextLink = 0;\n int prevLink = 0;\n int lastLink = 0;\n //int prevPos = i;\n int lastPos = i;\n int nx = -2;\n int nw = 0;\n\n while (i >= 0) {\n // If high byte of currLink != 0 then there might be more than one shape\n if ((currLink & '\\uFF00') != 0 || isTashkeelChar(dest[i])) {\n nw = i - 1;\n nx = -2;\n while (nx < 0) { // we need to know about next char\n if (nw == -1) {\n nextLink = 0;\n nx = Integer.MAX_VALUE;\n } else {\n nextLink = getLink(dest[nw]);\n if ((nextLink & IRRELEVANT) == 0) {\n nx = nw;\n } else {\n --nw;\n }\n }\n }\n\n if (((currLink & ALEFTYPE) > 0) && ((lastLink & LAMTYPE) > 0)) {\n lamalef_found = true;\n char wLamalef = changeLamAlef(dest[i]); // get from 0x065C-0x065f\n if (wLamalef != '\\u0000') {\n // replace alef by marker, it will be removed later\n dest[i] = '\\uffff';\n dest[lastPos] = wLamalef;\n i = lastPos;\n }\n\n lastLink = prevLink;\n currLink = getLink(wLamalef); // requires '\\u0000', unfortunately\n }\n if ((i > 0) && (dest[i-1] == SPACE_CHAR))\n {\n if ( isSeenFamilyChar(dest[i]) == 1){\n seenfam_found = true;\n } else if (dest[i] == YEH_HAMZA_CHAR) {\n yehhamza_found = true;\n }\n }\n else if(i==0){\n if ( isSeenFamilyChar(dest[i]) == 1){\n seenfam_found = true;\n } else if (dest[i] == YEH_HAMZA_CHAR) {\n yehhamza_found = true;\n }\n }\n\n\n // get the proper shape according to link ability of neighbors\n // and of character; depends on the order of the shapes\n // (isolated, initial, middle, final) in the compatibility area\n\n int flag = specialChar(dest[i]);\n\n int shape = shapeTable[nextLink & LINK_MASK]\n [lastLink & LINK_MASK]\n [currLink & LINK_MASK];\n\n if (flag == 1) {\n shape &= 0x1;\n } else if (flag == 2) {\n if (tashkeelFlag == 0 &&\n ((lastLink & LINKL) != 0) &&\n ((nextLink & LINKR) != 0) &&\n dest[i] != '\\u064C' &&\n dest[i] != '\\u064D' &&\n !((nextLink & ALEFTYPE) == ALEFTYPE &&\n (lastLink & LAMTYPE) == LAMTYPE)) {\n\n shape = 1;\n\n } else if(tashkeelFlag == 2 && dest[i] == SHADDA06_CHAR){\n shape = 1;\n\n } else {\n shape = 0;\n }\n }\n if (flag == 2) {\n if (tashkeelFlag == 2 && dest[i] != SHADDA06_CHAR) {\n dest[i] = TASHKEEL_SPACE_SUB;\n tashkeel_found = true;\n }\n else{\n dest[i] = (char)('\\uFE70' + irrelevantPos[dest[i] - '\\u064B'] + shape);\n }\n // else leave tashkeel alone\n } else {\n dest[i] = (char)('\\uFE70' + (currLink >> 8) + shape);\n }\n }\n\n // move one notch forward\n if ((currLink & IRRELEVANT) == 0) {\n prevLink = lastLink;\n lastLink = currLink;\n //prevPos = lastPos;\n lastPos = i;\n }\n\n --i;\n if (i == nx) {\n currLink = nextLink;\n nx = -2;\n } else if (i != -1) {\n currLink = getLink(dest[i]);\n }\n }\n\n // If we found a lam/alef pair in the buffer\n // call handleGeneratedSpaces to remove the spaces that were added\n\n destSize = length;\n if (lamalef_found || tashkeel_found) {\n destSize = handleGeneratedSpaces(dest, start, length);\n }\n if (seenfam_found || yehhamza_found){\n destSize = expandCompositChar(dest, start, destSize, lamalef_count, SHAPE_MODE);\n }\n return destSize;\n }", "private String expandAffix(String pattern, StringBuffer buffer) {\n buffer.setLength(0);\n for (int i = 0; i < pattern.length();) {\n char c = pattern.charAt(i++);\n if (c == QUOTE) {\n c = pattern.charAt(i++);\n switch (c) {\n case CURRENCY_SIGN:\n buffer.append(symbols.getCurrencySymbol());\n continue;\n case PATTERN_PERCENT:\n c = symbols.getPercent();\n break;\n case PATTERN_PER_MILLE:\n c = symbols.getPerMill();\n break;\n case PATTERN_MINUS:\n c = symbols.getMinusSign();\n break;\n }\n }\n buffer.append(c);\n }\n return buffer.toString();\n }", "String expand(String from, MapParams params) {\n\t\tint mc = 0;\n\t\tint slot;\n\n\t\t//if( DEBUG_MATCH )\n\t\t// p4debug.printf( \"Expand %s\\n\", Text() );\n\n\t\tString output = \"\";\n\n\t\tfor (; mapChar[mc].cc != cEOS; ++mc) {\n\t\t\tif (mapChar[mc].isWild()) {\n\t\t\t\tslot = mapChar[mc].paramNumber;\n\t\t\t\tint in = params.vector[slot].start;\n\t\t\t\tint end = params.vector[slot].end;\n\t\t\t\t//if( DEBUG_MATCH )\n\t\t\t\t// p4debug.printf( \"... %d %p to '%.*s'\\n\", slot,\n\t\t\t\t// &params.vector[ slot ], end - in, in );\n\n\t\t\t\toutput += from.substring(in, end);\n\t\t\t} else {\n\t\t\t\toutput += mapChar[mc].c;\n\t\t\t}\n\t\t}\n\n\t\t//if( DEBUG_MATCH )\n\t\t// p4debug.printf( \"Expanded to %s\\n\", output.Text() );\n\t\treturn output;\n\t}", "public static String abbreviate(String str, int offset, int maxWidth) {\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (maxWidth < 4) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Minimum abbreviation width is 4\");\n\t\t}\n\t\tif (str.length() <= maxWidth) {\n\t\t\treturn str;\n\t\t}\n\t\tif (offset > str.length()) {\n\t\t\toffset = str.length();\n\t\t}\n\t\tif ((str.length() - offset) < (maxWidth - 3)) {\n\t\t\toffset = str.length() - (maxWidth - 3);\n\t\t}\n\t\tif (offset <= 4) {\n\t\t\treturn str.substring(0, maxWidth - 3) + \"...\";\n\t\t}\n\t\tif (maxWidth < 7) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Minimum abbreviation width with offset is 7\");\n\t\t}\n\t\tif ((offset + (maxWidth - 3)) < str.length()) {\n\t\t\treturn \"...\" + abbreviate(str.substring(offset), maxWidth - 3);\n\t\t}\n\t\treturn \"...\" + str.substring(str.length() - (maxWidth - 3));\n\t}", "private static boolean isLamAlefChar(char ch) {\n return ch >= '\\uFEF5' && ch <= '\\uFEFC';\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the tool is failed. By default, shows a error dialog with the details of the failure. THIS METHOD WILL BE INVOKED ON THE EVENTDISPATCH THREAD (EDT)!
protected void onToolFailed( final Exception aException ) { ToolUtils.showErrorMessage( getOwner(), "Tool failed!\nDetails: " + aException.getMessage() ); }
[ "protected void failed() {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n\n alert.setTitle(\"Error: Couldn't load image\");\n alert.setHeaderText(\"Could not load the selected item image\");\n alert.setContentText(\"The requested image could not be loaded\");\n\n alert.showAndWait();\n }", "public void failMessage() {\r\n\t\tString actionName = getActionName();\r\n\t\tSystem.out.printf(\"Failed execution: %S\\n\\tx:%d y:%d\\n\\tx2:%d y2:%d\\n\", actionName, x, y, x2, y2);\r\n\t}", "private void showErrorCalculationFailed(Exception e) {\r\n\tExceptionDialog exceptionDialog = new ExceptionDialog(\r\n\t\tnew Exception(\r\n\t\t\t\"Es ist keine Berechnung möglich. Bitte korrigieren Sie die Eingabedaten!\",\r\n\t\t\te));\r\n\texceptionDialog.setTitle(\"Fehler\");\r\n\texceptionDialog.setHeaderText(\"Die Berechnung ist fehlgeschlagen\");\r\n\texceptionDialog.getDialogPane().setStyle(\r\n\t\troot.getZoomer().getStyleFXFontSize());\r\n\texceptionDialog.showAndWait();\r\n }", "public static void notifyMakeSaleFailure(){\r\n\t\tMessageBox errMsg = new MessageBox(Main.getMainShell(),SWT.ICON_ERROR | SWT.OK);\r\n\t\terrMsg.setText(\"DB Connection Error\");\r\n\t\terrMsg.setMessage(\"Could not make sale due to a connection error.\\n\"+\r\n\t\t\t\t\"Please try again later.\");\r\n\t\t// retry connection\r\n\t\tif (errMsg.open() == SWT.OK) {\r\n\t\t\t// restore gui\r\n\t\t\tMainFuncs.setAllowDBAction(true);\r\n\t\t}\r\n\t}", "public void \n showErrorDialog\n (\n Throwable ex\n ) \n {\n pErrorDialog.setMessage(ex);\n SwingUtilities.invokeLater(new ShowErrorDialogTask());\n }", "public void \n showSubprocessFailureDialog\n (\n String header, \n int exitCode, \n String command, \n String stdout, \n String stderr \n )\n {\n ShowSubprocessFailureDialog task = \n new ShowSubprocessFailureDialog(header, exitCode, command, stdout, stderr);\n SwingUtilities.invokeLater(task);\n }", "protected void showError(){\n JOptionPane.showMessageDialog(null, message, \"Error\", JOptionPane.ERROR_MESSAGE);\n }", "public static void showFailed() {\n // let the user know server has failed saving the list of quizzes to persistence\n System.out.println(\"Quiz creation failed. \"); //Futher implementation on GUI side\n }", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tUtils.showErrorPage(caught.getMessage());\n\t\t\t}", "public void \n showSubprocessFailureDialog\n (\n String header, \n SubProcessLight proc\n )\n {\n showSubprocessFailureDialog\n (header, proc.getExitCode(), proc.getCommand(), proc.getStdOut(), proc.getStdErr());\n }", "public void markAsFailed() {\n execution.setErrorReported();\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "public void \n showErrorDialog\n (\n Exception ex\n ) \n {\n pErrorDialog.setMessage(ex);\n pErrorDialog.setVisible(true);\n }", "@Override\n protected void performGUIUpdate()\n {\n if (getException() != null)\n {\n log.error(\"Error on Desktop operation\", getException());\n getController()\n .getApplication()\n .getApplicationContext()\n .messageBox(\n new Message(null, RESID_ERR_TEXT,\n getSelectedFile().getName()),\n RESID_ERR_TITLE, MessageOutput.MESSAGE_ERROR,\n MessageOutput.BTN_OK);\n }\n }", "public void popLoginFail(){\n JOptionPane.showMessageDialog(currFrame,\n \"Sorry, system can't log you using current ID, Password.\",\n \"Login not successful\",\n JOptionPane.WARNING_MESSAGE);\n }", "public void showLoadingError() {\n System.out.println(\"Duke has failed to load properly.\");\n }", "public void showBadSaveError() {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error Dialog\");\n alert.setHeaderText(\"Save failed\");\n alert.setContentText(\"Something went wrong and and the save failed.\");\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n alert.showAndWait();\n }", "private void showErrorMinimalProductionCycleAlert() {\r\n\tAlert alert = new Alert(AlertType.ERROR);\r\n\talert.setTitle(\"Fehler\");\r\n\talert.setHeaderText(\"Fehler in den Eingabedaten\");\r\n\talert.setContentText(\"Optimaler gemeinsamer Produktionszyklus ist kleiner als minimaler zulässiger Produktionszyklus! Bitte korrigieren Sie die Eingabedaten\");\r\n\talert.getDialogPane().setStyle(root.getZoomer().getStyleFXFontSize());\r\n\talert.showAndWait();\r\n }", "private void showAlertDBError() {\n showAlertSelectionFail(\"Database error\", \"Could not establish a connection to the database. Please visit the database settings to verify your connection.\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a calendar user's display name, falling back to his email or URI properties as needed.
public static String getDisplayName(CalendarUser calendarUser) { if (Strings.isNotEmpty(calendarUser.getCn())) { return calendarUser.getCn(); } if (Strings.isNotEmpty(calendarUser.getEMail())) { return calendarUser.getEMail(); } return CalendarUtils.extractEMailAddress(calendarUser.getUri()); }
[ "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "java.lang.String getDisplayName();", "public static String getUserDisplayName() {\n // TODO: to be changed\n /*\n * String result = null; Uri databaseUri =\n * Uri.parse(\"content://com.orangelabs.rcs.settings/settings\");\n * ContentResolver cr =\n * AndroidFactory.getApplicationContext().getContentResolver(); Cursor c\n * = cr.query(databaseUri, null, \"key\" + \"='\" + \"ImsDisplayName\" + \"'\",\n * null, null); if (c != null) { if ((c.getCount() > 0) &&\n * c.moveToFirst()) { result = c.getString(2); } c.close(); } return\n * result;\n */\n return null;\n }", "String getDisplay_name();", "String realmDisplayName();", "java.lang.String getSelfDisplayName();", "String getForename();", "java.lang.String getUserFirstName();", "public final String getUserName() {\n return properties.get(USER_NAME_PROPERTY);\n }", "public String getUserRealName() {\r\n return userRealName;\r\n }", "public String getOrganizerDisplayName() {\n\t\t//Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now();\n\t\tProfile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now();\n\t\tif (organizer == null) {\n\t\t\treturn organizerUserId;\n\t\t} else {\n\t\t\treturn organizer.getDisplayName();\n\t\t}\n\t}", "private String getDisplayName(Account account) {\n if (account != null) {\n String result = (account.getFullName() == null)\n ? anonymousCowardName\n : account.getFullName();\n if (account.getPreferredEmail() != null) {\n result += \" (\" + account.getPreferredEmail() + \")\";\n }\n return result;\n }\n\n return anonymousCowardName;\n }", "public String getUserRealName() {\n return userRealName;\n }", "public static String getUserDisplayName(String accessToken) {\n\n HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();\n loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .addNetworkInterceptor(loggingInterceptor)\n .build();\n\n accessToken = \"Bearer \" + accessToken;\n String displayName = \"\";\n Retrofit retrofit = new Retrofit.Builder()\n .client(okHttpClient)\n .baseUrl(HOST_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n MSGraphEndpoints endpoints = retrofit.create(MSGraphEndpoints.class);\n Call<User> call = endpoints.getMe(accessToken);\n\n try {\n Response<User> response = call.execute();\n displayName = response.body().getDisplayName();\n } catch (Exception e) {\n Log.e(\"MSGRAPH_ERROR\", e.getMessage());\n e.printStackTrace();\n }\n return displayName;\n }", "public String getUserRealname() {\n return userRealname;\n }", "java.lang.String getUserNm();", "java.lang.String getUserLastName();", "@Override\n public java.lang.String getUserName() {\n return _contactInfo.getUserName();\n }", "private String getUserDisplayName(final String userUuid) {\n\t\ttry {\n\t\t\treturn this.userDirectoryService.getUser(userUuid).getDisplayName();\n\t\t} catch (final UserNotDefinedException e) {\n\t\t\tlog.debug(\"User {} could not be found, falling back to uuid\", userUuid);\n\t\t}\n\t\treturn userUuid;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CIF_PROXY_BENEF_DET.TO_DATE
public Date getTO_DATE() { return TO_DATE; }
[ "public Date getToDate() {\n\t\treturn toDate;\n\t}", "public Date getToDate() {\n return (Date)getAttributeInternal(TODATE);\n }", "public String getOfferToDt() {\n return this.to_dt;\n }", "public Number getBudgetAsToDate() {\n return (Number)getAttributeInternal(BUDGETASTODATE);\n }", "public Number getBudgetAsToDate() {\n return (Number) getAttributeInternal(BUDGETASTODATE);\n }", "public static String getAccountingToDate(Record record){\r\n return record.getStringValue(ACCOUNTING_TO_DATE);\r\n }", "public Date getDEAL_VALUE_DATE() {\r\n return DEAL_VALUE_DATE;\r\n }", "public Date getTO_REVERSE_DATE() {\r\n return TO_REVERSE_DATE;\r\n }", "public java.sql.Date getLoa_end_date() {\r\n return (java.sql.Date) get(\"loa_end_date\");\r\n }", "public Date getORGINAL_VALUE_DATE()\r\n {\r\n\treturn ORGINAL_VALUE_DATE;\r\n }", "public void setTO_DATE(Date TO_DATE)\r\n {\r\n\tthis.TO_DATE = TO_DATE;\r\n }", "public java.sql.Date getEntDate(){\n\n\t\treturn entDate;\n\t}", "@FindByCondition(value=TdDepEco.class, condition=\"DE_FEC_ING_GMM=?\")\n TdDepEco getByDeFecIngGmm(java.util.Date deFecIngGmm);", "java.util.Date getADateDataSourceValue();", "public Date getEffectivedateTo() {\n return (Date) getAttributeInternal(EFFECTIVEDATETO);\n }", "public Date getBudgetDate() {\n return (Date)getAttributeInternal(BUDGETDATE);\n }", "public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDATE);\n }", "public java.util.Date getBill_date() {\n return bill_date;\n }", "public static Date getTaxDueFromDate(Owner_dobj dobj, int pur_cd) {\r\n Date dateDueFrom = null;\r\n Date dateClearUpto = null;\r\n Date dateTaxUpto = null;\r\n Date dateExempUpto = null;\r\n Timestamp taxRcptDate = null;\r\n Timestamp clearRcptDate = null;\r\n Timestamp exempRcptDate = null;\r\n Timestamp rcpDuetDate = null;\r\n Date dateFeeUpto = null;\r\n Timestamp feeRcptDate = null;\r\n TransactionManagerReadOnly tmgr = null;\r\n try {\r\n tmgr = new TransactionManagerReadOnly(\"getTaxDueFromDate\");\r\n String sql = \"select max(tax_upto) tax_upto,rcpt_dt from \" + TableList.VT_TAX\r\n + \" where regn_no=? and pur_cd=? and state_cd=?\"\r\n + \" and left(tax_mode, 1) in ('Y', 'H', 'Q', 'M','D') \"\r\n + \" group by rcpt_dt \"\r\n + \" order by rcpt_dt desc limit 1\";\r\n PreparedStatement ps = tmgr.prepareStatement(sql);\r\n ps.setString(1, dobj.getRegn_no());\r\n ps.setInt(2, pur_cd);\r\n ps.setString(3, Util.getUserStateCode());\r\n RowSet rs = tmgr.fetchDetachedRowSet_No_release();\r\n if (rs.next()) {\r\n dateTaxUpto = rs.getDate(\"tax_upto\");\r\n if (dateTaxUpto != null) {\r\n dateTaxUpto = DateUtils.addToDate(dateTaxUpto, 1, 1);\r\n taxRcptDate = rs.getTimestamp(\"rcpt_dt\");\r\n }\r\n\r\n }\r\n\r\n sql = \"select max(clear_to) clear_to,op_dt from \" + TableList.VT_TAX_CLEAR\r\n + \" where regn_no=? and pur_cd=? and state_cd=? group by op_dt\"\r\n + \" order by op_dt desc limit 1\";\r\n ps = tmgr.prepareStatement(sql);\r\n ps.setString(1, dobj.getRegn_no());\r\n ps.setInt(2, pur_cd);\r\n ps.setString(3, Util.getUserStateCode());\r\n\r\n rs = tmgr.fetchDetachedRowSet_No_release();\r\n if (rs.next()) {\r\n dateClearUpto = rs.getDate(\"clear_to\");\r\n if (dateClearUpto != null) {\r\n dateClearUpto = DateUtils.addToDate(dateClearUpto, 1, 1);\r\n clearRcptDate = rs.getTimestamp(\"op_dt\");\r\n }\r\n }\r\n\r\n if (dateTaxUpto == null) {\r\n dateDueFrom = dateClearUpto;\r\n rcpDuetDate = clearRcptDate;\r\n } else if (dateClearUpto == null) {\r\n dateDueFrom = dateTaxUpto;\r\n rcpDuetDate = taxRcptDate;\r\n } else {\r\n if (taxRcptDate != null && clearRcptDate != null) {\r\n if (taxRcptDate.after(clearRcptDate)) {\r\n dateDueFrom = dateTaxUpto;\r\n rcpDuetDate = taxRcptDate;\r\n } else {\r\n dateDueFrom = dateClearUpto;\r\n rcpDuetDate = clearRcptDate;\r\n }\r\n }\r\n }\r\n\r\n if (pur_cd == TableConstants.TM_ROAD_TAX || pur_cd == TableConstants.TM_ADDN_ROAD_TAX) {\r\n sql = \"select exem_to,op_dt from \" + TableList.VT_TAX_EXEM\r\n + \" where regn_no=? and state_cd=? order by op_dt desc limit 1\";\r\n ps = tmgr.prepareStatement(sql);\r\n ps.setString(1, dobj.getRegn_no());\r\n ps.setString(2, Util.getUserStateCode());\r\n rs = tmgr.fetchDetachedRowSet_No_release();\r\n if (rs.next()) {\r\n dateExempUpto = rs.getDate(\"exem_to\");\r\n if (dateExempUpto != null) {\r\n dateExempUpto = DateUtils.addToDate(dateExempUpto, 1, 1);\r\n exempRcptDate = rs.getTimestamp(\"op_dt\");\r\n }\r\n }\r\n }\r\n if (dateExempUpto != null) {\r\n if (dateDueFrom == null) {\r\n dateDueFrom = dateExempUpto;\r\n } else {\r\n if (rcpDuetDate != null && exempRcptDate != null) {\r\n if (exempRcptDate.after(rcpDuetDate)) {\r\n dateDueFrom = dateExempUpto;\r\n }\r\n }\r\n }\r\n }\r\n if (pur_cd == TableConstants.TM_AUDIO_FEE || pur_cd == TableConstants.TM_VIDEO_FEE) {\r\n sql = \"select max(fee_upto) fee_upto,rcpt_dt from \" + TableList.VT_FEE\r\n + \" f inner join \" + TableList.VT_FEE_BREAKUP + \" b on b.rcpt_no=f.rcpt_no and b.state_cd=f.state_cd and b.off_cd=f.off_cd and b.pur_cd=f.pur_cd \"\r\n + \"where regn_no=? and f.pur_cd=? and f.state_cd=? group by f.rcpt_dt order by f.rcpt_dt desc limit 1\";\r\n ps = tmgr.prepareStatement(sql);\r\n ps.setString(1, dobj.getRegn_no());\r\n ps.setInt(2, pur_cd);\r\n ps.setString(3, Util.getUserStateCode());\r\n rs = tmgr.fetchDetachedRowSet_No_release();\r\n if (rs.next()) {\r\n dateFeeUpto = rs.getDate(\"fee_upto\");\r\n if (dateFeeUpto != null) {\r\n dateFeeUpto = DateUtils.addToDate(dateFeeUpto, 1, 1);\r\n feeRcptDate = rs.getTimestamp(\"rcpt_dt\");\r\n }\r\n }\r\n }\r\n if (dateFeeUpto != null) {\r\n if (dateDueFrom == null) {\r\n dateDueFrom = dateFeeUpto;\r\n rcpDuetDate = feeRcptDate;\r\n } else {\r\n if (feeRcptDate != null && feeRcptDate.after(rcpDuetDate)) {\r\n dateDueFrom = dateFeeUpto;\r\n }\r\n }\r\n }\r\n if (dateDueFrom == null) {\r\n dateDueFrom = dobj.getPurchase_dt();\r\n }\r\n\r\n } catch (Exception e) {\r\n LOGGER.error(e.toString() + \" \" + e.getStackTrace()[0]);\r\n\r\n } finally {\r\n if (tmgr != null) {\r\n try {\r\n tmgr.release();\r\n } catch (Exception ex) {\r\n LOGGER.error(ex.toString() + \" \" + ex.getStackTrace()[0]);\r\n }\r\n }\r\n }\r\n return dateDueFrom;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes the last open command if no arguments are specified. If l is specified prints a list of the last opened files. If a number (n) is specified as an argument the nth recent file is opened.
private void cmdReOpen(String line) { line = (line == null ? "" : line.trim()); LimitedStack<String> recentFiles = Options.getRecentFiles(); if (line.startsWith("-l")) { if (recentFiles.isEmpty()) { Log.println("No files were opened, yet."); return; } int index = 0; for (int i = recentFiles.size() - 1; i >= 0; --i) { index++; Log.println(index + ": " + recentFiles.get(i)); } return; } if (recentFiles.isEmpty()) { Log.error("No recent files to reopen."); return; } String filename; if (line.equals("")) { filename = Options.getRecentFiles().peek(); } else { int fileNr; try { fileNr = Integer.parseInt(line); } catch (NumberFormatException e) { Log.error("Invalid argument " + line); Log.println("Options: [-l] | [num]"); return; } if (fileNr < 1 || fileNr > recentFiles.size()) { Log.error("Invalid recent file number"); return; } filename = recentFiles.get(recentFiles.size() - fileNr); } Log.println(filename); cmdOpen(filename); }
[ "public String getNLastCommand(int n) {\n return history.get(history.size() - n);\n }", "public void showLast() {\n L.showLast();\n }", "public abstract long getLastOpenedAt();", "void recordOpenFiles(int delta);", "void seekToLast();", "public static void logOpenFiles( boolean listFiles ) {\r\n\r\n\t\treturn;\r\n\r\n//\t\tif ( OperatingSystemDetection.isWindows() ) {\r\n//\r\n//\t\t\tlog.info( \"Unable to show open files with this approach since running on Windows.\" );\r\n//\r\n//\t\t} else {\r\n//\r\n//\r\n//\t\t\tInputStream is = null;\r\n//\t\t\tInputStreamReader isr = null;\r\n//\t\t\tBufferedReader reader = null;\r\n//\r\n//\t\t\tInputStream inStreamErr = null;\r\n//\t\t\tOutputStream outStrToProcess = null;\r\n//\r\n//\t\t\ttry {\r\n//\t\t\t\tint pid = pid();\r\n//\t\t\t\tRuntime runtime = Runtime.getRuntime();\r\n//\t\t\t\tProcess process = runtime.exec(\"lsof -p \" + pid);\r\n//\t\t\t\tis = process.getInputStream();\r\n//\t\t\t\tinStreamErr = process.getErrorStream();\r\n//\t\t\t\toutStrToProcess = process.getOutputStream();\r\n//\t\t\t\tisr = new InputStreamReader(is);\r\n//\t\t\t\treader = new BufferedReader(isr);\r\n//\t\t\t\tString line;\r\n//\r\n//\t\t\t\tStringBuilder openFilesSB = new StringBuilder( 1000 );\r\n//\r\n//\t\t\t\topenFilesSB.append( \"The list of open files: \\n\" );\r\n//\r\n//\t\t\t\tint fileCount = 0;\r\n//\t\t\t\tint slashDataCtr = 0;\r\n//\t\t\t\tint jarCtr = 0;\r\n//\t\t\t\tint soCtr = 0;\r\n//\t\t\t\tint logCtr = 0;\r\n//\t\t\t\tint slashDevCtr = 0;\r\n//\t\t\t\tint cannotIdentifyProtocolCtr = 0;\r\n//\t\t\t\tint pipeCtr = 0;\r\n//\r\n//\t\t\t\twhile ((line = reader.readLine()) != null) {\r\n//\r\n//\t\t\t\t\tfileCount++;\r\n//\r\n//\t\t\t\t\tif ( line.contains( \"/data/\" ) ) {\r\n//\r\n//\t\t\t\t\t\tslashDataCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\t\t\t\t\tif ( line.endsWith( \".jar\" ) ) {\r\n//\r\n//\t\t\t\t\t\tjarCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\t\t\t\t\tif ( line.endsWith( \".so\" ) ) {\r\n//\r\n//\t\t\t\t\t\tsoCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t\t\tif ( line.endsWith( \".log\" ) ) {\r\n//\r\n//\t\t\t\t\t\tlogCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t\t\tif ( line.contains( \"/dev/\" ) ) {\r\n//\r\n//\t\t\t\t\t\tslashDevCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t\t\tif ( line.contains( \"can't identify protocol\" ) ) {\r\n//\r\n//\t\t\t\t\t\tcannotIdentifyProtocolCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t\t\tif ( line.endsWith( \"pipe\" ) ) {\r\n//\r\n//\t\t\t\t\t\tpipeCtr++;\r\n//\t\t\t\t\t}\r\n//\r\n//\r\n//\r\n//\r\n//\t\t\t\t\topenFilesSB.append( \"Open File: \\t\" );\r\n//\r\n//\t\t\t\t\topenFilesSB.append( line );\r\n//\t\t\t\t\topenFilesSB.append( \"\\n\" );\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\tString openFiles = openFilesSB.toString();\r\n//\r\n//\t\t\t\tlog.info( \"Number of open files = \" + fileCount\r\n//\t\t\t\t\t\t+ \"\\t'/data/' files = \\t\" + slashDataCtr\r\n//\t\t\t\t\t\t+ \"\\t'.jar' files = \\t\" + jarCtr\r\n//\t\t\t\t\t\t+ \"\\t'.so' files = \\t\" + soCtr\r\n//\t\t\t\t\t\t+ \"\\t'.log' files = \\t\" + logCtr\r\n//\t\t\t\t\t\t+ \"\\t'/dev/' files = \\t\" + slashDevCtr\r\n//\t\t\t\t\t\t+ \"\\t'can't identify protocol' files = \\t\" + cannotIdentifyProtocolCtr\r\n//\t\t\t\t\t\t+ \"\\t'pipe' files = \\t\" + pipeCtr );\r\n//\r\n//\t\t\t\tif ( listFiles ) {\r\n//\r\n//\t\t\t\t\tlog.debug( openFiles );\r\n//\r\n//\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t} catch ( Throwable t ) {\r\n//\r\n//\t\t\t\tlog.error( \"Exception in listOpenFiles(): \", t );\r\n//\r\n//\r\n//\t\t\t\t// TODO handle and/or log exception\r\n//\r\n//\r\n//\t\t\t} finally {\r\n//\r\n//\t\t\t\tif ( reader != null ) {\r\n//\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\treader.close();\r\n//\t\t\t\t\t} catch ( Throwable t ) {\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\treader = null;\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\tif ( isr != null ) {\r\n//\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\tisr.close();\r\n//\t\t\t\t\t} catch ( Throwable t ) {\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tisr = null;\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\tif ( is != null ) {\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\tis.close();\r\n//\t\t\t\t\t} catch ( Throwable t ) {\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tis = null;\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\tif ( inStreamErr != null ) {\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\tinStreamErr.close();\r\n//\t\t\t\t\t} catch ( Throwable t ) {\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tinStreamErr = null;\r\n//\t\t\t\t}\r\n//\r\n//\r\n//\t\t\t\tif ( outStrToProcess != null ) {\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\toutStrToProcess.close();\r\n//\t\t\t\t\t} catch ( Throwable t ) {\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\toutStrToProcess = null;\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t}\r\n//\r\n//\t\t}\r\n\r\n\t}", "public void switchToLastWindow() {\n\t\tSet<String> windowHandles = getDriver().getWindowHandles();\n\t\tfor (String str : windowHandles) {\n\t\t\tgetDriver().switchTo().window(str);\n\t\t}\n\t}", "public void close() {\n\t\tPrintWriter out=null;\n\t\ttry {\n\t\t\tout = new PrintWriter(recent);\n\t\t\tfor(String s:history) {\n\t\t\t\tout.println(s);\n\t\t\t}\n\t\t\tout.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Cannot save recent files list\");\n\t\t}finally {\n\t\t\tif(out!=null) {\n\t\t\t\tout.close();\n\t\t\t}\n\t\t}\n\t}", "public void updateOpenFiles(final File file) {\n \n if (_recentFiles.size() == 0) {\n _insertSeparator(_pos); //one at top\n _pos++;\n }\n \n final FileOpenSelector recentSelector = new FileOpenSelector() {\n public File[] getFiles() { return new File[] { file }; }\n };\n \n removeIfInList(file);\n _recentFiles.add(0,file);\n\n _do(new Runnable1<JMenu>() {\n public void run(JMenu fileMenu) {\n JMenuItem newItem = new JMenuItem(\"\");\n newItem.addActionListener(new AbstractAction(\"Open \" + file.getName()) {\n public void actionPerformed(ActionEvent ae) {\n if (_recentFileAction != null) {\n _recentFileAction.actionPerformed(recentSelector);\n }\n }\n });\n try { newItem.setToolTipText(file.getCanonicalPath()); }\n catch(IOException e) {\n // don't worry about it at this point\n }\n fileMenu.insert(newItem,_pos);\n }\n });\n numberItems();\n }", "public Builder keepLast(int n){\n if(n <= 0){\n throw new IllegalArgumentException(\"Number of model files to keep should be > 0 (got: \" + n + \")\");\n }\n this.keepMode = KeepMode.LAST;\n this.keepLast = n;\n return this;\n }", "public JMenu getRecentFilesMenu() {\n JMenu menu = new JMenu( \"Recent Files\" );\n String recent = \"\";\n try {\n recent = Constants.PREFS.get( Constants.RECENT_LIST, \"\" );\n }\n catch ( Exception e ) {} // NOPMD\n ActionListener al =\n new ActionListener() {\n public void actionPerformed( ActionEvent ae ) {\n JMenuItem item = ( JMenuItem ) ae.getSource();\n String filename = item.getText();\n File file = new File( filename );\n openBuildFile( file );\n }\n };\n StringTokenizer st = new StringTokenizer( recent, File.pathSeparator );\n while ( st.hasMoreTokens() ) {\n JMenuItem item = new JMenuItem( st.nextToken() );\n item.addActionListener( al );\n menu.add( item );\n }\n return menu;\n }", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "public void switchToLastWindow()\n\t{\n\t\ttry\n\t\t{\n\t\t\t//Switching the window\n\t\t\tSet<String> allWindow = driver.getWindowHandles();\n\n\t\t\tfor (String oWnd : allWindow) {\n\t\t\t\tdriver.switchTo().window(oWnd);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tReporter.reportStep(\"Switching to last window throws exception\", \"FAIL\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t//takeScreenShot();\n\t\t}\n\t}", "private static List<BufferedInputStream> getOpenFiles(String[] args) {\n return Stream.of(args)\n .map(Paths::get)\n .map(EntryPoint::openFile)\n .filter(Optional::isPresent)\n .map(Optional::get)\n .map(BufferedInputStream::new)\n .collect(Collectors.toList());\n }", "public String output(int last) {\r\n String result;\r\n if (last > this.cmdStack.size()) {\r\n return this.output();\r\n } else {\r\n result = String.join(\"\\n\",\r\n this.cmdStack.subList(this.cmdStack.size() - last, this.cmdStack.size()));\r\n System.out.println(result);\r\n return result;\r\n }\r\n }", "List<String> getLastNFileLines(File readFile, int linesToRead);", "protected void restoreLastState() {\n\t\tInteger ii = Accessors.INT_ACCESSOR.get(\"numberOfFiles\");\n\t\tif(ii == null)\n\t\t\tii = 0;\n\t\tint jj = 0;\n\t\t\n\t\tFile file;\n\t\twhile(jj < ii) {\n\t\t\tfile = new File(Preference.PREFERENCES_NODE.get(\"editSession\" + ++jj, \"\"));\n\t\t\topen(file);\n\t\t}\n\t}", "public static String getLastCommand()\r\n\t{\r\n\t\treturn lastCommand; \r\n\t\t//test\r\n\t}", "private static String mkListByOldestModifiedCommand(final String directoryPath)\n {\n // -A: show all entries except of . and ..\n // -1: show one entry per line, names only\n // -t -r: sort by modification time (the oldest first thanx to -r)\n return \"ls -1 -A -t -r \" + directoryPath;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sortByTime Ascending order: min > max
public ArrayList<Playable> sortByTime(){ Collections.sort(playableList, new TimeComaparator() ); return this.playableList; }
[ "private static Comparator<Event> sortTimeComparator() \n\t{\n\t\treturn new \n\t\t\t\tComparator<Event>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic int compare(Event event1, Event event2) {\n\t\t\t\tif (event1.getStart().substring(0, 2).equals(event2.getStart().substring(0, 2))) {\n\t\t\t\t\treturn Integer.parseInt(event1.getStart().substring(3, 5)) - Integer.parseInt(event2.getStart().substring(3, 5));\n\t\t\t\t}\n\t\t\t\treturn Integer.parseInt(event1.getStart().substring(0, 2)) - Integer.parseInt(event2.getStart().substring(0, 2));\n\t\t\t}\n\t\t};\n\t}", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "List<Audit> getAuditListSortedByTimeAsc();", "private void sortTasksByEndTime(){\n // we have to write the comparator to sort these Task by the end time\n // It will tell how to compare the Task objects\n Comparator<Task> comparator = new Comparator<Task>(){\n \n // overriding COMPARE method.\n @Override\n public int compare(Task t1, Task t2){\n return t1.endTime - t2.endTime;\n }\n };\n \n // finally sorting in non-decreasing order\n Collections.sort(this.taskList,comparator);\n \n }", "double getSortTime();", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "public void sortNodesByFinishingTime() {\n\t\tArraySort.quickSort2(nodesFinishtime, nodesSortedbyFt, 0,\n\t\t\t\ttotalNumNodes - 1);\n\n\t\t// for(int i=0;i<totalNumNodes-1;i++){\n\t\t// for(int j=i+1; j<totalNumNodes;j++){\n\t\t// if(nodesFinishtime[i]<nodesFinishtime[j]){\n\t\t// int tmp = nodesFinishtime[j];\n\t\t// nodesFinishtime[j]=nodesFinishtime[i];\n\t\t// nodesFinishtime[i]=tmp;\n\t\t//\n\t\t// int tmp2 = nodesSortedbyFt[j];\n\t\t// nodesSortedbyFt[j]=nodesSortedbyFt[i];\n\t\t// nodesSortedbyFt[i]=tmp2;\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// ArraySort.quickSort2(nodesFinishtime, nodesSortedbyFt, 0,\n\t\t// totalNumNodes - 1);\n\t\t// ArraySort.printArray(totalNumNodes, nodesFinishtime);\n\t\t// ArraySort.printArray(totalNumNodes, nodesSortedbyFt);\n\t}", "private void sortIntervals() {\n Collections.sort(intervals, new TimerIntervalComparator());\n }", "private void sortByTimestamp() {\n internalList.sort((ReturnOrder first, ReturnOrder second) -> {\n LocalDateTime firstDateTime = first.getTimestamp().getOrderTimeStamp();\n LocalDateTime secondDateTime = second.getTimestamp().getOrderTimeStamp();\n return firstDateTime.compareTo(secondDateTime);\n });\n }", "public int compareTime(Time timeIn)\n {\n if(timeIn.getHour() > getHour())\n {\n return 1;\n }\n else if (timeIn.getHour() < getHour())\n {\n return -1;\n }\n else\n {\n return Integer.compare(timeIn.getMin(), getMin());\n }\n }", "public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}", "List<Audit> getAuditListSortedByTimeDesc();", "private void sortItems(){\n\t\tArrayList<StreamItem> sortedList = new ArrayList<StreamItem>();\n\t\tsortedList.add(items.get(0));\n\t\tfor(int i = 1; i < items.size(); i++) {\n\t\t\tint j = 0;\n\t\t\twhile(j < sortedList.size() && sortedList.get(j).getDate().after(items.get(i).getDate())){\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tsortedList.add(j, items.get(i));\n\t\t\t}\n\t\titems = sortedList;\n\t}", "public int compareTo(SensorTime time2){\n\t\tif(this.hour>time2.hour)\n\t\t\treturn 1;\n\t\tif(this.hour<time2.hour)\n\t\t\treturn -1;\n\t\tif(this.hour ==time2.hour){\n\t\t\tif (this.min>time2.min)\n\t\t\t\treturn 1;\n\t\t\telse if (this.min < time2.min)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}", "public int compare(TimeEntry t1, TimeEntry t2) {\n\t\t\t\t\treturn t1.getTime().compareTo(t2.getTime());\n\t\t\t\t//return 1;\n\t\t\t }", "private void setSortByTime(EventAdapter adapter) {\n Log.i(TAG, \"Sorting by time\");\n adapter.sort(new Comparator<Event>() {\n @Override\n public int compare(Event lhs, Event rhs) {\n return lhs.compareTo(rhs);\n }\n });\n }", "private void populateMinMaxTime()\n {\n final ColumnHolder columnHolder = index.getColumnHolder(ColumnHolder.TIME_COLUMN_NAME);\n try (final NumericColumn column = (NumericColumn) columnHolder.getColumn()) {\n this.minTime = DateTimes.utc(column.getLongSingleValueRow(0));\n this.maxTime = DateTimes.utc(column.getLongSingleValueRow(column.length() - 1));\n }\n }", "public void sortExecuteTime(){\n \n sortedList = new LinkedList<>(tasks.entrySet()); //initial sortedList\n \n Collections.sort(sortedList, new Comparator<Map.Entry<Integer, Task>>(){\n @Override\n public int compare(Map.Entry<Integer, Task> o1, Map.Entry<Integer, Task> o2) {\n return o1.getKey().compareTo(o2.getKey());\n }\n });\n }", "public Integer getTimeSort() {\n return timeSort;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ courseId, semesterId, centerId
@Override public CourseSemester getByCourseIdAndSemesterIdAndCenterId( Long courseId, Long semesterId, Long centerId) throws Exception { return courseSemesterRepository .findByCourseIdAndSemesterIdAndCenterIdAndStatusNot(courseId, semesterId, centerId, Status.DELETED) .orElse(null); }
[ "@PreAuthorize(\"isAuthenticated()\")\n List<Course> findCoursesForSubjectAndCurrentSemester(\n Subject subject);", "List<Course> getCourses(long institutionId);", "courses selectByPrimaryKey(String courseId);", "@PreAuthorize(\"isAuthenticated()\")\n List<Course> findCoursesForCurrentSemesterForLecturer(\n LecturerEntity lecturer);", "public List<Course> viewAvailableCourses(String studentId) throws SQLException;", "public List<StudentCourseVo> findMycourse(Integer studentId);", "public void setCentreId(int id)\r\n {\r\n this.centreId = id;\r\n }", "public List<Course> viewRegisteredCourses(String studentId) throws SQLException;", "List<Enrollment> getEnrolmentCenters();", "@Query(\"SELECT courseId FROM course_selection_table WHERE semesterId = :id\")\n LiveData<List<String>> getThisSemesterCourses(int id);", "@Query(\"SELECT _id FROM course_selection_table WHERE semesterId = :semesterId AND courseId = :courseId\")\n LiveData<Integer> getIdforCourseSelection(int semesterId, int courseId);", "long getCourseid();", "void index(Course course);", "List<CourseRequestBean> findCoursesBySearchParametr(String parameter) throws DBException;", "public Course getCourse(long courseId);", "@GetMapping(\"/students/{student_id}/courses\")\n public List<Course> getCourses(@PathVariable(value=\"student_id\") short student_id) {\n Student student = studentRepository.getOne(student_id);\n return student.getCourseList();\n }", "@Override\n public Page<Course> searchCoursesFromIndex(CourseSearchCondition csc)\n throws ServerErrorException {\n \tlogger.debug(LogConstants.getDebugInput(\"Course search condition\", csc));\n Analyzer analyzer = new IKAnalyzer();\n List<Course> courses = new ArrayList<Course>();\n Page<Course> page = new Page<Course>();\n\n if (null != csc) {\n csc.setQueryString(csc.getQueryString().trim());\n List<String> luceneSpecialOperator = Arrays.asList(IndexFieldConstants.LUCENE_OPEERATOR);\n if (null == csc.getQueryString() || csc.getQueryString().equals(\"\") \n || luceneSpecialOperator.contains(csc.getQueryString().trim())) {\n csc.setQueryString(\"*\");\n }\n // parse queryString to Query type.\n QueryParser queryParser = new MultiFieldQueryParser(\n\t\t\t Version.LUCENE_30, csc.getSearchFields(), analyzer, csc.getBoosts());\n\n // * or ? are allowed as the first character of a PrefixQuery and\n // WildcardQuery.\n queryParser.setAllowLeadingWildcard(true);\n Boolean flag = false;\n // booleanQuery as a filter\n BooleanQuery booleanQuery = new BooleanQuery();\n \n // Query existQuery = new TermQuery(new\n // Term(IndexFieldConstants.COURSE_IS_DELETED,\n // FlagConstants.UNDELETED + \"\"));\n Query query = null;\n try { \n query = queryParser.parse(csc.getQueryString());\n \n if (csc.getTypeIds() != null && !csc.getTypeIds().isEmpty()) {\n QueryParser typeQueryParser = new QueryParser(\n Version.LUCENE_30,\n IndexFieldConstants.PREFIX_COURSE_TYPE\n + IndexFieldConstants.TYPE_ID, analyzer);\n Query typeQuery = null;\n typeQuery = typeQueryParser.parse(csc.getTypeIds().trim());\n booleanQuery.add(typeQuery, Occur.MUST);\n flag = true;\n }\n if (csc.getIsCertificateds() != null\n && !csc.getIsCertificateds().isEmpty()) {\n QueryParser certificatedQueryParser = new QueryParser(\n Version.LUCENE_30,\n IndexFieldConstants.COURSE_IS_CERTIFICATED,\n analyzer);\n Query certificateedQuery = null;\n certificateedQuery = certificatedQueryParser.parse(csc\n .getIsCertificateds().trim());\n booleanQuery.add(certificateedQuery, Occur.MUST);\n flag = true;\n }\n // undeleted course\n QueryParser deleteQueryParser = new QueryParser(\n Version.LUCENE_30,\n IndexFieldConstants.COURSE_IS_DELETED, analyzer);\n Query deleteQuery = deleteQueryParser.parse(\"\"\n + FlagConstants.UN_DELETED);\n booleanQuery.add(deleteQuery, Occur.MUST);\n flag = true;\n } catch (ParseException e) {\n logger.error(LogConstants.exceptionMessage(\"Parse query\"), e);\n throw new ServerErrorException(ErrorCodeConstants.SERVER_ERROR);\n }\n QueryWrapperFilter filter = null;\n if (flag) {\n filter = new QueryWrapperFilter(booleanQuery);\n }\n int totalRecords = courseDao.queryTotalRecordsFromIndex(query,\n filter);\n try {\n \tString sortField = csc.getSortField();\n \tif (null == csc.getSortField() || csc.getSortField().equals(\"null\") || \"\".equals(csc.getSortField())) {\n \t\tsortField = null;\n \t}\n \tif (sortField == null && csc.getQueryString().equals(\"*\")) {\n \t\tsortField = IndexFieldConstants.PREFIX_ID;\n \t}\n \tcourses = courseDao.queryObjectFromIndex(query, sortField,\n csc.getReverse(), filter, csc.getFirstResult(), csc\n .getPageSize());\n } catch (Exception e) {\n \tlogger.error(LogConstants.exceptionMessage(\"Query Object from index\"), e);\n \tthrow new ServerErrorException(ErrorCodeConstants.SERVER_ERROR);\n\t\t\t}\n \n page.setNowPager(csc.getNowPage());\n page.setPageSize(csc.getPageSize());\n page.setTotalRecords(totalRecords);\n page.setList(courses);\n }\n logger.debug(LogConstants.getDebugOutput(\"Search courses\", page));\n return page;\n }", "public Integer addCourseStudent(Integer openId, Integer studentId);", "public JobCenterBean selectJobCenterList(JobCenterBean param) throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all pairs within values which sum up to targetSum
public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum) { HashMap<Integer, Integer> tableCompteur = new HashMap<>(); LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>(); Collection<MatchingPair> paireSansDuplication = new LinkedList(); Collection<MatchingPair> solution = new LinkedList(); // On itere sur les valeurs donnee pour savoir le compte de chaque valeur for (Integer valeur : values) { if (tableCompteur.containsKey(valeur)) { // Partie Compteur Integer compteur = tableCompteur.get(valeur); compteur++; tableCompteur.put(valeur, compteur); } else { tableCompteur.put(valeur, 0); } } // On itere sur les valeurs donnee pour savoir les paires for (Integer element : values) { int temp = targetSum - element; if (tablePaire.containsKey(element)) { if (tablePaire.get(element) != null) { paireSansDuplication.add(new MatchingPair(element, temp)); } // si la table contient l'element on met nul pour ne pas avoir de repetition tablePaire.put(temp, null); } else if (!tablePaire.containsKey(element)) { tablePaire.put(temp, element); } } // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire) for (MatchingPair paire : paireSansDuplication) { if (paire != null) { // verification au debug pr erreur nullpointer int a = tableCompteur.get(paire.first); int b = tableCompteur.get(paire.second); int minCount = Math.min(a+1, b+1); for (int i = 0; i < pow(minCount, 2); i++) { solution.add(new MatchingPair(paire.first, paire.second)); } } } return solution; }
[ "static boolean pairSum(int[] nums, int targetSum) {\n HashMap<Integer, Integer> hm = new HashMap<>();\n int appearsTwice = 0;\n for (int i=0; i<nums.length; i++) {\n if(!hm.containsKey(nums[i]))\n hm.put(nums[i],0);\n hm.put(nums[i], hm.get(nums[i])+1);\n }\n for (int i=0; i<nums.length; i++) {\n if(hm.get(targetSum-nums[i]) != null)\n appearsTwice += hm.get(targetSum-nums[i]);\n if (targetSum-nums[i] == nums[i])\n appearsTwice--;\n }\n return appearsTwice/2 == 1 ? true : false;\n }", "public static List<List<Integer>> combinationSum(int[] candidates, int target) {\n if ( target <= 0 ) {\n return new ArrayList<>();\n }\n\n List<List<Integer>> dp = new ArrayList<>();\n for (int i = 0; i < target + 1; i++) {\n dp.add(new ArrayList<>());\n }\n\n // Sort the given values in ascending order\n Arrays.sort(candidates);\n\n for (int i = 1; i <= target; i++) {\n\n for (int j = 0; j < candidates.length - 1; j++) {\n // The sum we are trying to find is less than the sum of the running target\n if (i < candidates[j]) continue;\n\n int temp = i - candidates[j];\n\n List<Integer> tempResult = new ArrayList<>();\n\n if (temp == 0) {\n tempResult.add(candidates[j]);\n } else if (!dp.get(temp).isEmpty() ) {\n tempResult.add(candidates[j]);\n tempResult.addAll(dp.get(temp));\n } else {\n continue;\n }\n\n dp.set(i, tempResult);\n }\n }\n\n List<List<Integer>> result = new ArrayList<>();\n for (int i = 0 ; i <= candidates.length - 1; i ++) {\n\n int temp = target - candidates[i];\n\n if (temp == 0) {\n result.add(Arrays.asList(candidates[i]));\n } else if (!dp.get(temp).isEmpty() ) {\n Collections.addAll(dp.get(temp), candidates[i]);\n result.add(dp.get(temp));\n }\n\n }\n\n return result;\n }", "public static ArrayList<int[]> pairsThatEqualSum(int[] inputArray, int targetSum) {\n\t\tArrays.sort(inputArray);\n\t\tint start = 0;\n\t\tint end = inputArray.length - 1;\n\t\tArrayList<int[]> arr = new ArrayList<>();\n\t\twhile (start < end) {\n\t\t\tif (inputArray[start] + inputArray[end] == targetSum) {\n\t\t\t\tint[] array = { start, end };\n\t\t\t\tarr.add(array);\n\t\t\t\tstart++;\n\t\t\t\tend--;\n\t\t\t}\n\t\t\tif (inputArray[start] + inputArray[end] < targetSum) {\n\t\t\t\tstart++;\n\t\t\t} else if (inputArray[start] + inputArray[end] > targetSum) {\n\t\t\t\tend--;\n\t\t\t}\n\n\t\t}\n\t\treturn arr;\n\t}", "private int numOfPairs(int[] nums, int start, int end, int target){\n int res = 0;\n while(start < end){\n int sum = nums[start] + nums[end];\n if(sum < target){\n res += end - start;\n start++;\n }\n else{\n end--;\n }\n }\n return res;\n }", "public int combinationSum4(int[] nums, int target) {\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int num : nums)\n\t\t\tmin = Math.min(min, num);\n\t\tif (target < min)\n\t\t\treturn 0;\n\t\tint[] dp = new int[target + 1];\n\t\tfor (int num : nums)\n\t\t\tif (num <= target)\n\t\t\t\tdp[num]++;\n\t\tfor (int sum = 0; sum <= target; sum++) {\n\t\t\tfor (int num : nums) {\n\t\t\t\tif (sum - num >= 0) {\n\t\t\t\t\tdp[sum] += dp[sum - num];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[target];\n\t}", "public static List<Integer> howSum(int targetSum, List<Integer> numbers) {\n return howSumWithMemo(targetSum, numbers, new HashMap<>());\n }", "public int findTargetSumWays(int[] nums, int target) {\n int sum = Arrays.stream(nums).sum();\n int minusSum = (sum + target) / 2;\n if(((sum + target ) % 2) == 1 ) {\n return 0;\n }\n int[] dp = new int[minusSum + 1];\n dp[0] = 1;\n for(int num : nums) {\n for(int i = minusSum; i >= num; i --) {\n dp[i] += dp[i-num];\n }\n }\n return dp[minusSum];\n }", "public static List<List<Integer>> findSubsetSum(List<Integer> set, int target)\n {\n List<List<Integer>> toReturn = new ArrayList<>();\n \n if (set.size() == 1)\n {\n // base case\n if (set.get(0).equals(target))\n {\n List<Integer> result = new ArrayList<>();\n result.add(target);\n toReturn.add(result);\n }\n }\n else\n {\n // create copy of set, but with one value removed\n ArrayList<Integer> temp = new ArrayList<>();\n temp.addAll(set);\n int lastValue = temp.remove(temp.size() - 1); // remove at index i\n\n // try finding subsets that add up to target, without the last value\n List<List<Integer>> resultsWithoutLastValue = findSubsetSum(temp, target);\n if (resultsWithoutLastValue.size() != 0)\n {\n toReturn.addAll(resultsWithoutLastValue);\n }\n \n // try finding subsets that add up to target, if last value is added too\n List<List<Integer>> resultsWithLastValue = findSubsetSum(temp, target - lastValue);\n if (resultsWithLastValue.size() != 0)\n {\n // put the missing value back into the solution\n for (List<Integer> lst : resultsWithLastValue)\n {\n lst.add(lastValue);\n }\n toReturn.addAll(resultsWithLastValue);\n }\n else\n {\n // no results, but the one element set with just 'lastValue' \n // could be a solution too\n if (lastValue == target)\n {\n List<Integer> result = new ArrayList<>();\n result.add(target);\n toReturn.add(result);\n }\n }\n } \n return toReturn;\n }", "private static int[] twoSumMap(int[] nums, int target){\n Map<Integer, Integer> map = new HashMap<>(); //the size of the map expanded as\n //the input take place\n for (int i = 0; i < nums.length; i++){\n map.put(nums[i], i);\n }\n\n for (int i = 0; i < nums.length; i++){\n int complement = target - nums[i];\n if (map.keySet().contains(complement) && map.get(complement) != i){\n return new int[] {i, map.get(complement)};\n }\n }\n\n throw new IllegalArgumentException(\"No two sum solution\");\n\n }", "public int solveSublistSumTarget(int[] nums, int target) {\n\t\tint res = 0;\n\t\tMap<Integer, Integer> map = new HashMap<>();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tsum += nums[i];\n\t\t\tif (sum == target)\n\t\t\t\tres++;\n\n\t\t\tif (map.get(sum - target) != null)\n\t\t\t\tres += map.get(sum - target);\n\n\t\t\tmap.put(sum, map.getOrDefault(sum, 0) + 1);\n\t\t}\n\t\treturn res;\n\t}", "public List<List<Integer>> fourSum(int[] nums, int target) {\n Arrays.sort(nums); // sort\n List<List<Integer>> res = new ArrayList<>();\n if (nums.length < 4) return res;\n\n for (int i = 0; i < nums.length - 3; i++) {\n if (i == 0 || (i > 0 && nums[i] != nums[i - 1])) { // dedupe\n int sum1 = target - nums[i];\n for (int j = i + 1; j < nums.length - 2; j++) {\n if (j == i + 1 || (j > i + 1 && nums[j] != nums[j - 1])) {\n int newTarget = sum1;\n int left = j + 1, right = nums.length - 1, sum2 = newTarget - nums[j];\n while (left < right) {\n if (nums[left] + nums[right] == sum2) {\n res.add(new ArrayList<>(Arrays.asList(nums[i],\n nums[j], nums[left], nums[right])));\n\n while (left < right && nums[left] == nums[left + 1])\n left++; // dedupe\n while (left < right && nums[right] == nums[right - 1])\n right--; // dedupe\n\n left++; right--;\n }\n else if (nums[left] + nums[right] < sum2)\n left++;\n else right--;\n }\n }\n }\n }\n }\n return res;\n }", "public static int[] twoSumHash(int [] nums ,int target){\r\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer,Integer>();\r\n\t\tint[] res = new int[2];\r\n\t\tfor(int i = 0 ; i < nums.length ; i++){\r\n\t\t\tint compliment = target - nums[i];\r\n\t\t\tif(map.containsKey(compliment)) {res[0] = map.get(compliment);res[1] = i; return res;}\r\n\t\t\tmap.put(nums[i],i);\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public int combinationSum4(int[] nums, int target) {\n\t\tint[] memo = new int[target + 1];\n\t\t// !!!!-1\n\t\tArrays.fill(memo, -1);\n\t\tint res = dfs(nums, memo, target);\n\t\treturn res;\n\n\t}", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "public static int threeSumClosest(int[] num, int target) {\n Arrays.sort(num);\n int closestSum = Integer.MAX_VALUE;\n \n int left, right;\n for(int i = 0; i < num.length-2; i++){\n left = i+1;\n right = num.length - 1;\n \n while(left < right){\n \n // we havent found a closestSum yet, just take the first sum\n if(closestSum == Integer.MAX_VALUE){\n closestSum = num[left] + num[right] + num[i];\n }\n \n // checks for the closest of sums\n else if(Math.abs(closestSum - target) > (Math.abs(target - (num[left] + num[right] + num[i])))){\n closestSum = num[left] + num[right] + num[i];\n \n // if you sum up to target, there is no possible closer sum\n if(closestSum == target){\n return target;\n }\n }\n \n \n if(num[left] + num[right] + num[i] < target){\n left++;\n }\n else{\n right--;\n }\n }\n \n }\n return closestSum;\n }", "private static int threeSumClosest(int[] nums, int target) {\n // use two pointer idea\n\n int closest = Integer.MAX_VALUE;\n\n // sort nums\n Arrays.sort(nums);\n\n // use -2 so have room for next two pointers\n for(int i = 0; i < nums.length - 2; i++){\n int j = i + 1;\n int k = nums.length - 1;\n\n while(j < k){\n int tmpSum = nums[i] + nums[j] + nums[k];\n // if equal than done\n if(tmpSum == target)\n return tmpSum;\n // update closest if necessary\n if(Math.abs(target - tmpSum) < Math.abs(target - closest)){\n closest = tmpSum;\n }\n\n if(tmpSum < target)\n j++;\n if(tmpSum > target)\n k--;\n }\n }\n\n return closest;\n }", "public int subsetMinMaxSumLessThanK(int[] nums, int target) {\n\t\tif (nums == null || nums.length == 0) return 0;\n\t\tArrays.sort(nums);\n\t\tint start = 0;\n\t\tint end = nums.length - 1;\n\t\tint res = 0;\n\t\twhile (start <= end) {\n\t\t\tif (nums[start] + nums[end] <= target) {\n\t\t\t\tres += Math.pow(2, end - start);\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tend--;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public static Optional<Pair<Integer, Integer>> twoPointers(List<Integer> sorted, int targetSum) {\n return twoPointers(sorted, targetSum, 0, sorted.size() - 1);\n }", "public int findTargetSumWays(int[] nums, int S) {\n \n int sum = 0;\n for(int n: nums){\n sum += n;\n }\n if (S < -sum || S > sum) { return 0;}\n \n int[][] dp = new int[nums.length + 1][ 2 * sum + 1];\n dp[0][0 + sum] = 1; // 0 + sum means 0, 0 means -sum, check below graph\n for(int i = 1; i <= nums.length; i++){\n for(int j = 0; j < 2 * sum + 1; j++){\n \n if(j + nums[i - 1] < 2 * sum + 1) dp[i][j] += dp[i - 1][j + nums[i - 1]];\n if(j - nums[i - 1] >= 0) dp[i][j] += dp[i - 1][j - nums[i - 1]];\n }\n }\n return dp[nums.length][sum + S];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the location of the picture thumbnail
public void setThumbnailLocation(String thumbnailLocation) { this.thumbnailLocation = thumbnailLocation; }
[ "public void setThumbnail(Image thumbnail) {\r\n this.thumbnail = thumbnail;\r\n }", "void setThumbnail(Bitmap thumbnail) {\n\t\tthis.mThumbnail = thumbnail;\n\t}", "void setImageLocation(URL imageLocation) throws IOException;", "public String getThumbnailLocation() {\n\t\treturn this.thumbnailLocation;\n\t}", "public void setSetThumbnailImage(Image setThumbnailImage) {\n\t\tthis.setThumbnailImage = setThumbnailImage;\n\t}", "public void setPicture(Picture p){\n\t picture=p;\n\t pictureLabel.setIcon(new ImageIcon(p.getImage()));\n\t this.pack(); //resize for the new picture\t\n\t}", "@Override\r\n\tpublic void setImageBitmap(Bitmap source) {\n//\r\n//\t\tMatrix matrix = new Matrix();\r\n//\t\tmatrix.postScale(ratio, ratio);\r\n//\t\tsource = Bitmap.createBitmap(source, 0, 0, width, height, matrix, true);\r\n//\r\n//\t\twidth = source.getWidth();\r\n//\t\theight = source.getHeight();\r\n//\r\n//\t\tx = (width - ConfigSize.SIZE_THUMB) / 2;\r\n//\t\ty = (height - ConfigSize.SIZE_THUMB) / 2;\r\n//\r\n//\t\tsource = Bitmap.createBitmap(source, x, y, ConfigSize.SIZE_THUMB,\r\n//\t\t\t\tConfigSize.SIZE_THUMB);\r\n\r\n\t\tsuper.setImageBitmap(source);\r\n\t}", "public void setPreview(Bitmap bitmap) {\n m_thumbnail.setImageBitmap(bitmap);\n crossFadeThumbnail();\n }", "private void setPicture(){\n\t\tif(getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE){\n\n\t\t\tif(mData.getMintemperature()<=0){\n\t\t\t\tmImageView.setImageResource(R.drawable.frost_pic);\n\t\t\t\tmImageView.setVisibility(android.view.View.VISIBLE);\t\t\n\t\t\t}else {\n\t\t\t\tmImageView.setImageResource(R.drawable.sunflowers);\n\t\t\t\tmImageView.setVisibility(android.view.View.VISIBLE);\n\t\t\t}\n\t\t}\n\t}", "public void setPreviewImageLocation(String previewImageLocation) {\n this.previewImageLocation = previewImageLocation;\n }", "private void showThumbnail(){\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n Bitmap imageBitmap = BitmapFactory.decodeFile(mImageFile.getAbsolutePath(), bmOptions);\n mImageView.setImageBitmap(imageBitmap);\n }", "public void setThumb( final int value ) {\n \tcheckWidget();\n \tif( value >= 1 ) {\n thumb = value;\n }\n \tif( value >= maximum - minimum ) {\n \t thumb = maximum - minimum;\n \t selection = minimum;\n \t}\n }", "public void setThumbnailUrl(String url) {\n this.thumbnailUrl = url;\n }", "Builder addThumbnailUrl(URL value);", "public void setThumbnailUrl(String value) {\n setAttributeInternal(THUMBNAILURL, value);\n }", "@Test\n\tpublic final void testSetImageLocation() {\n\t\trobotImage.setImageLocation(RESOURCE_PATH_SOMEIMAGE_JPG);\n\t\tassertEquals(RESOURCE_PATH_SOMEIMAGE_JPG, robotImage.getImageLocation());\n\t}", "private void setImageResize() {\n\t\ttry {\n\n\t\t\tif (GlobalMethods.validateString(mCurrentPhotoPath)) {\n\t\t\t\tPoint ptImageSize = GlobalMethods.getImageSize(Uri.parse(mCurrentPhotoPath));\n\t\t\t\tPoint ptDisplaySize = GlobalMethods.getDisplaySize(this.getActivity());\n\n\t\t\t\tint inSampleSize = 1;\n\n\t\t\t\tif (ptImageSize != null) {\n\t\t\t\t\tinSampleSize = GlobalMethods.getInSampleSize(ptImageSize.y, ptImageSize.x, Math.round(ptDisplaySize.y / 4), Math.round(ptDisplaySize.x / 4));\n\t\t\t\t}\n\n\t\t\t\t//Clear memory\n\t\t\t\tclearMemory();\n\n\t\t\t\tBitmapFactory.Options bmOptions = new BitmapFactory.Options();\n\t\t\t\tbmOptions.inSampleSize = inSampleSize;\n\t\t\t\tbitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\t\t\tbitmap = rotateBitmap(bitmap, mCurrentPhotoPath);\n\t\t\t\timv_image.setImageBitmap(bitmap);\n\t\t\t\timv_image.refreshDrawableState();\n\n\t\t\t\tuploadTask();\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tif (GlobalVariables.PRINT_DEBUG) {\n\t\t\t\tLog.e(TAG, \" \" + ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "Builder addThumbnailUrl(String value);", "public void setThumb(IFigure figure) {\n if(figure != null)\n figure.addMouseListener(new MouseListener.Stub(){\n @Override\n public void mousePressed(MouseEvent me) {\n if(!hasFocus())\n requestFocus();\n }\n });\n if (thumb != null) {\n thumb.removeMouseListener(thumbDragger);\n thumb.removeMouseMotionListener(thumbDragger);\n remove(thumb);\n }\n thumb = figure;\n if (thumb != null) {\n thumb.addMouseListener(thumbDragger);\n thumb.addMouseMotionListener(thumbDragger);\n add(thumb, ScrollBarLayout.THUMB);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstType__Group_0_1_0__2" $ANTLR start "rule__AstType__Group_0_1_0__2__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20218:1: rule__AstType__Group_0_1_0__2__Impl : ( ( rule__AstType__Group_0_1_0_2__0 ) ) ;
public final void rule__AstType__Group_0_1_0__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20222:1: ( ( ( rule__AstType__Group_0_1_0_2__0 )* ) ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20223:1: ( ( rule__AstType__Group_0_1_0_2__0 )* ) { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20223:1: ( ( rule__AstType__Group_0_1_0_2__0 )* ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20224:1: ( rule__AstType__Group_0_1_0_2__0 )* { before(grammarAccess.getAstTypeAccess().getGroup_0_1_0_2()); // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20225:1: ( rule__AstType__Group_0_1_0_2__0 )* loop161: do { int alt161=2; int LA161_0 = input.LA(1); if ( (LA161_0==81) ) { alt161=1; } switch (alt161) { case 1 : // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20225:2: rule__AstType__Group_0_1_0_2__0 { pushFollow(FOLLOW_rule__AstType__Group_0_1_0_2__0_in_rule__AstType__Group_0_1_0__2__Impl40575); rule__AstType__Group_0_1_0_2__0(); state._fsp--; } break; default : break loop161; } } while (true); after(grammarAccess.getAstTypeAccess().getGroup_0_1_0_2()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__AstType__Group_0_1_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20211:1: ( rule__AstType__Group_0_1_0__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20212:2: rule__AstType__Group_0_1_0__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0__2__Impl_in_rule__AstType__Group_0_1_0__240548);\n rule__AstType__Group_0_1_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_0_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20305:1: ( rule__AstType__Group_0_1_0_2__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20306:2: rule__AstType__Group_0_1_0_2__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0_2__2__Impl_in_rule__AstType__Group_0_1_0_2__240734);\n rule__AstType__Group_0_1_0_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20718:1: ( rule__AstType__Group_0_1_2_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20719:2: rule__AstType__Group_0_1_2_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_1__1__Impl_in_rule__AstType__Group_0_1_2_1__141546);\n rule__AstType__Group_0_1_2_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_1_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20493:1: ( rule__AstType__Group_0_1_1_2__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20494:2: rule__AstType__Group_0_1_1_2__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_1_2__2__Impl_in_rule__AstType__Group_0_1_1_2__241106);\n rule__AstType__Group_0_1_1_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20781:1: ( rule__AstType__Group_0_1_2_1_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20782:2: rule__AstType__Group_0_1_2_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_1_1__1__Impl_in_rule__AstType__Group_0_1_2_1_1__141670);\n rule__AstType__Group_0_1_2_1_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20842:1: ( rule__AstType__Group_0_1_2_3__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20843:2: rule__AstType__Group_0_1_2_3__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__1__Impl_in_rule__AstType__Group_0_1_2_3__141791);\n rule__AstType__Group_0_1_2_3__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20649:1: ( rule__AstType__Group_0_1_2__4__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20650:2: rule__AstType__Group_0_1_2__4__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__4__Impl_in_rule__AstType__Group_0_1_2__441417);\n rule__AstType__Group_0_1_2__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20905:1: ( rule__AstType__Group_0_1_2_3_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20906:2: rule__AstType__Group_0_1_2_3_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3_1__1__Impl_in_rule__AstType__Group_0_1_2_3_1__141915);\n rule__AstType__Group_0_1_2_3_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20399:1: ( rule__AstType__Group_0_1_1__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20400:2: rule__AstType__Group_0_1_1__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_1__2__Impl_in_rule__AstType__Group_0_1_1__240920);\n rule__AstType__Group_0_1_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20121:1: ( rule__AstType__Group_0__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20122:2: rule__AstType__Group_0__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0__1__Impl_in_rule__AstType__Group_0__140366);\n rule__AstType__Group_0__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20620:1: ( rule__AstType__Group_0_1_2__3__Impl rule__AstType__Group_0_1_2__4 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20621:2: rule__AstType__Group_0_1_2__3__Impl rule__AstType__Group_0_1_2__4\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__3__Impl_in_rule__AstType__Group_0_1_2__341356);\n rule__AstType__Group_0_1_2__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__4_in_rule__AstType__Group_0_1_2__341359);\n rule__AstType__Group_0_1_2__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20632:1: ( ( ( rule__AstType__Group_0_1_2_3__0 )? ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20633:1: ( ( rule__AstType__Group_0_1_2_3__0 )? )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20633:1: ( ( rule__AstType__Group_0_1_2_3__0 )? )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20634:1: ( rule__AstType__Group_0_1_2_3__0 )?\n {\n before(grammarAccess.getAstTypeAccess().getGroup_0_1_2_3()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20635:1: ( rule__AstType__Group_0_1_2_3__0 )?\n int alt165=2;\n int LA165_0 = input.LA(1);\n\n if ( (LA165_0==RULE_ID||(LA165_0>=38 && LA165_0<=45)||LA165_0==58||LA165_0==81) ) {\n alt165=1;\n }\n switch (alt165) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20635:2: rule__AstType__Group_0_1_2_3__0\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__0_in_rule__AstType__Group_0_1_2__3__Impl41386);\n rule__AstType__Group_0_1_2_3__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getAstTypeAccess().getGroup_0_1_2_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20813:1: ( rule__AstType__Group_0_1_2_3__0__Impl rule__AstType__Group_0_1_2_3__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20814:2: rule__AstType__Group_0_1_2_3__0__Impl rule__AstType__Group_0_1_2_3__1\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__0__Impl_in_rule__AstType__Group_0_1_2_3__041731);\n rule__AstType__Group_0_1_2_3__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__1_in_rule__AstType__Group_0_1_2_3__041734);\n rule__AstType__Group_0_1_2_3__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7012:1: ( rule__AstTypeDefinition__Group_2_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7013:2: rule__AstTypeDefinition__Group_2_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2_1__1__Impl_in_rule__AstTypeDefinition__Group_2_1__114546);\n rule__AstTypeDefinition__Group_2_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeParam__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21440:1: ( rule__AstTypeParam__Group_0__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21441:2: rule__AstTypeParam__Group_0__2__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeParam__Group_0__2__Impl_in_rule__AstTypeParam__Group_0__242967);\n rule__AstTypeParam__Group_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6947:1: ( rule__AstTypeDefinition__Group_2__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6948:2: rule__AstTypeDefinition__Group_2__2__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__2__Impl_in_rule__AstTypeDefinition__Group_2__214421);\n rule__AstTypeDefinition__Group_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7075:1: ( rule__AstTypeDefinition__Group_2_1_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7076:2: rule__AstTypeDefinition__Group_2_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2_1_1__1__Impl_in_rule__AstTypeDefinition__Group_2_1_1__114670);\n rule__AstTypeDefinition__Group_2_1_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6887:1: ( rule__AstTypeDefinition__Group_2__0__Impl rule__AstTypeDefinition__Group_2__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6888:2: rule__AstTypeDefinition__Group_2__0__Impl rule__AstTypeDefinition__Group_2__1\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__0__Impl_in_rule__AstTypeDefinition__Group_2__014298);\n rule__AstTypeDefinition__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__1_in_rule__AstTypeDefinition__Group_2__014301);\n rule__AstTypeDefinition__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20153:1: ( rule__AstType__Group_0_1_0__0__Impl rule__AstType__Group_0_1_0__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20154:2: rule__AstType__Group_0_1_0__0__Impl rule__AstType__Group_0_1_0__1\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0__0__Impl_in_rule__AstType__Group_0_1_0__040427);\n rule__AstType__Group_0_1_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0__1_in_rule__AstType__Group_0_1_0__040430);\n rule__AstType__Group_0_1_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a list with all the Announcements by type Id
public static java.util.List<com.gleo.plugins.hexiagon.model.Announcement> getAnnouncementsByTypeId( long typeId) throws com.liferay.portal.kernel.exception.SystemException { return getService().getAnnouncementsByTypeId(typeId); }
[ "public static List<Announcement> findByTypeId(long typeId) {\n\t\treturn getPersistence().findByTypeId(typeId);\n\t}", "public static Announcement fetchByTypeId_First(long typeId,\n\t\tOrderByComparator<Announcement> orderByComparator) {\n\t\treturn getPersistence().fetchByTypeId_First(typeId, orderByComparator);\n\t}", "public List<EventDto> getEventsByType(int typeId);", "public List<Announcement> getAllAnnouncements() {\n\t List<Announcement> announcementList = new ArrayList<Announcement>();\n\t // Select All Query\n\t String selectQuery = \"SELECT * FROM \" + TABLE_ANNOUNCEMENTS;\n\t \n\t SQLiteDatabase db = this.getWritableDatabase();\n\t Cursor cursor = db.rawQuery(selectQuery, null);\n\t \n\t // looping through all rows and adding to list\n\t if (cursor.moveToFirst()) {\n\t do {\n\t \tAnnouncement announcement = new Announcement();\n\t \tannouncement.setID(Integer.parseInt(cursor.getString(0)));\n\t \tannouncement.setTitle(cursor.getString(1));\n\t \tannouncement.setAlert(cursor.getString(2));\n\t \tannouncement.setDatetime(cursor.getString(3));\n\t \tannouncement.setStatus(cursor.getString(4));\n\t // Adding Announcement to list\n\t announcementList.add(announcement);\n\t } while (cursor.moveToNext());\n\t }\n\t // return announcementList\n\t return announcementList;\n\t}", "@RequestMapping(\"/getAnnouncements\")\n public ResponseEntity getAnnouncements(@RequestParam(value=\"id\", required=true) long id){\n \t\n \tif(!hackathons.containsKey(id)){\n \t\treturn new ResponseEntity<EmptyJSONResponse>(new EmptyJSONResponse(), HttpStatus.OK);\n \t}\n \t\n \tHackathon hackathon = hackathons.get(id);\n \treturn new ResponseEntity<ArrayList<String>>(hackathon.getAnnouncements(), HttpStatus.OK);\n }", "public static int getAnnouncementsCountByTypeId(long typeId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getService().getAnnouncementsCountByTypeId(typeId);\n }", "public static Announcement fetchByTypeId_Last(long typeId,\n\t\tOrderByComparator<Announcement> orderByComparator) {\n\t\treturn getPersistence().fetchByTypeId_Last(typeId, orderByComparator);\n\t}", "public static List<Announcement> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "private void getAnouncements() {\n\t\tshowProgressDialog(getResources().getString(\n\t\t\t\tR.string.progress_announcements));\n\t\tBundle params = new Bundle();\n\t\tparams.putString(\"fields\", \"feed\");\n\t\tFacebookResponseHandler handler = new FacebookResponseHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void handleResponse(Object response) {\n\t\t\t\tFeedParser feedParser = new FeedParser((JSONObject) response,\n\t\t\t\t\t\tBTEHomePageActivity.this);\n\t\t\t\tArrayList<Announcements> alAnnouncementModels = feedParser\n\t\t\t\t\t\t.getAnouncements();\n\t\t\t\tadapter.refresh(alAnnouncementModels);\n\t\t\t\tDataBaseManager.insertAnnouncementsRecord(\n\t\t\t\t\t\tBTEHomePageActivity.this,\n\t\t\t\t\t\tDatabaseConstants.CONTENT_URI_ANNOUNCEMENTS,\n\t\t\t\t\t\talAnnouncementModels);\n\n\t\t\t\thideProgressDialog();\n\t\t\t}\n\t\t};\n\t\tBaseAsyncLoader.invokeAsyncWebService(\n\t\t\t\tgetResources().getString(R.string.group_id), params, this,\n\t\t\t\tnull, Constants.STATE_HOMEFEED, handler);\n\t}", "List <Aid> getAllAids();", "public static java.util.List<com.gleo.plugins.hexiagon.model.Announcement> getAnnouncementsByCurrencyId(\n long currencyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getService().getAnnouncementsByCurrencyId(currencyId);\n }", "List<Article_Info> getInfoAllById(long id);", "@Override\n @Transactional\n public List<ActivityEvent> getPublicAnnouncementActivity(Long id, Date startDate,\n Date endDate) throws JsonParseException, IOException {\n List<ActivityDTO> dtos = activityDAO.findPublicAnnouncementActivityById(id, startDate, endDate);\n List<ActivityEvent> events = new ArrayList<ActivityEvent>();\n\n for (ActivityDTO dto : dtos) {\n ActivityEvent event = getActivityEventFromDTO(dto);\n events.add(event);\n }\n return events;\n }", "public List<Announcement> getAnnouncements() {\n return announcements;\n }", "@Override\n\tpublic long getTypeId() {\n\t\treturn _announcement.getTypeId();\n\t}", "public java.util.List<PersistedAttribute> findByidAndTypeId(\n\t\tlong typeId, long id);", "public ArrayList<Announcement> getAllAnnouncementforUpload() {\n\t\tArrayList<Announcement> announcementList = new ArrayList<Announcement>();\n\t\t// Select All Query\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_TEACHER_ANNOUNCEMENT;\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.isAfterLast() == false) {\n\t\t\tAnnouncement announcement = new Announcement();\n\t\t\tannouncement.row_id = Integer.parseInt(cursor.getString(0));\n\t\t\tannouncement.type = cursor.getString(2);\n\t\t\tannouncement.date = cursor.getString(1);\n\t\t\tannouncement.subject_relation_id = cursor.getString(3);\n\t\t\tannouncement.title = cursor.getString(4);\n\t\t\tannouncement.description = cursor.getString(5);\n\t\t\tannouncement.attachment = cursor.getString(6);\n\t\t\tannouncement.file_name = cursor.getString(7);\n\t\t\tannouncementList.add(announcement);\n\t\t\tcursor.moveToNext();\n\t\t}\n\t\tcursor.close();\n\t\t// return contact list\n\t\treturn announcementList;\n\t}", "@Override\n\tpublic void setTypeId(long typeId) {\n\t\t_announcement.setTypeId(typeId);\n\t}", "java.util.List<com.cst14.im.protobuf.ProtoClass.GroupAnnounce> \n getAnnounceList();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to scroll paintable referenced from given UIDL snippet to be visible.
void scrollIntoView(final UIDL uidl) { if (uidl.hasAttribute("scrollTo")) { Scheduler.get().scheduleDeferred(new Command() { public void execute() { final Paintable paintable = uidl.getPaintableAttribute( "scrollTo", connection); ((Widget) paintable).getElement().scrollIntoView(); } }); } }
[ "public void scroll();", "public abstract boolean scroll(Direction direction);", "private static void scrollToElement(JEditorPane editorPane, HTMLDocument.Iterator elementIterator) {\n\t\ttry {\n\t\t\tRectangle rectangle = editorPane.modelToView(elementIterator.getStartOffset());\n\t\t\tif (rectangle == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// the view is visible, scroll it to the\n\t\t\t// center of the current visible area.\n\t\t\tRectangle visibleRectangle = editorPane.getVisibleRect();\n\t\t\t// r.y -= (vis.height / 2);\n\t\t\trectangle.height = visibleRectangle.height;\n\t\t\teditorPane.scrollRectToVisible(rectangle);\n\t\t} catch (BadLocationException e) {\n\t\t\tlog.error(e.getMessage());\n\t\t}\n\t}", "public void scrollToAnElementToBeVisible(String relativepathToElement){\n JavascriptExecutor executor = driver;\n executor.executeScript(\"target.frontMostApp().mainWindow().scrollViews()[0].\"+ relativepathToElement +\".scrollToVisible();\");\n }", "@SuppressWarnings(\"unused\")\n public void scrollRectToVisible() {\n }", "IWebElementWrapper scrollTo();", "public void autoscroll(Point cursorLocn);", "void onScrolling();", "public MobileElement ScrollToElement (MobileElement eledropdown, String resourceId)\r\n\t\t{\r\n\t\t\treturn ((AndroidElement) eledropdown).findElementByAndroidUIAutomator(\"new UiScrollable(new UiSelector()).scrollIntoView(\"\r\n\t\t\t\t\t+ \"new UiSelector().resourceId(\\\"\"+resourceId+\"\\\"));\");\t\r\n\t\t}", "void onRequireScrollStateChanged(boolean scrollNeeded);", "Scrolling scrolling(Component component) {\n String value = evaluator.attribute(component.id(), Attribute.scrolling);\n if (value.isEmpty()) {\n return Scrolling.auto;\n }\n return Scrolling.valueOf(value);\n }", "B scrollToSelectedItem(boolean scrollToSelectedItem);", "protected boolean needsFetchingScroll() {\n \t\treturn false;\n \t}", "public boolean isNestedScrollingEnabled() { throw new RuntimeException(\"Stub!\"); }", "public interface ScrollObj\n{\n /**\n * Gets the scroll object location.\n * @return a scroll object location.\n */\n Point getSOLocation();\n\n /**\n * Sets the specified scroll object location. The method defines a mechanism that will be used to\n * scrool the object.\n * @param x the specified x coordinate.\n * @param y the specified y coordinate.\n */\n void setSOLocation(int x, int y);\n\n /**\n * Gets the scroll object size. The size is a size that the scroll object wants to have.\n * @return a scroll object size.\n */\n Dimension getSOSize();\n\n /**\n * Sets the specified scroll manager for the scroll object. The manager reference should\n * be stored and used by the scrolled object to move itself inside the scrolled area.\n * @param m the specified scroll manager.\n */\n void setScrollMan(ScrollMan m);\n\n /**\n * Tests if the scrolled component performs scrolling by changing its location or moving view.\n * @return <code>true</code> if the scroll component organizes scrolling by moving\n * its view; otherwise <code>false</code>.\n */\n boolean moveContent();\n}", "private void ensureComponentVisible(final Component component,\n final Rectangle bounds) throws RobotException {\n m_queuer.invokeAndWait(\"ensureVisible\", new IRunnable() { //$NON-NLS-1$\n public Object run() {\n Rectangle rectangle = bounds != null ? new Rectangle(bounds)\n : SwingUtilities.getLocalBounds(component);\n if (log.isDebugEnabled()) {\n log.debug(\"Scrolling rectangle to visible: \" + rectangle); //$NON-NLS-1$\n }\n Scroller scroller = new Scroller(component);\n scroller.scrollRectToVisible(rectangle);\n return null;\n }\n });\n }", "public boolean isScrollContainer() { throw new RuntimeException(\"Stub!\"); }", "void scrollToSelection();", "public void showScroll(int clue, int level){\r\n\t\tc.getPA().showInterface(6965);\r\n\t\tc.getPA().sendFrame126(\"@red@~ Clue Scroll ~\",6968);\r\n\t\tc.getPA().sendFrame126(\"\",6969);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][0],6970);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][1],6971);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][2],6972);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][3],6973);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][4],6974);\r\n\t\tc.getPA().sendFrame126(clueText[level][clue][5],6975);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resat the value of the encoder and the navx
public void resetValue() { navx.reset(); canEncoderLeftCIMcoder.setPosition(0); canEncoderRightCIMcoder.setPosition(0); }
[ "public void resetEncoder(){\n\t\tint absolutePosition = 0;\r\n\t\tflWheel.setEncPosition(absolutePosition);\r\n\t\t//absolutePosition = frWheel.getPulseWidthPosition() & 0xFFF;\r\n\t\tfrWheel.setEncPosition(absolutePosition);\r\n\t\t//absolutePosition = blWheel.getPulseWidthPosition() & 0xFFF;\r\n\t\tblWheel.setEncPosition(absolutePosition);\r\n\t\t//absolutePosition = brWheel.getPulseWidthPosition() & 0xFFF;\r\n\t\tbrWheel.setEncPosition(absolutePosition);\r\n\t}", "public void updateEncoders() {\n leftEnc.updateRate();\n rightEnc.updateRate();\n }", "void resetEncoder() {\n // Starts motor encoders to track distance\n rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightRear.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftRear.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Resets motor encoders so we don't have to worry about previous movements\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightRear.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftRear.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "public void encoderReset() {fl_encoder_.reset();\n// fr_encoder_.reset();\n// bl_encoder_.reset();\n// br_encoder_.reset();\n// \n }", "public void resetRightEncoder() {\n\t\trightEnc.reset();\n\t}", "public void ConfigEncoder() {\n\t\tRobotMap.backLeft.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1, 1);\n\t\tRobotMap.backLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 1);\n\t\tRobotMap.backLeft.setSelectedSensorPosition(0, 0, 1);\n\t\tRobotMap.backLeft.setSensorPhase(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(false);\n\t\tRobotMap.frontLeft.setInverted(true);\n\t\tRobotMap.backLeft.setInverted(true);\n\n\t\tRobotMap.frontRight.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1, 1);\n\t\tRobotMap.frontRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 1);\n\t\tRobotMap.frontRight.setSelectedSensorPosition(0, 0, 1);\n\t\tRobotMap.frontRight.setSensorPhase(true);\n\t\tRobotMap.frontRight.setSafetyEnabled(false);\n\n\t\tRobotMap.frontLeft.setSafetyEnabled(false);\n\t\tRobotMap.backLeft.setSafetyEnabled(false);\n\n\t\tSystem.out.println(\"encoder initialize\");\n\t}", "public void resetEnc(){\n EncX.reset();\n }", "public Encoder getEncoderLeft() {return encoderLeft;}", "public Encoder getRightEncoder();", "void stopEncoder() {\n rightFront.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightRear.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftFront.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftRear.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }", "public void zeroEncoder() {\n mainTalon.getSensorCollection().setQuadraturePosition(0, 0);\n }", "public static double readEncoderL() {\n\t\treturn -leftEncoder.getDistance();\n\t}", "public void zeroEncoder() {\n m_masterMotor.setSelectedSensorPosition(0);\n }", "public void ResetArmEncoder() {\n armRotationMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }", "protected abstract TrivialEncoder getRightEncoder();", "public int getEncoderRight(){\n\t\treturn -rightEncoder.get();\n\t}", "public void resetLeftEncoder() {\n\t\tleftEnc.reset();\n\t}", "public X_Traversal() {\n startDist = this.getAbsPosition();\n m_X.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n EncX.setDistancePerPulse(Constants.k_EncXConversion);\n // EncX.setMinRate(Constants.k_EncXMinRate);\n EncX.setReverseDirection(Constants.k_EncXReverse);\n this.configPID();\n System.out.println(\"start pos\" + startDist);\n }", "private double getNormalizedEncoder() {\n // Subtracts ARM_MIN to make this work even when the min is in the negatives\n return (armEncoder.get() - ARM_MIN) * 1 / (ARM_MAX - ARM_MIN);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field776' field has been set
public boolean hasField776() { return fieldSetFlags()[776]; }
[ "public boolean hasField654() {\n return fieldSetFlags()[654];\n }", "public boolean hasField653() {\n return fieldSetFlags()[653];\n }", "public boolean hasField543() {\n return fieldSetFlags()[543];\n }", "public boolean hasField786() {\n return fieldSetFlags()[786];\n }", "public boolean hasField706() {\n return fieldSetFlags()[706];\n }", "public boolean hasField659() {\n return fieldSetFlags()[659];\n }", "public boolean hasField546() {\n return fieldSetFlags()[546];\n }", "public boolean hasField757() {\n return fieldSetFlags()[757];\n }", "public boolean hasField811() {\n return fieldSetFlags()[811];\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean hasField779() {\n return fieldSetFlags()[779];\n }", "public boolean hasField77() {\n return fieldSetFlags()[77];\n }", "public boolean hasField123() {\n return fieldSetFlags()[123];\n }", "public boolean hasField536() {\n return fieldSetFlags()[536];\n }", "public boolean hasField131() {\n return fieldSetFlags()[131];\n }", "public boolean hasField645() {\n return fieldSetFlags()[645];\n }", "public boolean hasField771() {\n return fieldSetFlags()[771];\n }", "public boolean hasField146() {\n return fieldSetFlags()[146];\n }", "public boolean hasField679() {\n return fieldSetFlags()[679];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the next node in the tree.
private void findNextNode() { // go into the right subtree for the next node if(currentNode.right != null) { currentNode = currentNode.right; while(currentNode.left != null) { currentNode = currentNode.left; } // go to the parent for the next node } else if(currentNode.parent.left == currentNode) { currentNode = currentNode.parent; // get out of the right subtree } else if(currentNode.parent.right == currentNode) { // move to the top of the current subtree while(currentNode.parent.right == currentNode) { currentNode = currentNode.parent; } // Move up one more node to leave the subtree currentNode = currentNode.parent; // the iterator is out of state } else { throw new IllegalStateException(); } }
[ "public native Node nextNode();", "public DNode getNext() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n\t\t\treturn next;\n\t\t}", "protected Node<NodeDataType> getNextNode() {\r\n\t\t\treturn myNext;\r\n\t\t}", "private int nextNode() {\n\n\t\tif (this.path.size() == 0) {\n\t\t\tList<CL_Pokemon> cl_fs = Arena.json2Pokemons(game.getPokemons());//Arena.json2Pokemons(game.getPokemons()); // get pokemon array\n\t\t\tfor (int a = 0; a < cl_fs.size(); a++) { Arena.updateEdge(cl_fs.get(a), graph_algo.getGraph()); } // get each pokemon edge\n\t\t\tCL_Pokemon closestPokemon = findClosestPokemon(cl_fs, this, graph_algo);\n\t\t\tthis.set_curr_fruit(closestPokemon);\n\t\t\tthis.path=choosePath(this, closestPokemon, graph_algo);\n\t\t\treturn this.path.remove(0).getKey();\n\t\t}\n\t\telse{\n\t\t\tint nextNode = this.path.remove(0).getKey();\n\t\t\tif(path.size()>=4) {\n\t\t\t\tif (nextNode == this.path.get(3).getKey()) {\n\t\t\t\t\tthis.path = new ArrayList<>();\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn nextNode;\n\t\t}\n\t}", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "public int getNextNode() {\n\t\t\tint ans = -2;\n\t\t\tif(this._curr_edge==null) {\n\t\t\t\tans = -1;}\n\t\t\telse {\n\t\t\t\tans = this._curr_edge.getDest();\n\t\t\t}\n\t\t\treturn ans;\n\t\t}", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "public Node toNextNode();", "public GameTreeNode getNext() {\r\n HashMap<String, GameTreeNode> children = currentNode.getChildren();\r\n String currentArgs = \"\"; //The agrument that this node will choose to have. \r\n int value;\r\n checkExpansion();\r\n if (currentNode.isMaximizer()) //If the currentNode is a maximizer. \r\n value = Integer.MIN_VALUE;\r\n else \r\n value = Integer.MAX_VALUE;\r\n for (String key : children.keySet()) {\r\n int childScore = children.get(key).getScore();\r\n if (currentNode.isMaximizer()) { //Maximizer logic\r\n if (childScore > value) {\r\n currentArgs = key;\r\n value = childScore;\r\n if (value == Integer.MAX_VALUE) //If the value is a max value, it's a win. \r\n break;\r\n }\r\n } else { // Minimizer logic\r\n if (childScore < value) {\r\n currentArgs = key;\r\n value = childScore; \r\n if (value == Integer.MIN_VALUE) //If the value is a min value, it's a win.\r\n break;\r\n }\r\n }\r\n }\r\n GameTreeNode nextNode = children.get(currentArgs);\r\n currentNode = nextNode;\r\n return nextNode;\r\n }", "public ElectionNode getNextNode() {\r\n return nextNode;\r\n }", "int getNext(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 2);\n\t}", "public Node returnNextChild(){\n try{\n return children.get(counter);\n }catch(Exception ex){\n return null;\n }\n }", "private Node<E> findNode(Node<E> current, E obj){\r\n\t\tif(current != null) {\r\n\t\t\tif(((Comparable<E>)obj).compareTo(current.getData()) == 0)\r\n\t\t\t\treturn current;\r\n\t\t\t\r\n\t\t\t//go right\r\n\t\t\tif(((Comparable<E>) obj).compareTo(current.getData()) > 0)\r\n\t\t\t\treturn findNode(current.getRight(), obj);\r\n\t\t\telse // obj <= current.data move left\r\n\t\t\t\treturn findNode(current.getLeft(), obj);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn null; //node not found\r\n\t}", "public LinkedTreeNode getNextSibling() {\n return nextSibling;\n }", "public AlphaBetaTree next() {\n\t\tif (parent == null)\r\n\t\t\treturn null; // or getDeepestFirst();\r\n\r\n\t\tif (nextSibling() != null)\r\n\t\t\treturn nextSibling().getDeepestFirst();\r\n\t\telse\r\n\t\t\treturn parent;\r\n\t}", "public int getNextMarkedNode() {\n \t\tList<Integer> list = markedNodes;\n \t\tif (collapse_mode)\n \t\t\tlist = markedCollapsedNodes;\n \t\t\n \t\tif (list.size() == 0)\n \t\t\treturn -1;\n \t\t\n \t\t\n \t\tnextMarkedNode++;\n \t\tif (nextMarkedNode >= list.size())\n \t\t\tnextMarkedNode = 0;\n \t\t\n \t\t\n \t\treturn list.get(nextMarkedNode);\n \t}", "public TrainCarNode getNext() {\n return next;\n }", "public ListNode<T> getNext(){\n\t\treturn next;}", "public DNode findNode(long value)\r\n {\r\n DNode curNode = m_header.getNext();\r\n while(curNode != m_tailer)\r\n {\r\n if(curNode.getValue() == value)\r\n {\r\n return curNode;\r\n }\r\n\r\n curNode = curNode.getNext();\r\n }\r\n\r\n return null;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for the calculated attribute ProductAttrValue
public void setProductAttrValue(String value) { setAttributeInternal(PRODUCTATTRVALUE, value); }
[ "public void setProduct(entity.APDProduct value);", "void setValue(Attribute att, double value);", "public String getProductAttrValue() {\n return (String)getAttributeInternal(PRODUCTATTRVALUE);\n }", "public void setProductLine(entity.APDProductLine value);", "public void setAPDProduct(entity.APDProduct value) {\n __getInternalInterface().setFieldValue(APDPRODUCT_PROP.get(), value);\n }", "public void setAPDProduct(entity.APDProduct value) {\n __getInternalInterface().setFieldValue(APDPRODUCT_PROP.get(), value);\n }", "public void setPriceVal(Number value) {\n setAttributeInternal(PRICEVAL, value);\n }", "public void setProductId(Integer value)\n {\n setAttributeInternal(PRODUCTID, value);\n }", "public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}", "public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }", "public void setPrice(Number value) {\n setAttributeInternal(PRICE, value);\n }", "public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }", "@Override\n protected void setStoredValueForAttribute(Object value, String attribute) {\n LOG.info(\"setStoredValueForAttribute: '\" + attribute + \"'\");\n super.setStoredValueForAttribute(value, attribute);\n }", "private void setProductMarkup(double productMarkup) \n {\n\n this.productMarkup = productMarkup;\n }", "public void setPrice(Number value) {\n setAttributeInternal(PRICE, value);\n }", "public void addValue(double productPrice) {\n this.value += productPrice;\n }", "public void setPrice(BigDecimal value) {\n setAttributeInternal(PRICE, value);\n }", "private void setFieldValues(Product product) {\r\n\t\tString strLog = \"[setFieldValues] \";\r\n\t\ttry {\r\n\t\t\tif (product != null) {\r\n\t\t\t\tthis.product = product;\r\n\t\t\t\ttxtCode.setValue(product.getCode() != null ? product.getCode()\r\n\t\t\t\t\t\t: tableSequence != null ? String.valueOf(tableSequence.getSequence()) : \"\");\r\n\r\n\t\t\t\ttxtName.setValue(product.getName());\r\n\t\t\t\ttxtDescription.setValue(product.getDescription() != null ? product.getDescription() : \"\");\r\n\t\t\t\tcbCategory.setValue(product.getCategory() != null ? product.getCategory() : null);\r\n\t\t\t\tcbType.setValue(product.getType() != null ? product.getType() : null);\r\n\t\t\t\tcbMeasureUnit.setValue(product.getMeasurementUnit() != null ? product.getMeasurementUnit() : null);\r\n\t\t\t\ttxtBrand.setValue(product.getBrand() != null ? product.getBrand() : \"\");\r\n\t\t\t\ttxtEan.setValue(product.getEanCode() != null ? product.getEanCode() : \"\");\r\n\t\t\t\ttxtPurchasePrice\r\n\t\t\t\t\t\t.setValue(product.getPurchasePrice() != null ? String.valueOf(product.getPurchasePrice()) : \"\");\r\n\r\n\t\t\t\ttxtSalePrice.setValue(product.getSalePrice() != null ? String.valueOf(product.getSalePrice()) : \"\");\r\n\r\n\t\t\t\ttxtSaleTax.setValue(product.getSaleTax() != null ? String.valueOf(product.getSaleTax()) : \"0\");\r\n\r\n\t\t\t\ttxtPurchaseTax\r\n\t\t\t\t\t\t.setValue(product.getPurchaseTax() != null ? String.valueOf(product.getPurchaseTax()) : \"0\");\r\n\r\n\t\t\t\ttxtUtility.setValue(product.getUtility() != null ? String.valueOf(product.getUtility()) : \"0\");\r\n\t\t\t\ttxtStock.setValue(product.getStock() != null ? String.valueOf(product.getStock()) : \"\");\r\n\r\n\t\t\t\ttxtStockDate\r\n\t\t\t\t\t\t.setValue(product.getStockDate() != null ? DateUtil.dateToString(product.getStockDate()) : \"\");\r\n\r\n\t\t\t\t// updateSalePriceWithTax();\r\n\t\t\t} else {\r\n\t\t\t\tif (getProductSequence()) {\r\n\t\t\t\t\ttxtCode.setValue(tableSequence != null ? String.valueOf(tableSequence.getSequence()) : \"\");\r\n\t\t\t\t\ttxtPurchaseTax.setValue(\"0\");\r\n\t\t\t\t\ttxtSaleTax.setValue(\"0\");\r\n\t\t\t\t\ttxtUtility.setValue(\"0\");\r\n\t\t\t\t\ttxtSalePrice.setValue(\"0\");\r\n\t\t\t\t\ttxtSalePriceWithTax.setValue(\"0\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(strLog + \"[Exception]\" + e.getMessage());\r\n\t\t}\r\n\t}", "public abstract void setValue(ELContext context,\n Object base,\n Object property,\n Object value);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OnClickVideoButton Called upon clicking the Video button.
public void onClickVideoButton(View view) { brightcoveVideoView.start(); }
[ "public void videoControl(View v){\n\n //connect\n ToggleButton controlVideo = (ToggleButton)findViewById(R.id.toggleButton);\n VideoView myVideo = (VideoView) findViewById(R.id.videoView);\n\n\n //configure a video controller to play the video\n myVideo.setVideoPath(filepath);\n ctlr = new MediaController(mContext);\n ctlr.setMediaPlayer(myVideo);\n myVideo.setMediaController(ctlr);\n myVideo.requestFocus();\n myVideo.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n public void onCompletion(MediaPlayer mp) {\n isVideoPlaying = false;\n }\n });\n\n\n //check if the video is playing or not\n if(!isVideoPlaying){\n myVideo.start();\n isVideoPlaying = true;\n controlVideo.setTextOff(\"Play\");\n }else{\n myVideo.stopPlayback();\n isVideoPlaying = false;\n controlVideo.setTextOff(\"Stop\");\n }\n\n\n\n\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(VideoActivity.this, AddVideoActivity.class));\n }", "private void onPlayVideoClick() {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(Uri.parse(\"file://\" + mediaPath), \"video/mp4\");\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n handlePlaybackButtonClick();\n }", "public void ownerClickOnRemoteVideoAndTest()\n {\n System.err.println(\"Start ownerClickOnRemoteVideoAndTest.\");\n\n clickOnRemoteVideoAndTest(\n ConferenceFixture.getOwnerInstance(),\n ConferenceFixture.getSecondParticipantInstance());\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tString uriPath = \"android.resource://\" + getPackageName() + \"/\" + R.raw.doing_time;\n\t\t\t\t\n\t\t\t\t//collecting path then parsing string to uri\n\t\t\t\tvw.setVideoURI(Uri.parse(uriPath));\n\t\t\t\t\n\t\t\t\t//setting media controller to context _this\n\t\t\t\tvw.setMediaController(new MediaController(_this));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//starting video\n\t\t\t\tvw.start();\n\t\t\t\t\n\t\t\t}", "@OnClick(R.id.widget_secondary_fpv)\n public void onSecondaryFPVClick() {\n swapVideoSource();\n }", "public void verVideo(View v) {\n ViewVideo.setVideoURI(Uri.parse(getExternalFilesDir(null) + \"/\" + txtNombreArchivo.getText().toString()));\n /*Ejecutamos el video*/\n ViewVideo.start();\n }", "private void shareVideoButton() {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_TEXT, \"Check out this video: \" + video.getTitle()\n + \"\\n\\n\" + video.getShareUrl());\n startActivity(shareIntent);\n }", "@Test\n public void panelButtonsMusicVideoTest() {\n getPlayerHandler().startPlay(Playlist.playlistID.VIDEO, 1);\n Player.GetItem item = getPlayerHandler().getMediaItem();\n final String title = item.getTitle();\n onView(isRoot()).perform(ViewActions.waitForView(\n R.id.title, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return title.contentEquals(((TextView) v).getText());\n }\n }, 10000));\n\n onView(withId(R.id.next)).check(matches(isDisplayed()));\n onView(withId(R.id.previous)).check(matches(isDisplayed()));\n onView(withId(R.id.play)).check(matches(isDisplayed()));\n }", "public static View getBtVideo(LinearLayout debugRootView) {\n if (debugRootView == null) {\n return null;\n }\n for (int i = 0; i < debugRootView.getChildCount(); i++) {\n View childView = debugRootView.getChildAt(i);\n if (childView instanceof Button) {\n if (((Button) childView).getText().toString().equalsIgnoreCase(debugRootView.getContext().getString(R.string.video))) {\n return childView;\n }\n }\n }\n return null;\n }", "void sendVideoAdClickImpression();", "@Override\n public void onClick(View v) {\n Intent youtubeAppIntent =\n new Intent(Intent.ACTION_VIEW\n , Uri.parse(\"vnd.youtube:\" + trailer.getYoutubeId()));\n\n Intent youtubeBrowserIntent =\n new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"https://www.youtube.com/watch?v=\" + trailer.getYoutubeId()));\n\n // attempt to open the youtube app by default\n // otherwise open in browser\n try {\n MovieDetailActivity.this.startActivity(youtubeAppIntent);\n }\n catch (Exception ex) {\n MovieDetailActivity.this.startActivity(youtubeBrowserIntent);\n }\n }", "@Override\n public void onClick(View v) {\n listener.onClick(movie.getTrailerLink());\n }", "public void setUrlVideo(String urlVideo) {\r\n this.urlVideo = urlVideo;\r\n }", "@Override\r\n public void onClick(View v) {\n String path = \"http://techslides.com/demos/sample-videos/small.mp4\";\r\n// Uri uri=Uri.parse(path);\r\n// videoView.setVideoURI(uri);\r\n //MediaController mc = new MediaController(TransformDetailActivity.this);\r\n\r\n //videoView.start();\r\n// videoView.setOnTouchListener(new View.OnTouchListener() {\r\n// @Override\r\n// public boolean onTouch(View v, MotionEvent event) {\r\n// System.out.print(videoView.isPlaying());\r\n// if(videoView.isPlaying()) {\r\n// stopPosition[0] = videoView.getCurrentPosition();\r\n// videoView.pause();\r\n// } else {\r\n// videoView.seekTo(stopPosition[0]);\r\n// videoView.start();\r\n// }\r\n// return false;\r\n// }\r\n// });\r\n// String path = \"android.resource://\" + getPackageName() + \"/\" + R.raw.welcome;\r\n// Uri videoUri = Uri.parse(path);\r\n// Intent intent = new Intent(Intent.ACTION_VIEW, videoUri);\r\n// intent.setDataAndType(videoUri, \"video/*\");\r\n// startActivity(intent);\r\n\r\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));\r\n intent.setDataAndType(Uri.parse(path), \"video/mp4\");\r\n startActivity(intent);\r\n }", "public void setVideo(String videoUrl) {\n this.video = videoUrl;\n }", "@Override\n public void onMovieClick(OneMovieData oneMovieData) {\n }", "public void btnCapturarOnClick(View v) {\n\t\t// Creo un intent con la acción de captura de vídeo.\n\t\tIntent i = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);\n\t\t// Envío el intent a alguna actividad, esperando respuesta.\n\t\tstartActivityForResult(i, RC_CAPTURAR_VIDEO);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relationship to another entity specification, might be dependency, substitution, etc.
@Schema(description = "Relationship to another entity specification, might be dependency, substitution, etc.") @Valid public Set<EntitySpecificationRelationship> getEntitySpecRelationship() { return entitySpecRelationship; }
[ "E relate(E sourceEntity, E targetEntity, String name, Map<String, Object> properties);", "Entity getReferencedEntity();", "YAnnotEntity getEntityref();", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "public void entityReference(String name);", "EntityReference getEntityReference();", "RelationshipDescription createRelationshipDescription();", "public interface EntityResolver {\n\n /**\n * Returns the <code>Entity</code> to which an annotation refers. Returns the canonical form\n * String for an annotation.\n * <p>\n * For two annotations that refer to the same Entity, this should return <code>Entity</code>\n * objects that are <code>equal</code>.\n * <p>\n * If the annotation does not represent an entity at all, <code>null</code> should be returned.\n * \n * @param aAnnotation\n * the annotation to resolve\n * \n * @return the Entity to which the annotation refers, null if the annotation does not represent an\n */\n Entity getEntity(Annotation aAnnotation);\n\n /**\n * Object representing an Entity. Annotations whose <code>Entity</code> objects are\n * <code>equal</code> will be displayed in the same color in the viewer.\n * <p>\n * This means that either the <code>EntityResolver</code> must return the identical\n * (<code>==</code>) <code>Entity</code> object for annotations belonging to the same entity, or\n * your <code>Entity</code> objects must implement {@link Object#equals(Object)} and\n * {@link Object#hashCode()}.\n *\n */\n public interface Entity {\n /**\n * Returns the canonical form String for an Entity. This string will be displayed in the legend.\n * \n * @return the canonical form of the entity\n */\n String getCanonicalForm();\n }\n}", "public interface EntityReference extends Node {\n\n}", "public void testEditDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t// Step 3\r\n\t\t\tdataValue.put(barcode, \"870\");\r\n\t\t\tdataValue.put(label, \"specimen parent label123\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"4546\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tentityManagerInterface.editData(tissueSpecimen, dataValue, recordId);\r\n\r\n\t\t\t// step 4\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\tassertEquals(\"870\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label123\", dataValue.get(label));\r\n\t\t\tassertEquals(\"4546\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\t//Step 5\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t//Step 6\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"875\");\r\n\t\t\tdataValue.put(label, \"New Label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"454647\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"1223\");\r\n\r\n\t\t\tentityManagerInterface.editData(advanceTissueSpecimenA, dataValue, recordId);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\r\n\t\t\tassertEquals(\"875\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"New Label\", dataValue.get(label));\r\n\t\t\tassertEquals(\"454647\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public void interact(Entity other) { }", "public abstract void collidedWith(Entity other);", "void validateRelationshipEnds(String sourceName,\n EntityProxy entityOneProxy,\n EntityProxy entityTwoProxy,\n TypeDef typeDef,\n String methodName) throws InvalidParameterException;", "@Test\n public void testReadToOneRel2() throws Exception {\n createArtistWithPaintingAndInfoDataSet();\n\n PaintingInfo pi1 = Cayenne.objectForPK(context, PaintingInfo.class, 6);\n Painting p1 = pi1.getPainting();\n p1.getPaintingTitle();\n\n Artist a1 = p1.getToArtist();\n\n assertNotNull(a1);\n assertEquals(PersistenceState.HOLLOW, a1.getPersistenceState());\n assertEquals(\"aX\", a1.getArtistName());\n assertEquals(PersistenceState.COMMITTED, a1.getPersistenceState());\n }", "EReference getModelReference();", "public static void replicateRelationshipFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, String relationshipName){\n for(Enumeration e = ((NSArray)r1.valueForKey(relationshipName)).objectEnumerator(); e.hasMoreElements();){\n ERXReplicableInterface replicableTarget = (ERXReplicableInterface)e.nextElement();\n r2.addObjectToBothSidesOfRelationshipWithKey(replicableTarget.replicate(r2.editingContext()), relationshipName);\n }\n }", "void addDirectRelationship(Person from, Person to, RelationshipType type);", "public void _linkBase(AssociationEnd base1);", "void addEntityCompatibility(int entityType1, int entityID1, int entityType2, int entityID2, DateSynonym effectiveDate, DateSynonym expirationDate);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_btnAddInstructorActionPerformed method to remove existing instructor from the system
private void btnRemoveInstructorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveInstructorActionPerformed txtDeleteInstID.setText(instDetails.get(tblInstructorDetails.getSelectedRow()).getInstructorID()); String tmpID = txtDeleteInstID.getText(); // assignning values if (adminOps.removeInstructor(tmpID)) { loadInstructorDetails(); // refresh table JOptionPane.showMessageDialog(this, "Instructor removed successfully"); // message box txtDeleteInstID.setText(""); // assignning values } else { JOptionPane.showMessageDialog(this, "Can not find the Instructor details"); // message box } }
[ "private void removeStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n removeStudent();\n }", "private void btnAddInstructorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddInstructorActionPerformed\n Instructor inst = new Instructor(); // create an instance of instructor and assign values by setters\n\n inst.setName(txtInstName.getText()); // assignning values\n inst.setInstructorID(txtInstRegNumber.getText()); // assignning values\n inst.setPassword(txtInstPassword.getText()); // assignning values\n inst.setEmail(txtInstEmail.getText()); // assignning values\n inst.setDob(txtInstDoB.getText()); // assignning values\n inst.setNic(txtInstNIC.getText()); // assignning values\n inst.setFacultyName(cmboFacultName.getSelectedItem().toString()); // assignning values\n\n if (adminOps.addInstructor(inst)) { // pass to do backend queries\n loadInstructorDetails(); // refresh table\n JOptionPane.showMessageDialog(this, \"Instructor added successfully\"); // message box\n txtInstDoB.setText(\"\"); // assignning values\n txtInstEmail.setText(\"\"); // assignning values\n txtInstNIC.setText(\"\"); // assignning values\n txtInstName.setText(\"\"); // assignning values\n txtInstPassword.setText(\"\"); // assignning values\n txtInstRegNumber.setText(\"\"); // assignning values\n } else {\n JOptionPane.showMessageDialog(this, \"Ops ! Something went wront. Please try again.\"); // message box\n }\n\n }", "private void addInstructor() {\n\t\ttry {\n\t\t\t// Create locals variables from form field data.\n\t\t\tString firstName = txtFirstName.getText();\n\t\t\tString lastName = txtLastName.getText();\n\t\t\tString phone = (String) txtPhone.getValue();\n\t\t\tString email = txtEmail.getText();\n\t\t\t// Check local variables to make sure each contains data before\n\t\t\t// committing to object.\n\t\t\tif (firstName.equals(\"\") || lastName.equals(\"\") || phone.equals(\"\")\n\t\t\t\t\t|| email.equals(\"\")) {\n\t\t\t\t// Notify user that all form fields must be completed.\n\t\t\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\t\t\t\"Please complete all fields!\");\n\t\t\t} else {\n\t\t\t\tinstructor = new Instructor(firstName, lastName, phone, email);\n\t\t\t\tinstructors.add(instructor);\n\t\t\t\tSystem.out.println(\"Contents: \" + instructors);\n\t\t\t\t// Update instructor summary table.\n\t\t\t\tString[] rowData = { firstName, lastName, phone };\n\t\t\t\ttableModelInstructors.addRow(rowData);\n\t\t\t\t// Clear instructor form fields.\n\t\t\t\tclearInstructorFields();\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}", "private void onRemoveClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\tif(!chart.removeStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"This student was not found.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\r\n\t}", "public void removeNonAcademicCourse() \n {\n if (isRemoved==true) { //checking if isRemoved status is true\n System.out.println(\"The course is removed:\" +isRemoved);\n }\n else { \n super.setCourse_leader(\"\");\n this.instructor_name = \"\";\n this.start_date = \"\";\n this.completion_date = \"\";\n this.exam_date = \"\";\n this.isRegistered = false;\n this.isRemoved = true;\n }\n }", "@FXML\n\tpublic void removeStudent() {\n\n\t\tif (errorMessageHandling()) {\n\t\t\treturn;\n\t\t}\n\n\t\tcredit.setText(\"\");\n\n\t\t// Does not matter what type of student for removal, only need first and last\n\t\t// name.\n\t\tInstate studentToRemove = new Instate(fname.getText(), lname.getText(), 0, 0);\n\t\tcs213.removeForGUI(display_area, studentToRemove);\n\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tint i = frame.studentPanel\n\t\t\t\t\t\t\t\t\t\t\t\t.getStudentTable()\n\t\t\t\t\t\t\t\t\t\t\t\t.getSelectedRow();\n\n\t\t\t\t\t\t\t\t\t\tframe.students.remove(i);\n\t\t\t\t\t\t\t\t\t\tframe.studentPanel\n\t\t\t\t\t\t\t\t\t\t\t\t.getStudentTableModel()\n\t\t\t\t\t\t\t\t\t\t\t\t.removeRow(i);\n\t\t\t\t\t\t\t\t\t} catch (Exception f) {\n\t\t\t\t\t\t\t\t\t\tJOptionPane\n\t\t\t\t\t\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\t\t\t\t\t\tnull, \"Please select a student to remove\");\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tint i = frame.coursePanel\n\t\t\t\t\t\t\t\t\t\t\t\t.getCourseTable()\n\t\t\t\t\t\t\t\t\t\t\t\t.getSelectedRow();\n\n\t\t\t\t\t\t\t\t\t\tframe.courses.remove(Integer\n\t\t\t\t\t\t\t\t\t\t\t\t.parseInt((String) frame.coursePanel.courseTableModel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getValueAt(i, 0)));\n\t\t\t\t\t\t\t\t\t\tframe.coursePanel.courseTableModel\n\t\t\t\t\t\t\t\t\t\t\t\t.removeRow(i);\n\t\t\t\t\t\t\t\t\t} catch (Exception f) {\n\t\t\t\t\t\t\t\t\t\tJOptionPane\n\t\t\t\t\t\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\t\t\t\t\t\tnull, \"Please select a course to remove\");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}", "@Test\n\tpublic void Test09_Instructor_Removed_A_Student_From_A_Class(){\n\t\ttest.hmcdPage.instructorRemovedAStudentFromAClass();\n\t\ttest.hmcdPage.verifyUserIsOnHMCDPage();\n\t}", "@DeleteMapping(path = \"/{instructorId}\")\n\t public OperationStatusModel deleteInstructor(@PathVariable String instructorId) {\n\n\t OperationStatusModel returnValue = new OperationStatusModel();\n\t returnValue.setOperationName(RequestOperationName.DELETE.name());\n\n\t // Delete Instructor\n\t instructorService.deleteInstructor(instructorId);\n\t returnValue.setOperationResult(RequestOperationStatus.SUCCESS.name());\n\t \n\t return returnValue;\n\t }", "public void remove() {\n\tString fname = stdin.next();\n\tString lname = stdin.next();\n\tStudent s = new Instate(fname,lname,1,1); //temporary Instate object to allow us to remove\n\n\tboolean successfullyRemoved = cs213.remove(s);\n\tif (!successfullyRemoved) {\n\t\tSystem.out.println(fname + \" \" + lname + \" is not a student!\");\n\t\t}\n\t\telse {\n\t\tSystem.out.println(fname + \" \" + lname + \" has been removed!\");\n\t\t}\n\t\treturn;\n\t}", "public void removeInstructorFromOffering(String offeringId, String personId) throws Exception\n\t{throw new Exception(\"Not Implemented.\");\n\t}", "private void setupRemoveCourse() {\n\t\tmakeButton(\"Remove Course\", (ActionEvent e) -> {\n\t\t\ttry {\n\t\t\t\tint row = table.getSelectedRow();\n\n\t\t\t\tif (row < 0) {\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Please select a course\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tint courseId = adCon.getCourseIdFromRow(row);\n\t\t\t\tadCon.removeCourse(courseId);\n\t\t\t\tupdateCourses();\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Course number must be a number\", \"Error\",\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t\tcourseInfo.setText(\"Course deleted.\");\n\t\t});\n\t}", "public JButton addActionListenerRemoveCourseBtn(JTextField courseNameTxtField) {\n JButton removeCourseBtn = new JButton(\"Remove Course\");\n removeCourseBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n HomeApp.playSound(\"src/main/ui/sounds/button-30.wav\");\n String courseName = courseNameTxtField.getText();\n if (findCourseByName(courseName) != null) {\n Course toRemove = findCourseByName(courseName);\n mySchool.removeCourse(toRemove);\n JOptionPane.showMessageDialog(frame, courseName + \" was succesfully removed.\");\n new CoursesApp(mySchool);\n frame.dispose();\n } else {\n JOptionPane.showMessageDialog(frame, \"Course not found. Try again.\");\n }\n }\n });\n return removeCourseBtn;\n }", "public void setInstructor(String instructor) {\r\n this.instructor = instructor;\r\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed\r\n //Step1: chcek if the hoemwork can be deleted\r\n if (bWarningEnable)\r\n {\r\n JOptionPane.showMessageDialog(this, \"Can not delete homework\");\r\n return;\r\n }\r\n \r\n //Step2: Update the perticular homework record in database.\r\n String selectedHW = Homeworks.get(jComboBox3.getSelectedIndex());\r\n \r\n try\r\n {\r\n //delete chosen_question entries first\r\n query = \"delete from chosen_question where assignment_id = '\" + selectedHW + \"'\";\r\n \r\n rs = stmt.executeQuery(query);\r\n \r\n //delete from assignment table\r\n query = \"delete from assignment where assignment_id = '\" + selectedHW + \"'\";\r\n \r\n rs = stmt.executeQuery(query);\r\n \r\n } catch (Exception oops) {\r\n System.out.println(\"Prof_Edit_HW.java:DeleteHomework() \" + oops);\r\n }\r\n //Step3: Navigate professor to course Actions page.\r\n JOptionPane.showMessageDialog(this, \"Homework deleted\");\r\n Prof_CourseActions obj = new Prof_CourseActions(userObj, courseObj);\r\n obj.setVisible(true);\r\n this.dispose();\r\n }", "public void addInstructor(Instructor instructor) {\n\t\tif (person != null && instructor != null) {\n\t\t\tperson.add(instructor);\n\t\t}\n\t}", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed\n //Checks that an athlete is selected\n if(txtFieldAthID.getText().isEmpty() == false){\n //Gets the ID of the selected Athlete\n String ID = txtFieldAthID.getText();\n //Deletes the Athlete using the extracted ID\n ath.deleteAthlete(ID);\n //Repopulate table with new info \n updateTable();\n //Clear data field of current info\n clearFields();\n //Notify user that athlete has been removed\n JOptionPane.showMessageDialog(null, \"Athlete has been removed from the database.\");\n }else{\n //Advise user to first select an athlete\n JOptionPane.showMessageDialog(null, \"No Athlete is selected. Select or Search for Athlete\"); \n }\n }", "public AddRemoveFaculty() throws SQLException {\n this.setTitle(\"Add/Remove Faculty\");\n setResizable(false);\n initComponents();\n setLocationRelativeTo(null);\n facultyComboBox.setModel(new javax.swing.DefaultComboBoxModel(faculty()));\n facultyComboBox.setSelectedIndex(-1);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Begins definition for a new IpFirewallRuleInfo resource.
IpFirewallRuleInfo.DefinitionStages.Blank define(String name);
[ "public CreateOrUpdateFirewallRuleParameters() {\n }", "private void createFirewall() throws IOException {\n Firewall firewallRule = new Firewall()\n .setName(\"cloud-loadtest-framework-firewall-rule\")\n .setDescription(\"A firewall rule to allow the driver to coordinate load test instances.\")\n .setAllowed(ImmutableList.of(\n new Firewall.Allowed()\n .setIPProtocol(\"tcp\")\n .setPorts(Collections.singletonList(\"5000\"))));\n try {\n compute.firewalls().insert(projectName, firewallRule).execute();\n } catch (GoogleJsonResponseException e) {\n if (e.getStatusCode() != ALREADY_EXISTS) {\n throw e;\n }\n compute.firewalls()\n .update(projectName, \"cloud-loadtest-framework-firewall-rule\", firewallRule).execute();\n }\n }", "public IpRule() {\n this(DSL.name(\"ip_rule\"), null);\n }", "FirewallRuleService firewallrule();", "StartingRule createStartingRule();", "@ServiceMethod(returns = ReturnType.SINGLE)\n FirewallRuleInner createOrUpdate(\n String resourceGroupName,\n String accountName,\n String firewallRuleName,\n CreateOrUpdateFirewallRuleParameters parameters);", "public FirewallRuleProperties() {\n }", "Rule createRule();", "interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }", "IpFirewallRuleInfo get(String resourceGroupName, String workspaceName, String ruleName);", "public interface RulesManager extends RulesService {\n\n boolean applyPortForwardingRules(long ipAddressId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyPortForwardingRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void checkIpAndUserVm(IpAddress ipAddress, UserVm userVm, Account caller);\n\n void checkRuleAndUserVm(FirewallRule rule, UserVm userVm, Account caller);\n\n boolean revokeAllPFAndStaticNatRulesForIp(long ipId, long userId, Account caller) throws ResourceUnavailableException;\n\n boolean revokeAllPFStaticNatRulesForNetwork(long networkId, long userId, Account caller) throws ResourceUnavailableException;\n\n List<? extends FirewallRule> listFirewallRulesByIp(long ipAddressId);\n\n /**\n * Returns a list of port forwarding rules that are ready for application\n * to the network elements for this ip.\n * \n * @param ip\n * @return List of PortForwardingRule\n */\n List<? extends PortForwardingRule> listPortForwardingRulesForApplication(long ipId);\n\n List<? extends PortForwardingRule> gatherPortForwardingRulesForApplication(List<? extends IpAddress> addrs);\n\n boolean revokePortForwardingRulesForVm(long vmId);\n\n boolean revokeStaticNatRulesForVm(long vmId);\n\n FirewallRule[] reservePorts(IpAddress ip, String protocol, FirewallRule.Purpose purpose, boolean openFirewall, Account caller, int... ports) throws NetworkRuleConflictException;\n\n boolean releasePorts(long ipId, String protocol, FirewallRule.Purpose purpose, int... ports);\n\n List<PortForwardingRuleVO> listByNetworkId(long networkId);\n\n boolean applyStaticNatForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyStaticNatsForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void getSystemIpAndEnableStaticNatForVm(UserVm vm, boolean getNewIp) throws InsufficientAddressCapacityException;\n\n boolean disableStaticNat(long ipAddressId, Account caller, long callerUserId, boolean releaseIpIfElastic) throws ResourceUnavailableException;\n\n}", "public InflectionRule(String ruleName, PatternActionRule defRule) {\n\t\tthis(ruleName);\n\t\tsetDefaultRule(defRule);\n\t}", "@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller<PollResult<AzureFirewallInner>, AzureFirewallInner> beginCreateOrUpdate(\n String resourceGroupName, String azureFirewallName, AzureFirewallInner parameters, Context context);", "public com.commsen.liferay.multidevice.rules.model.Rule create(long rid);", "public interface IpFirewallRules {\n /**\n * Returns a list of firewall rules.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of IP firewall rules as paginated response with {@link PagedIterable}.\n */\n PagedIterable<IpFirewallRuleInfo> listByWorkspace(String resourceGroupName, String workspaceName);\n\n /**\n * Returns a list of firewall rules.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of IP firewall rules as paginated response with {@link PagedIterable}.\n */\n PagedIterable<IpFirewallRuleInfo> listByWorkspace(String resourceGroupName, String workspaceName, Context context);\n\n /**\n * Deletes a firewall rule.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param ruleName The IP firewall rule name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return iP firewall rule.\n */\n IpFirewallRuleInfo delete(String resourceGroupName, String workspaceName, String ruleName);\n\n /**\n * Deletes a firewall rule.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param ruleName The IP firewall rule name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return iP firewall rule.\n */\n IpFirewallRuleInfo delete(String resourceGroupName, String workspaceName, String ruleName, Context context);\n\n /**\n * Get a firewall rule.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param ruleName The IP firewall rule name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a firewall rule along with {@link Response}.\n */\n Response<IpFirewallRuleInfo> getWithResponse(\n String resourceGroupName, String workspaceName, String ruleName, Context context);\n\n /**\n * Get a firewall rule.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param ruleName The IP firewall rule name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a firewall rule.\n */\n IpFirewallRuleInfo get(String resourceGroupName, String workspaceName, String ruleName);\n\n /**\n * Replaces firewall rules.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param request Replace all IP firewall rules request.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return an existing operation for replacing the firewall rules.\n */\n ReplaceAllFirewallRulesOperationResponse replaceAll(\n String resourceGroupName, String workspaceName, ReplaceAllIpFirewallRulesRequest request);\n\n /**\n * Replaces firewall rules.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param request Replace all IP firewall rules request.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return an existing operation for replacing the firewall rules.\n */\n ReplaceAllFirewallRulesOperationResponse replaceAll(\n String resourceGroupName, String workspaceName, ReplaceAllIpFirewallRulesRequest request, Context context);\n\n /**\n * Get a firewall rule.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a firewall rule along with {@link Response}.\n */\n IpFirewallRuleInfo getById(String id);\n\n /**\n * Get a firewall rule.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a firewall rule along with {@link Response}.\n */\n Response<IpFirewallRuleInfo> getByIdWithResponse(String id, Context context);\n\n /**\n * Deletes a firewall rule.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return iP firewall rule.\n */\n IpFirewallRuleInfo deleteById(String id);\n\n /**\n * Deletes a firewall rule.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return iP firewall rule.\n */\n IpFirewallRuleInfo deleteByIdWithResponse(String id, Context context);\n\n /**\n * Begins definition for a new IpFirewallRuleInfo resource.\n *\n * @param name resource name.\n * @return the first stage of the new IpFirewallRuleInfo definition.\n */\n IpFirewallRuleInfo.DefinitionStages.Blank define(String name);\n}", "@Override\n\tpublic com.liferay.timetracking.dayoffs.model.Rule createRule(long ruleId) {\n\t\treturn _ruleLocalService.createRule(ruleId);\n\t}", "RuleConfig rule();", "public InflectionRule() {\n\t\tthis.patternActionRules = new ArrayList<PatternActionRule>();\n\t\tthis.umlaut = false;\n\t}", "public boolean createFirewallRule(String projectId, Firewall fwRule) {\r\n\r\n\t\tCompute computeConnection = computeConnections.get(projectId);\r\n\t\tif (computeConnection == null) {\r\n\t\t\tlogger.warn(\"Cannot create firewall rule since there is no Compute connection for project \" + projectId);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (projectId == null || projectId.isEmpty()) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule since no project id was provided\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (fwRule == null) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule for project \" + projectId\r\n\t\t\t\t\t+ \" since no firewall rule was provided\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (fwRule.getName() == null || fwRule.getName().isEmpty()) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule for project \" + projectId\r\n\t\t\t\t\t+ \" since the provided firewall rule is missing a name\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (fwRule.getNetwork() == null || fwRule.getNetwork().isEmpty()) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule for project \" + projectId + \" with name \" + fwRule.getName()\r\n\t\t\t\t\t+ \" since the provided firewall rule is missing the network id\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (fwRule.getDirection() == null || fwRule.getDirection().isEmpty()) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule for project \" + projectId + \" with name \" + fwRule.getName()\r\n\t\t\t\t\t+ \" since the provided firewall rule is missing the direction\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif ((fwRule.getAllowed() == null && fwRule.getDenied() == null)\r\n\t\t\t\t|| (fwRule.getAllowed().size() == 0 && fwRule.getDenied().size() == 0)) {\r\n\t\t\tlogger.error(\"Cannot create new firewall rule for project \" + projectId + \" with name \" + fwRule.getName()\r\n\t\t\t\t\t+ \" since the provided firewall rule is missing rules\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tOperation fwInsertOperation = computeConnection.firewalls().insert(projectId, fwRule).execute();\r\n\t\t\tif (fwInsertOperation == null) {\r\n\t\t\t\tlogger.error(\"Failed to request the creation of a new firewall rule for project \" + projectId\r\n\t\t\t\t\t\t+ \" with name \" + fwRule.getName() + \" and network \" + fwRule.getNetwork()\r\n\t\t\t\t\t\t+ \" initial request returned null\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Cache the reference to the operation we have kicked off\r\n\t\t\tString fwInsertOperationId = fwInsertOperation.getName();\r\n\t\t\tint timeout = timeoutForFwOperations;\r\n\r\n\t\t\twhile (timeout > 0) {\r\n\r\n\t\t\t\t// Wait a second before retrieving the latest status on the operation\r\n\t\t\t\ttimeout--;\r\n\t\t\t\tThread.sleep(1000);\r\n\r\n\t\t\t\tfwInsertOperation = computeConnection.globalOperations().get(projectId, fwInsertOperationId).execute();\r\n\t\t\t\tif (fwInsertOperation == null) {\r\n\t\t\t\t\tlogger.error(\r\n\t\t\t\t\t\t\t\"Error while requesting the current status of the operation to create a new firewall rule for project \"\r\n\t\t\t\t\t\t\t\t\t+ projectId + \" with name \" + fwRule.getName() + \" and network \"\r\n\t\t\t\t\t\t\t\t\t+ fwRule.getNetwork() + \" - request returned null\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Assumption: operation was successful if progress == 100% and status == DONE\r\n\t\t\t\tif (fwInsertOperation.getProgress() == 100) {\r\n\t\t\t\t\tif (fwInsertOperation.getStatus().equals(\"DONE\")) {\r\n\t\t\t\t\t\tlogger.info(\"Successfully created new firewall rule: \" + jsonMapper.writeValueAsString(fwRule));\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlogger.error(\"Error creating a new firewall rule for project \" + projectId + \" with name \"\r\n\t\t\t\t\t\t\t\t+ fwRule.getName() + \" and network \" + fwRule.getNetwork()\r\n\t\t\t\t\t\t\t\t+ \" - progress is at 100% but the status doesn't equal 'DONE'\"\r\n\t\t\t\t\t\t\t\t+ jsonMapper.writeValueAsString(fwInsertOperation));\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// At this point the timeout has been reached - giving up - counting as creation\r\n\t\t\t// error\r\n\t\t\tlogger.error(\"Timeout while trying to create a new firewall rule for project \" + projectId + \" with name \"\r\n\t\t\t\t\t+ fwRule.getName() + \" and network \" + fwRule.getNetwork());\r\n\t\t\treturn false;\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Error while trying to create a new firewall rule for project \" + projectId + \" with name \"\r\n\t\t\t\t\t+ fwRule.getName() + \" and network \" + fwRule.getNetwork(), ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
learns from the given neuron layer. Note: this is expected to be the next layer in a list of neuronLayers. (ie the one that used the outputs from this layer)
NeuronLayer learn(NeuronLayer followingLayer) { // loop through the neurons Iterator<Neuron> iter = this.neurons.iterator(); while(iter.hasNext()) { // calculate() the error for each neuron and set it in the neuron // if this is the correct point, pass it a 1 as the target value // else it is a zero Neuron neuron = iter.next(); neuron.calculateError(followingLayer.neurons); neuron.calculateWeights(followingLayer.neurons); } this.biasNeuron.calculateWeights(followingLayer.neurons); return this; // returns itself, this is just for use ease and uniformity }
[ "private Neuron studyNeuronLayer1(Neuron neuronLayer, double[] inputData, double realOutput, int index){\n double y = realOutput;\n double n = 0.25;\n double d = 0;\n if (neuronLayer.w.length == 16) {\n for (Neuron aLayer2 : layer2) {\n d += (aLayer2.w[index] * aLayer2.d);\n }\n }else{\n for (Neuron aLayer3 : layer3) {\n d += (aLayer3.w[index] * aLayer3.d);\n }\n }\n d = y * (1-y) * d;\n\n for (int i = 0; i < neuronLayer.w.length; i++) {\n neuronLayer.w[i] += n*d*inputData[i];\n }\n neuronLayer.b += n*d;\n return neuronLayer;\n }", "void initNeuronalNetwork(int numOfInputNeurons, int numOfHiddenLayers, int[] numOfHiddenLayerNeurons, int numOfOutputLayerNeurons, double[][][] weightsHiddenLayer, double[][] weightsOutputLayer, double[][] biasesHiddenLayer, double[] biasesOutputLayer, ActivationFunction[][] activationFunctionsHiddenLayer, ActivationFunction[] activationFunctionsOutputLayer, CostFunction costFunction, LearningAlgorithm learningAlgorithm, double learningRate) {\n Neuron[] tempNeurons; // This array is used to store temporally the neuron arrays\n\n InputLayer inputLayer = new InputLayer(); // Create a new input layer\n\n tempNeurons = new Neuron[numOfInputNeurons]; // Array is set up with the number of input neurons\n for(int i = 0; i < numOfInputNeurons; i++) {\n Neuron n = new Neuron(new double[0], 0, null); // Create neuron\n tempNeurons[i] = n; // Add neuron to array\n }\n inputLayer.initInputLayer(tempNeurons); // Init input layer\n\n HiddenLayer[] hiddenLayers = new HiddenLayer[numOfHiddenLayers]; // Create a new hidden layers array\n for(int i = 0; i < numOfHiddenLayers; i++) {\n HiddenLayer hiddenLayer = new HiddenLayer(); // Create a new hidden layer\n\n tempNeurons = new Neuron[numOfHiddenLayerNeurons[i]]; // Create a new temporary array for the neurons of the hidden layer\n for(int y = 0; y < numOfHiddenLayerNeurons[i]; y++) {\n Neuron n = new Neuron(weightsHiddenLayer[i][y], biasesHiddenLayer[i][y], activationFunctionsHiddenLayer[i][y]); // Creates the neurons of the hidden layer (Of the ith)\n tempNeurons[y] = n; // Add neuron to the array\n }\n\n Layer previousLayer;\n // Check if the hidden layer is the first one or not (to create the previous layer)\n if(i == 0) previousLayer = inputLayer;\n else previousLayer = hiddenLayers[i-1];\n\n hiddenLayer.initHiddenLayer(tempNeurons, previousLayer); // Init the hidden layer\n\n hiddenLayers[i] = hiddenLayer;\n }\n\n OutputLayer outputLayer = new OutputLayer(); // Creates the output layer\n\n tempNeurons = new Neuron[numOfOutputLayerNeurons]; // Creates the temporary array\n for(int i = 0; i < numOfOutputLayerNeurons; i++) {\n Neuron n = new Neuron(weightsOutputLayer[i], biasesOutputLayer[i], activationFunctionsOutputLayer[i]);// Creates the neuron of the output layer\n tempNeurons[i] = n;\n }\n\n outputLayer.initOutputLayer(tempNeurons, hiddenLayers[hiddenLayers.length-1]); // Initializes the output layer with the last hidden layer as previous layer\n\n initNeuronalNetwork(inputLayer, hiddenLayers, outputLayer, costFunction, learningAlgorithm, learningRate);\n }", "public interface Layer {\n /**\n * @return The number of neurons, excluding bias neurons and context neurons. This is the number of neurons that\n * are directly fed from elsewhere.\n */\n int getCount();\n\n /**\n * @return The number of neurons, including bias neurons and context neurons.\n */\n int getTotalCount();\n\n /**\n * @return The activation/transfer function for this neuron.\n */\n ActivationFunction getActivation();\n\n /**\n * Finalize the structure of this layer.\n * @param theOwner The neural network that owns this layer.\n * @param theLayerIndex The zero-based index of this layer.\n * @param counts The counts structure to track the weight and neuron counts.\n */\n void finalizeStructure(BasicNetwork theOwner, int theLayerIndex,\n TempStructureCounts counts);\n\n /**\n * Compute this layer.\n */\n void computeLayer();\n\n /**\n * Compute the gradients for this layer.\n * @param calc The gradient calculation utility.\n */\n void computeGradient(GradientCalc calc);\n\n /**\n * @return The start of this layer's weights in the weight vector.\n */\n int getWeightIndex();\n\n /**\n * @return The start of this layer's neurons in the neuron vector.\n */\n int getNeuronIndex();\n\n /**\n * Notification that a training batch is beginning.\n * @param rnd A random number generator, from the trainer.\n */\n void trainingBatch(GenerateRandom rnd);\n\n /**\n * @return The owner of the neural network.\n */\n BasicNetwork getOwner();\n\n /**\n * @return True if this neuron has bias.\n */\n boolean hasBias();\n}", "private Neuron[] studyLayer1(Neuron[] neuronsLayer, double[] inputData, double[] realOutput){\n for (int i = 0; i < neuronsLayer.length; i++) {\n neuronsLayer[i] = studyNeuronLayer1(neuronsLayer[i], inputData, realOutput[i], i);\n }\n return neuronsLayer;\n }", "public void learnANN(int iteration, double etta)\n {\n Initialize();\n accuracyOnEpoch = new double[iteration];\n totError = new double [iteration];\n double [] temp1 = new double [weightToHidden[0].length];\n double [] tempBias1 = new double [temp1.length+1];\n for (int T=1; T<=iteration; T++)\n {\n double myError = 0;\n for (int exampleIndex=0; exampleIndex<inputMatrix.length; exampleIndex++ ) // for each data in input\n {\n for (int i=0; i<inLayer.length; i++) // input this data+bias\n inLayer[i] = inputMatrix[exampleIndex][i];\n ////////////////////////////////////////////////////////////\n ////////// from input to hidden\n\n temp1 = feedNextLayer(inLayer, weightToHidden);\n tempBias1[0]=1; // bias for hidden\n for (int i=0; i<temp1.length; i++)\n tempBias1[i+1] = temp1[i];\n for (int i=0; i<tempBias1.length; i++)\n hidLayer[i] = tempBias1[i];\n ////////////////////////////////// hidden got values + bias=1 (hidLayer[0]=1)\n ///////////////// Now the hidden layer must perform sigmoid\n for (int i=1; i<hidLayer.length; i++)\n hidLayer[i] = sigmoid(hidLayer[i]);\n //////////from hidden to output////////////////////////////////////////\n outLayer = feedNextLayer(hidLayer, weightToOut);\n for (int i=0; i<outLayer.length; i++)\n outLayer[i] = sigmoid(outLayer[i]);\n if (T>iteration*0.95)\n {\n System.out.print(exampleIndex+1 + \" : \");\n for (int i=0; i<outLayer.length; i++)\n System.out.print(\"\\t\" + outLayer[i]);\n System.out.println();\n }\n \n //////////////////////////// Now there are some values in outputs\n /////////////////////////////////////////////////////////////////////\n ////////////// Error Backpropagation\n for (int k=0; k<outLayer.length; k++) // delta for output\n DeltaOut[k] = outLayer[k]*(1 - outLayer[k])*(target[exampleIndex][k] - outLayer[k]);\n double temp=0;\n for (int h=0; h<DeltaHid.length; h++) // delta for hidden\n {\n temp = hidLayer[h] * (1-hidLayer[h]);\n double sum=0;\n for (int k=0; k<outLayer.length; k++)\n sum = sum + (weightToOut[h][k]*DeltaOut[k]);\n temp = temp * sum;\n DeltaHid[h] = temp;\n }\n //?????????????????? DeltaHid[0]=1;\n /////////////////////////\n /////// delta for weights from hidden to output\n for (int i=0; i<weightToOut.length; i++) // i for this layer which is the hidden layer\n for (int j=0; j<weightToOut[0].length; j++) // j for the output of this layer which is output layer\n deltaWeightToOut [i][j] = etta*DeltaOut[j]*hidLayer[i];\n\n for (int i=0; i<weightToHidden.length; i++) // 'i' for this layer which is the input layer\n for (int j=0; j<weightToHidden[0].length; j++) // 'j' for the output of this layer which is the hidden layer\n deltaWeightToHidden [i][j] = etta*DeltaHid[j+1]*inLayer[i];\n /////////////////////////////////////////////////////\n ///////////Updating weights from the hidden layer to the output layer\n for (int i=0; i<weightToOut.length; i++) // i for this layer which is the hidden layer\n for (int j=0; j<weightToOut[0].length; j++) // j for the output of this layer which is output layer\n weightToOut [i][j] = weightToOut [i][j] + deltaWeightToOut[i][j];\n\n for (int i=0; i<weightToHidden.length; i++) // 'i' for this layer which is the input layer\n for (int j=0; j<weightToHidden[0].length; j++) // 'j' for the output of this layer which is the hidden layer\n weightToHidden[i][j] = weightToHidden[i][j] + deltaWeightToHidden[i][j];\n for (int k=0; k<outLayer.length; k++) // delta for output\n myError = myError + (Math.pow((target[exampleIndex][k] - outLayer[k]), 2));\n myError = myError/outLayer.length;\n makeThreshold(exampleIndex, 0.4, 0.65);\n\n } // end of training each single data\n\n totError [T-1] = myError/inputMatrix.length;\n System.out.println(\"///////////////////////////\\t\" + T + \"\\tTotal error: \"+ myError);\n accuracyMeasure(T-1);\n\n }// end of iteration\n double d =totError.length*0.95;\n for (int i= (int)d ; i<totError.length; i++)\n System.out.print(\"\\t\"+totError[i]);\n System.out.println();\n\n }", "public NeuralNetwork(int[] layers) {\n\t\tthis.layers = layers;\n\t\t// For now, I wrote three different nested loops to construct weights, bias and\n\t\t// output\n\t\t// respectively, later on we can delete some of the loops to reduce the code.\n\n\t\t// [layer][neuron][weight]\n\t\tweights = new double[layers.length - 1][][];\n\t\tfor (int i = 0; i < weights.length; i++) {\n\t\t\tweights[i] = new double[layers[i]][];\n\t\t\tfor (int j = 0; j < weights[i].length; j++) {\n\t\t\t\tweights[i][j] = new double[layers[i + 1]];\n\t\t\t\tfor (int n = 0; n < weights[i][j].length; n++) {\n\t\t\t\t\tweights[i][j][n] = Math.random(); // For now, assign all weights to double values between 0 and 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbias = new double[layers.length - 1][];\n\t\tfor (int i = 0; i < bias.length; i++) {\n\t\t\tbias[i] = new double[layers[i + 1]];\n\t\t\tfor (int j = 0; j < bias[i].length; j++) {\n\t\t\t\tbias[i][j] = Math.random(); // For now, assign all biases to double values between 0 and 1\n\t\t\t}\n\t\t}\n\t\terrors = new double[layers.length][];\n\t\toutput = new double[layers.length][];\n\t\tfor (int i = 0; i < output.length; i++) {\n\t\t\toutput[i] = new double[layers[i]]; // First layer outputs are going to be inputs\n\t\t\terrors[i] = new double[layers[i]]; // We are not going to assign first layer errors (since there cannot be).\n\t\t}\n\t}", "void initNeuronalNetwork(int numOfInputNeurons, int numOfHiddenLayers, int[] numOfHiddenLayerNeurons, int numOfOutputLayerNeurons, CostFunction costFunction, LearningAlgorithm learningAlgorithm, double learningRate) {\n Random r = new Random(); // Initializes a random class (For creating the random weights and biases)\n\n if(numOfHiddenLayerNeurons.length != numOfHiddenLayers) {\n throw new IllegalArgumentException(\"The given array of hidden layer neurons (num of hidden layers in the array) doesn't correspond with the number of hidden layer variable\");\n }\n\n double[][][] weightsHiddenLayer = new double[numOfHiddenLayers][][]; // Initializes the weight array for the weights of each hidden layer\n for(int i = 0; i < numOfHiddenLayers; i++) { // For each hidden layer\n weightsHiddenLayer[i] = new double[numOfHiddenLayerNeurons[i]][]; // Initializes the array for the given hidden layer\n for(int y = 0; y < numOfHiddenLayerNeurons[i]; y++) { // For each neuron in the given hidden layer\n if(i == 0) { // If it is the first hidden layer\n weightsHiddenLayer[i][y] = new double[numOfInputNeurons]; // Create array with number of input layer neurons\n for(int z = 0; z < numOfInputNeurons; z++) { // For each neuron in the input layer\n weightsHiddenLayer[i][y][z] = r.nextDouble(); // Set random double\n }\n } else { // If it isn't the first hidden layer\n weightsHiddenLayer[i][y] = new double[numOfHiddenLayerNeurons[i-1]]; // Create array with num of neurons in the last hidden layer\n for(int z = 0; z < numOfHiddenLayerNeurons[i-1]; z++) { // For each neuron in the previous hidden layer\n weightsHiddenLayer[i][y][z] = r.nextDouble(); // Set random double\n }\n }\n }\n }\n\n double[][] weightsOutputLayer = new double[numOfOutputLayerNeurons][]; // Initializes the weight array for the output layer\n for(int i = 0; i < numOfOutputLayerNeurons; i++) { // For each neuron in the output layer\n weightsOutputLayer[i] = new double[numOfHiddenLayerNeurons[numOfHiddenLayers-1]]; // Create the Array of the output layer with the amount of neurons that are in the last hidden layer\n for(int y = 0; y < numOfHiddenLayerNeurons[numOfHiddenLayers-1]; y++) { // For each neuron in the last hidden layer\n weightsOutputLayer[i][y] = r.nextDouble(); // Set random double\n }\n }\n\n double[][] biasesHiddenLayer = new double[numOfHiddenLayers][]; // Create the biases array of the hidden layers\n for(int i = 0; i < numOfHiddenLayers; i++) { // For each hidden layer\n biasesHiddenLayer[i] = new double[numOfHiddenLayerNeurons[i]]; // Create new double array for each neuron in the given hidden layer\n for(int y = 0; y < numOfHiddenLayerNeurons[i]; y++) { // For each neuron in the ith hidden layer\n biasesHiddenLayer[i][y] = r.nextDouble(); // Set random double\n }\n }\n\n double[] biasesOutputLayer = new double[numOfOutputLayerNeurons]; // Create array for the biases of the output layer\n for(int i = 0; i < numOfOutputLayerNeurons; i++) { // For each neuron in the output layer\n biasesOutputLayer[i] = r.nextDouble(); // Set random double\n }\n\n ActivationFunction[][] activationFunctionsHiddenLayer = new ActivationFunction[numOfHiddenLayers][]; // Create array of activation functions for every hidden layer\n for(int i = 0; i < numOfHiddenLayers; i++) { // For each hidden layer\n activationFunctionsHiddenLayer[i] = new ActivationFunction[numOfHiddenLayerNeurons[i]]; // Create array of doubles for each neuron in the given hidden layer\n for(int y = 0; y < numOfHiddenLayerNeurons[i]; y++) { // For each neuron in the hidden layer\n activationFunctionsHiddenLayer[i][y] = new Sigmoid(); // Add Sigmoid function as activation function\n }\n }\n\n ActivationFunction[] activationFunctionsOutputLayer = new ActivationFunction[numOfOutputLayerNeurons]; // Create activation function array for each neuron in the output layer\n for(int i = 0; i < numOfOutputLayerNeurons; i++) { // For each neuron in the output layer\n activationFunctionsOutputLayer[i] = new Sigmoid(); // Add Sigmoid function as activation function\n }\n\n initNeuronalNetwork(numOfInputNeurons, numOfHiddenLayers, numOfHiddenLayerNeurons, numOfOutputLayerNeurons, weightsHiddenLayer, weightsOutputLayer, biasesHiddenLayer, biasesOutputLayer, activationFunctionsHiddenLayer, activationFunctionsOutputLayer, costFunction, learningAlgorithm, learningRate); // Calls init function\n }", "public static MultiLayerNetwork alexnetModel(Integer numLabels) {\n\n double nonZeroBias = 1;\n double dropOut = 0.5;\n\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .weightInit(WeightInit.DISTRIBUTION)\n .dist(new NormalDistribution(0.0, 0.01))\n .activation(Activation.RELU)\n .updater(new Nesterovs(new StepSchedule(ScheduleType.ITERATION, 1e-2, 0.1, 100000), 0.9))\n .biasUpdater(new Nesterovs(new StepSchedule(ScheduleType.ITERATION, 2e-2, 0.1, 100000), 0.9))\n .gradientNormalization(GradientNormalization.RenormalizeL2PerLayer) // normalize to prevent vanishing or exploding gradients\n .l2(5 * 1e-4)\n .list()\n .layer(0, convInit(\"cnn1\", channels, 96, new int[]{11, 11}, new int[]{4, 4}, new int[]{3, 3}, 0))\n .layer(1, new LocalResponseNormalization.Builder().name(\"lrn1\").build())\n .layer(2, maxPool(\"maxpool1\", new int[]{3, 3}))\n .layer(3, conv5x5(\"cnn2\", 256, new int[]{1, 1}, new int[]{2, 2}, nonZeroBias))\n .layer(4, new LocalResponseNormalization.Builder().name(\"lrn2\").build())\n .layer(5, maxPool(\"maxpool2\", new int[]{3, 3}))\n .layer(6, conv3x3(\"cnn3\", 384, 0))\n .layer(7, conv3x3(\"cnn4\", 384, nonZeroBias))\n .layer(8, conv3x3(\"cnn5\", 256, nonZeroBias))\n .layer(9, maxPool(\"maxpool3\", new int[]{3, 3}))\n .layer(10, fullyConnected(\"ffn1\", 4096, nonZeroBias, dropOut, new GaussianDistribution(0, 0.005)))\n .layer(11, fullyConnected(\"ffn2\", 4096, nonZeroBias, dropOut, new GaussianDistribution(0, 0.005)))\n .layer(12, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .name(\"output\")\n .nOut(numLabels)\n .activation(Activation.SOFTMAX)\n .build())\n .backprop(true)\n .pretrain(false)\n .setInputType(InputType.convolutional(height, width, channels))\n .build();\n\n return new MultiLayerNetwork(conf);\n\n }", "protected void calc(){\n if(input!=null && neuron!=null){\n for(int i=0;i<numberOfNeuronsInLayer;i++){\n neuron.get(i).setInputs(this.input);\n neuron.get(i).calc();\n try{\n output.set(i,neuron.get(i).getOutput());\n }\n catch(IndexOutOfBoundsException iobe){\n output.add(neuron.get(i).getOutput());\n }\n }\n }\n }", "public void learnANN(double [][] Inputs ,int iteration, double etta, double momentum)\n {\n Initialize();\n accuracyOnEpoch = new double[iteration];\n totError = new double [iteration];\n hiddenPerEpoch = new double [iteration][hidLayer.length];\n inputMatrix = addBias(Inputs);\n target = myTarget(Inputs, myData.numOfClasses);\n ////////////////////// setting momentum Matrices ///////////////\n double [][] deltaW2HidMom = new double [inLayer.length][hidLayer.length-1];\n for (int i=0; i<deltaW2HidMom.length; i++)\n for (int j=0; j<deltaW2HidMom[0].length; j++)\n deltaW2HidMom[i][j] = 0;\n double [][] deltaW2OutMom = new double [hidLayer.length][outLayer.length];\n for (int i=0; i<deltaW2OutMom.length; i++)\n for (int j=0; j<deltaW2OutMom[0].length; j++)\n deltaW2OutMom[i][j] = 0;\n //////////////////////////////////////////////////////////\n double [] temp1 = new double [weightToHidden[0].length];\n double [] tempBias1 = new double [temp1.length+1];\n for (int T=1; T<=iteration; T++)\n {\n double myError = 0;\n for (int exampleIndex=0; exampleIndex<inputMatrix.length; exampleIndex++ ) // for each data in input\n {\n for (int i=0; i<inLayer.length; i++) // input this data+bias\n inLayer[i] = inputMatrix[exampleIndex][i];\n ////////////////////////////////////////////////////////////\n ////////// from input to hidden\n\n temp1 = feedNextLayer(inLayer, weightToHidden);\n tempBias1[0]=1; // bias for hidden\n for (int i=0; i<temp1.length; i++)\n tempBias1[i+1] = temp1[i];\n for (int i=0; i<tempBias1.length; i++)\n hidLayer[i] = tempBias1[i];\n ////////////////////////////////// hidden got values + bias=1 (hidLayer[0]=1)\n ///////////////// Now the hidden layer must perform sigmoid\n for (int i=1; i<hidLayer.length; i++)\n hidLayer[i] = sigmoid(hidLayer[i]);\n //////////from hidden to output////////////////////////////////////////\n outLayer = feedNextLayer(hidLayer, weightToOut);\n for (int i=0; i<outLayer.length; i++)\n outLayer[i] = sigmoid(outLayer[i]);\n\n //////////////////////////// Now there are some values in outputs\n /////////////////////////////////////////////////////////////////////\n ////////////// Error Backpropagation\n for (int k=0; k<outLayer.length; k++) // delta for output\n DeltaOut[k] = outLayer[k]*(1 - outLayer[k])*(target[exampleIndex][k] - outLayer[k]);\n double temp=0;\n for (int h=0; h<DeltaHid.length; h++) // delta for hidden\n {\n temp = hidLayer[h] * (1-hidLayer[h]);\n double sum=0;\n for (int k=0; k<outLayer.length; k++)\n sum = sum + (weightToOut[h][k]*DeltaOut[k]);\n temp = temp * sum;\n DeltaHid[h] = temp;\n }\n //?????????????????? DeltaHid[0]=1;\n /////////////////////////**********************************************************\n /////// delta for weights from hidden to output\n for (int i=0; i<weightToOut.length; i++) // i for this layer which is the hidden layer\n for (int j=0; j<weightToOut[0].length; j++) // j for the output of this layer which is output layer\n deltaWeightToOut [i][j] = etta*DeltaOut[j]*hidLayer[i]+ (momentum*deltaW2OutMom[i][j]);\n ////// delta for weights from input to hidden layer\n for (int i=0; i<weightToHidden.length; i++) // 'i' for this layer which is the input layer\n for (int j=0; j<weightToHidden[0].length; j++) // 'j' for the output of this layer which is the hidden layer\n deltaWeightToHidden [i][j] = etta*DeltaHid[j+1]*inLayer[i] + (momentum*deltaW2HidMom[i][j]);\n /////////////////////////////////////////////////////////////////////////////////////////////\n //////////// Keep this delta weight for the next update\n for (int i=0; i<weightToOut.length; i++) // i for this layer which is the hidden layer\n for (int j=0; j<weightToOut[0].length; j++) // j for the output of this layer which is output layer\n deltaW2OutMom[i][j] = deltaWeightToOut [i][j];\n\n for (int i=0; i<weightToHidden.length; i++) // 'i' for this layer which is the input layer\n for (int j=0; j<weightToHidden[0].length; j++) // 'j' for the output of this layer which is the hidden layer\n deltaW2HidMom[i][j] = deltaWeightToHidden [i][j];\n\n /////////////////////////////////////////////////////*************************************\n ///////////Updating weights from the hidden layer to the output layer\n for (int i=0; i<weightToOut.length; i++) // i for this layer which is the hidden layer\n for (int j=0; j<weightToOut[0].length; j++) // j for the output of this layer which is output layer\n weightToOut [i][j] = weightToOut [i][j] + deltaWeightToOut[i][j];\n\n for (int i=0; i<weightToHidden.length; i++) // 'i' for this layer which is the input layer\n for (int j=0; j<weightToHidden[0].length; j++) // 'j' for the output of this layer which is the hidden layer\n weightToHidden[i][j] = weightToHidden[i][j] + deltaWeightToHidden[i][j];\n for (int k=0; k<outLayer.length; k++) // delta for output\n myError = myError + (Math.pow((target[exampleIndex][k] - outLayer[k]), 2));\n myError = myError/outLayer.length;\n\n if (exampleIndex == 1)\n for (int i=0; i<hiddenPerEpoch[0].length; i++)\n hiddenPerEpoch[T-1] [i] = hidLayer[i];\n makeThreshold(exampleIndex, 0.4, 0.65);\n// for (int i=0; i<outLayer.length; i++)\n// System.out.print(outLayer[i]);\n// System.out.println();\n\n } // end of training each single data\n\n totError [T-1] = myError/inputMatrix.length;\n accuracyMeasure(T-1);\n\n\n }// end of iteration\n\n }", "public void prune(final int targetLayer, final int neuron) {\n // check for errors\n this.network.validateNeuron(targetLayer, neuron);\n\n // don't empty a layer\n if (this.network.getLayerNeuronCount(targetLayer) <= 1) {\n throw new NeuralNetworkError(\n \"A layer must have at least a single neuron. If you want to remove the entire layer you must create a new network.\");\n }\n\n // access the flat network\n final FlatNetwork flat = this.network.getStructure().getFlat();\n final double[] oldWeights = flat.getWeights();\n\n // first find out how many connections there will be after this prune.\n int connections = oldWeights.length;\n int inBoundConnections = 0;\n int outBoundConnections = 0;\n\n // are connections removed from the previous layer?\n if (targetLayer > 0) {\n inBoundConnections = this.network\n .getLayerTotalNeuronCount(targetLayer - 1);\n connections -= inBoundConnections;\n }\n\n // are there connections removed from the next layer?\n if (targetLayer < (this.network.getLayerCount() - 1)) {\n outBoundConnections = this.network\n .getLayerNeuronCount(targetLayer + 1);\n connections -= outBoundConnections;\n }\n\n // allocate new weights now that we know how big the new weights will be\n final double[] newWeights = new double[connections];\n\n // construct the new weights\n int weightsIndex = 0;\n\n for (int fromLayer = flat.getLayerCounts().length - 2; fromLayer >= 0;\n fromLayer--) {\n final int fromNeuronCount = this.network\n .getLayerTotalNeuronCount(fromLayer);\n final int toNeuronCount = this.network\n .getLayerNeuronCount(fromLayer + 1);\n final int toLayer = fromLayer + 1;\n\n for (int toNeuron = 0; toNeuron < toNeuronCount; toNeuron++) {\n for (int fromNeuron = 0; fromNeuron < fromNeuronCount;\n fromNeuron++) {\n boolean skip = false;\n if ((toLayer == targetLayer) && (toNeuron == neuron)) {\n skip = true;\n } else if ((fromLayer == targetLayer) &&\n (fromNeuron == neuron)) {\n skip = true;\n }\n\n if (!skip) {\n newWeights[weightsIndex++] = this.network.getWeight(\n fromLayer, fromNeuron, toNeuron);\n }\n }\n }\n }\n\n // swap in the new weights\n flat.setWeights(newWeights);\n\n // decrease layer count\n final int flatLayer = this.network.getLayerCount() - targetLayer - 1;\n flat.getLayerCounts()[flatLayer]--;\n flat.getLayerFeedCounts()[flatLayer]--;\n\n // reindex\n reindexNetwork();\n\n }", "private void trainOnSamples() {\n for (Sample sample : samples) {\n double sum = 0;\n \n for (int i = 0; i < weights.length; i++) { //calculating w1.x1 + w2.x2 + ... \n sum += weights[i] * sample.getP()[i];\n }\n sum += bias; //adding bias to the sum\n\n if (!compareOutput(sum, sample)) { //compare network & target output\n //updating the weights\n for (int i = 0; i < weights.length; i++) {\n weights[i] += sample.getTarget() * sample.getP()[i];\n }\n //updating the bias\n bias += sample.getTarget();\n sample.setValidation(false);\n } else {\n sample.setValidation(true);\n }\n }\n }", "public void train(DoubleMatrix2D input, DoubleMatrix2D target) {\n/* ==================== Feed forward: ============================== */\n\t\tDoubleMatrix2D hiddenGuess = input.copy();\n\t\tList<DoubleMatrix2D> hiddenGuesses = new ArrayList<>();\n\t\t\n\t\tfor(int i = 0; i < nHiddenLayers; i++) {\n\t\t\thiddenGuess = algebra.mult(hiddenWeights.get(i), hiddenGuess);\n\t\t\thiddenGuess.assign(hiddenBiases.get(i), Functions.plus);\n\t\t\thiddenGuess.assign(activate);\n\t\t\thiddenGuesses.add(hiddenGuess);\n\t\t}\n\t\tDoubleMatrix2D outputGuess = algebra.mult(outputWeights, hiddenGuesses.get(hiddenGuesses.size() - 1));\n\t\toutputGuess.assign(outputBias, Functions.plus);\n\t\toutputGuess.assign(activate);\n\t\t\n\n/* ==================== Back propagation: ============================ */\n\t\tDoubleMatrix2D outputError = target.copy();\n\t\toutputError.assign(outputGuess, Functions.minus);\n\t\t\n\t\t// Output Layer:\n\t\tDoubleMatrix2D dBiasOutput = outputGuess.assign(dActivate).copy();\n\t\tdBiasOutput.assign(outputError, Functions.mult);\n\t\tdBiasOutput.assign(Functions.mult(alfa));\n\t\toutputBias.assign(dBiasOutput, Functions.plus); // Update output bias\n\t\tDoubleMatrix2D dWeightsOutput = algebra.mult(dBiasOutput, algebra.transpose(hiddenGuesses.get(hiddenGuesses.size() - 1)).copy());\n\t\toutputWeights.assign(dWeightsOutput, Functions.plus); // update output weights\n\t\t\n\t\t// Hidden layers:\n\t\tDoubleMatrix2D hiddenError, hiddenInput, dBias, dWeights, nextWeights;\n\t\tfor(int i = nHiddenLayers - 1; i >= 0; i--) {\n\t\t\tnextWeights = i == hiddenGuesses.size() - 1 ? outputWeights : hiddenWeights.get(i + 1); // The weights of the layer after the current layer.\n\t\t\thiddenError = algebra.mult(algebra.transpose(nextWeights).copy(), outputError); // The error of the layer.\n\n\t\t\thiddenInput = i == 0 ? input.copy() : hiddenGuesses.get(i-1); // The input to the current layer\n\t\t\t\n\t\t\tdBias = (hiddenGuesses.get(i)).copy();\n\t\t\tdBias = dBias.assign(dActivate); // Differentiating the Output.\n\t\t\tdBias.assign(hiddenError, Functions.mult); // Multiplying the error with the guess made by the layer.\n\t\t\tdBias.assign(Functions.mult(alfa)); // Multiplying with the learning rate.\n\t\t\t(hiddenBiases.get(i)).assign(dBias, Functions.plus); // Update hidden Bias.\n\t\t\tdWeights = algebra.mult(dBias, algebra.transpose(hiddenInput.copy())); // Multiplying dBias with the input to the get gradient of the weights.\n\t\t\t(hiddenWeights.get(i)).assign(dWeights, Functions.plus); // Update hidden weights\t\t\t\t\t\t\t\n\t\t\t\n\t\t\toutputError = hiddenError.copy(); // Updating the outputError, so it is ready for the next iteration.\n\t\t}\t\n\t}", "public void addLayer(NeuralNetworkLayer arg0) {\n\n\t\targ0.setStartPos(SIZE);\n\t\t\n\t\tfor(int i = 0; i < arg0.size(); i++)\n\t\t\tlinkToNeuron.add(NUM_OF_LAYERS);\n\t\t\n\t\tlayers.add(arg0);\n\n\t\tNUM_OF_LAYERS++;\n\t\t\n\t\tSIZE += arg0.size();\n\t}", "public NeuralNetwork (String FileAddress, int hidUnitNum)\n {\n myData = new DataSet(FileAddress);\n firstData = new double [myData.ExampleMatrix.length][myData.ExampleMatrix[0].length];\n for (int i=0; i<firstData.length; i++)\n for (int j=0; j<firstData[0].length; j++)\n firstData[i][j]= myData.ExampleMatrix[i][j];\n// myData.Normalize();\n target =new double [myData.ExampleMatrix.length][myData.numOfClasses];\n target = myTarget(myData);\n// int classIndex = myData.ExampleMatrix[0].length-1;\n int numberOfAtt = myData.ExampleMatrix[0].length-1;\n\n outLayer = new double [myData.numOfClasses];\n hidLayer = new double [hidUnitNum+1];\n inLayer = new double[numberOfAtt+1];\n weightToHidden = new double [inLayer.length][hidLayer.length-1];\n deltaWeightToHidden = new double [inLayer.length][hidLayer.length-1];\n weightToOut = new double [hidLayer.length][outLayer.length];\n deltaWeightToOut = new double [hidLayer.length][outLayer.length];\n inputMatrix = new double [myData.ExampleMatrix.length][myData.ExampleMatrix[0].length];\n DeltaOut = new double [outLayer.length];\n DeltaHid = new double [hidLayer.length];\n\n for (int i=0; i<inputMatrix.length; i++) /// adding bias to Input\n {\n inputMatrix[i][0] = 1;\n for (int j=0; j<inputMatrix[0].length-1; j++)\n inputMatrix [i][j+1] = myData.ExampleMatrix[i][j];\n }\n corruptionRate =0;\n thresholdedOutput = new int [myData.ExampleMatrix.length][outLayer.length];\n\n }", "public void adjust(double learningRate, boolean layer){\r\n //Layer false == adjust hiddenLayer\r\n //Layer true == adjust outputLayer\r\n if (layer) {\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].weights[j] -= learningRate*outputLayer[i].dw[j];\r\n }\r\n outputLayer[i].bias -= learningRate*outputLayer[i].db;\r\n }\r\n } else {\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].weights[j] -= learningRate*hiddenLayer[i].dw[j];\r\n }\r\n hiddenLayer[i].bias -= learningRate*hiddenLayer[i].db;\r\n }\r\n }\r\n }", "private void forwardPropagate() {\r\n\t\t\r\n\t\t// starting with first hidden layer, let's sum forward our values..\r\n\t\tfor(int i = INPUT_LAYER+1; i <= OUTPUT_LAYER; i++) {\r\n\t\t\t\r\n\t\t\tfor(Neuron n:m_neurons[i]) {\r\n\t\t\t\tdouble sum = 0.0;\t\t\t\t\t\r\n\t\t\t\tfor(int j = 0; j < n.getNumWeights(); j++) {\r\n\t\t\t\t\tsum += n.getWeight(j) * m_neurons[i-1][j].getOutput();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tn.setOutput(sigmoid(sum + n.getBias()));\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private void propagate() {\n for (int layerIndex = 1; layerIndex < this.layers.size(); layerIndex++) {\n Layer outputLayer = this.layers.get(layerIndex);\n for (int outputIndex = 0; outputIndex < outputLayer.getNodes().length; outputIndex++) {\n Node outputNode = outputLayer.getNodes()[outputIndex];\n double value = 0;\n Weight[] weights = outputNode.getWeights();\n for (int inputIndex = 0; inputIndex < outputNode.getInputNodes().length; inputIndex++) {\n value += outputNode.getInputNodes()[inputIndex].getActivation() * weights[inputIndex].getValue();\n }\n if (this.useBias) {\n value += outputNode.getBias().getValue();\n }\n\n outputNode.setValue(value);\n\n if (outputLayer.getActivationFunction() == ActivationFunction.RELU) {\n value = MathFunctions.relu(value, false);\n } else if (outputLayer.getActivationFunction() == ActivationFunction.LEAKYRELU) {\n value = MathFunctions.leakyRelu(value, -0.01, false);\n } else if (outputLayer.getActivationFunction() == ActivationFunction.SIGMOID) {\n value = MathFunctions.sigmoid(value, false);\n } else if (outputLayer.getActivationFunction() == ActivationFunction.SOFTMAX) {\n value = MathFunctions.softmax(outputNode.getIndexInLayer(), this.layers.get(outputNode.getLayerPosition()).getNodes(), false);\n }\n\n outputNode.setActivation(value);\n }\n }\n }", "void initNeuronalNetwork(InputLayer inputLayer, HiddenLayer[] hiddenLayers, OutputLayer outputLayer, CostFunction costFunction, LearningAlgorithm learningAlgorithm, double learningRate) {\n this.inputLayer = inputLayer;\n this.hiddenLayers = hiddenLayers;\n this.outputLayer = outputLayer;\n\n this.learningAlgorithm = learningAlgorithm;\n\n learningAlgorithm.initLearningAlgorithm(inputLayer, hiddenLayers, outputLayer, costFunction, learningRate);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start of user code (user defined attributes for Director) End of user code The constructor.
public Director() { // Start of user code constructor for Director) super(); // End of user code }
[ "public SiacTAttr() {\n\t}", "public AttributeNS() {\n }", "public Director() {\n }", "public Director() {\n }", "public Constructor(){\n\t\t\n\t}", "public AttributeBeforMch() {\n }", "public Doctor() {\r\n\r\n\t}", "public Owner()\n {\n // initialise instance variables\n }", "public AttributeChange() {\n }", "public CyanSus() {\n\n }", "public User()\n\t{\n\t\t// Start of user code constructor for User)\n\t\tsuper();\n\t\t// End of user code\n\t}", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "public Arme()\n\t{\n\t\tsuper(\"Arme\");\n\t}", "public AminoWord3 ()\n {\n initialize ();\n }", "public Doctor() {\n /* Invoke the constructor of the parent class. */\n super(\"Doctor\", true, 5, 8);\n }", "public ModuleObjectAttributeItem() {}", "protected Automobile(){}", "public Professor()\n\t{\n\t\t//stuff\n\t}", "private CodeCamp() {\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the pixelGLConverter associated with this canvas.
public PixelGLConverter getPixelGLConverter() { return pixelGLConverter; }
[ "public Converter<?, ?> getConverter() {\n return converter;\n }", "@Nullable\n public Converter<?> getConverter() {\n return _converter;\n }", "public Converter getConverter() {\n return converter;\n }", "public Matrix44 getLocalToPixel() {\n return new Matrix44(_localToPixel);\n }", "AttributeConverter<?, ?> getConverter();", "public FrameConverter getFrameConverter() {\n return frameConverter;\n }", "public IKKeyValueConverter<?> getConverter() {\n\t\treturn converter;\n\t}", "public Matrix44 getWorldToPixel() {\n return new Matrix44(_worldToPixel);\n }", "public com.tangosol.util.Converter getConverterToInternal()\n {\n // import com.tangosol.util.Converter;\n \n Converter conv = __m_ConverterToInternal;\n if (conv == null)\n {\n synchronized (this)\n {\n conv = __m_ConverterToInternal;\n if (conv == null)\n {\n conv = instantiateConverterToInternal(getContextClassLoader());\n setConverterToInternal(conv);\n }\n }\n }\n return conv;\n }", "public com.tangosol.util.Converter getConverterFromInternal()\n {\n // import com.tangosol.util.Converter;\n \n Converter conv = __m_ConverterFromInternal;\n if (conv == null)\n {\n synchronized (this)\n {\n conv = __m_ConverterFromInternal;\n if (conv == null)\n {\n conv = instantiateConverterFromInternal(getContextClassLoader());\n setConverterFromInternal(conv);\n }\n }\n }\n return conv;\n }", "public StringConverter<T> getConverter() {\n\n return this.converterProperty.get();\n }", "public StringConvert getConverter() {\n return converter;\n }", "public TypeConverter<?> getTypeConverter() {\n return typeConverter;\n }", "public ByteBuffer getPixelBytes()\n {\n return pixelBuffer;\n }", "protected StringToNumberConverter<T> getConverter() {\n\t\tif (converter == null) {\n\t\t\tconverter = new StringToNumberConverter<>(getType());\n\t\t}\n\t\treturn converter;\n\t}", "public ByteBuffer getPixelBytes()\r\n {\r\n return pixelBuffer;\r\n }", "public GL10 getGL()\n\t{\n\t\treturn _renderer.getGL();\n\t}", "public Converter getConverter()\n {\n Application application = FacesContext.getCurrentInstance().getApplication();\n String name = getName();\n if (name.equals(\"Salary\"))\n {\n Converter converter = application.createConverter(Number.class);\n if (converter != null && converter instanceof NumberConverter)\n {\n NumberConverter numberConv = (NumberConverter) converter;\n numberConv.setGroupingUsed(false);\n numberConv.setPattern(\"$ ###0,000.00\");\n numberConv.setType(\"currency\");\n numberConv.setCurrencySymbol(\"$\"); \n return numberConv;\n }\n }\n return null;\n }", "public static TypeConverter getTypeConverter() {\n return typeConverter;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "StateOrProvince" element
public void setStateOrProvince(java.lang.String stateOrProvince) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATEORPROVINCE$2, 0); if (target == null) { target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATEORPROVINCE$2); } target.setStringValue(stateOrProvince); } }
[ "public void setStateOrProvince(java.lang.String stateOrProvince)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATEORPROVINCE$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATEORPROVINCE$6);\r\n }\r\n target.setStringValue(stateOrProvince);\r\n }\r\n }", "public void xsetStateOrProvince(org.apache.xmlbeans.XmlString stateOrProvince)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STATEORPROVINCE$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STATEORPROVINCE$2);\r\n }\r\n target.set(stateOrProvince);\r\n }\r\n }", "public void xsetStateOrProvince(org.apache.xmlbeans.XmlString stateOrProvince)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(STATEORPROVINCE$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(STATEORPROVINCE$6);\r\n }\r\n target.set(stateOrProvince);\r\n }\r\n }", "public void setStateOrRegion(String stateOrRegion) {\n\t\tthis.stateOrRegion = stateOrRegion;\n\t}", "public void unsetStateOrProvince()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(STATEORPROVINCE$2, 0);\r\n }\r\n }", "public void unsetStateOrProvince()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(STATEORPROVINCE$6, 0);\r\n }\r\n }", "public void setLocationProvince(String locationProvince) {\n this.locationProvince = locationProvince;\n }", "public void setWorkAddressProvince(java.lang.String workAddressProvince) {\n this.workAddressProvince = workAddressProvince;\n }", "public void setCountryOrRegion(String value) {\n\t\tthis.propertyBag.setSimplePropertyBag(\n\t\t\t\tPhysicalAddressSchema.CountryOrRegion, value);\n\t}", "public String getStateOrProvince() {\r\n return stateOrProvince;\r\n }", "public void setRegisterProvince(String registerProvince) {\n this.registerProvince = registerProvince;\n }", "public void setAdrProvince(String adrProvince) {\n this.adrProvince = adrProvince;\n }", "public void setCity(String c)\n {\n address.setCity(c);\n }", "public void setProvince(String province){\n this.province = province;\n }", "public boolean isSetStateOrProvince()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(STATEORPROVINCE$6) != 0;\r\n }\r\n }", "public void setProvince(String province) {\r\n this.province = province;\r\n }", "public void xsetProvince(org.apache.xmlbeans.XmlString province)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PROVINCE$14, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PROVINCE$14);\n }\n target.set(province);\n }\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "StateProvince getStateProvince();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field170' field. doc for field170
public java.lang.CharSequence getField170() { return field170; }
[ "public java.lang.CharSequence getField170() {\n return field170;\n }", "public void setField170(java.lang.CharSequence value) {\n this.field170 = value;\n }", "public java.lang.CharSequence getField169() {\n return field169;\n }", "public java.lang.CharSequence getField171() {\n return field171;\n }", "public java.lang.CharSequence getField157() {\n return field157;\n }", "public java.lang.CharSequence getField169() {\n return field169;\n }", "public java.lang.CharSequence getField157() {\n return field157;\n }", "public java.lang.CharSequence getField159() {\n return field159;\n }", "public java.lang.CharSequence getField171() {\n return field171;\n }", "java.lang.String getField1671();", "public java.lang.CharSequence getField185() {\n return field185;\n }", "public java.lang.CharSequence getField150() {\n return field150;\n }", "public java.lang.CharSequence getField175() {\n return field175;\n }", "java.lang.String getField1600();", "public java.lang.CharSequence getField185() {\n return field185;\n }", "public java.lang.CharSequence getField159() {\n return field159;\n }", "public java.lang.CharSequence getField161() {\n return field161;\n }", "java.lang.String getField1571();", "public java.lang.CharSequence getField153() {\n return field153;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first moi delete documents in the ordered set where uploadedBy = &63;.
public MOIDeleteDocuments findByUploadedBy_First( String uploadedBy, com.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments> orderByComparator) throws NoSuchMOIDeleteDocumentsException;
[ "public MOIDeleteDocuments fetchByUploadedBy_First(\n\t\tString uploadedBy,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public java.util.List<MOIDeleteDocuments> findByUploadedBy(\n\t\tString uploadedBy);", "public java.util.List<MOIDeleteDocuments> findByUploadedBy(\n\t\tString uploadedBy, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);", "public java.util.List<MOIDeleteDocuments> findByUploadedBy(\n\t\tString uploadedBy, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public java.util.List<MOIDeleteDocuments> findByUploadedBy(\n\t\tString uploadedBy, int start, int end);", "public MOIDeleteDocuments fetchByUploadedBy_Last(\n\t\tString uploadedBy,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public MOIDeleteDocuments fetchByUploadedDate_First(\n\t\tDate uploadedDate,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public MOIDeleteDocuments findByUploadedBy_Last(\n\t\t\tString uploadedBy,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;", "public MOIDeleteDocuments[] findByUploadedBy_PrevAndNext(\n\t\t\tlong documentId, String uploadedBy,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;", "public MOIDeleteDocuments findByUploadedDate_First(\n\t\t\tDate uploadedDate,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;", "public java.util.List<MOIDeleteDocuments> findByUploadedDate(\n\t\tDate uploadedDate);", "public MOIDeleteDocuments fetchByUpdatedBy_First(\n\t\tString updatedBy,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public java.util.List<MOIDeleteDocuments> findByUploadedDate(\n\t\tDate uploadedDate, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);", "public MOIDeleteDocuments fetchByUploadedDate_Last(\n\t\tDate uploadedDate,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public java.util.List<MOIDeleteDocuments> findByUploadedDate(\n\t\tDate uploadedDate, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\torderByComparator);", "public MOIDeleteDocuments findByUpdatedBy_First(\n\t\t\tString updatedBy,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;", "public MOIDeleteDocuments findByUploadedDate_Last(\n\t\t\tDate uploadedDate,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;", "public java.util.List<MOIDeleteDocuments> findByUploadedDate(\n\t\tDate uploadedDate, int start, int end);", "public MOIDeleteDocuments[] findByUploadedDate_PrevAndNext(\n\t\t\tlong documentId, Date uploadedDate,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create Happening status values
private void createHappeningStatus() { HappeningStatus hsActive = happeningStatusRepo.findFirstByStatusName("ACTIVE"); if (hsActive == null) { hsActive = new HappeningStatus("ACTIVE", "The happening will happen as planned!"); happeningStatusRepo.save(hsActive); } HappeningStatus hsDeleted = happeningStatusRepo.findFirstByStatusName("DELETED"); if (hsDeleted == null) { hsDeleted = new HappeningStatus("DELETED", "The happening is cancelled!"); happeningStatusRepo.save(hsDeleted); } }
[ "private void addStatus() {\n\t\tString[][] stats = new String[livingSheep.size()][7];\n\t\t\n\t\tfor (int i = 0; i < livingSheep.size(); i++) {\n\t\t\tstats[i][0] = Integer.toString(livingSheep.get(i).getId());\n\t\t\tstats[i][1] = Long.toString(System.currentTimeMillis()/1000);\n\t\t\tstats[i][2] = Integer.toString(rand.nextInt(1)+39);\n\t\t\tstats[i][3] = Integer.toString(rand.nextInt(30)+60);\n\t\t\tint intlat = rand.nextInt(y_diff_int);\n\t\t\tdouble doublelat = (double) intlat;\n\t\t\tdoublelat /= 100000;\n\t\t\tstats[i][5] = Double.toString(doublelat+map_y_min);\n\t\t\tint intlong = rand.nextInt(x_diff_int);\n\t\t\tdouble doublelong = (double) intlong;\n\t\t\tdoublelong /= 100000;\n\t\t\tstats[i][4] = Double.toString(doublelong+map_x_min);\n\t\t\tstats[i][6] = Integer.toString(livingSheep.get(i).getFarmId());\n\t\t}\n\t\tserver.notifier.recieveStatus(stats);\n\t}", "protected void generateStateBasedOnValueAndThresholds()\n\t{\n\t\t\n\t\tif (name.equals(AMSupport.AVG_RESP_TIME) || name.equals(AMSupport.REQ_PER_MIN))\n\t\t{\n\t\t\tstate = AMSupport.OK_STATE;\n\t\t\tstates.add(state);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// other metric types should look at the error and warning thresholds\n\t\tif (value >= errorThreshold)\n\t\t{\n\t\t\tstate = AMSupport.ERROR_STATE;\n\t\t}\n\t\telse if (value >= warningThreshold)\n\t\t{\n\t\t\tstate = AMSupport.WARNING_STATE;\n\t\t}\n\t\telse {\n\t\t\tstate = AMSupport.OK_STATE;\n\t\t}\n\t\tstates.add(state);\n\t}", "private BinStatusUpdate buildNewStatus() {\n return BinStatusUpdate.newBuilder()\n .setAmount(StuffAmount.newBuilder().setStuffAmount(bin.getStuffAmount()).build())\n .setStuff(Stuff.newBuilder().setStuffName(bin.getStuffName()).build())\n .setMaxAmount(bin.MAX_AMOUNT)\n .build();\n }", "Happening createHappening();", "org.hl7.fhir.ObservationStatus addNewStatus();", "public Bestelling.Status getStatus();", "public retStatus Status(){\n // Your code here\n this.mutex.lock();\n\n retStatus r = new retStatus(State.Pending, this.values.get(this.me));\n if (done) {\n r.state = State.Decided;\n }\n\n this.mutex.unlock();\n return r;\n }", "@SuppressWarnings(\"static-method\")\n\tpublic IStatus createOkStatus() {\n\t\treturn Status.OK_STATUS;\n\t}", "public HealthcheckStatus() {\n\n timestamp = new Date();\n\n }", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void initialiseStatus() {\n\t\tEntityManager em = emf.createEntityManager();\t\n\t\t\n\t\ttry {\n\t\t\tQuery query = em.createQuery(\"SELECT s FROM Status AS s\");\n\t\t\tList<Status> status = query.getResultList();\n\t\t\t\n\t\t\tif (status.size() == 0) {\n\t\t\t\tStatus one = new Status();\n\t\t\t\tone.setReference(\"S1\");\n\t\t\t\tone.setTitle(\"Being diagnosed\");\n\t\t\t\t\n\t\t\t\tStatus two = new Status();\n\t\t\t\ttwo.setReference(\"S2\");\n\t\t\t\ttwo.setTitle(\"Diagnostic done\");\n\t\t\t\t\n\t\t\t\tStatus three = new Status();\n\t\t\t\tthree.setReference(\"S3\");\n\t\t\t\tthree.setTitle(\"Being repaired\");\n\t\t\t\t\n\t\t\t\tStatus four = new Status();\n\t\t\t\tfour.setReference(\"S4\");\n\t\t\t\tfour.setTitle(\"Finished\");\n\t\t\t\t\n\t\t\t\tStatus five = new Status();\n\t\t\t\tfive.setReference(\"S5\");\n\t\t\t\tfive.setTitle(\"Refused by client\");\n\t\t\t\t\n\t\t\t\tStatus six = new Status();\n\t\t\t\tsix.setReference(\"S6\");\n\t\t\t\tsix.setTitle(\"Nothing to report\");\n\t\t\t\t\n\t\t\t\tList<Status> successors = new ArrayList<Status>();\n\t\t\t\tsuccessors.add(two);\n\t\t\t\tsuccessors.add(six);\n\t\t\t\tone.setSuccessors(successors);\n\t\t\t\t\n\t\t\t\tsuccessors = new ArrayList<Status>();\n\t\t\t\tsuccessors.add(three);\n\t\t\t\tsuccessors.add(five);\n\t\t\t\ttwo.setSuccessors(successors);\n\n\t\t\t\tsuccessors = new ArrayList<Status>();\n\t\t\t\tsuccessors.add(four);\n\t\t\t\tthree.setSuccessors(successors);\n\t\t\t\tEntityTransaction t = em.getTransaction();\n\t\t\t\tt.begin();\n\t\t\t\tem.persist(one);\n\t\t\t\tem.persist(two);\n\t\t\t\tem.persist(three);\n\t\t\t\tem.persist(four);\n\t\t\t\tem.persist(five);\n\t\t\t\tem.persist(six);\n\t\t\t\tt.commit();\n\t\t\t}\n\t\t} finally {\n\t\t\tif(em.getTransaction().isActive()) em.getTransaction().rollback();\n\t\t\tem.close();\t\t\t\n\t\t}\n\t\t\n\t}", "LossOfInformation createLossOfInformation();", "public void buildAccountStatus() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS account_status (user_id\"\n + \" TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users\"\n + \"(id)\" + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "public HwStatus() {\n \t\tsuper();\n \t\tthis.hwSig = 0;\n \t\tthis.microtickPeriod = 10000;\t// default\n \t\tthis.cf_version = \"\";\n \t}", "public interface Status {\n /** created. */\n String CREATED = \"created\";\n /** already created. */\n String ALREADY_CREATED = \"already created\";\n }", "public void testStatusFields() {\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.STARTED);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.SUBMITTED);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.DONE);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.FAILED);\n JobStatus s = JobStatus.NEW;\n assertEquals(\"Error implementing status code names for NEW\", \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for NEW\", \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.SUBMITTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.STARTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.DONE;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.FAILED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.RESUBMITTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n }", "private String createStatusString(final WorldBossEntity currentItem) {\n int startHour = (currentItem.getStartMinutes() / 60) % 24;\n int startMinutes = currentItem.getStartMinutes() % 60;\n return String.format(getContext().getString(R.string.world_boss_status_pattern),\n startHour, startMinutes);\n }", "protected abstract ArrayList<Status> getHoldingStatus();", "public int value() {return status; }", "public void getStatus(){\n\n status = ((double)won/(double)(won+lose+tight))*100;\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstExternalFunction__Group__2__Impl" $ANTLR start "rule__AstExternalFunction__Group__3" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9082:1: rule__AstExternalFunction__Group__3 : rule__AstExternalFunction__Group__3__Impl rule__AstExternalFunction__Group__4 ;
public final void rule__AstExternalFunction__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9086:1: ( rule__AstExternalFunction__Group__3__Impl rule__AstExternalFunction__Group__4 ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9087:2: rule__AstExternalFunction__Group__3__Impl rule__AstExternalFunction__Group__4 { pushFollow(FOLLOW_rule__AstExternalFunction__Group__3__Impl_in_rule__AstExternalFunction__Group__318642); rule__AstExternalFunction__Group__3__Impl(); state._fsp--; pushFollow(FOLLOW_rule__AstExternalFunction__Group__4_in_rule__AstExternalFunction__Group__318645); rule__AstExternalFunction__Group__4(); state._fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__AstExternalFunction__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9055:1: ( rule__AstExternalFunction__Group__2__Impl rule__AstExternalFunction__Group__3 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9056:2: rule__AstExternalFunction__Group__2__Impl rule__AstExternalFunction__Group__3\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__2__Impl_in_rule__AstExternalFunction__Group__218580);\n rule__AstExternalFunction__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__3_in_rule__AstExternalFunction__Group__218583);\n rule__AstExternalFunction__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9098:1: ( ( 'function' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9099:1: ( 'function' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9099:1: ( 'function' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9100:1: 'function'\n {\n before(grammarAccess.getAstExternalFunctionAccess().getFunctionKeyword_3()); \n match(input,71,FOLLOW_71_in_rule__AstExternalFunction__Group__3__Impl18673); \n after(grammarAccess.getAstExternalFunctionAccess().getFunctionKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9177:1: ( rule__AstExternalFunction__Group__6__Impl rule__AstExternalFunction__Group__7 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9178:2: rule__AstExternalFunction__Group__6__Impl rule__AstExternalFunction__Group__7\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__6__Impl_in_rule__AstExternalFunction__Group__618826);\n rule__AstExternalFunction__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__7_in_rule__AstExternalFunction__Group__618829);\n rule__AstExternalFunction__Group__7();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group_6__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9389:1: ( ( ( rule__AstExternalFunction__Group_6_1__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9390:1: ( ( rule__AstExternalFunction__Group_6_1__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9390:1: ( ( rule__AstExternalFunction__Group_6_1__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9391:1: ( rule__AstExternalFunction__Group_6_1__0 )*\n {\n before(grammarAccess.getAstExternalFunctionAccess().getGroup_6_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9392:1: ( rule__AstExternalFunction__Group_6_1__0 )*\n loop77:\n do {\n int alt77=2;\n int LA77_0 = input.LA(1);\n\n if ( (LA77_0==62) ) {\n alt77=1;\n }\n\n\n switch (alt77) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9392:2: rule__AstExternalFunction__Group_6_1__0\n \t {\n \t pushFollow(FOLLOW_rule__AstExternalFunction__Group_6_1__0_in_rule__AstExternalFunction__Group_6__1__Impl19239);\n \t rule__AstExternalFunction__Group_6_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop77;\n }\n } while (true);\n\n after(grammarAccess.getAstExternalFunctionAccess().getGroup_6_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleAstExternalFunction() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:773:2: ( ( ( rule__AstExternalFunction__Group__0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:774:1: ( ( rule__AstExternalFunction__Group__0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:774:1: ( ( rule__AstExternalFunction__Group__0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:775:1: ( rule__AstExternalFunction__Group__0 )\n {\n before(grammarAccess.getAstExternalFunctionAccess().getGroup()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:776:1: ( rule__AstExternalFunction__Group__0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:776:2: rule__AstExternalFunction__Group__0\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__0_in_ruleAstExternalFunction1594);\n rule__AstExternalFunction__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExternalFunctionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9349:1: ( rule__AstExternalFunction__Group_6__0__Impl rule__AstExternalFunction__Group_6__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9350:2: rule__AstExternalFunction__Group_6__0__Impl rule__AstExternalFunction__Group_6__1\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6__0__Impl_in_rule__AstExternalFunction__Group_6__019152);\n rule__AstExternalFunction__Group_6__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6__1_in_rule__AstExternalFunction__Group_6__019155);\n rule__AstExternalFunction__Group_6__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9378:1: ( rule__AstExternalFunction__Group_6__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9379:2: rule__AstExternalFunction__Group_6__1__Impl\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6__1__Impl_in_rule__AstExternalFunction__Group_6__119212);\n rule__AstExternalFunction__Group_6__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9189:1: ( ( ( rule__AstExternalFunction__Group_6__0 )? ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9190:1: ( ( rule__AstExternalFunction__Group_6__0 )? )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9190:1: ( ( rule__AstExternalFunction__Group_6__0 )? )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9191:1: ( rule__AstExternalFunction__Group_6__0 )?\n {\n before(grammarAccess.getAstExternalFunctionAccess().getGroup_6()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9192:1: ( rule__AstExternalFunction__Group_6__0 )?\n int alt76=2;\n int LA76_0 = input.LA(1);\n\n if ( (LA76_0==RULE_ID||(LA76_0>=38 && LA76_0<=45)||LA76_0==58||LA76_0==81||LA76_0==91) ) {\n alt76=1;\n }\n switch (alt76) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9192:2: rule__AstExternalFunction__Group_6__0\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6__0_in_rule__AstExternalFunction__Group__6__Impl18856);\n rule__AstExternalFunction__Group_6__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getAstExternalFunctionAccess().getGroup_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:8995:1: ( rule__AstExternalFunction__Group__0__Impl rule__AstExternalFunction__Group__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:8996:2: rule__AstExternalFunction__Group__0__Impl rule__AstExternalFunction__Group__1\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__0__Impl_in_rule__AstExternalFunction__Group__018458);\n rule__AstExternalFunction__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__1_in_rule__AstExternalFunction__Group__018461);\n rule__AstExternalFunction__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group_6_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9410:1: ( rule__AstExternalFunction__Group_6_1__0__Impl rule__AstExternalFunction__Group_6_1__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9411:2: rule__AstExternalFunction__Group_6_1__0__Impl rule__AstExternalFunction__Group_6_1__1\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6_1__0__Impl_in_rule__AstExternalFunction__Group_6_1__019274);\n rule__AstExternalFunction__Group_6_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6_1__1_in_rule__AstExternalFunction__Group_6_1__019277);\n rule__AstExternalFunction__Group_6_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group_6_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9441:1: ( rule__AstExternalFunction__Group_6_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9442:2: rule__AstExternalFunction__Group_6_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group_6_1__1__Impl_in_rule__AstExternalFunction__Group_6_1__119336);\n rule__AstExternalFunction__Group_6_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9117:1: ( rule__AstExternalFunction__Group__4__Impl rule__AstExternalFunction__Group__5 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9118:2: rule__AstExternalFunction__Group__4__Impl rule__AstExternalFunction__Group__5\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__4__Impl_in_rule__AstExternalFunction__Group__418704);\n rule__AstExternalFunction__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__5_in_rule__AstExternalFunction__Group__418707);\n rule__AstExternalFunction__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9067:1: ( ( 'external' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9068:1: ( 'external' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9068:1: ( 'external' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9069:1: 'external'\n {\n before(grammarAccess.getAstExternalFunctionAccess().getExternalKeyword_2()); \n match(input,68,FOLLOW_68_in_rule__AstExternalFunction__Group__2__Impl18611); \n after(grammarAccess.getAstExternalFunctionAccess().getExternalKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9026:1: ( rule__AstExternalFunction__Group__1__Impl rule__AstExternalFunction__Group__2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9027:2: rule__AstExternalFunction__Group__1__Impl rule__AstExternalFunction__Group__2\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__1__Impl_in_rule__AstExternalFunction__Group__118519);\n rule__AstExternalFunction__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__2_in_rule__AstExternalFunction__Group__118522);\n rule__AstExternalFunction__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalProcedure__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10164:1: ( rule__AstExternalProcedure__Group__3__Impl rule__AstExternalProcedure__Group__4 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10165:2: rule__AstExternalProcedure__Group__3__Impl rule__AstExternalProcedure__Group__4\n {\n pushFollow(FOLLOW_rule__AstExternalProcedure__Group__3__Impl_in_rule__AstExternalProcedure__Group__320766);\n rule__AstExternalProcedure__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalProcedure__Group__4_in_rule__AstExternalProcedure__Group__320769);\n rule__AstExternalProcedure__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__7() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9206:1: ( rule__AstExternalFunction__Group__7__Impl rule__AstExternalFunction__Group__8 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9207:2: rule__AstExternalFunction__Group__7__Impl rule__AstExternalFunction__Group__8\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__7__Impl_in_rule__AstExternalFunction__Group__718887);\n rule__AstExternalFunction__Group__7__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__8_in_rule__AstExternalFunction__Group__718890);\n rule__AstExternalFunction__Group__8();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__8() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9237:1: ( rule__AstExternalFunction__Group__8__Impl rule__AstExternalFunction__Group__9 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9238:2: rule__AstExternalFunction__Group__8__Impl rule__AstExternalFunction__Group__9\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__8__Impl_in_rule__AstExternalFunction__Group__818949);\n rule__AstExternalFunction__Group__8__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__9_in_rule__AstExternalFunction__Group__818952);\n rule__AstExternalFunction__Group__9();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9007:1: ( ( () ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9008:1: ( () )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9008:1: ( () )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9009:1: ()\n {\n before(grammarAccess.getAstExternalFunctionAccess().getAstFunctionAction_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9010:1: ()\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9012:1: \n {\n }\n\n after(grammarAccess.getAstExternalFunctionAccess().getAstFunctionAction_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExternalFunction__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9146:1: ( rule__AstExternalFunction__Group__5__Impl rule__AstExternalFunction__Group__6 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9147:2: rule__AstExternalFunction__Group__5__Impl rule__AstExternalFunction__Group__6\n {\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__5__Impl_in_rule__AstExternalFunction__Group__518764);\n rule__AstExternalFunction__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExternalFunction__Group__6_in_rule__AstExternalFunction__Group__518767);\n rule__AstExternalFunction__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load a producer directly in the layer foreground, without starting to play.
void load(Producer producer);
[ "public void startLoaderFromBackground() {\n Callbacks callbacks = getCallback();\n if (callbacks != null) {\n // Only actually run the loader if they're not paused.\n if (!callbacks.setLoadOnResume()) {\n startLoader(callbacks.getCurrentWorkspaceScreen());\n }\n }\n }", "public void loadSavedPlayer()\r\n\t{\r\n\t\tLoadSavedPlayer load = new LoadSavedPlayer(stage);\r\n\t\tload.show(game);\r\n\t}", "public void bringServiceToForeground() {\n // if no playlist, no playing song\n// if (mPlaylistMgr == null)\n// return;\n// SongItem si = mPlaylistMgr.getCurrentSong();\n// if (si != null)\n// setUpAsForeground(si);\n }", "void acquireSurface() {\n ((PiscesGCISurface)piscesRenderer.surface).acquireSurface(); \n }", "public void setProducer(String producer) {\n this.producer = producer;\n }", "public producer() {\n properties.put(\"metadata.broker.list\", \"localhost:9091\");\n properties.put(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n properties.put(\"request.required.acks\", \"1\");\n producer = new Producer<>(new ProducerConfig(properties));\n }", "public void loadgame() {\r\n GameChooser gc;\r\n gc = new GameChooser(this);\r\n game_load_test = true;\r\n //this.dispose();\r\n //System.exit(0);\r\n }", "public synchronized void resume(){\n \tthis.soundClip.start();\n }", "public void loadPlayer()\n {\n DatabaseCursor cursor = new DatabaseCursor(db.query(PlayerTable.NAME, null, null, null, null ,null,null), itemList);\n try\n {\n cursor.moveToFirst();\n instance.setPlayer(cursor.getPlayer());\n }\n finally\n {\n cursor.close();\n }\n }", "public void activate() {\n setBackground(color);\n paintComponent(getGraphics());\n WavPlayer.play(baseFilename);\n setBackground(INACTIVE_COLOR);\n paintComponent(getGraphics());\n }", "public synchronized void playExclaimSound()\n {\n if (PLAY_EXCLAIM_SOUND_RUNNABLE == null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE = (Runnable)Toolkit.getDefaultToolkit().getDesktopProperty(EXCLAIM_SOUND_PROPERTY_NAME);\n }\n if (PLAY_EXCLAIM_SOUND_RUNNABLE != null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE.run();\n }\n }", "@SuppressWarnings(\"static-access\")\n\tpublic void loadSoundboard() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"/SoundboardView.fxml\"));\n\t\t\tloader.setResources(bundle);\n\t\t\tAnchorPane temp = (AnchorPane) loader.load();\n\t\t\tboardController = loader.getController();\n\t\t\tsoundboardRoot.getChildren().add(temp);\n\t\t\tsoundboardRoot.setBottomAnchor(temp, 0.0);\n\t\t\tsoundboardRoot.setTopAnchor(temp, 0.0);\n\t\t\tsoundboardRoot.setLeftAnchor(temp, 0.0);\n\t\t\tsoundboardRoot.setRightAnchor(temp, 0.0);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Thread getProducer() {\n return new ProducerThread();\n }", "@Override\n protected void load() {\n game = new Game(baseApplication, rootNode);\n game.edit(\"skulls.properties\");\n game.load();\n\n //Load the camera\n loadCameraSettings();\n\n selectedTile = null;\n selectedTileType = Game.BLANK;\n initMarker();\n updateSelection();\n\n //Load the inputs\n //Init the picker listener\n touchPickListener = new TouchPickListener(baseApplication.getCamera(), rootNode);\n touchPickListener.setPickListener(this);\n touchPickListener.registerWithInput(inputManager);\n\n\n }", "public void loadLoading(){\n manager.load(\"Loading Symbol.png\", Texture.class);\n manager.load(AppStorage.skinPath, Skin.class);\n render = true;\n }", "public void showTopChrome() {\n playbackControlLayer.showTopChrome();\n }", "@Override\n public void waitPlayer() {\n this.getController().getPlayingGui().waitingState();\n this.getController().setState(new WaitingForDraw7Cards(this));\n }", "public Thread getProducer() {\n return producer;\n }", "public void setProducer(String producer) {\r\n this.producer = producer == null ? null : producer.trim();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a username reservation.
private UsernameReservation createUsernameReservation(final String username) { final String lowerCaseUsername = username.toLowerCase(); if (usernameReservations.containsKey(lowerCaseUsername)) { return usernameReservations.get(lowerCaseUsername); } else { return ((SignupProvider) contentProvider) .createUsernameReservation(lowerCaseUsername); } }
[ "public void createUser() {\n // Asks the user for a user name\n displayText(\"Player \" + (cluedoGame.getTempUserNum() + 1) + \", what is your preferred name?\");\n }", "protected void createUserName() {\n username = name + surname;\n }", "private void createReservations() {\n final String username = extractUsername();\n final EMail email = extractEMail();\n if (!isReserved(username) || !isReserved(email)) {\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n UsernameReservation usernameReservation = null;\n EMailReservation emailReservation = null;\n try {\n errorMessageJLabel.setText(getString(\"CheckingUsername\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel\n .getWidth(), errorMessageJLabel.getHeight());\n \n // get username reservation\n usernameReservation = createUsernameReservation(username);\n if (null == usernameReservation) {\n unacceptableUsername = username;\n } else {\n usernameReservations.put(username.toLowerCase(), usernameReservation);\n }\n \n // get email reservation\n emailReservation = createEMailReservation(email);\n if (null == emailReservation) {\n unacceptableEMail = email;\n } else {\n emailReservations.put(email, emailReservation);\n }\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n temporaryError = getSharedString(\"ErrorOffline\");\n } catch (final Throwable t) {\n logger.logError(t, \"An unexpected error has occured.\");\n temporaryError = getSharedString(\"ErrorUnexpected\");\n } finally {\n SwingUtil.setCursor(this, null);\n }\n validateInput();\n }\n }", "void newReservationCreated(Reservation reservation) throws RemoteException;", "Reservation createReservation();", "private void startCreatingRoom() {\n final String userName = edtCreatingUserName.getText().toString();\n if (!TextUtils.isEmpty(userName)) {\n authenticate(new Authenticator() {\n @Override\n public void onAuthenticated() {\n createRoom(userName.trim());\n }\n });\n } else {\n showMessage(getString(R.string.please_enter_required_fields));\n }\n }", "Reservation create(Reservation reservation, int hotelID);", "public ReservationDetailResponseView createReservationForNewUser(ReservationNewGuestDetailRequestView request)\r\n\t\t\tthrows Exception {\r\n\t\t// validate dates first\r\n\t\tManageHeader header = new ManageHeader(ReservationConstants.SUCCESS);\r\n\t\tReservationDetailResponseView response = new ReservationDetailResponseView();\r\n\t\tReservationDataRequestView requestData = modelMapper.toReservationData(request.getData());\r\n\t\tif (requestData == null || requestData.getFrom() == null || requestData.getTo() == null) {\r\n\t\t\theader.setDetail(ReservationConstants.INVALID_RANGE);\r\n\t\t\theader.setResult(ReservationConstants.FAILD);\r\n\t\t\tresponse.setHeader(header);\r\n\t\t\treturn response;\r\n\t\t}\r\n\t\tString starDate = requestData.getFrom();\r\n\t\tString endDate = requestData.getTo();\r\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString today = format.format(new Date());\r\n\t\tList<ReservationEntity> isAvaiable = null;\r\n\t\theader = validateDates(starDate, endDate);\r\n\t\tif (header.getResult().contentEquals(ReservationConstants.FAILD)) {\r\n\t\t\tresponse.setHeader(header);\r\n\t\t} else {\r\n\t\t\tisAvaiable = reservationRepository\r\n\t\t\t\t\t.findAllByStartDateLessThanEqualAndEndDateGreaterThanEqualAndStartDateIsAfter(endDate, starDate,\r\n\t\t\t\t\t\t\ttoday);\r\n\r\n\t\t\tif (!isAvaiable.isEmpty()) {\r\n\t\t\t\theader.setDetail(ReservationConstants.MESSAGE_FALSE + starDate + ReservationConstants.AND + endDate\r\n\t\t\t\t\t\t+ ReservationConstants.DOT);\r\n\t\t\t\theader.setResult(ReservationConstants.FAILD);\r\n\t\t\t\tresponse.setHeader(header);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Guest registration\r\n\t\t\t\tGuestDetailRequestView guestRequest = new GuestDetailRequestView();\r\n\t\t\t\tGuestDataRequestView guestData = modelMapper.toGuestData(request.getData());\r\n\t\t\t\tguestRequest.setData(guestData);\r\n\t\t\t\tGuestDetailResponseView guestResult = guestService.createGuest(guestRequest);\r\n\t\t\t\tif(guestResult.getHeader().getResult().equals(ReservationConstants.FAILD)) {\r\n\t\t\t\t\theader.setDetail(guestResult.getHeader().getDetail());\r\n\t\t\t\t\theader.setResult(ReservationConstants.FAILD);\r\n\t\t\t\t\tresponse.setHeader(header);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t// Reservation registration\r\n\t\t\t\t\tReservationEntity reservationEntity = modelMapper.toEntity(requestData);\r\n\t\t\t\t\treservationEntity.setGuestId(guestResult.getData().getId());\r\n\r\n\t\t\t\t\tReservationEntity result = reservationRepository.save(reservationEntity);\r\n\t\t\t\t\tReservationDataResponseView dataResponse = modelMapper.toDto(result);\r\n\t\t\t\t\tresponse.setData(dataResponse);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresponse.setHeader(header);\r\n\t\treturn response;\r\n\t}", "void setUserCreate(java.lang.String userCreate);", "String createUserRequest(String username, UserRequestType type);", "public com.google.cloud.pubsublite.proto.Reservation createReservation(\n com.google.cloud.pubsublite.proto.CreateReservationRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateReservationMethod(), getCallOptions(), request);\n }", "private void doNewGuest() {\n String name = getUserNameTextInput();\n int age = Integer.parseInt(getAgeTextInput());\n Guest newGuest = new Guest(name, age);\n newGuest.makeReservation();\n int id = newGuest.getID();\n String passType = newGuest.getPassType();\n ArrayList<Pass> usedPasses = newGuest.getListOfExpiredPasses();\n editor.getAccounts().addGuest(newGuest);\n updateLabelsForMostRecentGuest(name, id, age, passType, usedPasses);\n showUpdatedGuestInfo();\n }", "public void createResBooking() {\n\t\tReservation r = new Reservation();\n\t\tr.createReservation();\n\t\ttm.setReservedTable();\n\t}", "public void createGuestAccount() {\n String guestName = \"User@\";\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int i = 1; i < 101; i++) {\n list.add(i);\n }\n Collections.shuffle(list);\n for (int i = 0; i < 4; i++) {\n guestName += list.get(i);\n }\n System.out.println(guestName);\n //Guest users don't have password, and quest user flag attribute is set to true.\n activeUser = new User(guestName, null, null, true, 0);\n activeUser.getProfile().setEmail(\"Not available as guest\");\n }", "@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "private void playerReserve(String promoCode, String username)\n {\n\n Reservation myReservation = new Reservation(username,reservationStartsOn,reservationEndsOn,pitch.getVenueID(),pitch.getPitchName(),promoCode);\n connectionManager.reserve(myReservation, instance);\n }", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "public Requerente createRequerente(String nome);", "public Reservation makeReservation(String reservationName, LocalDate startDate, LocalDate endDate, Site site);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test error flow for POST /paymentSession
@Test public void TestPaymentSessionErrorMocked() throws Exception { Client client = createMockClientFromFile("mocks/checkout/paymentsession-error-invalid-data-422.json"); Checkout checkout = new Checkout(client); PaymentSessionRequest paymentSessionRequest = createPaymentSessionRequest(); PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest); assertNull(paymentSessionResponse.getPaymentSession()); }
[ "@Test\n public void validSessionInvalidTransactionPostTest() {\n given()\n .header(\"X-session-ID\", sessionId)\n .body(TEST_TRANSACTION_INVALID)\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(405);\n }", "@Test\n public void TestPaymentsErrorMocked() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/payments-error-invalid-data-422.json\");\n Checkout checkout = new Checkout(client);\n PaymentsRequest paymentsRequest = createPaymentsCheckoutRequest();\n PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);\n assertNull(paymentsResponse.getPspReference());\n }", "@Test\n public void invalidSessionTransactionsGetTest() {\n get(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(401);\n }", "@Test\n public void invalidSessionValidTransactionPostTest() {\n given()\n .body(String.format(TEST_TRANSACTION_INPUT_FORMAT, testCategoryId))\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(401);\n }", "@Test\n public void TestOneTimePassPaymentSuccess() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/payments-success-onetimepass.json\");\n Checkout checkout = new Checkout(client);\n PaymentsRequest paymentsRequest = createPaymentsCheckoutRequest();\n PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);\n assertEquals(1, paymentsResponse.getAction().getResendInterval());\n assertEquals(3, paymentsResponse.getAction().getResendMaxAttempts());\n assertEquals(\"https://localhost:8080\", paymentsResponse.getAction().getResendUrl());\n assertNotNull(paymentsResponse.getAction());\n assertEquals(Redirect.MethodEnum.GET, paymentsResponse.getAction().getRedirect().getMethod());\n assertEquals(\"https://localhost:8080\", paymentsResponse.getAction().getRedirect().getUrl());\n assertNull(paymentsResponse.getAction().getRedirect().getData());\n\n }", "@Step\n public void payerCodeShouldBeWithError() {\n assertTrue(\"Pay tab without error.\", zhkuMoscowPage.isPayerCodeWithError());\n }", "@Test\n public void TestPaymentsResultErrorMocked() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/paymentsresult-error-invalid-data-payload-422.json\");\n Checkout checkout = new Checkout(client);\n PaymentResultRequest paymentResultRequest = new PaymentResultRequest();\n paymentResultRequest.setPayload(\"This is a test payload\");\n PaymentResultResponse paymentResultResponse = checkout.paymentResult(paymentResultRequest);\n assertNull(paymentResultResponse.getResultCode());\n }", "@Override\n public void onPaymentError(int code, String response) {\n Log.e(TAG, \"onPaymentError: Response is \"+response );\n }", "@Test\n public void paymentStatusWithNodeError() throws IOException, XrpException {\n DefaultXrpClient client = getClient(\n Result.ok(makeGetAccountInfoResponse(DROPS_OF_XRP_IN_ACCOUNT)),\n Result.error(GENERIC_ERROR),\n Result.ok(makeGetFeeResponse(MINIMUM_FEE, LAST_LEDGER_SEQUENCE)),\n Result.ok(makeSubmitTransactionResponse(TRANSACTION_HASH)),\n Result.ok(makeGetAccountTransactionHistoryResponse())\n );\n\n // WHEN the payment status is retrieved THEN an error is thrown..\n expectedException.expect(Exception.class);\n client.getPaymentStatus(TRANSACTION_HASH);\n }", "@Test\n public void invalid_turn() {\n when(session.attribute(PostSubmitTurnRoute.SESSION_GAME_ATTR)).thenReturn(game);\n when(game.checkAndSubmitTurn()).thenReturn(false);\n String returned = \"\";\n try {\n returned = (String)postSubmitTurnRoute.handle(request, response);\n } catch (Exception e) {\n fail();\n }\n assert returned.contains(\"ERROR\");\n }", "@Test\n public void TestPaymentSessionSuccessMocked() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/paymentsession-sucess.json\");\n Checkout checkout = new Checkout(client);\n PaymentSessionRequest paymentSessionRequest = createPaymentSessionRequest();\n PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest);\n assertNotNull(paymentSessionResponse.getPaymentSession());\n }", "@Test\n void performWrongCardFromValidTillRequest() {\n TransferMoneyRequest transferMoneyRequest = new TransferMoneyRequest(DATA_CARD_FROM_NUMBER,\n \"\", DATA_CARD_FROM_CVV, DATA_CARD_TO_NUMBER,\n new Amount(CURRENCY, AMOUNT_VALUE));\n\n ResponseEntity<Response> testEntity = testRestTemplate\n .postForEntity(APP_HOST + transferMoneyApp.getMappedPort(APP_PORT) + ENDPOINT_TRANSFER, transferMoneyRequest, Response.class);\n\n Assertions.assertEquals(HttpStatus.BAD_REQUEST, testEntity.getStatusCode());\n Assertions.assertEquals(MESSAGE_ERROR_INPUT, testEntity.getBody().getMessage());\n Assertions.assertEquals(NONE_ID, testEntity.getBody().getId());\n Assertions.assertNull(testEntity.getBody().getOperationId());\n }", "@Test\n public void TestPaymentsDetailsErrorMocked() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/paymentsdetails-error-invalid-data-422.json\");\n Checkout checkout = new Checkout(client);\n PaymentsResponse paymentsResponse = checkout.paymentsDetails(createPaymentsDetailsRequest());\n assertNull(paymentsResponse.getResultCode());\n\n }", "@Test\n public void TestPaymentsDetailsErrorMocked() throws Exception {\n Client client = createMockClientFromFile(\"mocks/checkout/paymentsdetails-error-invalid-data-422.json\");\n Checkout checkout = new Checkout(client);\n PaymentsDetailsResponse paymentsResponse = checkout.paymentsDetails(createPaymentsDetailsRequest());\n assertNull(paymentsResponse.getResultCode());\n\n }", "@Test\n public void testConnectionWhenBadPass() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"00000\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }", "@Test\n public void validSessionValidTransactionPostTest() {\n testTransactionId = given()\n .header(\"X-session-ID\", sessionId)\n .body(String.format(TEST_TRANSACTION_INPUT_FORMAT, testCategoryId))\n .post(\"api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(201)\n .extract()\n .response()\n .getBody()\n .jsonPath()\n .getInt(\"id\");\n }", "@Test\n public void testTokenEndPointNoParams() throws Exception {\n refreshRequestAndResponse();\n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"POST\");\n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointNoParams() => \" + response.getContentAsString());\n \n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n assertTrue( response.getStatus() == HttpServletResponse.SC_BAD_REQUEST ||\n response.getStatus() == HttpServletResponse.SC_UNAUTHORIZED );\n }", "@Test\n public void submitTransactionWithFailedFee() throws IOException, XrpException {\n Result<GetFeeResponse, Throwable> feeResult = Result.error(GENERIC_ERROR);\n DefaultXrpClient client = getClient(\n Result.ok(makeGetAccountInfoResponse(DROPS_OF_XRP_IN_ACCOUNT)),\n Result.ok(makeTransactionStatus(true, TRANSACTION_STATUS_SUCCESS)),\n feeResult,\n\n Result.ok(makeSubmitTransactionResponse(TRANSACTION_HASH)),\n Result.ok(makeGetAccountTransactionHistoryResponse())\n );\n Wallet wallet = new Wallet(WALLET_SEED);\n\n // WHEN XRP is sent then THEN an error is thrown.\n expectedException.expect(Exception.class);\n client.send(AMOUNT, XRPL_ADDRESS, wallet);\n }", "@Test\n @DisplayName(\"Create Payable Late Filing Penalty Session - Success Path\")\n void createLateFilingPenaltySessionSuccess() throws ServiceException, ApiErrorResponseException, URIValidationException {\n\n PayableLateFilingPenaltySession payableLateFilingPenaltySession = LFPTestUtility.payableLateFilingPenaltySession(COMPANY_NUMBER);\n when(payableLateFilingPenaltyResourceHandler.create(eq(POST_PAYABLE_LFP_URI), any(LateFilingPenaltySession.class)))\n .thenReturn(payableLateFilingPenaltyCreate);\n when(payableLateFilingPenaltyCreate.execute()).thenReturn(sessionResponseWithData);\n\n when(sessionResponseWithData.getData()).thenReturn(payableLateFilingPenaltySession);\n\n PayableLateFilingPenaltySession createdLateFilingPenaltySession =\n mockPayableLateFilingPenaltyService.createLateFilingPenaltySession(COMPANY_NUMBER, PENALTY_NUMBER, AMOUNT);\n\n assertEquals(createdLateFilingPenaltySession, payableLateFilingPenaltySession);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the barcode decoder. Supports all iOS codes except [code138, code39mod43, interleaved2of5] Additionally supports [codabar, code128, upc_a]
private void initBarCodeScanner() { BarCodeScannerProvider barCodeScannerProvider = mModuleRegistry.getModule(BarCodeScannerProvider.class); if (barCodeScannerProvider != null) { mBarCodeScanner = barCodeScannerProvider.createBarCodeDetectorWithContext(getContext()); } }
[ "public static void initDecoder() {\n BarcodeScanner.MWBsetActiveCodes(\n BarcodeScanner.MWB_CODE_MASK_25 | BarcodeScanner.MWB_CODE_MASK_39 | BarcodeScanner.MWB_CODE_MASK_93 | BarcodeScanner.MWB_CODE_MASK_128\n | BarcodeScanner.MWB_CODE_MASK_AZTEC | BarcodeScanner.MWB_CODE_MASK_DM | BarcodeScanner.MWB_CODE_MASK_EANUPC\n | BarcodeScanner.MWB_CODE_MASK_PDF | BarcodeScanner.MWB_CODE_MASK_QR | BarcodeScanner.MWB_CODE_MASK_CODABAR\n | BarcodeScanner.MWB_CODE_MASK_11 | BarcodeScanner.MWB_CODE_MASK_MSI | BarcodeScanner.MWB_CODE_MASK_RSS);\n\n // But for better performance, only activate the symbologies your\n // application requires...\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_25 );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_39 );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_93 );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_128 );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_AZTEC\n // );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_DM );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_EANUPC\n // );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_PDF );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_QR );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_RSS );\n // BarcodeScanner.MWBsetActiveCodes(\n // BarcodeScanner.MWB_CODE_MASK_CODABAR );\n // BarcodeScanner.MWBsetActiveCodes(\n // BarcodeScanner.MWB_CODE_MASK_DOTCODE );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_11 );\n // BarcodeScanner.MWBsetActiveCodes( BarcodeScanner.MWB_CODE_MASK_MSI );\n\n // Our sample app is configured by default to search both directions...\n BarcodeScanner.MWBsetDirection(BarcodeScanner.MWB_SCANDIRECTION_HORIZONTAL | BarcodeScanner.MWB_SCANDIRECTION_VERTICAL);\n // set the scanning rectangle based on scan direction(format in pct: x,\n // y, width, height)\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_25, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_39, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_93, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_128, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_AZTEC, RECT_FULL_2D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DM, RECT_FULL_2D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_EANUPC, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_PDF, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_QR, RECT_FULL_2D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_RSS, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_CODABAR, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DOTCODE, RECT_DOTCODE);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_11, RECT_FULL_1D);\n BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_MSI, RECT_FULL_1D);\n\n // But for better performance, set like this for PORTRAIT scanning...\n // BarcodeScanner.MWBsetDirection(BarcodeScanner.MWB_SCANDIRECTION_VERTICAL);\n // set the scanning rectangle based on scan direction(format in pct: x,\n // y, width, height)\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_25,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_39,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_93,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_128,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_AZTEC,\n // RECT_PORTRAIT_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DM,\n // RECT_PORTRAIT_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_EANUPC,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_PDF,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_QR,\n // RECT_PORTRAIT_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_RSS,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_CODABAR,RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DOTCODE,RECT_DOTCODE);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_11,\n // RECT_PORTRAIT_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_MSI,\n // RECT_PORTRAIT_1D);\n\n // or like this for LANDSCAPE scanning - Preferred for dense or wide\n // codes...\n // BarcodeScanner.MWBsetDirection(BarcodeScanner.MWB_SCANDIRECTION_HORIZONTAL);\n // set the scanning rectangle based on scan direction(format in pct: x,\n // y, width, height)\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_25,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_39,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_93,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_128,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_AZTEC,\n // RECT_LANDSCAPE_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DM,\n // RECT_LANDSCAPE_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_EANUPC,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_PDF,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_QR,\n // RECT_LANDSCAPE_2D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_RSS,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_CODABAR,RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_DOTCODE,RECT_DOTCODE);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_11,\n // RECT_LANDSCAPE_1D);\n // BarcodeScanner.MWBsetScanningRect(BarcodeScanner.MWB_CODE_MASK_MSI,\n // RECT_LANDSCAPE_1D);\n\n // Set minimum result length for low-protected barcode types\n\n BarcodeScanner.MWBsetMinLength(BarcodeScanner.MWB_CODE_MASK_25, 5);\n BarcodeScanner.MWBsetMinLength(BarcodeScanner.MWB_CODE_MASK_MSI, 5);\n BarcodeScanner.MWBsetMinLength(BarcodeScanner.MWB_CODE_MASK_39, 5);\n BarcodeScanner.MWBsetMinLength(BarcodeScanner.MWB_CODE_MASK_CODABAR, 5);\n BarcodeScanner.MWBsetMinLength(BarcodeScanner.MWB_CODE_MASK_11, 5);\n\n // set decoder effort level (1 - 5)\n // for live scanning scenarios, a setting between 1 to 3 will suffice\n // levels 4 and 5 are typically reserved for batch scanning\n BarcodeScanner.MWBsetLevel(2);\n\n BarcodeScanner.MWBsetResultType(BarcodeScanner.MWB_RESULT_TYPE_MW);\n\n }", "public Barcode(){\n this.number = \"\"; // Initialises the barcode number to an empty string\n this.format = \"\"; // Initialises the barcode format to an empty string\n }", "public CodabarGenerator() {\n\t\tsuper(CodeType.CODABAR);\n\n\t\t// Setup Codabar generator\n\t\tgenerator = new CodabarBean();\n\n\t\t// barcode128Bean.setBarHeight(height);\n\t\tdouble moduleWidth = UnitConv.in2mm(2.5f / dpi);\n\t\tgenerator.setModuleWidth(moduleWidth);\n\n\t\t/**\n\t\t * The minimum width of the Quiet Zone to the left and right of the 128 Bar Code\n\t\t * is 10x, where x is the minimum width of a module. It is mandatory at the left\n\t\t * and right side of the barcode.\n\t\t * \n\t\t * https://en.wikipedia.org/wiki/Code_128#Quiet_zone\n\t\t * \n\t\t */\n\t\tgenerator.doQuietZone(true);\n\t\tgenerator.setQuietZone(10 * moduleWidth);\n\t\t// generator.setVerticalQuietZone(2 * moduleWidth);\n\n\t\tgenerator.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);\n\n\t\tgenerator.setHeight(UnitConv.in2mm(1));\n\t}", "public Barcode(){\n \t\tthis(0);\n \t}", "public void initializeAndStartBarcodeScanning() {\n // Switch to full screen.\n\n\n // The scanning behavior of the barcode picker is configured through scan\n // settings. We start with empty scan settings and enable a very generous\n // set of symbologies. In your own apps, only enable the symbologies you\n // actually need.\n ScanSettings settings = ScanSettings.create();\n settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN13, true);\n settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCA, true);\n settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN8, true);\n settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCE, true);\n\n settings.setCameraFacingPreference(ScanSettings.CAMERA_FACING_BACK);\n\n\n // Some Android 2.3+ devices do not support rotated camera feeds. On these devices, the\n // barcode picker emulates portrait mode by rotating the scan UI.\n boolean emulatePortraitMode = !BarcodePicker.canRunPortraitPicker();\n if (emulatePortraitMode) {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n }\n\n BarcodePicker picker = new BarcodePicker(this, settings);\n\n setContentView(picker);\n mBarcodePicker = picker;\n\n // Register listener, in order to be notified about relevant events\n // (e.g. a successfully scanned bar code).\n mBarcodePicker.setOnScanListener(this);\n\n }", "public void initializeAndStartBarcodeScanning() {\r\n // Switch to full screen.\r\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, \r\n WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // We instantiate the automatically adjusting barcode picker that will\r\n // choose the correct picker to instantiate. Be aware that this picker\r\n // should only be instantiated if the picker is shown full screen as the\r\n // legacy picker will rotate the orientation and not properly work in\r\n // non-fullscreen.\r\n ScanditSDKAutoAdjustingBarcodePicker picker = new ScanditSDKAutoAdjustingBarcodePicker(\r\n this, sScanditSdkAppKey, ScanditSDKAutoAdjustingBarcodePicker.CAMERA_FACING_BACK);\r\n \r\n // Add both views to activity, with the scan GUI on top.\r\n setContentView(picker);\r\n mBarcodePicker = picker;\r\n \r\n // Register listener, in order to be notified about relevant events \r\n // (e.g. a successfully scanned bar code).\r\n mBarcodePicker.getOverlayView().addListener(this);\r\n \r\n // Show a search bar in the scan user interface.\r\n //mBarcodePicker.getOverlayView().showSearchBar(true);\r\n }", "public void initializeAndStartBarcodeScanning() {\n\n // We instantiate the automatically adjusting barcode picker that will\n // choose the correct picker to instantiate. Be aware that this picker\n // should only be instantiated if the picker is shown full screen as the\n // legacy picker will rotate the orientation and not properly work in\n // non-fullscreen.\n ScanditSDKAutoAdjustingBarcodePicker picker = new ScanditSDKAutoAdjustingBarcodePicker(\n this, SCANDIT_API_KEY, ScanditSDKAutoAdjustingBarcodePicker.CAMERA_FACING_BACK);\n\n // Add both views to activity, with the scan GUI on top.\n setContentView(picker);\n barcodePicker = picker;\n\n // Register listener, in order to be notified about relevant events\n // (e.g. a successfully scanned bar code).\n barcodePicker.addOnScanListener(this);\n }", "private void buildMobileVisionBarcodeDetector() {\n String focusMode = Camera.Parameters.FOCUS_MODE_FIXED;\n if(mAutoFocusEnabled){\n focusMode = Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE;\n }\n mBarcodeDetector = new BarcodeDetector.Builder(mActivity)\n .setBarcodeFormats(mBarcodeFormats)\n .build();\n mCameraSource = new CameraSource.Builder(mActivity, mBarcodeDetector)\n .setFacing(mFacing)\n .setFlashMode(mFlashEnabledByDefault ? Camera.Parameters.FLASH_MODE_TORCH : null)\n .setFocusMode(focusMode)\n .build();\n }", "public ScanBarcode() {\n initComponents();\n \n \n }", "public AISDecoder() {\n initComponents();\n }", "public BarCodeCreatorUI() {\n initComponents();\n }", "void setBarcode(java.lang.String barcode);", "public void initializeDecoding() {\r\n\r\n\tXTIFFField fillOrderField = \r\n\t directory.getField(XTIFF.TIFFTAG_FILL_ORDER);\r\n\tif (fillOrderField != null) {\r\n\t fillOrder = fillOrderField.getAsInt(0);\r\n\t} else {\r\n\t // Default Fill Order\r\n\t fillOrder = 1;\r\n\t}\r\n\t // Fax T.4 compression options\r\n\tif (compression == 3) {\r\n\t\tXTIFFField t4OptionsField = \r\n\t\t directory.getField(XTIFF.TIFFTAG_T4_OPTIONS);\r\n\t\tif (t4OptionsField != null) {\r\n\t\t tiffT4Options = t4OptionsField.getAsLong(0);\r\n\t\t} else {\r\n\t\t // Use default value\r\n\t\t tiffT4Options = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t // Fax T.6 compression options\r\n\tif (compression == 4) {\r\n\t\tXTIFFField t6OptionsField =\r\n\t\t directory.getField(XTIFF.TIFFTAG_T6_OPTIONS);\r\n\t\tif (t6OptionsField != null) {\r\n\t\t tiffT6Options = t6OptionsField.getAsLong(0);\r\n\t\t} else {\r\n\t\t // Use default value\r\n\t\t tiffT6Options = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tdecoder = new XTIFFFaxDecoder(fillOrder, tileWidth, tileLength);\r\n\r\n }", "final int silk_init_decoder()\r\n\t{\r\n\t\t/* Clear the entire encoder state, except anything copied */\r\n\t\tclear();// silk_memset( psDec, 0, sizeof( silk_decoder_state ) );\r\n\r\n\t\t/* Used to deactivate LSF interpolation */\r\n\t\tthis.first_frame_after_reset = true;\r\n\t\tthis.prev_gain_Q16 = 65536;\r\n\t\t// this.arch = opus_select_arch();\r\n\r\n\t\t/* Reset CNG state */\r\n\t\tsilk_CNG_Reset();\r\n\r\n\t\t/* Reset PLC state */\r\n\t\tsilk_PLC_Reset();\r\n\r\n\t\treturn 0;\r\n\t}", "public Barcode(int value){\n \t\tsetValue(value);\n \t}", "public static void init(){\r\n byteCodes.put(\"ARGS\",\"ArgsCode\");\r\n byteCodes.put(\"BOP\",\"BopCode\");\r\n byteCodes.put(\"CALL\",\"CallCode\");\r\n byteCodes.put(\"ARGS\",\"ArgsCode\");\r\n byteCodes.put(\"FALSEBRANCH\",\"FalseBranchCode\");\r\n byteCodes.put(\"GOTO\",\"GotoCode\");\r\n byteCodes.put(\"HALT\",\"HaltCode\");\r\n byteCodes.put(\"LABEL\",\"LabelCode\");\r\n byteCodes.put(\"LIT\",\"LitCode\");\r\n byteCodes.put(\"LOAD\",\"LoadCode\");\r\n byteCodes.put(\"POP\",\"PopCode\");\r\n byteCodes.put(\"READ\",\"ReadCode\");\r\n byteCodes.put(\"RETURN\",\"ReturnCode\");\r\n byteCodes.put(\"STORE\",\"StoreCode\");\r\n byteCodes.put(\"WRITE\", \"WriteCode\");\r\n byteCodes.put(\"DUMP\", \"DumpCode\");\r\n byteCodes.put(\"FUNCTION\", \"FunctionCode\");\r\n byteCodes.put(\"LINE\",\"LineCode\");\r\n byteCodes.put(\"FORMAL\", \"FormalCode\");\r\n }", "@Test\n public final void testBarcode() {\n new Barcode(\"TEST\");\n\n Barcode.setLength(20);\n Barcode.setPadder('0');\n\n Barcode bc3 = new Barcode(\"RIGHT\");\n logger.debug(\"Test left-padded, right-aligned:[\" + bc3 + \"]\");\n assertTrue(\"Barcode length must be expanded to 20 characters.\", (20 == Barcode.getLength()));\n assertTrue(\"Barcode must start with 0\", bc3.toString().startsWith(\"0\"));\n\n Barcode.setAlignment(BARCODE_ALIGN.LEFT);\n Barcode bc2 = new Barcode(\"LEFT\");\n logger.debug(\"Test right-padded, left-aligned:[\" + bc2 + \"]\");\n assertTrue(\"Barcode must end with 0\", bc2.toString().endsWith(\"0\"));\n assertTrue(\"Barcode must start with LEFT\", bc2.toString().startsWith(\"LEFT\"));\n\n Barcode.setLength(2);\n Barcode bc4 = new Barcode(\"A123456789\");\n logger.debug(\"Test not-padded:[\" + bc4 + \"]\");\n assertTrue(\"Barcode must end with 9\", bc4.toString().endsWith(\"9\"));\n assertTrue(\"Barcode must start with A\", bc4.toString().startsWith(\"A\"));\n }", "public void init() {\n\tthis.setSplitter(WEIGHTED_ROUND_ROBIN(1,2));\n\tthis.add(new PreDecoder());\n\tthis.add(new UngerboeckDecoder());\n\t// take one input from precoder, one from 2/1 trellis decoder\n\tthis.setJoiner(WEIGHTED_ROUND_ROBIN(1,1));\n }", "public Barcode(String number, String format){\n this.number = number; // Initialises the barcode number to number, the value specified in the constructors argument\n this.format = format; // Initialises the barcode format to format, the value specified in the constructors argument\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the passwd. You can use getPasswd() to get the value of passwd
public void setPasswd(String passwd) { this.passwd = passwd; }
[ "public void setDBPasswd(String passwd) {\n dbPasswd = passwd;\n }", "public void setDo_passwd(java.lang.String Do_passwd) {\r\n this.Do_passwd = Do_passwd;\r\n }", "public void setPwd(String pwd) {\n this.pwd = pwd;\n }", "public void setPwd(String value) {\n setAttributeInternal(PWD, value);\n }", "protected final void setPassword(String pwd) {\n m_remoteShr.setPassword(pwd);\n }", "public void setPwd(String pwd) {\r\n\t\tthis.pwd = pwd;\r\n\t}", "public void setPassword(String pass);", "void setPassword(String password);", "public Builder setPwd(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n pwd_ = value;\n onChanged();\n return this;\n }", "public void setPasspwd(String passpwd) {\n this.passpwd = passpwd;\n }", "public static void SetPass(String pass) \n\t{\n\t\tcurrentactive.upassword=pass;\n\t}", "public void setPassword(String password);", "public void setLoginPassword(String loginpwd){\n\t\tdata.put(LOGINPASSWORD, loginpwd);\t\n\t}", "public void setCredentials() {\n\t\tUtil.ClickElement(driver, username);\n\t\tUtil.enterText(driver, username, TestData.strUserName);\n\t\tUtil.ClickElement(driver, password);\n\t\tUtil.enterText(driver, password, decodePswd(TestData.strPassword));\n\t\tUtil.ClickButton(driver, loginbutton);\n\t}", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "public void setPassword(String text) {\n txtPassword().setText(text);\n }", "public void setLobbyPassword(String psw) { lobbyPassword = psw; }", "public String getAuhPasswd() {\n\t\treturn passwd;\n\t}", "public void setPassword(int password) {\nSystem.out.println(\"Owner login password is set to: \"+password);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates the fighters in the battle, if any are 0 hp, add them to defeated list
public void findDefeated(){ for(Enemy enemy: enemies){ if(enemy.getCurrHP() <= 0 || enemy.isFriendly()){ if (!defeated.contains(enemy)) { defeated.add(enemy); } } } }
[ "private void updateDefense() {\n // Update the active towers\n updateTanks(tanks);\n updateTanks(superTanks);\n // Update any projectiles or explosives\n updateExplosive();\n updateProjectiles(tankProjectiles);\n updateProjectiles(superProjectiles);\n // Update passive towers\n flyAirplanes();\n }", "public void updateAllies(){\r\n List<Ally> allies = world.getAllies();\r\n ArrayList<Ally> deadAllies = new ArrayList<Ally>();\r\n for(Ally ally : allies){\r\n if(ally.getCurrHP() <= 0){\r\n deadAllies.add(ally);\r\n }\r\n }\r\n\r\n allies.removeAll(deadAllies);\r\n world.setNumAllies(allies.size());\r\n //numAllies.set(allies.size());\r\n }", "public void fight() {\r\n\t\tint step = 0;\r\n\t\tif(!dead) { //Checks if the party is alive.\r\n\t\t\tdead = true;\r\n\t\t\tfor(GameCharacter c : group) {\r\n\t\t\t\tif(!c.isDead()) {\r\n\t\t\t\t\tc.performMove(c.brain.moves[step],false);\r\n\t\t\t\t\t//Decrement status effect nonsense\r\n\t\t\t\t\tc.onStatusEffectTurn();\r\n\t\t\t\t\tdead = false;//If ANYONE is alive, dead is false\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println();\r\n\t\t\t}\r\n\t\t\tstep++;\r\n\t\t}\r\n\t}", "public void addDefeat() {\r\n\t\tthis.matchesPlayed++;\r\n\t\tthis.matchesLost++;\r\n\t\tthis.points += sport.getPointsPerDefeat(); \r\n\t}", "protected void fightingUpdate(float delta) {\n\t\tif (singlePlayerMode || uc1.getPlayerID() == Assets.gameInfo.getPlayerID()) {\t\t\t\t\r\n\t\t\tfor(Map.Entry<String,ArrayList<Unit>> e : uc1.getSet()){\r\n\t\t\t\tfor (Unit u: e.getValue()){\r\n\t\t\t\t\t// fight the units u will fight against ? \r\n\t\t\t\t\tu.attack(uc2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// in multiplayermode only the own units fight\r\n\t\tif (!singlePlayerMode || uc2.getPlayerID() == Assets.gameInfo.getPlayerID()) {\r\n\t\t\tfor(Map.Entry<String,ArrayList<Unit>> e : uc2.getSet()){\r\n\t\t\t\tfor (Unit u: e.getValue()){\r\n\t\t\t\t\tu.attack(uc1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint uCount1 = 0;\r\n\t\tfor(Map.Entry<String,ArrayList<Unit>> e : uc1.getSet()){\r\n\t\t\tIterator<Unit> it = e.getValue().iterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tUnit u = it.next();\r\n\t\t\t\tif (!u.isAlive()) {\r\n\t\t\t\t\tActor a = actorMap.get(u);\r\n\t\t\t\t\ta.remove();\r\n\t\t\t\t\tactorMap.remove(u);\r\n\t\t\t\t\tit.remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tuCount1 += e.getValue().size();\r\n\t\t}\r\n\r\n\t\tint uCount2 = 0;\r\n\t\tfor(Map.Entry<String,ArrayList<Unit>> e : uc2.getSet()){\r\n\t\t\tIterator<Unit> it = e.getValue().iterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tUnit u = it.next();\r\n\t\t\t\tif (!u.isAlive()) {\r\n\t\t\t\t\tActor a = actorMap.get(u);\r\n\t\t\t\t\ta.remove();\r\n\t\t\t\t\tactorMap.remove(u);\r\n\t\t\t\t\tit.remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tuCount2 += e.getValue().size();\r\n\t\t}\r\n\r\n\t\tAssets.log.log(Level.FINER,\"Units Left: \" + uCount1 + \" \" + uCount2);\r\n\r\n\t\tfor(Map.Entry<Unit,Actor> e : actorMap.entrySet()){\r\n\t\t\te.getKey().makeSprite(e.getValue());\r\n\t\t}\r\n\r\n\t\tif (uCount1 == 0 || uCount2 == 0) {\r\n\t\t\tAssets.log.log(Level.INFO,\"Fight Done: \" + uCount1 + \" \" + uCount2);\r\n\t\t\t//game.setScreen(previous);\r\n\t\t}\r\n\r\n\t}", "public void addAwardKillerNotDead() {\n\t\tfor (int i = 0; i < killers.size(); i++) {\n\t\t\tif (killerHasNotDeath(killers.get(i).getName())) {\n\t\t\t\tint awards = killers.get(i).getAwardMatchWithoutDeath();\n\t\t\t\tkillers.get(i).setAwardMatchWithoutDeath(awards + 1);\n\t\t\t}\n\n\t\t}\n\t}", "public void update(){\n if(clearing) {\n attacks.clear();\n attacksToAdd.clear();\n attacksToDelete.clear();\n playerAttackCount = 0;\n clearing = false;\n } else {\n for (AttackObject attack : attacks) {\n attack.update();\n checkAttackCollisionsFor(attack);\n checkAttackReachedEnd(attack);\n if (attack.wasDestroyed()) {\n onAttackDestroyed(attack);\n }\n }\n deleteAttacks();\n addAttacks();\n }\n }", "public void damage(int[] fighter, int points) {\n if (fighter[LIFE] > points) {\n fighter[LIFE] = fighter[LIFE] - points;\n } else {\n fighter[LIFE] = 0;\n }\n }", "@Override\n\tprotected void calculateRewards(final L2Character lastAttacker)\n\t{\n\t\t// Creates an empty list of rewards\n\t\tfinal Map<L2Character, RewardInfoHolder> rewards = new ConcurrentHashMap<>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (getAggroListRP().isEmpty())\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (EngineModsManager.onNpcExpSp(this, lastAttacker))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tL2PcInstance maxDealer = null;\n\t\t\tint maxDamage = 0;\n\t\t\t\n\t\t\tint damage;\n\t\t\t\n\t\t\tL2Character attacker, ddealer;\n\t\t\t\n\t\t\t// While Interacting over This Map Removing Object is Not Allowed\n\t\t\tsynchronized (getAggroList())\n\t\t\t{\n\t\t\t\t// Go through the aggroList of the L2Attackable\n\t\t\t\tfor (final AggroInfoHolder info : getAggroListRP().values())\n\t\t\t\t{\n\t\t\t\t\tif (info == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get the L2Character corresponding to this attacker\n\t\t\t\t\tattacker = info.getAttacker();\n\t\t\t\t\t\n\t\t\t\t\t// Get damages done by this attacker\n\t\t\t\t\tdamage = info.getDmg();\n\t\t\t\t\t\n\t\t\t\t\t// Prevent unwanted behavior\n\t\t\t\t\tif (damage > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (attacker instanceof L2SummonInstance || attacker instanceof L2PetInstance && ((L2PetInstance) attacker).getPetData().getOwnerExpTaken() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tddealer = ((L2Summon) attacker).getOwner();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tddealer = info.getAttacker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if ddealer isn't too far from this (killed monster)\n\t\t\t\t\t\tif (!Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, ddealer, true))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate real damages (Summoners should get own damage plus summon's damage)\n\t\t\t\t\t\tRewardInfoHolder reward = rewards.get(ddealer);\n\t\t\t\t\t\tif (reward == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treward = new RewardInfoHolder(ddealer, damage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treward.addDamage(damage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\trewards.put(ddealer, reward);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (ddealer instanceof L2PlayableInstance && ((L2PlayableInstance) ddealer).getActingPlayer() != null && reward.getDmg() > maxDamage)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmaxDealer = ((L2PlayableInstance) ddealer).getActingPlayer();\n\t\t\t\t\t\t\tmaxDamage = reward.getDmg();\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}\n\t\t\t\n\t\t\t// Manage Base, Quests and Sweep drops of the L2Attackable\n\t\t\tdoItemDrop(maxDealer != null && maxDealer.isOnline() ? maxDealer : lastAttacker);\n\t\t\t\n\t\t\t// Manage drop of Special Events created by GM for a defined period\n\t\t\tdoEventDrop(maxDealer != null && maxDealer.isOnline() ? maxDealer : lastAttacker);\n\t\t\t\n\t\t\tif (!getMustRewardExpSP())\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (!rewards.isEmpty())\n\t\t\t{\n\t\t\t\tL2Party attackerParty;\n\t\t\t\tlong exp;\n\t\t\t\tint levelDiff, partyDmg, partyLvl, sp;\n\t\t\t\tfloat partyMul, penalty;\n\t\t\t\tRewardInfoHolder reward2;\n\t\t\t\tint[] tmp;\n\t\t\t\t\n\t\t\t\tfor (final RewardInfoHolder reward : rewards.values())\n\t\t\t\t{\n\t\t\t\t\tif (reward == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Penalty applied to the attacker's XP\n\t\t\t\t\tpenalty = 0;\n\t\t\t\t\t\n\t\t\t\t\t// Attacker to be rewarded\n\t\t\t\t\tattacker = reward.getAttacker();\n\t\t\t\t\t\n\t\t\t\t\t// Total amount of damage done\n\t\t\t\t\tdamage = reward.getDmg();\n\t\t\t\t\t\n\t\t\t\t\t// If the attacker is a Pet, get the party of the owner\n\t\t\t\t\tif (attacker instanceof L2PetInstance)\n\t\t\t\t\t{\n\t\t\t\t\t\tattackerParty = ((L2PetInstance) attacker).getParty();\n\t\t\t\t\t}\n\t\t\t\t\telse if (attacker instanceof L2PcInstance)\n\t\t\t\t\t{\n\t\t\t\t\t\tattackerParty = ((L2PcInstance) attacker).getParty();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If this attacker is a L2PcInstance with a summoned L2SummonInstance, get Exp Penalty applied for the current summoned L2SummonInstance\n\t\t\t\t\tif (attacker instanceof L2PcInstance && ((L2PcInstance) attacker).getPet() instanceof L2SummonInstance)\n\t\t\t\t\t{\n\t\t\t\t\t\tpenalty = ((L2SummonInstance) ((L2PcInstance) attacker).getPet()).getExpPenalty();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// We must avoid \"over damage\", if any\n\t\t\t\t\tif (damage > getMaxHp())\n\t\t\t\t\t{\n\t\t\t\t\t\tdamage = getMaxHp();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If there's NO party in progress\n\t\t\t\t\tif (attackerParty == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Calculate Exp and SP rewards\n\t\t\t\t\t\tif (attacker.getKnownList().knowsObject(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Calculate the difference of level between this attacker (L2PcInstance or L2SummonInstance owner) and the L2Attackable\n\t\t\t\t\t\t\t// mob = 24, atk = 10, diff = -14 (full xp)\n\t\t\t\t\t\t\t// mob = 24, atk = 28, diff = 4 (some xp)\n\t\t\t\t\t\t\t// mob = 24, atk = 50, diff = 26 (no xp)\n\t\t\t\t\t\t\tlevelDiff = attacker.getLevel() - getLevel();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttmp = calculateExpAndSp(levelDiff, damage);\n\t\t\t\t\t\t\texp = tmp[0];\n\t\t\t\t\t\t\texp *= 1 - penalty;\n\t\t\t\t\t\t\tsp = tmp[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Config.L2JMOD_CHAMPION_ENABLE && isChampion())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\texp *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t\t\t\t\t\t\tsp *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check for an over-hit enabled strike and VIP options\n\t\t\t\t\t\t\tif (attacker instanceof L2PcInstance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfinal L2PcInstance player = (L2PcInstance) attacker;\n\t\t\t\t\t\t\t\tif (isOverhit() && attacker == getOverhitAttacker())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tplayer.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));\n\t\t\t\t\t\t\t\t\texp += calculateOverhitExp(exp);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (player.isVIP())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\texp = (long) (exp * Config.VIP_XPSP_RATE);\n\t\t\t\t\t\t\t\t\tsp = (int) (sp * Config.VIP_XPSP_RATE);\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// Distribute the Exp and SP between the L2PcInstance and its L2Summon\n\t\t\t\t\t\t\tif (!attacker.isDead())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tattacker.addExpAndSp(Math.round(attacker.calcStat(Stats.EXPSP_RATE, exp, null, null)), (int) attacker.calcStat(Stats.EXPSP_RATE, sp, null, null));\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\t// share with party members\n\t\t\t\t\t\tpartyDmg = 0;\n\t\t\t\t\t\tpartyMul = 1.f;\n\t\t\t\t\t\tpartyLvl = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Get all L2Character that can be rewarded in the party\n\t\t\t\t\t\tfinal List<L2PlayableInstance> rewardedMembers = new ArrayList<>();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Go through all L2PcInstance in the party\n\t\t\t\t\t\tList<L2PcInstance> groupMembers;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (attackerParty.isInCommandChannel())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgroupMembers = attackerParty.getCommandChannel().getMembers();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgroupMembers = attackerParty.getPartyMembers();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (final L2PcInstance pl : groupMembers)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (pl == null || pl.isDead())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get the RewardInfo of this L2PcInstance from L2Attackable rewards\n\t\t\t\t\t\t\treward2 = rewards.get(pl);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the L2PcInstance is in the L2Attackable rewards add its damages to party damages\n\t\t\t\t\t\t\tif (reward2 != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, pl, true))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpartyDmg += reward2.getDmg(); // Add L2PcInstance damages to party damages\n\t\t\t\t\t\t\t\t\trewardedMembers.add(pl);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (pl.getLevel() > partyLvl)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (attackerParty.isInCommandChannel())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpartyLvl = attackerParty.getCommandChannel().getLevel();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpartyLvl = pl.getLevel();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\trewards.remove(pl); // Remove the L2PcInstance from the L2Attackable rewards\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Add L2PcInstance of the party (that have attacked or not) to members that can be rewarded\n\t\t\t\t\t\t\t\t// and in range of the monster.\n\t\t\t\t\t\t\t\tif (Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, pl, true))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trewardedMembers.add(pl);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (pl.getLevel() > partyLvl)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (attackerParty.isInCommandChannel())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpartyLvl = attackerParty.getCommandChannel().getLevel();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpartyLvl = pl.getLevel();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfinal L2PlayableInstance summon = pl.getPet();\n\t\t\t\t\t\t\tif (summon != null && summon instanceof L2PetInstance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treward2 = rewards.get(summon);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (reward2 != null) // Pets are only added if they have done damage\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, summon, true))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tpartyDmg += reward2.getDmg(); // Add summon damages to party damages\n\t\t\t\t\t\t\t\t\t\trewardedMembers.add(summon);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (summon.getLevel() > partyLvl)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpartyLvl = summon.getLevel();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trewards.remove(summon); // Remove the summon from the L2Attackable rewards\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the party didn't killed this L2Attackable alone\n\t\t\t\t\t\tif (partyDmg < getMaxHp())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartyMul = (float) partyDmg / (float) getMaxHp();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Avoid \"over damage\"\n\t\t\t\t\t\tif (partyDmg > getMaxHp())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartyDmg = getMaxHp();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate the level difference between Party and L2Attackable\n\t\t\t\t\t\tlevelDiff = partyLvl - getLevel();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate Exp and SP rewards\n\t\t\t\t\t\ttmp = calculateExpAndSp(levelDiff, partyDmg);\n\t\t\t\t\t\texp = tmp[0];\n\t\t\t\t\t\tsp = tmp[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Config.L2JMOD_CHAMPION_ENABLE && isChampion())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texp *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t\t\t\t\t\tsp *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\texp *= partyMul;\n\t\t\t\t\t\tsp *= partyMul;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check for an over-hit enabled strike\n\t\t\t\t\t\t// (When in party, the over-hit exp bonus is given to the whole party and splitted proportionally through the party members)\n\t\t\t\t\t\tif (attacker instanceof L2PcInstance)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinal L2PcInstance player = (L2PcInstance) attacker;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (isOverhit() && attacker == getOverhitAttacker())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tplayer.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));\n\t\t\t\t\t\t\t\texp += calculateOverhitExp(exp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Distribute Experience and SP rewards to L2PcInstance Party members in the known area of the last attacker\n\t\t\t\t\t\tif (partyDmg > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattackerParty.distributeXpAndSp(exp, sp, rewardedMembers, partyLvl);\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\tcatch (final Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"\", e);\n\t\t}\n\t}", "public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }", "public void heal(int[] fighter, int points) {\n fighter[LIFE] = fighter[LIFE] + points;\n if (fighter[LIFE] > fighter[MAX_LIFE]) {\n fighter[LIFE] = fighter[MAX_LIFE];\n }\n }", "public void FightAndDefence(Player Fplayer, Player Dplayer) {\r\n if (Fplayer.list.size() == 0)\r\n System.out.println(\"Finish\");\r\n if (!Dplayer.strings[0].equals(\"0 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(0, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[1].equals(\"1 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(1, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[2].equals(\"2 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(2, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[5].equals(\"5 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(5, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[8].equals(\"8 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(8, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[7].equals(\"7 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(7, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[6].equals(\"6 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(6, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (!Dplayer.strings[3].equals(\"3 \")) {\r\n if (FullDamage(Fplayer) != 0)\r\n CheckDAndH(5, Dplayer, Fplayer, FullDamage(Fplayer));\r\n else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n if (Dplayer.strings[4].equals(\"4-C\")) {\r\n if (FullDamage(Fplayer) != 0) {\r\n Fplayer.setTotalWin(1);\r\n } else {\r\n WarReport(Fplayer, Dplayer);\r\n return;\r\n }\r\n }\r\n WarReport(Fplayer, Dplayer);\r\n }", "public Player fight() {\n if (player1.getCurrentFighter()==null && player2.getCurrentFighter()==null)\n throw new IllegalArgumentException(\"Both of the players have no fighters !\");\n\n if (player2.getCurrentFighter()==null || player2.getCurrentFighter().getOriginalHealth()<=0)\n return player1;\n else if (player1.getCurrentFighter()==null || player1.getCurrentFighter().getOriginalHealth()<=0)\n return player2;\n\n\n while (player1.getCurrentFighter().isAlive() && player2.getCurrentFighter().isAlive()) {\n boolean turn = random.nextBoolean();\n\n if (turn) { // Fighter1 attack first\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n\n if (player2.getCurrentFighter().isAlive())\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n }\n else { // Fighter2 attack first\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n\n if (player1.getCurrentFighter().isAlive())\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n }\n }\n\n if (!player1.getCurrentFighter().isAlive())\n return player2;\n else\n return player1;\n\n }", "public Attack fight(String opponent) {\n\t\tisHungry = true;\n\n return super.fight(opponent);\n\t}", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "public void harvest() {\n\t\tif (list_persons.size() > 0) {\n\t\t\tint wealthHarvest = (int) (grains_here / list_persons.size());\n\t\t\tfor (Person p : list_persons) {\n\t\t\t\tp.add_wealth(wealthHarvest);\n\t\t\t}\n\t\t\tgrains_here = 0;\n\t\t\tremoveAllPersons();\n\t\t}\n\t}", "public void healHp(){\n\t\tfor(int i : team){\n\t\t\t//System.out.println(allPoke.get(i).getName());\n\t\t\tallPoke.get(i).heal();\n\t\t}\n\t}", "public int throwDefense(int[] fighter) {\n Coins coins = new Coins();\n return coins.coinTry(fighter[DEFENSE]);\n }", "public void update_reinforcements()\n {\n int ypos;\n int alien_type;\n int aliens = 0;\n if (DIFFICULTY == \"normal\")\n {\n aliens = 3;\n }\n else if (DIFFICULTY == \"hard\")\n {\n aliens = 6;\n }\n else if (DIFFICULTY == \"unforgiving\")\n {\n aliens = 9;\n }\n for (int i = 0; i<aliens; i++)\n {\n ypos = ThreadLocalRandom.current().nextInt(50, 890);\n alien_type = ThreadLocalRandom.current().nextInt(3);\n if (alien_type == 0)\n {\n reinforcement_list.add(new Alien1(1300+i*100, ypos, DIFFICULTY,10));\n }\n else if (alien_type == 1)\n {\n reinforcement_list.add(new Alien2(1300+i*100, ypos, DIFFICULTY,10));\n }\n else\n {\n reinforcement_list.add(new Alien6(1300+i*100, ypos, DIFFICULTY));\n }\n }\n if (count % (reinforce*5) == 0)\n {\n ypos = ThreadLocalRandom.current().nextInt(50, 890);\n reinforcement_list.add(new PowerUp(1200, ypos));\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a populator which generates large spikes of Ice.
public interface IceSpike extends Populator { /** * Creates a new {@link Builder} to build a {@link IceSpike} populator. * * @return The new builder */ static Builder builder() { return Sponge.getRegistry().createBuilder(Builder.class); } /** * Gets the number of spikes to generate per chunk. * * @return The number of spikes */ VariableAmount getSpikesPerChunk(); /** * Sets the number of spikes to attempt to generate per chunk. * * @param count The new number of spikes */ void setSpikesPerChunk(VariableAmount count); /** * Sets the number of spikes to attempt to generate per chunk. * * @param count The new number of spikes */ default void setSpikesPerChunk(int count) { setSpikesPerChunk(VariableAmount.fixed(count)); } /** * Gets the base height of the spike. * * @return The base height */ VariableAmount getHeight(); /** * Sets the base height of the spike. * * @param height The new base height */ void setHeight(VariableAmount height); /** * Sets the base height of the spike. * * @param height The new base height */ default void setHeight(int height) { setHeight(VariableAmount.fixed(height)); } /** * Gets the probability of the spike much larger than normal. * * @return The spawn probability */ double getExtremeSpikeProbability(); /** * Gets the probability of the spike much larger than normal. * * @param p The new spawn probability */ void setExtremeSpikeProbability(double p); /** * Gets the height increase of the extreme spikes. * * @return The height increase */ VariableAmount getExtremeSpikeIncrease(); /** * Sets the height increase of the extreme spikes. * * @param increase The new height increase */ void setExtremeSpikeIncrease(VariableAmount increase); /** * Sets the height increase of the extreme spikes. * * @param increase The new height increase */ default void setExtremeSpikeIncrease(int increase) { setExtremeSpikeIncrease(VariableAmount.fixed(increase)); } /** * A builder for constructing {@link IceSpike} populators. */ interface Builder extends ResettableBuilder<IceSpike, Builder> { /** * Sets the number of spikes to generate per chunk. * * @param count The new number of spikes * @return This builder, for chaining */ Builder spikesPerChunk(VariableAmount count); /** * Sets the number of spikes to generate per chunk. * * @param count The new number of spikes * @return This builder, for chaining */ default Builder spikesPerChunk(int count) { return spikesPerChunk(VariableAmount.fixed(count)); } /** * Sets the base height of the spike. * * @param height The new base height * @return This builder, for chaining */ Builder height(VariableAmount height); /** * Sets the base height of the spike. * * @param height The new base height * @return This builder, for chaining */ default Builder height(int height) { return height(VariableAmount.fixed(height)); } /** * Gets the probability of the spike much larger than normal. * * @param p The new spawn probability * @return This builder, for chaining */ Builder extremeSpikeProbability(double p); /** * Sets the base height increase of the extreme spikes. * * @param increase The new base height increase * @return This builder, for chaining */ Builder extremeSpikeIncrease(VariableAmount increase); /** * Sets the base height increase of the extreme spikes. * * @param increase The new base height increase * @return This builder, for chaining */ default Builder extremeSpikeIncrease(int increase) { return extremeSpikeIncrease(VariableAmount.fixed(increase)); } /** * Builds a new instance of a {@link IceSpike} populator with the * settings set within the builder. * * @return A new instance of the populator * @throws IllegalStateException If there are any settings left unset * which do not have default values */ IceSpike build() throws IllegalStateException; } }
[ "public Population(RandomEngine e) {\n super();\n genomes = new Vector();\n randomGenerator = e;\n uniform = new Uniform(randomGenerator);\n selectionObject = new RoulletteWheelSelector(randomGenerator);\n }", "private Population() {\n\n\t}", "public Clorus replicate() {\n double babyEnergy = energy * repEnergyGiven;\n energy = energy * repEnergyRetained;\n return new Clorus(babyEnergy);\n }", "MeterProvider create();", "public abstract IPopulation[] getMicroPopulations();", "Meter createMeter();", "public PowerupFactory() {\n powerups = new WeightedSamplingTree<Powerup>(new PowerupComparator());\n }", "public static void main(String[] args) {\n int popSize = 20;\n String goal = \"Hello World!\";\n Population pop;\n int sum = 0;\n int num = 1000;\n pop = new Population(popSize, goal);\n\n while (!pop.nextGen());\n\n pop.display();\n\n\n\n }", "public interface GeneticOptimizer {\r\n\tpublic int getGenPopulation();\r\n\tpublic void setGenPopulation(Integer popSize);\r\n\tpublic int getGenIterations();\r\n\tpublic void setGenIterations(Integer iterations);\r\n\r\n}", "Builder spikesPerChunk(VariableAmount count);", "public Population(int capacity) {\r\n Validate.positive(capacity, \"capacity\");\r\n this.capacity = capacity;\r\n }", "public NiceStepSizeGenerator() {\n\t\tthis(new double[] {1, 5, 2, 2.5, 4, 3}, 10.0);\n\t}", "private Population geneticAlgorithm() {\r\n\r\n\t\tPopulation population = new Population(c.getCreaturesPerPopulation());\r\n\r\n\t\tdo {\r\n\t\t\tif(!c.isGUI()) {\r\n\t\t\t\tSystem.out.print(\"Population no. \" + (populations + 1) + \"... \");\r\n\t\t\t} else {\r\n\t\t\t\twindow.appendString(\"Population no. \" + (populations + 1) + \" \");\r\n\t\t\t}\r\n\r\n\t\t\tlong started = System.currentTimeMillis();\r\n\t\t\tpopulation.computeAll();\r\n\r\n\t\t\tif (!c.isGUI()) {\r\n\t\t\t\tint waitMillis = 100;\r\n\r\n\t\t\t\twhile (!population.isFinished()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(waitMillis);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlong wait = c.getPause() * 1000;\r\n\t\t\t\tint FPS = 60;\r\n\t\t\t\tfloat waitTime = 1000 / FPS;\r\n\r\n\t\t\t\tpresentation = population.getSample();\r\n\t\t\t\tpresentation.setExpire(false);\r\n\t\t\t\tpresentation.setTimeStep(waitTime / 1000);\r\n\t\t\t\tpresentation.setup();\r\n\r\n\t\t\t\tFilter filter1 = new Filter();\r\n\t\t\t\tfilter1.categoryBits = 4;\r\n\t\t\t\tfilter1.maskBits = 1;\r\n\t\t\t\tfilter1.maskBits = 3;\r\n\r\n\t\t\t\tFilter filter2 = new Filter();\r\n\t\t\t\tfilter2.categoryBits = 5;\r\n\t\t\t\tfilter2.maskBits = 2;\r\n\t\t\t\tfilter2.maskBits = 3;\r\n\r\n\t\t\t\tfor(Body body : presentation.getCreatures().get(0).getBodies()) {\r\n\t\t\t\t\tbody.getFixtureList().setFilterData(filter1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(Body body : presentation.getCreatures().get(1).getBodies()) {\r\n\t\t\t\t\tbody.getFixtureList().setFilterData(filter2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twindow.setSimulator(presentation);\r\n\r\n\t\t\t\twhile (!population.isFinished()\r\n\t\t\t\t\t\t|| started + wait > System.currentTimeMillis()) {\r\n\t\t\t\t\tpresentation.update();\r\n\t\t\t\t\twindow.updateDisplay();\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep((int) waitTime);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpopulation.recordResults();\r\n\r\n\t\t\tpopulations++;\r\n\t\t\tbestResult = population.getBestResult();\r\n\t\t\tpopulation = population.evolve();\r\n\r\n\t\t\tString populationInfo = \"finished in \" + (System.currentTimeMillis() - started) / 1000 +\r\n\t\t\t\t\t\" seconds with a high score of \" + bestResult + \"\\n\";\r\n\t\t\tif(c.isGUI()) {\r\n\t\t\t\twindow.appendString(populationInfo);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(populationInfo);\r\n\t\t\t}\r\n\t\t} while (!finishedPopulations());\r\n\r\n\t\treturn population;\r\n\r\n\t}", "private Population<Lion> generateInitialPopulation() {\n\n ArrayList<Lion> members = new ArrayList<>();\n\n //Perfect fitness male lion\n Lion perfectLion = new Lion(420, 50, 650, 100, Lion.FurColor.TAWNY, Lion.Gender.MALE);\n\n members.add(perfectLion);\n\n while (members.size() < getCarryingCapacity()) {\n members.add(getEnvironment().generateNewLion());\n }\n\n return new Population<>(members);\n }", "@Override\n public Pump_GasUnit CreatePumpGasUnit(){\n return new Pump_GasUnit1();\n }", "public BasicPopulation() {\n\t\tthis.populationSize = 0;\n\t}", "public interface IEngineGenerator extends IEnergyProviders {\n\n\t/**\n\t * Check if there is no fuel\n\t * @return true if there is no fuel\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsEmpty() throws Exception;\n\n\t/**\n\t * Check if the engine generator is full\n\t * @return true if the engine generator is full\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsFull() throws Exception;\n\n\t/**\n\t * Get the quantity of fuel in the engine generator\n\t * @return quantity of fuel in the engine generator\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic double fuelQuantity() throws Exception;\n\n\t/**\n\t * Add fuel into the engine generator\n\t * @param quantity of fuel put into the engine generator (can't exceed the max capacity of the engine generator)\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void addFuel(int quantity) throws Exception;\n\n\t/**\n\t * Turn on the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void on() throws Exception; // use fuel to prod electricity\n\n\t/**\n\t * Turn off the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void off() throws Exception;\n\n\t/**\n\t * Check if the engine generator is on\n\t * @return\ttrue if the engine generator is on\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean isOn() throws Exception;\n\n}", "public GUIPopulator getGuiPopulator() {\n return guiPopulator;\n }", "public interface GenericEnergyGenerator extends PhysicalElement {\n\n\t/** \n\t * On/off Switch \n\t */\n\tOnOffSwitch onOffSwitch();\n\n\t/** \n\t * Switch rating for the power production, in case the device allows \n\t * regulating the power production. The switch setting is to be\n\t * understood as share of the maximum production power.\n\t */\n\tMultiSwitch setting();\n\n\t/**\n\t * Range of rated power generation.\n\t */\n\tPowerRange ratedPower();\n\n\t/** \n\t * Conversion efficiency: output energy divided by input energy \n\t */\n\tFloatResource efficiency();\n\n\t/**\n\t * start up time from cold start of energy generating unit to 90% of rated power\n\t */\n\tTimeResource startupTimeCold();\n\n\t/**\n\t * start up time from warm start (output power just reduced to zero) to 90% of rated power\n\t */\n\tTimeResource startupTimeWarm();\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the sidebar overview link is showing
public boolean hasSideBarItemOverview() { try { findElementOnPage(By.xpath(sidebar_id + sidebar_item + sidebar_overview)); return true; } catch (Exception ex) { // We didn't find the element } return false; }
[ "protected final boolean isUsingSidebar() {\n return(_useSidebar);\n }", "public boolean hasSideBarItemDocumentation() {\r\n\t\ttry {\r\n\t\t\tfindElementOnPage(By.xpath(sidebar_id + sidebar_sub_item + sidebar_documentation));\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// We didn't find the element\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasDetailPlacementView();", "public boolean isSetOverview() {\n return this.overview != null;\n }", "boolean isShowArticle();", "public boolean hasLinkPanel(ItemStack page);", "boolean hasLandingPageView();", "boolean hasFullContentsListUrl();", "boolean hasExpandedLandingPageView();", "private boolean isTwoPaneLayoutUsed() {\n return findViewById(R.id.article_detail_container) != null;\n }", "public boolean isHomeCollection();", "boolean isToolbarVisible();", "boolean hasTopicView();", "public boolean hasSideBarItemRequestAccess() {\r\n\t\ttry {\r\n\t\t\tfindElementOnPage(By.xpath(sidebar_id + sidebar_sub_item + sidebar_request_access));\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// We didn't find the element\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasFullContentsUrl();", "boolean hasDetailsUrl();", "public boolean hasSideBarItemFAQ() {\r\n\t\ttry {\r\n\t\t\tfindElementOnPage(By.xpath(sidebar_id + sidebar_sub_item + sidebar_faq));\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// We didn't find the element\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasIsGuide();", "public boolean isInLandingWindow();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns array with sunrise/sunset colors
@Nullable @OnlyIn(Dist.CLIENT) public float[] calcSunriseSunsetColors(float celestialAngle, float partialTicks) { float f = 0.4F; float f1 = MathHelper.cos(celestialAngle * ((float)Math.PI * 2F)) - 0.0F; float f2 = -0.0F; if (f1 >= -0.4F && f1 <= 0.4F) { float f3 = (f1 - -0.0F) / 0.4F * 0.5F + 0.5F; float f4 = 1.0F - (1.0F - MathHelper.sin(f3 * (float)Math.PI)) * 0.99F; f4 = f4 * f4; this.colorsSunriseSunset[0] = f3 * 0.3F + 0.7F; this.colorsSunriseSunset[1] = f3 * f3 * 0.7F + 0.2F; this.colorsSunriseSunset[2] = f3 * f3 * 0.0F + 0.2F; this.colorsSunriseSunset[3] = f4; return this.colorsSunriseSunset; } else { return null; } }
[ "protected int[] timeColors() {\n double[] ratios = timeSystem.timeRatios();\n\n if (settings.isDuplexed()) {\n ratios[0] = reduce(ratios[0] * 2);\n }\n\n return colorWheel.colors(ratios);\n }", "private java.awt.Color[] arrayofColors() {\n java.awt.Color[] colorarr = new java.awt.Color[15];\n colorarr[0] = java.awt.Color.cyan;\n colorarr[1] = java.awt.Color.cyan;\n colorarr[2] = java.awt.Color.pink;\n colorarr[3] = java.awt.Color.pink;\n colorarr[4] = java.awt.Color.blue;\n colorarr[5] = java.awt.Color.blue;\n colorarr[6] = java.awt.Color.green;\n colorarr[7] = java.awt.Color.green;\n colorarr[8] = java.awt.Color.green;\n colorarr[9] = java.awt.Color.yellow;\n colorarr[10] = java.awt.Color.yellow;\n colorarr[11] = java.awt.Color.orange;\n colorarr[12] = java.awt.Color.orange;\n colorarr[13] = java.awt.Color.red;\n colorarr[14] = java.awt.Color.red;\n return colorarr;\n }", "public Color[] getColors();", "public Color[] colorList() {\r\n Color[] colors = new Color[7];\r\n colors[0] = Color.cyan;\r\n colors[1] = Color.pink;\r\n colors[2] = Color.white;\r\n colors[3] = Color.green;\r\n colors[4] = Color.YELLOW;\r\n colors[5] = Color.RED;\r\n colors[6] = Color.GRAY;\r\n return colors;\r\n }", "private Color[] getInternalArcColors()\n {\n return getColorsForState(this.iconPartStates[2]);\n }", "public static int[] getColorsLime() {\r\n\t\treturn COLORS_LIME;\r\n\t}", "private Color[] getExternalArcColors()\n {\n return getColorsForState(this.iconPartStates[0]);\n }", "private double[] sunCoords() {\n double[] sunSpherical = new double[3];\r\n sunSpherical[0] = celestialSphere.getRadius();\r\n if (day < daysPerYear / 2.0)\r\n sunSpherical[1] = 113.50 - day * (23.50 * 2.0) / (daysPerYear / 2.0);\r\n else\r\n sunSpherical[1] = 66.50 + (day - daysPerYear/2) * (23.50 * 2.0) /\r\n (daysPerYear / 2.0);\r\n sunSpherical[1] = Math.toRadians(sunSpherical[1]);\r\n\r\n double hour = (day - (int) day) * 24.0;;\r\n sunSpherical[2] = hour * 2.0 * Math.PI / 24.0;\r\n \r\n // Convert to rectangular and return.\r\n return GUtil.sphericalToRectangular(sunSpherical);\r\n }", "private Color[] getCircleColors()\n {\n return getColorsForState(this.iconPartStates[3]);\n }", "public int[] getColor() {\n\n int[] retVal = new int[3];\n retVal[0] = r;\n retVal[1] = g;\n retVal[2] = b;\n\n return retVal;\n }", "public ColorStateList[] getColor() {\n return new ColorStateList[]{mTrackStateList, mScrubberStateList, mThumbStateList};\n }", "public static int[] getColorsLight() {\r\n\t\treturn COLORS_LIGHT;\r\n\t}", "int[] getPossibleColors();", "public int[] getColor() {\n int[] retVal = new int[3];\n retVal[0] = r;\n retVal[1] = g;\n retVal[2] = b;\n return retVal;\n }", "public static int[] getColorsRed() {\r\n\t\treturn COLORS_RED;\r\n\t}", "public static int[] getColorsTeal() {\r\n\t\treturn COLORS_TEAL;\r\n\t}", "private Color[] getColorsForState(State state)\n {\n switch (state)\n {\n case GREEN:\n return GREEN_COLORS;\n case ORANGE:\n return ORANGE_COLORS;\n case RED:\n return RED_COLORS;\n case BACKGROUND:\n return DARK_GRAY_COLORS;\n default:\n return null;\n }\n }", "private java.awt.Color[] read_color_array() throws java.io.IOException\n {\n java.util.Collection<java.awt.Color> color_list = new java.util.LinkedList<java.awt.Color>();\n for(;;)\n {\n java.awt.Color curr_color = read_color();\n if (curr_color == null)\n {\n break;\n }\n color_list.add(curr_color);\n }\n java.awt.Color[] result = new java.awt.Color[color_list.size()];\n java.util.Iterator<java.awt.Color> it = color_list.iterator();\n for (int i = 0; i < result.length; ++i)\n {\n result[i] = it.next();\n }\n return result;\n }", "public static int[] getColorsPink() {\r\n\t\treturn COLORS_PINK;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mutate the DOM using Java and Elemental2, injecting the current Gust version. Called from JS.
public static Element mutateVersion(Element element) { element.textContent = Core.getGustVersion(); return element; }
[ "public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}", "public interface HTMLModElement extends HTMLElement {\n @JSBody(script = \"return HTMLModElement.prototype\")\n static HTMLModElement prototype() {\n throw new UnsupportedOperationException(\"Available only in JavaScript\");\n }\n\n @JSBody(script = \"return new HTMLModElement()\")\n static HTMLModElement create() {\n throw new UnsupportedOperationException(\"Available only in JavaScript\");\n }\n\n /**\n * Sets or retrieves reference information about the object.\n */\n @JSProperty\n String getCite();\n\n @JSProperty\n void setCite(String cite);\n\n /**\n * Sets or retrieves the date and time of a modification to the object.\n */\n @JSProperty\n String getDateTime();\n\n @JSProperty\n void setDateTime(String dateTime);\n\n}", "org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement addNewBridgeElement();", "public void addElement(HTMLDocumentImpl doc, DocumentFragment result, GumboNode node){\n DocumentFragment frag = doc.createDocumentFragment();\n \n// String a = node.getV().\n \n //String a = node.v.element.tagName();\n \n// frag.setNodeValue(Utils.Utf8(node.v.element.tagName()));\n \n// int i = 0;\n /*\n \n doc.createAttribute()\n \n node.v.element.attributes\n */\n }", "public interface Renderer {\n\n /**\n * View of an element consisting of methods relevant to rendering.\n */\n interface Renderable {\n\n /**\n * @return the element's tag name. This is the only piece of state made\n * available to the renderer, as it is immutable. If the renderer\n * relied on any other information such as attributes or children,\n * then it would be disobeying the contract of creating a *blank*\n * html implementation, making things less predictable.\n */\n String getTagName();\n\n /**\n * Optionally call this to specify a default attach point for children. It\n * may be the same as the dom impl nodelet, a descendant of the dom impl\n * nodelet, or null. If null, child html implementations will not be\n * automatically attached during mutations. If not null, it must not contain\n * any children of its own to start with, as they will all be removed.\n *\n * If this method is not called, the value default to null and no automatic\n * behaviour occurs.\n *\n * @param containerNodelet\n * @return its input, for convenience (useful when used as the last line in\n * {@link Renderer#createDomImpl(Renderable)} where the container\n * nodelet is the same as the dom impl nodelet)\n */\n // TODO(danilatos): Abolish container nodelet by providing equivalent\n // functionality in a utility implementation of node mutation handler,\n // so that renderers desiring that behaviour may use it instead.\n Element setAutoAppendContainer(Element containerNodelet);\n\n /**\n * Optionally sets a transient properties on the element.\n *\n * An example use of this method is to assign a reference to a specific\n * widget view interface for use by other handlers.\n *\n * @param <T>\n * @param property\n * @param value\n */\n // TODO(danilatos): A mechanism to allow handlers to clean up after themselves\n <T> void setProperty(Property<T> property, T value);\n }\n\n /**\n * Creates a blank DOMImpl corresponding this node.\n *\n * @param element the implementor of this method may optionally call some of\n * the setters\n */\n Element createDomImpl(Renderable element);\n\n}", "public void versionGWT()\r\n {\r\n File zWarWebXmlFile = new File( mCanonicalProjectDir, \"war/WEB-INF/web.xml\" );\r\n String zWarWebXml = fileContents( assertIsFile( \"web.xml\", zWarWebXmlFile ) );\r\n\r\n int zCurVersion = extractVersionFromUrlPattern( zWarWebXml );\r\n\r\n String zWarResourceRelativePathCurrent = \"warResources/v\" + zCurVersion;\r\n\r\n File zIndexHtmlFile = new File( mCanonicalProjectDir, zWarResourceRelativePathCurrent + \"/index.html\" );\r\n String zIndexHtml = assertVersionedIndexHtml( zIndexHtmlFile, zCurVersion );\r\n\r\n List<File> zVersionedGwtXmlFiles = findVersionedGwtXmlFiles( zCurVersion );\r\n\r\n int zNewVersion = zCurVersion + 1;\r\n\r\n String zWarResourceRelativePathNew = \"warResources/v\" + zNewVersion;\r\n if ( new File( mCanonicalProjectDir, zWarResourceRelativePathNew ).exists() )\r\n {\r\n throw new IllegalStateException( \"Project already contains a 'warResources/v\" + zNewVersion + \"' directory?\" );\r\n }\r\n\r\n progress( \"versionGWT: \" + this + \" | \" + zCurVersion + \" -> \" + (zCurVersion + 1) );\r\n progress( \" \" + zWarWebXmlFile.getPath() );\r\n progress( \" \" + zIndexHtmlFile.getPath() );\r\n for ( File zFile : zVersionedGwtXmlFiles )\r\n {\r\n progress( \" \" + zFile.getPath() );\r\n }\r\n progress( \" \" + zWarResourceRelativePathCurrent + \" -> \" + zWarResourceRelativePathNew );\r\n\r\n new Paths( zWarResourceRelativePathCurrent ).copyTo( zWarResourceRelativePathNew );\r\n\r\n updateFileContents( new File( mCanonicalProjectDir, zWarResourceRelativePathNew + \"/index.html\" ),\r\n updateVersionedIndexHtml( zIndexHtml, zCurVersion, zNewVersion ) );\r\n\r\n updateFileContents( zWarWebXmlFile, updateVersionedWebXml( zWarWebXml, zCurVersion, zNewVersion ) );\r\n\r\n for ( File zFile : zVersionedGwtXmlFiles )\r\n {\r\n updateFileContents( zFile, updateVersionedGwtXmlFile( fileContents( zFile ), zCurVersion, zNewVersion ) );\r\n }\r\n // Update/Create the Current Version's redirect JavaScript file\r\n String zCurPathVersion = \"/v\" + zCurVersion;\r\n String redirectScript = \"var loc = window.location.href;\\n\" + //\r\n \"var at = loc.indexOf( '\" + zCurPathVersion + \"' );\\n\" + //\r\n \"window.location.href = loc.substring(0, at) + '/v\" + zNewVersion + \"' + loc.substring(at + \" + zCurPathVersion.length() + \");\\n\";\r\n updateFileContents( new File( mCanonicalProjectDir, zWarResourceRelativePathCurrent + \"/v\" + zCurVersion + \".nocache.js\" ), redirectScript );\r\n\r\n // Update the \"root\" html (if it exists)\r\n File zRootHtmlFile = new File( mCanonicalProjectDir, \"warResources/index.html\" );\r\n if ( zRootHtmlFile.isFile() )\r\n {\r\n updateFileContents( zRootHtmlFile, updateRootHTML( fileContents( zRootHtmlFile ), zCurVersion, zNewVersion ) );\r\n }\r\n }", "protected DOMNode updateDOMNode() {\r\n\t\tString msg = \"Swingjs WARNING: default JSComponentUI is being used for \"\r\n\t\t\t\t+ getClass().getName();\r\n\t\tif (debugging && createMsgs.indexOf(msg) < 0) {\r\n\t\t\tcreateMsgs += msg;\r\n\t\t\tJSToolkit.alert(msg);\r\n\t\t}\r\n\t\tSystem.out.println(msg);\r\n\t\treturn (domNode == null ? domNode = DOMNode.createElement(\"div\", id)\r\n\t\t\t\t: domNode);\r\n\t}", "void setScripting(GeoElement oldGeo);", "private static void editGameInstanceFromElement(Element root, GameInstance gi) throws JDOMException, IOException {\n //Control the xml version, downward compatible current version 2.0\n\t\t//String xmlVersion = root.getAttributeValue(StringIO.VERSION);\n\t\tint uniqueId = 0;\n\t\tfor (Element elem : root.getChildren()) {\n\t\t\tString name = elem.getName();\n\t\t\tswitch (name) {\n\t\t\t\tcase StringIO.PLAYER:\n\t\t\t\t\tPlayer player = PlayerIO.createPlayerFromElement(elem);\n\t\t\t\t\tplayer = gi.addPlayer(new PlayerAddAction(-1, player));\n\t\t\t\t\tbreak;\n\t\t\t\tcase StringIO.NAME:\n\t\t\t\t\tgi.name = elem.getValue();\n\t\t\t\t\tbreak;\n\t\t\t\tcase StringIO.SETTINGS:\n\t\t\t\t\tfor (Element elemSettings : elem.getChildren()) {\n\t\t\t\t\t\tString settingsName = elemSettings.getName();\n\t\t\t\t\t\tswitch (settingsName) {\n\t\t\t\t\t\t\tcase StringIO.NAME:\n\t\t\t\t\t\t\t\tgi.name = elemSettings.getValue();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.PRIVATE_AREA:\n\t\t\t\t\t\t\t\tgi.private_area = Boolean.parseBoolean(elemSettings.getValue());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.TABLE:\n\t\t\t\t\t\t\t\tgi.drawTable = Boolean.parseBoolean(elemSettings.getValue());\n\t\t\t\t\t\t\t\tgi.put_down_area = readAttribute(elemSettings, StringIO.PUT_DOWN_AREA, gi.put_down_area);\n\t\t\t\t\t\t\t\tgi.tableRadius = readAttribute(elemSettings, StringIO.TABLE_RADIUS, gi.tableRadius);\n\t\t\t\t\t\t\t\tgi.tableColor = readAttribute(elemSettings, StringIO.COLOR, gi.tableColor);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.SEATS:\n\t\t\t\t\t\t\t\tgi.seatColors.clear();\n\t\t\t\t\t\t\t\tgi.seats = -1;\n\t\t\t\t\t\t\t\tfor (Element seatElement : elemSettings.getChildren()) {\n\t\t\t\t\t\t\t\t\tString seatElementName = seatElement.getName();\n\t\t\t\t\t\t\t\t\tif (seatElementName.equals(StringIO.SEAT)) {\n\t\t\t\t\t\t\t\t\t\t++gi.seats;\n\t\t\t\t\t\t\t\t\t\tif (seatElement.getAttribute(StringIO.COLOR) != null) {\n\t\t\t\t\t\t\t\t\t\t\tgi.seatColors.add(Color.decode(seatElement.getAttributeValue(StringIO.COLOR)));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tgi.seats = max(-1, gi.seats + 1);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.ADMIN:\n\t\t\t\t\t\t\t\tif (!elemSettings.getValue().equals(\"\") && Integer.parseInt(elemSettings.getValue()) > -1) {\n\t\t\t\t\t\t\t\t\tgi.admin = Integer.parseInt(elemSettings.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgi.admin = -1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.DEBUG_MODE:\n\t\t\t\t\t\t\t\tgi.debug_mode = Boolean.parseBoolean(elemSettings.getValue());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase StringIO.INITIAL_MODE:\n\t\t\t\t\t\t\t\tgi.initial_mode = Boolean.parseBoolean(elemSettings.getValue());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase StringIO.OBJECT:\n\t\t\t\t\tString uniqueName = elem.getAttributeValue(StringIO.UNIQUE_NAME);\n\t\t\t\t\tif (uniqueName == null) {\n\t\t\t\t\t\tthrow new IOException(\"Object must have a unique name\");\n\t\t\t\t\t}\n\t\t\t\t\tint objectCount = readAttribute(elem, StringIO.NUMBER, 1);\n\t\t\t\t\tfor (int i = 0; i < objectCount; ++i) {\n\t\t\t\t\t\tif (gi.game.getObject(uniqueName) == null) {\n\t\t\t\t\t\t\tthrow new IOException(\"Unique name\" + uniqueName + \" not defined\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tObjectInstance oi = new ObjectInstance(gi.game.getObject(uniqueName), readAttribute(elem, StringIO.ID, uniqueId));\n if (oi.state.isFixed) {\n oi.state.drawValue = 0;\n } else {\n oi.state.drawValue = max(max(oi.state.drawValue, uniqueId), 1);\n }\n ObjectStateIO.editStateFromElement(oi.state, elem);\n oi.state.originalX = readAttribute(elem, StringIO.ORIGINAL_X, oi.state.posX);\n oi.state.originalY = readAttribute(elem, StringIO.ORIGINAL_Y, oi.state.posY);\n oi.state.originalRotation = readAttribute(elem, StringIO.ORIGINAL_ROTATION, oi.state.rotation);\n\t\t\t\t\t\tgi.addObjectInstance(oi);\n\t\t\t\t\t\t++uniqueId;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase StringIO.PASSWORD:\n\t\t\t\t\tgi.password = elem.getValue();\n\t\t\t\t\tbreak;\n\t\t\t\tcase StringIO.HIDDEN:\n\t\t\t\t\tgi.hidden = Boolean.parseBoolean(elem.getValue());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public static native Element overwrite(Element oldElem, String newRawHtml)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newRawHtml);\r\n\t}-*/;", "void replace(CtElement element);", "public static native Element overwrite(String oldId, String newRawHtml)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldId, newRawHtml);\r\n\t}-*/;", "void update(JotTag jotTag);", "public void supplement(DomElement domElement);", "<T> Dynamic<T> update(DSL.TypeReference type, Dynamic<T> input, int version, int newVersion);", "org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement insertNewBridgeElement(int i);", "public org.hl7.fhir.String addNewVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().add_element_user(VERSION$4);\n return target;\n }\n }", "private void updateHTML(UIDL uidl, Client client) {\n \t\tString newStyle = uidl.getStringAttribute(\"style\");\n \t\tif (currentStyle != null && currentStyle.equals(newStyle))\n \t\t\treturn;\n \n \t\tString template = client.getResource(\"layout/\" + newStyle + \".html\");\n \t\tif (template == null) {\n \t\t\ttemplate = \"Layout \" + newStyle + \" is missing\";\n \t\t} else {\n \t\t\tcurrentStyle = newStyle;\n \t\t}\n \t\ttemplate = extractBodyAndScriptsFromTemplate(template);\n \t\thtml = new HTMLPanel(template);\n \t\taddUniqueIdsForLocations(html.getElement(), locationPrefix);\n \n \t\tWidget parent = getParent();\n \t\twhile (parent != null && !(parent instanceof IWindow))\n \t\t\tparent = parent.getParent();\n \t\tif (parent != null && ((IWindow) parent).getTheme() != null)\n \t\t\t;\n \t\tprefixImgSrcs(html.getElement(), \"../theme/\"\n \t\t\t\t+ ((IWindow) parent).getTheme() + \"/layout/\");\n \t\tadd(html);\n \t}", "public static native Element overwrite(Element oldElem, Element newElem)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newElem);\r\n\t}-*/;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XMemberFeatureCall__Group_1_1_0__0" $ANTLR start "rule__XMemberFeatureCall__Group_1_1_0__0__Impl" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10489:1: rule__XMemberFeatureCall__Group_1_1_0__0__Impl : ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) ;
public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10493:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) ) // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10494:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) { // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10494:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10495:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) { if ( state.backtracking==0 ) { before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); } // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10496:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10496:2: rule__XMemberFeatureCall__Group_1_1_0_0__0 { pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl21389); rule__XMemberFeatureCall__Group_1_1_0_0__0(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XMemberFeatureCall__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10369:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10370:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10370:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10371:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10372:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n int alt81=2;\r\n int LA81_0 = input.LA(1);\r\n\r\n if ( (LA81_0==20) ) {\r\n alt81=1;\r\n }\r\n switch (alt81) {\r\n case 1 :\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10372:2: rule__XMemberFeatureCall__Group_1_1_1__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1__1__Impl21142);\r\n rule__XMemberFeatureCall__Group_1_1_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10647:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10648:1: ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10648:1: ( ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )* )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10649:1: ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1_2()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10650:1: ( rule__XMemberFeatureCall__Group_1_1_1_2__0 )*\r\n loop84:\r\n do {\r\n int alt84=2;\r\n int LA84_0 = input.LA(1);\r\n\r\n if ( (LA84_0==52) ) {\r\n alt84=1;\r\n }\r\n\r\n\r\n switch (alt84) {\r\n \tcase 1 :\r\n \t // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10650:2: rule__XMemberFeatureCall__Group_1_1_1_2__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1_2__0_in_rule__XMemberFeatureCall__Group_1_1_1__2__Impl21695);\r\n \t rule__XMemberFeatureCall__Group_1_1_1_2__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop84;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10340:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10341:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10341:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10342:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10343:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10343:2: rule__XMemberFeatureCall__Group_1_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl21082);\r\n rule__XMemberFeatureCall__Group_1_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10182:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10183:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10183:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10184:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10185:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10185:2: rule__XMemberFeatureCall__Group_1_0_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__0_in_rule__XMemberFeatureCall__Group_1_0_0__0__Impl20773);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19776:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19777:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19777:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19778:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19779:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19779:2: rule__XMemberFeatureCall__Group_1_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl39984);\r\n rule__XMemberFeatureCall__Group_1_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8241:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8242:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8242:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8243:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8244:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8244:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl16989);\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10899:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10900:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10900:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10901:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10902:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\r\n loop86:\r\n do {\r\n int alt86=2;\r\n int LA86_0 = input.LA(1);\r\n\r\n if ( (LA86_0==52) ) {\r\n alt86=1;\r\n }\r\n\r\n\r\n switch (alt86) {\r\n \tcase 1 :\r\n \t // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:10902:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl22189);\r\n \t rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop86;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7333:1: ( rule__XMemberFeatureCall__Group_1_1_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7334:2: rule__XMemberFeatureCall__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_0__015149);\n rule__XMemberFeatureCall__Group_1_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19558:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19559:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19559:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19560:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19561:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19561:2: rule__XMemberFeatureCall__Group_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_0__0__Impl39557);\r\n rule__XMemberFeatureCall__Group_1_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19929:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19930:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19930:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19931:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19932:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19932:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl40291);\r\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19805:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19806:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19806:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19807:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19808:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n int alt144=2;\r\n int LA144_0 = input.LA(1);\r\n\r\n if ( (LA144_0==51) ) {\r\n alt144=1;\r\n }\r\n switch (alt144) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:19808:2: rule__XMemberFeatureCall__Group_1_1_1__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1__1__Impl40044);\r\n rule__XMemberFeatureCall__Group_1_1_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7024:1: ( rule__XMemberFeatureCall__Group_1_0_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7025:2: rule__XMemberFeatureCall__Group_1_0_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0__Impl_in_rule__XMemberFeatureCall__Group_1_0_0__014535);\n rule__XMemberFeatureCall__Group_1_0_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7344:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7345:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7345:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7346:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7347:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7347:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl15176);\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6635:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6636:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6636:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6637:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6638:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:6638:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl13735);\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7932:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7933:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7933:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7934:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7935:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:7935:2: rule__XMemberFeatureCall__Group_1_0_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__0_in_rule__XMemberFeatureCall__Group_1_0_0__0__Impl16375);\n rule__XMemberFeatureCall__Group_1_0_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5955:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5956:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5956:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5957:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5958:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5958:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl12185);\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7191:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7193:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7194:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7194:2: rule__XMemberFeatureCall__Group_1_1_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl14869);\n rule__XMemberFeatureCall__Group_1_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7394:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7395:2: rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_0_0__115269);\n rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8647:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8648:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8648:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8649:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8650:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n loop69:\n do {\n int alt69=2;\n int LA69_0 = input.LA(1);\n\n if ( (LA69_0==51) ) {\n alt69=1;\n }\n\n\n switch (alt69) {\n \tcase 1 :\n \t // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8650:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl17789);\n \t rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop69;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
warning : This command will also impact the whole firmware OS env. If printer and pinpad are located in the same firmware OS. Reboot will make loss of session in pinpad.
public void reboot() { writeData(ESC.CMD_CONTROL_REBOOT); }
[ "@Override\n public void reboot() {\n\t setSounderMode(SounderMode.REBOOT_HUB,1);\n\t exitWithFailsafe(EXIT_CODE_REBOOT); // NOSONAR\n }", "public void rebootToRecoveryMode() {\n mPowerManager.reboot(\"recovery\");\n }", "public void rebootToBootloader() {\n mPowerManager.reboot(\"bootloader\");\n }", "void rebootScanner(){\n\t\ttry{\n\t\t\tPowerManager pwrMgr = (PowerManager) getSystemService(Context.POWER_SERVICE);\n\t\t\tpwrMgr.reboot(null);\n\t\t}catch(Exception ex){\n\n\t\t}\n\t}", "public void rebootInstance(Instance instance) {\n\t\tinstance.trace.addEvent(\"command\", \"reboot\");\n\t\tcomputeEngine.doCommand(ComputeEngine.COMMAND.REBOOT,instance);\n\t}", "public void rebooter(View view){\n\n root_tools.execute(\"reboot recovery\");\n\n }", "@TestProperties(name = \"PnP procedure in NMS cold reboot IPV4 With SW Upgrade\", returnParam = {\n\t\t\t\"IsTestWasSuccessful\" }, paramsExclude = { \"IsTestWasSuccessful\" })\n\tpublic void PnPColdRebootIPV4WithSWUpgrade() throws Exception {\n\t\tisWarmReset = false;\n\t\tmainProcedure();\n\t\tpostTest();\n\t}", "@AfterTest\n public void restartApp() {\n driver.resetApp();\n }", "@Override\n public void postBootSetup() {\n }", "public void restartMachine()\n\t{\n\t\t\n\t\tstopMachine();\n\t\tsetupMachine();\n\t\tstartMachine();\n\t}", "public void shutdown( boolean reboot );", "@Test\n\t@TestProperties(name = \"PnP procedure in NMS cold reboot IPV4\", returnParam = {\n\t\t\t\"IsTestWasSuccessful\" }, paramsExclude = { \"IsTestWasSuccessful\" })\n\tpublic void PnPColdRebootIPV4() throws Exception {\n\t\tisWarmReset = false;\n\t\tmainProcedure();\n\t\tpostTest();\n\t}", "int urg_reboot(urg_t urg);", "private void waitForReboot() {\r\n\t\tif(installList.isSelfLoad() || !installList.isRebootWait()) {\r\n\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\tupdateService.logInfo(INSTALLER + \"No need to wait for REBOOT command\");\r\n\t\t\t\tupdateService.logInfo(INSTALLER + \"Self Load - \" + installList.isSelfLoad());\r\n\t\t\t\tupdateService.logInfo(INSTALLER + \"Reboot Wait - \" + installList.isRebootWait());\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(updateService.isRebootReceived()) {\r\n\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\tupdateService.logInfo(INSTALLER + \"Already received reboot command\");\r\n\t\t\t}\r\n\t\t\tString subStepName = \"Reboot command has been received already: \" + updateService.isRebootReceived();\r\n\t\t\tsendSA(subStepName, \"0%\", true, true);\r\n\t\t} else {\r\n\t\t\tsynchronized(updateService.getWaitForReboot()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Waiting for reboot command: Timeout: \" + updateService.getRebootCommandTimeout());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tupdateService.getWaitForReboot().wait(updateService.getRebootCommandTimeout());\r\n\t\t\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Wait time over for reboot command\");\r\n\t\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Reboot command received: \" + updateService.isRebootReceived());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString subStepName = \"Reboot command received: \" + updateService.isRebootReceived();\r\n\t\t\t\t\tsendSA(subStepName, \"0%\", true, true);\r\n\t\t\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\t\t\tupdateService.logInfo(INSTALLER + subStepName);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (InterruptedException ie) {\r\n\t\t\t\t\tUnitManager.Logging.logSevere(INSTALLER + \"Interrupted while waiting for reboot command\", ie);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(updateService.isRebootReceived()) {\r\n\t\t\t// Wait for some more time before doing the reboot\r\n\t\t\t// This is to make sure that all the LRUs receive the reboot command from the host LRU\r\n\t\t\ttry {\r\n\t\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Received the reboot command - Waiting for extra time: \" + updateService.getSleepBeforeReboot());\r\n\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Sleeping right before reboot\");\r\n\t\t\t\t}\r\n\t\t\t\tString subStepName = \"Reboot in: \" + updateService.getSleepBeforeReboot()/1000 + \" seconds\";\r\n\t\t\t\tsendSA(subStepName, \"0%\", true, true);\r\n\t\t\t\tThread.sleep(updateService.getSleepBeforeReboot());\r\n\t\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\t\tupdateService.logInfo(INSTALLER + \"Finished sleeping right before reboot\");\r\n\t\t\t\t}\r\n\t\t\t} catch (InterruptedException ie) {\r\n\t\t\t\tUnitManager.Logging.logSevere(INSTALLER + \"Interrupted while sleeping just before doing the reboot\", ie);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(updateService.isInfo()) {\r\n\t\t\t\tupdateService.logInfo(INSTALLER + \" Not sleeping just before reboot - isRebootReceived: \" + updateService.isRebootReceived());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void resetMachine()\n {\n // openSession().reset();\n vBoxHyper.reconnect();\n openExistingSession();\n vBoxHyper.getConsole().reset();\n\n logger.info(\"reset\");\n\n // closeSession();\n }", "public void run() {\n \t\t\tafterReboot();\n \t\t}", "public void commitFirmware()\n {\n //There are apparently two ways to do this...\n //send(\"W20000840,00000006#W20000844,00000000#W20000848,00000001#W2000084C,00000001#\");\n //Lets stick with these magic numbers for today.\n send(\"#\\r\\nW400E0A04,5A00010B#\");\n }", "void turnOffPads() throws ToyPadException;", "void resetDevice();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the energy forecast for every ERDS connected to the data center.
public List<ErdsForecast> getErdsForecasts() { return erdsForecasts; }
[ "public List<DataCenterForecast> execute(TimeSlotBasedEntity timeRange) {\n \tlogger.debug(\"Starting power planning loop for time range: \" + timeRange);\n \tlogger.debug(\"Requesting energy forecasts...\");\n\t\tList<DataCenterForecast> forecasts = erdsHandler.getEnergyForecasts(timeRange);\n logger.debug(\"Got energy forecasts: \" + forecasts);\n return forecasts;\n }", "public static java.util.List<it.ethica.esf.model.ESFResult> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "private double[][] calculateExafsEnergiesConstantKStep() {\n\t\tdouble lowK = evToK(cEnergy);\n\t\tdouble highK = evToK(finalEnergy);\n\t\tdouble[][] kArray = createStepArray(lowK, highK, exafsStep, exafsTime, true, numberDetectors);\n\t\t// convert from k to energy in each element\n\t\tfor (int i = 0; i < kArray.length; i++)\n\t\t\tkArray[i][0] = kToEv(kArray[i][0]);\n\t\treturn kArray;\n\t}", "public int[][] getEnergy() {\n return this.calculateEnergy();\n }", "private double[][] getEnergy() {\n double[][] map = new double[width()][height()];\n for (int i = 0; i < width(); i++) {\n for (int j = 0; j < height(); j++) {\n int cLeft = sourcePic.getRGB(xLower(i), j);\n int cRight = sourcePic.getRGB(xHigher(i), j);\n int cTop = sourcePic.getRGB(i, yLower(j));\n int cBottom = sourcePic.getRGB(i, yHigher(j));\n map[i][j] = getGradient(cLeft, cRight) + getGradient(cTop, cBottom);\n }\n }\n return map;\n }", "public static java.util.List<it.ethica.esf.model.ESFFieldESFElectronic> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}", "public double getEnergy() {\r\n r12[0] = atoms.get(0).location.x - atoms.get(1).location.x;\r\n r12[1] = atoms.get(0).location.y - atoms.get(1).location.y;\r\n r12[2] = atoms.get(0).location.z - atoms.get(1).location.z;\r\n\r\n r32[0] = atoms.get(2).location.x - atoms.get(1).location.x;\r\n r32[1] = atoms.get(2).location.y - atoms.get(1).location.y;\r\n r32[2] = atoms.get(2).location.z - atoms.get(1).location.z;\r\n\r\n double d12 = Math.sqrt(r12[0] * r12[0] + r12[1] * r12[1] + r12[2] * r12[2]);\r\n double d32 = Math.sqrt(r32[0] * r32[0] + r32[1] * r32[1] + r32[2] * r32[2]);\r\n double cosTheta = (r12[0] * r32[0] + r12[1] * r32[1] + r12[2] * r32[2]) / (d12 * d32);\r\n double theta = Math.acos(cosTheta);\r\n double diff = theta - theta0;\r\n\r\n return (0.5 * forceConstant * diff * diff);\r\n }", "public ArrayList<EngineClass> getAllEngines() {\n ArrayList<EngineClass> engines = new ArrayList<EngineClass>();\n\n String selectQuery = \"select * from \" + TABLE_ENGINE + \" order by \" + TABLE_ENGINE_KEY_EID;\n\n cursor = mRreadableDB.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n EngineClass tmpEngine = new EngineClass();\n tmpEngine.seteId(cursor.getInt(0));\n tmpEngine.seteName(cursor.getString(1));\n tmpEngine.seteDesc(cursor.getString(2));\n tmpEngine.seteLastMaintanceId(cursor.getInt(3));\n engines.add(tmpEngine);\n } while (cursor.moveToNext());\n }\n return engines;\n }", "private void getSevenDaysData() {\n sevenDaysData = new ArrayList<>();\n xLabel = new ArrayList<>();\n int days = 7;\n\n for (int i = 0; i < days; i++) {\n sevenDaysData.add((double) HourlyAllActiveData.get(i).getHrActive());\n xLabel.add(HourlyAllActiveData.get(i).getDate().substring(5));\n }\n }", "public ArrayList<ChannelData> eegDataArray(){\n return _eegDataArray;\n }", "public double getTotalTransverseEnergy()\n {\n double sumEt = 0.;\n for (int i = 0; i < numData; i++)\n {\n sumEt += et[i];\n }\n return sumEt;\n }", "public List<AtdfValue> getElectricalParameterValues() {\r\n ArrayList<AtdfValue> props = new ArrayList<>(8);\r\n\r\n Node propGroupsNode = Utils.filterFirstChildNode(deviceNode_, \"property-groups\", null, null);\r\n Node electricalGroupNode = Utils.filterFirstChildNode(propGroupsNode, \"property-group\", \r\n \"name\", \"ELECTRICAL_CHARACTERISTICS\");\r\n\r\n if(null != electricalGroupNode) {\r\n List<Node> propsList = Utils.filterAllChildNodes(electricalGroupNode, \"property\", null, null);\r\n\r\n for(Node propNode : propsList) {\r\n props.add(new AtdfValue(propNode));\r\n }\r\n }\r\n\r\n return props;\r\n }", "public ArrayList<Double> getTemperatures(ArrayList<FiveDayForecast> fiveDayForecasts) {\n ArrayList<Double> temperatures = new ArrayList<>();\n for(int i = 0; i < fiveDayForecasts.size(); i++) {\n temperatures.add(fiveDayForecasts.get(i).getTemperature());\n }\n return temperatures;\n }", "public List<Daily> getForecastList() {\n if (forecast == null) return null;\n\n List<String> days = new ArrayList<>(forecast.keySet());\n Collections.sort(days);\n List<Daily> list = new ArrayList<>();\n for (String day : days) list.add(forecast.get(day));\n return list;\n }", "private void processERF() {\n\t\tint numSrc = erf.getNumSources();\n\t\tdouble forecastDuration = erf.getTimeSpan().getDuration();\n\t\tfor(int s=0;s<numSrc;s++) {\n\t\t\tint numRups = erf.getNumRuptures(s);\n\t\t\tfor(int r=0; r<numRups;r++) {\n\t\t\t\tProbEqkRupture rup = erf.getRupture(s, r);\n\t\t\t\tprocessRupture(rup, s, r, forecastDuration);\n\t\t\t}\n\t\t}\n\t}", "public double[][] emission() {\r\n\t\tif (E == null) {\r\n\t\t\tE = compute_e();\r\n\t\t}\r\n\t\treturn E;\t}", "public List<EventDay> getEventDays () {\n\t\treturn days;\n\t}", "List<EpicsData> getEpicsData(EpicsType epicsType, int run);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use MessageProto.newBuilder() to construct.
private MessageProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private EmailMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Msg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private Messages(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private MessageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private FruitMessageProto(Builder builder) {\n super(builder);\n }", "private MessageProtocol(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MessageReq(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private SmsMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public interface Message\n extends MessageLite, MessageOrBuilder\n{\n public static interface Builder\n extends MessageLite.Builder, MessageOrBuilder\n {\n\n public abstract Builder addRepeatedField(Descriptors.FieldDescriptor fielddescriptor, Object obj);\n\n public abstract Message build();\n\n public abstract Message buildPartial();\n\n public abstract Descriptors.Descriptor getDescriptorForType();\n\n public abstract Builder mergeFrom(ByteString bytestring, ExtensionRegistryLite extensionregistrylite)\n throws InvalidProtocolBufferException;\n\n public abstract Builder mergeFrom(Message message);\n\n public abstract Builder newBuilderForField(Descriptors.FieldDescriptor fielddescriptor);\n\n public abstract Builder setField(Descriptors.FieldDescriptor fielddescriptor, Object obj);\n\n public abstract Builder setUnknownFields(UnknownFieldSet unknownfieldset);\n }\n\n\n public abstract Parser getParserForType();\n\n public abstract Builder newBuilderForType();\n\n public abstract Builder toBuilder();\n}", "private CSChatMessageRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private MsgEmail(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public static MessageBuilder fromMessage(Message message) {\n MessageBuilder builder = new MessageBuilder();\n\n return builder.copy(message);\n }", "private BaseMessage(com.google.protobuf.GeneratedMessage.Builder builder) {\n super(builder);\n }", "public static final MessageBuilder newInstance() {\n return newInstance(DefaultMessage.class);\n }", "private MessageWrapper(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SendChatMessageReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private BaseMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enter a new lot into the auction. Returns false if the auction is not open or if the description is null. The condition "this.isAuctionClosed()" checks if the auction is closed. If the auction is open, a new lot is added with the proper description and nextLotNumber is incremented
public boolean enterLot(String description) { if ((this.isAuctionClosed ()) || description==null) { return false ; } lots.add(new Lot(nextLotNumber, description)); nextLotNumber++; return true ; }
[ "public void enterLot(String description)\n {\n lots.add(new Lot(nextLotNumber, description));\n nextLotNumber++;\n }", "public org.hl7.fhir.String addNewLotNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().add_element_user(LOTNUMBER$20);\n return target;\n }\n }", "private boolean isLotBooked(MyDatabase myDatabase,int lot) {\n return myDatabase.isLotAlreadyTaken(lot) != null;\n }", "private static ParsedTenderLot createNewLot(final ParsedTenderLot oldLot,\n final List<ParsedTenderLot> lots,\n final String bidsCountOfAllLots) {\n if (oldLot != null) {\n if (oldLot.getBidsCount() == null) {\n oldLot.setBidsCount(bidsCountOfAllLots);\n }\n lots.add(oldLot);\n }\n return new ParsedTenderLot();\n }", "public boolean close()\n\n {\n if (!(isAuctionClosed ())) {\n System.out.println ( \"\") ;\n\n for ( Lot lot:lots) {\n\n System.out.println ( \"The lot number : \" + lot.getNumber() + \".\") ;\n System.out.println ( \" The description of the lot : \" + lot.getDescription () + \".\") ;\n if ( lot.getHighestBid() !=null) {\n System.out.println ( \" Bid value is \" + lot.getHighestBid().getValue() + \".\") ;\n System.out.println ( \" The bidder is \" + lot.getHighestBid().getBidder().getName() + \".\" );\n }\n else {\n System.out.println ( \"The lot number : \" + lot.getNumber() + \" has not been sold.\") ;\n }\n }\n closedAuction = true ;\n return true ;\n } \n else {\n closedAuction=true;\n return false ;\n }\n\n }", "public void setLotNumber(Integer lotNumber) {\n this.lotNumber = lotNumber;\n }", "public void setLotnum(int lotnum) {\n this.lotnum = lotnum;\n }", "public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }", "public Auction()\n {\n lots = new ArrayList<Lot>();\n nextLotNumber = 1;\n closedAuction= false ;\n }", "public void createParkingLot(int no_slots);", "static ParsedTenderLot parseLotWithWinningBid(final Element lotSection, final int lotPosition) {\n return new ParsedTenderLot().setPositionOnPage(Integer.toString(lotPosition))\n .setContractNumber(VestnikTenderParserUtils.getFieldValue(lotSection,\n \"AttModels.*AttItems\\\\.EvidencniCisloCastiZakazkyPrideleneZadavatelem_IV\"))\n .setTitle(VestnikTenderParserUtils.getFieldValue(lotSection,\n \"AttModels.*AttItems\\\\.NazevZakazkyZadaneNaZakladeRamcoveSmlouvy_IV\"))\n .setAwardDecisionDate(VestnikTenderParserUtils.getFieldValue(lotSection,\n \"AttModels.*AttItems\\\\.DatumZadaniZakazky_IV\"))\n .setBidsCount(VestnikTenderParserUtils.getFieldValue(lotSection,\n \"AttModels.*AttItems\\\\.PocetObdrzenychNabidek_IV\"))\n .addBid(new ParsedBid().setIsWinning(Boolean.TRUE.toString())\n .addBidder(VestnikTenderParserUtils.parseBody(lotSection))\n .setPrice(new ParsedPrice().setCurrency(\"CZK\")\n .setNetAmount(VestnikTenderParserUtils.getFieldValue(lotSection,\n \"AttModels.*AttItems.KonecnaHodnotaZakazky_IV\"))));\n }", "private void createAuction(Seller seller) {\n // get item description\n System.out.println(\"Please enter the item description for your auction\");\n String itemDesc = scanner.nextLine();\n\n // get start price\n System.out.println(\"Please enter the start price for your auction\");\n double startPrice = scanner.nextDouble();\n\n // get reserve price\n System.out.println(\"Please enter the reserve price for your auction\");\n double reservePrice = scanner.nextDouble();\n\n scanner.nextLine();\n\n LocalDateTime closing = LocalDateTime.now();\n boolean validDate = false;\n\n // loop until the seller enters a valid closing date\n while (!validDate) {\n System.out.println(\"Please enter the close date for your auction in the format of yyyy-MM-dd HH:mm\");\n String closeDate = scanner.nextLine();\n\n if (!(closeDate.contains(\"-\") && closeDate.contains(\":\") & closeDate.length() <= 16)) {\n // invalid!\n System.out.println(\"Sorry that cloe date isn't valid, please try again\");\n continue;\n }\n // valid format!\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n\n closing = LocalDateTime.parse(closeDate, formatter);\n // check if date is valid\n if (closing.isBefore(LocalDateTime.now())) {\n // invalid!\n System.out.println(\"Sorry you have entered a past date, please try again\");\n continue;\n }\n // the date is valid\n validDate = true;\n }\n\n // create the auction and add it to the list of auctions on the system\n Auction auction = new Auction(startPrice, reservePrice, closing, Status.PENDING, new Item(itemDesc), seller);\n auctions.add(auction);\n\n System.out.println(\"Auction created, The auction is now in a pending state and must first be verified\");\n }", "public Auction ( Auction auction) {\n\n if (auction.isAuctionClosed ()) {\n lots= auction.getNoBids();\n nextLotNumber = 1 ;\n\n }\n else {\n\n lots = new ArrayList<Lot>();\n nextLotNumber = 1;\n\n }\n closedAuction=false ;\n }", "public void createNewPart() {\n if (inhouseRadioButton.isSelected()) {\n Part newPart = new InHouse(Part.getNextPartId(), \n partNameTextField.getText(), \n Double.parseDouble(partPriceTextField.getText()), \n Integer.parseInt(partInvTextField.getText()), \n Integer.parseInt(partMinTextField.getText()), \n Integer.parseInt(partMaxTextField.getText()), \n Integer.parseInt(partMachineIdTextField.getText()));\n \n addPart(newPart);\n }\n else if (outsourcedRadioButton.isSelected()) {\n Part newPart = new Outsourced(Part.getNextPartId(), \n partNameTextField.getText(), \n Double.parseDouble(partPriceTextField.getText()), \n Integer.parseInt(partInvTextField.getText()), \n Integer.parseInt(partMinTextField.getText()), \n Integer.parseInt(partMaxTextField.getText()), \n partCompanyNameTextField.getText());\n \n addPart(newPart);\n }\n }", "public boolean addBid(Bid newBid){\r\n\t\t\r\n\t\tif(isBeingAuctioned&&(newBid.getAmount()>curBidPrice)){ \t\t\t\t\t\t//Bid must be greater than the starting $0\r\n\t\t\t\r\n\t\t\t\tbidHistory.add(newBid);\r\n\t\t\t\tlastBid=newBid;\r\n\t\t\t\tcurBidPrice=newBid.getAmount();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public boolean bookLot() {\r\n\t\tboolean bookUpdateSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and updating data (executeUpdateParklot())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection bookLotConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tupdate the data in table\r\n\t\t\t*/\r\n\t\t\tbookUpdateSuccess = bookLotConn.executeUpdateParklot(lotNo, 1);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn bookUpdateSuccess;\r\n\t}", "public Lot getLot(int lotNumber)\n {\n\n if ( (lotNumber>=1) && (lotNumber < nextLotNumber)) {\n for (Lot lot :lots) {\n if ((lot.getNumber())==lotNumber) {\n\n return lot;\n\n }\n\n }\n }\n\n return null; \n }", "public void newBid(String bidderName, double bidAmt)\n throws ClosedAuctionException {\n if(timeRemaining == 0) throw new ClosedAuctionException();\n if(bidAmt > currentBid) {\n currentBid = bidAmt;\n buyerName = bidderName;\n }\n }", "public void makeABid(int lotNumber, Person bidder, long value)\n {\n Lot selectedLot = getLot(lotNumber);\n if(selectedLot != null) {\n Bid bid = new Bid(bidder, value);\n boolean successful = selectedLot.bidFor(bid);\n if(successful) {\n System.out.println(\"The bid for lot number \" +\n lotNumber + \" was successful.\");\n }\n else {\n // Report which bid is higher.\n Bid highestBid = selectedLot.getHighestBid();\n System.out.println(\"Lot number: \" + lotNumber +\n \" already has a bid of: \" +\n highestBid.getValue());\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field167' field has been set
public boolean hasField167() { return fieldSetFlags()[167]; }
[ "public boolean hasField141() {\n return fieldSetFlags()[141];\n }", "public boolean hasField121() {\n return fieldSetFlags()[121];\n }", "public boolean hasField138() {\n return fieldSetFlags()[138];\n }", "public boolean hasField131() {\n return fieldSetFlags()[131];\n }", "public boolean hasField431() {\n return fieldSetFlags()[431];\n }", "public boolean hasField1015() {\n return fieldSetFlags()[1015];\n }", "public boolean hasField113() {\n return fieldSetFlags()[113];\n }", "public boolean hasField137() {\n return fieldSetFlags()[137];\n }", "public boolean hasField146() {\n return fieldSetFlags()[146];\n }", "public boolean hasField114() {\n return fieldSetFlags()[114];\n }", "public boolean hasField151() {\n return fieldSetFlags()[151];\n }", "public boolean hasField117() {\n return fieldSetFlags()[117];\n }", "public boolean hasField134() {\n return fieldSetFlags()[134];\n }", "public boolean hasField713() {\n return fieldSetFlags()[713];\n }", "public boolean hasField171() {\n return fieldSetFlags()[171];\n }", "public boolean hasField943() {\n return fieldSetFlags()[943];\n }", "public boolean hasField145() {\n return fieldSetFlags()[145];\n }", "public boolean hasField130() {\n return fieldSetFlags()[130];\n }", "public boolean hasField841() {\n return fieldSetFlags()[841];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the specified firewall rule group.
java.util.concurrent.Future<GetFirewallRuleGroupResult> getFirewallRuleGroupAsync(GetFirewallRuleGroupRequest getFirewallRuleGroupRequest, com.amazonaws.handlers.AsyncHandler<GetFirewallRuleGroupRequest, GetFirewallRuleGroupResult> asyncHandler);
[ "java.util.concurrent.Future<GetFirewallRuleGroupResult> getFirewallRuleGroupAsync(GetFirewallRuleGroupRequest getFirewallRuleGroupRequest);", "public String getRuleGroup() {\n return ruleGroup;\n }", "public String getFirewallRuleGroupId() {\n return this.firewallRuleGroupId;\n }", "IpFirewallRuleInfo get(String resourceGroupName, String workspaceName, String ruleName);", "java.util.concurrent.Future<GetFirewallRuleGroupPolicyResult> getFirewallRuleGroupPolicyAsync(\n GetFirewallRuleGroupPolicyRequest getFirewallRuleGroupPolicyRequest);", "@ServiceMethod(returns = ReturnType.SINGLE)\n FirewallRuleInner get(String resourceGroupName, String accountName, String firewallRuleName);", "@JsonIgnore\n @Transient\n public RuleVersion getGroupRule() {\n return groupRule;\n }", "java.util.concurrent.Future<GetFirewallRuleGroupAssociationResult> getFirewallRuleGroupAssociationAsync(\n GetFirewallRuleGroupAssociationRequest getFirewallRuleGroupAssociationRequest);", "public void setRuleGroup(String ruleGroup) {\n this.ruleGroup = ruleGroup;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n AzureFirewallInner getByResourceGroup(String resourceGroupName, String azureFirewallName);", "public ZWaveAssociationGroup getAssociationGroup(int group) {\n return associationGroups.get(group);\n }", "public final void rule__GetAttribute__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16829:1: ( ( RULE_END ) )\n // InternalAADMParser.g:16830:1: ( RULE_END )\n {\n // InternalAADMParser.g:16830:1: ( RULE_END )\n // InternalAADMParser.g:16831:2: RULE_END\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGetAttributeAccess().getENDTerminalRuleCall_3()); \n }\n match(input,RULE_END,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGetAttributeAccess().getENDTerminalRuleCall_3()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "java.util.concurrent.Future<ListRuleGroupsResult> listRuleGroupsAsync(ListRuleGroupsRequest listRuleGroupsRequest);", "@JsonIgnore\n @Transient\n RuleVersion doGetGroupRule(Evaluator evaluator) {\n if (getGroupRule() == null && evaluator != null) {\n groupRule = evaluator.getRuleVersion(getConstantValue());\n }\n return getGroupRule();\n }", "com.google.ads.googleads.v6.resources.AdGroup getAdGroup();", "TrustGroupRegistrationApiModel getGroup(String groupId);", "com.google.ads.googleads.v1.resources.AdGroup getAdGroup();", "private int getRuleGroup(IConfigurationElement element) {\n \t\tIConfigurationElement[] runChildren = element.getChildren(TAG_RUN_CLASS);\n \t\t// Don't need to check if runChildren is null or empty, because that was checked in the\n \t\t// initializeValidator method.\n \n \t\tString pass = runChildren[0].getAttribute(ATT_RULE_GROUP);\n \t\tif (pass == null) {\n \t\t\treturn RegistryConstants.ATT_RULE_GROUP_DEFAULT;\n \t\t}\n \n \t\tfinal String COMMA = \",\"; //$NON-NLS-1$\n \t\tStringTokenizer tokenizer = new StringTokenizer(pass, COMMA, false); // false means don't\n \t\t// return the comma as\n \t\t// part of the string\n \t\tint result = 0; // no passes identified\n \t\twhile (tokenizer.hasMoreTokens()) {\n \t\t\tString nextAction = tokenizer.nextToken().trim();\n \t\t\tif (nextAction.equals(IRuleGroup.PASS_FAST_NAME)) {\n \t\t\t\tresult = result | IRuleGroup.PASS_FAST;\n \t\t\t} else if (nextAction.equals(IRuleGroup.PASS_FULL_NAME)) {\n \t\t\t\tresult = result | IRuleGroup.PASS_FULL;\n \t\t\t}\n \t\t}\n \n \t\tif (result == 0) {\n \t\t\t// No recognized passes. Return the default.\n \t\t\treturn RegistryConstants.ATT_RULE_GROUP_DEFAULT;\n \t\t}\n \n \t\treturn result;\n \t}", "RuleConfigurationDto getGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a string representing the direct update URL of the default output.
public String getDefaultUpdateUrl() { return srvAbsURL(myServletDescr(), "format=" + OUTPUT_DEFAULT.name()); }
[ "public String getUpdateUrl() {\n return updateUrl;\n }", "String getUpdateSiteBaseURL();", "public URL buildUpdateUrl(final String core) throws MalformedURLException, UnsupportedEncodingException {\n\t\t\n\t\tfinal StringBuilder sb = new StringBuilder(url.toString()).append(\"/\").append(core).append(\"/update\");\n\t\t//if (commit) sb.append(\"?commit=true&optimize=true\");\n\t\t//if (commit) sb.append(\"?commit=true\");\n\t\treturn new URL(sb.toString());\n\t\t\n\t}", "public abstract String getOutputUrl();", "public String urlFromValues() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tif (ssl) {\n\t\t\tsb.append(\"https://\");\n\t\t} else {\n\t\t\tsb.append(\"http://\");\n\t\t}\n\n\t\tsb.append(host);\n\t\tif (!port.isEmpty()) {\n\t\t\tsb.append(\":\");\n\t\t\tsb.append(port);\n\t\t}\n\n\t\tsb.append(\"/\");\n\t\tsb.append(requestRoot);\n\t\tsb.append(\"/\");\n\n\t\tif (!verb.isEmpty()) {\n\t\t\tsb.append(verb);\n\t\t\tsb.append(\"/\");\n\t\t}\n\t\tsb.append(studyId);\n\t\treturn sb.toString();\n\t}", "private String getOutputUrl() {\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n if (sharedPref.getBoolean(\"checkbox_twitch\", false)) {\n String twitchStreamkey = sharedPref.getString(\"twitch_stream_key\", \"\");\n if (twitchStreamkey.isEmpty()) {\n return null;\n } else {\n return BASE_TWITCH_URL + twitchStreamkey;\n }\n } else if (sharedPref.getBoolean(\"checkbox_youtube\", false)) {\n String youtubeStreamKey = sharedPref.getString(\"youtube_stream_key\", \"\");\n if (youtubeStreamKey.isEmpty()) {\n return null;\n } else {\n return BASE_YOUTUBE_URL + youtubeStreamKey;\n }\n } else if (sharedPref.getBoolean(\"checkbox_sdcard\", true)) {\n String folderLocation = sharedPref.getString(\"sdcard_folder\", \"\");\n if (folderLocation.isEmpty()) {\n return null;\n } else {\n return folderLocation;\n }\n }\n return null;\n }", "java.lang.String getPatchUrl();", "public String getOpendapUrl(Entry entry) {\n return getOpendapPrefix(entry) + getOpendapSuffix(entry);\n }", "public String getUriStringWithUpdatedPreferences() {\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\n String pageSize = sharedPrefs.getString(\n getString(R.string.settings_page_size_key),\n getString(R.string.settings_page_size_default));\n\n String orderBy = sharedPrefs.getString(\n getString(R.string.settings_order_by_key),\n getString(R.string.settings_order_by_default)\n );\n Uri baseUri = Uri.parse(GUARDIAN_REQUEST_URL);\n Uri.Builder uriBuilder = baseUri.buildUpon();\n\n uriBuilder.appendQueryParameter(\"q\", \"solar\");\n uriBuilder.appendQueryParameter(\"page-size\", pageSize);\n uriBuilder.appendQueryParameter(\"order-by\", orderBy);\n uriBuilder.appendQueryParameter(\"api-key\", \"test\");\n\n return uriBuilder.toString();\n }", "protected String overwriteSwaggerDefaultUrl(String html) {\n\t\treturn html.replace(Constants.SWAGGER_UI_DEFAULT_URL, StringUtils.EMPTY);\n\t}", "public String getURLUpdateEvent(Event event){\n String url = String.format(getPath() + \"users('%s')/events/%s\", location.getDisplayName(), event.getId());\n logger.info(\"Getting URL update event : \"+ url );\n return url;\n }", "public String getHowToURLString() {\n return \"https://jdnc.dev.java.net/documentation/index.html\";\n }", "protected abstract String urlPostfix();", "public String getDefaultLink() {\n return (toAdDefaultLink);\n }", "public String getFullUrl() {\n return host + (port < 0 ? \"\" : \":\" + port);\n }", "public String getSynchronisationURL() {\n \t\tString url = ui.getText(getSyncUrlField());\n \t\treturn (url.length() == 0 || url == null)?\"\" : url;\n \t}", "public String getFullURL() {\r\n\t\tString scheme = req.getScheme();\r\n\t\tString serverName = req.getServerName();\r\n\t\tint serverPort = req.getServerPort();\r\n\t\tString contextPath = req.getContextPath();\r\n\t\tStringBuffer url = new StringBuffer();\r\n\t\turl.append(scheme).append(\"://\").append(serverName);\r\n\r\n\t\tif ((serverPort != 80) && (serverPort != 443)) {\r\n\t\t\turl.append(\":\").append(serverPort);\r\n\t\t}\r\n\t\turl.append(contextPath);\r\n\t\turl.append(\"/\");\r\n\t\treturn url.toString();\r\n\t}", "public String getURL(){\n String pspPackage = getPSPPackage();\n boolean hasPackage = (pspPackage.length () > 0);\n\n return protocol + \"://\" + getHost() +\":\"+ Integer.toString(getPort())\n +\"/$\"+ getClusterName() +\n ((hasPackage) ? (\"/\"+ pspPackage) : \"\") +\"/\"+ getPSPID();\n }", "String urlTemplate();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates an Arraylist of valid assigned employee index
private ArrayList<Index> generateValidEmployeeIndices() { ArrayList<Index> indices = new ArrayList<Index>(); indices.add(INDEX_FIRST_PERSON); indices.add(INDEX_SECOND_PERSON); return indices; }
[ "@Override\n\tpublic List<Integer> getAllEmployeeIds() {\n\t\treturn new ArrayList<Integer>(employees.keySet());\n\t}", "private static ArrayList<Integer> createCourseSearchValuesArrayList(){\n ArrayList<Integer> courseSearchValues = new ArrayList<>();\n for(int i=0;i<MAX_SEARCH_VAL_ANNUAL;i++){\n if(!getCourseNameAnnual(i).equals(\"Course unknown\")){\n courseSearchValues.add(i);\n }\n }\n return courseSearchValues;\n }", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "SmartList<Integer> getIndicesList();", "protected int[] GetEmployeeForLunch () {\n\t\t//This method will return an integer array with the sole purpose of being\n\t\t// able to return 2 values, both an employee type and an employee Id, so that the model\n\t\t// is respected. This int[] is the java implementation for creating a procedure that returns two values\n\t\t// **Note -- this reflects the behaviour in the model as described by: \n\t\t//\t<etypeId, empId> ← UDP.GetEmployeeForLunch()\n\t\t\n\t\tint[] empIdentifers = new int[2] ; \n\t\t\n\t\tfor (int i = 0; i < 2; i++) {\t\t\t\n\t\t\tfor (int j = 0; j < model.rEmployees[i].length; j++) {\n//\t\t\t\tSystem.out.println(\"/****LUNCH_CHECK****\\n\\t \"+i+\" \" +j+ \" \"+model.rEmployees[i][j].status);\n\t\t\t\tif( model.rEmployees[i][j].status == Employee.StatusValues.READY_FOR_CALL &&\n\t\t\t\t\t\tmodel.rEmployees[i][j].lunchTaken == false ){\n\t\t\t\t\t\tempIdentifers[0] = i ;\n\t\t\t\t\t\tempIdentifers[1] = j ; \n//\t\t\t\t\t\tSystem.out.println(\"Assigned empoyee \"+i+\" \" +j+ \" \");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn empIdentifers;\n\t}", "private int searchEmployeeIndex(Long idEmployee) {\n int index = 0;\n for (int i = 0; i < this.getEmployeeIndexes().length; i++) {\n if (idEmployee == this.getEmployeeIndexes(i)) {\n index = i;\n break;\n }\n }\n return index;\n }", "int getEventIdList(int index);", "java.util.List<java.lang.Integer> getOutputIndexList();", "long getHumanIdList(int index);", "private Employee[] getEmployees() {\n\t\tfor(int i =0;i<getEmployeeIndex();i++) {\n\t\t\tSystem.out.println(\"Employee #\"+(i+1));\n\t\t\tSystem.out.println(employees[i].toString());\n\t\t}\n\t\treturn employees;\n\t}", "public List<Integer> getCustIndices(){\n\t\tList<Integer> custInd = new ArrayList<Integer>();\n\t\tListIterator<String> it = custNames.listIterator();\n\t\tint i = 0;\n\t\twhile(it.hasNext()){\n\t\t\tcustInd.add(i);\n\t\t\ti++;\n\t\t}\n\t\treturn custInd;\n\t}", "long getStudentidList(int index);", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "@Test\n public void validRangeGenerateListTest()\n {\n List<Integer> listOfPrime = primeNumber.generate(7900, 7920);\n assertTrue(listOfPrime.contains(7901));\n assertTrue(listOfPrime.contains(7907));\n assertTrue(listOfPrime.contains(7919));\n }", "ImmutableList<CostIndex> getCostIndexes();", "int getAllowedAppIds(int index);", "private int getIndex(ArrayList<Employee> list, Employee e) {\n if(list == null) {\n System.out.println(\"list is null\");\n }\n for(int i = 0; i< list.size(); i++) {\n if(list.get(i) != null) {\n if (e.getEmpid() == list.get(i).getEmpid()) {\n return i;\n }\n }\n }\n return -1;\n }", "List<Integer> getEmptyCellIds();", "public void setEmployees(int _employees){\n employees = _employees;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface to all datasource factory implementations.
public interface DataSourceFactory { DataSourceDefinition createDataSourceDefinition(CreateDataSourceDefinitionRequest sourceDefinitionRequest); DataFieldDefinition createDataFieldDefinition(CreateDataFieldDefinitionRequest fieldDefinitionRequest); DataSourceDefinitionParser createDataSourceDefinitionParser(ImportSourceType importSourceType); }
[ "public DataSourceFactory() {}", "public interface IDatasource {\n /**\n * Get name for this datasource\n * \n * @return name\n */\n String getName();\n\n /**\n * Get a graph containing the description of the datasources capabilities\n * \n * @return the capabilities graph\n */\n INamedGraph getCapabilities();\n\n /**\n * Return true if the capabilities graph provided by getCapabilities can be used to instantiate this datasource in the registry.\n * \n * @return true if the capabilities graph provided by getCapabilities can be used to instantiate this datasource in the registry.\n */\n boolean isSelfDescribing();\n\n /**\n * Get datasource's Instance URI\n * \n * @return URI of datasource\n */\n URI getInstanceURI();\n\n /**\n * Returns true if this datasource is the primary datasource as defined in the configuration.\n * \n * @return true if this datasource is the primary datasource as defined in the configuration.\n */\n boolean isPrimary();\n\n /**\n * Get the datasource's model service\n * \n * @return the datasource's model service\n * \n */\n IModelService getModelService();\n\n /**\n * Get the datasource's update service\n * \n * @return the datasource's update service\n * \n */\n IUpdateService getUpdateService();\n\n /**\n * Get the datasource's replication service\n * \n * @return the datasource's replication service\n * \n */\n IReplicationService getReplicationService();\n\n /**\n * Get the datasource's query service\n * \n * @return the datasource's query service\n * \n */\n IQueryService getQueryService();\n\n /**\n * Get the datasource's index service\n * \n * @return the datasource's index service\n * \n */\n IIndexService getIndexService();\n\n /**\n * Get the datasource's reset service\n * \n * @return the datasource's reset service\n * \n */\n IResetService getResetService();\n\n /**\n * Get the IServerQuadStoreProvider for the datasource\n * \n * @return IServerQuadStoreProvider for the datasource\n */\n IServerQuadStoreProvider getServerQuadStoreProvider();\n\n /**\n * Get the datasource's implementation of a service for the given interface\n * \n * @param <ServiceType>\n * Type of service to retreieve\n * @param clazz\n * class type\n * @return Instance of the service requested\n */\n <ServiceType> ServiceType getService(Class<ServiceType> clazz);\n\n /**\n * Get the datasource's authorization service\n * \n * @return the datasource's authorization service\n * \n */\n IAuthorizationService getAuthorizationService();\n\n /**\n * Register a datasource listener\n * \n * @param listener\n * listener to register\n */\n void registerDatasourceListener(IDatasourceListener listener);\n\n /**\n * Unregister a datasource listener\n * \n * @param listener\n * listener to unregister\n */\n void unregisterDatasourceListener(IDatasourceListener listener);\n\n /**\n * Get the lock provider for the datasource\n * \n * @return the lock provider for the datasource\n */\n abstract public ReentrantReadWriteLock getLockProvider();\n\n /**\n * Execute a special command against the datasource\n * \n * @param command\n * @param request\n * @param response\n * @throws AnzoException\n */\n abstract public void executeCommand(String command, IDataset request, IDataset response) throws AnzoException;\n}", "public interface DataSourceFactorySpi extends Factory {\r\n /**\r\n * Construct a live data source using the params specifed. The returned DataSource may be pooled.\r\n\r\n * @param params The full set of information needed to construct a live\r\n * DataSource. \r\n *\r\n * @return The created DataSource, this may be null if the required resource\r\n * was not found or if insufficent parameters were given. Note\r\n * that canProcess() should have returned false if the problem is\r\n * to do with insuficent parameters.\r\n *\r\n * @throws IOException if there were any problems setting up (creating or\r\n * connecting) the datasource.\r\n */\r\n DataSource createDataSource(Map params) throws IOException;\r\n\r\n /**\r\n * Same as {@link #createDataSource(Map)}, but forces the creation of a new DataSource\r\n * @param params\r\n * @return\r\n * @throws IOException\r\n */\r\n DataSource createNewDataSource(Map params) throws IOException;\r\n\r\n /**\r\n * Name suitable for display to end user.\r\n *\r\n * <p>\r\n * A non localized display name for this data source type.\r\n * </p>\r\n *\r\n * @return A short name suitable for display in a user interface.\r\n */\r\n String getDisplayName();\r\n\r\n /**\r\n * Describe the nature of the data source constructed by this factory.\r\n *\r\n * <p>\r\n * A non localized description of this data store type.\r\n * </p>\r\n *\r\n * @return A human readable description that is suitable for inclusion in a\r\n * list of available datasources.\r\n */\r\n String getDescription();\r\n\r\n /**\r\n * MetaData about the required Parameters (for {@link #createDataSource(Map)}).\r\n * @return Param array describing the Map for createDataStore\r\n */\r\n Param[] getParametersInfo();\r\n\r\n /**\r\n * Test to see if this factory is suitable for processing the data pointed\r\n * to by the params map.\r\n *\r\n * <p>\r\n * If this data source requires a number of parameters then this mehtod\r\n * should check that they are all present and that they are all valid. \r\n * </p>\r\n *\r\n * @param params The full set of information needed to construct a live\r\n * data source.\r\n *\r\n * @return booean true if and only if this factory can process the resource\r\n * indicated by the param set and all the required params are\r\n * pressent.\r\n */\r\n boolean canProcess(Map params);\r\n\r\n /**\r\n * Test to see if this data source is available, if it has all the\r\n * appropriate libraries to construct a datastore. \r\n *\r\n * @return <tt>true</tt> if and only if this factory has all the\r\n * appropriate jars on the classpath to create DataSource.\r\n */\r\n boolean isAvailable();\r\n}", "public interface DataSourceProviderInterface {\n\n /**\n * Returns a named javax.sql.DataSource\n *\n * @param datasourceName\n * @return javax.sql.DataSource\n */\n DataSource getNamedDataSource( String datasourceName ) throws DataSourceNamingException;\n\n /**\n * Returns the named data source of respecting its <code>type</code>\n *\n * @param datasourceName name of the desired data source\n * @param type data source's type\n * @return named data source\n * @throws DataSourceNamingException\n */\n DataSource getNamedDataSource( String datasourceName, DatasourceType type ) throws DataSourceNamingException;\n\n /**\n * Returns the specified data source of respecting its <code>type</code>\n *\n * @param dbMeta definition of the datasource provided via DatabaseMeta\n * @param type data source's type\n * @return named data source\n * @throws DataSourceNamingException\n */\n default DataSource getPooledDataSourceFromMeta( DatabaseMeta dbMeta, DatasourceType type ) throws DataSourceNamingException {\n throw new UnsupportedOperationException( \"getNamedDataSourceFromMeta is not supported\" );\n }\n\n /**\n * Invalidate the named data source of respecting its <code>type</code>\n *\n * @param datasourceName name of the desired data source\n * @param type data source's type\n * @return named data source\n * @throws DataSourceNamingException\n */\n default DataSource invalidateNamedDataSource( String datasourceName, DatasourceType type ) throws DataSourceNamingException {\n throw new UnsupportedOperationException( \"The invalidateNamedDataSource method was not implemented yet.\" );\n }\n\n enum DatasourceType {\n JNDI, POOLED\n }\n}", "public DataSourceFactory getDataSourceFactory() {\n return database;\n }", "@Override\n public IDataSourceFactory getDataSourceFactory() {\n if (this.dataSourceFactory == null) {\n this.dataSourceFactory = getObjectFactory().getNamedObject(\"dataSourceFactory\", IDataSourceFactory.class);\n if (this.dataSourceFactory == null) {\n log.debug(\"Falling back to non application context based instantiation.\");\n this.dataSourceFactory = getObjectFactory().instantiate(DataSourceFactory.class);\n }\n }\n return this.dataSourceFactory;\n }", "public interface IqDataSourceFactory {\r\n /**\r\n * Indicates if this IqDataSourceFactory can work w/ the given driver.\r\n */\r\n boolean isDriverAccepted(Class<? extends Driver> driverClass);\r\n\r\n /**\r\n * Creates a JDBC DataSource from the given parameters.\r\n */\r\n DataSource createDataSource(DbEnvironment env, Credential credential, String schema, int numThreads);\r\n\r\n boolean isIqClientLoadSupported();\r\n}", "private DataSource.Factory buildDataSourceFactory() {\n return ((MyApplication) getApplication()).buildDataSourceFactory();\n }", "private DataSource.Factory buildDataSourceFactory() {\n return ((DemoApplication) getApplication()).buildDataSourceFactory();\n }", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "public void setDataSourceFactory(Factory<DataSource> dataSourceFactory) {\n this.dataSourceFactory = dataSourceFactory;\n }", "public DataSource() {\n\t\tthis(\"basic_DS\");\n\t}", "@Bean(name = \"dataSource\", destroyMethod = \"close\")\n\tpublic BasicDataSource dataSource() {\n\t\tBasicDataSource dataSource = new BasicDataSource();\n\t\tPropertiesWrapper databaseProperties = config.getDatabaseProperties();\n\t\tDatabase database = Database.getDatabase(databaseProperties.getProperty(\"database\", \"H2\",\n\t\t\t\t\"[FATAL] Database type is not sepecfied. In default, use H2.\"));\n\t\tdatabase.setup(dataSource, databaseProperties);\n\t\treturn dataSource;\n\t}", "public DataSource createImpl()\n {\n if (_impl == null)\n {\n // create a param defining the datasource\n \n \tJdbcDataSourceParam dsParam = new JdbcDataSourceParam(getName(),\n getJdbcDriver(), getJdbcUrl() , //getJdbcCatalog(),\n getJdbcUser(), getJdbcPassword());//+ \":\" + getJdbcCatalog()\n\n // get/create the datasource\n _impl = DataManager.getDataSource(dsParam);\n\n // get the entities, create and add them\n Vector v = getEntities();\n for (int i = 0; i < v.size(); i++)\n {\n EntityDobj ed = (EntityDobj) v.get(i);\n _impl.addEntity(ed.createImpl());\n }\n\n // get the joins, create and add them\n v = getJoins();\n for (int i = 0; i < v.size(); i++)\n {\n JoinDobj jd = (JoinDobj) v.get(i);\n _impl.addJoin(jd.createImpl());\n }\n }\n\n return _impl;\n }", "@Override\n public Set<Datasource> getDatasources() throws ConfigurationException {\n Context context = getContext();\n Set<Datasource> result = new HashSet<>();\n int length = context.getResource().length;\n if (tomcatVersion.isAtLeast(TomcatVersion.TOMCAT_55)) {\n // Tomcat 5.5.x or Tomcat 6.0.x\n for (int i = 0; i < length; i++) {\n String type = context.getResourceType(i);\n if (\"javax.sql.DataSource\".equals(type)) { // NOI18N\n String name = context.getResourceName(i);\n String username = context.getResourceUsername(i);\n String url = context.getResourceUrl(i);\n String password = context.getResourcePassword(i);\n String driverClassName = context.getResourceDriverClassName(i);\n if (name != null && username != null && url != null && driverClassName != null) {\n // return the datasource only if all the needed params are non-null except the password param\n result.add(new TomcatDatasource(username, url, password, name, driverClassName));\n }\n }\n }\n if (tomeeVersion != null) {\n TomeeResources actualResources = getResources(false);\n if (actualResources != null) {\n result.addAll(getTomeeDatasources(actualResources));\n }\n }\n } else {\n // Tomcat 5.0.x\n ResourceParams[] resourceParams = context.getResourceParams();\n for (int i = 0; i < length; i++) {\n String type = context.getResourceType(i);\n if (\"javax.sql.DataSource\".equals(type)) { // NOI18N\n String name = context.getResourceName(i);\n // find the resource params for the selected resource\n for (int j = 0; j < resourceParams.length; j++) {\n if (name.equals(resourceParams[j].getName())) {\n Parameter[] params = resourceParams[j].getParameter();\n HashMap paramNameValueMap = new HashMap(params.length);\n for (Parameter parameter : params) {\n paramNameValueMap.put(parameter.getName(), parameter.getValue());\n }\n String username = (String) paramNameValueMap.get(\"username\"); // NOI18N\n String url = (String) paramNameValueMap.get(\"url\"); // NOI18N\n String password = (String) paramNameValueMap.get(\"password\"); // NOI18N\n String driverClassName = (String) paramNameValueMap.get(\"driverClassName\"); // NOI18N\n if (username != null && url != null && driverClassName != null) {\n // return the datasource only if all the needed params are non-null except the password param\n result.add(new TomcatDatasource(username, url, password, name, driverClassName));\n }\n }\n }\n }\n }\n }\n return result;\n }", "public interface DataSourceSupplier {\n\n /**\n * Return the DataSource to use for the current request.\n * <p>\n * This should take into account multi-tenancy and the current tenantId.\n */\n DataSource dataSource();\n\n /**\n * Return the read only DataSource to use for the current request.\n * <p>\n * This can return null meaning that no read only DataSource (with autoCommit)\n * is available for use so normal transactions with explicit commit should be used.\n */\n DataSource readOnlyDataSource();\n\n /**\n * Obtain the current TenantId *IF* it is required for the DataSource.\n */\n Object currentTenantId();\n\n /**\n * Return a connection from the DataSource taking into account a tenantId for multi-tenant lazy loading.\n *\n * @param tenantId Most often null but well supplied indicates a multi-tenant lazy loading query\n * @return the connection to use\n */\n Connection connection(Object tenantId) throws SQLException;\n\n /**\n * Return a connection from the read only DataSource taking into account a tenantId for multi-tenant lazy loading.\n *\n * @param tenantId Most often null but well supplied indicates a multi-tenant lazy loading query\n * @param useMaster When true use the master data source\n * @return the connection to use\n */\n Connection readOnlyConnection(Object tenantId, boolean useMaster) throws SQLException;\n\n /**\n * Shutdown the datasource de-registering the JDBC driver if requested.\n */\n void shutdown(boolean deregisterDriver);\n\n}", "DataSource createDataSource(Map params) throws IOException;", "public interface ConnectionFactory {\r\n\r\n\t/**\r\n\t * Get a connection used for interacting with a given table.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tTableIndexDAO getConnection(String tableId);\r\n\t\r\n\t/**\r\n\t * Get a connection used for interacting with a given tables current version cache.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tCurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);\r\n\r\n\t/**\r\n\t * Get a connection used for interacting with a given tables current row cache.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tCurrentRowCacheDao getCurrentRowCacheConnection(Long tableId);\r\n\r\n\t/**\r\n\t * Get all unique connections used for interacting current tables\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tIterable<CurrentVersionCacheDao> getCurrentVersionCacheConnections();\r\n\r\n\t/**\r\n\t * Drop all tables in every database connectoin.\r\n\t * \r\n\t */\r\n\tvoid dropAllTablesForAllConnections();\r\n}", "public DataSourceRegistry getDataSourceRegistry();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called to signal whether unread content is available. Called once after the observer is initialized, and after that, called each time unread content status changes.
@CalledByNative("UnreadContentObserver") public void hasUnreadContentChanged(boolean hasUnreadContent) {}
[ "public void markNotificationsAsRead() {\n unreadNotifications = false;\n }", "private void markMessagesAsRead() {\n final ObservableValue<Chat> obsChat = BBMEnterprise.getInstance().getBbmdsProtocol().getChat(mChatId);\n mMarkMessagesReadObserver = new Observer() {\n @Override\n public void changed() {\n final Chat chat = obsChat.get();\n if (chat.exists == Existence.YES) {\n //remove ourselves as an observer so we don't get triggered again\n obsChat.removeObserver(this);\n if (chat.numMessages == 0 || chat.lastMessage == 0) {\n return;\n }\n\n //Ask the BBM Enterprise SDK to mark the last message in the chat as read.\n //All messages older then this will be marked as read.\n BBMEnterprise.getInstance().getBbmdsProtocol().send(\n new ChatMessageRead(mChatId, chat.lastMessage)\n );\n }\n }\n };\n //Add the chatObserver to the chat\n obsChat.addObserver(mMarkMessagesReadObserver);\n //Run the changed method\n mMarkMessagesReadObserver.changed();\n }", "void notifyAvailable()\n {\n if (listener != null)\n {\n listener.dataAvailable(this);\n }\n }", "public void setUnread(boolean unread) {\r\n this.unread = unread;\r\n }", "private void bindAppsUnreadInfo() {\n mHandler.post(new Runnable() {\n public void run() {\n final long start = System.currentTimeMillis();\n if (Util.DEBUG_PERFORMANCE) {\n \tUtil.Log.d(TAG, \"bindAppsUnreadInfo begin: start = \" + start);\n }\n if (mAppsCustomizeContent != null) {\n mAppsCustomizeContent.updateAppsUnread();\n }\n if (Util.DEBUG_PERFORMANCE) {\n \tUtil.Log.d(TAG, \"bindAppsUnreadInfo end: current time = \"\n + System.currentTimeMillis() + \",time used = \"\n + (System.currentTimeMillis() - start));\n }\n }\n });\n }", "private void registerContentObservers() {\n ContentResolver resolver = getContentResolver();\n resolver.registerContentObserver(LauncherSettings.Favorites.CONTENT_URI, true, mObserver);\n }", "public boolean UnreadNotifications() {\n return unreadNotifications;\n }", "public void notified() {\n if (!notified) {\n this.notified = true;\n }\n }", "public void setUnread(java.lang.String unread) {\n this.unread = unread;\n }", "public void showUnreadNotifications() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/jelly/ui/view/user/NotificationsUI.fxml\"));\n Parent root;\n root = loader.load();\n this.scene.setRoot(root);\n\t\t\t((NotificationsController)loader.getController()).emailUser = connectedUser.getMailUser();\n\t\t\t((NotificationsController)loader.getController()).currentUser = connectedUser;\n ((NotificationsController)loader.getController()).setScene(scene);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void showUnreadNotifications() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/jelly/ui/view/user/NotificationsUI.fxml\"));\n Parent root;\n root = loader.load();\n this.scene.setRoot(root);\n\t\t\t((NotificationsController)loader.getController()).emailUser = connectedUser.getMailUser();\n\t\t\t((NotificationsController)loader.getController()).currentUser = connectedUser;\n\n ((NotificationsController)loader.getController()).setScene(scene);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public boolean contentReceived(){\n return (recIm && recImArr);\n }", "@FXML\n private void markReadOrUnread() {\n hideAllWarnings();\n ObservableList<String> checked_messages = markRead_CB.getCheckModel().getCheckedItems();\n if (checked_messages.size() == 0) {\n showWarning(warning_DM, \"Select at least 1 message to mark READ/UNREAD\");\n return;\n }\n\n MessagePrompt output = MessagePrompt.CHANGE_STATUS_SUCCESS;\n for (String message : checked_messages) {\n if (message.endsWith(\"UNREAD\\n\")) {\n output = controller.changeMessageStatus((UUID.fromString(message.substring(4, 40))), MessageStatus.READ);\n }\n else {\n output = controller.changeMessageStatus((UUID.fromString(message.substring(4, 40))), MessageStatus.UNREAD);\n }\n if (output == MessagePrompt.MESSAGE_DOES_NOT_EXIST) { // the false case\n break;\n }\n }\n\n showMessageWarnings(output, warning_DM);\n showDMMessages();\n }", "void notifyUmsConnected() {\n String storageState = Environment.getExternalStorageState();\n if (!storageState.equals(Environment.MEDIA_REMOVED) &&\n !storageState.equals(Environment.MEDIA_BAD_REMOVAL) &&\n !storageState.equals(Environment.MEDIA_CHECKING)) {\n\n if (mAutoStartUms) {\n try {\n setMassStorageEnabled(true);\n } catch (RemoteException e) {\n }\n } else {\n updateUsbMassStorageNotification(false, true);\n }\n }\n\n Intent intent = new Intent(Intent.ACTION_UMS_CONNECTED);\n mContext.sendBroadcast(intent);\n }", "public void showUnreadNotifications() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/jelly/ui/view/user/NotificationsUI.fxml\"));\n Parent root;\n root = loader.load();\n this.scene.setRoot(root);\n ((NotificationsController)loader.getController()).emailUser = connectedUser.getMailUser();\n ((NotificationsController)loader.getController()).currentUser = connectedUser;\n ((NotificationsController)loader.getController()).setScene(scene);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "boolean onNotifyMessageChannelReady(@Nullable Bundle extras);", "public boolean notifyIfStateChangedFromSaved();", "private void registerContentObservers() {\n ContentResolver resolver = getContentResolver();\n resolver.registerContentObserver(LauncherProvider.CONTENT_APPWIDGET_RESET_URI,\n true, mWidgetObserver);\n }", "private void notifyWhenServerIsOffline() {\n //We check if the user has enabled the notification\n if (!userPreferences.notifyWhenServerGoesOffline().get()) {\n if (DEBUG)\n Log.d(TAG, \"Notifications when a server goes offline are not enabled. Skipping\");\n return;\n }\n\n //After we have updated all servers\n final Observable<MinecraftServerEntity> offlineServersObservable = Observable.from(servers)\n .filter(new Func1<MinecraftServerEntity, Boolean>() {\n @Override\n public Boolean call(MinecraftServerEntity server) {\n return server.getDetailedStatus() == MinecraftServer.DetailedStatus.OFFLINE;\n }\n });\n\n //We create a notification only for servers that the user does not know they are offline.\n final Observable<List<MinecraftServerEntity>> serversRequiringNotification = offlineServersObservable.asObservable()\n .filter(new Func1<MinecraftServerEntity, Boolean>() {\n @Override\n public Boolean call(MinecraftServerEntity minecraftServerEntity) {\n return !minecraftServerEntity.hasOfflineStatusBeenSeen();\n }\n })\n .toList();\n\n //TODO : zip the two observable to have both the list and the number of offline servers.\n Observable.zip(offlineServersObservable.count(), serversRequiringNotification, new Func2<Integer, List<MinecraftServerEntity>, Object[]>() {\n @Override\n public Object[] call(Integer numberOfOfflineServers, List<MinecraftServerEntity> serversRequiringNotification) {\n return new Object[]{numberOfOfflineServers, serversRequiringNotification};\n }\n })\n .observeOn(AndroidSchedulers.mainThread())\n .subscribeOn(AndroidSchedulers.mainThread())\n .subscribe(new Action1<Object[]>() {\n @Override\n public void call(Object[] objects) {\n final Integer numberOfOfflineServers = (Integer) objects[0];\n final List<MinecraftServerEntity> serversRequiringNotification = (List<MinecraftServerEntity>) objects[1];\n\n if (DEBUG) {\n final StringBuilder sServersRequiringNotification = new StringBuilder();\n for (MinecraftServerEntity e : serversRequiringNotification) {\n if (sServersRequiringNotification.length() == 0)\n sServersRequiringNotification.append(\"'\" + e.getName() + \"'\");\n else\n sServersRequiringNotification.append(\", '\" + e.getName() + \"'\");\n }\n if (sServersRequiringNotification.length() == 0)\n sServersRequiringNotification.append(\"(none)\");\n Log.d(TAG, \"Number of offline servers : \" + numberOfOfflineServers + \". Offline server(s) requiring a notification : \" + sServersRequiringNotification.toString());\n }\n //If the service is bound to an activity, we do not notify the user\n if (bindCount > 0) {\n if (DEBUG)\n Log.d(TAG, \"Activity is displayed to end-user. Notification muted.\");\n notificationManager.cancel(OFFLINE_SERVER_NOTIFICATION_ID);\n } else {\n if (serversRequiringNotification.size() > 0) {\n final Notification notification = buildNotificationForOfflineServers(numberOfOfflineServers, serversRequiringNotification);\n notificationManager.notify(OFFLINE_SERVER_NOTIFICATION_ID, notification);\n } else\n notificationManager.cancel(OFFLINE_SERVER_NOTIFICATION_ID);\n }\n }\n });\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns true if the intrinsic is a leaf, i.e. it does not make any calls / itself. Most intrinsics are leafs, the exceptions being the patchpoint / and statepoint intrinsics. These call (or invoke) their "target" argument.
@Converted(kind = Converted.Kind.MANUAL_COMPILATION, source = "${LLVM_SRC}/llvm/lib/IR/Function.cpp", line = 916, FQN="llvm::Intrinsic::isLeaf", NM="_ZN4llvm9Intrinsic6isLeafENS0_2IDE", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Function.cpp -nm=_ZN4llvm9Intrinsic6isLeafENS0_2IDE") //</editor-fold> public static boolean isLeaf(/*Intrinsic.ID*/int id) { switch (id) { default: return true; case ID.experimental_gc_statepoint: case ID.experimental_patchpoint_void: case ID.experimental_patchpoint_i64: return false; } }
[ "abstract boolean isLeaf();", "boolean hasTargetShape();", "public boolean isLeafContextNode();", "public boolean isLeafContainer() {\r\n\treturn (gateName != null && getChildCount() == 0);\r\n }", "private boolean isLeafStage(DispatchablePlanMetadata dispatchablePlanMetadata) {\n return dispatchablePlanMetadata.getScannedTables().size() == 1;\n }", "public boolean isLeaf() {\r\n\t\tif(this.auditMachines.size() > 0) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "boolean hasRooted();", "public boolean isLeafRegion() {\n\t\treturn getDirectChildren().isEmpty();\n\t}", "@Override\n public boolean isLeaf() {\n return false;\n }", "public boolean isLeaf() {\n return this.type == Type.LEAF;\n }", "public boolean isLeaf()\r\n {\r\n return kids[0] == null;\r\n }", "protected abstract boolean isTargetable(GameModel g, Tile tile);", "boolean hasTransformOp();", "public boolean isRoot()\n // -end- 327A877801CC get_head4551A5A200BB \"isRoot\"\n {\n // -beg- preserve=no 327A877801CC get_body4551A5A200BB \"isRoot\"\n return isRoot;\n // -end- 327A877801CC get_body4551A5A200BB \"isRoot\"\n }", "boolean hasGeoTargetConstant();", "@Override\n\t\tpublic boolean isLeaf() {\n\t\t\treturn getChildCount() == 0;\n\t\t}", "public boolean hasInstructions();", "public static boolean corectTargetResponse() {\n\t\tif (blockContext.targetCircles[blockContext.exitFlag] == blockContext.clickedCircle) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public boolean isLeaf()\n {\n\n return (children.getReference().left == null && children.getReference().right == null);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method allows to send the activate message to an email address.
public void sendActivateEmail(String email, String username, String activate) throws EmailException { try { String emailcontent = Files.readAllLines(Paths.get(Objects.requireNonNull(getClass().getClassLoader().getResource("activate.html")).toURI())).stream().collect(Collectors.joining()); emailcontent = emailcontent.replace("-username-", username).replace("-url-", activate); this.sendGridEmailService.sendHTML("admin@marsmarketplace.ga", email, "Activate Account", emailcontent); }catch (Exception e){ throw new EmailException("Backend Failure: Unable to send Activation Email!"); } }
[ "void activateUser(String email, String activationToken);", "public RegisterConfirmedPage activateAccount(String email) {\r\n\t\tactiveRailwayAccount(email);\r\n\r\n\t\t/*\r\n\t\t * this.clickLinkEmail(_activateSubject, email); \r\n\t\t * // Switch tab chrome ---------\r\n\t\t * ArrayList<String> arr = new\r\n\t\t * ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\t * Constant.WEBDRIVER.switchTo().window(arr.get(1)); // End Switch tab chrome\r\n\t\t * --------- //closeWindow(); //switchWindow();\r\n\t\t */\r\n\r\n\t\tArrayList<String> tabs = new ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\tConstant.WEBDRIVER.switchTo().window(tabs.get(0));\r\n\t\treturn new RegisterConfirmedPage();\r\n\t}", "@Override\n\tpublic Boolean activateAccount(User user) {\n\t\tBoolean success =false;\n\t\tfinal String username = \"intellicityteam@gmail.com\";\n\t\tfinal String password = \"intellicity\";\n\t\tString toEmail = user.getEmail();\n\t\tString toName = user.getUserName();\n \n\t\tProperties props = new Properties();\n\t\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t props.put(\"mail.smtp.socketFactory.port\", \"465\");\n\t props.put(\"mail.smtp.socketFactory.class\",\n\t \"javax.net.ssl.SSLSocketFactory\");\n\t props.put(\"mail.smtp.auth\", \"true\");\n\t props.put(\"mail.smtp.port\", \"465\");\n\t \n\t \n\t\tSession session = Session.getInstance(props,\n\t\t new javax.mail.Authenticator() {\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t}\n\t\t });\n \t\t\n\t\ttry {\n\t\t\tString token = Token.generateToken();\n\t\t\tMessage message = new MimeMessage(session);\n\t\t\tmessage.setFrom(new InternetAddress(\"intellicityteam@gmail.com\"));\n\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\tInternetAddress.parse(toEmail));\n\t\t\tmessage.setSubject(\"Intellicity Activation\");\n\t\t\tmessage.setText(\"Hello, \"+toName+\"! Your activation token is: \"+token);\n\t\t\tSystem.out.println(\"Sending to \"+toEmail);\n\t\t\tsaveToken(user, token);\n\t\t\tuser.setActivationToken(token);\n\t\t\tTransport.send(message);\n\t\t\tsuccess=true;\n\t\t\tSystem.out.println(\"Done\");\n \n\t\t} catch (MessagingException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn success;\n\t}", "public void launchEmail(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_MAIN); \n \tsendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Email App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "private void sendEmailForRequestInitiation() {\n\t\tList<String> emailIds = new ArrayList<String>();\r\n\t\temailIds.add(travelRequest.getEmployee().getEmailId());\r\n\t\tthis.emailComponent.sendMails(emailIds, travelRequest\r\n\t\t\t\t.getEmailSubjectForEmployeeInitiation(), travelRequest\r\n\t\t\t\t.getEmailBodyForEmployeeInitiation());\r\n\t\t// 2. Send email to Travel Desk\r\n\t\temailIds = new ArrayList<String>();\r\n\t\temailIds.add(EmailConstants.FINANCE_DESK_EMAIL);\r\n\t\tthis.emailComponent.sendMails(emailIds, travelRequest\r\n\t\t\t\t.getEmailSubjectForTravelDesk(), travelRequest\r\n\t\t\t\t.getEmailBodyForTravelDesk());\r\n\t}", "private void sendEmail(){\n String teachersEmail = tvTeachersEmail.getText().toString();\n String[] receiver = new String[1];\n receiver[0] = teachersEmail;\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_EMAIL, receiver);\n\n // opening only email clients - force sending with email\n intent.setType(\"message/rfc822\");\n startActivity(Intent.createChooser(intent, getString(R.string.open_email_clients)));\n }", "public void activeEmail() {\n\t\ttry {\n\t\t\tString token = JSFUtils.getRequestParameter(\"tk\");\n\t\t\tString mEmailId = JSFUtils.getRequestParameter(\"id\");\n\t\t\tMemberEmail mMail = memberEmailService.findMemberEmailById(Long.valueOf(mEmailId));\n\t\t\tif (mMail == null) {\n\t\t\t\tif (deletedEmail != null && mEmailId.equals(deletedEmail.getEmailId().toString())) {\n\t\t\t\t\tObject[] params = { deletedEmail.getEmail() };\n\t\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.InvalidMemberEmail\", params));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.InvalidActivatedLink\", null));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!memberEmailService.checkExistEmail(mMail.getEmail())) {\n\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.member.ActiveMailUnsuccessByNotLogic\", null));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mMail.getToken().equals(token)) {\n\t\t\t\tif (!mMail.getMember().getUsername().equals(utils.getLoggedInMember().getUsername())) {\n\t\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.prifile.NoMemberLogin\", null));\n\t\t\t\t} else {\n\t\t\t\t\tmMail.setToken(\"\");\n\t\t\t\t\tmMail.setActive(true);\n\t\t\t\t\tif (memberEmailService.update(mMail)) {\n\t\t\t\t\t\tJSFUtils.addSuccessMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.ActiveAlternateEmailSuccess\", null));\n\t\t\t\t\t\tfor (Member m : memberService.findAll()) {\n\t\t\t\t\t\t\tif (!(m.isActive()) && m.getUsername().equals(mMail.getEmail())) {\n\t\t\t\t\t\t\t\tmemberService.delete(m);\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\tmMail.setToken(token);\n\t\t\t\t\t\tmMail.setActive(false);\n\t\t\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.ActiveAlternateEmailFail\", null) + \"cannot update---\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.InvalidToken\", null));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tJSFUtils.addErrorMessage(\"profileMessage\", Utils.getMessage(\"myagile.profile.ActiveAlternateEmailFail\", null) + \"other catch-\");\n\t\t}\n\t}", "private void sendEmail() {\r\n\t\tLog.d(getLocalClassName(), \"sendEmail\");\r\n\r\n final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\r\n \r\n emailIntent .setType(\"plain/text\"); \r\n emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email}); \r\n// emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, \"\"); \r\n// emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, \"\"); \r\n startActivity(Intent.createChooser(emailIntent, \"Send mail...\"));\r\n }", "public void emailConfirmacao(){\n }", "@GetMapping(value = \"/sendAccountActivationEmail\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic BaseRestResponse sendAccountActivationEmail(@RequestParam(\"email\") String email) {\n\t\tLOG.info(\"UserRestController.sendAccountActivationEmail({})\", email);\n\t\tservice.sendConfirmationEmailAgain(email);\n\t\treturn new BaseRestResponse(true, \"Email sent\");\n\t}", "public void email() {\n\t\t\t\temailGUI = new EmailGUI();\n\t\t\t\tpopUpWindow = emailGUI.getFrame();\n\t\t\t\tpopUpWindow.setVisible(true);\n\t\t\t\temailGUI.setListeners(new mailListener());\n\t\t\t}", "private void sendBillingEmail(BillingMessage message) throws Exception {\n\n\t}", "public void sendAutomatedEmail() {\n \t Properties props = new Properties();\n \t Session session = Session.getDefaultInstance(props, null);\n \t String content = \"This Email is to remind you for the University elections starting tomorrow./nWe encourage you to participate by voting for your favourite Candidate./nBest,/nStudent Council\";\n \t \n \t for (int i=0; i<emails.size();i++) {\n \t\t try {\n \t\t\t MimeMessage msg = new MimeMessage(session);\n \t\t\t msg.setFrom(new InternetAddress(\"bejleribora@gmail.com\", \"Admin\"));\n \t\t\t msg.addRecipient(RecipientType.TO,\n \t\t\t new InternetAddress(emails.get(i), \"Dear Student\"));\n \t\t\t msg.setSubject(\"University Elections Reminder\");\n \t\t\t msg.setText(content);\n \t\t\t Transport.send(msg);\n \t\t } catch (AddressException e) {\n \t e.printStackTrace();\n \t } catch (MessagingException e) {\n \t e.printStackTrace();\n \t } catch (UnsupportedEncodingException e) {\n \t e.printStackTrace();\n \t }\n \t }\n }", "private void sendApplicationApprovedMail(Application application, Applicant applicant, String message) throws MessagingException {\r\n\t\tMailSender ms = new MailSender(\"smtp.gmail.com\", 465, \"lucasurrytest@gmail.com\", \"fairsailtest\");\r\n\t\t\r\n\t\tms.sendMessage(\"lucasurrytest@gmail.com\", \"Application was approved\", \"Your application \" + application.getApplicationId() + \" has been successfully approved \\n\\n\" + message, applicant.getEmailAddress());\r\n\t}", "public void sendEmail(){\r\n EmailService emailSvc = new EmailService(email, username, password, firstName, lastName);\r\n Thread th = new Thread(emailSvc);\r\n LOG.info(\"Starting a new thread to send the email..\");\r\n th.start();\r\n LOG.info(\"The email was sent successfully\");\r\n }", "private void EmailSent() {\n AlertDialog.Builder builder = new AlertDialog.Builder(ResetPassword.this);\n builder.setTitle(\"Confirmation PopUp!\").\n setMessage(\"We sent you an email to reset your password\");\n builder.setPositiveButton(\"ok\",\n (dialog, id) -> {\n Intent i = new Intent(getApplicationContext(),\n LoginActivity.class);\n startActivity(i);\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n }", "private void sendEmail() {\n final FirebaseUser user = auth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // Email sent\n }\n });\n // [END send_email_verification]\n }", "private void c_Activate(String name, boolean activate) {\r\n if(m_active = activate) {\r\n m_botAction.sendSmartPrivateMessage(name, \"Reacting to players who fly over safety tiles.\");\r\n } else {\r\n m_botAction.sendSmartPrivateMessage(name, \"NOT Reacting to players who fly over safety tiles.\");\r\n }\r\n }", "private void emailAttendees() {\n Intent i = new Intent(getActivity(), QuickResponseActivity.class);\n i.putExtra(QuickResponseActivity.EXTRA_EVENT_ID, mEventId);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if a coordinates should be considered zero in this geometry.
public boolean almostZero(Coordinates a);
[ "public boolean isZero() {\n\t\treturn x == 0.0 && y == 0.0 && z == 0.0;\n\t}", "public final boolean is_zero()\n {\n return x.signum() == 0 && y.signum() == 0;\n }", "public boolean isZero() {\n return (this.getLength() == 0); //XXX: Change to make dependent on tolerance.\n }", "public boolean isEmpty() {\n if (this.x1 == 0 && this.y1 == 0 && this.x2 == 0 && this.y2 == 0) {\n return true;\n }\n return false;\n }", "public boolean containsZero() {\n return upperBound.signum() >= 0 && lowerBound.signum() <= 0;\n }", "public boolean isEmpty() {\r\n return (Double.isNaN(x) && Double.isNaN(y));\r\n }", "public boolean nonZero() {\n\t\tfor(int x = 0; x < field.length; x++) {\n\t\t\tif(field[x] != 0)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isZero() {\n\t\tIterator<Monom> it=this.poly.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tMonom m=it.next();\r\n\t\t\tif(m.get_coefficient()!=0)\r\n\t\t\t\treturn false;\r\n\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean equalsZero(){\r\n\t\treturn lengthSquared() > minFloat;\r\n\t}", "@Override\n public boolean isLocationEmpty(int x, int y)\n {\n return isLocationEmpty(null, x, y);\n }", "@Override\n\tpublic boolean isZero() {\n\t\tif(polyArr.length == 0){\n\t\t\treturn true;\n\t\t}else{\n\t\t\tfor(int i = 0; i < polyArr.length; i++){\n\t\t\t\tif(polyArr[i]!=0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n public boolean isLocationEmpty(Unit unit, XYCoord coords)\n {\n return isLocationEmpty(unit, coords.xCoord, coords.yCoord);\n }", "public boolean isZero() {\n return (startTime == 0) && (stopTime == 0);\n }", "public final boolean isZero()\n {\n return ((m_vector[0] == 0) &&\n (m_vector[1] == 0) &&\n (m_vector[2] == 0));\n }", "public boolean isZero() {\n\t\t\treturn ((getReal()==0 && getImag()==0));\n\t\t}", "public boolean isZero() {\n\n return realPart == 0d && imaginaryPart == 0d;\n }", "public boolean isValid() {\n return !Double.isNaN(lat) && !Double.isNaN(lng) && (lat != 0 || lng != 0);\n }", "@Override\n\tpublic boolean isZero() {\n\t\tIterator<Monom> iterator = this.iteretor();\n\t\tMonom temp;\n\t\twhile(iterator.hasNext()) {\n\t\t\ttemp = iterator.next();\n\t\t\tif (!temp.isZero()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isZero() {\n\t\tlong stopTime = getStopTime();\n\t\tlong startTime = getStartTime();\n\t\tif (stopTime == 0 && startTime == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the length of the 'attributes' field
@Dynamic(Field.Property.LENGTH) public int attributesLength() { return this.attributesLength; }
[ "public int attributeSize()\r\n\t{\r\n\t\treturn this.attributes.size();\r\n\t}", "public int attributes_count() {\n return myAttributes.length;\n }", "public int getNumberOfAttributes();", "@Override\n public int getAttributeCount()\n {\n return attributes.getSubNodes().size();\n }", "int getNumberOfNecessaryAttributes();", "public int getAttributeCount() {\n return attributeCount;\n }", "public int getFieldLength()\n\t{\n\t\treturn fieldLength;\n\t}", "int getAttrContentCount();", "public int getAttributeCount() {\n\t AttributeSet[] as = getAttributes();\n\t int n = 0;\n\t for (int i = 0; i < as.length; i++) {\n\t\tn += as[i].getAttributeCount();\n\t }\n\t return n;\n\t}", "int getNumberOfOptionalAttributeFields();", "public long getLength () {\n\t\treturn (value.getLength());\n\t}", "public short getFieldLength() {\r\n\t\treturn fieldLength;\r\n\t}", "public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }", "int getNumberOfOptionalAttributes(final int field);", "public BigDecimal getFIELD_LENGTH() {\r\n return FIELD_LENGTH;\r\n }", "public final String getMaxLengthAttribute() {\n return getAttributeValue(\"maxlength\");\n }", "public int length () {\n return tags.length();\n }", "public int length() {\r\n return value.length();\r\n }", "public int getLength() {\n Element[] propertyElems =\n XMLUtils.selectDsNodes(getFirstChild(), Constants._TAG_SIGNATUREPROPERTY);\n\n return propertyElems.length;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get LogView data bytes size, as far as known modulo 16 and depends on the bytes received from device
public int getLovDataByteSize() { return 0; // sometimes first 4 bytes give the length of data + 4 bytes for number }
[ "long getLogSize();", "public static int size_infos_log_src() {\n return (16 / 8);\n }", "int getDataSize();", "int getDataLength();", "public int getLength()\n {\n return NUM_BYTES_IN_UINT16;\n }", "public static int size_infos_size_data() {\n return (8 / 8);\n }", "public static int offset_infos_size_data() {\n return (80 / 8);\n }", "public int getDataLength() {\n int length = 0;\n length += _dummySyncData.getDataSize();\n for (Packet packet : _packets) {\n length += (4 + packet.getNumWords() * 4); // 4 bytes for the header, plus the data size\n }\n return length;\n }", "public static int sizeBits_infos_log_src() {\n return 16;\n }", "int getServerPayloadSizeBytes();", "public static int size_reading() {\n return (16 / 8);\n }", "public int getDataLength() {\n\t\treturn length;\n\t}", "public final int getRxDataBlockLength() {\n return getParameter(11);\n }", "public int getSegmentSize() {\n return get(LOG_SEGMENT_SIZE, DEFAULT_LOG_SEGMENT_SIZE);\n }", "private short GetDataPacketLen() {\r\n return (short) (((m_abyPacket[5] << 8) & 0x0000FF00) | (m_abyPacket[4] & 0x000000FF) + 6);\r\n }", "public static int totalSizeBits_data() {\n return 480;\n }", "public static int offsetBits_infos_size_data() {\n return 80;\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public MessageLength getServiceDataMessageLength()\n {\n\treturn (MessageLength)mComponents[6];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for valid login User logs in with username and password correct credentials
@Test(description = "User logs in with username and password - correct credentials", groups = {"smoke"},priority = 1) public void validLogin(){ logoutPageobj.clickLogoutLink("Portal"); setcurrentContext(null, null, false); }
[ "@Test\n\tpublic void testLogin(){\n\t\tboolean check1 = userdatabase.login(userExistsData[USER_IND],userExistsData[PASS_IND]);\n\t\tassertTrue(check1);\n\t\t\n\t\t//Existing user but wrong password\n\t\tboolean check3 = userdatabase.login(\"natalieportman\",\"wrongpassword1@\");\n\t\tassertFalse(check3);\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void testLogin() {\n\t\tmanager.login(id, pass);\n\t\tassertEquals(\"Wolf\", manager.getCurrentUser().getFirstName());\n\t\tmanager.logout();\n\t\tassertNull(manager.getCurrentUser());\n\t\tmanager.login(\"jhnguye4\", \"wolfpack\");\n\t\tmanager.logout();\n\t}", "@Test\n public void testValidateLogin() {\n populateObjects();\n\n assertTrue(\"valid user/password\", securityOperations.validateLogin(\n \"admin\", \"admin\"));\n assertFalse(\"invalid user\", securityOperations.validateLogin(\"foo\",\n \"admin\"));\n assertFalse(\"invalid password\", securityOperations.validateLogin(\n \"admin\", \"foo\"));\n assertFalse(\"invalid user/password\", securityOperations.validateLogin(\n \"foo\", \"bar\"));\n assertFalse(\"null user\", securityOperations.validateLogin(\n (String) null, \"bar\"));\n assertFalse(\"null password\", securityOperations.validateLogin(\"foo\",\n (String) null));\n assertFalse(\"null user/password\", securityOperations.validateLogin(\n (String) null, (String) null));\n assertFalse(\"empty user\", securityOperations.validateLogin(\"\", \"bar\"));\n assertFalse(\"empty password\", securityOperations.validateLogin(\"foo\",\n \"\"));\n assertFalse(\"empty user/password\", securityOperations.validateLogin(\"\",\n \"\"));\n }", "private boolean logInRequest( String user_name, char[] password ) \n\t{\n\t\tboolean valid;\n\t\t\n\t /*---------------------------------------------------------------\n Attempt to find user that is attempting to log in\n ---------------------------------------------------------------*/\n\t\tUser potential_user = Database.find_user( user_name );\n\t\t\n\t /*---------------------------------------------------------------\n User not found\n ---------------------------------------------------------------*/\n\t\tif( potential_user == null )\n\t\t{\n\t\t\tvalid = false;\n\t\t}\n\t /*---------------------------------------------------------------\n User found\n ---------------------------------------------------------------*/\n\t\telse\n\t\t{\n\t\t /*---------------------------------------------------------------\n\t Check if entered password matches the potential users password\n\t ---------------------------------------------------------------*/\n\t\t\tvalid = Password.verify_password( potential_user, password );\n\t\t\t\n\t\t /*---------------------------------------------------------------\n\t Passwords match\n\t ---------------------------------------------------------------*/\n\t\t\tif( valid == true )\n\t\t\t{\n\t\t\t\tupdateUser( potential_user );\n\t\t\t}\n\t\t}\n\n\t\treturn valid;\n\t}", "@Test\n public void testWrongUAndCorrectP() {\n assertFalse(\"Invalid Credentials\", instance.login(\"Users\", \"epam123\"));\n }", "@Test\n public void testEmptyUAndP() {\n assertFalse(\"Invalid Credentials\", instance.login(\"\", \"\"));\n }", "@Test\n public void testCorrectUAndCorrectP() {\n assertTrue(\"Valid Credentials\", instance.login(\"admin\", \"epam123\"));\n }", "@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}", "@Test\n public void testLoginUser() {\n User user = null;\n try {\n user = Login.loginUser(email1);\n }\n catch (DatabaseException e) {\n fail(\"Unsuccessful login test: The user does not exist\");\n e.printStackTrace();\n }\n \n // Check if the right user is logged in\n assertEquals(\"Match attempt for first name\", firstName1, user.getFirstName());\n assertEquals(\"Match attempt for last name\", lastName1, user.getLastName());\n assertEquals(\"Match attempt for email\", email1, user.getEmail());\n }", "@Test\n public void testCorrectUAndWrongP() {\n assertFalse(\"Invalid Credentials\",\n instance.login(\"admin\", \"password@123\"));\n }", "private void login() {\n if (DataController.loginUser(usernameField.getText(), passwordField.getText())) {\n LoggedInUser.setLoggedInUser(usernameField.getText());\n responseLabel.setText(\"LOGGED IN\");\n } else {\n LoggedInUser.setLoggedInUser(null);\n responseLabel.setText(\"FAILED AUTH\");\n }\n }", "public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "boolean login(User user) throws Exception;", "private String checkLogin(String username, String password) throws Exception {\n if (!username.equalsIgnoreCase(\"test\") && !password.equalsIgnoreCase(\"test\")) {\n throw new Exception(\"Invalid username or password\");\n }\n return defaultToken;\n }", "private void login() {\n\n final String username = (String) packet.getArgument(\"username\");\n final String password = (String) packet.getArgument(\"password\");\n\n if(clientDatabase.existsCredential(username, password)) {\n\n clientDatabase.getUserDetails(username, clientSession);\n\n Packet loginConfirmationPacket = new PacketBuilder()\n .ofType(PacketType.LOGIN.getConfirmation())\n .addArgument(\"id\", clientSession.getId())\n .addArgument(\"name\", clientSession.getName())\n .addArgument(\"role\", clientSession.getRole())\n .build();\n\n clientRepository.sendPacketIO(channel, loginConfirmationPacket);\n\n } else {\n\n Packet loginErrorPacket = new PacketBuilder()\n .ofType(PacketType.LOGIN.getError())\n .build();\n\n clientRepository.sendPacketIO(channel, loginErrorPacket);\n\n }\n\n }", "public boolean validateUserCredentials(String login, String password) throws SQLException;", "private void verifyLogin() throws Exception{\r\n\t\tString enPwd = cs.encrypt(localUser.password);\r\n\t\tboolean failedLogin = false;\r\n\t\t\r\n\t\tString mzpId = req.getParameter(\"mzpIds\"); \r\n\t\tif (mzpId ==null) {\r\n\t\t\tmzpId = \"\"; \r\n\t\t}\r\n\r\n\t\ttry{\r\n\r\n\t\t\t//tries to retrieve the record matching the user-entered user id\r\n\t\t\tIusers userRec = Iusers.getIusersByUsername(User.getGenericUser(), localUser.userName);\r\n\t\t\tif (userRec != null){\r\n\t\t\t\tlocalUser.result = \"SUCCESS\";//the username is found in the database\r\n\t\t\t\tSecuritySettings setting = new SecuritySettings(User.getGenericUser());//retrieves the record from security settings\r\n\t\t\t\t//for time comparisons\r\n\t\t\t\tCalendar todayCal = Calendar.getInstance();\r\n\t\t\t\tTimestamp today = DateUtilities.getTimestamp(true);\r\n\t\t\t\ttodayCal.setTimeInMillis(today.getTime());\r\n\t\t\t\tCalendar userSetCal = Calendar.getInstance();\r\n\t\t\t\tuserSetCal.setTimeInMillis(userRec.getPasswordSetDate().getTime());\r\n\r\n\t\t\t\t//checks to see if the account has been deleted\r\n\t\t\t\tif (\"Y\".equals(userRec.getDeleted())){\r\n\t\t\t\t\tlocalUser.result = \"Your account has been deleted. Please contact your administrator.\";\r\n\t\t\t\t\tlocalUser.authenticated = false;//sets authenticated flag to false\t\r\n\t\t\t\t\tpciLog.warn(\"4: Attempt to log in to deleted account: \"+localUser.userName);\r\n\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//checks if the account is disabled\r\n\t\t\t\tif (!failedLogin && \"Y\".equals(userRec.getDisabled())){\r\n\t\t\t\t\tlocalUser.result = \"Your account has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\tlocalUser.authenticated = false;//sets authenticated flag to false\r\n\t\t\t\t\tpciLog.warn(\"5: Attempt to log in to disabled account: \"+localUser.userName);\r\n\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//checks if the acount should be disabled\r\n\t\t\t\tif (!failedLogin && userRec.getDisableOnDate() != null ){\r\n\t\t\t\t\tuserSetCal.setTimeInMillis(userRec.getDisableOnDate().getTime());\r\n\t\t\t\t\tif ((DateUtilities.dateDiff(userSetCal, todayCal)) >= 0){\r\n\t\t\t\t\t\tuserRec.setDisabled(\"Y\");\r\n\t\t\t\t\t\tlocalUser.authenticated = false;\r\n\t\t\t\t\t\tlocalUser.result = \"Your account has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\t\tpciLog.error(\"6: Account disabled, expired: \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//checks if the account has been idle for longer than the allowed amount of days\r\n\t\t\t\tif (!failedLogin && setting.getUnusedDaysAllowed() != null && userRec.getLastLogin() != null){\r\n\t\t\t\t\tuserSetCal.setTimeInMillis(userRec.getLastLogin().getTime());\r\n\t\t\t\t\tif ((DateUtilities.dateDiff(userSetCal, todayCal)) > (setting.getUnusedDaysAllowed().intValue())){\r\n\t\t\t\t\t\tuserRec.setDisabled(\"Y\");\r\n\t\t\t\t\t\tuserRec.setDisableOnDate(today);\r\n\t\t\t\t\t\tlocalUser.authenticated = false;\r\n\t\t\t\t\t\tlocalUser.result = \"Your account has not been used in more than \" + (setting.getUnusedDaysAllowed())\r\n\t\t\t\t\t\t\t\t+ \" days and has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\t\tpciLog.error(\"7: Account disabled, inactivity: \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Checks to see if password is changeable and compares the date of last change to the days allowed\r\n\t\t\t\tif (!failedLogin && userRec.getPasswordSetDate() != null){\r\n\t\t\t\t\tuserSetCal.setTimeInMillis(userRec.getPasswordSetDate().getTime());\r\n\t\t\t\t\tif ((\"N\".equals(userRec.getPasswordChangeable()))\r\n\t\t\t\t\t\t\t&& (DateUtilities.dateDiff(userSetCal, todayCal) > setting.getPasswordExpireDays().intValue())\r\n\t\t\t\t\t\t\t&& (\"N\".equals(userRec.getPasswordNeverExpires()))){\r\n\t\t\t\t\t\tuserRec.setDisabled(\"Y\");\r\n\t\t\t\t\t\tuserRec.setDisableOnDate(today);//sets the disabled on date to today\r\n\t\t\t\t\t\tlocalUser.authenticated = false;\r\n\t\t\t\t\t\tlocalUser.result = \"Your password has expired and your account has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\t\tpciLog.error(\"7: Account disabled, password expired: \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Compares the user-entered password to the stored password and compares the number of failed logins to the number allowed\r\n\t\t\t\tif (!failedLogin && !userRec.getPassword().equals(enPwd)){\r\n\t\t\t\t\tBigDecimal failedLogins = userRec.getFailedLogins();\r\n\t\t\t\t\tif(failedLogins == null && BigDecimal.ZERO.compareTo(setting.getLoginsFailedAllowed()) >= 0){\r\n\t\t\t\t\t\tuserRec.setDisabled(\"Y\");//disables the password\r\n\t\t\t\t\t\tuserRec.setDisableOnDate(today);//sets the disabled on date to today\r\n\t\t\t\t\t\tlocalUser.authenticated = false;//sets authenticated flag to false\r\n\t\t\t\t\t\tlocalUser.result = \"You have exceeded the allowed failed logins and your account has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\t\tpciLog.error(\"6: Account disabled - maximum login attempts reached by \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (failedLogins != null && failedLogins.compareTo(setting.getLoginsFailedAllowed()) >= 0){\r\n\t\t\t\t\t\tuserRec.setDisabled(\"Y\");//disables the password\r\n\t\t\t\t\t\tuserRec.setDisableOnDate(today);//sets the disabled on date to today\r\n\t\t\t\t\t\tlocalUser.authenticated = false;//sets authenticated flag to false\r\n\t\t\t\t\t\tlocalUser.result = \"You have exceeded the allowed failed logins and your account has been disabled. Please contact your administrator.\";\r\n\t\t\t\t\t\tpciLog.error(\"6: Account disabled - maximum login attempts reached by \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//Increment the number of failed logins\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tlocalUser.authenticated = false;\r\n\t\t\t\t\t\tlocalUser.result = \"Invalid password. Please try again.\";\r\n\t\t\t\t\t\tpciLog.warn(\"2: Invalid login attempt by \"+localUser.userName);\r\n\t\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//checks to see if they need to reset their password\r\n\t\t\t\tuserSetCal.setTimeInMillis(userRec.getPasswordSetDate().getTime());\r\n\t\t\t\tif (!failedLogin\r\n\t\t\t\t\t\t&& (\"Y\".equals(userRec.getPasswordExpired()) || (DateUtilities.dateDiff(userSetCal, todayCal) > setting\r\n\t\t\t\t\t\t\t\t.getPasswordExpireDays().intValue())) && \"N\".equals(userRec.getPasswordNeverExpires())){\r\n\t\t\t\t\tuserRec.setPasswordExpired(\"Y\");\r\n\t\t\t\t\tlocalUser.passwordExpired = true;\r\n\t\t\t\t\tlocalUser.authenticated = true;\r\n\t\t\t\t\tlocalUser.result = \"Your password has expired. Please choose a new password.\";\r\n\t\t\t\t\tfailedLogin = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (failedLogin == false){\r\n\t\t\t\t\tlocalUser.authenticated = true;\r\n\t\t\t\t\tlocalUser.result = \"SUCCESS\";\r\n\t\t\t\t\tlocalUser.passwordExpired = false;\r\n\t\t\t\t\tlocalUser.email = userRec.getEmail();\r\n\t\t\t\t\tlocalUser.langCd = userRec.getLangCode();\r\n\t\t\t\t\tlocalUser.userID = (userRec.getUserId().toString());\r\n\t\t\t\t\tuserRec.setLastLogin(today);\r\n\t\t\t\t\tuserRec.setFailedLogins(new BigDecimal(0));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tBigDecimal failedLogins = userRec.getFailedLogins();\r\n\t\t\t\t\tif(failedLogins == null)\r\n\t\t\t\t\t\tuserRec.setFailedLogins(new BigDecimal(\"1\"));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tuserRec.setFailedLogins(failedLogins.add(new BigDecimal(\"1\")));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\tuserRec.save();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlocalUser.result = \"Username not found\";\r\n\t\t\t\tlocalUser.authenticated = false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (SQLException e){\r\n\t\t\te.printStackTrace(System.err);\r\n\t\t\tlog.error(\"user not found()\", e);\r\n\t\t}\r\n\r\n\t}", "private void logIn() {\n\t\tUser user =null;\n\t\twhile(user == null) {\n\t\t\tSystem.out.println(\"Please enter you username: \");\n\t\t\tString username = scanner.nextLine();\n\t\t\tSystem.out.println(\"Please enter you password: \");\n\t\t\tString password = scanner.nextLine();\n\t\t\tuser = userRepo.getUser(username, password);\n\t\t}\n\t\tactivateUser(user);\n\t}", "public void login() {\n if(username.get() != null && !username.get().isEmpty() && password.get() != null && !password.get().isEmpty()) {\n model.login(username.get(), password.get());\n String response = model.loginResponse();\n loginResponse.set(response);\n }\n else{\n loginResponse.setValue(\"Must enter both, username and password\");\n username.setValue(null);\n password.setValue(null);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the modified date of this register.
@Override public void setModifiedDate(Date modifiedDate);
[ "public void setModifiedDate(Date modifiedDate);", "public void setModified(Date modified)\n {\n this.modified = modified;\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_ext_information.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_unit.setModifiedDate(modifiedDate);\n\t}", "@Override\n public void setModifiedDate(java.util.Date modifiedDate) {\n _person.setModifiedDate(modifiedDate);\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_esfState.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_changesetEntry.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_workFlowConfig.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_userInfo.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_userTracker.setModifiedDate(modifiedDate);\n\t}", "void setModifyDate(final Date lastModifiedDate);", "void setLastModifiedDate(D lastModifiedDate);", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_employee.setModifiedDate(modifiedDate);\n\t}", "@Override\n\tpublic void setModifiedDate(Date modifiedDate) {\n\t\t_location.setModifiedDate(modifiedDate);\n\t}", "public void setDateModified(Date value)\n {\n setAttributeInternal(DATEMODIFIED, value);\n }", "public void setDateModified(Date value) {\n setAttributeInternal(DATEMODIFIED, value);\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_taskSession.setModifiedDate(modifiedDate);\n\t}", "public final void updateModifyDateTime() {\n \tm_modifyDate = System.currentTimeMillis();\n \tm_accessDate = m_modifyDate;\n }", "@Override\n\tpublic void setModifiedDate(java.util.Date modifiedDate) {\n\t\t_dmGtStatus.setModifiedDate(modifiedDate);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value property: Collection of available operation details.
List<OperationDetail> value();
[ "public static java.util.Collection getOperationDescs() {\n return _myOperationsList;\n }", "public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }", "public java.util.List<OperationSummary> getOperations() {\n if (operations == null) {\n operations = new com.amazonaws.internal.SdkInternalList<OperationSummary>();\n }\n return operations;\n }", "public List<ManagementOperationInfo> getOperations() {\n return operations;\n }", "Collection getOperations();", "@Schema(description = \"If the expand option `operations` is used, returns the list of operations available for this version.\")\n public List<SimpleLink> getOperations() {\n return operations;\n }", "@ApiModelProperty(value = \"The operations that can be performed on the issue.\")\n public Operations getOperations() {\n return operations;\n }", "public List<OperationalData> getOperationalData()\r\n\t{\r\n\t\treturn operationalData;\r\n\t}", "public ObservableList<Operation> getOperations() {\n\t\treturn operations;\n\t}", "public String getOperationDesc() {\r\n return operationDesc;\r\n }", "public String toString() {\n return operation;\n }", "public OperationResultInfoBase operation() {\n return this.operation;\n }", "public String toString () {\r\n\t\treturn allOps;\r\n\t}", "Collection getOperations(String operationName);", "java.util.List<yandex.cloud.api.operation.OperationOuterClass.Operation> \n getOperationsList();", "public com.sforce.soap._2006._04.metadata.SummaryOperations getSummaryOperation() {\r\n return summaryOperation;\r\n }", "String describeCurrentOperationUnsafe() {\n return mRecentOperations.describeCurrentOperation();\n }", "Map<String, String> getAvailableAuditLogOperations();", "public DataStructure getOperations() {\r\n\t\tif (ports == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_STRUCTURE;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = ports.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLPort port = (WSDLPort) it.next();\r\n\t\t\tl.addAll(port.getOperations());\r\n\t\t}\r\n\t\treturn l;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EInt__Group__0__Impl" $ANTLR start "rule__EInt__Group__1" InternalBasicAttributes.g:1034:1: rule__EInt__Group__1 : rule__EInt__Group__1__Impl ;
public final void rule__EInt__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBasicAttributes.g:1038:1: ( rule__EInt__Group__1__Impl ) // InternalBasicAttributes.g:1039:2: rule__EInt__Group__1__Impl { pushFollow(FOLLOW_2); rule__EInt__Group__1__Impl(); state._fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__EInt__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:1011:1: ( rule__EInt__Group__0__Impl rule__EInt__Group__1 )\n // InternalBasicAttributes.g:1012:2: rule__EInt__Group__0__Impl rule__EInt__Group__1\n {\n pushFollow(FOLLOW_10);\n rule__EInt__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:1049:1: ( ( RULE_INT ) )\n // InternalBasicAttributes.g:1050:1: ( RULE_INT )\n {\n // InternalBasicAttributes.g:1050:1: ( RULE_INT )\n // InternalBasicAttributes.g:1051:2: RULE_INT\n {\n before(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n match(input,RULE_INT,FOLLOW_2); \n after(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EAttributes__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:14145:1: ( rule__EAttributes__Group__1__Impl )\n // InternalAADMParser.g:14146:2: rule__EAttributes__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EAttributes__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6703:1: ( rule__EInt__Group__1__Impl )\n // InternalComponentDefinition.g:6704:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6676:1: ( rule__EInt__Group__0__Impl rule__EInt__Group__1 )\n // InternalComponentDefinition.g:6677:2: rule__EInt__Group__0__Impl rule__EInt__Group__1\n {\n pushFollow(FOLLOW_35);\n rule__EInt__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FQN__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:984:1: ( rule__FQN__Group_1__1__Impl )\n // InternalBasicAttributes.g:985:2: rule__FQN__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__FQN__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleEInt() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:181:2: ( ( ( rule__EInt__Group__0 ) ) )\n // InternalBasicAttributes.g:182:2: ( ( rule__EInt__Group__0 ) )\n {\n // InternalBasicAttributes.g:182:2: ( ( rule__EInt__Group__0 ) )\n // InternalBasicAttributes.g:183:3: ( rule__EInt__Group__0 )\n {\n before(grammarAccess.getEIntAccess().getGroup()); \n // InternalBasicAttributes.g:184:3: ( rule__EInt__Group__0 )\n // InternalBasicAttributes.g:184:4: rule__EInt__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getEIntAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Attribute__Group_0_2__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:7473:1: ( rule__Attribute__Group_0_2__1__Impl )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:7474:2: rule__Attribute__Group_0_2__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Attribute__Group_0_2__1__Impl_in_rule__Attribute__Group_0_2__115040);\r\n rule__Attribute__Group_0_2__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Interface__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5204:1: ( ( ( rule__Interface__Group_0__0 )? ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5205:1: ( ( rule__Interface__Group_0__0 )? )\r\n {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5205:1: ( ( rule__Interface__Group_0__0 )? )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5206:1: ( rule__Interface__Group_0__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getInterfaceAccess().getGroup_0()); \r\n }\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5207:1: ( rule__Interface__Group_0__0 )?\r\n int alt35=2;\r\n int LA35_0 = input.LA(1);\r\n\r\n if ( (LA35_0==51) ) {\r\n alt35=1;\r\n }\r\n switch (alt35) {\r\n case 1 :\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5207:2: rule__Interface__Group_0__0\r\n {\r\n pushFollow(FOLLOW_rule__Interface__Group_0__0_in_rule__Interface__Group__0__Impl10582);\r\n rule__Interface__Group_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getInterfaceAccess().getGroup_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__AttributeDefinition__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:687:1: ( rule__AttributeDefinition__Group__0__Impl rule__AttributeDefinition__Group__1 )\n // InternalBasicAttributes.g:688:2: rule__AttributeDefinition__Group__0__Impl rule__AttributeDefinition__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__AttributeDefinition__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__AttributeDefinition__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AddAttribute__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5554:1: ( rule__AddAttribute__Group__1__Impl )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5555:2: rule__AddAttribute__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__AddAttribute__Group__1__Impl_in_rule__AddAttribute__Group__111369);\n rule__AddAttribute__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EnumerationElement__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:1389:1: ( rule__EnumerationElement__Group_1__1__Impl )\n // InternalBasicAttributes.g:1390:2: rule__EnumerationElement__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EnumerationElement__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6714:1: ( ( RULE_INT ) )\n // InternalComponentDefinition.g:6715:1: ( RULE_INT )\n {\n // InternalComponentDefinition.g:6715:1: ( RULE_INT )\n // InternalComponentDefinition.g:6716:2: RULE_INT\n {\n before(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n match(input,RULE_INT,FOLLOW_2); \n after(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDomain.g:2245:1: ( rule__EInt__Group__1__Impl )\n // InternalDomain.g:2246:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:4354:1: ( rule__EInt__Group__1__Impl )\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:4355:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__EInt__Group__1__Impl_in_rule__EInt__Group__18683);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:1992:1: ( rule__EInt__Group__1__Impl )\n // InternalTaskDefinition.g:1993:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:6388:1: ( rule__EInt__Group__1__Impl )\n // InternalCeffective.g:6389:2: rule__EInt__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInt__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FQN__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBasicAttributes.g:930:1: ( rule__FQN__Group__1__Impl )\n // InternalBasicAttributes.g:931:2: rule__FQN__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__FQN__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInt__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDomain.g:2256:1: ( ( RULE_INT ) )\n // InternalDomain.g:2257:1: ( RULE_INT )\n {\n // InternalDomain.g:2257:1: ( RULE_INT )\n // InternalDomain.g:2258:2: RULE_INT\n {\n before(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n match(input,RULE_INT,FOLLOW_2); \n after(grammarAccess.getEIntAccess().getINTTerminalRuleCall_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }